text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (*DataDataSyncAllReq) Descriptor() ([]byte, []int) {
return file_proto_DataData_DataData_proto_rawDescGZIP(), []int{2}
} | [
-0.7019898891448975,
0.35526037216186523,
0.40218421816825867,
-0.5363054275512695,
-0.07525844126939774,
-0.30312395095825195,
-0.7535800337791443,
-0.01172323152422905,
-0.1107015311717987,
-0.6001259684562683,
-1.0963460206985474,
0.4706663489341736,
0.11641152203083038,
0.1178116723895... |
func (*DataDataSyncAllResp) Descriptor() ([]byte, []int) {
return file_proto_DataData_DataData_proto_rawDescGZIP(), []int{3}
} | [
0.23368865251541138,
0.24690699577331543,
0.03543545678257942,
-0.9696459174156189,
-0.21610666811466217,
-0.8395654559135437,
-1.1375243663787842,
-0.4533142149448395,
0.4106687009334564,
-0.4995999038219452,
-0.8518305420875549,
-0.0003851288347505033,
-0.42943617701530457,
-0.1053867265... |
func (*DataDataSyncPutReq) Descriptor() ([]byte, []int) {
return file_proto_DataData_DataData_proto_rawDescGZIP(), []int{4}
} | [
-1.1496500968933105,
0.17771022021770477,
0.545434832572937,
-0.503124475479126,
0.22816450893878937,
-0.31834256649017334,
0.5618475675582886,
0.5728446841239929,
-0.4754619300365448,
-0.5008525848388672,
-0.5826764702796936,
0.9196491837501526,
0.8461902737617493,
0.0034868756774812937,
... |
func (*DataDataSyncPutResp) Descriptor() ([]byte, []int) {
return file_proto_DataData_DataData_proto_rawDescGZIP(), []int{5}
} | [
-0.008185711689293385,
-0.29655715823173523,
0.14789196848869324,
-0.9696283340454102,
0.10240886360406876,
-0.4285464882850647,
0.5168730020523071,
-0.5011663436889648,
0.37043097615242004,
-0.08137276768684387,
-0.9075077772140503,
-0.1311006247997284,
0.13395756483078003,
-0.66230738162... |
func (*DataDataSyncDeleteReq) Descriptor() ([]byte, []int) {
return file_proto_DataData_DataData_proto_rawDescGZIP(), []int{6}
} | [
-0.9571918845176697,
0.17511853575706482,
0.31034916639328003,
-0.38114163279533386,
0.19081330299377441,
-0.9138250946998596,
-0.44907301664352417,
0.8034125566482544,
-0.1651933193206787,
-0.605411171913147,
-0.9462833404541016,
0.8111572861671448,
0.6619097590446472,
0.04640580341219902... |
func (*DataDataSyncDeleteResp) Descriptor() ([]byte, []int) {
return file_proto_DataData_DataData_proto_rawDescGZIP(), []int{7}
} | [
0.21414034068584442,
0.018355397507548332,
-0.16977018117904663,
-0.5772777795791626,
0.15124665200710297,
-1.196812629699707,
-1.0263988971710205,
-0.19563323259353638,
0.47099560499191284,
-0.28298163414001465,
-0.5631534457206726,
0.223835751414299,
-0.05221821367740631,
-0.219737499952... |
func NewLogger() *logrus.Entry {
if s := os.Getenv("SERVICE"); s != "" {
fmt.Printf("test: %s\n", s)
serviceName = s
}
if t := os.Getenv("TEAM"); t != "" {
teamName = t
}
if l := os.Getenv("LOG_LEVEL"); l != "" {
if level, err := logrus.ParseLevel(l); err != nil {
fmt.Printf("Failed to parse %s as log l... | [
0.13810788094997406,
-0.5018404722213745,
0.5731720328330994,
-0.7473433017730713,
-0.5639455914497375,
-0.09090391546487808,
-0.7121657729148865,
-0.2527995705604553,
-0.5156137943267822,
0.31783920526504517,
0.7927244901657104,
0.9355802536010742,
-0.12031571567058563,
0.6469631195068359... |
func NewDiscardWriter() *DiscardWriter {
return &DiscardWriter{Writer: ioutil.Discard}
} | [
0.8220544457435608,
-0.28942906856536865,
0.08840867877006531,
0.44990402460098267,
-0.43430307507514954,
-1.0375771522521973,
-0.564113199710846,
0.6305103898048401,
0.005130872596055269,
-0.06008042022585869,
-0.07980868220329285,
-0.7163044214248657,
0.4117829501628876,
0.17806449532508... |
func (w *DiscardWriter) Close() error {
w.Writer = nil
return nil
} | [
0.6423352360725403,
0.3041881024837494,
0.2139037847518921,
-0.5411199927330017,
0.16484960913658142,
0.07684348523616791,
0.5886096358299255,
0.3786701560020447,
-0.6289116144180298,
-0.28188401460647583,
0.5512151718139648,
-0.6776934862136841,
-0.9767069816589355,
1.2972713708877563,
... |
func NewConsoleWriter(f *os.File) *ConsoleWriter {
return &ConsoleWriter{File: f}
} | [
-0.23274832963943481,
-0.7576982975006104,
-0.06122490391135216,
0.4211021959781647,
-0.1209387332201004,
-0.7040160298347473,
-0.2089202105998993,
-0.1497877985239029,
-1.4453221559524536,
0.02660873346030712,
0.028733743354678154,
-0.2452513873577118,
0.507576584815979,
0.339461982250213... |
func NewStdoutWriter() *ConsoleWriter {
return NewConsoleWriter(os.Stdout)
} | [
0.1880546510219574,
-0.7301707863807678,
0.0759531632065773,
0.36308562755584717,
-0.6132305860519409,
-1.223484754562378,
-0.051029495894908905,
-0.25955551862716675,
-0.9803727865219116,
-0.014943331480026245,
0.027652235701680183,
-0.7812516689300537,
0.7319402098655701,
0.3660907149314... |
func NewStderrWriter() *ConsoleWriter {
return NewConsoleWriter(os.Stderr)
} | [
-0.05071590095758438,
-0.7925708293914795,
-0.046313393861055374,
-0.07960740476846695,
-0.7166293263435364,
-1.4017424583435059,
0.017048930749297142,
0.06026763096451759,
-1.1348549127578735,
0.06513714790344238,
-0.04900055378675461,
-0.5641528367996216,
0.2893161177635193,
0.3672166764... |
func (w *ConsoleWriter) Close() error {
w.File = nil
return nil
} | [
-0.01423090510070324,
-0.6325671076774597,
0.2990812361240387,
-0.39251509308815,
0.8588605523109436,
0.19534973800182343,
0.8437039256095886,
-0.1897335648536682,
-1.7983866930007935,
-0.6532283425331116,
0.8137139081954956,
-0.3165144920349121,
-0.9319565892219543,
0.8651823401451111,
... |
func NewFileWriter(path string) (*os.File, error) {
return os.OpenFile(path, fileFlag, fileMode)
} | [
-0.32028886675834656,
-0.4559209644794464,
0.26461508870124817,
0.36943477392196655,
-1.1172114610671997,
-0.43467146158218384,
0.4246436357498169,
1.0476491451263428,
-0.6750718355178833,
-0.4420316219329834,
-0.6266753077507019,
-0.8344563245773315,
0.37993308901786804,
0.285512924194335... |
func BufferSize(size uint32) BufferedFileWriterOption {
return func(w *bufferedFileWriter) {
if size >= 1024 {
w.bufferSize = size
}
}
} | [
0.7026186585426331,
-0.05736466869711876,
0.5455160140991211,
-0.4824505150318146,
0.385474294424057,
-0.11786254495382309,
0.8434641361236572,
0.4052981734275818,
0.18970438838005066,
-1.2906862497329712,
-1.0077954530715942,
-0.016266323626041412,
-0.06755891442298889,
-0.311612695455551... |
func NewBufferedFileWriter(path string, options ...BufferedFileWriterOption) (*BufferedFileWriter, error) {
f, err := os.OpenFile(path, fileFlag, fileMode)
if err != nil {
return nil, err
}
w := &BufferedFileWriter{
bufferedFileWriter: bufferedFileWriter{
file: f,
bufferSize: defaultBufferSize,
},... | [
0.591830849647522,
-0.3116544485092163,
0.6362670660018921,
0.35252511501312256,
-0.20879538357257843,
-0.12593546509742737,
0.5203929543495178,
0.22995932400226593,
-0.6028155088424683,
-0.8378702998161316,
-1.137723684310913,
0.042816631495952606,
-0.3852328360080719,
0.23240068554878235... |
func (w *BufferedFileWriter) Write(p []byte) (n int, err error) {
w.lock.Lock()
n, err = w.buffer.Write(p)
if !w.updated && n > 0 && w.buffer.Buffered() > 0 { // checks w.updated to prevent notifying w.updateChan twice
w.updated = true
w.lock.Unlock()
select { // ignores if blocked
case w.updateChan <- stru... | [
-0.8012439012527466,
0.24080894887447357,
0.5882256627082825,
0.09937605261802673,
0.4129217565059662,
0.019948896020650864,
0.7072566151618958,
-0.022827334702014923,
-0.7435185313224792,
-0.46335965394973755,
-0.9440850019454956,
-0.5807719826698303,
-1.5340677499771118,
1.04709672927856... |
func (w *BufferedFileWriter) Close() error {
close(w.stopChan)
w.lock.Lock()
err := w.buffer.Flush()
w.buffer = nil
if err == nil {
err = w.file.Close()
} else {
e := w.file.Close()
if e != nil {
logError(e)
}
}
w.file = nil
w.lock.Unlock()
return err
} | [
0.09535997360944748,
-0.49343693256378174,
0.7147179245948792,
-0.37740910053253174,
0.2982982099056244,
0.09532688558101654,
0.9581537246704102,
-0.3090403378009796,
-1.6795079708099365,
-1.2665321826934814,
-0.056333027780056,
-0.7364504933357239,
-0.7898996472358704,
0.6737183332443237,... |
func NewRotatingFileWriter(path string, maxSize uint64, backupCount uint8, options ...BufferedFileWriterOption) (*RotatingFileWriter, error) {
if maxSize == 0 {
return nil, errors.New("maxSize cannot be 0")
}
if backupCount == 0 {
return nil, errors.New("backupCount cannot be 0")
}
f, err := os.OpenFile(path... | [
0.36126717925071716,
-0.24107037484645844,
0.5437641143798828,
0.12952455878257751,
-0.35714203119277954,
-0.45478662848472595,
0.6050305962562561,
0.14625781774520874,
-0.7495794296264648,
-0.3173776865005493,
-0.5992899537086487,
-0.4288226068019867,
-0.1448206901550293,
-0.1134242415428... |
func (w *RotatingFileWriter) Write(p []byte) (n int, err error) {
w.lock.Lock()
defer w.lock.Unlock()
n, err = w.buffer.Write(p)
if n > 0 {
w.pos += uint64(n)
if w.pos >= w.maxSize {
e := w.rotate()
if e != nil {
logError(e)
if err == nil { // don't shadow Write() error
err = e
}
}
... | [
-0.9457610249519348,
0.6015775799751282,
0.6712132096290588,
-0.09987644106149673,
0.3105103373527527,
0.1262829750776291,
0.931074321269989,
0.3380020558834076,
-0.11362949758768082,
-0.18206878006458282,
-0.6938777565956116,
-0.6543029546737671,
-1.2429627180099487,
0.6085402369499207,
... |
func (w *RotatingFileWriter) rotate() error {
if w.file == nil { // was closed
return os.ErrClosed
}
err := w.buffer.Flush()
if err != nil {
return err
}
err = w.file.Close()
w.pos = 0
if err != nil {
w.file = nil
w.buffer = nil
return err
}
for i := w.backupCount; i > 1; i-- {
oldPath := fmt.S... | [
-0.3719761073589325,
0.07162430882453918,
0.9944613575935364,
0.2132943868637085,
0.8516328930854797,
-0.5963706374168396,
1.4797464609146118,
0.0056102643720805645,
-0.7562021613121033,
-0.4161367118358612,
0.03551942855119705,
-0.742948591709137,
-0.5548178553581238,
-0.07444210350513458... |
func NewTimedRotatingFileWriter(pathPrefix string, rotateDuration RotateDuration, backupCount uint8, options ...BufferedFileWriterOption) (*TimedRotatingFileWriter, error) {
if backupCount == 0 {
return nil, errors.New("backupCount cannot be 0")
}
f, err := openTimedRotatingFile(pathPrefix, rotateDuration)
if er... | [
-0.0049517336301505566,
-0.0717194452881813,
0.6512587666511536,
-0.20849287509918213,
0.021146971732378006,
-0.21791236102581024,
0.2293243110179901,
0.16930489242076874,
-0.6940177083015442,
-0.01998940296471119,
-0.47399672865867615,
-0.13355405628681183,
-0.2956225275993347,
-0.4463119... |
func (w *TimedRotatingFileWriter) rotate(timer *time.Timer) error {
w.lock.Lock()
if w.file == nil { // was closed
w.lock.Unlock()
return nil // usually happens when program exits, should be ignored
}
err := w.buffer.Flush()
if err != nil {
w.lock.Unlock()
return err
}
err = w.file.Close()
if err != n... | [
-0.6656849980354309,
0.22364580631256104,
0.9676985740661621,
0.12566721439361572,
0.3731353282928467,
-0.06105296313762665,
0.9349316358566284,
-0.3322083652019501,
-0.5723715424537659,
-0.12903159856796265,
0.19616174697875977,
-0.017810259014368057,
-1.073359727859497,
0.035323895514011... |
func (w *TimedRotatingFileWriter) purge() {
pathes, err := filepath.Glob(w.pathPrefix + "*")
if err != nil {
logError(err)
return
}
count := len(pathes) - int(w.backupCount) - 1
if count > 0 {
var name string
w.lock.Lock()
if w.file != nil { // not closed
name = w.file.Name()
}
w.lock.Unlock()
... | [
0.2070906013250351,
-0.1653916984796524,
0.8205927610397339,
0.15322649478912354,
0.6980029940605164,
-0.5797559022903442,
0.6257320642471313,
-0.2102031111717224,
-0.32777902483940125,
0.16508516669273376,
0.30731749534606934,
-0.4606727659702301,
-0.8249686360359192,
0.28208208084106445,... |
func openTimedRotatingFile(path string, rotateDuration RotateDuration) (*os.File, error) {
var pathSuffix string
t := now()
switch rotateDuration {
case RotateByDate:
pathSuffix = t.Format(rotateByDateFormat)
case RotateByHour:
pathSuffix = t.Format(rotateByHourFormat)
default:
return nil, errors.New("inval... | [
-0.6281418204307556,
0.13950662314891815,
0.7741422057151794,
-0.2554512321949005,
-0.48022404313087463,
0.8327497839927673,
0.22586658596992493,
0.34522029757499695,
-0.7873534560203552,
0.09642988443374634,
0.5143570303916931,
0.09413705766201019,
-0.6282690763473511,
-0.9176359176635742... |
func NewConcurrentFileWriter(path string, options ...BufferedFileWriterOption) (*ConcurrentFileWriter, error) {
f, err := os.OpenFile(path, fileFlag, fileMode)
if err != nil {
return nil, err
}
cpuCount := runtime.GOMAXPROCS(0)
w := &ConcurrentFileWriter{
bufferedFileWriter: bufferedFileWriter{
file: ... | [
0.521155059337616,
-0.23128077387809753,
0.594601571559906,
0.24560756981372833,
-0.5931618213653564,
-0.6924505233764648,
0.8800281286239624,
0.5645996928215027,
-0.8232283592224121,
-0.37608465552330017,
-0.3120291233062744,
-0.3449696898460388,
-0.7222010493278503,
-0.24261388182640076,... |
func (w *ConcurrentFileWriter) Write(p []byte) (n int, err error) {
shard := runtime_procPin()
runtime_procUnpin() // can't hold the lock for long
w.locks[shard].Lock()
n, err = w.buffers[shard].Write(p)
w.locks[shard].Unlock()
return
} | [
-0.128660649061203,
0.2604391276836395,
0.456848680973053,
0.4137110114097595,
1.0686405897140503,
0.0319676473736763,
1.008086919784546,
0.56805419921875,
-0.3773749768733978,
-0.5637614130973816,
-0.43194031715393066,
-0.44560348987579346,
-1.6481082439422607,
0.5366412997245789,
0.498... |
func (w *ConcurrentFileWriter) Close() (err error) {
close(w.stopChan) // stops schedule()
<-w.stoppedChan // waits for schedule() to finish, so the rest code can run without locks
for shard := 0; shard < w.cpuCount; shard++ {
buffer := w.buffers[shard]
if buffer.Len() > 0 {
w.buffer.Write(buffer.Bytes())
... | [
0.3415255844593048,
-0.464370459318161,
0.6378248333930969,
-0.46316564083099365,
0.09240006655454636,
0.10753340274095535,
1.2230280637741089,
-0.1069059818983078,
-1.4571290016174316,
-0.7096006870269775,
0.36062780022621155,
-0.8826547265052795,
-1.4487433433532715,
0.5987020134925842,
... |
func NewSLOCorrectionResponseAttributesModifier() *SLOCorrectionResponseAttributesModifier {
this := SLOCorrectionResponseAttributesModifier{}
return &this
} | [
-0.5753188729286194,
-0.848558247089386,
0.17696410417556763,
-1.3540008068084717,
0.004392119590193033,
-0.029853256419301033,
0.5465357899665833,
0.3438090682029724,
1.5674608945846558,
-0.44501596689224243,
-0.23377522826194763,
-1.0199682712554932,
0.07744497060775757,
-0.3687778413295... |
func NewSLOCorrectionResponseAttributesModifierWithDefaults() *SLOCorrectionResponseAttributesModifier {
this := SLOCorrectionResponseAttributesModifier{}
return &this
} | [
-0.47471487522125244,
-0.46460211277008057,
0.28425130248069763,
-1.3286855220794678,
0.8134416937828064,
-0.3987507224082947,
-0.14645139873027802,
0.2103988081216812,
1.3875906467437744,
-0.8422979712486267,
-0.8355103731155396,
-1.5658304691314697,
0.03296852856874466,
-0.14885757863521... |
func (o *SLOCorrectionResponseAttributesModifier) GetEmail() string {
if o == nil || o.Email == nil {
var ret string
return ret
}
return *o.Email
} | [
-0.2348601073026657,
0.5279460549354553,
-0.014498844742774963,
0.6522471308708191,
0.33649465441703796,
-0.04726067930459976,
0.9510881900787354,
0.27403536438941956,
0.7565554976463318,
-0.6490936875343323,
0.23999722301959991,
-1.4868022203445435,
-0.6145755052566528,
-0.027316099032759... |
func (o *SLOCorrectionResponseAttributesModifier) GetEmailOk() (*string, bool) {
if o == nil || o.Email == nil {
return nil, false
}
return o.Email, true
} | [
-0.2755502164363861,
0.19862930476665497,
0.35199302434921265,
0.5292853713035583,
-0.08760292828083038,
0.01798013225197792,
0.861345648765564,
1.1826125383377075,
0.8234953880310059,
0.10107237845659256,
-0.6011620163917542,
-0.6176806092262268,
0.2831993103027344,
-0.3416685461997986,
... |
func (o *SLOCorrectionResponseAttributesModifier) HasEmail() bool {
if o != nil && o.Email != nil {
return true
}
return false
} | [
-0.16523438692092896,
0.5698127746582031,
-0.01657314971089363,
0.36679938435554504,
0.71051424741745,
-0.057628847658634186,
0.5522125363349915,
0.9338855147361755,
0.18632541596889496,
-0.7392250895500183,
-0.0038738122675567865,
-1.0218989849090576,
-0.14319419860839844,
-0.443060576915... |
func (o *SLOCorrectionResponseAttributesModifier) SetEmail(v string) {
o.Email = &v
} | [
-0.4535521864891052,
0.11258366703987122,
-0.18381792306900024,
-0.3784467577934265,
-0.6791412830352783,
0.064418725669384,
0.08090028166770935,
-0.34839263558387756,
0.24551980197429657,
-0.0074410573579370975,
0.3583498001098633,
0.6805038452148438,
-0.3960881233215332,
-1.1289181709289... |
func (o *SLOCorrectionResponseAttributesModifier) GetHandle() string {
if o == nil || o.Handle == nil {
var ret string
return ret
}
return *o.Handle
} | [
0.12166429311037064,
0.37367209792137146,
0.17861850559711456,
0.36638548970222473,
0.7293407917022705,
0.043302685022354126,
0.8358039855957031,
-0.21495157480239868,
0.9985007047653198,
-1.3504891395568848,
0.321327805519104,
-1.4583648443222046,
-1.2436200380325317,
-0.02633230201900005... |
func (o *SLOCorrectionResponseAttributesModifier) GetHandleOk() (*string, bool) {
if o == nil || o.Handle == nil {
return nil, false
}
return o.Handle, true
} | [
0.15134841203689575,
0.0013457071036100388,
0.3675537407398224,
0.3015064001083374,
0.849799394607544,
0.7410638332366943,
0.9122484922409058,
0.7180014848709106,
0.2677747905254364,
-0.21108701825141907,
-0.4795246720314026,
-0.9620992541313171,
-0.18259625136852264,
-0.2185007482767105,
... |
func (o *SLOCorrectionResponseAttributesModifier) HasHandle() bool {
if o != nil && o.Handle != nil {
return true
}
return false
} | [
0.6587429642677307,
0.5853791236877441,
0.23084335029125214,
-0.6713364720344543,
0.8286670446395874,
0.56805419921875,
0.19243910908699036,
0.49295318126678467,
0.48382487893104553,
-1.0843647718429565,
-0.13720880448818207,
-0.9038897156715393,
-0.7771796584129333,
0.3113369345664978,
... |
func (o *SLOCorrectionResponseAttributesModifier) SetHandle(v string) {
o.Handle = &v
} | [
0.16410872340202332,
0.09007016569375992,
-0.08454738557338715,
-1.2740639448165894,
-0.1263834834098816,
0.06463322788476944,
0.10970715433359146,
-0.13585877418518066,
0.331805557012558,
-0.7369146347045898,
0.44513851404190063,
0.3309583067893982,
-1.1198313236236572,
-1.114855647087097... |
func (o *SLOCorrectionResponseAttributesModifier) GetName() string {
if o == nil || o.Name == nil {
var ret string
return ret
}
return *o.Name
} | [
-0.3232005834579468,
0.22120843827724457,
0.03590947762131691,
0.4793959856033325,
-0.1217242032289505,
-0.8470525741577148,
0.7819975018501282,
-0.12459706515073776,
0.7215390205383301,
0.18553708493709564,
-0.5096915364265442,
-1.9227904081344604,
-0.5170217752456665,
0.33517375588417053... |
func (o *SLOCorrectionResponseAttributesModifier) GetNameOk() (*string, bool) {
if o == nil || o.Name == nil {
return nil, false
}
return o.Name, true
} | [
-0.43184196949005127,
-0.013017037883400917,
0.3951755464076996,
0.1268242448568344,
-0.20951202511787415,
0.27836623787879944,
0.41336461901664734,
0.07493903487920761,
0.23949165642261505,
1.082201600074768,
-1.0952603816986084,
-1.1579633951187134,
0.13192777335643768,
0.247772678732872... |
func (o *SLOCorrectionResponseAttributesModifier) HasName() bool {
if o != nil && o.Name != nil {
return true
}
return false
} | [
-0.2970428466796875,
-0.0059411595575511456,
0.05972673371434212,
-0.09922396391630173,
0.13833403587341309,
-0.4640797972679138,
0.34384840726852417,
0.3227563500404358,
0.5001773834228516,
0.4860163629055023,
-0.7098727226257324,
-1.548462152481079,
-0.22457224130630493,
-0.0855684727430... |
func (o *SLOCorrectionResponseAttributesModifier) SetName(v string) {
o.Name = &v
} | [
-0.5612857341766357,
-0.13125190138816833,
-0.11718188971281052,
-0.8494329452514648,
-0.8736629486083984,
-0.3837091326713562,
0.15147535502910614,
-0.3231312334537506,
0.562224805355072,
0.5247214436531067,
-0.49747908115386963,
-0.1834777593612671,
-0.2874331474304199,
-0.63236749172210... |
func (o SLOCorrectionResponseAttributesModifier) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.UnparsedObject != nil {
return json.Marshal(o.UnparsedObject)
}
if o.Email != nil {
toSerialize["email"] = o.Email
}
if o.Handle != nil {
toSerialize["handle"] = o.Handle
}
if o.Na... | [
-0.5892030000686646,
-1.0767431259155273,
0.18069332838058472,
-1.8002026081085205,
-0.23891982436180115,
0.08137208223342896,
0.5024639368057251,
0.6348567008972168,
1.0459712743759155,
-0.07572738081216812,
-0.9468528032302856,
0.1377403438091278,
-0.22918382287025452,
-0.255347698926925... |
func (o *SLOCorrectionResponseAttributesModifier) UnmarshalJSON(bytes []byte) (err error) {
raw := map[string]interface{}{}
all := struct {
Email *string `json:"email,omitempty"`
Handle *string `json:"handle,omitempty"`
Name *string `json:"name,omitempty"`
}{}
err = json.Unmarshal(bytes, &all)
if err != n... | [
-0.9689288139343262,
-0.44363167881965637,
0.460239052772522,
-2.3304946422576904,
-0.18032367527484894,
-0.12802480161190033,
0.5611067414283752,
0.6006912589073181,
0.5641556978225708,
0.27726227045059204,
-0.8782081604003906,
-0.21741648018360138,
-0.43567392230033875,
-0.42612859606742... |
func (v NullableSLOCorrectionResponseAttributesModifier) Get() *SLOCorrectionResponseAttributesModifier {
return v.value
} | [
-0.7001460790634155,
-0.5874850153923035,
0.16728630661964417,
-1.4046308994293213,
0.5888811349868774,
-0.09095720946788788,
0.06697163730859756,
0.49914929270744324,
0.988298773765564,
-0.8246709108352661,
-0.3732072412967682,
-0.3164686858654022,
-0.17376649379730225,
-0.799163401126861... |
func (v *NullableSLOCorrectionResponseAttributesModifier) Set(val *SLOCorrectionResponseAttributesModifier) {
v.value = val
v.isSet = true
} | [
-0.5294475555419922,
-0.27386581897735596,
0.09438972920179367,
-1.3516205549240112,
0.557975709438324,
0.22118544578552246,
0.6131380796432495,
0.16104066371917725,
1.2116495370864868,
-0.5915907621383667,
-0.5325652956962585,
-0.6401986479759216,
-0.028558822348713875,
-0.070136986672878... |
func (v NullableSLOCorrectionResponseAttributesModifier) IsSet() bool {
return v.isSet
} | [
-0.9200840592384338,
-0.6367383599281311,
0.02465248294174671,
-0.9334267973899841,
0.8447742462158203,
-0.2139299064874649,
0.5780276656150818,
0.3744874596595764,
0.3156914710998535,
-0.05622590705752373,
-0.2029164731502533,
-0.46889376640319824,
-0.44752830266952515,
-0.606253802776336... |
func (v *NullableSLOCorrectionResponseAttributesModifier) Unset() {
v.value = nil
v.isSet = false
} | [
-0.7196356058120728,
0.1256398856639862,
0.023554211482405663,
-1.9601365327835083,
0.41918185353279114,
-0.4529379606246948,
0.9994519352912903,
0.3553798794746399,
-0.11496670544147491,
-0.8380774259567261,
0.10312462598085403,
-0.306787371635437,
0.06293220072984695,
-0.5679925680160522... |
func NewNullableSLOCorrectionResponseAttributesModifier(val *SLOCorrectionResponseAttributesModifier) *NullableSLOCorrectionResponseAttributesModifier {
return &NullableSLOCorrectionResponseAttributesModifier{value: val, isSet: true}
} | [
-0.2012191265821457,
-0.9608639478683472,
0.11765540391206741,
-1.6395000219345093,
-0.323219358921051,
-0.2403276264667511,
0.3472430408000946,
0.10472142696380615,
1.6330369710922241,
-0.299025297164917,
-0.398547500371933,
-1.2234898805618286,
-0.013835291378200054,
-0.20368531346321106... |
func (v NullableSLOCorrectionResponseAttributesModifier) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
} | [
-0.41046109795570374,
-0.6980035305023193,
-0.05564260110259056,
-0.9367284774780273,
-0.15805189311504364,
-0.19574232399463654,
0.38092201948165894,
0.5286986231803894,
0.77082759141922,
-0.2887915372848511,
-0.6029331088066101,
-0.234705850481987,
-0.09396084398031235,
0.037112556397914... |
func (v *NullableSLOCorrectionResponseAttributesModifier) UnmarshalJSON(src []byte) error {
v.isSet = true
// this object is nullable so check if the payload is null or empty string
if string(src) == "" || string(src) == "{}" {
return nil
}
return json.Unmarshal(src, &v.value)
} | [
-1.0526736974716187,
-0.18622182309627533,
0.3707503378391266,
-1.625984787940979,
-0.22520866990089417,
-0.46664950251579285,
0.5171640515327454,
0.40285640954971313,
0.6908848881721497,
-0.04688309133052826,
-0.16732987761497498,
-0.47753801941871643,
-0.4812447130680084,
0.1938090771436... |
func NewMockFeatureService(ctrl *gomock.Controller) *MockFeatureService {
mock := &MockFeatureService{ctrl: ctrl}
mock.recorder = &MockFeatureServiceMockRecorder{mock}
return mock
} | [
-0.20626670122146606,
-0.060192231088876724,
0.02183070033788681,
1.1004722118377686,
0.37305957078933716,
-0.44636717438697815,
0.34882399439811707,
-0.903484582901001,
0.24228379130363464,
-0.1747644990682602,
-0.4671180248260498,
0.09470726549625397,
-0.6424928903579712,
1.0975507497787... |
func (m *MockFeatureService) EXPECT() *MockFeatureServiceMockRecorder {
return m.recorder
} | [
-0.08363834023475647,
0.38113564252853394,
0.27118510007858276,
0.5353479981422424,
0.14511176943778992,
-0.08431772887706757,
-0.22175748646259308,
0.26529911160469055,
0.17236843705177307,
-0.7897008061408997,
0.7586070895195007,
0.8288384079933167,
-0.39181068539619446,
0.72735834121704... |
func (m *MockFeatureService) Create(arg0 context.Context, arg1 *service.CreateFeatureData) (*entity.Feature, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Create", arg0, arg1)
ret0, _ := ret[0].(*entity.Feature)
ret1, _ := ret[1].(error)
return ret0, ret1
} | [
-0.6641937494277954,
-0.053738825023174286,
0.27693548798561096,
1.1447299718856812,
1.6777328252792358,
0.4670645594596863,
0.6653227806091309,
-0.23360641300678253,
-1.4626742601394653,
-0.3348505198955536,
-0.4119991660118103,
-1.0322890281677246,
-0.011249322444200516,
1.28561711311340... |
func (mr *MockFeatureServiceMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockFeatureService)(nil).Create), arg0, arg1)
} | [
-0.25199171900749207,
0.5718047618865967,
0.23873822391033173,
0.8207024335861206,
0.28697219491004944,
0.6020820736885071,
-0.6210225820541382,
-1.262544870376587,
-0.40771108865737915,
0.5323145985603333,
0.9391320943832397,
-0.02349543198943138,
-0.3465723693370819,
1.8739546537399292,
... |
func (m *MockFeatureService) Delete(arg0 context.Context, arg1 uint) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delete", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
} | [
-0.4474433660507202,
0.32187893986701965,
0.541821300983429,
0.9387027025222778,
1.5418920516967773,
0.28916722536087036,
0.7174776792526245,
0.0726698637008667,
-0.4457855224609375,
-0.26923078298568726,
0.04955069348216057,
-0.3680240511894226,
-0.849457323551178,
0.8415051698684692,
0... |
func (mr *MockFeatureServiceMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockFeatureService)(nil).Delete), arg0, arg1)
} | [
-0.1400386393070221,
0.8156511783599854,
0.4582359194755554,
0.7466648817062378,
0.2028135359287262,
0.30248865485191345,
-0.41154924035072327,
-0.886595606803894,
0.5777835249900818,
0.42279052734375,
1.0881215333938599,
0.6250218749046326,
-0.7336148023605347,
1.302861213684082,
-0.061... |
func (m *MockFeatureService) GetByGameRevisionID(arg0 context.Context, arg1 uint) ([]entity.Feature, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetByGameRevisionID", arg0, arg1)
ret0, _ := ret[0].([]entity.Feature)
ret1, _ := ret[1].(error)
return ret0, ret1
} | [
-0.3484877347946167,
-0.010175598785281181,
0.518352210521698,
0.9124084115028381,
0.6874960660934448,
-0.40234115719795227,
0.8090040683746338,
-0.5444290637969971,
-0.9856378436088562,
-0.4671468734741211,
-0.2920612692832947,
-0.34291762113571167,
-0.12909172475337982,
0.460190594196319... |
func (mr *MockFeatureServiceMockRecorder) GetByGameRevisionID(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByGameRevisionID", reflect.TypeOf((*MockFeatureService)(nil).GetByGameRevisionID), arg0, arg1)
} | [
0.061262305825948715,
0.6863186359405518,
0.3910297751426697,
0.3654274046421051,
0.06692046672105789,
-0.36925074458122253,
-0.6059008240699768,
-0.9748059511184692,
-0.10503335297107697,
0.6257354021072388,
0.541303277015686,
0.5706871747970581,
0.009221091866493225,
0.6906179785728455,
... |
func (m *MockFeatureService) GetByID(arg0 context.Context, arg1 uint) (*entity.Feature, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetByID", arg0, arg1)
ret0, _ := ret[0].(*entity.Feature)
ret1, _ := ret[1].(error)
return ret0, ret1
} | [
0.5230796337127686,
-0.5143305659294128,
0.5595153570175171,
0.7798194289207458,
1.2829339504241943,
0.14693555235862732,
1.1561715602874756,
-0.5260055661201477,
-0.6591413617134094,
-0.40470361709594727,
-1.1771897077560425,
0.20171664655208588,
-0.5465777516365051,
0.6909092664718628,
... |
func (mr *MockFeatureServiceMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockFeatureService)(nil).GetByID), arg0, arg1)
} | [
0.7951570749282837,
0.514910876750946,
0.3771152198314667,
0.4182482659816742,
0.4567910134792328,
0.13561952114105225,
0.08613996207714081,
-1.2097454071044922,
0.3527468144893646,
0.5630649328231812,
0.13380777835845947,
1.2236093282699585,
-0.6527302265167236,
0.9369503855705261,
0.04... |
func (m *MockFeatureService) GetByIDs(arg0 context.Context, arg1 []uint) ([]entity.Feature, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetByIDs", arg0, arg1)
ret0, _ := ret[0].([]entity.Feature)
ret1, _ := ret[1].(error)
return ret0, ret1
} | [
0.01983344927430153,
-0.1124885156750679,
0.26320746541023254,
-0.06164690852165222,
1.0447428226470947,
-0.19096176326274872,
1.0914517641067505,
-0.6081827282905579,
-0.9902571439743042,
-0.5547703504562378,
-0.9104145169258118,
0.5411026477813721,
-0.7439934015274048,
0.19609335064888,
... |
func (mr *MockFeatureServiceMockRecorder) GetByIDs(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByIDs", reflect.TypeOf((*MockFeatureService)(nil).GetByIDs), arg0, arg1)
} | [
0.1999913454055786,
0.7465396523475647,
0.30237457156181335,
-0.36663493514060974,
0.40029188990592957,
-0.40621063113212585,
-0.006023585330694914,
-1.2080330848693848,
-0.09790373593568802,
0.362601637840271,
0.1007704809308052,
1.283060908317566,
-0.6538068652153015,
0.47319266200065613... |
func (m *MockFeatureService) GetExistByID(arg0 context.Context, arg1 uint) (*entity.Feature, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetExistByID", arg0, arg1)
ret0, _ := ret[0].(*entity.Feature)
ret1, _ := ret[1].(error)
return ret0, ret1
} | [
-0.16453610360622406,
-0.31070801615715027,
0.39769309759140015,
0.7938807606697083,
1.2040096521377563,
-0.014809984713792801,
1.0019077062606812,
-0.6030754446983337,
-0.7965211272239685,
0.31544753909111023,
-1.1542471647262573,
-0.5901405215263367,
-0.5721356868743896,
0.92085850238800... |
func (mr *MockFeatureServiceMockRecorder) GetExistByID(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExistByID", reflect.TypeOf((*MockFeatureService)(nil).GetExistByID), arg0, arg1)
} | [
0.14604713022708893,
0.5377054810523987,
0.41076427698135376,
0.4648981988430023,
0.3838461637496948,
0.05801637843251228,
-0.10829459875822067,
-1.1201047897338867,
0.16924087703227997,
1.467935562133789,
-0.09402444213628769,
0.014825071208178997,
-0.6457635760307312,
1.281139612197876,
... |
func (m *MockFeatureService) Update(arg0 context.Context, arg1 *service.UpdateFeatureData) (*entity.Feature, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Update", arg0, arg1)
ret0, _ := ret[0].(*entity.Feature)
ret1, _ := ret[1].(error)
return ret0, ret1
} | [
-0.7191336750984192,
-0.7820271849632263,
0.48093247413635254,
0.6886836290359497,
0.8616988062858582,
0.540243923664093,
0.6008052229881287,
-0.005854845978319645,
-0.6767128705978394,
-0.14153729379177094,
-0.49111998081207275,
-0.709018349647522,
-0.45380455255508423,
0.5960543155670166... |
func (mr *MockFeatureServiceMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockFeatureService)(nil).Update), arg0, arg1)
} | [
-0.42247650027275085,
0.08117391169071198,
0.33811450004577637,
0.427169531583786,
-0.3447021543979645,
0.43487033247947693,
-0.473459929227829,
-0.8921325206756592,
0.4746580719947815,
0.5382605195045471,
0.8691704273223877,
0.289951890707016,
-0.9160047769546509,
1.195175051689148,
-0.... |
func (m *MockFeatureService) UpdateFeaturesForGameRevision(arg0 context.Context, arg1 *entity.GameRevision, arg2 []uint) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UpdateFeaturesForGameRevision", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
} | [
-0.5863655805587769,
-0.4718497395515442,
0.5340302586555481,
0.37962210178375244,
0.258993923664093,
0.24800783395767212,
0.5167180299758911,
-0.12967434525489807,
-1.4126918315887451,
-0.7416931390762329,
-0.5343782901763916,
-0.773242712020874,
-0.731801450252533,
-0.06070039048790932,
... |
func (mr *MockFeatureServiceMockRecorder) UpdateFeaturesForGameRevision(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateFeaturesForGameRevision", reflect.TypeOf((*MockFeatureService)(nil).UpdateFeaturesForGameRevision), arg0, arg1, arg2... | [
-0.7041089534759521,
-0.11101196706295013,
0.33535221219062805,
0.17438943684101105,
-0.5238937735557556,
-0.03619113937020302,
-0.7794860601425171,
-0.5402289032936096,
-0.4977428913116455,
0.2080770879983902,
0.14976492524147034,
0.18542537093162537,
-0.3758467137813568,
0.45662873983383... |
func Parse(t interface{}, f interface{}) (Struct, error) {
typeMeta := typemeta.NonPtr(typemeta.Get(t))
structTypeMeta := typemeta.StructOf(typeMeta)
emptyFragment := Struct{typeMeta: structTypeMeta}
switch f := f.(type) {
case Struct:
if typeMeta.Primitive() {
if !f.IsUndefined() {
return Struct{}, error... | [
-0.03168754652142525,
0.1845184564590454,
0.9302506446838379,
-0.03505939990282059,
-0.02674657292664051,
-0.3424323797225952,
0.334087997674942,
-0.40482139587402344,
-0.5464807152748108,
-0.5650848150253296,
0.3243201673030853,
0.14352472126483917,
-0.7365281581878662,
-0.299677759408950... |
func TestRepeatingXOR(t *testing.T) {
src := []byte("Burning 'em, if you ain't quick and nimble\nI go crazy when I hear a cymbal")
key := []byte("ICE")
want := b.Must(hex.DecodeString("0b3637272a2b2e63622c2e69692a23693a2a3c6324202d623d63343c2a26226324272765272a282b2f20430a652e2c652a3124333a653e2b2027630c692b20283165... | [
-1.1839090585708618,
1.046317458152771,
0.5049105286598206,
0.3321612477302551,
-0.04721201956272125,
-0.04078647121787071,
-0.6117668151855469,
0.0029324099887162447,
-0.07954470813274384,
0.16922049224376678,
-1.5251613855361938,
0.10540921986103058,
-0.939643919467926,
-0.51515811681747... |
func NewEmptyTagMap() map[string]interface{} {
return map[string]interface{}{
"inname": "",
"exname": "",
"type": "",
"keytype": "",
"length": 0,
"keylength": 0,
"scale": 0,
"keyscale": 0,
"precision": 0,
"keyprecision": 0,
"fiel... | [
-0.663435161113739,
-0.5699165463447571,
0.7110748887062073,
-0.96120285987854,
0.12598924338817596,
0.2908536493778229,
-0.14784526824951172,
-0.20851224660873413,
-1.16000497341156,
-0.02832617051899433,
-0.9914790987968445,
-0.025300316512584686,
0.12945115566253662,
0.45039522647857666... |
func GetKeyTagMap(src map[string]interface{}) map[string]interface{} {
res := NewEmptyTagMap()
res["inname"] = "key"
res["exname"] = "key"
res["type"] = src["keytype"]
res["length"] = src["keylength"]
res["scale"] = src["keyscale"]
res["precision"] = src["keyprecision"]
res["fieldid"] = src["keyfieldid"]
retur... | [
-0.6651564836502075,
-0.062449801713228226,
0.5683018565177917,
-0.8297320604324341,
-0.3719989061355591,
0.15011125802993774,
-0.9531192779541016,
-0.00814563687890768,
-0.563838005065918,
0.40532228350639343,
-1.3453717231750488,
-0.03624390810728073,
-0.45759785175323486,
0.752219438552... |
func GetValueTagMap(src map[string]interface{}) map[string]interface{} {
res := NewEmptyTagMap()
res["inname"] = "value"
res["exname"] = "value"
res["type"] = src["type"]
res["length"] = src["length"]
res["scale"] = src["scale"]
res["precision"] = src["precision"]
res["fieldid"] = src["fieldid"]
return res
} | [
-0.9353587031364441,
0.03738543391227722,
0.6126935482025146,
-0.8872372508049011,
0.2574247717857361,
-0.08714572340250015,
-0.7404613494873047,
-0.1796935498714447,
-0.42822033166885376,
0.3244504928588867,
-0.7779858708381653,
0.2628857493400574,
0.41201820969581604,
0.30036935210227966... |
func HeadToUpper(str string) string {
ln := len(str)
if ln <= 0 {
return str
}
return strings.ToUpper(str[0:1]) + str[1:]
} | [
-0.8230286836624146,
-0.3043385148048401,
0.8496682047843933,
0.23062649369239807,
-0.8546893000602722,
0.4077036678791046,
-0.5728939771652222,
-0.5419837236404419,
0.28218239545822144,
0.1298680156469345,
0.46839869022369385,
0.2494581937789917,
-0.8963289260864258,
-0.6219906806945801,
... |
func BitNum(num uint64) uint64 {
var bitn int64 = 63
for (bitn >= 0) && (((1 << uint64(bitn)) & num) == 0) {
bitn--
}
return uint64(bitn + 1)
} | [
-0.6461259126663208,
0.6834375858306885,
0.6958115100860596,
1.3441354036331177,
0.5049107670783997,
-0.7594842910766602,
0.9727348685264587,
-0.5168147087097168,
0.7864222526550293,
-1.4217638969421387,
0.42113229632377625,
0.4929022789001465,
0.189482644200325,
0.20109990239143372,
0.2... |
func Cmp(ai interface{}, bi interface{}) int {
if ai == nil && bi != nil {
return -1
} else if ai == nil && bi == nil {
return 0
} else if ai != nil && bi == nil {
return 1
}
name := reflect.TypeOf(ai).Name()
switch name {
case "BOOLEAN":
a, b := 0, 0
if ai.(ParquetType.BOOLEAN) {
a = 1
}
if bi... | [
0.29586344957351685,
-0.7790842652320862,
1.0651854276657104,
-0.6161360740661621,
-0.04162998124957085,
0.10361325740814209,
0.8602463603019714,
-0.7826745510101318,
-0.30826836824417114,
0.5304778814315796,
0.008203989826142788,
-0.006074830889701843,
-0.40926581621170044,
0.316528171300... |
func Max(a interface{}, b interface{}) interface{} {
if a == nil {
return b
}
if b == nil {
return a
}
if Cmp(a, b) > 0 {
return a
}
return b
} | [
0.686646044254303,
0.32292109727859497,
0.45417624711990356,
1.1805524826049805,
0.25229695439338684,
-0.4152454137802124,
-1.0419244766235352,
-0.025492610409855843,
0.22701667249202728,
0.08224023133516312,
0.7559772729873657,
1.295884609222412,
-0.009500416927039623,
0.3813350796699524,... |
func Min(a interface{}, b interface{}) interface{} {
if a == nil {
return b
}
if b == nil {
return a
}
if Cmp(a, b) > 0 {
return b
}
return a
} | [
0.8732066750526428,
-0.406137615442276,
0.4570480287075043,
0.6163477897644043,
-0.4170221984386444,
-0.3086616098880768,
-0.8680031895637512,
-0.4053041636943817,
0.49498221278190613,
-0.39694398641586304,
1.0981416702270508,
1.183948040008545,
-0.1790541261434555,
0.5071398615837097,
0... |
func SizeOf(val reflect.Value) int64 {
tk := val.Type().Kind()
if tk == reflect.Ptr {
if val.IsNil() {
return 0
}
val = val.Elem()
return SizeOf(val)
}
if tk == reflect.Slice {
var size int64 = 0
for i := 0; i < val.Len(); i++ {
size += SizeOf(val.Index(i))
}
return size
} else if tk == ref... | [
-0.22586122155189514,
0.9289470911026001,
0.9578123092651367,
-0.5426086783409119,
-1.046863079071045,
-0.3875812888145447,
0.05416613072156906,
-0.7365956902503967,
0.2233448177576065,
0.061763085424900055,
-0.17707735300064087,
-0.03739817067980766,
-0.03060641512274742,
1.01809716224670... |
func PathToStr(path []string) string {
return strings.Join(path, ".")
} | [
0.03531545773148537,
-0.9576141238212585,
0.37975937128067017,
-0.43203750252723694,
-0.19889122247695923,
0.840869128704071,
-0.18788525462150574,
-0.829598605632782,
-0.20233917236328125,
0.08117900043725967,
0.034426286816596985,
-0.24071212112903595,
-0.13592182099819183,
-0.8560419082... |
func StrToPath(str string) []string {
return strings.Split(str, ".")
} | [
0.013689586892724037,
-0.5900209546089172,
0.6937471032142639,
0.21683841943740845,
-0.4608675539493561,
0.2908003330230713,
0.6983383297920227,
-0.6549946069717407,
0.6095304489135742,
1.4768717288970947,
-0.8372393250465393,
0.12115734815597534,
-0.27503734827041626,
-0.6635013818740845,... |
func (f FixtData) Paygen() *Paygen {
return f.paygen
} | [
-0.37579792737960815,
0.43676191568374634,
0.2512454688549042,
0.38722333312034607,
-0.2216426283121109,
0.4143103063106537,
-0.22807584702968597,
0.23825126886367798,
-0.8931787014007568,
-0.6028327941894531,
-0.14515843987464905,
-0.30310294032096863,
0.47419822216033936,
0.7177983522415... |
func (au *autoupdateFixt) SetUp(ctx context.Context, s *testing.FixtState) interface{} {
lsbContent := map[string]string{
lsbrelease.Version: "",
lsbrelease.BuilderPath: "",
}
if err := FillFromLSBRelease(ctx, s.DUT(), s.RPCHint(), lsbContent); err != nil {
s.Fatal("Failed to get all the required informat... | [
0.1705033928155899,
-0.5458214282989502,
0.6759681105613708,
-0.012581280432641506,
-0.3398895859718323,
0.07511359453201294,
-0.14577531814575195,
-0.016351712867617607,
0.039678335189819336,
0.38338619470596313,
-0.1981341391801834,
0.18760772049427032,
-0.28600069880485535,
0.5126743316... |
func (au *autoupdateFixt) PreTest(ctx context.Context, s *testing.FixtTestState) {
s.Log("Running PreTest to make sure the image is the right one")
// Check the image version.
if version, err := ImageVersion(ctx, s.DUT(), s.RPCHint()); err != nil {
s.Fatal("Failed to read DUT image version before the test: ", err... | [
0.06776268035173416,
0.02276398241519928,
0.4816383123397827,
0.2964261770248413,
0.4074246287345886,
0.39048054814338684,
0.6438880562782288,
-0.24150119721889496,
0.31421980261802673,
0.5287981033325195,
0.4165162444114685,
0.6400325894355774,
0.46085959672927856,
0.03416799008846283,
... |
func (au *autoupdateFixt) PostTest(ctx context.Context, s *testing.FixtTestState) {
checkTimeout := 1 * time.Minute
rollbackTimeout := 4 * time.Minute
// Limit the timeout for the version check.
checkCtx, cancel := context.WithTimeout(ctx, checkTimeout)
defer cancel()
// Check the connection to the DUT.
if out... | [
0.768410325050354,
-0.31361791491508484,
0.8690956830978394,
0.5120201110839844,
-0.22383125126361847,
-0.39798688888549805,
0.41147762537002563,
0.0559084452688694,
0.08624296635389328,
0.15673765540122986,
0.08200963586568832,
0.5524576902389526,
-0.33434832096099854,
0.0371844507753849,... |
func (au *autoupdateFixt) TearDown(ctx context.Context, s *testing.FixtState) {
// Check the image version.
version, err := ImageVersion(ctx, s.DUT(), s.RPCHint())
if err != nil {
s.Fatal("Failed to read DUT image version after the rollback: ", err)
}
// If the force provision is not deleted, the Test Library S... | [
0.32844096422195435,
0.15556447207927704,
0.7750871777534485,
-0.28528282046318054,
0.5042199492454529,
0.5442714691162109,
0.8121204376220703,
0.7199059724807739,
0.608069658279419,
1.165144681930542,
0.33355697989463806,
0.6065238118171692,
-0.09741978347301483,
0.12246325612068176,
0.... |
func newSession() string {
u, _ := uuid.NewV4()
return u.String()
} | [
-0.7467395067214966,
-1.379973292350769,
0.24564488232135773,
-0.6931335926055908,
-0.9484296441078186,
0.39860445261001587,
0.06831016391515732,
-0.551999032497406,
0.5523598790168762,
0.8732810020446777,
-0.3112872540950775,
0.6108222603797913,
-0.4717809855937958,
-0.9741649031639099,
... |
func newUser() string {
return goherokuname.Haikunate()
} | [
0.056308943778276443,
0.07341170310974121,
0.13203833997249603,
1.2111175060272217,
-0.718249499797821,
0.4097481369972229,
-0.33458301424980164,
0.008141708560287952,
-0.29157426953315735,
-0.8627614378929138,
-0.696577250957489,
-0.28516340255737305,
-0.34042295813560486,
0.1548321843147... |
func validateSessionToken(token string) (username string, found bool) {
username, found = sessions[token]
return
} | [
-1.2119566202163696,
-1.4454896450042725,
0.11974252015352249,
-0.021942364051938057,
-0.8281329870223999,
0.036924347281455994,
0.7272748947143555,
-0.6579720377922058,
0.8512563705444336,
0.18736113607883453,
-0.9364029169082642,
0.22800026834011078,
-0.00539156561717391,
-0.404197841882... |
func Song() string {
s := make([]string, 12)
for i := 1; i <= 12; i++ {
s[i-1] = verses[i].String()
}
return strings.Join(s, "\n\n")
} | [
0.14698566496372223,
-0.4615112841129303,
0.7001490592956543,
-0.7694917917251587,
-0.3250616192817688,
0.8674238324165344,
-0.5061784386634827,
-0.6004049777984619,
-0.25397446751594543,
0.43504464626312256,
0.1910267025232315,
0.2942245602607727,
-0.45445603132247925,
-0.0008165426552295... |
func Verse(n int) string {
return verses[n].String()
} | [
-1.7882364988327026,
-0.4296167194843292,
0.3859950602054596,
-0.8077499270439148,
-0.913206934928894,
0.14982177317142487,
-0.4667898118495941,
-1.303760290145874,
-0.6797753572463989,
0.4889211654663086,
-0.09428109973669052,
-0.32129865884780884,
-0.11725818365812302,
0.4048344492912292... |
func GetContentReader(url string) (io.ReadCloser, error) {
// http.Get() allows up to 10 redirects
res, err := http.Get(url)
if err != nil {
return nil, err
}
if res.StatusCode/100 != 2 {
return nil, errors.New(url + " returned non-successful status: " + res.Status)
}
return res.Body, nil
} | [
-0.6472648978233337,
-0.21251799166202545,
0.8203423619270325,
-0.26450344920158386,
-0.6241761445999146,
-0.04185891151428223,
-0.4687207043170929,
-0.14120705425739288,
-0.12489989399909973,
-0.24411170184612274,
0.4611431658267975,
0.04067576304078102,
-0.7086178660392761,
0.11997066438... |
func GetContent(url string) ([]byte, error) {
r, err := GetContentReader(url)
if err != nil {
return nil, err
}
defer r.Close()
return ioutil.ReadAll(r)
} | [
-0.16775602102279663,
-0.5693660378456116,
0.6378812789916992,
0.19221937656402588,
-0.6008782386779785,
-0.30275535583496094,
-0.20685352385044098,
-0.6996715068817139,
-0.040734972804784775,
0.4309338331222534,
-0.2625735104084015,
0.12285678833723068,
-0.8108280897140503,
-0.52506786584... |
func GetContentString(url string) (string, error) {
b, err := GetContent(url)
return string(b), err
} | [
-0.6905605792999268,
-0.4240674674510956,
0.5081702470779419,
0.4246012568473816,
-0.3783886730670929,
-0.12417709827423096,
0.3535858988761902,
-0.9875485897064209,
-0.22975167632102966,
0.3765198886394501,
0.23418253660202026,
-0.34779566526412964,
-0.21602687239646912,
-0.70020633935928... |
func CheckOperationsTimeout(model Model, history []Operation, timeout time.Duration) bool {
model = fillDefault(model)
partitions := model.Partition(history)
ok := true
results := make(chan bool)
kill := int32(0)
for _, subhistory := range partitions {
l := makeLinkedEntries(makeEntries(subhistory))
go func()... | [
-0.02529779262840748,
1.1194822788238525,
0.7687491178512573,
0.6810041069984436,
-0.12065967917442322,
-0.1782139390707016,
0.5342409610748291,
0.006263457704335451,
-0.39255765080451965,
0.6222103238105774,
0.1758125126361847,
-1.132433533668518,
-0.389465868473053,
0.01245839148759842,
... |
func CheckEventsTimeout(model Model, history []Event, timeout time.Duration) bool {
model = fillDefault(model)
partitions := model.PartitionEvent(history)
ok := true
results := make(chan bool)
kill := int32(0)
for _, subhistory := range partitions {
l := makeLinkedEntries(convertEntries(renumber(subhistory)))
... | [
0.43911033868789673,
0.1750396192073822,
0.7551940083503723,
0.2956288456916809,
-0.22278691828250885,
-0.2275850623846054,
-0.07662259042263031,
0.326710045337677,
-0.3256869316101074,
0.42979690432548523,
-0.1765758991241455,
-0.44684258103370667,
-0.405107706785202,
-0.01237741485238075... |
func Connect(path string) (*sql.DB, error){
//TODO: Commit feature
log.Println("INFO: Connecting to the DB")
db, err := sql.Open("mysql", path)
log.Println("INFO: Connected to the DB")
return db, err
} | [
-0.20705921947956085,
-0.0851118192076683,
0.5694114565849304,
0.2972145974636078,
-1.147907018661499,
0.346306711435318,
-0.1834031641483307,
-0.33887049555778503,
-0.5620385408401489,
0.2707299590110779,
0.24501946568489075,
0.08938875049352646,
-0.4823850989341736,
0.2592882812023163,
... |
func UpdateLocation(data models.Location, LicenseNo string)(int64, error){
result, err := updateLocationStmt.Exec(
data.Latitude,
data.Longitude,
data.Speed,
data.Heading,
LicenseNo,
)
rowsAffected , _ := result.RowsAffected()
return rowsAffected , err
} | [
-1.2321120500564575,
-0.42241358757019043,
0.7255551218986511,
0.13006064295768738,
-0.8621410727500916,
-0.8245021104812622,
0.5195367932319641,
1.2892690896987915,
-0.09094059467315674,
0.560477614402771,
0.10848863422870636,
0.03593401238322258,
-0.5577303767204285,
-0.16426555812358856... |
func UpdateBusAvailability(LicenseNo string, data int)(int64, error){
result, err := updateAvailabilityStmt.Exec(data, LicenseNo)
rowsAffected, _ := result.RowsAffected()
return rowsAffected, err
} | [
-1.2839326858520508,
-0.8898814916610718,
0.5803605318069458,
0.7195720076560974,
-0.927304208278656,
0.22463743388652802,
0.8783988952636719,
1.892125129699707,
0.0878823921084404,
1.1461950540542603,
-0.6078153848648071,
0.3475455045700073,
-1.5914061069488525,
0.019956201314926147,
1.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.