text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (r GopassRepo) DeleteState() error { if err := r.prepare(); err != nil { return err } cmd := exec.Command("gopass", "rm", "-f", r.config.Repo.State) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr cmd.Stdin = os.Stdin if err := cmd.Run(); err != nil { return fmt.Errorf("gopass failed with %s", err) } re...
[ -0.05679940804839134, 0.23023369908332825, 0.577344536781311, -0.5171654224395752, 0.6652734279632568, 0.24222888052463531, 0.08294498175382614, 0.33457067608833313, -0.299410343170166, 0.09434159100055695, 0.4676191210746765, -0.06734131276607513, -0.8902732729911804, 0.37468084692955017,...
func (r GopassRepo) lockState(payload []byte) error { return nil }
[ -0.39690378308296204, -0.26712584495544434, 0.3681405484676361, -0.37150242924690247, 0.3901531398296356, 0.6311461329460144, 0.313903272151947, -0.370875746011734, 0.7116573452949524, -0.35628774762153625, -0.37203076481819153, -0.15866273641586304, -1.1513447761535645, -0.337456375360488...
func (r GopassRepo) unlockState(payload []byte) error { return nil }
[ -0.4823119044303894, 0.24706684052944183, 0.27344536781311035, -0.7417173385620117, -0.13049739599227905, 0.04642016813158989, 0.5164570808410645, 0.5221656560897827, 0.3500434160232544, -0.17514316737651825, -0.20538640022277832, -0.6299458742141724, -1.1209962368011475, -0.75398135185241...
func (e *Error) Empty() bool { return e.Code == StatusOK && e.Msg == "" && e.Err == nil }
[ -0.9224398732185364, -0.2950928509235382, 0.44851768016815186, -0.42850086092948914, -0.016022244468331337, 0.7709696888923645, -0.9398387670516968, 0.1894776076078415, -0.2317894548177719, 0.9447461366653442, -0.6479902863502502, 0.528794527053833, -0.2721973657608032, 0.740260660648346, ...
func statusText(code StatusCode) string { switch code { case StatusOK: return "ok" case StatusNotFound: return "not found" case StatusClassNotFound: return "class not found" case StatusShardNotFound: return "shard not found" case StatusConflict: return "conflict" case StatusPreconditionFailed: return...
[ -0.48297715187072754, -1.0582178831100464, 0.294181227684021, -0.06491412967443466, -0.14685410261154175, 0.170404314994812, -0.4693470895290375, 0.1777477115392685, 1.4907097816467285, 0.9260095357894897, -0.6054161787033081, -0.4924890398979187, -0.29363512992858887, 0.0807463675737381, ...
func (fc finderClient) FullRead(ctx context.Context, host, index, shard string, id strfmt.UUID, props search.SelectProperties, additional additional.Properties, ) (objects.Replica, error) { return fc.cl.FetchObject(ctx, host, index, shard, id, props, additional) }
[ 0.44980353116989136, -0.46170198917388916, 0.45001766085624695, -0.2773110568523407, -0.49817806482315063, 0.1728512942790985, -0.2718554735183716, -0.5133307576179504, 0.5536825060844421, -0.23040930926799774, 0.7580621838569641, 0.9558103084564209, -0.2362680435180664, -1.736791491508483...
func (fc finderClient) DigestReads(ctx context.Context, host, index, shard string, ids []strfmt.UUID, ) ([]RepairResponse, error) { n := len(ids) rs, err := fc.cl.DigestObjects(ctx, host, index, shard, ids) if err == nil && len(rs) != n { err = fmt.Errorf("malformed digest read response: length expected %d got %...
[ -1.0551533699035645, -0.31524595618247986, 0.5291497111320496, -0.6247340440750122, 0.26852136850357056, -0.2984755039215088, -0.2453879714012146, -0.05780128762125969, 0.23682580888271332, 0.13412530720233917, 1.2169907093048096, 0.30302056670188904, -1.088079571723938, -0.766850113868713...
func (fc finderClient) FullReads(ctx context.Context, host, index, shard string, ids []strfmt.UUID, ) ([]objects.Replica, error) { n := len(ids) rs, err := fc.cl.FetchObjects(ctx, host, index, shard, ids) if m := len(rs); err == nil && n != m { err = fmt.Errorf("malformed full read response: length expected %d g...
[ -0.06595025956630707, 0.14040163159370422, 0.3405594825744629, -0.8323888182640076, -0.22838525474071503, -0.33754900097846985, -0.7167294025421143, -0.18465089797973633, 0.5717315077781677, 0.2405604124069214, 1.0812056064605713, 0.06537756323814392, -0.8637109398841858, -0.68445581197738...
func (fc finderClient) Overwrite(ctx context.Context, host, index, shard string, xs []*objects.VObject, ) ([]RepairResponse, error) { return fc.cl.OverwriteObjects(ctx, host, index, shard, xs) }
[ -1.2142581939697266, -0.08023537695407867, 0.30971449613571167, 0.131796732544899, 1.1269391775131226, -0.6675068140029907, 0.6399951577186584, -0.6957190632820129, 0.2571733295917511, 0.3454480469226837, -0.36271005868911743, 0.17822010815143585, -1.2226463556289673, -0.9342901110649109, ...
func (o *DeleteLibraryAPIVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewDeleteLibraryAPIVersionOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } re...
[ -0.6966646909713745, -1.4896140098571777, 0.8466752171516418, 0.42416471242904663, 0.18138912320137024, -0.9047053456306458, -0.04683055728673935, 0.17816488444805145, 0.7480595707893372, 0.8165673017501831, 0.5202162265777588, -0.4749419689178467, -1.0641881227493286, -0.13343971967697144...
func NewDeleteLibraryAPIVersionOK() *DeleteLibraryAPIVersionOK { return &DeleteLibraryAPIVersionOK{} }
[ -0.6311337947845459, -1.648738145828247, 0.1448584347963333, 0.6624453663825989, 0.23942147195339203, -0.3570960462093353, 0.3857271373271942, 0.6852547526359558, 0.09865111857652664, 0.27141711115837097, 0.03359995409846306, -1.6163469552993774, 0.04813694953918457, 0.8386079668998718, ...
func NewDeleteLibraryAPIVersionUnauthorized() *DeleteLibraryAPIVersionUnauthorized { return &DeleteLibraryAPIVersionUnauthorized{} }
[ -1.0231064558029175, -1.7091901302337646, 0.17064277827739716, 0.06597967445850372, -0.22288241982460022, -0.3595469295978546, 0.04107068479061127, 1.0961827039718628, 0.2610834538936615, -0.6166503429412842, 0.0494050607085228, 0.05590588226914406, -0.512962281703949, 0.19360163807868958,...
func (r *BigStorageRepository) GetAll() ([]BigStorage, error) { var response bigStoragesWrapper restRequest := rest.Request{Endpoint: "/big-storages"} err := r.Client.Get(restRequest, &response) return response.BigStorages, err }
[ -0.21665441989898682, 0.3154700696468353, 0.5137107372283936, 1.1797842979431152, 0.9877824187278748, 0.036414068192243576, -0.9345874786376953, 0.22080570459365845, 0.67571622133255, -0.3928406834602356, -0.23589053750038147, 0.6764956116676331, -0.4807147681713104, 0.7085704207420349, ...
func (r *BigStorageRepository) GetSelection(page int, itemsPerPage int) ([]BigStorage, error) { var response bigStoragesWrapper params := url.Values{ "pageSize": []string{fmt.Sprintf("%d", itemsPerPage)}, "page": []string{fmt.Sprintf("%d", page)}, } restRequest := rest.Request{Endpoint: "/big-storages", Pa...
[ -1.141708493232727, 0.15054242312908173, 0.593681812286377, 0.28414756059646606, 1.1444461345672607, -0.9574896097183228, -0.18064935505390167, -0.19465851783752441, 0.5668714046478271, 0.08354318141937256, -0.5941208600997925, 0.06580907851457596, -0.35043439269065857, -0.1054292842745781...
func (r *BigStorageRepository) GetByName(bigStorageName string) (BigStorage, error) { var response bigStorageWrapper restRequest := rest.Request{Endpoint: fmt.Sprintf("/big-storages/%s", bigStorageName)} err := r.Client.Get(restRequest, &response) return response.BigStorage, err }
[ -0.28338268399238586, 0.1491600126028061, 0.3762761652469635, 0.04437828063964844, 0.42726024985313416, -1.1013461351394653, -0.20004186034202576, -0.06660673767328262, -0.16774410009384155, -0.005295603536069393, -0.46972033381462097, 0.5508919358253479, -0.5807217955589294, 0.00783204194...
func (r *BigStorageRepository) Order(order BigStorageOrder) error { restRequest := rest.Request{Endpoint: "/big-storages", Body: &order} return r.Client.Post(restRequest) }
[ -1.2399609088897705, 0.2816053628921509, 0.40550145506858826, 0.7861351370811462, 1.1004186868667603, -0.11075339466333389, -0.8766125440597534, 0.11901573091745377, 0.15446177124977112, -0.22056844830513, -1.0905872583389282, 0.3548729717731476, -0.21461142599582672, 0.1944987177848816, ...
func (r *BigStorageRepository) OrderWithResponse(order BigStorageOrder) (rest.Response, error) { restRequest := rest.Request{Endpoint: "/big-storages", Body: &order} return r.Client.PostWithResponse(restRequest) }
[ -0.30965378880500793, -0.5816869139671326, 0.49147680401802063, 0.6248828768730164, 0.526892900466919, -0.782604992389679, -0.5165790915489197, -0.8152095675468445, 1.2347469329833984, -0.31722068786621094, -0.8825026154518127, -0.9364257454872131, 0.33072197437286377, -0.3927057683467865,...
func (r *BigStorageRepository) Upgrade(bigStorageName string, size int, offsiteBackups bool) error { requestBody := bigStorageUpgradeRequest{BigStorageName: bigStorageName, Size: size, OffsiteBackups: offsiteBackups} restRequest := rest.Request{Endpoint: "/big-storages", Body: &requestBody} return r.Client.Post(res...
[ -1.493722915649414, -0.07643996924161911, 0.4977129101753235, 0.6055147051811218, 0.3115841746330261, -0.29605135321617126, -0.40446901321411133, 0.0701197013258934, 0.25137269496917725, 0.19164222478866577, -0.8900768756866455, -0.023162448778748512, -0.5101190805435181, -0.67761433124542...
func (r *BigStorageRepository) Update(bigStorage BigStorage) error { requestBody := bigStorageWrapper{BigStorage: bigStorage} restRequest := rest.Request{Endpoint: fmt.Sprintf("/big-storages/%s", bigStorage.Name), Body: &requestBody} return r.Client.Put(restRequest) }
[ -1.2477173805236816, -0.5810956954956055, 0.17342786490917206, -0.2126150131225586, 0.2713293433189392, 0.2298731803894043, -0.48586398363113403, 0.20550262928009033, 0.537847101688385, 0.12054465711116791, -0.469625324010849, 0.03330977261066437, -0.7492424845695496, 0.002016679849475622,...
func (r *BigStorageRepository) UpdateWithResponse(bigStorage BigStorage) (rest.Response, error) { requestBody := bigStorageWrapper{BigStorage: bigStorage} restRequest := rest.Request{Endpoint: fmt.Sprintf("/big-storages/%s", bigStorage.Name), Body: &requestBody} return r.Client.PutWithResponse(restRequest) }
[ -0.7802745699882507, -1.0595208406448364, 0.4249249994754791, -0.27078598737716675, -0.07107700407505035, -0.7184672951698303, -0.12364092469215393, -0.21821986138820648, 1.2816411256790161, 0.14316648244857788, -0.7244404554367065, -1.171898603439331, -0.5292245149612427, -0.7133831977844...
func (r *BigStorageRepository) DetachFromVps(bigStorage BigStorage) error { bigStorage.VpsName = "" return r.Update(bigStorage) }
[ 0.2058212161064148, -0.1496136635541916, 0.1140589565038681, -0.24770411849021912, -0.434359073638916, 0.5506953597068787, -0.5240592956542969, 0.10446887463331223, 1.4713871479034424, 0.7570623159408569, 0.018398039042949677, -0.7971562147140503, -0.3917834162712097, -0.6467445492744446, ...
func (r *BigStorageRepository) AttachToVps(vpsName string, bigStorage BigStorage) error { bigStorage.VpsName = vpsName return r.Update(bigStorage) }
[ -0.4523833990097046, -0.160344660282135, 0.21866437792778015, -0.5975146889686584, 0.3152557909488678, 0.4251265227794647, -0.7851517200469971, 0.35460278391838074, 1.6513283252716064, 0.47388729453086853, 0.22862710058689117, -0.32053059339523315, -0.07213082909584045, -0.3252357542514801...
func (r *BigStorageRepository) Cancel(bigStorageName string, endTime gotransip.CancellationTime) error { requestBody := gotransip.CancellationRequest{EndTime: endTime} restRequest := rest.Request{Endpoint: fmt.Sprintf("/big-storages/%s", bigStorageName), Body: &requestBody} return r.Client.Delete(restRequest) }
[ -0.4526336193084717, -0.06431415677070618, 0.5145788788795471, 0.3747454881668091, -0.19538429379463196, -0.1207597479224205, -0.42582079768180847, 0.8750441670417786, -0.3323735296726227, 0.6110063791275024, -0.29180410504341125, 0.14947034418582916, -0.3446124196052551, -0.15862299501895...
func (r *BigStorageRepository) GetBackups(bigStorageName string) ([]BigStorageBackup, error) { var response bigStorageBackupsWrapper restRequest := rest.Request{Endpoint: fmt.Sprintf("/big-storages/%s/backups", bigStorageName)} err := r.Client.Get(restRequest, &response) return response.BigStorageBackups, err }
[ -0.7711158990859985, 0.5276720523834229, 0.6786217093467712, 0.3634093701839447, 0.8481622338294983, -0.2910866439342499, -0.4893762469291687, -0.09566817432641983, 0.4314984381198883, -0.24587440490722656, -0.3913230001926422, 0.12949422001838684, -0.5340105891227722, 0.07177682220935822,...
func (r *BigStorageRepository) RevertBackup(bigStorageName string, backupID int64) error { requestBody := actionWrapper{Action: "revert"} restRequest := rest.Request{Endpoint: fmt.Sprintf("/big-storages/%s/backups/%d", bigStorageName, backupID), Body: &requestBody} return r.Client.Patch(restRequest) }
[ -0.5249696969985962, 0.13556720316410065, 0.24112020432949066, -0.05398183315992355, 0.7615729570388794, -0.3603016138076782, 0.23645921051502228, 1.0755553245544434, 0.16216062009334564, 0.04306580871343613, -0.19669315218925476, 0.4807962477207184, -0.7347118258476257, -0.587498366832733...
func (r *BigStorageRepository) RevertBackupWithResponse(bigStorageName string, backupID int64) (rest.Response, error) { requestBody := actionWrapper{Action: "revert"} restRequest := rest.Request{Endpoint: fmt.Sprintf("/big-storages/%s/backups/%d", bigStorageName, backupID), Body: &requestBody} return r.Client.Patch...
[ 0.25560230016708374, -0.654055118560791, 0.3666597604751587, 0.23364341259002686, 0.45060446858406067, -0.8563311100006104, 0.5394279360771179, 0.24086368083953857, 1.2248554229736328, -0.3686656355857849, -0.3963851034641266, -0.8202908039093018, -0.531910240650177, -0.6302863359451294, ...
func (r *BigStorageRepository) RevertBackupToOtherBigStorage(bigStorageName string, backupID int64, destinationBigStorageName string) error { requestBody := bigStorageRestoreBackupsWrapper{Action: "revert", DestinationBigStorageName: destinationBigStorageName} restRequest := rest.Request{Endpoint: fmt.Sprintf("/big-s...
[ -0.2603664696216583, 0.04044368118047714, 0.3990512788295746, -0.05103147029876709, 0.6849145293235779, -0.6802270412445068, 0.09656716138124466, 0.9085515737533569, -0.5821930766105652, 0.06150542572140694, -0.34523969888687134, 0.7692975997924805, -0.6309888362884521, -0.3399472236633301...
func (r *BigStorageRepository) RevertBackupToOtherBigStorageWithResponse( bigStorageName string, backupID int64, destinationBigStorageName string, ) (rest.Response, error) { requestBody := bigStorageRestoreBackupsWrapper{Action: "revert", DestinationBigStorageName: destinationBigStorageName} restRequest := rest.Re...
[ 0.2130643129348755, -0.4170495867729187, 0.4212084412574768, 0.08919484913349152, 0.7907909154891968, -1.105783462524414, 0.2683621942996979, 0.19559697806835175, 0.4578761160373688, -0.188707172870636, -0.4357113242149353, -0.22736546397209167, -0.45363837480545044, -0.550040066242218, ...
func (r *BigStorageRepository) GetUsage(bigStorageName string, period UsagePeriod) ([]UsageDataDisk, error) { var response usageDataDiskWrapper parameters := url.Values{ "dateTimeStart": []string{fmt.Sprintf("%d", period.TimeStart)}, "dateTimeEnd": []string{fmt.Sprintf("%d", period.TimeEnd)}, } restRequest :=...
[ -1.0407493114471436, 0.5504926443099976, 0.8877279162406921, 0.38641008734703064, 0.9915318489074707, -0.5107700824737549, -0.2018001675605774, -0.07426193356513977, -0.42409494519233704, 0.3120172619819641, 0.2912170886993408, 0.2964964807033539, -0.5442457795143127, 0.5287162065505981, ...
func (r *BigStorageRepository) GetUsageLast24Hours(bigStorageName string) ([]UsageDataDisk, error) { // always define a period body, this way we don't have to depend on the empty body logic on the api server period := UsagePeriod{TimeStart: time.Now().Add(-24 * time.Hour).Unix(), TimeEnd: time.Now().Unix()} return ...
[ -0.6073084473609924, 0.12128584831953049, 0.831288754940033, 0.12319539487361908, -0.2838282883167267, -0.3676547706127167, -1.0777792930603027, -0.5263194441795349, -0.48400914669036865, 0.8433696627616882, -0.26391005516052246, -0.12547512352466583, -0.2866813838481903, 0.426049381494522...
func (p *G2Jac) Set(a *G2Jac) *G2Jac { p.X.Set(&a.X) p.Y.Set(&a.Y) p.Z.Set(&a.Z) return p }
[ 0.2878943681716919, -1.0816044807434082, 0.2634291648864746, -1.093620777130127, 0.05335291475057602, 0.4150470495223999, 0.7410841584205627, -0.934454083442688, -0.3305642604827881, 0.3221992254257202, 0.46743836998939514, 0.8352850675582886, 0.6759117841720581, -0.4061596691608429, 0.2...
func (p *G2Jac) Equal(a *G2Jac) bool { if p.Z.IsZero() && a.Z.IsZero() { return true } _p := G2Affine{} p.ToAffineFromJac(&_p) _a := G2Affine{} a.ToAffineFromJac(&_a) return _p.X.Equal(&_a.X) && _p.Y.Equal(&_a.Y) }
[ 0.39846259355545044, -0.7521664500236511, 0.5575910806655884, -0.19405704736709595, 0.653814971446991, 0.06506713479757309, 0.8323550820350647, -0.9296228885650635, -0.5004400014877319, 0.4882582426071167, 0.15919063985347748, 0.5367973446846008, 0.24957184493541718, 0.474348247051239, 0...
func (p *G2Affine) Equal(a *G2Affine) bool { return p.X.Equal(&a.X) && p.Y.Equal(&a.Y) }
[ 0.3830358386039734, -0.831031322479248, 0.47380420565605164, -0.3448324203491211, 0.817635178565979, 0.7960333824157715, -0.3071315586566925, -1.0775460004806519, -0.3828737139701843, 0.8233064413070679, 0.7007647752761841, 0.7475446462631226, 0.35276588797569275, -0.012962587177753448, ...
func (p *G2Jac) Clone() *G2Jac { return &G2Jac{ p.X, p.Y, p.Z, } }
[ 0.8565060496330261, -1.5408285856246948, 0.509835422039032, 0.10878842324018478, -0.6733967661857605, 0.6627845168113708, 0.22256553173065186, -1.950534462928772, -0.80770343542099, -0.6502799391746521, 0.4842337667942047, 0.9491905570030212, -0.04113415256142616, -1.2534836530685425, -0...
func (p *G2Jac) Sub(curve *Curve, a G2Jac) *G2Jac { a.Y.Neg(&a.Y) p.Add(curve, &a) return p }
[ 0.28012514114379883, -0.8702142834663391, 0.33268269896507263, -0.7195765972137451, -0.6555629372596741, 0.9735852479934692, -0.10933133959770203, -0.33514100313186646, 0.17840814590454102, -0.0779072716832161, -0.11708039790391922, 1.1263995170593262, 0.30067119002342224, -0.4354735612869...
func (p *G2Jac) ToAffineFromJac(res *G2Affine) *G2Affine { var bufs [3]e2 if p.Z.IsZero() { res.X.SetZero() res.Y.SetZero() return res } bufs[0].Inverse(&p.Z) bufs[2].Square(&bufs[0]) bufs[1].Mul(&bufs[2], &bufs[0]) res.Y.Mul(&p.Y, &bufs[1]) res.X.Mul(&p.X, &bufs[2]) return res }
[ 0.8532982468605042, -0.7365805506706238, 0.602820098400116, -0.10293934494256973, 0.45930343866348267, -0.8323218822479248, 0.4696499705314636, -1.067169189453125, -0.33084195852279663, 0.3696342408657074, -0.590063750743866, -0.01633799448609352, 0.48227375745773315, 0.15829870104789734, ...
func (p *G2Jac) ToProjFromJac() *G2Jac { // memalloc var buf e2 buf.Square(&p.Z) p.X.Mul(&p.X, &p.Z) p.Z.Mul(&p.Z, &buf) return p }
[ 1.0631434917449951, -0.5351957678794861, 0.35207197070121765, -0.9168529510498047, -0.41698020696640015, -0.2767724096775055, 0.0333561934530735, -0.6206945776939392, 0.15383900701999664, 0.27607354521751404, 0.19155655801296234, -0.45923304557800293, 0.5731158256530762, -0.302690297365188...
func (p *G2Affine) ToJacobian(Q *G2Jac) *G2Jac { if p.X.IsZero() && p.Y.IsZero() { Q.Z.SetZero() Q.X.SetOne() Q.Y.SetOne() return Q } Q.Z.SetOne() Q.X.Set(&p.X) Q.Y.Set(&p.Y) return Q }
[ 0.38693565130233765, -0.709073007106781, 0.6460785865783691, -0.17896266281604767, 0.06319767981767654, 0.5096216201782227, -0.2848593592643738, -0.5206268429756165, -0.8164677023887634, 0.24904479086399078, 0.34311336278915405, 0.575575053691864, 0.8058370351791382, 0.17582902312278748, ...
func (p *G2Affine) IsInfinity() bool { return p.X.IsZero() && p.Y.IsZero() }
[ -0.11010175198316574, -0.7567712664604187, 0.4720837473869324, 1.0296217203140259, 1.3105528354644775, -0.08741509914398193, -0.7077847719192505, -0.08836834877729416, -0.46701163053512573, -0.019886193796992302, 0.08683925867080688, 0.12127700448036194, -0.5113750100135803, 0.572801053524...
func (p *G2Jac) Add(curve *Curve, a *G2Jac) *G2Jac { // p is infinity, return a if p.Z.IsZero() { p.Set(a) return p } // a is infinity, return p if a.Z.IsZero() { return p } // get some Element from our pool var Z1Z1, Z2Z2, U1, U2, S1, S2, H, I, J, r, V e2 // Z1Z1 = a.Z ^ 2 Z1Z1.Square(&a.Z) // Z2Z...
[ -0.14267240464687347, -0.8512305617332458, 0.8935637474060059, -0.023535944521427155, -0.13819363713264465, -0.003435415681451559, 1.184737205505371, -0.11246811598539352, 0.7660212516784668, 0.09918300807476044, -0.28781482577323914, 0.4236850440502167, -0.39257755875587463, -0.3337271213...
func (p *G2Jac) AddMixed(a *G2Affine) *G2Jac { //if a is infinity return p if a.X.IsZero() && a.Y.IsZero() { return p } // p is infinity, return a if p.Z.IsZero() { p.X = a.X p.Y = a.Y // p.Z.Set(&curve.g2sZero.X) p.Z.SetOne() return p } // get some Element from our pool var Z1Z1, U2, S2, H, HH, I...
[ 0.02776387333869934, -0.8688300251960754, 0.8691056966781616, -0.02442096173763275, 0.17464442551136017, 0.1350073516368866, 0.7498489022254944, -0.48455366492271423, 0.9942607283592224, -0.3367044925689697, -0.5670589804649353, 0.24137212336063385, -0.25992050766944885, 0.2504096329212188...
func (p *G2Jac) Double() *G2Jac { // get some Element from our pool var XX, YY, YYYY, ZZ, S, M, T e2 // XX = a.X^2 XX.Square(&p.X) // YY = a.Y^2 YY.Square(&p.Y) // YYYY = YY^2 YYYY.Square(&YY) // ZZ = Z1^2 ZZ.Square(&p.Z) // S = 2*((X1+YY)^2-XX-YYYY) S.Add(&p.X, &YY) S.Square(&S). SubAssign(&XX). ...
[ -0.07947174459695816, -0.9740421175956726, 0.9615896940231323, -0.7442881464958191, -0.4450109302997589, 0.31319618225097656, 0.9971190690994263, -0.38795945048332214, -0.23153908550739288, 0.3250180184841156, -0.23594050109386444, 0.42221978306770325, 0.2731356918811798, 0.049047544598579...
func (p *G2Jac) ScalarMul(curve *Curve, a *G2Jac, scalar fr.Element) *G2Jac { // see MultiExp and pippenger documentation for more details about these constants / variables const s = 4 const b = s const TSize = (1 << b) - 1 var T [TSize]G2Jac computeT := func(T []G2Jac, t0 *G2Jac) { T[0].Set(t0) for j := 1; j...
[ -0.47339630126953125, 0.1593608409166336, 0.6523011326789856, -0.603259265422821, -0.7774878144264221, -0.1635873168706894, -0.0019982161466032267, 0.2382328361272812, 0.3226304352283478, 0.10293758660554886, 0.17116819322109222, 0.9139044880867004, 0.12124904990196228, -0.0614214502274990...
func (p *G2Jac) ScalarMulByGen(curve *Curve, scalar fr.Element) *G2Jac { computeT := func(T []G2Jac, t0 *G2Jac) {} return p.pippenger(curve, []G2Jac{curve.g2Gen}, []fr.Element{scalar}, sGen, bGen, curve.tGenG2[:], computeT) }
[ -0.07607068121433258, -0.11794781684875488, 0.5227466821670532, -0.31049633026123047, -0.5745955109596252, -0.3441852927207947, -0.15906856954097748, -0.5930396914482117, -0.9347886443138123, 0.2855492830276489, -0.7172093987464905, 0.7808673977851868, 0.3835124373435974, 0.572016417980194...
func (p *G2Jac) MultiExpNew(curve *Curve, points []G2Affine, scalars []fr.Element) chan G2Jac { debug.Assert(len(scalars) == len(points)) chRes := make(chan G2Jac, 1) // call windowed multi exp if input not large enough // we may want to force the API user to call the proper method in the first place const minPoin...
[ -0.15683092176914215, 0.46343889832496643, 0.9254344701766968, 0.529949963092804, -0.5990434885025024, -0.030831512063741684, 0.7398177981376648, -0.7200098633766174, -0.2457776665687561, -0.04698146507143974, -0.5191768407821655, 0.6005204916000366, -0.05949661135673523, 0.609755039215087...
func (p *G2Jac) WindowedMultiExp(curve *Curve, points []G2Jac, scalars []fr.Element) *G2Jac { var lock sync.Mutex pool.Execute(0, len(points), func(start, end int) { var t G2Jac t.multiExp(curve, points[start:end], scalars[start:end]) lock.Lock() p.Add(curve, &t) lock.Unlock() }, false) return p }
[ 0.12158337235450745, -0.23235642910003662, 0.47097280621528625, 0.42320308089256287, -0.2605094611644745, -0.09677055478096008, 0.49829429388046265, -0.6731866598129272, 0.19520826637744904, 0.4112057089805603, -0.31533539295196533, 0.9151581525802612, -0.7517195343971252, -0.1290013194084...
func (p *G2Jac) multiExp(curve *Curve, points []G2Jac, scalars []fr.Element) *G2Jac { const s = 4 // s from Bootle, we choose s divisible by scalar bit length const b = s // b from Bootle, we choose b equal to s // WARNING! This code breaks if you switch to b!=s // Because we chose b=s, each set S_i from Bootle is ...
[ -0.02803996205329895, 0.22862455248832703, 0.7572475075721741, 0.5732161998748779, -0.43687114119529724, -0.6131203174591064, 0.38432347774505615, -0.2734476923942566, -0.05022675544023514, 0.43684136867523193, -0.40660935640335083, -0.09266673773527145, 0.061399977654218674, 0.04857361689...
func (p *G2Jac) pippenger(curve *Curve, points []G2Jac, scalars []fr.Element, s, b uint64, T []G2Jac, computeT func(T []G2Jac, t0 *G2Jac)) *G2Jac { var t, selectorIndex, ks int var selectorMask, selectorShift, selector uint64 t = fr.ElementLimbs * 64 / int(s) // t from Bootle, equal to (scalar bit length) / s sele...
[ -0.5402666926383972, 0.07870622724294662, 0.6918055415153503, -0.1281111091375351, -0.2835191488265991, -0.657547652721405, 0.09864434599876404, -0.3123447895050049, -0.6473692059516907, 0.8391376733779907, -0.38821661472320557, -0.23563653230667114, 0.5372381806373596, -0.0987400859594345...
func (networkSecurityGroupsSpecARM NetworkSecurityGroups_SpecARM) GetAPIVersion() string { return string(networkSecurityGroupsSpecARM.APIVersion) }
[ 0.6975038051605225, -0.36137598752975464, 0.2455793172121048, 0.17022494971752167, 0.40149959921836853, -0.06625498831272125, 0.17662838101387024, -0.0697544738650322, -0.180938720703125, 0.4037748873233795, -0.6862291097640991, -0.2038896083831787, -0.5867937803268433, 0.3694228231906891,...
func (networkSecurityGroupsSpecARM NetworkSecurityGroups_SpecARM) GetName() string { return networkSecurityGroupsSpecARM.Name }
[ 0.5742604732513428, 0.18384577333927155, 0.1818297803401947, 0.5334648489952087, 0.7455644011497498, -0.21340006589889526, -0.14833375811576843, -0.6164039373397827, -0.6239410638809204, 0.9289016723632812, -0.4410885274410248, -0.4750365614891052, -0.2671688497066498, 0.4630017578601837, ...
func (networkSecurityGroupsSpecARM NetworkSecurityGroups_SpecARM) GetType() string { return string(networkSecurityGroupsSpecARM.Type) }
[ 0.9419126510620117, 0.6115887761116028, 0.08032500743865967, 0.9045173525810242, 1.514963984489441, -0.13394275307655334, 0.15628840029239655, -0.9579352140426636, -0.06294772773981094, 0.4081156551837921, -0.2707138955593109, -0.16098949313163757, -0.8380598425865173, 0.4948345124721527, ...
func (r *YoutubeRepository) GetSongByNameArtist(name string, artist string) (filePath string, err error) { fileName := fmt.Sprintf("/tmp/%s_%s", name, artist) filePath = fileName + ".mp3" cmd := exec.Command("youtube-dl", "--extract-audio", "--audio-format", "mp3", "--ignore-errors", "--output", fileName+".%(ext)...
[ 0.05655483528971672, -0.4357108473777771, 0.6948845386505127, 0.28269508481025696, -0.4776245951652527, -0.0065481350757181644, 0.2807515561580658, -0.6182326674461365, -0.48182618618011475, 0.6828972101211548, -0.5547100305557251, 0.6492866277694702, -0.49723249673843384, 0.10680824518203...
func (l *Listener) Listen() { ln, err := net.Listen("tcp", fmt.Sprintf(":%v", l.Port)) defer ln.Close() if err != nil { log.Fatalf("Cannot start Event Listener: %v", err) } log.Printf("=== Event Listener waiting for connection on %v", l.Port) for { conn, err := ln.Accept() if err != nil { log.Printf...
[ 0.6337904930114746, -0.4609193205833435, 0.4447476863861084, -1.1766884326934814, 0.9097251296043396, 0.623110830783844, -0.08106690645217896, 0.7964191436767578, -0.8171833157539368, 0.2340059131383896, -0.3477989435195923, -0.5804489850997925, 0.4803776741027832, 0.3582174479961395, 0....
func (l *Listener) handleEventSourceConnection(conn net.Conn) { defer func() { // notify other routines of event source disconnection l.EventSourceCloseChan <- nil // terminate connection with event source conn.Close() }() resequencer := NewResequencer(l.ResequencerConfig) scanner := bufio.NewScanner(conn...
[ -0.06933794170618057, -0.3333260118961334, 0.5870022773742676, -0.49121540784835815, -0.03272673115134239, -0.5170541405677795, 0.0963243767619133, -0.16268335282802582, -0.23636256158351898, 0.22690951824188232, -0.586341917514801, -1.5885227918624878, -0.03626696392893791, 0.670962929725...
func EnvMapToStringSlice(env map[string]string) []string { envList := make([]string, 0, 0) for k, v := range env { envList = append(envList, k+"="+v) } return envList }
[ -1.6272865533828735, -0.5338922739028931, 0.6687533259391785, -0.597682774066925, 1.42434561252594, 0.5384417176246643, -1.4295309782028198, -0.06458557397127151, -0.729243814945221, 1.8627424240112305, 0.952696681022644, 0.5024638772010803, -0.22595418989658356, 1.0787853002548218, -0.0...
func EnvStringSliceToMap(envs []string) map[string]string { envList := make(map[string]string, len(envs)) for _, s := range envs { kv := strings.SplitN(s, "=", 2) envList[kv[0]] = kv[1] } return envList }
[ -1.9087435007095337, -0.7956199049949646, 0.4211755394935608, -0.29379725456237793, 0.5768193602561951, -0.06490989029407501, -0.5783608555793762, 0.2625790536403656, 0.7941184043884277, 1.8729467391967773, 0.2971199154853821, 0.1391221582889557, 0.5616165399551392, -0.518150806427002, -...
func MergeEnvMap(envs ...map[string]string) map[string]string { mergedEnvMap := map[string]string{} for _, env := range envs { for k, v := range env { mergedEnvMap[k] = v } } return mergedEnvMap }
[ -1.201486587524414, -0.06294972449541092, 0.5331819653511047, 0.32203441858291626, 0.7525668144226074, 1.2106406688690186, -0.8936351537704468, -0.3741564154624939, -0.08388425409793854, 0.2527366876602173, -0.5331606268882751, -0.18703949451446533, -0.43334662914276123, 0.2650102376937866...
func Run() int { pflag.Parse() populateAvailableKubeconfigs() if len(availableKubeconfigs) == 0 { printKubeConfigHelpOutput() return 2 } // DEBUG fmt.Println(availableKubeconfigs) return 0 }
[ -0.6944355964660645, 0.5779558420181274, 0.5621466636657715, 0.9515865445137024, 0.21457354724407196, 0.4895836114883423, 0.5448450446128845, 0.6352216005325317, -1.1372981071472168, 0.14704737067222595, -0.8093298077583313, -0.3298472464084625, -0.5062393546104431, 0.9325146079063416, 0...
func homeDir() string { if h := os.Getenv("HOME"); h != "" { return h } return os.Getenv("USERPROFILE") // windows }
[ 0.9054276347160339, -0.1454997956752777, 0.7231610417366028, 1.5260494947433472, -0.8251872658729553, 0.8689693808555603, 0.38673776388168335, -0.1265011727809906, 0.2534145414829254, -0.25357431173324585, 0.5451153516769409, 0.2862440347671509, -1.0564818382263184, 1.5834360122680664, 0...
func kubeconfigExistsAndIsFile(filePath string) (bool, error) { info, err := os.Stat(filePath) // if we couldn't open the file, error out if err != nil { return false, err } // if we have a directory instead of a file, error out if info.IsDir() { return false, errors.New("The provided path was a directory. Ex...
[ -0.26306813955307007, -0.22061879932880402, 0.6406941413879395, 0.1888001710176468, 0.5318595170974731, 0.5488576292991638, -0.2716241776943207, 0.30473214387893677, 0.023808764293789864, 0.7515590786933899, 0.9565148949623108, -0.19440048933029175, 0.09734629094600677, 0.844499409198761, ...
func printKubeConfigHelpOutput() { fmt.Println("No authentication context was found. This plugin looks for a configuration in one of the following places:") fmt.Printf("\t(1) The --kubeconfig flag passed to this plugin.\n") fmt.Printf("\t(2) The KUBECONFIG environment variable.\n") fmt.Printf("\t(3) The .kube direc...
[ 0.8267189860343933, -0.7917247414588928, 0.732844889163971, 0.05396101251244545, 0.15664264559745789, 0.27925533056259155, 0.11393332481384277, -0.15597650408744812, -0.9969817399978638, 0.3132212162017822, 0.2882530689239502, 0.5412476658821106, -0.6273328065872192, 0.25041574239730835, ...
func (s *Server) GetImportedVideos(w rest.ResponseWriter, r *rest.Request) { response := models.BaseResponse{} response.Init(w) currentUser, err := s.LoginProcess(response, r) if err != nil { return } page := s.GetPageFromParams(r) userID, err := s.GetUserIDFromParams(r) if err != nil { response.SendErr...
[ -0.4450441896915436, 0.2424113005399704, 0.897331953048706, 1.7075791358947754, -0.02328500524163246, 0.09466157853603363, 0.1908917874097824, -0.7313706874847412, 0.7309885621070862, 0.6556510329246521, -0.7235984206199646, 1.6804207563400269, -1.0032516717910767, 1.5351743698120117, -0...
func (s *Server) GetFavouriteVideos(w rest.ResponseWriter, r *rest.Request) { response := models.BaseResponse{} response.Init(w) currentUser, err := s.LoginProcess(response, r) if err != nil { return } page := s.GetPageFromParams(r) userID, err := s.GetUserIDFromParams(r) if err != nil { response.SendEr...
[ -0.8038386106491089, 0.25096437335014343, 0.7530114054679871, 1.3880506753921509, 0.17299555242061615, -0.24895519018173218, -0.4693045914173126, -0.6246623396873474, 0.10824622213840485, 0.8834927678108215, -0.2129928320646286, 1.9838229417800903, -1.0860649347305298, 1.4013592004776, 0...
func (s *Server) GetFavouriteVideos2(w rest.ResponseWriter, r *rest.Request) { response := models.BaseResponse{} response.Init(w) currentUser, err := s.LoginProcess(response, r) if err != nil { return } page := s.GetPageFromParams(r) userID, err := s.GetUserIDFromParams(r) if err != nil { response.SendE...
[ -0.6409936547279358, -0.4578244388103485, 0.8266034126281738, 1.529295563697815, -0.34836092591285706, -0.23691663146018982, -0.5069631934165955, -0.8268664479255676, -0.28465887904167175, 0.61134934425354, -0.3599736988544464, 2.179988384246826, -0.5846240520477295, 1.6452860832214355, ...
func (s *Server) GetStats(w rest.ResponseWriter, r *rest.Request) { response := models.BaseResponse{} response.Init(w) currentUser, err := s.LoginProcess(response, r) if err != nil { return } userID, err := s.GetUserIDFromParams(r) if err != nil { response.SendError(err.Error()) return } if userID =...
[ -0.3519977927207947, -0.03322535753250122, 0.6585013270378113, 0.5003606677055359, 0.43594589829444885, 0.2231312245130539, 0.5229812860488892, -0.9137905836105347, 0.6884142160415649, -0.15846000611782074, 0.04665219783782959, 0.8636645078659058, -0.4063648581504822, 0.7866426706314087, ...
func (s *Server) PostUpdateUser(w rest.ResponseWriter, r *rest.Request) { response := models.BaseResponse{} response.Init(w) currentUser, err := s.LoginProcess(response, r) if err != nil { return } user := models.User{} r.DecodeJsonPayload(&user) if user.ID != currentUser.ID { response.SendError(ErrorUn...
[ -1.2722142934799194, -0.811244785785675, 0.7429320812225342, 0.7518219947814941, -1.1722407341003418, 0.0950498878955841, 0.3538036048412323, -0.13835479319095612, 0.23980949819087982, -0.447407603263855, -0.8953295946121216, -0.6668606400489807, -0.9532538652420044, 0.14578235149383545, ...
func (s *Server) GetRelationships(w rest.ResponseWriter, r *rest.Request) { response := models.BaseResponse{} response.Init(w) currentUser, err := s.LoginProcess(response, r) if err != nil { response.SendError(err.Error()) return } page := s.GetPageFromParams(r) userID, err := s.GetUserIDFromParams(r) ...
[ -0.8100991249084473, 0.15090058743953705, 0.8338033556938171, 0.8985485434532166, 0.23258183896541595, 0.5327686071395874, 0.37899649143218994, -0.8402701616287231, 0.21367967128753662, 0.13136418163776398, 0.5492167472839355, 0.34768033027648926, -0.31775879859924316, 1.0806838274002075, ...
func (pc *PlatformClient) GetBrokers(ctx context.Context) ([]platform.ServiceBroker, error) { brokers, err := pc.ListServiceBrokers() if err != nil { return nil, wrapCFError(err) } var clientBrokers []platform.ServiceBroker for _, broker := range brokers { serviceBroker := platform.ServiceBroker{ GUID: ...
[ -0.2361796349287033, -0.012285432778298855, 0.2070736438035965, 0.7836019992828369, 0.1501775085926056, 0.05842416733503342, -0.3620547652244568, -0.302000492811203, -0.2828751802444458, -0.07991503924131393, -0.4721439778804779, 0.8407818078994751, -1.9591866731643677, 1.2922886610031128,...
func (pc *PlatformClient) CreateBroker(ctx context.Context, r *platform.CreateServiceBrokerRequest) (*platform.ServiceBroker, error) { request := cfclient.CreateServiceBrokerRequest{ Username: pc.reg.Username, Password: pc.reg.Password, Name: r.Name, BrokerURL: r.BrokerURL, } broker, err := pc.Creat...
[ -0.3817135691642761, 0.24944880604743958, 0.3983706533908844, 0.640300452709198, -0.1686709076166153, 0.44657376408576965, 0.2249549776315689, -0.3118608593940735, -0.3063696622848511, -0.680100679397583, -0.37669453024864197, -0.12565448880195618, -2.0123450756073, 0.9688558578491211, 1...
func (pc *PlatformClient) DeleteBroker(ctx context.Context, r *platform.DeleteServiceBrokerRequest) error { if err := pc.DeleteServiceBroker(r.GUID); err != nil { return wrapCFError(err) } return nil }
[ -0.6604905724525452, 0.4412895739078522, 0.45009297132492065, 1.3475180864334106, 0.07188674062490463, 0.5154457092285156, 0.6378777027130127, 0.006773910019546747, -0.07329975813627243, -0.8646726012229919, -0.12305840849876404, 0.5366733074188232, -1.8207807540893555, 1.6199074983596802,...
func (pc *PlatformClient) UpdateBroker(ctx context.Context, r *platform.UpdateServiceBrokerRequest) (*platform.ServiceBroker, error) { request := cfclient.UpdateServiceBrokerRequest{ Username: pc.reg.Username, Password: pc.reg.Password, Name: r.Name, BrokerURL: r.BrokerURL, } broker, err := pc.Updat...
[ -0.9837834239006042, -0.24303671717643738, 0.42897242307662964, 0.8024975657463074, -0.9632188081741333, 0.3192051947116852, 0.4270167946815491, -0.15814237296581268, -0.23481595516204834, -0.39093253016471863, -0.6113929152488708, 0.706912636756897, -1.935023307800293, 0.7614895701408386,...
func ServNoCommand(ctx *context.PrivateContext) { keyID := ctx.ParamsInt64(":keyid") if keyID <= 0 { ctx.JSON(http.StatusBadRequest, private.Response{ UserMsg: fmt.Sprintf("Bad key id: %d", keyID), }) } results := private.KeyAndOwner{} key, err := asymkey_model.GetPublicKeyByID(keyID) if err != nil { if...
[ -0.7883802652359009, -0.5245003700256348, 1.0484399795532227, 0.8669622540473938, -0.3204013705253601, -0.15690340101718903, 0.351441890001297, -1.1276830434799194, 0.01717408187687397, 0.9453327655792236, -0.3030720055103302, 0.9683382511138916, -0.4357078969478607, 0.6808406114578247, ...
func ServCommand(ctx *context.PrivateContext) { keyID := ctx.ParamsInt64(":keyid") ownerName := ctx.Params(":owner") repoName := ctx.Params(":repo") mode := perm.AccessMode(ctx.FormInt("mode")) // Set the basic parts of the results to return results := private.ServCommandResults{ RepoName: repoName, OwnerNa...
[ -0.7025465369224548, -0.1738346815109253, 0.8522443175315857, 0.17145244777202606, 0.2628396451473236, -0.5488727688789368, -0.04659828171133995, -0.7525119185447693, 0.2510182857513428, 0.0676354393362999, 0.5748236775398254, 1.0501784086227417, -0.33220571279525757, 0.0001123867841670289...
func Execute() { if err := rootCmd.Execute(); err != nil { fmt.Println(err) os.Exit(1) } }
[ 0.8741579055786133, -0.631639301776886, 0.8534528017044067, 1.2026909589767456, 0.42606523633003235, 0.8930875062942505, -0.11484168469905853, 0.11600733548402786, -0.7203778028488159, -0.3646620810031891, 0.6552295088768005, 0.16867855191230774, -0.38348233699798584, 0.8589836955070496, ...
func makeTimestampMilli() int64 { return time.Now().UnixNano() / int64(time.Millisecond) }
[ 0.3326947093009949, -0.13550888001918793, 0.36002296209335327, 0.4198097586631775, -1.1608796119689941, 0.18999643623828888, -0.6216729879379272, 0.7798840403556824, -0.15299031138420105, -0.05146751552820206, -0.45365896821022034, -1.2088247537612915, -0.20026171207427979, 0.4835002124309...
func makeTimestampNano() int64 { return time.Now().UnixNano() }
[ -0.2193496823310852, 0.05981161817908287, 0.3062203824520111, 0.25485262274742126, -0.7325693368911743, 0.1350708305835724, -0.41582638025283813, 0.47710901498794556, -0.28239527344703674, -0.3493412733078003, -1.0032790899276733, -0.8238270878791809, 1.044240117073059, 0.07454202324151993...
func makeFuzzyDistanceOne(term string) []string { vals := []string{term} if len(term) <= 2 { return vals } // This tends to produce bad results // Split apart so turn "test" into "t" "est" then "te" "st" //for i := 0; i < len(term); i++ { // vals = append(vals, term[:i]) // vals = append(vals, term[i:]) //...
[ -0.6129968166351318, -0.14328067004680634, 0.9713258147239685, -0.8956062197685242, -0.3696008324623108, -0.7669312953948975, 0.3668115735054016, 0.6607969999313354, 0.6170535683631897, 0.510552704334259, -0.9829918742179871, -0.2754471004009247, -0.2979513704776764, 0.03344267979264259, ...
func makeFuzzyDistanceTwo(term string) []string { vals := makeFuzzyDistanceOne(term) // Maybe they forgot to type a letter? Try adding one for i := 0; i < len(term)+1; i++ { for _, b := range letterDigitFuzzyBytes { vals = append(vals, term[:i]+string(b)+term[i:]) } } return str.RemoveStringDuplicates(val...
[ -0.4693741500377655, -1.0333181619644165, 0.6756311655044556, 0.11407359689474106, 0.21889305114746094, -0.5729200839996338, -0.3109465539455414, -0.5528927445411682, -0.027330245822668076, -0.07218759506940842, -1.2997218370437622, 0.44203948974609375, 0.09152600914239883, 0.2836174666881...
func getFormattedTime() string { return time.Now().UTC().Format(time.RFC3339) }
[ 0.36591267585754395, -0.2609602212905884, 0.7479018568992615, -0.14338283240795135, 0.4763994514942169, 0.8874197602272034, -0.9812878966331482, -0.05150558799505234, 0.29927128553390503, 0.6623344421386719, 0.4788007140159607, 0.0024710334837436676, -1.0530861616134644, 0.7290204167366028...
func printWarn(msg string) { if Verbose { fmt.Println(fmt.Sprintf(" WARN %s: %s", getFormattedTime(), msg)) } }
[ 0.9690754413604736, 0.3284818232059479, 0.9016806483268738, 0.7590204477310181, 0.6553546190261841, 0.0845658928155899, -0.8672255277633667, -0.01953909359872341, -0.13297876715660095, 0.7292552590370178, 0.39048752188682556, 2.1632699966430664, -0.07543052732944489, 0.719875156879425, 0...
func printDebug(msg string) { if Debug { fmt.Println(fmt.Sprintf("DEBUG %s: %s", getFormattedTime(), msg)) } }
[ 1.0329982042312622, 0.20503555238246918, 0.5452949404716492, 0.2266680747270584, 0.849490225315094, -0.1885869801044464, -0.9680262207984924, 0.011089297011494637, 0.09987039864063263, 0.23528596758842468, 0.5161222815513611, 0.8858146071434021, -0.6327253580093384, 1.4193799495697021, -...
func printTrace(msg string) { if Trace { fmt.Println(fmt.Sprintf("TRACE %s: %s", getFormattedTime(), msg)) } }
[ 1.8585189580917358, 0.33111798763275146, 0.9146658778190613, 0.35162800550460815, 1.174328327178955, -0.35667380690574646, -0.18767166137695312, -0.43444791436195374, 0.1538628786802292, 0.30981630086898804, 0.4603242576122284, 0.7055448889732361, -0.933890163898468, 0.9962879419326782, ...
func printError(msg string) { if Error { _, _ = fmt.Fprintf(os.Stderr, "ERROR %s: %s", getFormattedTime(), msg) } }
[ 0.027179544791579247, 0.008243146352469921, 0.6963992118835449, 0.07926156371831894, 0.19651387631893158, 0.5712491869926453, -0.49190834164619446, 0.013499977998435497, -0.380304217338562, 0.6261880993843079, 0.6286174058914185, 1.0789381265640259, -0.22786809504032135, 0.7972491383552551...
func Run(c *cli.Context) { if len(c.Args()) != 1 { fmt.Println("Not Found a statement") return } statement := c.Args()[0] isVerbose = c.Bool("verbose") isDryRun = c.Bool("dryRun") onlyStatement = c.Bool("onlyStatement") args := Args{ beforeHour: c.Float64("beforeHour"), startDate: c.String("startDate"...
[ -0.020191458985209465, -0.41854214668273926, 0.7999712228775024, -0.09550850093364716, -0.10411891341209412, 0.4907796382904053, 0.20219309628009796, 0.08762338757514954, -0.4584285318851471, 0.0020180214196443558, -0.2313048541545868, 0.7650349736213684, -1.0264517068862915, 0.19336734712...
func Sum128x32(key []byte, seed uint32) [4]uint32 { const c1 = 0x239b961b const c2 = 0xab0e9789 const c3 = 0x38b34ae5 const c4 = 0xa1e38b93 h1, h2, h3, h4 := seed, seed, seed, seed size := len(key) blocks := size / 16 head := *(*[]uint32)(unsafe.Pointer(&key)) tail := key[blocks*16:] // Head for i := 0; ...
[ 0.6495700478553772, 0.7218573689460754, 1.0483468770980835, -0.8410018086433411, -1.0010571479797363, 0.101735919713974, -0.1271337866783142, -0.9433427453041077, 0.08439809828996658, 0.477977991104126, -0.7421190142631531, 0.004782489035278559, -0.7815499305725098, -0.05148139223456383, ...
func New(seed int64) rand.Source64 { x := new(SplitMix64) x.Seed(seed) return x }
[ -0.39705073833465576, -0.38378724455833435, 0.07044975459575653, -0.13678398728370667, -1.046324610710144, -0.9225344061851501, 0.5309338569641113, 0.5722121000289917, 0.8085159659385681, -1.010888934135437, -0.7006893157958984, -0.009463276714086533, -0.07411683350801468, 0.41523435711860...
func (x *SplitMix64) Seed(seed int64) { *x = SplitMix64(seed) }
[ -0.15960101783275604, 0.4507330358028412, 0.11506868153810501, 0.5086773633956909, -1.032335877418518, 0.3299373686313629, 0.5484368205070496, 0.7565262913703918, 1.1038788557052612, -1.2828463315963745, -0.5145037174224854, 0.44964179396629333, -0.3822226822376251, 0.38087907433509827, ...
func Sort(slice interface{}, less func(i, j int) bool) { sort.Slice(slice, less) }
[ -0.4287355840206146, 0.04104877635836601, 0.14430221915245056, 0.12765780091285706, -1.5030204057693481, -0.018587881699204445, -0.02236824668943882, -1.1749876737594604, -0.20430536568164825, -0.052999671548604965, -0.4134698808193207, 0.5414573550224304, -0.4336283802986145, -0.041057478...
func SortInterface(slice interface{}, less func(i, j int) bool) sort.Interface { sv := reflect.ValueOf(slice) if sv.Kind() != reflect.Slice { panic(fmt.Sprintf("slice.Sort called with non-slice value of type %T", slice)) } return &funcs{ length: sv.Len(), less: less, swap: reflect.Swapper(slice), } }
[ -0.5055382251739502, 0.14327801764011383, 0.3129443824291229, -0.08227923512458801, -1.296722650527954, -0.06568389385938644, 0.08622851967811584, -1.2480809688568115, 0.4555252492427826, 0.3836855888366699, -0.33209526538848877, 0.23517827689647675, -0.7032715082168579, 0.1618416756391525...
func (c *MasterConfig) ensureOpenShiftSharedResourcesNamespace() { if _, err := c.KubeClient().Namespaces().Get(c.Options.PolicyConfig.OpenShiftSharedResourcesNamespace); kapierror.IsNotFound(err) { namespace, createErr := c.KubeClient().Namespaces().Create(&kapi.Namespace{ObjectMeta: kapi.ObjectMeta{Name: c.Options...
[ 0.7395707368850708, 0.018759747967123985, 0.6365953683853149, -0.6473734378814697, 0.24756626784801483, 0.7469173073768616, 0.46636834740638733, -0.7799615859985352, 1.5274964570999146, -0.4428030848503113, -0.09341853857040405, -0.5811236500740051, -0.4288542866706848, 1.127098560333252, ...
func (c *MasterConfig) ensureOpenShiftInfraNamespace() { ns := c.Options.PolicyConfig.OpenShiftInfrastructureNamespace // Ensure namespace exists namespace, err := c.KubeClient().Namespaces().Create(&kapi.Namespace{ObjectMeta: kapi.ObjectMeta{Name: ns}}) if kapierror.IsAlreadyExists(err) { // Get the persisted n...
[ 0.363476037979126, 0.2909691631793976, 0.8927941918373108, 0.36329779028892517, 0.9106980562210083, 0.10445576161146164, 0.6620798707008362, -0.5525106191635132, 0.3810777962207794, -0.3113082945346832, 0.24772602319717407, 0.06711702793836594, -0.3824397921562195, 0.9077091813087463, 1....
func (c *MasterConfig) ensureDefaultNamespaceServiceAccountRoles() { // Wait for the default namespace var namespace *kapi.Namespace for i := 0; i < 30; i++ { ns, err := c.KubeClient().Namespaces().Get(kapi.NamespaceDefault) if err == nil { namespace = ns break } if kapierror.IsNotFound(err) { time....
[ 0.8693826794624329, 0.5514847636222839, 0.5213315486907959, -0.02283504232764244, 0.9247410297393799, 0.6137875914573669, -0.36484411358833313, -0.7301371693611145, 0.8204506039619446, -0.46808314323425293, -0.05867792293429375, 0.04321178421378136, -0.7127053141593933, 1.039235234260559, ...
func (c *MasterConfig) ensureNamespaceServiceAccountRoleBindings(namespace *kapi.Namespace) { const ServiceAccountRolesInitializedAnnotation = "openshift.io/sa.initialized-roles" // Short-circuit if we're already initialized if namespace.Annotations[ServiceAccountRolesInitializedAnnotation] == "true" { return } ...
[ 0.2665810286998749, 0.0041560642421245575, 0.621457576751709, -0.055698245763778687, 0.2905353903770447, 0.06994276493787766, -0.040366336703300476, -0.9689256548881531, 1.020066738128662, 0.08844322711229324, -0.07311220467090607, 0.18220800161361694, -0.6587304472923279, 1.21889019012451...
func (c *MasterConfig) ensureComponentAuthorizationRules() { clusterPolicyStorage, err := clusterpolicystorage.NewStorage(c.RESTOptionsGetter) if err != nil { glog.Errorf("Error creating policy storage: %v", err) return } clusterPolicyRegistry := clusterpolicyregistry.NewRegistry(clusterPolicyStorage) ctx := k...
[ 0.48700031638145447, 0.6782239079475403, 0.6957836151123047, -0.3603389263153076, 0.10850745439529419, 0.9770281910896301, -0.05567055940628052, 0.004390995483845472, -0.21861957013607025, 0.6498963832855225, 0.5765458345413208, 0.21909338235855103, -1.0084370374679565, -0.3581527471542358...
func (c *MasterConfig) ensureCORSAllowedOrigins() []*regexp.Regexp { if len(c.Options.CORSAllowedOrigins) == 0 { return []*regexp.Regexp{} } allowedOriginRegexps, err := util.CompileRegexps(c.Options.CORSAllowedOrigins) if err != nil { glog.Fatalf("Invalid --cors-allowed-origins: %v", err) } return allowedOri...
[ 0.41493895649909973, 0.2215266227722168, 0.2946344316005707, 0.23134420812129974, -0.3974400460720062, 0.7470265030860901, 0.23125900328159332, 0.48622050881385803, 0.5872437357902527, 0.5161011815071106, 0.5351427793502808, 0.7793055772781372, -0.8839347958564758, 0.23483124375343323, 0...
func (ll *linkedList) display() { for tip := ll.head; tip != nil; tip = tip.Next { fmt.Printf("NODE: %+v %p \n", tip, tip) } fmt.Println() }
[ 0.10461583733558655, -0.7068901062011719, 0.3652002811431885, -0.566265881061554, -0.15991006791591644, 0.6223216652870178, -0.031532786786556244, 0.059239111840724945, 0.411866694688797, 0.6551719903945923, 0.9030550122261047, 0.5603966116905212, 0.176809623837471, 0.38330358266830444, ...
func BenchmarkLoad(b *testing.B) { ll := linkedList{} s := newStack() for i := 0; i < b.N; i++ { ll.load(ask, s) } }
[ 0.2067456990480423, 1.220266580581665, 0.3109782934188843, 0.1655982881784439, 0.7306556105613708, -0.2612631022930145, 1.0919244289398193, -0.8578737378120422, -0.2645038962364197, 0.44622018933296204, -0.5908107757568359, -0.1945764422416687, -0.7789963483810425, 0.8961566090583801, -0...
func BenchmarkUpdateInsertByPrice_Amend(b *testing.B) { a := asks{} stack := newStack() a.load(ask, stack) updates := Items{ { Price: 1337, // Amend Amount: 2, }, { Price: 1337, // Amend Amount: 1, }, } for i := 0; i < b.N; i++ { a.updateInsertByPrice(updates, stack, 0, getNow()) } }
[ 0.11718306690454483, 0.4924754500389099, 0.7096879482269287, 0.44296684861183167, 0.43469536304473877, -0.36692672967910767, 1.1484739780426025, 0.28433704376220703, -0.6829205751419067, 0.9705522656440735, -0.14537939429283142, -0.053096164017915726, -0.8619022369384766, 0.768590092658996...
func BenchmarkUpdateInsertByPrice_Insert_Delete(b *testing.B) { a := asks{} stack := newStack() a.load(ask, stack) updates := Items{ { Price: 1337.5, // Insert Amount: 2, }, { Price: 1337.5, // Delete Amount: 0, }, } for i := 0; i < b.N; i++ { a.updateInsertByPrice(updates, stack, 0, ge...
[ 0.1677323579788208, 0.9572278261184692, 0.6727896928787231, 0.4620850384235382, 0.7238831520080566, -0.5469399690628052, 0.779795229434967, 0.2371118813753128, -0.24828824400901794, 1.1091347932815552, -0.3208642303943634, -0.5219130516052246, -1.260508418083191, -0.07693654298782349, -0...
func BenchmarkUpdateByID(b *testing.B) { asks := linkedList{} s := newStack() asksSnapshot := Items{ {Price: 1, Amount: 1, ID: 1}, {Price: 3, Amount: 1, ID: 3}, {Price: 5, Amount: 1, ID: 5}, {Price: 7, Amount: 1, ID: 7}, {Price: 9, Amount: 1, ID: 9}, {Price: 11, Amount: 1, ID: 11}, } asks.load(asksSnap...
[ 0.26656460762023926, -0.005856627132743597, 0.8071981072425842, -0.01644236594438553, 0.08016927540302277, -0.7374573945999146, 1.1507093906402588, -0.8323218822479248, -0.18919219076633453, 0.8005126714706421, -0.9052163362503052, -0.7056500315666199, -0.1974209100008011, -0.2585110962390...