text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (u UUID5) MarshalJSON() ([]byte, error) {
return json.Marshal(string(u))
} | [
-0.41126394271850586,
0.11404512822628021,
-0.006774954963475466,
-0.25976619124412537,
-1.2134183645248413,
-0.06641452014446259,
0.6969536542892456,
0.7920182943344116,
0.051169268786907196,
0.4674419164657593,
-1.218217134475708,
0.8422223925590515,
-0.5258574485778809,
-0.1544471830129... |
func (u *UUID5) UnmarshalJSON(data []byte) error {
if string(data) == jsonNull {
return nil
}
var ustr string
if err := json.Unmarshal(data, &ustr); err != nil {
return err
}
*u = UUID5(ustr)
return nil
} | [
-1.0216492414474487,
0.5968498587608337,
0.44013285636901855,
-0.8964583873748779,
-1.3887602090835571,
-0.22796142101287842,
1.2048370838165283,
0.7675223350524902,
0.01763767935335636,
0.5786606073379517,
-0.5993375182151794,
-0.06792575865983963,
-0.8217347264289856,
-0.2981906235218048... |
func (u *UUID5) DeepCopyInto(out *UUID5) {
*out = *u
} | [
0.21355314552783966,
0.1088215783238411,
0.15394043922424316,
0.10279323905706406,
-1.736649513244629,
0.6211234331130981,
0.962553858757019,
0.7648923397064209,
-1.5668059587478638,
-0.06072910875082016,
-1.2319998741149902,
0.8541285991668701,
-0.1441655457019806,
-0.8332812190055847,
... |
func (u *UUID5) DeepCopy() *UUID5 {
if u == nil {
return nil
}
out := new(UUID5)
u.DeepCopyInto(out)
return out
} | [
-0.812061607837677,
0.5004937052726746,
-0.026763252913951874,
0.8878034949302673,
-1.2034720182418823,
0.2777571678161621,
1.629583477973938,
0.14352531731128693,
-0.8371669054031372,
0.11270028352737427,
-0.48580485582351685,
0.218008890748024,
-0.9007197618484497,
-0.7796552181243896,
... |
func (u ISBN) MarshalText() ([]byte, error) {
return []byte(string(u)), nil
} | [
-0.13662999868392944,
0.39359378814697266,
0.21948322653770447,
0.9520758390426636,
-0.566777229309082,
0.5855852365493774,
-0.916964054107666,
0.6407901048660278,
1.003846526145935,
0.11588211357593536,
-0.753720760345459,
0.5366636514663696,
-1.1043397188186646,
-0.17411217093467712,
-... |
func (u *ISBN) UnmarshalText(data []byte) error { // validation is performed later on
*u = ISBN(string(data))
return nil
} | [
0.29891231656074524,
-0.01622978039085865,
0.3390240967273712,
0.42346590757369995,
-0.5329616665840149,
0.9695388674736023,
0.07363264262676239,
1.2255957126617432,
0.5055902600288391,
-0.36228129267692566,
-0.10371272265911102,
-0.3018888533115387,
-1.144271731376648,
0.01194982044398784... |
func (u *ISBN) Scan(raw interface{}) error {
switch v := raw.(type) {
case []byte:
*u = ISBN(string(v))
case string:
*u = ISBN(v)
default:
return fmt.Errorf("cannot sql.Scan() strfmt.ISBN from: %#v", v)
}
return nil
} | [
-1.1906388998031616,
0.2471700757741928,
0.5541014671325684,
1.4323065280914307,
-0.9026387929916382,
0.31198054552078247,
-0.1217493861913681,
0.17032338678836823,
-0.14484061300754547,
-1.0967873334884644,
-0.38018798828125,
0.9107290506362915,
-0.46754249930381775,
0.22649498283863068,
... |
func (u ISBN) MarshalJSON() ([]byte, error) {
return json.Marshal(string(u))
} | [
-0.7632206082344055,
-0.2968481779098511,
0.2627558410167694,
0.8940525650978088,
-0.5868515372276306,
0.34609031677246094,
-0.2089056372642517,
1.0909548997879028,
0.4390823543071747,
-0.2844623327255249,
-1.2197601795196533,
1.0980638265609741,
-0.6440703272819519,
0.312288761138916,
0... |
func (u *ISBN) UnmarshalJSON(data []byte) error {
if string(data) == jsonNull {
return nil
}
var ustr string
if err := json.Unmarshal(data, &ustr); err != nil {
return err
}
*u = ISBN(ustr)
return nil
} | [
-1.146487832069397,
0.04790683090686798,
0.6066364049911499,
0.11667844653129578,
-0.5084079504013062,
0.4397977292537689,
0.1918731927871704,
0.9526323676109314,
0.19527338445186615,
-0.5873558521270752,
-0.008829466067254543,
0.4653276801109314,
-0.7115933299064636,
0.26572930812835693,
... |
func (u *ISBN) DeepCopyInto(out *ISBN) {
*out = *u
} | [
0.2599705159664154,
-0.1718100756406784,
0.4028468132019043,
0.9569592475891113,
-0.8758248686790466,
1.2957714796066284,
0.0575399249792099,
1.1354835033416748,
-1.2468054294586182,
-0.8879547119140625,
-0.8139098882675171,
1.2726874351501465,
-0.22801946103572845,
-0.1986977458000183,
... |
func (u *ISBN) DeepCopy() *ISBN {
if u == nil {
return nil
}
out := new(ISBN)
u.DeepCopyInto(out)
return out
} | [
-0.6412586569786072,
0.08442778140306473,
0.5812373757362366,
2.440675973892212,
-0.4066566824913025,
0.7659983038902283,
0.37135639786720276,
0.5563209652900696,
-0.09288951754570007,
-1.3234587907791138,
-0.4835640490055084,
0.7976590394973755,
-1.1505844593048096,
-0.4306860566139221,
... |
func (u ISBN10) MarshalText() ([]byte, error) {
return []byte(string(u)), nil
} | [
-0.07232190668582916,
0.24450556933879852,
0.20881912112236023,
0.11927162855863571,
0.20874176919460297,
0.4904252290725708,
-0.7843794822692871,
0.9490721821784973,
0.971457302570343,
0.4689576029777527,
-0.6636756062507629,
0.55205237865448,
-0.7959733009338379,
-0.23984158039093018,
... |
func (u *ISBN10) UnmarshalText(data []byte) error { // validation is performed later on
*u = ISBN10(string(data))
return nil
} | [
0.5918677449226379,
-0.10206317901611328,
0.23236778378486633,
-0.4209243655204773,
0.16005516052246094,
0.5797426104545593,
0.2562667727470398,
1.578641414642334,
0.7044826745986938,
-0.03387930244207382,
-0.22501876950263977,
-0.5626428723335266,
-0.6222365498542786,
-0.20022214949131012... |
func (u *ISBN10) Scan(raw interface{}) error {
switch v := raw.(type) {
case []byte:
*u = ISBN10(string(v))
case string:
*u = ISBN10(v)
default:
return fmt.Errorf("cannot sql.Scan() strfmt.ISBN10 from: %#v", v)
}
return nil
} | [
-0.97865229845047,
0.06319379061460495,
0.49101364612579346,
0.767370343208313,
-0.40065672993659973,
0.17024536430835724,
-0.05102027207612991,
0.3871309459209442,
-0.04828207939863205,
-0.8575178384780884,
-0.36361464858055115,
0.6860507130622864,
-0.2050948441028595,
0.11839569360017776... |
func (u ISBN10) MarshalJSON() ([]byte, error) {
return json.Marshal(string(u))
} | [
-0.3994799554347992,
-0.49222007393836975,
0.27815088629722595,
-0.3281504511833191,
0.34093794226646423,
0.09211188554763794,
0.0039972178637981415,
1.4699745178222656,
0.2887726128101349,
0.10246122628450394,
-0.8823360204696655,
0.952666699886322,
-0.16845263540744781,
0.233601987361907... |
func (u *ISBN10) UnmarshalJSON(data []byte) error {
if string(data) == jsonNull {
return nil
}
var ustr string
if err := json.Unmarshal(data, &ustr); err != nil {
return err
}
*u = ISBN10(ustr)
return nil
} | [
-0.7716030478477478,
-0.13827866315841675,
0.4636460542678833,
-0.8824456930160522,
0.14964507520198822,
0.003618944436311722,
0.39553287625312805,
1.334039568901062,
0.2775505483150482,
-0.10863979160785675,
-0.09827610105276108,
0.04322406277060509,
-0.23275452852249146,
0.08628102391958... |
func (u *ISBN10) DeepCopyInto(out *ISBN10) {
*out = *u
} | [
0.49514684081077576,
-0.37266242504119873,
0.2299596071243286,
0.17125073075294495,
-0.21231338381767273,
0.8427533507347107,
0.25719574093818665,
1.3193730115890503,
-1.1052852869033813,
-0.6256235837936401,
-0.8071591854095459,
0.9604187607765198,
0.29013246297836304,
-0.4023224413394928... |
func (u *ISBN10) DeepCopy() *ISBN10 {
if u == nil {
return nil
}
out := new(ISBN10)
u.DeepCopyInto(out)
return out
} | [
-0.43368303775787354,
-0.11660516262054443,
0.16697469353675842,
0.7372152209281921,
0.5991759896278381,
0.16668841242790222,
0.7279777526855469,
0.9448860287666321,
0.05261462926864624,
-0.45425674319267273,
-0.5128443837165833,
0.11054305732250214,
-0.23208022117614746,
-0.58526593446731... |
func (u ISBN13) MarshalText() ([]byte, error) {
return []byte(string(u)), nil
} | [
0.03584723919630051,
0.7077273726463318,
-0.013877075165510178,
0.5595707893371582,
-0.39257296919822693,
0.4168616831302643,
-1.3192474842071533,
0.4618133306503296,
1.117856502532959,
0.4824944734573364,
-0.4006733298301697,
0.4564569890499115,
-1.5749385356903076,
-0.16309787333011627,
... |
func (u *ISBN13) UnmarshalText(data []byte) error { // validation is performed later on
*u = ISBN13(string(data))
return nil
} | [
0.43737950921058655,
0.19905729591846466,
0.14535605907440186,
-0.039168328046798706,
-0.4057284891605377,
0.5685369372367859,
-0.3043155372142792,
1.1718113422393799,
0.9386768341064453,
0.013819681480526924,
0.03709252551198006,
-0.3714107275009155,
-1.3798645734786987,
-0.09688112884759... |
func (u *ISBN13) Scan(raw interface{}) error {
switch v := raw.(type) {
case []byte:
*u = ISBN13(string(v))
case string:
*u = ISBN13(v)
default:
return fmt.Errorf("cannot sql.Scan() strfmt.ISBN13 from: %#v", v)
}
return nil
} | [
-1.0372651815414429,
0.21578140556812286,
0.31419286131858826,
1.012519121170044,
-0.875756025314331,
0.23580525815486908,
-0.39926087856292725,
0.12056053429841995,
0.20117315649986267,
-0.8167493939399719,
-0.18883785605430603,
0.7175023555755615,
-0.7218016982078552,
0.10571885108947754... |
func (u ISBN13) MarshalJSON() ([]byte, error) {
return json.Marshal(string(u))
} | [
-0.41815221309661865,
-0.006698824465274811,
0.009083440527319908,
0.1641930639743805,
-0.39332911372184753,
0.1479298174381256,
-0.9191671013832092,
0.9095572233200073,
0.6831371188163757,
0.02655838616192341,
-0.5696753263473511,
0.9237967729568481,
-1.1618883609771729,
0.429170489311218... |
func (u *ISBN13) UnmarshalJSON(data []byte) error {
if string(data) == jsonNull {
return nil
}
var ustr string
if err := json.Unmarshal(data, &ustr); err != nil {
return err
}
*u = ISBN13(ustr)
return nil
} | [
-1.0498454570770264,
0.16971611976623535,
0.24477346241474152,
-0.5251302123069763,
-0.370104044675827,
0.16042928397655487,
-0.25289270281791687,
0.7389451861381531,
0.777501106262207,
-0.04102259874343872,
0.24632716178894043,
0.3428727090358734,
-1.004965901374817,
0.21286393702030182,
... |
func (u *ISBN13) DeepCopyInto(out *ISBN13) {
*out = *u
} | [
0.2530194818973541,
-0.07256630808115005,
0.22950144112110138,
0.43398183584213257,
-0.6657444834709167,
1.0642907619476318,
-0.31452399492263794,
0.9836889505386353,
-0.6910660266876221,
-0.6326239705085754,
-0.4335954487323761,
1.1188822984695435,
-0.6471512317657471,
-0.4034828245639801... |
func (u *ISBN13) DeepCopy() *ISBN13 {
if u == nil {
return nil
}
out := new(ISBN13)
u.DeepCopyInto(out)
return out
} | [
-0.8647398352622986,
0.4605982303619385,
-0.06846744567155838,
0.9964958429336548,
0.07485204935073853,
0.5473098158836365,
-0.054608236998319626,
0.4270988702774048,
0.44579243659973145,
-0.6202492713928223,
-0.0447184294462204,
0.6731250882148743,
-1.5699727535247803,
-0.4210696220397949... |
func (u CreditCard) MarshalText() ([]byte, error) {
return []byte(string(u)), nil
} | [
0.562788724899292,
0.7407134175300598,
0.15103238821029663,
-0.16282902657985687,
-0.5752112865447998,
0.3681412935256958,
-1.1404945850372314,
0.4882655441761017,
1.6124032735824585,
0.028024177998304367,
-0.7413308620452881,
0.6618461012840271,
-0.4543567895889282,
0.11102695763111115,
... |
func (u *CreditCard) UnmarshalText(data []byte) error { // validation is performed later on
*u = CreditCard(string(data))
return nil
} | [
1.0162947177886963,
0.27456799149513245,
0.36272943019866943,
-0.9851340055465698,
-0.5607659816741943,
0.5562524795532227,
-0.2487574964761734,
1.171401023864746,
0.907477855682373,
-0.09418141841888428,
-0.301430881023407,
-0.25710391998291016,
-0.6847922801971436,
0.01940411701798439,
... |
func (u *CreditCard) Scan(raw interface{}) error {
switch v := raw.(type) {
case []byte:
*u = CreditCard(string(v))
case string:
*u = CreditCard(v)
default:
return fmt.Errorf("cannot sql.Scan() strfmt.CreditCard from: %#v", v)
}
return nil
} | [
-0.4381347894668579,
0.6369495987892151,
0.4758162796497345,
0.10312177240848541,
-0.8082762360572815,
-0.07939672470092773,
-0.4468015134334564,
0.006390905473381281,
0.23572608828544617,
-1.0205237865447998,
-0.317973792552948,
0.9532442688941956,
-0.14665205776691437,
0.2542176544666290... |
func (u CreditCard) MarshalJSON() ([]byte, error) {
return json.Marshal(string(u))
} | [
0.10554099082946777,
0.3222532272338867,
0.1632620096206665,
-0.669917106628418,
-0.2303454577922821,
0.06506823003292084,
-0.35177260637283325,
0.9559905529022217,
1.165595531463623,
-0.26582950353622437,
-0.9617493748664856,
1.3744792938232422,
-0.037265338003635406,
0.5506541132926941,
... |
func (u *CreditCard) UnmarshalJSON(data []byte) error {
if string(data) == jsonNull {
return nil
}
var ustr string
if err := json.Unmarshal(data, &ustr); err != nil {
return err
}
*u = CreditCard(ustr)
return nil
} | [
-0.25405341386795044,
0.5513821244239807,
0.5819226503372192,
-1.526324987411499,
-0.29042476415634155,
0.052958354353904724,
0.03490639105439186,
0.803317666053772,
0.8195602297782898,
-0.06963303685188293,
-0.29927751421928406,
0.5614649057388306,
-0.3547076880931854,
0.33532318472862244... |
func (u *CreditCard) DeepCopyInto(out *CreditCard) {
*out = *u
} | [
0.6060674786567688,
0.1804027110338211,
0.3380349278450012,
-0.4267927408218384,
-0.7272377014160156,
0.8304480314254761,
-0.050580937415361404,
1.0981401205062866,
-0.8096011281013489,
-0.7273942828178406,
-0.7335311770439148,
1.6065187454223633,
0.1205298975110054,
-0.23942416906356812,
... |
func (u *CreditCard) DeepCopy() *CreditCard {
if u == nil {
return nil
}
out := new(CreditCard)
u.DeepCopyInto(out)
return out
} | [
-0.1313086450099945,
0.33728325366973877,
0.3809017241001129,
0.37105584144592285,
0.04984605312347412,
0.7180593013763428,
0.4912605285644531,
0.3540225923061371,
0.19211749732494354,
-0.8140789270401001,
-0.1814061403274536,
1.203522801399231,
-0.24027328193187714,
-0.10328935086727142,
... |
func (u SSN) MarshalText() ([]byte, error) {
return []byte(string(u)), nil
} | [
0.5667815208435059,
0.8483014106750488,
0.20306840538978577,
0.1842348575592041,
-0.6373953819274902,
0.49771854281425476,
-1.233718752861023,
0.2279004007577896,
1.9796454906463623,
-0.6040554642677307,
-1.1991539001464844,
0.9895691275596619,
-0.08594296872615814,
0.037824660539627075,
... |
func (u *SSN) UnmarshalText(data []byte) error { // validation is performed later on
*u = SSN(string(data))
return nil
} | [
1.111424207687378,
0.35464927554130554,
0.2770487666130066,
-0.4978957772254944,
-0.6444335579872131,
0.4924096465110779,
-0.10449909418821335,
0.8392665386199951,
1.3117843866348267,
-0.6006408333778381,
-0.9663116335868835,
-0.09141821414232254,
-0.6040624976158142,
-0.03922318294644356,... |
func (u *SSN) Scan(raw interface{}) error {
switch v := raw.(type) {
case []byte:
*u = SSN(string(v))
case string:
*u = SSN(v)
default:
return fmt.Errorf("cannot sql.Scan() strfmt.SSN from: %#v", v)
}
return nil
} | [
-0.42332494258880615,
0.41388872265815735,
0.4743378758430481,
0.6377207040786743,
-1.1041607856750488,
-0.0032011258881539106,
-0.3618524372577667,
-0.32495707273483276,
0.6247960329055786,
-1.2429112195968628,
-0.8883867263793945,
0.9808372855186462,
0.19731087982654572,
0.31315401196479... |
func (u SSN) MarshalJSON() ([]byte, error) {
return json.Marshal(string(u))
} | [
0.1613505780696869,
0.4001814126968384,
0.2394672930240631,
0.043214116245508194,
-0.5629962682723999,
-0.011409830302000046,
-0.30313345789909363,
0.5180212259292603,
1.7526711225509644,
-1.2513909339904785,
-1.6008899211883545,
1.8796356916427612,
0.6617664098739624,
0.6372693777084351,
... |
func (u *SSN) UnmarshalJSON(data []byte) error {
if string(data) == jsonNull {
return nil
}
var ustr string
if err := json.Unmarshal(data, &ustr); err != nil {
return err
}
*u = SSN(ustr)
return nil
} | [
-0.5776676535606384,
0.5958672165870667,
0.5646747350692749,
-0.5866548418998718,
-0.5166913270950317,
-0.09159301221370697,
0.1413024663925171,
0.3402855098247528,
1.353147268295288,
-0.8474123477935791,
-0.9985358715057373,
0.7784526944160461,
0.0769500583410263,
0.33951589465141296,
0... |
func (u *SSN) DeepCopyInto(out *SSN) {
*out = *u
} | [
0.7317500710487366,
0.13518700003623962,
0.4000362157821655,
0.3298400044441223,
-1.0027780532836914,
0.8523020148277283,
-0.2491459995508194,
0.5735809803009033,
-0.1571160852909088,
-1.3536642789840698,
-1.3991132974624634,
1.6483380794525146,
0.5876561403274536,
-0.006838695611804724,
... |
func (u *SSN) DeepCopy() *SSN {
if u == nil {
return nil
}
out := new(SSN)
u.DeepCopyInto(out)
return out
} | [
-0.03891140595078468,
0.18287061154842377,
0.578856885433197,
1.4787795543670654,
0.026776432991027832,
-0.025417575612664223,
0.28753724694252014,
0.00891990028321743,
0.8471596837043762,
-1.861462950706482,
-1.0149322748184204,
1.0156041383743286,
-0.19672590494155884,
-0.276939570903778... |
func (h HexColor) MarshalText() ([]byte, error) {
return []byte(string(h)), nil
} | [
0.4493420422077179,
0.3528805375099182,
0.2363988608121872,
-0.2888457775115967,
0.32559719681739807,
-0.023540658876299858,
-1.653296947479248,
0.13961055874824524,
0.6283846497535706,
-0.13611705601215363,
-0.7150799632072449,
-0.15178950130939484,
-0.6077312231063843,
0.8929630517959595... |
func (h *HexColor) UnmarshalText(data []byte) error { // validation is performed later on
*h = HexColor(string(data))
return nil
} | [
0.8866029977798462,
0.107626773416996,
0.3672739863395691,
-1.1394623517990112,
-0.1050909012556076,
0.4514802098274231,
-0.44123899936676025,
0.9630692601203918,
0.22062206268310547,
-0.3500151038169861,
-0.3693799078464508,
-0.6926509141921997,
-0.7807459235191345,
0.47800779342651367,
... |
func (h *HexColor) Scan(raw interface{}) error {
switch v := raw.(type) {
case []byte:
*h = HexColor(string(v))
case string:
*h = HexColor(v)
default:
return fmt.Errorf("cannot sql.Scan() strfmt.HexColor from: %#v", v)
}
return nil
} | [
-0.6707878708839417,
0.3880018889904022,
0.4513682723045349,
0.08104785531759262,
-0.6974698305130005,
-0.000030319741199491546,
-0.6734198331832886,
0.053659189492464066,
-0.2499384731054306,
-1.1255813837051392,
-0.28339681029319763,
0.42021024227142334,
-0.13543355464935303,
0.932557880... |
func (h HexColor) MarshalJSON() ([]byte, error) {
return json.Marshal(string(h))
} | [
0.11629050970077515,
-0.14469273388385773,
0.14415793120861053,
-0.6363254189491272,
0.10843998193740845,
-0.05375172942876816,
-0.7864180207252502,
1.0612221956253052,
0.2917984127998352,
-0.517094612121582,
-1.1442334651947021,
0.4044046700000763,
0.005869872868061066,
1.6748424768447876... |
func (h *HexColor) UnmarshalJSON(data []byte) error {
if string(data) == jsonNull {
return nil
}
var ustr string
if err := json.Unmarshal(data, &ustr); err != nil {
return err
}
*h = HexColor(ustr)
return nil
} | [
-0.4804095923900604,
0.37501707673072815,
0.39346539974212646,
-1.211522102355957,
-0.3397304117679596,
-0.08936518430709839,
-0.23709607124328613,
1.0027803182601929,
0.3247765302658081,
-0.3997151851654053,
-0.37617069482803345,
0.06388194113969803,
-0.2644597589969635,
1.133431911468505... |
func (h *HexColor) DeepCopyInto(out *HexColor) {
*out = *h
} | [
0.6084535121917725,
-0.006208811886608601,
0.2120964229106903,
-0.3256349265575409,
-0.4570190906524658,
0.7411997318267822,
-0.12901003658771515,
1.032942295074463,
-1.548080563545227,
-0.9576951265335083,
-0.8625067472457886,
0.7642672061920166,
0.2883783280849457,
0.5452608466148376,
... |
func (h *HexColor) DeepCopy() *HexColor {
if h == nil {
return nil
}
out := new(HexColor)
h.DeepCopyInto(out)
return out
} | [
0.37950703501701355,
0.057428766041994095,
0.048619627952575684,
0.6194772124290466,
-0.32943716645240784,
0.5111786127090454,
-0.08581477403640747,
1.1076968908309937,
-0.3144203722476959,
-0.7239705920219421,
-0.5264500379562378,
0.01736515574157238,
-0.4016200006008148,
0.73051053285598... |
func (r RGBColor) MarshalText() ([]byte, error) {
return []byte(string(r)), nil
} | [
0.4057684540748596,
-0.08814210444688797,
0.18077832460403442,
0.07600729912519455,
-0.3519669473171234,
0.2365398406982422,
-1.2176203727722168,
-1.2548792362213135,
0.464863657951355,
0.3937719166278839,
-0.7853804230690002,
0.054660748690366745,
-1.1484014987945557,
0.3438127338886261,
... |
func (r *RGBColor) UnmarshalText(data []byte) error { // validation is performed later on
*r = RGBColor(string(data))
return nil
} | [
0.9516708850860596,
-0.22936378419399261,
0.35015222430229187,
-0.8214278221130371,
-0.3861832022666931,
0.5173357129096985,
-0.27963003516197205,
-0.29698726534843445,
-0.03596159815788269,
-0.09001375734806061,
-0.4428969621658325,
-0.4415023624897003,
-1.2647693157196045,
0.015526983886... |
func (r *RGBColor) Scan(raw interface{}) error {
switch v := raw.(type) {
case []byte:
*r = RGBColor(string(v))
case string:
*r = RGBColor(v)
default:
return fmt.Errorf("cannot sql.Scan() strfmt.RGBColor from: %#v", v)
}
return nil
} | [
-0.5814541578292847,
0.21491317451000214,
0.472210556268692,
0.20192530751228333,
-0.9679559469223022,
0.08719217032194138,
-0.4921974241733551,
-1.001549243927002,
-0.18722519278526306,
-0.9785909056663513,
-0.2544304132461548,
0.6772806644439697,
-0.537776529788971,
0.5572277903556824,
... |
func (r RGBColor) MarshalJSON() ([]byte, error) {
return json.Marshal(string(r))
} | [
0.077371746301651,
-0.5910006165504456,
0.16327598690986633,
-0.2319360375404358,
-0.46853435039520264,
0.34966376423835754,
-0.48267048597335815,
-0.8517875075340271,
0.0003872748638968915,
0.13411453366279602,
-1.104148268699646,
0.7538073658943176,
-0.7115958333015442,
1.072954416275024... |
func (r *RGBColor) UnmarshalJSON(data []byte) error {
if string(data) == jsonNull {
return nil
}
var ustr string
if err := json.Unmarshal(data, &ustr); err != nil {
return err
}
*r = RGBColor(ustr)
return nil
} | [
-0.362119197845459,
0.03735754266381264,
0.3601575791835785,
-0.9751433730125427,
-0.5944968461990356,
0.04505227878689766,
-0.06553366035223007,
-0.5034757256507874,
-0.03158687427639961,
-0.16598720848560333,
-0.31310611963272095,
0.3012540340423584,
-0.7651371955871582,
0.68356490135192... |
func (r *RGBColor) DeepCopyInto(out *RGBColor) {
*out = *r
} | [
0.7813631892204285,
-0.07334768772125244,
0.34575241804122925,
0.017371421679854393,
-0.7630578875541687,
0.9023439288139343,
0.03537106513977051,
-0.273670494556427,
-1.6226246356964111,
-0.6554082632064819,
-0.9056788682937622,
0.9922230839729309,
-0.10092555731534958,
0.0669511482119560... |
func (r *RGBColor) DeepCopy() *RGBColor {
if r == nil {
return nil
}
out := new(RGBColor)
r.DeepCopyInto(out)
return out
} | [
0.0046429382637143135,
0.15407885611057281,
0.10279705375432968,
1.0602188110351562,
-0.4058496952056885,
0.8438560962677002,
-0.22630125284194946,
-1.3334399461746216,
-0.6390306353569031,
-0.5212993621826172,
-0.551535964012146,
0.5603185296058655,
-0.8613936901092529,
0.0934211313724517... |
func (r Password) MarshalText() ([]byte, error) {
return []byte(string(r)), nil
} | [
0.07419908046722412,
-0.06681607663631439,
0.2819606065750122,
0.16679111123085022,
-0.7309053540229797,
0.24297338724136353,
-1.2404780387878418,
-0.01669720560312271,
1.5530065298080444,
0.8882791996002197,
-0.6796833276748657,
0.42183053493499756,
-0.8802685737609863,
-0.080435775220394... |
func (r *Password) UnmarshalText(data []byte) error { // validation is performed later on
*r = Password(string(data))
return nil
} | [
0.6953603625297546,
-0.16186943650245667,
0.30855756998062134,
-0.48290976881980896,
-0.7250941395759583,
0.24713587760925293,
-0.11661283671855927,
0.8202745318412781,
0.8458468914031982,
0.36583277583122253,
-0.5896587371826172,
-0.6650456786155701,
-1.1143916845321655,
-0.06812912970781... |
func (r *Password) Scan(raw interface{}) error {
switch v := raw.(type) {
case []byte:
*r = Password(string(v))
case string:
*r = Password(v)
default:
return fmt.Errorf("cannot sql.Scan() strfmt.Password from: %#v", v)
}
return nil
} | [
-0.698403537273407,
0.0586666613817215,
0.494201123714447,
0.7553966641426086,
-0.8784977793693542,
0.007704311981797218,
-0.4161436855792999,
-0.39821118116378784,
0.17428192496299744,
-0.5443756580352783,
-0.3775179982185364,
0.6317309141159058,
-0.23621155321598053,
0.302297443151474,
... |
func (r Password) MarshalJSON() ([]byte, error) {
return json.Marshal(string(r))
} | [
-0.333737850189209,
-0.9173961281776428,
0.31330132484436035,
0.32661327719688416,
-0.8616394996643066,
-0.06510211527347565,
-0.12847091257572174,
0.4100010097026825,
1.3130590915679932,
0.4109909236431122,
-1.3108501434326172,
0.9423602819442749,
-0.3532072901725769,
0.4070264995098114,
... |
func (r *Password) UnmarshalJSON(data []byte) error {
if string(data) == jsonNull {
return nil
}
var ustr string
if err := json.Unmarshal(data, &ustr); err != nil {
return err
}
*r = Password(ustr)
return nil
} | [
-0.5584884285926819,
-0.13227596879005432,
0.4207988977432251,
-0.553229570388794,
-0.7123103737831116,
-0.2256629914045334,
0.07783476263284683,
0.41875550150871277,
1.0082670450210571,
0.27236658334732056,
-0.532881498336792,
0.0626053512096405,
-0.6495525240898132,
0.23653091490268707,
... |
func (r *Password) DeepCopyInto(out *Password) {
*out = *r
} | [
0.6290721297264099,
-0.5797752141952515,
0.43595728278160095,
0.44157564640045166,
-0.7961746454238892,
0.6003907322883606,
-0.06883520632982254,
0.6897282600402832,
-0.6554460525512695,
-0.17128002643585205,
-0.962618350982666,
0.9684842824935913,
-0.007050271145999432,
-0.155034825205802... |
func (r *Password) DeepCopy() *Password {
if r == nil {
return nil
}
out := new(Password)
r.DeepCopyInto(out)
return out
} | [
-0.2280108481645584,
-0.6057522296905518,
0.18074671924114227,
1.8152575492858887,
0.015105203725397587,
0.17950381338596344,
0.5900079011917114,
-0.20848065614700317,
0.7595041394233704,
-0.44045916199684143,
-0.4247208833694458,
0.26868289709091187,
-0.692760169506073,
-0.316922396421432... |
func NewIdentityVerificationStepStatusFromValue(v string) (*IdentityVerificationStepStatus, error) {
ev := IdentityVerificationStepStatus(v)
return &ev, nil
} | [
0.24865548312664032,
-0.45373111963272095,
-0.18761050701141357,
0.925364077091217,
-0.4983760118484497,
0.5075091123580933,
0.36780402064323425,
0.17830248177051544,
0.1611202359199524,
0.10630462318658829,
-1.2444212436676025,
-0.6062783598899841,
-0.19507193565368652,
1.0779978036880493... |
func (v IdentityVerificationStepStatus) IsValid() bool {
for _, existing := range allowedIdentityVerificationStepStatusEnumValues {
if existing == v {
return true
}
}
return false
} | [
0.003995559643954039,
-0.08359188586473465,
0.20743465423583984,
1.1655333042144775,
0.5106022357940674,
1.071992039680481,
0.10770164430141449,
0.3279004395008087,
-0.10303649306297302,
-0.3846614360809326,
-0.38242000341415405,
-0.032368049025535583,
-0.028135718777775764,
0.691806077957... |
func (v IdentityVerificationStepStatus) Ptr() *IdentityVerificationStepStatus {
return &v
} | [
1.094463586807251,
0.13285870850086212,
-0.28582632541656494,
0.6926538944244385,
-0.4672720730304718,
0.9318717122077942,
-0.5117953419685364,
-0.6729075908660889,
-0.027291055768728256,
0.015110678039491177,
0.47923535108566284,
-0.16060306131839752,
-0.1649882197380066,
1.15616595745086... |
func (o *CreateAutoscalingV2beta2NamespacedHorizontalPodAutoscalerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewCreateAutoscalingV2beta2NamespacedHorizontalPodAutoscalerOK()
if err := result.readResponse(resp... | [
-0.4419003427028656,
-1.129873514175415,
0.6644545197486877,
0.07367599010467529,
0.14496657252311707,
-0.6377609968185425,
-0.10412146151065826,
-0.4289719760417938,
-0.2107510268688202,
0.23488935828208923,
-0.14012229442596436,
-0.0519912987947464,
-0.8235811591148376,
-0.00073918711859... |
func NewCreateAutoscalingV2beta2NamespacedHorizontalPodAutoscalerOK() *CreateAutoscalingV2beta2NamespacedHorizontalPodAutoscalerOK {
return &CreateAutoscalingV2beta2NamespacedHorizontalPodAutoscalerOK{}
} | [
-0.5715506076812744,
-0.5653367638587952,
0.5592461228370667,
0.3743290603160858,
0.15877383947372437,
0.32544028759002686,
0.3383800685405731,
0.2873898446559906,
-1.4077332019805908,
-0.22513233125209808,
-1.1916453838348389,
0.8020169138908386,
0.5790278315544128,
0.6733599305152893,
... |
func NewCreateAutoscalingV2beta2NamespacedHorizontalPodAutoscalerCreated() *CreateAutoscalingV2beta2NamespacedHorizontalPodAutoscalerCreated {
return &CreateAutoscalingV2beta2NamespacedHorizontalPodAutoscalerCreated{}
} | [
-0.21840180456638336,
-0.9342997074127197,
0.492463082075119,
0.00880490243434906,
0.3728138506412506,
0.3243546783924103,
0.04168281331658363,
-0.22163157165050507,
-1.23725163936615,
-0.4897245764732361,
-1.241218090057373,
0.666157603263855,
0.7479468584060669,
0.7964406609535217,
0.4... |
func NewCreateAutoscalingV2beta2NamespacedHorizontalPodAutoscalerAccepted() *CreateAutoscalingV2beta2NamespacedHorizontalPodAutoscalerAccepted {
return &CreateAutoscalingV2beta2NamespacedHorizontalPodAutoscalerAccepted{}
} | [
-0.14452838897705078,
-0.8732975721359253,
0.5377766489982605,
-0.25496765971183777,
-0.7898708581924438,
0.5006524324417114,
0.29169198870658875,
0.2809707820415497,
-1.3971432447433472,
-0.011042606085538864,
-0.9692198038101196,
1.2768237590789795,
0.5292244553565979,
0.694678008556366,... |
func NewCreateAutoscalingV2beta2NamespacedHorizontalPodAutoscalerUnauthorized() *CreateAutoscalingV2beta2NamespacedHorizontalPodAutoscalerUnauthorized {
return &CreateAutoscalingV2beta2NamespacedHorizontalPodAutoscalerUnauthorized{}
} | [
-0.7262851595878601,
-0.853411078453064,
0.6020215153694153,
0.3445238769054413,
-0.17322716116905212,
0.24950942397117615,
0.21820805966854095,
0.66093909740448,
-0.9148997068405151,
-0.3984612226486206,
-1.1218117475509644,
1.1901297569274902,
0.5547281503677368,
0.49211248755455017,
0... |
func CustomersSinceId(shopId bson.ObjectId, since_id bson.ObjectId, page, limit int, created_at_min, created_at_max, updated_at_min, updated_at_max *time.Time) ([]Customer, error) {
custs := []Customer{}
sess, err := mgo.DialWithInfo(database.MongoConnectionString())
if err != nil {
return custs, err
}
defer ses... | [
-0.4937247037887573,
-0.23389878869056702,
0.7470358610153198,
-0.08783826977014542,
-0.4817514717578888,
-0.32386693358421326,
-0.502426266670227,
-0.14568142592906952,
-0.12023399770259857,
0.6480638980865479,
0.25275909900665283,
0.7955421805381775,
0.2712884843349457,
0.597271323204040... |
func (c *Customer) GetByEmail() error {
sess, err := mgo.DialWithInfo(database.MongoConnectionString())
if err != nil {
return err
}
defer sess.Close()
col := sess.DB("CurtCart").C("customer")
qs := bson.M{
"email": c.Email,
"shop_id": c.ShopId,
"$or": []bson.M{
bson.M{"customer.addresses.deleted":... | [
0.19543790817260742,
0.14715898036956787,
0.7666042447090149,
0.21162386238574982,
0.5589087605476379,
-0.58460533618927,
0.4952276945114136,
0.3854280412197113,
-0.37510859966278076,
0.6549522280693054,
-0.1889132410287857,
0.8329413533210754,
-0.24308215081691742,
-0.36227893829345703,
... |
func (c *Customer) Update() error {
if c.Id.Hex() == "" {
c.Password = ""
return fmt.Errorf("error: %s", "cannot update a customer that doesn't exist")
}
if c.FirstName == "" {
c.Password = ""
return fmt.Errorf("error: %s", "invalid first anem")
}
if c.LastName == "" {
c.Password = ""
return fmt.Errorf... | [
-0.19912776350975037,
-1.0694180727005005,
0.7066076397895813,
0.33028876781463623,
-0.8433454036712646,
-0.09156712889671326,
-0.28810063004493713,
0.19848881661891937,
-0.05609733983874321,
0.594398021697998,
-0.18022342026233673,
0.06186594441533089,
-0.2806437015533447,
0.2691501379013... |
func (c *Customer) Delete() error {
if c.Id.Hex() == "" {
return fmt.Errorf("error: %s", "invalid customer reference")
}
sess, err := mgo.DialWithInfo(database.MongoConnectionString())
if err != nil {
return err
}
defer sess.Close()
if err := c.Get(); err != nil {
return err
}
if c.Orders != nil && le... | [
0.7170073390007019,
-0.09635928273200989,
0.7768548727035522,
0.40718621015548706,
-0.0467255674302578,
-0.22906234860420227,
-0.0596860870718956,
-0.15675947070121765,
-0.12357115745544434,
0.5287352800369263,
0.6601879596710205,
-0.3420323133468628,
-1.0172677040100098,
0.447305917739868... |
func (sfs *SoundFileInfoService) PerformSoundFileConversions(sourcePath string) (error, string, string) {
fileBaseName := filepath.Base(sourcePath)
fileName := strings.TrimSuffix(fileBaseName, filepath.Ext(fileBaseName))
// create new destination path
destinationPath := "/tmp/"
wavDestinationPath := destinationP... | [
-0.37103575468063354,
-0.3681742548942566,
1.1003412008285522,
0.36070334911346436,
0.633109450340271,
0.015126149170100689,
0.993840754032135,
-0.07670880109071732,
0.051754143089056015,
-0.16420617699623108,
0.23930521309375763,
0.2488916665315628,
0.14788858592510223,
0.8114637732505798... |
func (sfs *SoundFileInfoService) IsValidSoundFileFormat(fileName string) bool {
isValidFileFormat := false
fname := strings.ToLower(fileName)
if strings.HasSuffix(fname, ".mp3") || strings.HasSuffix(fname, ".wav") {
isValidFileFormat = true
}
return isValidFileFormat
} | [
-0.06078696623444557,
-1.0101642608642578,
0.8988518714904785,
0.044571977108716965,
-0.45192524790763855,
0.787831723690033,
-0.22820961475372314,
-0.7641445398330688,
0.3477030098438263,
-0.8308566808700562,
0.32670485973358154,
-0.07512499392032623,
-1.313545823097229,
0.735964536666870... |
func (sfs *SoundFileInfoService) soundFileDatasource() *datasource.SoundFileInfoDataSource {
return &datasource.SoundFileInfoDataSource{DataSource: datasource.DataSource{Session: sfs.Session.Copy()}}
} | [
0.5379271507263184,
-0.058715008199214935,
0.28526049852371216,
-1.630935549736023,
-0.18199443817138672,
-0.18228688836097717,
-0.5041658878326416,
0.01405376847833395,
0.41831159591674805,
-1.2874079942703247,
-0.575832188129425,
0.6244977116584778,
-0.2355768084526062,
-0.47654330730438... |
func exportHandler() (int, error) {
listener, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
return 0, err
}
t := strings.Split(listener.Addr().String(), ":")
port, err := strconv.ParseInt(t[1], 10, 64)
if err != nil {
return 0, err
}
log.Notice("Export variable HTTP server: %s\n", listener.Addr... | [
0.83380126953125,
-0.11895537376403809,
0.9518935680389404,
-0.21699081361293793,
-0.4464089572429657,
-0.11563505232334137,
0.5377806425094604,
0.2997245192527771,
-0.056216273456811905,
0.536513090133667,
-0.21482786536216736,
0.17854197323322296,
-1.0744194984436035,
0.4910598695278168,... |
func Buckets(m *testing.M) {
var bucketIndex int
var bucketCount int
var directoriesToExclude []string
var packagesToExclude []string
if v := os.Getenv("BUCKET"); v != "" {
//nolint: gomnd // use 64 bits for parsing
n, err := strconv.ParseInt(v, 0, 64)
if err != nil {
panic(fmt.Sprintf("unable to parse ... | [
0.11448600143194199,
0.5055475234985352,
0.7466450333595276,
-0.9445022940635681,
-0.4839242398738861,
0.3291831910610199,
1.3436689376831055,
-0.33049556612968445,
0.04616936296224594,
-0.10313070565462112,
0.2975746989250183,
0.0918433740735054,
-0.028622766956686974,
-0.2636187374591827... |
func randomState() string {
b := make([]byte, 32)
rand.Read(b)
return base64.RawURLEncoding.EncodeToString(b)
} | [
0.2828702926635742,
0.17465931177139282,
0.1983165740966797,
-0.7579602003097534,
-0.8693991303443909,
0.6127185821533203,
-1.1770377159118652,
-0.14455045759677887,
1.3828624486923218,
-0.35544928908348083,
0.19632115960121155,
-0.15439900755882263,
-0.872845470905304,
-0.6287471652030945... |
func Run(wg *sync.WaitGroup, ctl chan bool) {
broker.ctl = ctl
broker.wg = wg
broker.listen()
} | [
0.7705211043357849,
-0.7585693001747131,
0.32418227195739746,
-0.09552969038486481,
-0.1922982782125473,
0.607007622718811,
0.39690491557121277,
0.8035252094268799,
-0.27790623903274536,
0.42263495922088623,
-1.0185974836349487,
0.24906349182128906,
-1.0295504331588745,
0.4460675120353699,... |
func NewConnection(topic ...int) (*Connection, error) {
readChannel, err := broker.subscribe(topic...)
if err != nil {
return nil, err
}
return &Connection{
read: readChannel,
write: broker.listener,
}, nil
} | [
0.15211208164691925,
-0.4955524802207947,
0.39982935786247253,
0.8277227878570557,
-0.004788875579833984,
-0.1671150028705597,
0.21621015667915344,
-0.7823837399482727,
-0.42132726311683655,
0.31717362999916077,
0.5049882531166077,
-1.3711895942687988,
-0.9586321711540222,
0.28665247559547... |
func NewMultiSet() MultiSet {
return make(MultiSet)
} | [
0.37780484557151794,
-0.7628142237663269,
0.020002147182822227,
0.5661214590072632,
-1.923329472541809,
-1.3262144327163696,
-0.39746153354644775,
-0.38688328862190247,
0.4176483750343323,
-0.7266274690628052,
-0.654369056224823,
0.1341983675956726,
-0.06960654258728027,
0.0520567968487739... |
func (m MultiSet) Insert(val string){
var err error
index := rand.Intn(99999)
for m[strconv.Itoa(index)] != 0 {
index = rand.Intn(99999)
}
if m[strconv.Itoa(index)], err = strconv.Atoi(val); err != nil {
fmt.Println(err)
}
} | [
-0.9441954493522644,
0.32849565148353577,
0.6720940470695496,
-0.802568256855011,
-0.8075173497200012,
-0.07294157892465591,
0.3800986409187317,
0.29418691992759705,
0.13524208962917328,
0.007990621030330658,
-0.2732391655445099,
-0.3757416307926178,
-0.8806893229484558,
0.3963923752307892... |
func (m MultiSet) Erase(val string) {
// if no such element, delete is a no-op
int_val, _ := strconv.Atoi(val)
for key, m_val := range m {
if m_val == int_val {
delete(m, key)
return
}
}
} | [
-0.43732401728630066,
0.1612759828567505,
0.5857042074203491,
-0.2685224413871765,
-1.2427177429199219,
-0.2663278579711914,
0.21517926454544067,
-0.2561168074607849,
0.04380461946129799,
0.7562840580940247,
0.4193163216114044,
-0.01123767625540495,
-0.5131510496139526,
0.39600855112075806... |
func (m MultiSet) Count (val string) int {
count := 0
for _, num := range m {
int_val, _ := strconv.Atoi(val)
if num == int_val {
count++
}
}
return count
} | [
0.13700756430625916,
-0.5554478764533997,
0.6649841666221619,
0.2988901138305664,
-1.6282391548156738,
-0.7512674331665039,
0.03838679566979408,
-0.258588969707489,
-0.534925103187561,
0.387708455324173,
-0.0328947938978672,
-0.4473436176776886,
0.04200214892625809,
1.0753151178359985,
0... |
func TrinityMainLoop(svr *network.TLSServer, logger *util.Logger) {
// Notify SIGINT, SIGTERM
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt)
signal.Notify(c, syscall.SIGTERM)
signal.Notify(c, syscall.SIGINFO) // syscall.SIGINFO doesn't exist in linux go.
logger.Info("Main", "MacOSX - Use (Ctrl-T) fo... | [
-0.09297189116477966,
-0.9801580309867859,
0.7744315266609192,
-0.3342945873737335,
-0.2095075100660324,
0.44398951530456543,
-0.623497486114502,
0.20260202884674072,
-0.4024318754673004,
0.7863346934318542,
0.09720438718795776,
-0.3219100832939148,
-0.6060869693756104,
0.4941893219947815,... |
func configureSingletonFlush(flushMode string, deltaStore string, periodical string, serviceID string, serviceToken string) error {
configData := []byte(fmt.Sprintf(`{ "SingletonFlushMode": "%s" ,
"SingletonPeriodicFlush": "%s",
"SingletonCapacity": "%s",
"ServiceID": "%s",
"S... | [
0.19794748723506927,
0.23681674897670746,
0.7033233642578125,
-0.6818348169326782,
-0.22597473859786987,
0.3714700937271118,
-0.2013106495141983,
0.806226909160614,
0.6067932844161987,
-0.7728257775306702,
-0.5472322702407837,
0.7285177707672119,
-0.01368901040405035,
0.8429173231124878,
... |
func getApisonatorUsage(serviceID string, serviceToken string, appID string) (UsageReport, error) {
client := &http.Client{}
req, reqErr := http.NewRequest("GET", "http://127.0.0.1:3000/transactions/authorize.xml", nil)
if reqErr != nil {
fmt.Printf("reqErr: %v\n", reqErr)
return UsageReport{}, reqErr
}
q := r... | [
0.5220787525177002,
0.6565557718276978,
0.8214714527130127,
-0.6406283974647522,
-0.042844995856285095,
-0.6656513214111328,
-0.2873537540435791,
-0.7131445407867432,
-0.75156569480896,
0.40929532051086426,
1.6500228643417358,
0.1869102120399475,
-0.714655876159668,
-0.3384237289428711,
... |
func (suite *SingletonFlushTestSuite) AfterTest(suiteName, testName string) {
downErr := StopProxy()
require.Nilf(suite.T(), downErr, "Error stopping proxy: %v", downErr)
fmt.Println("Cleaning 3scale backend state")
flushErr := suite.backend.Flush()
if flushErr != nil {
fmt.Printf("Error flushing the backend sta... | [
0.5455726385116577,
-0.0750812515616417,
0.45031145215034485,
-0.5190500020980835,
0.06933530420064926,
0.4820748567581177,
0.9170191884040833,
0.5560265779495239,
0.08013150095939636,
0.24941788613796234,
0.6033933162689209,
0.21258428692817688,
-0.4330703914165497,
-0.3547162711620331,
... |
func (suite *SingletonFlushTestSuite) initializeApisonatorState() {
require.Eventually(suite.T(), func() bool {
fmt.Printf("Creating service with service_id: %s, service_token:%s", suite.ServiceID, suite.ServiceToken)
serviceErr := suite.backend.Push("service", []interface{}{suite.ServiceID, suite.ServiceToken})
... | [
-0.20644496381282806,
0.851863443851471,
0.6745957732200623,
-0.09602337330579758,
0.1650303453207016,
0.18297910690307617,
0.6638776659965515,
-0.15067030489444733,
0.12110999971628189,
0.3423575460910797,
0.2145899087190628,
-0.1471523493528366,
-0.4466553032398224,
0.48728612065315247,
... |
func (suite *SingletonFlushTestSuite) TestSingletonContainerFlush() {
// Pre-conditions before test
suite.ServiceID = uuid.NewString()
suite.ServiceToken = uuid.NewString()
// Configure the envoy template with ContainerLimit flush.
configErr := configureSingletonFlush("ContainerLimit", "100", "60", suite.ServiceID... | [
-0.046142563223838806,
0.47438594698905945,
0.7584789395332336,
-0.06380803883075714,
0.4208623170852661,
-0.17957352101802826,
0.6546023488044739,
-0.028975211083889008,
0.30785465240478516,
-0.15875793993473053,
-0.10519034415483475,
0.9268008470535278,
-0.5858663320541382,
0.11024618148... |
func (suite *SingletonFlushTestSuite) TestSingletonPeriodicalFlush() {
// Pre-conditions before test
suite.ServiceID = uuid.NewString()
suite.ServiceToken = uuid.NewString()
// Configure the envoy template with PeriodicalFlush. Flush period set as 10 seconds to check the apisonator values.
configErr := configureS... | [
0.06955885887145996,
0.3895237445831299,
0.7770786881446838,
-0.07372847199440002,
-0.024170393124222755,
0.1569419801235199,
0.8600356578826904,
0.09213867783546448,
0.2526662051677704,
-0.6108105778694153,
0.25555384159088135,
0.788192629814148,
-1.0344786643981934,
0.25809046626091003,
... |
func InitTimestampsTable(db *sql.DB) {
stmt, _ := db.Prepare(`CREATE TABLE IF NOT EXISTS timestamps (
day text,
hour text,
channel text,
messages integer DEFAULT 0,
reactions integer DEFAULT 0,
embeds integer DEFAULT 0
)`)
stmt.Exec()
} | [
0.7437675595283508,
0.4875749945640564,
0.7021932005882263,
-0.016794685274362564,
0.8688457012176514,
0.19297006726264954,
0.29671671986579895,
-0.4245196282863617,
-0.5647144317626953,
0.3723001480102539,
-0.7525397539138794,
-1.0065644979476929,
-0.41536229848861694,
0.7396972179412842,... |
func Open(name string) (*Cdb, error) {
f, err := os.Open(name)
if err != nil {
return nil, err
}
c := New(f)
c.closer = f
runtime.SetFinalizer(c, (*Cdb).Close)
return c, nil
} | [
-0.5672497153282166,
-0.003387967823073268,
0.47149163484573364,
0.17569710314273834,
-1.6802246570587158,
0.9237037301063538,
0.9091102480888367,
-0.01254718005657196,
-0.47060927748680115,
-0.6496585607528687,
-0.5368772745132446,
-0.46066656708717346,
-1.030379056930542,
0.1592888534069... |
func (c *Cdb) Close() (err error) {
if c.closer != nil {
err = c.closer.Close()
c.closer = nil
runtime.SetFinalizer(c, nil)
}
return err
} | [
-0.1848187893629074,
0.14522700011730194,
0.611923098564148,
0.20942166447639465,
-0.4797864258289337,
0.8125333786010742,
1.0641419887542725,
-0.4346608519554138,
-0.4353712499141693,
-1.2313191890716553,
-0.19169214367866516,
-0.6401579976081848,
-1.7805145978927612,
1.840671420097351,
... |
func New(r io.ReaderAt) *Cdb {
return &Cdb{r: r}
} | [
-0.19510510563850403,
-0.9756802320480347,
0.07594721019268036,
-0.221411794424057,
-1.4227408170700073,
0.5770173072814941,
-0.06506222486495972,
-1.072249412536621,
-0.35027211904525757,
-0.27798932790756226,
-0.503591001033783,
-0.45752689242362976,
0.5132907629013062,
0.727712988853454... |
func (c *Cdb) Exists(key []byte) (bool, error) {
err := c.Iterate(key).next()
if err == io.EOF {
return false, nil
}
if err != nil {
return false, err
}
return true, nil
} | [
-1.0019479990005493,
0.16788338124752045,
0.8493029475212097,
-0.4436061382293701,
0.11561764776706696,
0.4297628104686737,
-0.6599240303039551,
-0.06759554892778397,
-0.47347185015678406,
0.3560117483139038,
-0.4113386273384094,
-0.4985707998275757,
-0.6960245966911316,
1.039942741394043,... |
func (c *Cdb) Bytes(key []byte) ([]byte, error) {
return c.Iterate(key).NextBytes()
} | [
-0.8949605226516724,
0.6232081055641174,
0.2649219036102295,
0.005038540810346603,
-0.38813838362693787,
0.24870122969150543,
-0.7913925051689148,
-0.7001857757568359,
0.10163864493370056,
0.19514676928520203,
-0.25757119059562683,
0.4607633948326111,
-0.6785810589790344,
0.971182584762573... |
func (c *Cdb) Reader(key []byte) (*io.SectionReader, error) {
return c.Iterate(key).NextReader()
} | [
-0.7161647081375122,
-0.4994945228099823,
0.19829730689525604,
-0.3428569436073303,
-1.1648911237716675,
0.6868717670440674,
0.4722244143486023,
-0.8504165410995483,
-0.33240294456481934,
0.163074791431427,
0.6655776500701904,
-0.4507863521575928,
-0.24537009000778198,
0.7875250577926636,
... |
func (c *Cdb) Iterate(key []byte) *CdbIterator {
iter := new(CdbIterator)
iter.db = c
iter.key = key
// Calculate the hash of the key.
iter.khash = checksum(key)
// Read in the position and size of the hash table for this key.
iter.hpos, iter.hslots, iter.initErr = readNums(iter.db.r, iter.buf[:], iter.khash%256... | [
0.14102062582969666,
0.34631025791168213,
0.47362783551216125,
0.22768130898475647,
-0.5922508239746094,
-0.1635114848613739,
0.301207035779953,
-0.017517687752842903,
-0.659961462020874,
0.24295540153980255,
0.6957083344459534,
-0.6799526810646057,
-0.37072455883026123,
0.8544570803642273... |
func (iter *CdbIterator) NextBytes() ([]byte, error) {
if err := iter.next(); err != nil {
return nil, err
}
data := make([]byte, iter.dlen)
if _, err := iter.db.r.ReadAt(data, int64(iter.dpos)); err != nil {
if err == io.EOF {
err = io.ErrUnexpectedEOF
}
return nil, err
}
return data, nil
} | [
-0.14512278139591217,
1.0088272094726562,
0.17583899199962616,
-0.17351455986499786,
-0.5306068658828735,
-0.11881143599748611,
-0.7297698259353638,
-0.5831224322319031,
-0.2454683929681778,
0.23229588568210602,
0.26719406247138977,
-0.003914196975529194,
-0.7939032912254333,
0.84557127952... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.