text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (_XStaking *XStakingSession) Withdraw(amount *big.Int) (*types.Transaction, error) { return _XStaking.Contract.Withdraw(&_XStaking.TransactOpts, amount) }
[ -0.6027612686157227, 1.1274409294128418, 0.3042564392089844, -0.07812728732824326, -0.2477721869945526, -0.8529389500617981, 0.8329801559448242, -0.7437695264816284, 0.5919044017791748, 0.062268082052469254, -0.35104092955589294, -0.5904058218002319, -0.36124539375305176, -0.16031922399997...
func (_XStaking *XStakingTransactorSession) Withdraw(amount *big.Int) (*types.Transaction, error) { return _XStaking.Contract.Withdraw(&_XStaking.TransactOpts, amount) }
[ -0.5815954804420471, 1.0883910655975342, 0.3088033199310303, -0.13495931029319763, -0.14264130592346191, -0.8439819812774658, 0.7679964303970337, -0.8906382918357849, 0.6131810545921326, 0.08870857208967209, -0.38968729972839355, -0.5965815186500549, -0.259353905916214, -0.2591890990734100...
func (it *XStakingOwnerChangedIterator) Close() error { it.sub.Unsubscribe() return nil }
[ 0.34866824746131897, 0.35457471013069153, 0.13595490157604218, 0.8901876211166382, -1.16587233543396, 0.29829466342926025, 0.16965505480766296, -0.9346228241920471, -1.3647656440734863, -0.02513965219259262, 0.5641075968742371, 0.8270161151885986, -0.12387660145759583, 0.8357657790184021, ...
func (_XStaking *XStakingFilterer) FilterOwnerChanged(opts *bind.FilterOpts) (*XStakingOwnerChangedIterator, error) { logs, sub, err := _XStaking.contract.FilterLogs(opts, "OwnerChanged") if err != nil { return nil, err } return &XStakingOwnerChangedIterator{contract: _XStaking.contract, event: "OwnerChanged", l...
[ 0.006437740288674831, -0.1555575728416443, 0.24688565731048584, 1.350550651550293, -0.751087486743927, -0.10322316735982895, 0.8752354383468628, -0.5719012022018433, 0.011655217967927456, 0.3520835041999817, 0.14771631360054016, 1.2160768508911133, 0.16815327107906342, -0.03031616471707821...
func (_XStaking *XStakingFilterer) WatchOwnerChanged(opts *bind.WatchOpts, sink chan<- *XStakingOwnerChanged) (event.Subscription, error) { logs, sub, err := _XStaking.contract.WatchLogs(opts, "OwnerChanged") if err != nil { return nil, err } return event.NewSubscription(func(quit <-chan struct{}) error { defe...
[ 0.18345271050930023, -0.4723552465438843, 0.499477744102478, 0.2818091809749603, -0.29954516887664795, -0.3407704830169678, 0.9622254371643066, -0.7785283327102661, -0.38078996539115906, -0.42696550488471985, -0.18998321890830994, 1.243619680404663, 0.47092652320861816, 0.4023300111293793,...
func (_XStaking *XStakingFilterer) ParseOwnerChanged(log types.Log) (*XStakingOwnerChanged, error) { event := new(XStakingOwnerChanged) if err := _XStaking.contract.UnpackLog(event, "OwnerChanged", log); err != nil { return nil, err } return event, nil }
[ 0.08819152414798737, 0.3981629014015198, 0.22859615087509155, 0.6160992383956909, -0.7971173524856567, -0.6225813031196594, 1.0612596273422241, -0.6527671813964844, -0.05321510136127472, 0.15909834206104279, -0.6674973964691162, 0.3828829228878021, 0.49573972821235657, -0.12080644071102142...
func (it *XStakingOwnerNominatedIterator) Close() error { it.sub.Unsubscribe() return nil }
[ 0.40507304668426514, 0.3435489535331726, 0.18985919654369354, 0.6449229717254639, -1.2271417379379272, 0.5350862741470337, 0.0408693291246891, -0.8709856867790222, -1.2065658569335938, -0.19246825575828552, 0.40737617015838623, 0.6598964929580688, -0.2258646935224533, 0.5895218849182129, ...
func (_XStaking *XStakingFilterer) FilterOwnerNominated(opts *bind.FilterOpts) (*XStakingOwnerNominatedIterator, error) { logs, sub, err := _XStaking.contract.FilterLogs(opts, "OwnerNominated") if err != nil { return nil, err } return &XStakingOwnerNominatedIterator{contract: _XStaking.contract, event: "OwnerNom...
[ -0.2365916222333908, 0.014360482804477215, 0.37412551045417786, 1.5678138732910156, -0.6371253132820129, -0.10101096332073212, -0.017009055241942406, -0.5661676526069641, 0.10855763405561447, 0.34942296147346497, -0.00843135081231594, 0.7563910484313965, -0.14836424589157104, 0.10445854067...
func (_XStaking *XStakingFilterer) WatchOwnerNominated(opts *bind.WatchOpts, sink chan<- *XStakingOwnerNominated) (event.Subscription, error) { logs, sub, err := _XStaking.contract.WatchLogs(opts, "OwnerNominated") if err != nil { return nil, err } return event.NewSubscription(func(quit <-chan struct{}) error { ...
[ 0.15200994908809662, -0.27958884835243225, 0.8781033754348755, 0.5210728645324707, -0.3480066657066345, -0.44991445541381836, 0.18112915754318237, -0.4996299147605896, 0.033954523503780365, -0.36024153232574463, -0.4695628881454468, 1.0196179151535034, 0.3785863518714905, 0.457374185323715...
func (_XStaking *XStakingFilterer) ParseOwnerNominated(log types.Log) (*XStakingOwnerNominated, error) { event := new(XStakingOwnerNominated) if err := _XStaking.contract.UnpackLog(event, "OwnerNominated", log); err != nil { return nil, err } return event, nil }
[ 0.08583570271730423, 0.618212878704071, 0.39928752183914185, 0.8674055933952332, -0.8989721536636353, -0.8356768488883972, 0.08897792547941208, -0.3203515112400055, 0.31681331992149353, 0.12601503729820251, -0.7589133977890015, -0.25157368183135986, 0.2780563533306122, -0.07498282194137573...
func (it *XStakingPauseChangedIterator) Close() error { it.sub.Unsubscribe() return nil }
[ 0.46854662895202637, 0.5579965710639954, 0.15449708700180054, 0.4598880112171173, -1.1703269481658936, 0.5236389636993408, 0.061710793524980545, -0.4833388328552246, -1.0425957441329956, 0.5888404846191406, 0.040963128209114075, 0.18441030383110046, -0.5730392336845398, 0.9222481846809387,...
func (_XStaking *XStakingFilterer) FilterPauseChanged(opts *bind.FilterOpts) (*XStakingPauseChangedIterator, error) { logs, sub, err := _XStaking.contract.FilterLogs(opts, "PauseChanged") if err != nil { return nil, err } return &XStakingPauseChangedIterator{contract: _XStaking.contract, event: "PauseChanged", l...
[ -0.05518561974167824, -0.23992246389389038, 0.5733211636543274, 0.6785696744918823, -0.32131820917129517, -0.2708829641342163, 0.18732593953609467, -0.44080111384391785, 0.5977975726127625, 1.2349528074264526, 0.3039112389087677, 1.150891661643982, -0.2954801917076111, -0.24449431896209717...
func (_XStaking *XStakingFilterer) WatchPauseChanged(opts *bind.WatchOpts, sink chan<- *XStakingPauseChanged) (event.Subscription, error) { logs, sub, err := _XStaking.contract.WatchLogs(opts, "PauseChanged") if err != nil { return nil, err } return event.NewSubscription(func(quit <-chan struct{}) error { defe...
[ 0.3391050696372986, -0.43053749203681946, 0.7202900648117065, -0.06577607244253159, 0.0826905220746994, -0.35167163610458374, 0.30582141876220703, -0.6629717946052551, 0.21149659156799316, 0.21943330764770508, -0.2382146716117859, 1.1739575862884521, 0.05914679914712906, 0.4274641871452331...
func (_XStaking *XStakingFilterer) ParsePauseChanged(log types.Log) (*XStakingPauseChanged, error) { event := new(XStakingPauseChanged) if err := _XStaking.contract.UnpackLog(event, "PauseChanged", log); err != nil { return nil, err } return event, nil }
[ 0.15324178338050842, 0.29608672857284546, 0.24015800654888153, 0.06647584587335587, -0.39858952164649963, -0.8097673058509827, 0.30269885063171387, -0.197880819439888, 0.4069385528564453, 0.9398559331893921, -0.8322694301605225, 0.20430830121040344, 0.10350766032934189, -0.2999405264854431...
func (it *XStakingRecoveredIterator) Close() error { it.sub.Unsubscribe() return nil }
[ 0.7091372013092041, 0.48439469933509827, 0.12286505848169327, 0.4764153063297272, -1.1207737922668457, 0.7119654417037964, 0.15036892890930176, -0.13041475415229797, -0.714840292930603, -0.2259870171546936, 0.1715080291032791, 0.2629590928554535, -0.4860563278198242, 0.4761911928653717, ...
func (_XStaking *XStakingFilterer) FilterRecovered(opts *bind.FilterOpts) (*XStakingRecoveredIterator, error) { logs, sub, err := _XStaking.contract.FilterLogs(opts, "Recovered") if err != nil { return nil, err } return &XStakingRecoveredIterator{contract: _XStaking.contract, event: "Recovered", logs: logs, sub:...
[ 0.32250216603279114, 0.006104199215769768, 0.38761621713638306, 0.8923220634460449, -1.015228509902954, -0.289553701877594, 0.4454348683357239, 0.08146382123231888, 0.3710261583328247, -0.04094735160470009, -0.21048173308372498, 0.6388366222381592, -0.31811612844467163, -0.8238500952720642...
func (_XStaking *XStakingFilterer) WatchRecovered(opts *bind.WatchOpts, sink chan<- *XStakingRecovered) (event.Subscription, error) { logs, sub, err := _XStaking.contract.WatchLogs(opts, "Recovered") if err != nil { return nil, err } return event.NewSubscription(func(quit <-chan struct{}) error { defer sub.Uns...
[ 0.8037522435188293, -0.4167964458465576, 0.6995622515678406, 0.11038052290678024, -0.3144278824329376, -0.7245787382125854, 0.5999617576599121, -0.36379697918891907, 0.11363666504621506, -0.7745048999786377, -0.5886890292167664, 0.7897595763206482, 0.3445797860622406, -0.2801385819911957, ...
func (_XStaking *XStakingFilterer) ParseRecovered(log types.Log) (*XStakingRecovered, error) { event := new(XStakingRecovered) if err := _XStaking.contract.UnpackLog(event, "Recovered", log); err != nil { return nil, err } return event, nil }
[ 0.5086143016815186, 0.5291703343391418, 0.48271194100379944, 0.10703828185796738, -1.092685341835022, -0.6410692930221558, 0.43541190028190613, -0.11907053738832474, 0.24078017473220825, -0.05975193530321121, -0.9064164161682129, -0.19581927359104156, 0.018549514934420586, -0.5925320386886...
func (it *XStakingRewardAddedIterator) Close() error { it.sub.Unsubscribe() return nil }
[ 0.8306405544281006, 0.6292417049407959, 0.145608589053154, -0.16512733697891235, -0.7076152563095093, 0.8326069712638855, -0.5723762512207031, -0.7070966362953186, -0.6226484179496765, 0.15260426700115204, 0.5300390124320984, 0.6344186663627625, -0.6843217015266418, 0.9030801653862, 0.09...
func (_XStaking *XStakingFilterer) FilterRewardAdded(opts *bind.FilterOpts) (*XStakingRewardAddedIterator, error) { logs, sub, err := _XStaking.contract.FilterLogs(opts, "RewardAdded") if err != nil { return nil, err } return &XStakingRewardAddedIterator{contract: _XStaking.contract, event: "RewardAdded", logs: ...
[ 0.7815782427787781, -0.09107166528701782, 0.21794377267360687, 0.18220637738704681, -0.2845572531223297, 0.1519460678100586, -0.3592301309108734, -0.6776793003082275, 0.628623902797699, 1.0076546669006348, 0.20885172486305237, 0.9769748449325562, -0.42111968994140625, -0.017393607646226883...
func (_XStaking *XStakingFilterer) WatchRewardAdded(opts *bind.WatchOpts, sink chan<- *XStakingRewardAdded) (event.Subscription, error) { logs, sub, err := _XStaking.contract.WatchLogs(opts, "RewardAdded") if err != nil { return nil, err } return event.NewSubscription(func(quit <-chan struct{}) error { defer s...
[ 1.1711822748184204, -0.5232405662536621, 0.6462558507919312, -0.6118637323379517, 0.055752500891685486, -0.365500271320343, 0.046668440103530884, -0.9644707441329956, 0.558948278427124, 0.19907082617282867, -0.43464764952659607, 1.1582292318344116, 0.08025427907705307, 0.086701400578022, ...
func (_XStaking *XStakingFilterer) ParseRewardAdded(log types.Log) (*XStakingRewardAdded, error) { event := new(XStakingRewardAdded) if err := _XStaking.contract.UnpackLog(event, "RewardAdded", log); err != nil { return nil, err } return event, nil }
[ 0.8919419646263123, 0.13525064289569855, 0.24861642718315125, -0.5732678771018982, -0.16952547430992126, -0.5519887208938599, -0.2687578797340393, -0.7767491936683655, 0.50063157081604, 0.7203460335731506, -0.7593575716018677, 0.14277882874011993, -0.10569076240062714, 0.049591321498155594...
func (it *XStakingRewardPaidIterator) Close() error { it.sub.Unsubscribe() return nil }
[ 0.8396368622779846, 0.23724469542503357, 0.1674305498600006, -0.09385219216346741, -1.2227356433868408, 0.8485977053642273, -0.16654996573925018, -0.4289529025554657, -0.5737643837928772, 0.1237121969461441, 0.7911683320999146, 0.28257980942726135, -0.7075468301773071, 0.5921674966812134, ...
func (_XStaking *XStakingFilterer) FilterRewardPaid(opts *bind.FilterOpts, user []common.Address) (*XStakingRewardPaidIterator, error) { var userRule []interface{} for _, userItem := range user { userRule = append(userRule, userItem) } logs, sub, err := _XStaking.contract.FilterLogs(opts, "RewardPaid", userRule...
[ 0.45091891288757324, 0.034889981150627136, 0.3856532871723175, 0.25211378931999207, -1.2866604328155518, 0.8122701048851013, 0.6365199685096741, -0.44418519735336304, 0.28048163652420044, 1.1276049613952637, 0.40480098128318787, 0.8119853734970093, -0.9186660051345825, 0.6205458641052246, ...
func (_XStaking *XStakingFilterer) WatchRewardPaid(opts *bind.WatchOpts, sink chan<- *XStakingRewardPaid, user []common.Address) (event.Subscription, error) { var userRule []interface{} for _, userItem := range user { userRule = append(userRule, userItem) } logs, sub, err := _XStaking.contract.WatchLogs(opts, "...
[ 0.942382276058197, -0.6711118817329407, 0.6725019216537476, -0.2663179039955139, -0.7271860241889954, 0.40594008564949036, 0.7047641277313232, -0.9483601450920105, 0.1460271030664444, 0.49518752098083496, 0.01980363205075264, 1.133541226387024, -0.39671245217323303, 0.8053590059280396, -...
func (_XStaking *XStakingFilterer) ParseRewardPaid(log types.Log) (*XStakingRewardPaid, error) { event := new(XStakingRewardPaid) if err := _XStaking.contract.UnpackLog(event, "RewardPaid", log); err != nil { return nil, err } return event, nil }
[ 1.0585566759109497, -0.19220371544361115, 0.29837295413017273, -0.6889266967773438, -0.8769720196723938, -0.08238094300031662, 0.3478660583496094, -0.6766431331634521, 0.4326309859752655, 0.8893738985061646, -0.32360899448394775, -0.16103853285312653, -0.4005890190601349, 0.042063251137733...
func (it *XStakingRewardsDurationUpdatedIterator) Close() error { it.sub.Unsubscribe() return nil }
[ 0.3444117605686188, 0.26628488302230835, 0.25708454847335815, -0.046133313328027725, -1.04335355758667, 0.717490553855896, -0.27335113286972046, -0.5294905304908752, -1.091652750968933, 0.22778144478797913, 0.9241805076599121, 0.13095226883888245, -0.6336942911148071, 0.452469140291214, ...
func (_XStaking *XStakingFilterer) FilterRewardsDurationUpdated(opts *bind.FilterOpts) (*XStakingRewardsDurationUpdatedIterator, error) { logs, sub, err := _XStaking.contract.FilterLogs(opts, "RewardsDurationUpdated") if err != nil { return nil, err } return &XStakingRewardsDurationUpdatedIterator{contract: _XSt...
[ 0.5742562413215637, -0.4034790098667145, 0.2736366093158722, -0.4455491304397583, -0.8865088820457458, 0.1976517289876938, -0.10285917669534683, -0.38692909479141235, 0.12515495717525482, 0.9251219630241394, 0.522959291934967, 0.6997836232185364, -0.5948224663734436, -0.7662955522537231, ...
func (_XStaking *XStakingFilterer) WatchRewardsDurationUpdated(opts *bind.WatchOpts, sink chan<- *XStakingRewardsDurationUpdated) (event.Subscription, error) { logs, sub, err := _XStaking.contract.WatchLogs(opts, "RewardsDurationUpdated") if err != nil { return nil, err } return event.NewSubscription(func(quit <...
[ 1.0007442235946655, -0.8291993141174316, 0.5195828676223755, -0.7933995127677917, -0.5804885625839233, -0.1262868493795395, 0.13364741206169128, -0.8935858011245728, 0.04319635406136513, 0.3340451717376709, -0.017911793664097786, 0.9376717209815979, -0.0722971111536026, -0.3283600211143493...
func (_XStaking *XStakingFilterer) ParseRewardsDurationUpdated(log types.Log) (*XStakingRewardsDurationUpdated, error) { event := new(XStakingRewardsDurationUpdated) if err := _XStaking.contract.UnpackLog(event, "RewardsDurationUpdated", log); err != nil { return nil, err } return event, nil }
[ 0.7256670594215393, -0.1508478820323944, 0.288642555475235, -0.8414269089698792, -0.8559315800666809, -0.30403363704681396, -0.28697317838668823, -0.35769572854042053, 0.3824027478694916, 1.1320074796676636, -0.36639535427093506, 0.021538231521844864, -0.3360775113105774, -0.50740361213684...
func (it *XStakingStakedIterator) Close() error { it.sub.Unsubscribe() return nil }
[ 0.7571454048156738, 0.5076977014541626, 0.18667051196098328, 0.4404228627681732, -1.1254053115844727, 0.5154180526733398, 0.1690273880958557, -0.6027154922485352, -1.493261456489563, 0.15573415160179138, 0.2132766842842102, 0.0030626673251390457, -0.5056427717208862, 1.1481244564056396, ...
func (_XStaking *XStakingFilterer) FilterStaked(opts *bind.FilterOpts, user []common.Address) (*XStakingStakedIterator, error) { var userRule []interface{} for _, userItem := range user { userRule = append(userRule, userItem) } logs, sub, err := _XStaking.contract.FilterLogs(opts, "Staked", userRule) if err !=...
[ 0.32452505826950073, 0.14535672962665558, 0.4472198188304901, 0.8364959955215454, -0.998964250087738, 0.432498037815094, 1.1185753345489502, -0.27211326360702515, -0.5017241835594177, 0.48710596561431885, 0.1428145468235016, 1.2043317556381226, -0.6079049706459045, 0.6500722765922546, 0....
func (_XStaking *XStakingFilterer) WatchStaked(opts *bind.WatchOpts, sink chan<- *XStakingStaked, user []common.Address) (event.Subscription, error) { var userRule []interface{} for _, userItem := range user { userRule = append(userRule, userItem) } logs, sub, err := _XStaking.contract.WatchLogs(opts, "Staked",...
[ 0.7196647524833679, -0.224422425031662, 0.8168349266052246, 0.06876639276742935, -0.21343931555747986, -0.30547282099723816, 0.8497406840324402, -0.5581115484237671, -0.38783711194992065, 0.23277293145656586, -0.3340914249420166, 1.243441104888916, -0.048826154321432114, 0.4812536537647247...
func (_XStaking *XStakingFilterer) ParseStaked(log types.Log) (*XStakingStaked, error) { event := new(XStakingStaked) if err := _XStaking.contract.UnpackLog(event, "Staked", log); err != nil { return nil, err } return event, nil }
[ 0.6624795198440552, 0.3178161680698395, 0.3924139738082886, -0.007917255163192749, -0.7572078704833984, -0.3787451386451721, 0.7334368228912354, -0.5849514007568359, 0.12492984533309937, 0.08684267103672028, -1.2301135063171387, 0.30732154846191406, -0.08542589098215103, 0.1446004956960678...
func (it *XStakingWithdrawnIterator) Close() error { it.sub.Unsubscribe() return nil }
[ 0.6128463745117188, 0.6274316310882568, 0.23318389058113098, -0.1447395235300064, -1.4347895383834839, 0.9106470346450806, 0.020081141963601112, -0.5564740300178528, -0.9163341522216797, -0.3190910816192627, 0.42436453700065613, 0.09952417761087418, -0.19376014173030853, 1.1358741521835327...
func (_XStaking *XStakingFilterer) FilterWithdrawn(opts *bind.FilterOpts, user []common.Address) (*XStakingWithdrawnIterator, error) { var userRule []interface{} for _, userItem := range user { userRule = append(userRule, userItem) } logs, sub, err := _XStaking.contract.FilterLogs(opts, "Withdrawn", userRule) ...
[ -0.01231022272258997, -0.12029914557933807, 0.5934233665466309, 0.3854893743991852, -1.2337955236434937, 0.40013736486434937, 0.5899998545646667, -0.2520905137062073, 0.07648077607154846, 0.0024895535316318274, -0.09084910154342651, 0.7529736757278442, -0.3022325038909912, 0.66249227523803...
func (_XStaking *XStakingFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *XStakingWithdrawn, user []common.Address) (event.Subscription, error) { var userRule []interface{} for _, userItem := range user { userRule = append(userRule, userItem) } logs, sub, err := _XStaking.contract.WatchLogs(opts, "Wi...
[ 0.5268441438674927, -0.2838386595249176, 0.9693320989608765, 0.10802385956048965, -0.8556680679321289, -0.016006609424948692, 0.45935484766960144, -0.7060790657997131, -0.05290868505835533, -0.5224291682243347, -0.3019752502441406, 1.1593315601348877, 0.25820741057395935, 0.797525584697723...
func (_XStaking *XStakingFilterer) ParseWithdrawn(log types.Log) (*XStakingWithdrawn, error) { event := new(XStakingWithdrawn) if err := _XStaking.contract.UnpackLog(event, "Withdrawn", log); err != nil { return nil, err } return event, nil }
[ 0.3262542188167572, 0.1896694451570511, 0.62513267993927, -0.4779825508594513, -1.3045883178710938, -0.3699287474155426, 0.10449041426181793, -0.297563374042511, 0.38189542293548584, -0.7028469443321228, -1.0075730085372925, -0.39246517419815063, 0.26510006189346313, 0.08739259093999863, ...
func NewService(connection connection.Connection) *Service { return &Service{ connection: connection, } }
[ 0.7707245945930481, -0.9558425545692444, -0.1125776618719101, 0.6552329659461975, -0.6553076505661011, -0.25319433212280273, -0.9861472845077515, -0.9276737570762634, -0.5243723392486572, 0.006074018310755491, 0.11918152868747711, 0.5887511968612671, -0.6879599690437317, 0.5247437953948975...
func New(out string, truncate bool) *Engine { if (len(_extractors) < 1) || (len(_loaders) < 1) { // we need at least 1 extractor and 1 loader for work return nil } e := &Engine{ extractors: _extractors, loaders: _loaders, outputFolder: out, } if truncate { e.Clean() } return e }
[ 0.1945248693227768, -0.382130891084671, 0.29880157113075256, 0.0532241016626358, -1.040108561515808, -0.7117748260498047, 0.23617962002754211, 0.26549774408340454, -0.7579187750816345, -0.25516006350517273, 0.7745445370674133, 0.034157443791627884, 0.6721764802932739, 0.42731329798698425, ...
func (e Engine) Clean() { os.RemoveAll(e.outputFolder) return }
[ 0.15349289774894714, -0.9384048581123352, 0.4668846130371094, 0.3004980981349945, -0.3567299246788025, 0.1801537424325943, 0.835439145565033, -0.6278616786003113, -1.215968370437622, 0.08756039291620255, 0.9046946167945862, -0.32340216636657715, -0.10862217843532562, 1.4299018383026123, ...
func extractURL(message string) (u *url.URL, ok bool) { re := regexp.MustCompile(_urlPattern) rawURL := re.FindString(message) if len(rawURL) < 1 { return nil, false } link, err := url.Parse(rawURL) if err != nil { return nil, false } return link, true }
[ -0.2759215235710144, 0.5117050409317017, 0.8559198975563049, 0.19582360982894897, -0.007079633418470621, -0.5348389148712158, 0.9544340372085571, 0.8719726204872131, -0.10425036400556564, 0.23207026720046997, -0.3878456652164459, -0.07415668666362762, -1.0850050449371338, 0.005967685952782...
func (cci *CloudChainIterator) Next(ctx context.Context) (*Block, error) { if cci.currentHash == "" { return nil, &StopIterationError{} } client, err := firestore.NewClient(ctx, cci.projectId) if err != nil { return nil, err } ref := client.Collection(blocksCollection) blockSnap, err := ref.Doc(cci.curren...
[ 0.3781498968601227, 0.2512856721878052, 0.5976314544677734, 0.09968365728855133, -0.6329482793807983, 0.28417253494262695, -0.20881439745426178, -0.746952474117279, -0.16785863041877747, -0.1654212474822998, 0.19197054207324982, 0.7558102011680603, -0.9490563273429871, 0.3532455265522003, ...
func (e IfChange) Equal(e2 IfChange) bool { return e.Added == e2.Added && e.Deleted == e2.Deleted && e.Attrs.Equal(e2.Attrs) }
[ -0.8879958987236023, -0.33296656608581543, 0.45378199219703674, -0.34237176179885864, 0.21541640162467957, 0.3648619055747986, -0.2706069350242615, -0.03316422179341316, -0.5781518816947937, 0.8525906205177307, -1.0564013719558716, 0.4721750319004059, 0.23377054929733276, 1.077999591827392...
func (a IfAttrs) Equal(a2 IfAttrs) bool { return a.IfIndex == a2.IfIndex && a.IfName == a2.IfName && a.IfType == a2.IfType && a.IsLoopback == a2.IsLoopback && a.WithBroadcast == a2.WithBroadcast && a.AdminUp == a2.AdminUp && a.LowerUp == a2.LowerUp && a.Enslaved == a2.Enslaved && a.MasterIfIndex == a2....
[ -0.5121824145317078, -0.4658494293689728, 0.4752342700958252, -0.16896015405654907, -0.050657693296670914, 0.049963440746068954, 0.10956105589866638, -0.7681549191474915, -0.3894746005535126, 0.3660692274570465, -0.44144994020462036, 0.9387054443359375, -0.7749765515327454, 0.5618976354598...
func MaxLengthSumSubArray(arr []int , sum int)[]int { m := make(map[int]int) length := 0 endIndex := -1 sumSoFar := 0 for i:=0;i<len(arr);i++{ sumSoFar += arr[i] if sumSoFar == sum { return arr[0:i+1] } // bcoz we need the max length so if sum repeats we need the whole length thats why !ok if _...
[ 0.7116637825965881, -0.2634114623069763, 1.1244537830352783, 0.8915494680404663, -0.5183836817741394, 0.39168256521224976, 0.842693567276001, -0.5121423602104187, 1.0459431409835815, 0.3320239186286926, 0.0891852006316185, 0.2973668873310089, -0.17819760739803314, -0.008848226629197598, ...
func NewClient(clientID, email, password string, ttl int) *Client { baseURL, _ := url.Parse(apiBaseURL) loginBaseURL, _ := url.Parse(loginURL) return &Client{ clientID: clientID, email: email, password: password, ttl: ttl, apiBaseURL: baseURL, loginURL: loginBaseURL, HTTPClient: &htt...
[ -0.4038049578666687, -0.7664915919303894, 0.33598002791404724, -0.27152320742607117, -0.559067964553833, -0.13641288876533508, -0.4223872125148773, -0.24551373720169067, 0.42124366760253906, 0.1988195925951004, -0.09290198236703873, 0.18809925019741058, -0.13384945690631866, -0.61581534147...
func (c *Client) AddRecord(ctx context.Context, zone, recordName, recordValue string) error { domain, err := c.getDomain(ctx, zone) if err != nil { return err } record := Record{DomainID: domain.ID, Name: recordName, Value: recordValue, Type: "TXT"} err = c.addTxtRecord(ctx, record) if err != nil { return e...
[ 0.43897899985313416, 0.44525349140167236, 0.5988256335258484, 0.0676792711019516, -0.3572959899902344, 0.6728616952896118, -0.3654716908931732, 0.3388923704624176, -0.30313780903816223, -0.27072328329086304, 0.32255443930625916, 1.086633563041687, -0.677932858467102, 0.5240846276283264, ...
func (c *Client) DeleteRecord(ctx context.Context, zone, recordName string) error { domain, err := c.getDomain(ctx, zone) if err != nil { return err } record, err := c.getRecord(ctx, domain.ID, recordName) if err != nil { return err } err = c.deleteRecord(ctx, record) if err != nil { return err } ret...
[ 0.5934463739395142, 0.13504622876644135, 0.5197544693946838, 0.22700609266757965, -0.21738982200622559, -0.08910801261663437, -0.09918604791164398, -0.15170469880104065, 0.43168187141418457, -0.06323779374361038, -0.23923452198505402, 1.7112735509872437, -0.7561996579170227, 0.774607956409...
func RefreshOAuth2Token(client *http.Client, channel string, provider string, refreshToken string) (string, error) { theurl := sdk.JoinURL( api.BackendURL(api.AuthService, channel), fmt.Sprintf("oauth2/%s/refresh/%s", provider, url.PathEscape(refreshToken)), ) req, err := http.NewRequest(http.MethodGet, theurl, ...
[ -0.3114226162433624, -0.7358899116516113, 0.7566089034080505, -0.19768184423446655, -0.6404961943626404, -0.44705960154533386, -0.9442715644836426, -1.0447371006011963, 0.21170252561569214, 0.264848917722702, 0.29956382513046265, 1.9392225742340088, 0.420039564371109, -0.07138291001319885,...
func InitDockPlugin(netplugin *plugin.NetPlugin) error { netPlugin = netplugin hostname, err := os.Hostname() if err != nil { log.Fatalf("Could not retrieve hostname: %v", err) } var ( tenantName = "default" ) log.Debugf("Configuring router") router := mux.NewRouter() s := router.Headers("Accept", "appl...
[ -0.11037905514240265, -0.17500509321689606, 0.9611591696739197, 0.23298726975917816, 0.6350006461143494, -0.40236717462539673, 1.016805648803711, 0.0975625216960907, 0.34183377027511597, -0.42428603768348694, -0.6637438535690308, 0.20096491277217865, 0.2036685198545456, 0.9863477945327759,...
func unknownAction(w http.ResponseWriter, r *http.Request) { log.Infof("Unknown networkdriver action at %q", r.URL.Path) content, _ := ioutil.ReadAll(r.Body) log.Infof("Body content: %s", string(content)) w.WriteHeader(503) }
[ -0.6009604930877686, -1.2426270246505737, 0.39651718735694885, -0.4903426468372345, 0.32855817675590515, 0.3650153577327728, 0.22853337228298187, -0.5490186810493469, 0.1315750777721405, 0.38001570105552673, -0.051526810973882675, 0.11760183423757553, -0.30978062748908997, 0.38974282145500...
func activate(hostname string) func(http.ResponseWriter, *http.Request) { return func(w http.ResponseWriter, r *http.Request) { logEvent("activate") content, err := json.Marshal(plugins.Manifest{Implements: []string{"NetworkDriver"}}) if err != nil { httpError(w, "Could not generate bootstrap response", err)...
[ -1.1243202686309814, -1.1656092405319214, 0.5557618737220764, 0.01771482452750206, -0.017341384664177895, -1.0028141736984253, -0.2110510766506195, 0.2250334769487381, -0.29359060525894165, 0.5032702088356018, -0.5418016314506531, -0.08393827825784683, -0.2571999728679657, -0.0122942030429...
func GetNetworkName(nwID string) (string, error) { libnetAPI := libnetClient.NewRemoteAPI("") nw, err := libnetAPI.NetworkByID(nwID) if err != nil { log.Infof("Error: %v", err) return "", err } log.Infof("Returning network name %s for ID %s", nw.Name(), nwID) return nw.Name(), nil }
[ -1.208822250366211, 0.06527737528085709, 0.6282728314399719, -0.8242968916893005, -0.5404984354972839, -0.2884557843208313, -0.4969581067562103, -1.061568260192871, 0.07566869258880615, 0.2566237151622772, -0.7238729000091553, -0.22110502421855927, -0.0094867292791605, 0.7959858179092407, ...
func GetEndpointName(nwID, epID string) (string, error) { libnetAPI := libnetClient.NewRemoteAPI("") nw, err := libnetAPI.NetworkByID(nwID) if err != nil { log.Infof("Error: %v", err) return "", err } ep, err := nw.EndpointByID(epID) if err != nil { log.Infof("Error: %v", err) return "", err } log.In...
[ -0.7274079322814941, -0.15201574563980103, 0.9041144847869873, -0.5950413346290588, -0.6549000144004822, 0.02250961773097515, -0.6396350264549255, -0.14396944642066956, -0.013226820155978203, 1.1163053512573242, 0.3819209933280945, -0.3276393413543701, -0.08526334166526794, 0.6226953268051...
func ExecCmd(name string, args ...string) (string, error) { cmd := exec.Command(name, args...) var stdout bytes.Buffer var stderr bytes.Buffer cmd.Stdout = &stdout cmd.Stderr = &stderr err := cmd.Run() if err != nil { return "", fmt.Errorf("`%v %v` failed: %v %v (%v)", name, strings.Join(args, " "), stderr.St...
[ 0.3975313901901245, -0.807666540145874, 0.8529582619667053, -0.6285838484764099, -0.888515055179596, 0.09259314090013504, -0.4148734509944916, -0.1508559137582779, -0.44694870710372925, -0.1303769052028656, 0.5848164558410645, 0.7212596535682678, 0.2672783434391022, 0.3874206244945526, 0...
func ExecCmdWithStdStreams(stdin io.Reader, stdout, stderr io.Writer, env []string, name string, args ...string) error { cmd := exec.Command(name, args...) cmd.Stdin = stdin cmd.Stdout = stdout cmd.Stderr = stderr cmd.Env = env err := cmd.Run() if err != nil { return fmt.Errorf("`%v %v` failed: %v", name, str...
[ 0.28016963601112366, -0.9160946011543274, 0.999340295791626, -0.14506520330905914, -0.7248694896697998, 0.20928382873535156, -0.43245843052864075, -0.7143909931182861, -0.7342325448989868, 0.06098054349422455, 0.21020600199699402, -0.002359132980927825, 0.2318425178527832, 0.95651203393936...
func UntarToFileSystem(dest string, tarball *os.File, options *archive.TarOptions) error { logrus.Debugf("untarring %s", tarball.Name()) return archive.Untar(tarball, dest, options) }
[ -0.22396378219127655, 0.018976517021656036, 0.16488905251026154, -0.9012304544448853, 0.4124878942966461, -0.12586745619773865, -0.017436383292078972, 0.2781966030597687, -0.5775517225265503, -0.11262957006692886, 0.07553507387638092, -0.06808967143297195, 1.2231441736221313, -0.5409911274...
func CreateTarFromSrc(source string, dest string) error { file, err := os.Create(dest) if err != nil { return fmt.Errorf("could not create tarball file '%s': %w", dest, err) } defer file.Close() return TarChrootToFilesystem(source, file) }
[ 0.2936653196811676, -0.43817266821861267, 0.2781267762184143, -0.2937004864215851, -0.429198294878006, 0.7103883028030396, -0.9828920960426331, -0.3008476793766022, -0.6669085621833801, -0.4654933512210846, 0.2896881401538849, -0.2197939157485962, 0.8603710532188416, 0.0037186371628195047,...
func TarToFilesystem(source string, tarball *os.File) error { tb, err := Tar(source) if err != nil { return err } _, err = io.Copy(tarball, tb) if err != nil { return err } logrus.Debugf("wrote tarball file %s", tarball.Name()) return nil }
[ 0.08317061513662338, 0.07012578099966049, 0.3203884959220886, -0.8270289897918701, 0.5202009677886963, 0.4209485948085785, 0.33718904852867126, -0.18954086303710938, -0.4778922498226166, 0.13497108221054077, -0.2520703971385956, 0.12875275313854218, 1.019028902053833, -0.008783519268035889...
func Tar(source string) (io.ReadCloser, error) { logrus.Debugf("creating tarball of %s", source) return archive.Tar(source, archive.Uncompressed) }
[ -0.5036669969558716, 0.3213328421115875, 0.09941994398832321, -1.023773193359375, -1.4538400173187256, 0.5838419795036316, -0.13959446549415588, 0.23037979006767273, -0.6597042679786682, -1.251707911491394, 0.36873525381088257, 0.1071339026093483, 0.5158061981201172, -0.3285258412361145, ...
func TarChrootToFilesystem(source string, tarball *os.File) error { tb, err := TarWithChroot(source) if err != nil { return err } _, err = io.Copy(tarball, tb) if err != nil { return err } logrus.Debugf("wrote tarball file %s", tarball.Name()) return nil }
[ 0.4099491536617279, -0.05669217184185982, 0.3411574363708496, -0.5716316103935242, 0.49007248878479004, 0.4393327534198761, 0.34310218691825867, -0.20443707704544067, -0.6392735838890076, -0.1339113861322403, -0.0853462964296341, 0.21317707002162933, 0.6430842280387878, 0.27326834201812744...
func TarWithChroot(source string) (io.ReadCloser, error) { logrus.Debugf("creating tarball of %s", source) return chrootarchive.Tar(source, nil, source) }
[ 0.9377758502960205, -0.5703951716423035, 0.2549230754375458, -0.6814389228820801, -1.1858824491500854, 0.7165864109992981, -0.5833784937858582, -0.09005717933177948, -0.19015823304653168, -0.3534792959690094, -0.04408148303627968, 0.4684591591358185, 0.3995549976825714, 0.578885555267334, ...
func RemoveScientificNotationFromFloat(x float64) (float64, error) { bigNum := strconv.FormatFloat(x, 'g', -1, 64) breakPoint := strings.IndexAny(bigNum, "Ee") if breakPoint > 0 { bigNum = bigNum[:breakPoint] } result, err := strconv.ParseFloat(bigNum, 64) if err != nil { return x, fmt.Errorf("unable to remov...
[ 0.16423052549362183, 0.6336143016815186, 0.618699312210083, 0.4531085193157196, -0.2923503518104553, -0.14878226816654205, 0.19075103104114532, -0.06766527146100998, -0.7497189044952393, 0.3799225091934204, 0.11147350817918777, -0.44853758811950684, -0.26904550194740295, 0.0631617456674575...
func RunsOnSystemd() bool { runsOnSystemdOnce.Do(func() { // per sd_booted(3), check for this dir fd, err := os.Stat("/run/systemd/system") runsOnSystemd = err == nil && fd.IsDir() }) return runsOnSystemd }
[ -0.6032155156135559, -0.24236305058002472, 0.8829314708709717, 0.8555537462234497, -0.7993718385696411, 0.5816977024078369, 0.2558734118938446, -0.043220456689596176, 0.30911290645599365, -0.7461700439453125, -0.07462222874164581, -0.033214010298252106, -0.33517348766326904, 1.141918659210...
func MoveRootlessNetnsSlirpProcessToUserSlice(pid int) error { randBytes := make([]byte, 4) _, err := rand.Read(randBytes) if err != nil { return err } return moveProcessToScope(pid, "user.slice", fmt.Sprintf("rootless-netns-%x.scope", randBytes)) }
[ -0.27822908759117126, -0.6811819076538086, 0.26268476247787476, -0.46267464756965637, 0.03541882708668709, 0.7991653680801392, 0.4357738792896271, -0.9598610401153564, 0.5881325602531433, 0.2060389369726181, -0.013466455042362213, 1.1962168216705322, -0.0336482934653759, 0.64644455909729, ...
func MovePauseProcessToScope(pausePidPath string) { var err error for i := 0; i < 10; i++ { randBytes := make([]byte, 4) _, err = rand.Read(randBytes) if err != nil { logrus.Errorf("failed to read random bytes: %v", err) continue } err = moveProcessPIDFileToScope(pausePidPath, "user.slice", fmt.Sprin...
[ -1.1940854787826538, -0.22950583696365356, 0.8126077055931091, -0.29152369499206543, 0.6235132813453674, 0.34717118740081787, 0.5577888488769531, -0.3821627199649811, 0.7454264163970947, 0.7490946650505066, 0.009991968981921673, 0.421328604221344, -0.533198893070221, 0.25688764452934265, ...
func MaybeMoveToSubCgroup() error { maybeMoveToSubCgroupSync.Do(func() { unifiedMode, err := cgroups.IsCgroup2UnifiedMode() if err != nil { maybeMoveToSubCgroupSyncErr = err return } if !unifiedMode { maybeMoveToSubCgroupSyncErr = nil return } cgroup, err := GetOwnCgroup() if err != nil { ...
[ -0.8075211048126221, 0.6718007326126099, 0.5330315828323364, 0.1724127233028412, -0.9297363758087158, -0.150776669383049, 0.9171244502067566, 0.11283853650093079, -0.20897437632083893, -0.10878247767686844, -0.2920719087123871, 0.43402546644210815, -0.28744029998779297, 0.8751682043075562,...
func WithWait(parent context.Context) (ctx context.Context, waitFunc func()) { ctx = parent var wait waitChan var ok bool if wait, ok = getWaitChan(parent); !ok { wait = make(waitChan) ctx = context.WithValue(parent, waitKey{}, wait) } waitFunc = func() { select { case <-wait: } } return }
[ 0.13157054781913757, -0.13566724956035614, 0.6369374990463257, -0.3020502030849457, -0.4957641065120697, -0.4264718294143677, 0.2125721573829651, -1.2763804197311401, 0.010932517237961292, -0.24809172749519348, -0.1663782000541687, -0.6093460321426392, 1.3356614112854004, -0.57026821374893...
func Done(ctx context.Context) { if wait, ok := getWaitChan(ctx); ok { mutex.Lock() defer mutex.Unlock() select { case <-wait: default: close(wait) } } return }
[ -0.09683452546596527, 0.7385823130607605, 0.5887285470962524, 0.7675818204879761, 0.1018415242433548, 0.5082853436470032, 0.02640092559158802, -1.1697947978973389, 0.3766847252845764, -0.3805166780948639, 0.16648057103157043, -0.17573818564414978, 0.010450892150402069, -0.05885116010904312...
func getWaitChan(ctx context.Context) (wait waitChan, ok bool) { wait, ok = ctx.Value(waitKey{}).(waitChan) return }
[ -1.2950713634490967, -0.2890990376472473, 0.4071117043495178, 0.29748785495758057, 0.1805475503206253, 0.5982746481895447, 0.143914133310318, -0.5238838791847229, -0.27471300959587097, -0.7070528864860535, -0.987586498260498, 0.3797445297241211, 0.4527948796749115, -0.5161027312278748, -...
func (a *Alert) Hash() [16]byte { b := getBuf() defer putBuf(b) for _, k := range a.names() { b = append(b, k...) b = append(b, a.Labels[k]...) } return md5.Sum(b) }
[ 0.8868124485015869, -0.29523324966430664, 0.5243954658508301, -0.23363691568374634, -0.24651432037353516, 0.8539906144142151, -0.06135714054107666, -0.25020310282707214, -0.6283689737319946, 0.46291929483413696, -0.5700366497039795, 1.1553335189819336, -0.5359593629837036, 0.38609495759010...
func (a *Alert) SetCurrent(i int) { atomic.StoreInt32(&a.current, int32(i)) }
[ -0.21087217330932617, -0.39624056220054626, 0.34696272015571594, -0.18834687769412994, -0.3678395748138428, 1.2426177263259888, 1.6824663877487183, -0.11671430617570877, -0.9068459272384644, 0.6883214116096497, -0.2105884552001953, 0.8895564675331116, -0.42454978823661804, -0.1086200848221...
func (a *Alert) Current() int { return int(atomic.LoadInt32(&a.current)) }
[ -0.38551056385040283, -1.318118929862976, 0.33829551935195923, -0.12235027551651001, -0.6364428997039795, 0.8304243683815002, 1.6171056032180786, -0.08175712823867798, -1.0067285299301147, 0.05502770096063614, 0.697024941444397, 1.7461628913879395, -0.23550498485565186, 0.06588722765445709...
func (a *Alert) AllFail() bool { return atomic.LoadInt32(&a.allfail) == 1 }
[ 0.1263069212436676, -0.4992843568325043, 0.3419242203235626, 0.7671061158180237, -0.39981427788734436, 0.36039653420448303, -0.3000277578830719, 0.014763176441192627, 0.27002468705177307, -0.16668790578842163, -0.11924637109041214, 0.5490593314170837, -0.6868276596069336, 0.862364351749420...
func (a *Alert) SetAllFail() { atomic.StoreInt32(&a.allfail, 1) }
[ 0.8427013754844666, -0.3582344353199005, 0.5503009557723999, 0.44419869780540466, -0.27994781732559204, 0.3031396269798279, 0.10330551117658615, 0.0497756227850914, -0.07803353667259216, -0.4294123649597168, -0.7997327446937561, 0.8123502731323242, -0.45483964681625366, 1.6239498853683472,...
func (stf *SetTrustLineFlags) BuildXDR() (xdr.Operation, error) { var xdrOp xdr.SetTrustLineFlagsOp // Set XDR address associated with the trustline err := xdrOp.Trustor.SetAddress(stf.Trustor) if err != nil { return xdr.Operation{}, errors.Wrap(err, "failed to set trustor address") } // Validate this is an i...
[ 0.06851106137037277, -0.0571516677737236, 0.6475740671157837, -0.9556595683097839, -0.42347830533981323, 0.045466434210538864, 0.2893540859222412, -0.12085424363613129, 0.13128264248371124, 0.515365481376648, 0.13665281236171722, -0.43531492352485657, -0.2661844491958618, -0.09953515231609...
func (stf *SetTrustLineFlags) FromXDR(xdrOp xdr.Operation) error { op, ok := xdrOp.Body.GetSetTrustLineFlagsOp() if !ok { return errors.New("error parsing allow_trust operation from xdr") } stf.SourceAccount = accountFromXDR(xdrOp.SourceAccount) stf.Trustor = op.Trustor.Address() asset, err := assetFromXDR(op....
[ 0.9444636702537537, 0.08530465513467789, 0.3663710057735443, -0.712345540523529, -1.1002790927886963, 0.7194221615791321, 0.319115549325943, -0.5257188081741333, -0.598031759262085, 0.8714507222175598, -0.4203007221221924, 0.10642392188310623, -0.13386641442775726, -0.1236576959490776, 0...
func (stf *SetTrustLineFlags) Validate() error { err := validateStellarPublicKey(stf.Trustor) if err != nil { return NewValidationError("Trustor", err.Error()) } err = validateAssetCode(stf.Asset) if err != nil { return NewValidationError("Asset", err.Error()) } return nil }
[ 0.551731288433075, 0.493908554315567, 0.22769026458263397, -0.1651502251625061, 0.8034638166427612, 0.1525537073612213, 0.5145879983901978, -0.5213330388069153, -1.4901548624038696, 0.6708292365074158, -0.5169881582260132, -0.12154148519039154, -0.19903577864170074, 0.6885407567024231, 0...
func (stf *SetTrustLineFlags) GetSourceAccount() string { return stf.SourceAccount }
[ 0.841720461845398, -0.017048034816980362, 0.3297001123428345, -0.08990071713924408, 0.42934268712997437, 0.5762151479721069, 2.280256986618042, -0.037132639437913895, 0.016403038054704666, 0.367235004901886, -0.9395812153816223, 0.7002062797546387, -0.07655111700296402, 0.39092549681663513...
func TestMetricsMemoryPressureResponse(t *testing.T) { var currentMemAlloc uint64 ml := &memoryLimiter{ usageChecker: memUsageChecker{ memAllocLimit: 1024, }, readMemStatsFn: func(ms *runtime.MemStats) { ms.Alloc = currentMemAlloc }, obsrep: obsreport.NewProcessorObsReport(configtelemetry.LevelNone, "...
[ 0.7625046968460083, 0.265039324760437, 0.7452507019042969, 0.10400732606649399, 0.2991586923599243, 0.6126357913017273, 0.7862204909324646, -0.4817977845668793, -0.19509506225585938, -0.2629658877849579, 0.21803641319274902, 0.42116037011146545, -1.045708179473877, 0.058104779571294785, ...
func TestTraceMemoryPressureResponse(t *testing.T) { var currentMemAlloc uint64 ml := &memoryLimiter{ usageChecker: memUsageChecker{ memAllocLimit: 1024, }, readMemStatsFn: func(ms *runtime.MemStats) { ms.Alloc = currentMemAlloc }, obsrep: obsreport.NewProcessorObsReport(configtelemetry.LevelNone, "")...
[ 1.1097034215927124, 0.17626197636127472, 0.8059006929397583, -0.11753292381763458, 0.34042754769325256, 0.44900253415107727, 0.6830008625984192, -0.5644193887710571, 0.08196885138750076, -0.22115759551525116, 0.22826652228832245, 0.14077870547771454, -0.7903513312339783, -0.071670331060886...
func TestLogMemoryPressureResponse(t *testing.T) { var currentMemAlloc uint64 ml := &memoryLimiter{ usageChecker: memUsageChecker{ memAllocLimit: 1024, }, readMemStatsFn: func(ms *runtime.MemStats) { ms.Alloc = currentMemAlloc }, obsrep: obsreport.NewProcessorObsReport(configtelemetry.LevelNone, ""), ...
[ 0.8333389759063721, -0.0034742706920951605, 0.782334566116333, -0.1339554339647293, -0.0693240761756897, 0.301484614610672, 0.2929815351963043, -0.5398708581924438, 0.20449486374855042, -0.20944131910800934, 0.1646372228860855, 0.29903644323349, -0.7805373668670654, -0.09044618159532547, ...
func newApp() *iris.Application { app := iris.New() // Optionally, add two built'n handlers // that can recover from any http-relative panics // and log the requests to the terminal. app.Use(recover.New()) app.Use(logger.New()) // Serve a controller based on the root Router, "/". mvc.New(app).Handle(new(commen...
[ 0.9866300821304321, -0.6943718791007996, 0.691597044467926, 1.377497673034668, 0.112306147813797, 0.010700234211981297, 0.7828032374382019, -0.16205058991909027, 0.5770642757415771, -0.9196696281433105, 0.19677919149398804, -0.35934191942214966, 0.36794978380203247, -0.24886392056941986, ...
func (r *HousingTypology) Create(db *sql.DB) error { return db.QueryRow(`INSERT INTO housing_typology(name) VALUES($1) RETURNING id`, &r.Name).Scan(&r.ID) }
[ -0.25816258788108826, 0.7771093249320984, 0.16665303707122803, 0.27430078387260437, 0.35354307293891907, 0.3826810419559479, -0.3935892879962921, -0.4042068421840668, -0.9764670729637146, 0.7936744689941406, -0.08603720366954803, -1.4101346731185913, -0.3512645959854126, -0.046799138188362...
func (r *HousingTypology) Valid() error { if r.Name == "" { return fmt.Errorf("Nom vide") } return nil }
[ 0.8201189041137695, -0.4469127058982849, 0.3573724627494812, -0.1690918654203415, 0.020759217441082, 1.031185269355774, -1.0238640308380127, 0.17367149889469147, -0.6309777498245239, 0.38897961378097534, 0.2977291941642761, -0.009773892350494862, -0.0970638170838356, -0.21766802668571472, ...
func (r *HousingTypology) Get(db *sql.DB) error { return db.QueryRow(`SELECT name FROM housing_typology WHERE ID=$1`, r.ID). Scan(&r.Name) }
[ -0.6683400869369507, 0.44721463322639465, 0.20540820062160492, -0.007127935066819191, 0.3574617803096771, -0.28221556544303894, -0.7831249237060547, -0.3596896529197693, -0.4150429964065552, 0.9851504564285278, 0.3833073675632477, -0.004161197226494551, 0.5156885385513306, -0.4032892882823...
func (r *HousingTypology) Update(db *sql.DB) error { res, err := db.Exec(`UPDATE housing_typology SET name=$1 WHERE id=$2`, r.Name, r.ID) if err != nil { return fmt.Errorf("update %v", err) } count, err := res.RowsAffected() if err != nil { return fmt.Errorf("rows affected %v", err) } if count != 1 { ret...
[ -0.7512093186378479, -0.24372346699237823, 0.33439263701438904, -0.19356109201908112, -0.4616716504096985, 0.35240039229393005, -0.2600722908973694, -0.013233322650194168, -0.908930242061615, 1.5136874914169312, 0.1095116138458252, -0.6186195611953735, -0.45318061113357544, -0.316716790199...
func (r *HousingTypologies) GetAll(db *sql.DB) error { rows, err := db.Query(`SELECT id,name FROM housing_typology ORDER BY 2`) if err != nil { return fmt.Errorf("select %v", err) } var row HousingTypology defer rows.Close() for rows.Next() { if err = rows.Scan(&row.ID, &row.Name); err != nil { return fmt....
[ 0.0185124222189188, 0.14101475477218628, 0.646198570728302, 0.7703766822814941, 0.524705171585083, 0.41821154952049255, -0.52900230884552, 0.04385831207036972, -0.2889714539051056, 0.14128011465072632, 0.17097973823547363, 0.22633078694343567, 0.3553650379180908, 0.3918987512588501, 0.47...
func (r *HousingTypology) Delete(db *sql.DB) error { res, err := db.Exec("DELETE FROM housing_typology WHERE id = $1", r.ID) if err != nil { return fmt.Errorf("delete %v", err) } count, err := res.RowsAffected() if err != nil { return fmt.Errorf("rows affected %v", err) } if count != 1 { return errors.New(...
[ 0.21589182317256927, 0.5081252455711365, 0.6863239407539368, 0.25019869208335876, 0.5589979887008667, 0.3807772994041443, 0.3149081766605377, 0.5213673710823059, -0.5530933737754822, 1.3375450372695923, 0.4776686131954193, -0.7836161851882935, -0.6734668016433716, -0.2290375530719757, 0....
func myPrint(s string){ fmt.Print(s) }
[ 0.4051152169704437, -1.2118401527404785, 0.306663453578949, -0.547265887260437, -0.6301661133766174, -0.627843976020813, -0.9943200349807739, 0.21048666536808014, -0.11710358411073685, -0.8740547299385071, 0.12179435044527054, 0.468511700630188, -0.04419026896357536, -0.3686664402484894, ...
func myPrintFunction(custom string) myPrintType{ return func(s string){ fmt.Println(s +custom) } }
[ 0.057930152863264084, -1.1598516702651978, 0.43116939067840576, -0.47841721773147583, -1.2031031847000122, -0.919599175453186, -0.6985218524932861, 0.06946825981140137, 0.35217785835266113, -0.1417263299226761, -0.2623118758201599, 1.3722482919692993, 0.47314661741256714, -0.79513978958129...
func myCondition(mycheck bool){ if mycheck{ fmt.Println("this ran") } fmt.Println("wassup") }
[ 0.37026435136795044, -0.6669710874557495, 0.48995110392570496, 0.15324585139751434, -0.6072055697441101, 0.5722689032554626, 0.9354785680770874, 1.2904504537582397, -0.27507802844047546, -0.755244791507721, -0.42191675305366516, 0.8732752203941345, 0.1550510972738266, 0.8117468357086182, ...
func GetParsed(key []byte, data interface{}, height int, prove bool) (uint64, error) { bs, h, err := Get(key, height, prove) if err != nil { return 0, err } err = wire.ReadBinaryBytes(bs, data) if err != nil { return 0, err } return h, nil }
[ 0.8024341464042664, 0.5563417673110962, 0.8415800929069519, 0.7686491012573242, 0.13899636268615723, -0.17747163772583008, -0.6417405605316162, -0.03430246561765671, -0.45589157938957214, -0.37863463163375854, -0.08131793141365051, 1.3084486722946167, -1.298662781715393, 0.1977189034223556...
func Get(key []byte, height int, prove bool) (data.Bytes, uint64, error) { if height < 0 { return nil, 0, fmt.Errorf("Height cannot be negative") } if !prove { node := commands.GetNode() resp, err := node.ABCIQueryWithOptions("/key", key, rpcclient.ABCIQueryOptions{Trusted: true, Height: uint64(height)}) ...
[ -0.2395162135362625, 0.4903888404369354, 0.7541891932487488, 0.5371407270431519, 0.064661405980587, 0.01851480081677437, -1.1815316677093506, -0.12869930267333984, -0.9019861221313477, 0.4584686756134033, 0.08671661466360092, 1.281899333000183, -1.251770257949829, 0.7021489143371582, 0.1...
func GetWithProof(key []byte, height int) (data.Bytes, uint64, iavl.KeyProof, error) { node := commands.GetNode() cert, err := commands.GetCertifier() if err != nil { return nil, 0, nil, err } return client.GetWithProof(key, height, node, cert) }
[ 0.046352170407772064, 0.3693206310272217, 0.5270541906356812, 0.6108233332633972, -0.7997645139694214, -0.8975443840026855, -0.8595482707023621, -0.6840081214904785, -0.45118293166160583, 0.9156360626220703, -0.44376683235168457, 0.8589312434196472, -0.818105161190033, 0.3281245231628418, ...
func ParseHexKey(args []string, argname string) ([]byte, error) { if len(args) == 0 { return nil, errors.Errorf("Missing required argument [%s]", argname) } if len(args) > 1 { return nil, errors.Errorf("Only accepts one argument [%s]", argname) } rawkey := args[0] if rawkey == "" { return nil, errors.Errorf...
[ -0.6342422366142273, 0.33972877264022827, 0.8521705269813538, 0.1963038295507431, -0.30725032091140747, -0.2425999790430069, -0.23267674446105957, 1.09287691116333, -0.175526425242424, 0.8693546056747437, -0.5286150574684143, -0.42747682332992554, -0.21357174217700958, 1.2422757148742676, ...
func GetHeight() int { return viper.GetInt(FlagHeight) }
[ 1.079209327697754, 1.344539999961853, 0.2522308826446533, 1.4372358322143555, 1.176174521446228, -0.02622203342616558, 1.22813880443573, -0.23289723694324493, -0.8799955248832703, -0.1869387924671173, -0.7286195158958435, 0.2340662032365799, -0.8661205172538757, 0.1938670128583908, 0.929...
func OutputProof(data interface{}, height uint64) error { return FoutputProof(os.Stdout, data, height) }
[ 0.38420799374580383, 0.13453489542007446, 0.34630662202835083, 0.6574236750602722, -1.2338159084320068, -0.2571188807487488, 0.45655494928359985, -1.3154802322387695, -0.12907883524894714, 0.9270526766777039, 0.0746624544262886, -0.045255452394485474, -0.23616084456443787, 0.27399024367332...
func MakeHTTPHandler(s Service, logger log.Logger) http.Handler { r := mux.NewRouter() e := MakeServerEndpoints(s) options := []httptransport.ServerOption{ httptransport.ServerErrorLogger(logger), httptransport.ServerErrorEncoder(encodeError), } // POST /projects/ Adds a new Project // GET /pro...
[ 0.17369432747364044, 0.42665940523147583, 0.809513509273529, 0.27365317940711975, -0.3478768765926361, 0.688045084476471, 0.4629327952861786, -0.6294576525688171, -0.3695753514766693, -0.08750733733177185, -0.424198180437088, -0.36891284584999084, -0.05789678543806076, 0.3082558214664459, ...