text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (a *DefaultApiService) PauseVM(ctx _context.Context) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
localVarPath := a... | [
-1.267812728881836,
-0.6833450198173523,
1.0504132509231567,
-0.22199617326259613,
0.08402786403894424,
-0.011378341354429722,
-0.11494658142328262,
-0.27796751260757446,
-0.4657214879989624,
0.3151138126850128,
0.16462525725364685,
0.38136032223701477,
-1.6001489162445068,
0.2169521003961... |
func (a *DefaultApiService) RebootVM(ctx _context.Context) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
localVarPath := ... | [
-1.308927297592163,
-0.34856337308883667,
1.0327119827270508,
0.05152124539017677,
-0.07732933014631271,
-0.11371085792779922,
0.006028993055224419,
-0.29126420617103577,
-0.5114060640335083,
0.47140464186668396,
-0.06871835142374039,
0.7324371337890625,
-1.4848541021347046,
0.543473005294... |
func (a *DefaultApiService) ResumeVM(ctx _context.Context) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
localVarPath := ... | [
-0.6799317598342896,
-0.3268427550792694,
1.0373839139938354,
-0.2898828387260437,
-0.026176191866397858,
-0.129520982503891,
-0.16742172837257385,
-0.2086765170097351,
-0.5235998630523682,
0.07986541092395782,
-0.0287138931453228,
0.6340210437774658,
-1.511081337928772,
0.0830065980553627... |
func (a *DefaultApiService) ShutdownVM(ctx _context.Context) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
localVarPath :... | [
-1.5085631608963013,
-0.3764105439186096,
0.9941131472587585,
-0.38088226318359375,
-0.17245814204216003,
-0.18368077278137207,
0.04009176045656204,
-0.37666094303131104,
-0.578451931476593,
0.21439042687416077,
0.009697560220956802,
0.6881203055381775,
-1.5733568668365479,
0.5351067185401... |
func (a *DefaultApiService) ShutdownVMM(ctx _context.Context) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
localVarPath ... | [
-1.1876888275146484,
-0.6733012795448303,
0.9736274480819702,
-0.46686840057373047,
-0.32820770144462585,
-0.14778530597686768,
-0.16500337421894073,
-0.48671600222587585,
-0.17715640366077423,
0.5206186771392822,
0.14200811088085175,
0.7308205366134644,
-2.086683511734009,
0.5265483260154... |
func (a *DefaultApiService) VmAddDevicePut(ctx _context.Context, vmAddDevice VmAddDevice) (PciDeviceInfo, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
localVa... | [
-0.9749048948287964,
-0.16458408534526825,
1.0008009672164917,
-0.9517048597335815,
-0.8255507946014404,
0.13057880103588104,
0.31167784333229065,
-0.7256592512130737,
-0.13638563454151154,
0.12010860443115234,
0.4070020318031311,
0.30519673228263855,
-1.1363083124160767,
0.631641149520874... |
func (a *DefaultApiService) VmAddDiskPut(ctx _context.Context, diskConfig DiskConfig) (PciDeviceInfo, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
localVarRet... | [
-0.9378582239151001,
0.1506810188293457,
1.084517002105713,
-0.6557775735855103,
-0.6544355154037476,
0.06953713297843933,
0.43563947081565857,
-0.4552922546863556,
-0.5662294030189514,
0.16409899294376373,
-0.12420807033777237,
0.17215733230113983,
-1.2868378162384033,
0.587749719619751,
... |
func (a *DefaultApiService) VmAddFsPut(ctx _context.Context, fsConfig FsConfig) (PciDeviceInfo, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
localVarReturnVal... | [
-0.7449342608451843,
0.1099429652094841,
0.9126913547515869,
-1.1912719011306763,
-0.46096035838127136,
-0.5016417503356934,
0.07815703749656677,
-0.4927046597003937,
-0.19924800097942352,
-0.12224199622869492,
0.25356560945510864,
0.12883718311786652,
-0.9880111813545227,
0.20122905075550... |
func (a *DefaultApiService) VmAddNetPut(ctx _context.Context, netConfig NetConfig) (PciDeviceInfo, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
localVarReturn... | [
-0.9473046660423279,
0.005555132869631052,
0.9134241938591003,
-0.9077824950218201,
-0.4424581825733185,
0.038211844861507416,
0.1393168717622757,
-0.6934666037559509,
-0.40206754207611084,
0.03329113498330116,
-0.24270911514759064,
-0.11984375864267349,
-1.1672495603561401,
0.563817381858... |
func (a *DefaultApiService) VmAddPmemPut(ctx _context.Context, pmemConfig PmemConfig) (PciDeviceInfo, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
localVarRet... | [
-1.198889970779419,
-0.14610354602336884,
1.0357710123062134,
-0.9049502015113831,
-0.5514256358146667,
0.19349054992198944,
0.0676482766866684,
-0.3846975564956665,
0.024205083027482033,
0.15106627345085144,
0.018071172758936882,
-0.17750991880893707,
-1.5040479898452759,
0.28085699677467... |
func (a *DefaultApiService) VmAddVsockPut(ctx _context.Context, vsockConfig VsockConfig) (PciDeviceInfo, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
localVar... | [
-0.6909180283546448,
0.32232865691185,
0.9493159651756287,
-0.9126771092414856,
-0.3618565797805786,
-0.20003828406333923,
0.4143899381160736,
-0.694783091545105,
-0.08392882347106934,
0.44351574778556824,
-0.2468360811471939,
0.47591301798820496,
-1.5230880975723267,
0.21643629670143127,
... |
func (a *DefaultApiService) VmCountersGet(ctx _context.Context) (map[string]map[string]int64, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
localVarReturnValue... | [
-0.845816433429718,
-0.41035300493240356,
1.0090398788452148,
-0.7706973552703857,
-0.17155541479587555,
-0.04162219911813736,
-0.36491623520851135,
-0.5298491716384888,
-1.170302391052246,
0.12317907065153122,
0.10089807957410812,
0.7478845119476318,
-1.7970482110977173,
0.643059492111206... |
func (a *DefaultApiService) VmInfoGet(ctx _context.Context) (VmInfo, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
localVarReturnValue VmInfo
)
// create p... | [
-0.5678240656852722,
-0.8949316143989563,
0.9109551310539246,
-0.9453697800636292,
-0.13545440137386322,
-0.22308555245399475,
-0.3413357436656952,
-0.47901469469070435,
-0.9490028023719788,
0.28670820593833923,
-0.14018581807613373,
0.6870982646942139,
-1.2194417715072632,
0.5580624341964... |
func (a *DefaultApiService) VmRemoveDevicePut(ctx _context.Context, vmRemoveDevice VmRemoveDevice) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
)
// create ... | [
-1.3815488815307617,
0.1842871755361557,
0.8886318206787109,
-0.3677945137023926,
-0.7675645351409912,
-0.37801241874694824,
0.6022024750709534,
0.10179578512907028,
-0.41808006167411804,
0.4515593647956848,
-0.23316660523414612,
0.097709059715271,
-1.5955142974853516,
0.21124322712421417,... |
func (a *DefaultApiService) VmResizePut(ctx _context.Context, vmResize VmResize) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
)
// create path and map varia... | [
-0.8626503944396973,
0.07238834351301193,
0.9731661677360535,
-0.8179410099983215,
-0.3242126703262329,
-0.33778244256973267,
-0.08897917717695236,
0.006497744470834732,
-0.688555121421814,
1.0540341138839722,
-0.18187271058559418,
0.39571917057037354,
-1.8289695978164673,
-0.2553972601890... |
func (a *DefaultApiService) VmResizeZonePut(ctx _context.Context, vmResizeZone VmResizeZone) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
)
// create path a... | [
-0.9196957349777222,
-0.19011707603931427,
0.8329086303710938,
-0.2899342477321625,
-0.45488935708999634,
-0.4573388993740082,
0.9332074522972107,
-0.16756679117679596,
-0.2336074858903885,
0.8448302745819092,
-0.5259745121002197,
0.5320123434066772,
-1.673203706741333,
-0.2147545367479324... |
func (a *DefaultApiService) VmRestorePut(ctx _context.Context, restoreConfig RestoreConfig) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
)
// create path an... | [
-0.44787535071372986,
-0.1698058545589447,
1.0239659547805786,
-0.6271860003471375,
-0.48691990971565247,
-0.46098119020462036,
0.1022079661488533,
0.11450643092393875,
-0.4150750935077667,
0.5973091721534729,
-0.2063310593366623,
0.24841131269931793,
-1.8303238153457642,
-0.44694319367408... |
func (a *DefaultApiService) VmSnapshotPut(ctx _context.Context, vmSnapshotConfig VmSnapshotConfig) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
)
// create ... | [
-1.0520726442337036,
0.02919749543070793,
0.8486230969429016,
-0.631289541721344,
-0.7697592973709106,
-0.16819892823696136,
-0.11921029537916183,
-0.08812754601240158,
-0.2804796099662781,
0.7069146037101746,
-0.6884453892707825,
0.18778301775455475,
-0.6821038126945496,
-0.16864146292209... |
func (a *DefaultApiService) VmmPingGet(ctx _context.Context) (VmmPingResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
localVarReturnValue VmmPingRespon... | [
-0.8485535979270935,
-0.5215047597885132,
1.0307613611221313,
-0.42791643738746643,
-0.3005726635456085,
0.03075549192726612,
-0.47022077441215515,
-0.4563464820384979,
-0.16733084619045258,
0.9699883460998535,
0.4972219169139862,
0.789877712726593,
-1.7803899049758911,
0.26551318168640137... |
func (bc *BlockChain) State() (*state.StateDBManage, error) {
return bc.StateAt(bc.CurrentBlock().Root())
} | [
-0.11198641359806061,
-0.31923431158065796,
0.3798147439956665,
0.5834302306175232,
0.26640093326568604,
-0.8911656141281128,
0.63719642162323,
-0.9004921913146973,
0.08084060996770859,
-0.2746990919113159,
0.11135518550872803,
0.9064198732376099,
-0.9736319184303284,
1.1336599588394165,
... |
func (bc *BlockChain) StateAt(root []common.CoinRoot) (*state.StateDBManage, error) {
return state.NewStateDBManage(root, bc.db, bc.stateCache)
//return bc.getStateCache(root)
} | [
-1.1213494539260864,
-0.4250549376010895,
0.38922739028930664,
-0.36518993973731995,
-0.534615159034729,
-1.0747534036636353,
-0.30143439769744873,
-1.596680998802185,
0.6189829707145691,
0.1595267951488495,
-0.12179607897996902,
0.3814485967159271,
-0.764079749584198,
0.2693890631198883,
... |
func RegisterSuite(suite string, conf kt.SuiteConfig) {
suites[suite] = conf
} | [
-0.04046202823519707,
0.17698971927165985,
0.09753710776567459,
0.805143415927887,
0.07891304790973663,
0.21530869603157043,
-1.3784496784210205,
1.295061469078064,
-0.877155601978302,
0.8113038539886475,
-1.119659423828125,
0.4275456368923187,
-0.21070072054862976,
0.6344859600067139,
0... |
func (*Message) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Message_OneofMarshaler, _Message_OneofUnmarshaler, _Message_OneofSizer, []interface{}{
(*Message_Chunk)(ni... | [
-0.42463448643684387,
0.7832122445106506,
0.5223588943481445,
-0.67940354347229,
0.7224835753440857,
-0.9783755540847778,
0.5560200810432434,
-1.0596970319747925,
-0.004452053923159838,
-0.8916524648666382,
-0.17065158486366272,
-0.128507599234581,
-0.33036667108535767,
1.154599666595459,
... |
func makeGraphql(s string) string {
var b bytes.Buffer
for i, c := range s {
if i == 0 {
b.WriteRune(unicode.ToLower(c))
} else {
b.WriteRune(c)
}
}
return b.String()
} | [
0.41352322697639465,
-0.02450653724372387,
0.5576601624488831,
-0.0514230951666832,
-0.48139914870262146,
0.2402915358543396,
-0.059111904352903366,
-1.403472900390625,
0.11393654346466064,
0.03813062980771065,
0.10550012439489365,
0.04891108348965645,
-0.6526543498039246,
-1.4016110897064... |
func (s *Schema) MustBuild() *graphql.Schema {
built, err := s.Build()
if err != nil {
panic(err)
}
return built
} | [
0.24810832738876343,
-0.5389819145202637,
0.38007402420043945,
1.011942982673645,
-0.05647731572389603,
1.2825721502304077,
-0.6614168882369995,
-0.32834750413894653,
0.29613542556762695,
-0.37397846579551697,
-0.05259084701538086,
0.5964605808258057,
-0.5059033036231995,
-0.12328846752643... |
func ReadBinary(r io.Reader, order binary.ByteOrder, data any) (n int, err error) {
countingReader := CountingReader{Reader: r}
err = binary.Read(&countingReader, order, data)
return countingReader.BytesRead, err
} | [
-0.3591972589492798,
-0.00019646027067210525,
0.7684493660926819,
0.8404388427734375,
0.01669888198375702,
-1.0938982963562012,
-0.6757118105888367,
-0.6803714632987976,
-0.4809206426143646,
-0.29703468084335327,
-0.41087543964385986,
0.4603482484817505,
-0.11298434436321259,
0.84249413013... |
func WriteFull(data []byte, writer io.Writer) (n int, err error) {
dataSize := len(data)
for n = 0; n < dataSize; {
m, err := writer.Write(data[n:])
n += m
if err != nil {
return n, err
}
}
return dataSize, nil
} | [
-0.29987069964408875,
0.27481022477149963,
0.6524482369422913,
-0.07108763605356216,
0.006292431615293026,
-0.4090513586997986,
0.3285994827747345,
0.6399598121643066,
-0.11549016088247299,
0.28286704421043396,
-1.2447212934494019,
-0.1193089410662651,
-0.057762183248996735,
0.456059157848... |
func ReadLine(reader io.Reader) (line string, err error) {
buffer := bytes.NewBuffer(make([]byte, 0, 4096))
p := make([]byte, 1)
for {
var n int
n, err = reader.Read(p)
if err != nil || p[0] == '\n' {
break
}
if n > 0 {
buffer.WriteByte(p[0])
}
}
data := buffer.Bytes()
if len(data) > 0 && data[l... | [
0.10030607134103775,
-0.04038704186677933,
0.7335039973258972,
-0.058319903910160065,
-0.4700736999511719,
-0.2023897022008896,
-0.587928056716919,
-1.0011026859283447,
0.07130645960569382,
-0.17653094232082367,
0.02304009161889553,
-0.6176113486289978,
-0.4940589368343353,
-0.053811710327... |
func WaitForStdin(v ...any) byte {
if len(v) > 0 {
fmt.Println(v...)
}
buffer := make([]byte, 1)
_, _ = os.Stdin.Read(buffer)
return buffer[0]
} | [
0.0952940359711647,
0.24317708611488342,
0.4771403968334198,
0.31479501724243164,
-0.1653851717710495,
0.48309460282325745,
-0.2197255790233612,
-0.42372867465019226,
-0.5420934557914734,
-1.2518576383590698,
-0.04468413069844246,
0.09089399129152298,
-0.5402451157569885,
0.174931660294532... |
func (r *WorkbookRangeFontRequest) Get(ctx context.Context) (resObj *WorkbookRangeFont, err error) {
var query string
if r.query != nil {
query = "?" + r.query.Encode()
}
err = r.JSONRequest(ctx, "GET", query, nil, &resObj)
return
} | [
-1.0289602279663086,
-0.5780311226844788,
0.2545848488807678,
0.2519547939300537,
0.5379779934883118,
-0.5311532616615295,
0.08707007765769958,
-1.1204652786254883,
-0.08005133271217346,
-0.022509856149554253,
-0.6048663258552551,
0.5857729315757751,
-1.3458911180496216,
-0.178103208541870... |
func (r *WorkbookRangeFontRequest) Update(ctx context.Context, reqObj *WorkbookRangeFont) error {
return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
} | [
-1.1419025659561157,
-1.5142322778701782,
0.22712916135787964,
0.10787059366703033,
-0.049021076411008835,
0.3054823875427246,
0.4489292502403259,
-1.1001988649368286,
0.34320709109306335,
0.19725732505321503,
-0.9899423718452454,
0.3424229621887207,
-1.408248782157898,
-0.0252830795943737... |
func (r *WorkbookRangeFontRequest) Delete(ctx context.Context) error {
return r.JSONRequest(ctx, "DELETE", "", nil, nil)
} | [
-0.530844509601593,
-0.446319043636322,
0.14283595979213715,
0.9261221885681152,
0.7836583256721497,
-0.050461720675230026,
0.10969918221235275,
-0.9215739965438843,
-0.21151989698410034,
0.14042605459690094,
-0.5987746119499207,
0.3947315216064453,
-1.7141975164413452,
0.26813361048698425... |
func NewDatadogExporter(d *kodingmetrics.DogStatsD) *DatadogExporter {
return &DatadogExporter{datadog: d}
} | [
0.43651482462882996,
0.6560712456703186,
-0.1496751606464386,
-0.5524661540985107,
-1.0435082912445068,
0.11214099824428558,
-0.9294322729110718,
-0.4133847653865814,
0.07006344199180603,
-0.12141435593366623,
-0.2830714285373688,
0.7026700377464294,
0.11518824100494385,
1.6965584754943848... |
func Add(a ...int) int {
sum := 0
for _, v := range a {
sum += v
}
return sum
} | [
-0.48714911937713623,
0.14680056273937225,
0.43030479550361633,
-0.14098341763019562,
0.4485687017440796,
0.8144488334655762,
-0.1370384842157364,
-0.02028638683259487,
0.31400999426841736,
-0.3021513819694519,
-0.10642177611589432,
0.33139869570732117,
-0.29940757155418396,
1.001897454261... |
func Sub(a, b int) int {
return a - b
} | [
0.03286393731832504,
0.13014556467533112,
0.4595211148262024,
-0.22369401156902313,
-1.453141450881958,
0.5144896507263184,
-0.3594016432762146,
0.2858777642250061,
-0.7880573868751526,
-0.6588549613952637,
-0.5519163012504578,
0.913415253162384,
0.12210892140865326,
-0.4860635995864868,
... |
func ReadRows(reader io.Reader) ([][]string, error) {
return newTabReader(reader).ReadAll()
} | [
-0.3896620273590088,
0.12317349761724472,
0.44402486085891724,
-0.3244754672050476,
-0.9450747966766357,
-0.6142444014549255,
-0.7924888730049133,
-0.0013543844688683748,
-0.09103699773550034,
0.5462951064109802,
1.1570082902908325,
0.1432121992111206,
0.3710189163684845,
0.668914556503295... |
func ReadRowsChan(reader io.Reader) (rows chan RowErr) {
rows = make(chan RowErr)
go readRowsRoutine(reader, rows)
return
} | [
-0.05513335391879082,
-0.43447500467300415,
0.25402721762657166,
-0.3701763451099396,
-0.5273811221122742,
0.16447950899600983,
0.33756694197654724,
0.09688891470432281,
0.4257683753967285,
-0.31632575392723083,
0.2796469032764435,
0.8225229382514954,
0.9815284609794617,
0.6656818985939026... |
func ReportInt(ns, name string) VarInt {
varName := ns + "." + name
varLock.Lock()
defer varLock.Unlock()
if v := expvar.Get(varName); v != nil {
return v.(*expvar.Int)
}
return expvar.NewInt(varName)
} | [
0.5642330646514893,
0.04811923950910568,
0.4179416596889496,
-1.1274651288986206,
-0.8252172470092773,
-0.687587320804596,
-0.05030792951583862,
-0.9555419683456421,
0.13212715089321136,
0.4976443648338318,
0.262577623128891,
0.4395127594470978,
-0.8539448976516724,
0.3120599389076233,
0... |
func ReportFloat(ns, name string) VarFloat {
varName := ns + "." + name
varLock.Lock()
defer varLock.Unlock()
if v := expvar.Get(varName); v != nil {
return v.(*expvar.Float)
}
return expvar.NewFloat(varName)
} | [
1.0704638957977295,
0.41486915946006775,
0.590831995010376,
-0.3543235957622528,
-0.08984190225601196,
-0.8840809464454651,
0.2295638471841812,
-0.5346395373344421,
-0.23048746585845947,
-0.7434379458427429,
0.24878141283988953,
0.4941410720348358,
-0.8226385116577148,
0.8715103268623352,
... |
func NewPostgresDsnFromEnv() string {
return fmt.Sprintf("user=%s password=%s dbname=%s host=%s port=%s sslmode=%s", dbUser, dbPassword, dbName, dbHost, dbPort, dbSSLMode)
} | [
-0.5834614634513855,
-0.600492000579834,
0.646924614906311,
0.5061641335487366,
-0.3781610429286957,
-0.1833486258983612,
-1.1596388816833496,
-0.8522025942802429,
-0.6270312070846558,
-0.23334619402885437,
-0.752172589302063,
0.7815146446228027,
0.34108808636665344,
0.13916687667369843,
... |
func NewMariaDsnFromEnv() string {
return fmt.Sprintf("%s:%s@tcp(%s:%s)/%s", mariaDbUser, mariaDbPassword, mariaDbName, mariaDbHost, mariaDbPort)
} | [
-0.4160500466823578,
-1.0179078578948975,
0.18411964178085327,
-0.08065909147262573,
-0.2398187816143036,
-0.0407559871673584,
-1.4774302244186401,
-0.4093676507472992,
-0.14957278966903687,
0.04273808375000954,
-0.1321597695350647,
0.9734441637992859,
0.424757719039917,
-0.009040710516273... |
func (*AddUserRequest) Descriptor() ([]byte, []int) {
return file_API_user_proto_rawDescGZIP(), []int{0}
} | [
-0.8548781275749207,
0.5290014147758484,
0.473008394241333,
0.6637482643127441,
-0.6692304015159607,
0.14888407289981842,
0.4955804646015167,
0.41467171907424927,
-0.4425918459892273,
-0.551898717880249,
-0.12821051478385925,
0.29293128848075867,
-0.4056074917316437,
1.1926884651184082,
... |
func (*AddUserResponse) Descriptor() ([]byte, []int) {
return file_API_user_proto_rawDescGZIP(), []int{1}
} | [
-0.5291415452957153,
0.20167312026023865,
-0.018615130335092545,
0.30739280581474304,
-0.5749297142028809,
-0.304229736328125,
0.9061227440834045,
0.2759813964366913,
-0.09210044890642166,
-0.6160553693771362,
-0.5550421476364136,
-0.46096155047416687,
-0.9099751710891724,
0.11212682723999... |
func (*User) Descriptor() ([]byte, []int) {
return file_API_user_proto_rawDescGZIP(), []int{2}
} | [
-0.9997855424880981,
0.19925376772880554,
0.45737189054489136,
0.49888917803764343,
-0.5294155478477478,
-0.04260524362325668,
0.7808521389961243,
0.12276270240545273,
-0.3223072588443756,
-0.9478950500488281,
-1.0581574440002441,
0.07405467331409454,
0.24759069085121155,
0.890013337135314... |
func NewResolver(args map[string]interface{}) Resolver {
return &concreteResolver{args: args}
} | [
-0.5445181727409363,
-1.1878269910812378,
0.3233124613761902,
-0.09058590978384018,
-0.09637560695409775,
0.32605206966400146,
-0.6745909452438354,
0.7784931659698486,
-0.4354947507381439,
-0.3978310823440552,
0.13969123363494873,
-0.5741553902626038,
-0.029870331287384033,
1.4816241264343... |
func (r *concreteResolver) Resolve(s string) (interface{}, error) {
r.m.Lock()
defer r.m.Unlock()
s = formatExpression(s)
expr := strings.SplitN(s, ".", 2)
if len(expr) == 0 || expr[0] == "" {
return nil, errors.New("could not resolve: expression is empty")
}
currentField := expr[0]
v, found := r.args[cur... | [
-0.7139124274253845,
-0.656255304813385,
0.8057107925415039,
-0.10086174309253693,
0.2486853450536728,
-1.0790938138961792,
0.4399579167366028,
-0.12672913074493408,
-0.11749674379825592,
-0.4779820144176483,
-0.1056806892156601,
-0.1737450212240219,
-0.43592509627342224,
0.435852944850921... |
func DirectResolve(v interface{}, s string) (interface{}, error) {
s = formatExpression(s)
expr := strings.SplitN(s, ".", 2)
if len(expr) == 0 || expr[0] == "" {
return nil, errors.New("could not resolve: expression is empty")
}
value := reflect.ValueOf(v)
if value.Kind() == reflect.Map {
return resolve(va... | [
-0.6382223963737488,
-1.0267300605773926,
0.8163677453994751,
0.01137039065361023,
-0.42400088906288147,
-0.33250078558921814,
0.17039093375205994,
-0.3552149832248688,
-0.1925887018442154,
-0.640175998210907,
0.17710630595684052,
0.47107255458831787,
0.2729160785675049,
-0.170291632413864... |
func NewClient(appId, appKey, masterKey string) *leanClient {
ret := &leanClient{
appId: appId,
appKey: appKey,
masterKey: masterKey,
}
installation := ret.Collection("_Installation")
ret.Installation = &installation
ret.Installation.classSubfix = "/installaions"
user := ret.Collection("_User")
r... | [
0.03400127589702606,
-0.7083142399787903,
0.3205775320529938,
-0.10784890502691269,
-0.4982985258102417,
0.375040739774704,
0.01762847602367401,
0.021641530096530914,
-0.0861404687166214,
0.45527148246765137,
0.07831687480211258,
0.1735679805278778,
-0.46213042736053467,
-0.011663756333291... |
func TestSpecCluster_SpecsFromFile(t *testing.T) {
tests := []struct {
name string
file string
wantErr bool
}{
{
name: "Read cluster workload spec from yaml",
file: "/cluster/positive/edge_workload_cluster.yaml",
wantErr: false,
},
{
name: "Read cluster workload spec from json"... | [
0.34591129422187805,
-0.5409144163131714,
0.6789904236793518,
0.07017109543085098,
0.30460885167121887,
0.8945438861846924,
1.0351388454437256,
-0.6965515613555908,
-1.0153781175613403,
0.24290066957473755,
0.9832777380943298,
-0.21348169445991516,
0.361968457698822,
0.21189403533935547,
... |
func TestSpecCluster_SpecsReader(t *testing.T) {
tests := []struct {
name string
file string
wantErr bool
}{
{
name: "Read cluster workload spec from yaml",
file: "/cluster/positive/edge_workload_cluster.yaml",
wantErr: false,
},
{
name: "Read cluster workload spec from json",
... | [
0.3404044210910797,
-0.7130786180496216,
0.7782940864562988,
-0.08420680463314056,
0.19970043003559113,
0.9302185773849487,
0.7469879984855652,
-0.4941079020500183,
-0.7217710614204407,
0.0223887637257576,
1.1639585494995117,
-0.2747282385826111,
0.11312336474657059,
0.03775566816329956,
... |
func (m *Manifest) AddIsolator(name string, value []byte) error {
acid, err := types.NewACIdentifier(name)
if err != nil {
return err
}
rawMsg := json.RawMessage(value)
if m.manifest.App == nil {
m.manifest.App = newManifestApp()
}
_, ok := types.ResourceIsolatorNames[*acid]
if !ok {
_, ok = types.LinuxI... | [
-0.8320767879486084,
-0.37783318758010864,
0.6777392029762268,
-0.2824048101902008,
-1.6837831735610962,
0.2039829045534134,
-0.9521628022193909,
0.6644744277000427,
0.23882043361663818,
0.3599337935447693,
-0.24926158785820007,
-0.8952159285545349,
-0.7318713665008545,
0.5634726285934448,... |
func (m *Manifest) RemoveIsolator(name string) error {
acid, err := types.NewACIdentifier(name)
if err != nil {
return err
}
err = removeIsolatorFromMan(*acid, m.manifest)
if err != nil {
return err
}
return m.save()
} | [
-1.0008265972137451,
-0.3704373836517334,
0.2219799906015396,
-0.05958147346973419,
-2.099600315093994,
-0.13656339049339294,
-0.07430832087993622,
1.3895068168640137,
-0.20244574546813965,
0.8438957929611206,
-0.20781680941581726,
-1.2822880744934082,
-0.705030083656311,
0.103840455412864... |
func WithTemplate(g genny.Generator, data interface{}, helpers template.FuncMap) genny.Generator {
g = genny.WithFileTransformer(g, func(f genny.File) (genny.File, error) {
return renderWithTemplate(f, data, helpers)
})
return g
} | [
-0.5427859425544739,
0.36302459239959717,
0.4432157278060913,
-0.8008742928504944,
-0.7820727825164795,
-0.8600197434425354,
-0.3391527533531189,
0.20789794623851776,
-0.6802444458007812,
-0.8483077883720398,
-0.11248462647199631,
-0.7666935920715332,
0.7334759831428528,
0.3414692282676697... |
func LineCount(buf string) int {
return bytes.Count([]byte(buf), []byte{'\n'})
} | [
1.3718602657318115,
-1.1229209899902344,
0.2062074840068817,
-0.6652405858039856,
0.0030324358958750963,
0.11933205276727676,
-0.4450058937072754,
0.5053598880767822,
-0.12480495870113373,
-0.600531816482544,
-1.2113415002822876,
0.16917258501052856,
0.07039758563041687,
0.5897114872932434... |
func (db *SQLDB) fetchDesiredLRPSchedulingInfoAndMore(logger lager.Logger, scanner helpers.RowScanner, dest ...interface{}) (*models.DesiredLRPSchedulingInfo, error) {
schedulingInfo := &models.DesiredLRPSchedulingInfo{}
var routeData, volumePlacementData, placementTagData []byte
values := []interface{}{
&scheduli... | [
-0.7100691199302673,
-0.5991891026496887,
0.8839048743247986,
-0.44608864188194275,
-0.7380062937736511,
-0.1104842945933342,
-1.1685882806777954,
-0.21193678677082062,
-0.47972333431243896,
-0.21835285425186157,
-0.3844999372959137,
-0.38319331407546997,
0.3887523114681244,
0.540130376815... |
func NewS3MultitenantFilestore(installationID string, awsClient *Client) *S3MultitenantFilestore {
return &S3MultitenantFilestore{
installationID: installationID,
awsClient: awsClient,
}
} | [
0.8569880723953247,
-0.6346966028213501,
-0.006543733179569244,
-0.2698591947555542,
-1.1268970966339111,
1.1919338703155518,
-1.1882688999176025,
0.3331852853298187,
0.30613744258880615,
-0.02731001004576683,
-0.14708152413368225,
-0.7426723837852478,
-0.7851711511611938,
-0.4180831313133... |
func (f *S3MultitenantFilestore) Provision(store model.InstallationDatabaseStoreInterface, logger log.FieldLogger) error {
err := f.s3FilestoreProvision(store, logger)
if err != nil {
return errors.Wrap(err, "failed to provision AWS multitenant S3 filestore")
}
return nil
} | [
0.2149050235748291,
-0.4512348771095276,
0.2142772227525711,
0.26411986351013184,
-0.7218812108039856,
1.035529375076294,
-0.6489484310150146,
0.47511106729507446,
0.9052783846855164,
0.751610517501831,
-0.0521247535943985,
-0.9180998802185059,
-0.006155107636004686,
0.5361330509185791,
... |
func (f *S3MultitenantFilestore) Teardown(keepData bool, store model.InstallationDatabaseStoreInterface, logger log.FieldLogger) error {
awsID := CloudID(f.installationID)
logger = logger.WithFields(log.Fields{
"awsID": awsID,
"filestore-type": "s3-multitenant",
})
logger.Info("Tearing down AWS S3 fil... | [
0.2868114709854126,
-0.2805660665035248,
0.7491520047187805,
-0.5102411508560181,
0.07704835385084152,
0.5992919206619263,
0.5304494500160217,
-0.40924564003944397,
0.7074275612831116,
-0.092574842274189,
0.2461734116077423,
-0.0678558275103569,
-0.27833420038223267,
0.46450209617614746,
... |
func (f *S3MultitenantFilestore) GenerateFilestoreSpecAndSecret(store model.InstallationDatabaseStoreInterface, logger log.FieldLogger) (*model.FilestoreConfig, *corev1.Secret, error) {
awsID := CloudID(f.installationID)
logger = logger.WithFields(log.Fields{
"awsID": awsID,
"filestore-type": "s3-multit... | [
-0.11887571215629578,
-0.4528593420982361,
0.4546824097633362,
-0.7331880927085876,
-0.15900428593158722,
0.06991646438837051,
-0.6410441994667053,
0.6940135955810547,
-0.03880434110760689,
0.5364447832107544,
-0.8345595598220825,
-0.5053984522819519,
0.10963897407054901,
0.841661691665649... |
func (f *S3MultitenantFilestore) s3FilestoreProvision(store model.InstallationDatabaseStoreInterface, logger log.FieldLogger) error {
awsID := CloudID(f.installationID)
logger = logger.WithFields(log.Fields{
"awsID": awsID,
"filestore-type": "s3-multitenant",
})
logger.Info("Provisioning AWS multitena... | [
0.7949206233024597,
-0.4370597302913666,
0.5891745090484619,
-0.2245570570230484,
-0.1826503723859787,
0.7400687336921692,
-0.43642789125442505,
0.49469462037086487,
0.9060781002044678,
0.4546341598033905,
0.16151165962219238,
0.008706871420145035,
-0.11412365734577179,
-0.0383732616901397... |
func (m *AuditSchedule) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAuditScheduleInlineDays(formats); err != nil {
res = append(res, err)
}
if err := m.validateAuditScheduleInlineHours(formats); err != nil {
res = append(res, err)
}
if err := m.validateAuditScheduleInlineM... | [
0.01845037005841732,
-0.18206113576889038,
0.13193698227405548,
-0.7673603892326355,
0.42336082458496094,
-0.11349894106388092,
0.13087159395217896,
-0.518143355846405,
-0.24404539167881012,
-0.26410308480262756,
0.4142381548881531,
0.1612090766429901,
-0.34857824444770813,
0.7350082397460... |
func (m *AuditSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
} | [
0.12025267630815506,
0.005420639179646969,
0.3588775098323822,
-0.8796464204788208,
-0.10151486843824387,
0.6732137799263,
-0.40500393509864807,
0.11479199677705765,
0.9907376766204834,
0.038868773728609085,
0.3828732669353485,
0.8567174077033997,
-0.10889524966478348,
0.35639721155166626,... |
func NewLoopDevice(deviceName string) (err error) {
_, err = os.Stat(deviceName)
if err == nil {
return nil
}
if !errors.Is(err, os.ErrNotExist) {
return err
}
// "/dev/loopXXXX"
cmd := exec.Command("mknod", "-m", "0660", deviceName, "b", "7", deviceName[9:])
var out bytes.Buffer
cmd.Stdout = &out
cmd.S... | [
-0.5499612092971802,
0.4173574447631836,
0.747799277305603,
-0.28764665126800537,
-0.5804392099380493,
0.9995147585868835,
0.4489588141441345,
-0.9070481657981873,
-0.40510818362236023,
-0.36504992842674255,
-0.03632333129644394,
0.7762916684150696,
-0.296369731426239,
0.579811155796051,
... |
func (f WeightField) Valid() (bool, error) {
if f < 10 || f > 999 {
return false, ErrFieldInvalid{fmt.Sprintf("`%v` is an invalid weight value. Weight must be between 10 and 999")}
}
return true, nil
} | [
-0.02314141020178795,
0.0819597989320755,
0.7603928446769714,
-0.010921861045062542,
-0.26660072803497314,
1.0534279346466064,
-0.11475691944360733,
0.3909101188182831,
-1.0489543676376343,
0.1953534632921219,
0.0688585638999939,
-0.5197861194610596,
-0.4648009240627289,
0.0543912872672081... |
func DayOnePartOne(input string) int {
match := 2020
entries := convertToSortedSlice(input)
for i, temp1 := range entries {
for _, temp2 := range entries[i+1:] {
if temp1+temp2 == match {
return temp1 * temp2
}
}
}
return 0
} | [
-1.057116985321045,
0.09246521443128586,
0.6511386632919312,
-0.46589985489845276,
-0.4545828700065613,
0.037019554525613785,
0.7891730666160583,
-1.0340862274169922,
-0.3955436050891876,
-0.45942094922065735,
-0.10376323759555817,
-0.5021395087242126,
-1.7289756536483765,
0.69937407970428... |
func DayOnePartTwo(input string) int {
match := 2020
entries := convertToSortedSlice(input)
for i, temp1 := range entries {
for j, temp2 := range entries[i+1:] {
for _, temp3 := range entries[j+1:] {
if temp1+temp2+temp3 == match {
return temp1 * temp2 * temp3
}
}
}
}
return 0
} | [
-0.635265588760376,
-0.6946133971214294,
0.7501440048217773,
-0.2643986642360687,
-0.37198564410209656,
-0.38669729232788086,
0.25577664375305176,
-1.162643313407898,
-1.1393697261810303,
-0.5536003708839417,
-0.7098888754844666,
-0.45836958289146423,
-0.8856909275054932,
0.510316193103790... |
func (p *provider) GetSecret(ctx context.Context, name string) string {
secretPath := filepath.Join("projects", p.projectID, "secrets", name, "versions", "latest")
req := &secretmanagerpb.AccessSecretVersionRequest{
Name: secretPath,
}
res, err := p.client.AccessSecretVersion(ctx, req)
if err != nil {
log.Fat... | [
-0.21820485591888428,
0.16843798756599426,
0.5692219734191895,
0.39231380820274353,
-0.1770891398191452,
-0.13155622780323029,
-0.45335230231285095,
-1.0596250295639038,
0.009713828563690186,
0.6335214972496033,
-0.4963596761226654,
0.8486230969429016,
-0.601577639579773,
0.007270475383847... |
func (s *MockEventStore) Put(c context.Context, envelope interface{}) error {
return nil
} | [
-0.35125434398651123,
0.13068607449531555,
0.3786572813987732,
-0.693159818649292,
-0.1314454972743988,
0.30242419242858887,
1.3948216438293457,
0.4285341203212738,
1.1392264366149902,
-0.2181410938501358,
-0.7082611322402954,
0.09199925512075424,
-1.3431907892227173,
-0.1245291605591774,
... |
func Initialize(cfg config.WebConfig, ds *data.DataStore) {
webConfig = cfg
setupWebSocket(cfg, ds)
setupRoutes(cfg)
// NewContext() will use this DataStore for the web handlers
DataStore = ds
sessionStore = sessions.NewCookieStore([]byte(cfg.CookieSecret))
} | [
-0.36968380212783813,
1.0174219608306885,
0.4023621380329132,
0.18067529797554016,
-0.07323991507291794,
-0.4016079306602478,
0.19285421073436737,
1.1349756717681885,
1.2687338590621948,
-0.14194901287555695,
-0.6704254746437073,
0.6893636584281921,
-0.19569946825504303,
0.8046709299087524... |
func setupWebSocket(cfg config.WebConfig, ds *data.DataStore) {
mymap := make(map[string]string)
mymap["client_broadcasts"] = strconv.FormatBool(cfg.ClientBroadcasts)
mymap["connection_timeout"] = strconv.Itoa(cfg.ConnTimeout)
mymap["redis_enabled"] = strconv.FormatBool(cfg.RedisEnabled)
mymap["debug"] = "true"
... | [
0.307354599237442,
0.5297037363052368,
0.5956966876983643,
-0.6222522854804993,
0.22948035597801208,
0.12917113304138184,
0.5069048404693604,
0.3517656624317169,
0.178691104054451,
-0.11101953685283661,
-0.4320768415927887,
1.0611189603805542,
0.025525957345962524,
1.2989825010299683,
-0... |
func Start() {
addr := fmt.Sprintf("%v:%v", webConfig.Ip4address, webConfig.Ip4port)
server := &http.Server{
Addr: addr,
Handler: nil,
ReadTimeout: 60 * time.Second,
WriteTimeout: 60 * time.Second,
}
// We don't use ListenAndServe because it lacks a way to close the listener
log.LogInfo("HTT... | [
0.25384894013404846,
-0.9480324983596802,
0.35517507791519165,
-0.23271870613098145,
0.28123316168785095,
0.47317588329315186,
-0.111733578145504,
0.6738558411598206,
-0.789510190486908,
0.1546379029750824,
0.2261088788509369,
0.8179952502250671,
-0.05325053259730339,
0.5593108534812927,
... |
func (h handler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
// Create the context
ctx, err := NewContext(req)
if err != nil {
log.LogError("Failed to create context: %v", err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
defer ctx.Close()
// Run the handler, grab the error... | [
0.19433365762233734,
-0.2928003966808319,
0.886787474155426,
0.08525371551513672,
0.32758790254592896,
0.22405751049518585,
0.726509690284729,
0.23144137859344482,
0.3544573187828064,
0.4062727391719818,
-0.3700137734413147,
-0.05907388776540756,
-0.4873185455799103,
-0.4201123118400574,
... |
func Untar(tarName, xpath string) (err error) {
tarFile, err := os.Open(tarName)
if err != nil {
return err
}
defer func() {
err = tarFile.Close()
}()
absPath, err := filepath.Abs(xpath)
if err != nil {
return err
}
tarReader, err := getTarReader(tarFile, tarName)
if err != nil {
return err
}
for... | [
0.12127663195133209,
0.10507196933031082,
1.1237760782241821,
-0.3890622854232788,
-0.4765649139881134,
0.14091670513153076,
0.3981843590736389,
0.177997425198555,
-0.07469358295202255,
-0.1878044605255127,
0.7942895889282227,
-1.0279046297073364,
0.31818872690200806,
-0.5393610000610352,
... |
func NewGossiper(address string, name string,
knownPeersList []string, UIPort string) *Gossiper {
udpAddr, err := net.ResolveUDPAddr("udp4", address)
helpers.HandleErrorFatal(err)
udpConn, err := net.ListenUDP("udp4", udpAddr)
helpers.HandleErrorFatal(err)
clientAddr := "127.0.0.1:" + UIPort
udpAddrLocal, err :=... | [
-0.15497495234012604,
0.06743309646844864,
0.8670511245727539,
-0.09046666324138641,
-0.894362211227417,
-0.01520476397126913,
-0.1561160683631897,
-0.0826684907078743,
-0.7123029828071594,
-0.025451481342315674,
-0.248419851064682,
0.06364916265010834,
-0.8275022506713867,
0.7301862239837... |
func (ch Channel_v2) radialIntegrate(n int32, xy Channel_v2, m Channel_f32, dt float32) {
for i := int32(0); i < n; i++ {
normal := [2]float32{0, 0}
p := xy[i]
if p[0] != 0 || p[1] != 0 {
normalize(p[0], p[1], &normal)
}
ch[i][0] += m[i] * normal[0] * dt
ch[i][1] += m[i] * normal[1] * dt
}
} | [
-0.27699169516563416,
0.6284470558166504,
0.6324707865715027,
-0.9667454957962036,
-0.14382809400558472,
-0.7906476855278015,
-1.0476056337356567,
-1.348103404045105,
-1.3933064937591553,
0.377755343914032,
-0.35854265093803406,
0.06359441578388214,
-1.0944703817367554,
-0.3451637625694275... |
func (ch Channel_v2) tangentIntegrate(n int32, xy Channel_v2, m Channel_f32, dt float32) {
for i := int32(0); i < n; i++ {
tangent := [2]float32{0, 0}
p := xy[i]
if p[0] != 0 || p[1] != 0 {
normalize(p[1], p[0], &tangent)
}
ch[i][0] += m[i] * tangent[0] * dt
ch[i][1] += m[i] * tangent[1] * dt
}
} | [
0.08569283783435822,
0.5560101270675659,
0.5364181995391846,
-1.193956732749939,
-0.008578347973525524,
-0.9516242146492004,
-0.4868834316730499,
-1.4799445867538452,
-1.2285369634628296,
0.5921120643615723,
-0.19150270521640778,
-0.56878262758255,
-0.5335245132446289,
-0.5438704490661621,... |
func (m *DAO) SaveSettings(settings commonModels.Settings) error {
err := db.C(COLLECTIONSETTINGS).UpdateId(settings.ID, &settings)
return err
} | [
-1.6204679012298584,
0.6306535601615906,
0.17567133903503418,
0.7359897494316101,
1.070889949798584,
0.31828293204307556,
0.5540809631347656,
-1.0243898630142212,
-0.5580092668533325,
1.4382812976837158,
-1.4698972702026367,
-1.5723823308944702,
-1.5893439054489136,
0.6316042542457581,
0... |
func (m *DAO) LoadSettings() (commonModels.Settings, error) {
var settings []commonModels.Settings
err := db.C(COLLECTIONSETTINGS).Find(bson.M{}).All(&settings)
if len(settings) > 0 {
return settings[0], err
}
return commonModels.Settings{}, err
} | [
-0.09080318361520767,
0.9599482417106628,
0.4452466666698456,
0.6025550365447998,
0.6141855716705322,
-0.5130203366279602,
0.07675032317638397,
-1.3113691806793213,
-0.546213686466217,
1.1788984537124634,
-0.12562690675258636,
-1.0580886602401733,
-1.4175193309783936,
0.7167009115219116,
... |
func (m *DAO) InsertSettings(settings commonModels.Settings) error {
err := db.C(COLLECTIONSETTINGS).Insert(&settings)
return err
} | [
-1.0255624055862427,
2.100062847137451,
0.23318606615066528,
0.41529786586761475,
1.370432734489441,
0.521147608757019,
1.143035888671875,
-0.38898569345474243,
-0.7860757112503052,
0.8999685049057007,
-0.7211650013923645,
-2.2883522510528564,
-1.6858632564544678,
0.7636567950248718,
0.0... |
func NewFundingLocked(op wire.OutPoint, cid ShortChannelID,
npcp *btcec.PublicKey) *FundingLocked {
return &FundingLocked{
ChannelOutpoint: op,
ChannelID: cid,
NextPerCommitmentPoint: npcp,
}
} | [
0.34944069385528564,
-0.34659016132354736,
0.000725430203601718,
0.9331275820732117,
-0.9763140678405762,
-0.6141484975814819,
-0.06342826038599014,
-0.7680376172065735,
-0.3432992994785309,
-0.0899798572063446,
0.10747657716274261,
0.6047523617744446,
-0.6835399866104126,
0.12629362940788... |
func (c *FundingLocked) Decode(r io.Reader, pver uint32) error {
return readElements(r,
&c.ChannelOutpoint,
&c.ChannelID,
&c.NextPerCommitmentPoint)
} | [
-0.08114085346460342,
-0.0738663524389267,
0.025765080004930496,
0.5889195203781128,
0.1108754426240921,
-0.2816925644874573,
-0.017535854130983353,
-0.3672551214694977,
0.0637969970703125,
-0.1810699850320816,
1.0778745412826538,
-0.02293184958398342,
-1.534645438194275,
-0.09032759070396... |
func (c *FundingLocked) Encode(w io.Writer, pver uint32) error {
return writeElements(w,
c.ChannelOutpoint,
c.ChannelID,
c.NextPerCommitmentPoint)
} | [
-0.2771044671535492,
0.4072892367839813,
-0.012915283441543579,
0.6361170411109924,
0.4212600588798523,
0.275836706161499,
0.8717247843742371,
-0.5746501088142395,
0.1289132684469223,
-0.07678701728582382,
1.1652350425720215,
0.19640536606311798,
-1.3546777963638306,
0.09146004170179367,
... |
func (c *FundingLocked) Command() uint32 {
return CmdFundingLocked
} | [
-0.4246256351470947,
0.15559515357017517,
0.2866583466529846,
0.9689995050430298,
1.1038107872009277,
0.5486552715301514,
0.7591947317123413,
-0.15644490718841553,
0.6330804824829102,
-1.016263723373413,
0.3128456771373749,
0.39932626485824585,
-0.8849246501922607,
0.7662280797958374,
0.... |
func (c *FundingLocked) MaxPayloadLength(uint32) uint32 {
var length uint32
// ChannelOutpoint - 36 bytes
length += 36
// ChannelID - 8 bytes
length += 8
// NextPerCommitmentPoint - 33 bytes
length += 33
return length
} | [
1.0051109790802002,
0.23064997792243958,
0.32653582096099854,
-0.7504069805145264,
-0.05487016960978508,
0.5530789494514465,
-0.7511042952537537,
-0.9948532581329346,
1.3907767534255981,
-0.08594576269388199,
-0.11390382051467896,
-0.41622647643089294,
-1.0345473289489746,
-0.0768480151891... |
func (c *FundingLocked) Validate() error {
if c.NextPerCommitmentPoint == nil {
return fmt.Errorf("the next per commitment point must be " +
"non-nil.")
}
// We're good!
return nil
} | [
0.41492509841918945,
0.8415905237197876,
0.24556826055049896,
0.730521559715271,
0.1463172882795334,
-0.3393584191799164,
0.2730633318424225,
-0.06189433112740517,
-0.45740991830825806,
-0.026838120073080063,
1.4272558689117432,
-0.3676212430000305,
-1.3006571531295776,
0.4518492817878723,... |
func Init(conf string) error {
DB = NewFileDB(conf)
return DB.Init()
} | [
0.45741772651672363,
-0.35993316769599915,
0.16751420497894287,
0.2245483249425888,
-0.27588000893592834,
0.9523407220840454,
-0.006763920653611422,
1.563932180404663,
-1.6677320003509521,
-0.1085808277130127,
-0.9610517024993896,
0.06728822737932205,
-0.5221514105796814,
0.766705214977264... |
func Get(key string, valPtr interface{}) error {
return DB.Get(key, valPtr)
} | [
-0.07796267420053482,
0.3924154043197632,
0.15032155811786652,
0.3371041417121887,
-0.041052550077438354,
0.18595167994499207,
-1.2349117994308472,
-0.3142557144165039,
-0.5609007477760315,
0.8037648797035217,
0.6373187899589539,
0.7227429747581482,
-0.5303784608840942,
-0.0905518904328346... |
func Find(prefix string) ([]string, error) {
return DB.Find(prefix)
} | [
-0.25090497732162476,
0.7094257473945618,
0.23827551305294037,
0.25355857610702515,
0.11847485601902008,
-0.4175231456756592,
-0.7152249217033386,
-0.5097024440765381,
-0.362648606300354,
1.1487544775009155,
-0.22573983669281006,
0.10531547665596008,
-0.6748380661010742,
1.4648393392562866... |
func Set(key string, val interface{}) error {
return DB.Set(key, val)
} | [
-0.6698975563049316,
1.054320216178894,
0.128118097782135,
0.41775625944137573,
-0.5689226388931274,
0.6530774831771851,
-0.8031653761863708,
-0.5528244376182556,
-0.8344013094902039,
0.893230140209198,
0.017444640398025513,
0.031260039657354355,
-0.4182586669921875,
0.5815681219100952,
... |
func SetWithTTL(key string, val interface{}, d time.Duration) error {
return DB.SetWithTTL(key, val, d)
} | [
-0.10567939281463623,
0.7616394758224487,
0.34934002161026,
-0.22084654867649078,
-0.9286428093910217,
-0.21368299424648285,
-0.5917858481407166,
-0.9270732998847961,
-0.5826778411865234,
1.5719032287597656,
-0.8871862292289734,
-0.8407182693481445,
0.9208295941352844,
0.5920698642730713,
... |
func Delete(key string) error {
return DB.Delete(key)
} | [
-0.03300413489341736,
1.2850288152694702,
0.10309306532144547,
0.7853149771690369,
-0.2892807424068451,
0.549126386642456,
-0.8139695525169373,
0.4453878402709961,
-0.402455598115921,
1.3108054399490356,
-0.46196842193603516,
-0.5352864265441895,
-1.549491047859192,
0.43549293279647827,
... |
func NewApplicationAccountStoreMapping(applicationHref string, accountStoreHref string) *ApplicationAccountStoreMapping {
app := Application{}
app.Href = applicationHref
return &ApplicationAccountStoreMapping{
Application: &app,
AccountStore: &resource{Href: accountStoreHref},
}
} | [
1.155618667602539,
-0.739983081817627,
0.26550352573394775,
0.40105941891670227,
-1.6459263563156128,
0.057528991252183914,
0.032399412244558334,
0.10198014229536057,
1.3169382810592651,
-0.7304524183273315,
0.9630710482597351,
-0.029997222125530243,
0.8658576011657715,
-0.1772502064704895... |
func (mapping *ApplicationAccountStoreMapping) Save() error {
url := buildRelativeURL("accountStoreMappings")
if mapping.Href != "" {
url = mapping.Href
}
return client.post(url, mapping, mapping)
} | [
-0.8840084671974182,
0.1919804811477661,
0.29566311836242676,
0.3751356601715088,
-0.21943561732769012,
0.19698120653629303,
0.43696191906929016,
-0.009333429858088493,
0.8523446917533875,
-0.42348024249076843,
-0.3539150357246399,
-0.09193257987499237,
-0.23673580586910248,
-0.06489824503... |
func (t *Token) ToString() string {
var strVal string
switch t.Type {
case scalar:
strVal = fmt.Sprint(t.ScalarValue)
case variable:
strVal = fmt.Sprintf("x%d", t.VariableValue)
case plus:
strVal = "+"
case minus:
strVal = "-"
case times:
strVal = "*"
case divide:
strVal = "/"
case... | [
0.261366605758667,
-0.4308863580226898,
0.40176597237586975,
-0.8310861587524414,
-0.18299134075641632,
0.5985740423202515,
-0.48369428515434265,
-1.0606353282928467,
-0.7234480381011963,
0.49722081422805786,
-0.42039087414741516,
0.26872214674949646,
0.04906593635678291,
-0.33450305461883... |
func (e *Expression) ToString() string {
strVal := ""
for _, token := range e.Tokens {
strVal += " " + token.ToString()
}
return strVal
} | [
0.15958279371261597,
-0.680426836013794,
0.3269500732421875,
-1.0751324892044067,
0.13204027712345123,
0.3111414313316345,
-0.32856887578964233,
0.37781137228012085,
-0.3956034183502197,
0.6035876274108887,
0.15781967341899872,
0.3852830231189728,
0.042243439704179764,
-0.2501760423183441,... |
func MakeSpirits(num int) []Spirit {
spirits := make([]Spirit, num)
return spirits
} | [
-0.4371010661125183,
-0.25369271636009216,
0.1907234638929367,
-0.815870463848114,
-0.3830936551094055,
0.5468434691429138,
0.05509481206536293,
0.3462676405906677,
0.5726298093795776,
-0.17385131120681763,
-0.6642584800720215,
0.31178271770477295,
-1.0124505758285522,
-0.6336389183998108,... |
func MakeAuthThingEndpoint(s registry.Service) endpoint.Endpoint {
return func(ctx context.Context, request interface{}) (interface{}, error) {
req := request.(AuthThingRequest)
node, err := s.AuthThing(ctx, req.Uuid, req.AuthToken)
return AuthThingResponse{
Err: err,
Node: node,
}, nil
}
} | [
-0.48880302906036377,
-0.3404967188835144,
0.5524725914001465,
-0.5639073848724365,
-0.13202111423015594,
0.4195561408996582,
-0.6428366303443909,
-0.26756027340888977,
-0.2855529189109802,
0.016450729221105576,
-0.3423599600791931,
0.40736526250839233,
-0.133061483502388,
-0.5169877409934... |
func MakeRegisterEndpoint(s registry.Service) endpoint.Endpoint {
return func(ctx context.Context, request interface{}) (interface{}, error) {
req := request.(RegisterRequest)
uuid, err := s.Register(ctx, req.Name, req.Email, req.Password, req.Region)
return RegisterResponse{
Err: err,
Uuid: uuid,
}, ni... | [
-1.1413723230361938,
0.0934424176812172,
0.4692469835281372,
-0.042718835175037384,
-0.013438758440315723,
-0.182150736451149,
-0.8136876225471497,
0.5058054327964783,
0.10927511006593704,
0.27514731884002686,
-0.8679115772247314,
0.39913037419319153,
-0.356821209192276,
-0.393668174743652... |
func MakeLoginEndpoint(s registry.Service) endpoint.Endpoint {
return func(ctx context.Context, request interface{}) (interface{}, error) {
req := request.(LoginRequest)
token, err := s.Login(ctx, req.Uuid, req.Password)
return LoginResponse{
Err: err,
Token: token,
}, nil
}
} | [
-0.7860655784606934,
-0.6616981625556946,
0.6400837898254395,
-0.20328748226165771,
-0.9703513979911804,
0.5710853934288025,
-0.6461702585220337,
0.3333485424518585,
0.46612274646759033,
0.019779976457357407,
-0.4279945492744446,
0.18310046195983887,
-0.3505621552467346,
-1.228042244911193... |
func MakeViewUserEndpoint(s registry.Service) endpoint.Endpoint {
return func(ctx context.Context, request interface{}) (interface{}, error) {
req := request.(ViewUserRequest)
user, err := s.ViewUser(ctx, req.Token, req.Id)
return ViewUserResponse{
Err: err,
User: user,
}, nil
}
} | [
-0.5543739199638367,
0.06297992169857025,
0.3858688473701477,
0.11483930051326752,
-1.4031199216842651,
-0.00872000027447939,
0.28427377343177795,
0.12466273456811905,
0.6253394484519958,
-0.38240352272987366,
-0.4013483226299286,
0.6380581855773926,
0.06325250118970871,
-0.799824178218841... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.