text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func NewGetUserIssueSearchOptionsOfProjectVersionParamsWithTimeout(timeout time.Duration) *GetUserIssueSearchOptionsOfProjectVersionParams {
var ()
return &GetUserIssueSearchOptionsOfProjectVersionParams{
timeout: timeout,
}
} | [
0.5218643546104431,
-0.033531371504068375,
0.2111622840166092,
0.8610225319862366,
-0.22062340378761292,
1.1477187871932983,
-0.6276148557662964,
-0.04143664613366127,
-0.7100762128829956,
0.7891411185264587,
0.19797207415103912,
0.06558240205049515,
-0.02550039254128933,
-0.06956184655427... |
func NewGetUserIssueSearchOptionsOfProjectVersionParamsWithContext(ctx context.Context) *GetUserIssueSearchOptionsOfProjectVersionParams {
var ()
return &GetUserIssueSearchOptionsOfProjectVersionParams{
Context: ctx,
}
} | [
-0.19019939005374908,
0.2845391631126404,
0.5603438019752502,
0.5795016884803772,
0.17338286340236664,
1.1419974565505981,
-0.35047465562820435,
-0.5145115256309509,
-0.2130095511674881,
0.3314652144908905,
-0.09796267747879028,
-0.3088108003139496,
-0.06511534005403519,
-0.748909890651702... |
func NewGetUserIssueSearchOptionsOfProjectVersionParamsWithHTTPClient(client *http.Client) *GetUserIssueSearchOptionsOfProjectVersionParams {
var ()
return &GetUserIssueSearchOptionsOfProjectVersionParams{
HTTPClient: client,
}
} | [
0.002870981814339757,
-0.14152084290981293,
0.25806495547294617,
0.7537388205528259,
0.40655946731567383,
0.9719545245170593,
-0.0009148937533609569,
0.14117483794689178,
-1.083818793296814,
-0.048977673053741455,
-0.04748976603150368,
-0.4502843916416168,
0.09851443767547607,
-0.485414892... |
func (o *GetUserIssueSearchOptionsOfProjectVersionParams) WithTimeout(timeout time.Duration) *GetUserIssueSearchOptionsOfProjectVersionParams {
o.SetTimeout(timeout)
return o
} | [
0.3233243227005005,
0.10430523753166199,
0.1885831505060196,
0.4099545180797577,
-0.37630781531333923,
0.5129399299621582,
0.05848198011517525,
-0.31525206565856934,
0.07561478018760681,
0.5713789463043213,
0.2839866280555725,
-0.0035030965227633715,
0.5014708042144775,
-0.100637286901474,... |
func (o *GetUserIssueSearchOptionsOfProjectVersionParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
0.35800132155418396,
0.5704502463340759,
0.0671621710062027,
0.42893844842910767,
0.22495196759700775,
1.0836492776870728,
0.38308054208755493,
0.16272200644016266,
-0.4734395444393158,
0.6245678663253784,
0.23443785309791565,
0.2721826434135437,
0.03224333003163338,
-0.24064387381076813,
... |
func (o *GetUserIssueSearchOptionsOfProjectVersionParams) WithContext(ctx context.Context) *GetUserIssueSearchOptionsOfProjectVersionParams {
o.SetContext(ctx)
return o
} | [
-0.3694955110549927,
0.06017270311713219,
0.39215531945228577,
0.2865113914012909,
-0.35814642906188965,
0.6644533276557922,
-0.09319577366113663,
-0.7985744476318359,
0.43197283148765564,
0.021928424015641212,
0.1669764220714569,
-0.19343078136444092,
-0.1407516449689865,
-0.8680551648139... |
func (o *GetUserIssueSearchOptionsOfProjectVersionParams) SetContext(ctx context.Context) {
o.Context = ctx
} | [
-0.07823372632265091,
0.5815383791923523,
0.17466959357261658,
0.47393763065338135,
0.3013882040977478,
1.1068683862686157,
0.33560165762901306,
-0.5741385221481323,
0.2652294337749481,
0.06273612380027771,
-0.14088909327983856,
0.15834414958953857,
-0.30131399631500244,
-0.685567677021026... |
func (o *GetUserIssueSearchOptionsOfProjectVersionParams) WithHTTPClient(client *http.Client) *GetUserIssueSearchOptionsOfProjectVersionParams {
o.SetHTTPClient(client)
return o
} | [
-0.1497112512588501,
-0.6945161819458008,
0.2482387125492096,
0.06699496507644653,
-0.22740399837493896,
0.45901069045066833,
0.27974584698677063,
-0.5256473422050476,
-0.3235680162906647,
-0.377945214509964,
0.036125510931015015,
-0.20419622957706451,
0.424475759267807,
-0.963950693607330... |
func (o *GetUserIssueSearchOptionsOfProjectVersionParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
0.305935263633728,
-0.08883263915777206,
0.07155309617519379,
-0.3651222884654999,
-0.08716291934251785,
0.4168262183666229,
0.6681566834449768,
-0.5503175854682922,
-0.9527347683906555,
-0.09832886606454849,
-0.22553101181983948,
0.3024335503578186,
0.08447711914777756,
-0.986243426799774... |
func (o *GetUserIssueSearchOptionsOfProjectVersionParams) WithFields(fields *string) *GetUserIssueSearchOptionsOfProjectVersionParams {
o.SetFields(fields)
return o
} | [
-0.06912095099687576,
0.6121847033500671,
0.07613407075405121,
-0.2567950189113617,
-0.005072260741144419,
0.6588448882102966,
0.2570968270301819,
-0.7162762880325317,
-0.2222132384777069,
-0.2862827181816101,
0.15167562663555145,
-1.109951376914978,
-0.32760196924209595,
-0.77062845230102... |
func (o *GetUserIssueSearchOptionsOfProjectVersionParams) SetFields(fields *string) {
o.Fields = fields
} | [
-0.09555377811193466,
0.7385343909263611,
0.00023731151304673404,
-0.14059829711914062,
0.4882957935333252,
0.9315025210380554,
0.44970428943634033,
-0.38513806462287903,
-0.42480677366256714,
-0.09990755468606949,
-0.2893155515193939,
-0.6468353271484375,
-0.5244203209877014,
-0.470597058... |
func (o *GetUserIssueSearchOptionsOfProjectVersionParams) WithParentID(parentID int64) *GetUserIssueSearchOptionsOfProjectVersionParams {
o.SetParentID(parentID)
return o
} | [
0.9941402673721313,
-0.6975182890892029,
0.19761234521865845,
0.5032979249954224,
-0.25438615679740906,
0.9953930377960205,
0.24411740899085999,
-0.9497762322425842,
0.22962798178195953,
0.5320810675621033,
0.7493040561676025,
-0.5113730430603027,
-0.10502183437347412,
-0.13100722432136536... |
func (o *GetUserIssueSearchOptionsOfProjectVersionParams) SetParentID(parentID int64) {
o.ParentID = parentID
} | [
0.7951494455337524,
-0.1853667050600052,
0.10507415980100632,
0.49660223722457886,
0.1838071495294571,
1.2259280681610107,
0.7788000702857971,
-0.6761012077331543,
-0.08869105577468872,
0.43936794996261597,
0.716108500957489,
-0.08407571911811829,
-0.7947694659233093,
-0.051791124045848846... |
func (o *GetUserIssueSearchOptionsOfProjectVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Fields != nil {
// query param fields
var qrFields string
if o.Fields != nil {
qrFields = *o.... | [
-0.8717232346534729,
-0.0546027235686779,
0.7174108028411865,
-0.6538090109825134,
0.9675583243370056,
0.12613458931446075,
1.0199092626571655,
-0.2461974024772644,
-0.5116941332817078,
0.37986990809440613,
0.32892194390296936,
0.10128499567508698,
-0.2023911029100418,
-0.17947058379650116... |
func (pipesHandle) List(c *app.Context) error {
c.Respond(nil, http.StatusOK)
return nil
} | [
0.24286268651485443,
-1.2809022665023804,
0.3961600363254547,
-0.5076719522476196,
1.3939129114151,
0.18833132088184357,
-0.06348114460706711,
0.5384158492088318,
-0.13156375288963318,
-0.09317139536142349,
-0.1814066618680954,
0.08504274487495422,
-0.3277682065963745,
-0.17489436268806458... |
func Constructor(k int) MyCircularDeque {
return MyCircularDeque{
front: 0,
rear: 0,
capacity: k + 1,
data: make([]int, k+1, k+1),
}
} | [
-0.4731273055076599,
-0.6808068752288818,
0.29777008295059204,
-0.8727989792823792,
-0.7546460628509521,
-0.5577126741409302,
0.3088339865207672,
0.7787827253341675,
-0.09126069396734238,
-0.456410676240921,
-1.1485238075256348,
-0.04899429529905319,
-0.07719305902719498,
0.425354301929473... |
func (this *MyCircularDeque) InsertFront(value int) bool {
if this.IsFull() {
return false
}
this.mutex.Lock()
defer this.mutex.Unlock()
this.front = (this.front - 1 + this.capacity) % this.capacity
this.data[this.front] = value
return true
} | [
-1.1591229438781738,
0.9135888814926147,
0.6806005239486694,
-1.6851096153259277,
-0.30032530426979065,
0.10522463172674179,
0.6797522902488708,
-0.25397393107414246,
0.05665747821331024,
-0.695284366607666,
-1.3859593868255615,
-0.4587746560573578,
-1.2203346490859985,
0.49022310972213745... |
func (this *MyCircularDeque) InsertLast(value int) bool {
if this.IsFull() {
return false
}
this.mutex.Lock()
defer this.mutex.Unlock()
this.data[this.rear] = value
this.rear = (this.rear + 1) % this.capacity
return true
} | [
-1.0464979410171509,
0.8579034805297852,
0.9897459149360657,
-1.7981137037277222,
0.04344210401177406,
0.02055174857378006,
0.39784717559814453,
-0.09939990937709808,
0.09692056477069855,
0.1487663984298706,
-1.4236520528793335,
-1.5375754833221436,
-2.002910852432251,
-0.3224888741970062,... |
func (this *MyCircularDeque) DeleteFront() bool {
if this.IsEmpty() {
return false
}
this.front = (this.front + 1) % this.capacity
return true
} | [
-0.6378798484802246,
-0.01398053951561451,
0.7057675719261169,
-0.6208981275558472,
0.011529495008289814,
-0.3037869930267334,
0.291576087474823,
-0.05541449040174484,
0.5483198761940002,
-0.768718957901001,
-1.119330644607544,
0.2422783076763153,
-0.8245078921318054,
0.3740750551223755,
... |
func (this *MyCircularDeque) DeleteLast() bool {
if this.IsEmpty() {
return false
}
this.rear = (this.rear - 1 + this.capacity) % this.capacity
return true
} | [
-0.2210598737001419,
-0.01956222951412201,
1.0984880924224854,
-1.0153368711471558,
0.41580379009246826,
-0.6369258165359497,
-0.1296064406633377,
0.13952915370464325,
0.49291300773620605,
0.4246368706226349,
-0.8687920570373535,
-0.7446836233139038,
-1.384826421737671,
-0.4848693609237671... |
func (this *MyCircularDeque) GetFront() int {
if this.IsEmpty() {
return -1
}
this.mutex.RLock()
defer this.mutex.RUnlock()
return this.data[this.front]
} | [
-0.644156277179718,
0.3857966959476471,
0.3279356062412262,
-0.5856293439865112,
-0.04227635636925697,
-0.6803616881370544,
0.19722050428390503,
-0.1609996110200882,
0.16689644753932953,
-1.4148167371749878,
-0.43817970156669617,
1.7739230394363403,
-0.9738855361938477,
0.5446406006813049,... |
func (this *MyCircularDeque) GetRear() int {
if this.IsEmpty() {
return -1
}
this.mutex.RLock()
defer this.mutex.RUnlock()
return this.data[(this.rear-1+this.capacity)%this.capacity]
} | [
-0.6173135638237,
0.10837901383638382,
0.5866402387619019,
-0.2723408043384552,
-0.20844389498233795,
-0.9655712842941284,
0.18584956228733063,
0.2525751292705536,
0.25397297739982605,
-1.035344123840332,
-0.2153487205505371,
0.9483198523521423,
-1.2064892053604126,
-0.29666492342948914,
... |
func (this *MyCircularDeque) IsEmpty() bool {
this.mutex.RLock()
defer this.mutex.RUnlock()
return this.rear == this.front
} | [
-1.5271039009094238,
-0.626528799533844,
0.46418845653533936,
-1.2380563020706177,
0.8803683519363403,
-0.4210158884525299,
-0.10005497187376022,
-0.05451880395412445,
0.28149911761283875,
-0.13470558822155,
-1.067078709602356,
0.7657156586647034,
-1.1003812551498413,
-0.13460177183151245,... |
func (this *MyCircularDeque) IsFull() bool {
this.mutex.RLock()
defer this.mutex.RUnlock()
return (this.rear+1)%this.capacity == this.front
} | [
-0.3904714286327362,
-0.6032695174217224,
0.5647741556167603,
-0.46226346492767334,
-0.20000459253787994,
-0.5920454263687134,
-0.15498049557209015,
0.24233828485012054,
0.7493011355400085,
-0.14006012678146362,
-1.4572970867156982,
0.26375240087509155,
-0.8493921756744385,
0.2548258900642... |
func MakeCallSite(depth int) Sender {
s := MakeStdOutput()
s.SetFormatter(MakeCallSiteFormatter(depth))
return s
} | [
-0.08098115026950836,
0.4791555106639862,
0.36981201171875,
-0.745744526386261,
-1.5949641466140747,
0.08324264734983444,
0.3582893908023834,
-1.0868207216262817,
0.05313790589570999,
-0.9604764580726624,
-0.24394965171813965,
0.02536570280790329,
0.29376763105392456,
0.7115821838378906,
... |
func MakeCallSiteFile(fileName string, depth int) (Sender, error) {
s, err := MakeFile(fileName)
if err != nil {
return nil, err
}
s.SetFormatter(MakeCallSiteFormatter(depth))
return s, nil
} | [
0.19973376393318176,
0.1927117556333542,
0.4071293771266937,
-0.6737116575241089,
-0.5844242572784424,
0.6581534743309021,
0.7035424113273621,
-0.4905877709388733,
-0.27150627970695496,
-0.41945308446884155,
-0.41638800501823425,
0.17502842843532562,
-0.2835378646850586,
0.3503408133983612... |
func Get(pid int) (Statm, error) {
f, err := os.Open(fmt.Sprintf("/proc/%d/statm", pid))
if err != nil {
return Statm{}, err
}
defer f.Close()
s := Statm{}
n, err := fmt.Fscanf(f, "%d %d %d %d 0 %d 0", &s.Size, &s.Resident, &s.Share, &s.Text, &s.Data)
if err != nil {
return Statm{}, err
}
if n != 5 {
ret... | [
-0.4670952260494232,
-0.800425112247467,
0.7544998526573181,
-0.8259359002113342,
0.0885797068476677,
-0.4534912407398224,
-0.34783726930618286,
-0.7758085131645203,
-0.1349548101425171,
-0.658432126045227,
0.3368094861507416,
-0.03463150933384895,
0.038195542991161346,
0.395847350358963,
... |
func NewGetaspecificPbxDeviceFirmwareBinaryParams() *GetaspecificPbxDeviceFirmwareBinaryParams {
var ()
return &GetaspecificPbxDeviceFirmwareBinaryParams{
timeout: cr.DefaultTimeout,
}
} | [
0.01675266958773136,
-0.08362473547458649,
0.3494829535484314,
1.5691300630569458,
-0.216028094291687,
0.025885337963700294,
0.04083481803536415,
-0.624492347240448,
-0.658779501914978,
-0.7629448771476746,
-0.7672199606895447,
-0.017872456461191177,
-0.9433335065841675,
1.1311050653457642... |
func NewGetaspecificPbxDeviceFirmwareBinaryParamsWithTimeout(timeout time.Duration) *GetaspecificPbxDeviceFirmwareBinaryParams {
var ()
return &GetaspecificPbxDeviceFirmwareBinaryParams{
timeout: timeout,
}
} | [
0.37109822034835815,
0.13525427877902985,
0.2979580760002136,
1.46035897731781,
-0.23923656344413757,
0.4073745906352997,
-0.33269721269607544,
-0.24301300942897797,
-0.4516782760620117,
0.09146402031183243,
-0.539413332939148,
0.30178242921829224,
-0.7154286503791809,
1.2315154075622559,
... |
func NewGetaspecificPbxDeviceFirmwareBinaryParamsWithContext(ctx context.Context) *GetaspecificPbxDeviceFirmwareBinaryParams {
var ()
return &GetaspecificPbxDeviceFirmwareBinaryParams{
Context: ctx,
}
} | [
-0.037334613502025604,
0.20166000723838806,
0.5289822816848755,
0.8910899758338928,
-0.10386981815099716,
0.197342187166214,
-0.15294185280799866,
-0.9741919636726379,
-0.1160433292388916,
-0.20943567156791687,
-0.7381407022476196,
-0.06653131544589996,
-0.8143318891525269,
0.8771221637725... |
func NewGetaspecificPbxDeviceFirmwareBinaryParamsWithHTTPClient(client *http.Client) *GetaspecificPbxDeviceFirmwareBinaryParams {
var ()
return &GetaspecificPbxDeviceFirmwareBinaryParams{
HTTPClient: client,
}
} | [
0.20618095993995667,
-0.15539121627807617,
0.5525938868522644,
1.149574875831604,
0.41778600215911865,
0.21759966015815735,
0.41211074590682983,
-0.3589106798171997,
-0.6764182448387146,
-0.7900548577308655,
-0.8025814294815063,
0.10194507986307144,
-0.385514497756958,
0.8667286038398743,
... |
func (o *GetaspecificPbxDeviceFirmwareBinaryParams) WithTimeout(timeout time.Duration) *GetaspecificPbxDeviceFirmwareBinaryParams {
o.SetTimeout(timeout)
return o
} | [
0.30224984884262085,
0.6752485632896423,
0.19744808971881866,
1.0716089010238647,
-0.5966095328330994,
0.21638162434101105,
0.09362895786762238,
-0.4718795120716095,
-0.128182515501976,
-0.2989843785762787,
-0.18338608741760254,
0.15033705532550812,
-0.13329222798347473,
1.2860687971115112... |
func (o *GetaspecificPbxDeviceFirmwareBinaryParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
0.1757490485906601,
0.8391671180725098,
0.10046928375959396,
1.1726088523864746,
-0.15227766335010529,
0.7689257860183716,
0.25780096650123596,
-0.2245393991470337,
-0.4935854375362396,
-0.351274698972702,
-0.259631484746933,
0.5409485697746277,
-0.4276064336299896,
1.4899365901947021,
0... |
func (o *GetaspecificPbxDeviceFirmwareBinaryParams) WithContext(ctx context.Context) *GetaspecificPbxDeviceFirmwareBinaryParams {
o.SetContext(ctx)
return o
} | [
-0.39019933342933655,
0.4905058443546295,
0.44237861037254333,
0.8466895222663879,
-0.7548125386238098,
0.052305664867162704,
-0.04182333126664162,
-1.1320472955703735,
0.2348998337984085,
-0.7988895177841187,
-0.23322181403636932,
-0.013295590877532959,
-0.647609293460846,
0.7880913019180... |
func (o *GetaspecificPbxDeviceFirmwareBinaryParams) SetContext(ctx context.Context) {
o.Context = ctx
} | [
-0.517450749874115,
0.8035120368003845,
0.28497084975242615,
1.1203407049179077,
-0.10897678136825562,
0.4863615036010742,
0.2823789119720459,
-0.9121801257133484,
0.1266227513551712,
-0.7252130508422852,
-0.4501803517341614,
0.46742573380470276,
-0.7993070483207703,
0.9885640144348145,
... |
func (o *GetaspecificPbxDeviceFirmwareBinaryParams) WithHTTPClient(client *http.Client) *GetaspecificPbxDeviceFirmwareBinaryParams {
o.SetHTTPClient(client)
return o
} | [
0.12951160967350006,
-0.36262038350105286,
0.46018630266189575,
0.6160150766372681,
-0.07206122577190399,
0.08706458657979965,
0.7482852339744568,
-0.7173797488212585,
-0.3108843266963959,
-1.0950969457626343,
-0.2642052173614502,
0.10816656053066254,
-0.07393071055412292,
0.49534589052200... |
func (o *GetaspecificPbxDeviceFirmwareBinaryParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
0.4357340633869171,
-0.028977157548069954,
0.27928003668785095,
0.38158008456230164,
-0.4352477192878723,
-0.0600271038711071,
0.9075760841369629,
-0.8232038617134094,
-0.7793786525726318,
-0.9694842100143433,
-0.4207010567188263,
0.6537163257598877,
-0.46776536107063293,
0.474467426538467... |
func (o *GetaspecificPbxDeviceFirmwareBinaryParams) WithID(id string) *GetaspecificPbxDeviceFirmwareBinaryParams {
o.SetID(id)
return o
} | [
-0.025102492421865463,
-0.17505571246147156,
0.2101081907749176,
1.2632300853729248,
-0.45334866642951965,
0.47569385170936584,
0.1641891449689865,
-0.6751083731651306,
0.43146610260009766,
-0.8019336462020874,
-0.26871705055236816,
-0.027370750904083252,
-0.9261772036552429,
1.41889584064... |
func (o *GetaspecificPbxDeviceFirmwareBinaryParams) SetID(id string) {
o.ID = id
} | [
-0.15518906712532043,
-0.02942994423210621,
0.056739453226327896,
1.3305851221084595,
-0.1597481667995453,
0.9074392318725586,
0.24193823337554932,
-0.45088380575180054,
0.029289117082953453,
-0.9508959054946899,
-0.61787348985672,
0.26080039143562317,
-1.2675387859344482,
1.75685334205627... |
func (o *GetaspecificPbxDeviceFirmwareBinaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param id
if err := r.SetPathParam("id", o.ID); err != nil {
return err
}
if len(res) > 0 {
return ... | [
-1.0896306037902832,
0.255739688873291,
0.6611244082450867,
0.2046821117401123,
0.8179070353507996,
-0.35964831709861755,
1.156970500946045,
-0.29217931628227234,
-0.7344895005226135,
-0.28384554386138916,
0.09984506666660309,
0.3919098377227783,
-0.8582885265350342,
0.5397923588752747,
... |
func NewOrdererGroup(mspConfig *msp.MSPConfigHandler) *OrdererGroup {
og := &OrdererGroup{
mspConfig: mspConfig,
}
og.Proposer = NewProposer(og)
return og
} | [
-0.22239510715007782,
0.5389938354492188,
0.1937185674905777,
-0.4017062187194824,
-1.357871174812317,
-0.006126873195171356,
-0.13309301435947418,
0.12748846411705017,
-0.37389713525772095,
0.5482357144355774,
-0.2143988162279129,
0.2775057256221771,
-1.2797043323516846,
1.636384129524231... |
func (og *OrdererGroup) NewGroup(name string) (ValueProposer, error) {
return NewOrganizationGroup(name, og.mspConfig), nil
} | [
-0.40126749873161316,
0.7614040374755859,
0.269153892993927,
0.5852357745170593,
-1.0663254261016846,
-0.4391341507434845,
0.5893920063972473,
-1.042366862297058,
-0.0309218168258667,
0.9491075277328491,
0.04597627371549606,
-0.1270178258419037,
-0.3255365192890167,
0.9429594278335571,
0... |
func NewOrdererConfig(og *OrdererGroup) *OrdererConfig {
oc := &OrdererConfig{
protos: &OrdererProtos{},
ordererGroup: og,
}
var err error
oc.standardValues, err = NewStandardValues(oc.protos)
if err != nil {
logger.Panicf("Programming error: %s", err)
}
return oc
} | [
-0.3229777216911316,
-0.4682316780090332,
-0.07439694553613663,
0.3822033107280731,
-0.7090474367141724,
-0.18035338819026947,
0.33412906527519226,
-0.08323010802268982,
-0.7959657311439514,
0.4663647413253784,
-0.006746639497578144,
0.17854011058807373,
-0.42431366443634033,
1.25961351394... |
func (oc *OrdererConfig) Commit() {
oc.ordererGroup.OrdererConfig = oc
} | [
-0.49038517475128174,
-0.5330263376235962,
0.35380783677101135,
-0.218988299369812,
-0.033232804387807846,
0.2962381839752197,
0.508304238319397,
-0.0655665397644043,
-1.1043400764465332,
1.6004648208618164,
-0.04465851932764053,
0.2920317053794861,
-0.5612037181854248,
1.0486493110656738,... |
func (oc *OrdererConfig) ConsensusType() string {
return oc.protos.ConsensusType.Type
} | [
0.9945577383041382,
0.5100531578063965,
0.1527741402387619,
0.6199179887771606,
0.952057421207428,
0.16106624901294708,
-0.09681633859872818,
-0.16580739617347717,
-0.37515848875045776,
1.1765668392181396,
0.3986709415912628,
0.43269696831703186,
-0.18453994393348694,
0.9844258427619934,
... |
func (oc *OrdererConfig) BatchSize() *ab.BatchSize {
return oc.protos.BatchSize
} | [
0.6720520853996277,
0.5070021748542786,
0.32067039608955383,
0.8655683398246765,
0.06780977547168732,
-0.17675212025642395,
0.18046197295188904,
0.09082543104887009,
-0.5301363468170166,
-0.6612012386322021,
-0.6096506714820862,
0.5803390741348267,
-0.638591468334198,
0.9681851863861084,
... |
func (oc *OrdererConfig) BatchTimeout() time.Duration {
return oc.batchTimeout
} | [
1.140434741973877,
0.47821834683418274,
0.32024508714675903,
0.41079652309417725,
0.49845176935195923,
-0.03595838323235512,
-0.10130021721124649,
0.7880101799964905,
-0.7903181314468384,
0.9132443070411682,
-1.1787031888961792,
0.7261102795600891,
-0.04075183346867561,
0.8732320666313171,... |
func (oc *OrdererConfig) KafkaBrokers() []string {
return oc.protos.KafkaBrokers.Brokers
} | [
0.1338450014591217,
-0.02198147214949131,
0.5586348176002502,
1.3827037811279297,
-0.2978048324584961,
0.062850221991539,
-0.27215376496315,
-0.3734453320503235,
0.16876886785030365,
1.1900087594985962,
-0.5907326936721802,
-0.21976222097873688,
-1.249275803565979,
0.7404161095619202,
-0... |
func (oc *OrdererConfig) MaxChannelsCount() uint64 {
return oc.protos.ChannelRestrictions.MaxCount
} | [
1.3420679569244385,
-0.11602913588285446,
0.36609119176864624,
-0.3931986093521118,
-0.22973963618278503,
-0.703710675239563,
-0.8428988456726074,
-0.7312696576118469,
-0.13570374250411987,
0.3714180290699005,
0.35261601209640503,
-0.4498196542263031,
-0.648449718952179,
0.2935434877872467... |
func (oc *OrdererConfig) Organizations() map[string]Org {
return oc.orgs
} | [
-1.5347868204116821,
-0.13957259058952332,
0.2681632936000824,
-0.2077968269586563,
-0.19780322909355164,
0.2446073293685913,
-0.05451618880033493,
-0.8164554834365845,
0.07355386018753052,
0.08877552300691605,
-0.11905784904956818,
-0.24811939895153046,
0.8219770789146423,
0.6598013639450... |
func brokerEntrySeemsValid(broker string) bool {
if !strings.Contains(broker, ":") {
return false
}
parts := strings.Split(broker, ":")
if len(parts) > 2 {
return false
}
host := parts[0]
port := parts[1]
if _, err := strconv.ParseUint(port, 10, 16); err != nil {
return false
}
// Valid hostnames ma... | [
0.17127323150634766,
-0.6722170114517212,
0.6895996928215027,
-0.27043285965919495,
-0.3425641357898712,
0.13976676762104034,
-0.2223224937915802,
0.3776995837688446,
0.025981323793530464,
0.3008180558681488,
-0.6283199787139893,
-0.19593730568885803,
-0.9552406072616577,
-0.30924832820892... |
func (m *Marketplace) CreateOrder(ctx context.Context, req *pb.Order) (*pb.Order, error) {
if err := CheckPermissions(ctx, req); err != nil {
return nil, err
}
if err := m.validate(req); err != nil {
return nil, err
}
order := *req
// generate a unique ID if it's empty
if order.Id == "" {
order.Id = IDGe... | [
-0.6501347422599792,
-0.10354875028133392,
0.5298566818237305,
1.1618378162384033,
0.9543815851211548,
0.1621134877204895,
-0.5889998078346252,
-0.35947927832603455,
0.7365387678146362,
-0.18044324219226837,
0.17437900602817535,
-0.561876654624939,
-1.029278039932251,
0.790954053401947,
... |
func (o *AndroidMobileAppIdentifier) GetPackageId() string {
if o == nil || o.PackageId == nil {
var ret string
return ret
}
return *o.PackageId
} | [
0.8536850810050964,
0.0038674126844853163,
0.30082765221595764,
0.9338021278381348,
0.17078351974487305,
0.04421047866344452,
0.4549636244773865,
-0.21972030401229858,
1.9536038637161255,
0.028420189395546913,
0.49267134070396423,
-1.56871497631073,
-0.18187367916107178,
1.2920538187026978... |
func (o *AndroidMobileAppIdentifier) GetPackageIdOk() (string, bool) {
if o == nil || o.PackageId == nil {
var ret string
return ret, false
}
return *o.PackageId, true
} | [
-0.15178726613521576,
0.13963033258914948,
0.3642258048057556,
1.0191739797592163,
0.2451426386833191,
0.039281029254198074,
0.5635237097740173,
0.23403874039649963,
0.9364751577377319,
0.14513839781284332,
-0.5523549318313599,
-1.7591568231582642,
-0.45279502868652344,
1.1179367303848267,... |
func (o *AndroidMobileAppIdentifier) HasPackageId() bool {
if o != nil && o.PackageId != nil {
return true
}
return false
} | [
0.6389468908309937,
0.31195977330207825,
0.2139609009027481,
0.3817695677280426,
0.048013560473918915,
-0.17027610540390015,
-0.007317227777093649,
0.8977788686752319,
0.9711313843727112,
0.5038139224052429,
0.07029266655445099,
-1.2171268463134766,
0.3065340220928192,
1.2281768321990967,
... |
func (o *AndroidMobileAppIdentifier) SetPackageId(v string) {
o.PackageId = &v
} | [
0.9215002059936523,
-0.1956055760383606,
-0.13782277703285217,
0.09749431163072586,
-1.0285497903823853,
0.10257740318775177,
-0.45554572343826294,
-0.3256220817565918,
1.0832809209823608,
0.5515908598899841,
0.4418847858905792,
0.28399166464805603,
-0.1710526943206787,
0.01174298208206892... |
func (o AndroidMobileAppIdentifier) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.PackageId != nil {
toSerialize["packageId"] = o.PackageId
}
return json.Marshal(toSerialize)
} | [
0.23481447994709015,
-1.1271288394927979,
0.07622507214546204,
-0.3925054967403412,
-0.5826585292816162,
0.2768603265285492,
-0.359305739402771,
0.1922626495361328,
1.9077911376953125,
0.6881263256072998,
-0.6798779368400574,
-0.19735640287399292,
0.3684954047203064,
0.25787100195884705,
... |
func (m *StatusResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateDiagnostics(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateMessage(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateProcessingType(formats); err... | [
0.20780250430107117,
-0.9346965551376343,
0.1435992419719696,
0.1155875101685524,
0.49348849058151245,
-0.24841149151325226,
0.530972421169281,
0.002940478967502713,
-0.07005436718463898,
-0.39034730195999146,
-0.23603296279907227,
-0.6464840769767761,
-1.1022989749908447,
0.34809809923171... |
func main(){
select{}
} | [
0.25441059470176697,
-0.6732519268989563,
0.048712801188230515,
1.502893328666687,
0.07974038273096085,
-0.042182933539152145,
1.126841425895691,
-0.6158539652824402,
0.06497329473495483,
-0.3332735002040863,
-0.1356217861175537,
0.7388009428977966,
0.05893819406628609,
-0.7074728012084961... |
func New(product, key, secret string) *Mixpanel {
return NewWithURL(product, key, secret, MixpanelBaseURL)
} | [
-0.40075236558914185,
-1.2702916860580444,
0.3973751664161682,
0.8168611526489258,
-0.5326248407363892,
0.043821465224027634,
-0.7447378635406494,
-0.28421032428741455,
0.09343411773443222,
-0.3580993413925171,
-0.7350997924804688,
0.2908320724964142,
-0.16859374940395355,
0.33882555365562... |
func NewWithURL(product, key, secret, baseURL string) *Mixpanel {
m := new(Mixpanel)
m.Product = product
m.Key = key
m.Secret = secret
m.BaseURL = baseURL
return m
} | [
-0.25236302614212036,
-1.390897274017334,
0.462362140417099,
0.693910539150238,
-0.4532734751701355,
0.2555921971797943,
-0.2618364989757538,
-0.21180494129657745,
0.0406617671251297,
0.22275333106517792,
-0.9108405709266663,
-0.21397800743579865,
-0.7306711077690125,
-0.22017061710357666,... |
func (m *Mixpanel) addSignature(args *url.Values) {
hash := md5.New()
var params []string
for k, vs := range *args {
for _, v := range vs {
params = append(params, fmt.Sprintf("%s=%s", k, v))
}
}
sort.StringSlice(params).Sort()
io.WriteString(hash, strings.Join(params, "")+m.Secret)
args.Set("sig", fmt... | [
-0.7948521375656128,
-0.17121435701847076,
0.6597278118133545,
0.026428574696183205,
1.1028140783309937,
-0.04908091574907303,
-0.25433340668678284,
0.5568430423736572,
-0.4896535873413086,
-0.06533507257699966,
-0.5027905702590942,
-0.9836881756782532,
-0.9526097774505615,
1.5745140314102... |
func (m *Mixpanel) makeArgs(date time.Time) url.Values {
args := url.Values{}
args.Set("format", "json")
args.Set("api_key", m.Key)
args.Set("expire", fmt.Sprintf("%d", time.Now().Unix()+10000))
day := date.Format("2006-01-02")
args.Set("from_date", day)
args.Set("to_date", day)
return args
} | [
-1.438307762145996,
0.20669607818126678,
0.890893816947937,
-1.2188996076583862,
-0.280975341796875,
0.34301134943962097,
-0.9959312677383423,
0.0012397993123158813,
-0.9979649782180786,
0.3173927366733551,
0.04432674124836922,
-0.35078734159469604,
-0.060221247375011444,
0.732522308826446... |
func (m *Mixpanel) ExportDate(date time.Time, output chan<- EventData, moreArgs *url.Values) (int, error) {
args := m.makeArgs(date)
if moreArgs != nil {
for k, vs := range *moreArgs {
for _, v := range vs {
args.Add(k, v)
}
}
}
m.addSignature(&args)
resp, err := http.Get(fmt.Sprintf("%s?%s", m.Ba... | [
-0.4417392313480377,
0.2965490520000458,
0.951728105545044,
0.3866509199142456,
-0.426951140165329,
-0.37850871682167053,
-0.05727014318108559,
-0.42124757170677185,
-0.12001507729291916,
0.08963377773761749,
-0.3079054057598114,
0.0670563206076622,
-1.1660338640213013,
1.1888885498046875,... |
func MkdirAllNoUmask(path string, perms os.FileMode) error {
existing := syscall.Umask(0)
defer syscall.Umask(existing)
return os.MkdirAll(path, perms)
} | [
-0.022492704913020134,
0.534021258354187,
0.4312276542186737,
0.8312239646911621,
-1.1448770761489868,
0.4593920111656189,
0.2955555319786072,
0.4502353072166443,
1.0401055812835693,
-0.43811509013175964,
-0.6724163293838501,
-0.2664031386375427,
0.7558742761611938,
0.8189967274665833,
0... |
func NewTestIndexer(id string, version indexer.Version, subs []indexer.Subscription, prepare, complete, index chan mock.Arguments) indexer.Indexer {
idx := &Indexer{}
idx.On("GetID").Return(id)
idx.On("GetVersion").Return(version)
idx.On("GetSubscriptions").Return(subs)
idx.On("PrepareReindex", mock.Anything, moc... | [
-0.7970477938652039,
-0.8164488077163696,
0.6889009475708008,
-0.0826018750667572,
-0.2841084897518158,
-0.9168276190757751,
0.41145646572113037,
-0.5425597429275513,
0.5720006823539734,
-0.0581730380654335,
-0.5818703770637512,
-0.22208143770694733,
-1.2283515930175781,
0.4546467959880829... |
func (r *SyncRequest) LoadValue(name string, value []string) {
switch name {
case "items":
r.Items = Items{}
case "sync_token":
r.SyncToken = value[0]
case "cursor_token":
r.CursorToken = value[0]
case "limit":
r.Limit, _ = strconv.Atoi(value[0])
}
} | [
-0.5071244835853577,
-0.4327661395072937,
0.4974125027656555,
-0.2035285234451294,
-0.12093180418014526,
-1.0256752967834473,
-1.4022589921951294,
-0.37363576889038086,
0.02362016588449478,
0.9952579736709595,
-0.569080114364624,
0.5520220994949341,
-0.29387950897216797,
0.1341005116701126... |
func (i *Item) LoadValue(name string, value []string) {
switch name {
case "uuid":
i.UUID = value[0]
case "user_uuid":
i.UserUUID = value[0]
case "content":
i.Content = value[0]
case "enc_item_key":
i.EncItemKey = value[0]
case "content_type":
i.ContentType = value[0]
case "auth_hash":
i.ContentType ... | [
-0.8605268001556396,
-0.2767755389213562,
0.5170904994010925,
0.20339475572109222,
-0.05282730236649513,
-0.3788881003856659,
-1.406204104423523,
-0.2752667963504791,
-0.14608754217624664,
1.2585301399230957,
-1.0736404657363892,
0.3271467089653015,
-0.5835351347923279,
0.07023657113313675... |
func (i *Item) save() error {
if i.UUID == "" || !i.Exists() {
return i.create()
}
return i.update()
} | [
-0.9812338948249817,
0.3614496886730194,
0.32871100306510925,
0.33602476119995117,
1.0320887565612793,
0.20521287620067596,
-0.027520064264535904,
0.22752389311790466,
-0.7437321543693542,
1.0830252170562744,
-1.0346988439559937,
-1.0968267917633057,
-1.0208076238632202,
-0.49460569024086,... |
func (i Item) Exists() bool {
if i.UUID == "" {
return false
}
uuid, err := db.SelectFirst("SELECT `uuid` FROM `items` WHERE `uuid`=?", i.UUID)
if err != nil {
Log(err)
return false
}
Log("Exists:", uuid)
return uuid != ""
} | [
-1.565189242362976,
-0.028105974197387695,
0.5724679827690125,
-0.14032678306102753,
0.9968627691268921,
0.1962256282567978,
-1.1099625825881958,
1.224531888961792,
-0.6186495423316956,
0.38624030351638794,
-0.13031479716300964,
-0.5509220361709595,
-0.4738370180130005,
-0.7415646314620972... |
func (i *Item) LoadByUUID(uuid string) bool {
_, err := db.SelectStruct("SELECT * FROM `items` WHERE `uuid`=?", i, uuid)
if err != nil {
Log(err)
return false
}
return true
} | [
-0.7344909906387329,
0.7610507011413574,
0.8394117951393127,
-0.3439887464046478,
-0.4314357042312622,
0.296926885843277,
-0.35612499713897705,
0.34448400139808655,
-0.8995031118392944,
1.0300084352493286,
-1.1874668598175049,
-0.8747485876083374,
-0.8833824992179871,
-0.9066784381866455,
... |
func GetTokenFromTime(date time.Time) string {
return base64.URLEncoding.EncodeToString([]byte(fmt.Sprintf("1:%d", date.UnixNano())))
} | [
0.05997428297996521,
-0.7021474242210388,
0.3779839277267456,
0.45645472407341003,
-0.5537556409835815,
-0.08676742017269135,
-1.5216013193130493,
0.3101613223552704,
0.4116578698158264,
-0.3757447600364685,
-0.7576907277107239,
0.5665034651756287,
0.8693708777427673,
0.22539591789245605,
... |
func GetTimeFromToken(token string) time.Time {
decoded, err := base64.URLEncoding.DecodeString(token)
if err != nil {
Log(err)
return time.Now()
}
parts := strings.Split(string(decoded), ":")
str, err := strconv.ParseUint(parts[1], 10, 64)
if err != nil {
Log(err)
return time.Now()
}
return time.Time(t... | [
0.6705431342124939,
-0.07010656595230103,
0.4610041379928589,
-0.3929416239261627,
-0.033004432916641235,
-0.21328425407409668,
-1.257864236831665,
0.4372599124908447,
-0.1927107721567154,
0.06480804085731506,
-1.1127662658691406,
-0.10666678100824356,
-0.24651585519313812,
-0.205752804875... |
func ReadFromLine(line string) (ent hosts.Entry, err error) {
trimmedLine := TrimWhitespace(line)
if isEmptyOrComment(trimmedLine) {
return nil, emptyLineError
}
commentFreeLine := extractCommentFreeLine(trimmedLine)
if isEmptyOrComment(commentFreeLine) {
return nil, emptyLineError
}
lineItems := spaceRege... | [
0.5441814661026001,
-0.5674887299537659,
0.5167816877365112,
-0.027430547401309013,
-0.39092573523521423,
-0.05804445222020149,
-0.23361608386039734,
-0.31531012058258057,
-0.013851745054125786,
-0.3646283745765686,
0.645778477191925,
-0.017805248498916626,
-0.13468784093856812,
-0.6320515... |
func WriteToLine(ent hosts.Entry) (line string, err error) {
if ent.HostNames() == nil || len(ent.HostNames()) <= 0 {
return "", invalidHostNameList
}
for _, hostName := range ent.HostNames() {
if strings.Contains(hostName, commentSign) {
return "", invalidHostName
}
}
return fmt.Sprintf("%s %s", ent.I... | [
-0.6996579170227051,
-0.37776926159858704,
0.5976899266242981,
-0.25518175959587097,
0.9282828569412231,
0.3259524405002594,
-0.5230739116668701,
0.38536739349365234,
-0.1713470071554184,
0.5695958733558655,
-0.3113383948802948,
-0.4356100559234619,
0.39638039469718933,
-0.1099990680813789... |
func NewRedisQueue(r *redis.Client) *RedisQueue {
return NewRedisQueueWithFunc(r, DataToJSON, JSONToData)
} | [
-0.8746688365936279,
-0.21983011066913605,
0.3129698634147644,
-0.4275459349155426,
-1.038339376449585,
-1.3265979290008545,
-1.4117125272750854,
0.19560526311397552,
-0.09372957050800323,
-0.3473851978778839,
-0.8637919425964355,
0.9864014983177185,
0.5662572979927063,
0.6201678514480591,... |
func NewRedisQueueWithFunc(
r *redis.Client,
push func(interface{}) (interface{}, error),
pop func(interface{}) (interface{}, error)) *RedisQueue {
return &RedisQueue{
key: fmt.Sprintf("queue:%v", time.Now().Nanosecond()),
r: r,
push: push,
pop: pop,
}
} | [
0.10397441685199738,
-0.14243000745773315,
0.2833828628063202,
0.0045394254848361015,
-0.37731537222862244,
-1.3980334997177124,
-0.9580721855163574,
-0.06374814361333847,
-0.5553175806999207,
0.731516420841217,
-0.11138942092657089,
0.31193017959594727,
1.5147572755813599,
0.6362616419792... |
func (s *RedisQueue) Push(data interface{}) error {
str, err := s.push(data)
if err != nil {
return err
}
_, err = s.r.LPush(s.Key(), str).Result()
return err
} | [
-0.36163967847824097,
0.7215838432312012,
0.33180639147758484,
-0.17348358035087585,
-0.6193856000900269,
-0.3208421468734741,
-1.231329083442688,
-0.99654221534729,
0.29051676392555237,
0.5011698007583618,
-0.49545565247535706,
0.5140554308891296,
-0.23115967214107513,
0.661313533782959,
... |
func (s *RedisQueue) Pull() (interface{}, error) {
r, err := s.r.RPop(s.Key()).Result()
if err != nil {
return nil, err
}
return s.pop(r)
} | [
-0.8650196194648743,
0.1479773074388504,
0.4007732570171356,
-0.23874059319496155,
-0.7904264330863953,
-0.7027027010917664,
-0.89324951171875,
-0.6451462507247925,
0.5169144868850708,
-0.1497253030538559,
-0.14923988282680511,
-0.24862539768218994,
-0.8102164268493652,
-0.0739893913269043... |
func (s *RedisQueue) Key() string {
return s.key
} | [
-0.3425751328468323,
-0.6373241543769836,
0.08813218027353287,
-0.02405071258544922,
-0.14530780911445618,
0.6326757669448853,
-0.827902615070343,
-0.06762593239545822,
0.43405649065971375,
0.6194769144058228,
0.011252956464886665,
-0.02002255991101265,
-0.2053464949131012,
0.3358564972877... |
func (s *RedisQueue) Clear() error {
return s.r.Del(s.Key()).Err()
} | [
-0.5713920593261719,
-0.1571955680847168,
-0.05322180688381195,
-0.43222078680992126,
-0.9860908389091492,
-0.4213722050189972,
-1.6308825016021729,
-0.9156728982925415,
-0.01634008064866066,
0.683548629283905,
0.5607338547706604,
0.8791452050209045,
0.3699057698249817,
0.5716655850410461,... |
func (s *RedisQueue) Size() (int, error) {
size, err := s.r.LLen(s.Key()).Result()
return int(size), err
} | [
-0.690542459487915,
0.49656176567077637,
0.38414910435676575,
-1.0700201988220215,
-0.3708372414112091,
-0.9930020570755005,
-0.3973577320575714,
-0.4320236146450043,
0.11360646039247513,
0.11601421982049942,
-0.2623955309391022,
-0.018945064395666122,
-0.5346108675003052,
0.61210227012634... |
func UnmarshalMockProcessMap(data string) (map[string]*MockProcessConfig, error) {
var mocks map[string]*MockProcessConfig
if err := json.Unmarshal([]byte(data), &mocks); err != nil {
return mocks, err
}
return mocks, nil
} | [
-0.6908359527587891,
-0.3800268769264221,
0.870093584060669,
-0.45880281925201416,
-0.28255343437194824,
-0.281156450510025,
0.5034357905387878,
-0.015137062408030033,
0.7744413018226624,
0.5101341605186462,
-0.24521179497241974,
-0.03146401792764664,
-0.6066300868988037,
0.093813076615333... |
func MakeTxKV() ([]byte, []byte, []byte) {
k := []byte(tmrand.Str(8))
v := []byte(tmrand.Str(8))
return k, v, append(k, append([]byte("="), v...)...)
} | [
-0.5752961039543152,
0.5223659873008728,
0.5041515827178955,
-0.7543057203292847,
-0.6157848238945007,
-0.20366765558719635,
-0.7167863249778748,
-0.2719268798828125,
-0.12955202162265778,
0.6514889001846313,
-1.0286781787872314,
-0.2574371099472046,
0.4271050691604614,
-0.1654933094978332... |
func CreateTimer() Timer {
return &timer{}
} | [
0.7621429562568665,
-0.9987934231758118,
0.11399262398481369,
-0.05537748709321022,
-0.33659276366233826,
0.26826441287994385,
-0.7169586420059204,
-0.044587742537260056,
-0.05498049408197403,
-0.7074525356292725,
0.4892626702785492,
-0.7988541126251221,
-0.641459584236145,
1.3943561315536... |
func (t *timer) Start() {
t.beforeTime = time.Now().UnixNano()
t.afterTime = t.beforeTime
} | [
0.023523226380348206,
-0.08769159018993378,
0.1906687170267105,
-0.07044795900583267,
-0.17795787751674652,
-0.3857519030570984,
-0.5539288520812988,
1.0482202768325806,
-1.1535906791687012,
0.5267781615257263,
-1.224300503730774,
1.058179259300232,
0.44027531147003174,
1.365422248840332,
... |
func (t *timer) GetElapsedTime() int64 {
elapsedTime := t.afterTime - t.beforeTime
t.beforeTime = time.Now().UnixNano()
return elapsedTime
} | [
0.23092368245124817,
0.5210662484169006,
0.7858348488807678,
-0.5901332497596741,
-0.4238397181034088,
0.07247825711965561,
-0.2020377218723297,
0.6140288710594177,
-0.20080605149269104,
0.3053518831729889,
-0.8070380687713623,
-0.16686899960041046,
-0.5631493330001831,
1.2782129049301147,... |
func (t *timer) UpdateTime() {
t.afterTime = time.Now().UnixNano()
} | [
-0.06696242839097977,
-0.3294096887111664,
0.3643997311592102,
-0.16701970994472504,
-0.6288903951644897,
0.20904290676116943,
-0.5783172845840454,
0.4463391900062561,
-1.071731686592102,
0.602914035320282,
-0.5924347043037415,
-0.5011824369430542,
-0.08116450160741806,
1.4287056922912598,... |
func (p *mockPolicy) GetAllocatableMemory(s state.State) []state.Block {
return []state.Block{}
} | [
0.8803697824478149,
-0.12158045172691345,
0.45778319239616394,
0.1358315646648407,
0.06659764796495438,
0.8213061690330505,
-0.6243311166763306,
-0.49974390864372253,
1.6314278841018677,
-0.15088680386543274,
-0.18587283790111542,
0.7888556718826294,
-0.026375481858849525,
-0.1958686262369... |
func sumSubvectorCloseToNumber(vector []float64, number float64) []float64 {
var size int
if size = sv.ValidateAndReturnSize(vector); size == 0 {
return []float64{}
}
cumArray := u.CalculateCummulativeArray(vector)
currentCloseNumber := sv.NewSubvector(0, 0, u.GetDistance(cumArray[0].Value, number))
for i :=... | [
-0.5092053413391113,
-0.6746964454650879,
1.3410005569458008,
0.5392770767211914,
-0.25731873512268066,
0.16524027287960052,
1.1223820447921753,
0.03870541602373123,
-0.001124887028709054,
0.03648923337459564,
-0.2762403190135956,
0.7225198745727539,
-0.46845144033432007,
0.137047559022903... |
func New(input io.ReadSeeker, size int64) (cf *CouchDbFile, err error) {
var (
newCouchDbFile CouchDbFile
)
cf = &newCouchDbFile
// Add handle to internal input variable
cf.input = input
cf.size = size
header, err := cf.ReadDbHeader()
if err != nil {
slog.Error(err)
return nil, err
}
cf.Header = *header... | [
0.4371981620788574,
-0.5551685690879822,
0.6078908443450928,
-0.1712905615568161,
-0.660703182220459,
0.7105271816253662,
0.5672850012779236,
-0.17939269542694092,
-1.229573130607605,
-1.302363634109497,
-0.08100751042366028,
-0.49003109335899353,
0.1163744255900383,
0.5785814523696899,
... |
func TcpReadFixedSize(ctx context.Context, conn net.Conn, m int, timeout time.Duration) ([]byte, error) {
ctx, _ = context.WithTimeout(ctx, timeout)
c := make(chan error, 1)
var messageBuffer bytes.Buffer
go func() {
var err error
defer func() { c <- err }()
for m > 0 {
tmpBuffer := make([]byte, m)
n, e... | [
0.16541826725006104,
0.2081887274980545,
0.864909827709198,
-0.26810547709465027,
-0.38307568430900574,
0.013070362620055676,
-0.19671493768692017,
-0.7348279356956482,
-0.3895130753517151,
0.4546732008457184,
0.261288046836853,
-0.20705482363700867,
-1.1714516878128052,
0.5442848205566406... |
func DecodeTx(xdrString string) (*xdr.TransactionEnvelope, error) {
var tx xdr.TransactionEnvelope
err := xdr.SafeUnmarshalBase64(xdrString, &tx)
if err != nil {
log.Fatal("Invalid XDR encoded transaction", err)
}
fmt.Println("")
fmt.Println("Decoded Transaction Details:")
fmt.Printf(" Source Account: %s\n",... | [
0.6296478509902954,
0.03985484316945076,
0.7243859171867371,
-1.0838510990142822,
-1.1116749048233032,
-0.17751367390155792,
-0.07123362272977829,
-0.41244006156921387,
-0.0017762997886165977,
0.008469895459711552,
-0.35723915696144104,
-0.13631726801395416,
-0.3241328299045563,
-0.8000552... |
func SignTx(tx xdr.TransactionEnvelope, seed memguard.LockedBuffer) (*string, error) {
// Sign the transaction
txBuilder := &build.TransactionEnvelopeBuilder{E: &tx}
txBuilder.Init()
err := txBuilder.MutateTX(build.PublicNetwork)
if err != nil {
return nil, err
}
// TODO: This basically voids our use of memg... | [
0.16176064312458038,
-0.24101592600345612,
0.6172736883163452,
-0.28534674644470215,
-0.6639332175254822,
-0.222525492310524,
-0.6487447619438171,
0.20211118459701538,
0.2695888876914978,
0.24203863739967346,
-0.5000224709510803,
-0.5774033665657043,
-0.4116291403770447,
-0.488825350999832... |
func registerCallback(cbArg *callbackArg) uintptr {
callbacksLock.Lock()
defer callbacksLock.Unlock()
cbArg.id = nextCallbackID
nextCallbackID++
if _, ok := callbacks[cbArg.id]; ok {
panic(fmt.Sprintf("Callback ID %d already in use", cbArg.id))
}
callbacks[cbArg.id] = cbArg
return cbArg.id
} | [
-0.24873492121696472,
0.7784968614578247,
0.5129403471946716,
-0.288593053817749,
-0.2317575216293335,
-0.43136340379714966,
0.5394091606140137,
-0.4871666729450226,
1.1726628541946411,
-0.01215912401676178,
-0.6097390651702881,
-0.04274827986955643,
-1.148425817489624,
0.8587369322776794,... |
func unregisterCallback(cbArg *callbackArg) {
callbacksLock.Lock()
defer callbacksLock.Unlock()
if _, ok := callbacks[cbArg.id]; !ok {
panic(fmt.Sprintf("Callback ID %d not registered", cbArg.id))
}
delete(callbacks, cbArg.id)
} | [
0.10902753472328186,
0.7982890009880066,
0.27910706400871277,
-0.10680441558361053,
-0.21015021204948425,
-0.17741864919662476,
0.5260267853736877,
0.5361889004707336,
0.6191010475158691,
0.41787150502204895,
-0.737672746181488,
-0.11313112080097198,
-0.9420710206031799,
0.8252613544464111... |
func callback(nlm *C.struct_nl_msg, nla unsafe.Pointer) C.int {
cbID := uintptr(nla)
callbacksLock.RLock()
cbArg := callbacks[cbID]
callbacksLock.RUnlock()
if cbArg == nil {
panic(fmt.Sprintf("No netlink callback with ID %d", cbID))
}
cbMsg := &Message{nlm: nlm}
if err := cbArg.fn(cbMsg, cbArg.arg); err != ... | [
-0.1619136780500412,
0.3939734697341919,
0.5637902617454529,
-0.9372732043266296,
0.1987186223268509,
-0.4859517216682434,
0.7755415439605713,
-0.6731069087982178,
0.4029417335987091,
0.1029246374964714,
0.16262221336364746,
-0.1795424371957779,
-0.7875862717628479,
0.7552888989448547,
0... |
func NewMessage(command, family, flags int) (*Message, error) {
nlm := C.nlmsg_alloc()
if nlm == nil {
return nil, errors.New("failed to create netlink message")
}
C.genlmsg_put(nlm, C.NL_AUTO_PID, C.NL_AUTO_SEQ, C.int(family), 0, C.int(flags), C.uint8_t(command), genlVersion)
return &Message{nlm: nlm}, nil
} | [
0.2938081920146942,
0.29101499915122986,
0.34052276611328125,
-0.07790904492139816,
0.4061413109302521,
0.3520171344280243,
-0.1768881231546402,
-0.46820732951164246,
0.016999894753098488,
-0.7138711214065552,
-0.198215052485466,
-0.2752780616283417,
-0.799876868724823,
1.3904759883880615,... |
func NewMessageFromBytes(nlb []byte) (*Message, error) {
nlm := C.nlmsg_alloc_size(C.size_t(len(nlb)))
if nlm == nil {
return nil, errors.New("failed to create netlink message")
}
nlh := C.nlmsg_hdr(nlm)
copy((*[1 << 20]byte)(unsafe.Pointer(nlh))[:len(nlb)], nlb)
return &Message{nlm: nlm}, nil
} | [
0.39413657784461975,
-0.37038496136665344,
0.2825920283794403,
-0.8786097168922424,
0.13168571889400482,
0.2911127507686615,
-0.6570857763290405,
-1.1126961708068848,
0.923374354839325,
-0.5902353525161743,
-0.6849508881568909,
-0.5266903638839722,
-0.6826903223991394,
0.996971607208252,
... |
func (m *Message) Free() {
C.nlmsg_free(m.nlm)
m.nlm = nil
} | [
0.1665421426296234,
0.5561649799346924,
0.2692652940750122,
-1.0078442096710205,
-0.03036333993077278,
-0.10843505710363388,
-0.2838583290576935,
-1.6199495792388916,
-0.9232744574546814,
-0.7996762990951538,
0.09229763597249985,
0.6282906532287598,
-1.6047916412353516,
1.6487724781036377,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.