text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (m *CompaniesItemJournalsItemJournalLinesJournalLineItemRequestBuilder) Get(ctx context.Context, requestConfiguration *CompaniesItemJournalsItemJournalLinesJournalLineItemRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.JournalLineable, error) {
requestIn... | [
0.07768354564905167,
-0.19130949676036835,
0.7034741640090942,
-0.5050829648971558,
-0.13518959283828735,
0.2030191272497177,
-0.5914193987846375,
0.04114873707294464,
-0.22507356107234955,
-0.5667588114738464,
0.13242100179195404,
0.4540947377681732,
-0.48403677344322205,
-0.0598160289227... |
func (m *CompaniesItemJournalsItemJournalLinesJournalLineItemRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.JournalLineable, requestConfiguration *CompaniesItemJournalsItemJournalLinesJournalLineItemRequestBuilderPatchRequestConfiguration)(ie233ee762e29... | [
0.25845080614089966,
-0.7675822377204895,
0.6935350894927979,
-0.7741720080375671,
-0.9337388277053833,
0.762718677520752,
-0.5147638320922852,
0.24571926891803741,
0.44614702463150024,
-0.03778711333870888,
0.21630504727363586,
0.4382045567035675,
0.003837561933323741,
0.11252826452255249... |
func (m *CompaniesItemJournalsItemJournalLinesJournalLineItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *CompaniesItemJournalsItemJournalLinesJournalLineItemRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInfor... | [
-0.08090489357709885,
-0.6075263619422913,
0.8465211987495422,
-1.1775761842727661,
-0.3641054928302765,
0.02508913166821003,
-0.5411702990531921,
-0.13625068962574005,
0.24236200749874115,
-0.5850830078125,
0.25137171149253845,
-0.08037372678518295,
-0.14906175434589386,
-0.10833516716957... |
func (m *CompaniesItemJournalsItemJournalLinesJournalLineItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *CompaniesItemJournalsItemJournalLinesJournalLineItemRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation... | [
-0.7142878770828247,
-0.2705375552177429,
0.780224621295929,
-0.8834667205810547,
0.012907497584819794,
-0.22441621124744415,
-0.667405366897583,
-0.449236124753952,
0.10361554473638535,
-0.7128140926361084,
0.16321657598018646,
0.0649128258228302,
-0.3932735323905945,
0.026477940380573273... |
func (m *CompaniesItemJournalsItemJournalLinesJournalLineItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.JournalLineable, requestConfiguration *CompaniesItemJournalsItemJournalLinesJournalLineItemRequestBuilderPatchRequestConfigur... | [
-0.4028019309043884,
-0.7981270551681519,
0.9545953273773193,
-1.0155035257339478,
-0.5412977337837219,
0.17534227669239044,
-0.36749735474586487,
-0.5306424498558044,
-0.18121632933616638,
-0.2345651090145111,
0.47590816020965576,
-0.25507301092147827,
-0.4195760488510132,
-0.211960107088... |
func (c *Conn) lockAndWriter() *bufio.Writer {
c.writeLock.Lock()
return c.writer
} | [
0.04858705401420593,
-0.7880713939666748,
0.3958229422569275,
0.44985729455947876,
-0.028493469581007957,
-0.7416322827339172,
0.48990383744239807,
0.1407574713230133,
-0.28336697816848755,
-1.064535140991211,
-0.360792875289917,
-0.7839389443397522,
-0.6565679907798767,
-0.399398416280746... |
func (c *Conn) readMessage(decoder *msgpack.Decoder) (msg Message, err error) {
// Read the message.
var messageData []interface{}
if messageData, err = decoder.DecodeSlice(); err != nil {
if err != io.EOF {
err = ErrInvalidMessageData
}
return
}
// Make sure that we can parse an opcode and message ID f... | [
-0.6324869394302368,
0.3668951094150543,
0.5818319320678711,
-0.10151113569736481,
-0.2119659036397934,
-1.1533371210098267,
-0.6806111931800842,
-0.2673124372959137,
-0.5604727268218994,
-0.6261777281761169,
0.5099050402641296,
-0.32752785086631775,
-0.8866287469863892,
0.2860646843910217... |
func (c *Conn) Receive() (msg Message, err error) {
return c.readMessage(c.decoder)
} | [
-0.35977891087532043,
-0.35064271092414856,
0.5442589521408081,
-0.24026325345039368,
-0.45666733384132385,
-0.6216847896575928,
-0.867084264755249,
-0.25069716572761536,
-1.0670536756515503,
-0.848028302192688,
0.371243417263031,
-0.1787879914045334,
-0.7804234027862549,
0.379520922899246... |
func (c *Conn) writeMessageData(data []byte) (err error) {
writer := c.lockAndWriter()
defer c.unlockWriter()
var n int
for {
if n, err = writer.Write(data); err != nil {
break
}
if n == len(data) {
break
}
data = data[n:]
}
if err == nil {
writer.Flush()
}
return
} | [
-1.0374373197555542,
0.30038079619407654,
0.4473206400871277,
-0.29644227027893066,
0.8762730956077576,
0.059666432440280914,
-0.32069331407546997,
-0.15622328221797943,
0.24262256920337677,
0.2801424264907837,
-0.43474116921424866,
-0.2730138301849365,
-1.2209391593933105,
1.3385617733001... |
func (c *Conn) sendCompressed(msg Message, data []byte, compressionMethod CompressionMethod) (err error) {
// Serialize the message if it has not already been serialized.
if data == nil {
serialized := msg.Serialize()
if data, err = encodeSlice(serialized); err != nil {
return
}
}
// Compress the data.
v... | [
-0.11589324474334717,
0.6297674179077148,
0.7038014531135559,
0.34831807017326355,
-0.1208520159125328,
-0.8932617902755737,
0.2649461328983307,
-0.4218065142631531,
-0.5519198775291443,
0.24412937462329865,
-0.07969850301742554,
0.4281216561794281,
-1.257354497909546,
0.6543166637420654,
... |
func (c *Conn) nextMessageId() MessageId {
messageId := atomic.AddUint32(&c.messageIdCounter, 1)
return MessageId(messageId)
} | [
0.11262914538383484,
-0.09937888383865356,
0.2718992233276367,
-0.08219489455223083,
-0.9089145660400391,
0.3111620545387268,
-0.08714740723371506,
-0.7366596460342407,
0.691686749458313,
-0.05788637325167656,
0.39596042037010193,
0.4457499384880066,
-1.2568676471710205,
1.5120620727539062... |
func (c *ContainsComparer) CompareQuery(db1, db2 *sql.DB, query string) (string, error, error) {
result, err := sqldiff.GetQueryResult(db2, query)
if err != nil {
return "", nil, err
}
if result.HasResult() {
resultStr := result.String()
if strings.Contains(resultStr, c.Content) {
return "", nil, nil
} e... | [
0.6310765743255615,
-0.5298873782157898,
0.5383054614067078,
-0.3685801029205322,
0.007089585065841675,
-0.18996316194534302,
-1.0724009275436401,
-1.1669262647628784,
0.2933546006679535,
-0.0009226595284417272,
0.8404178619384766,
0.4949037730693817,
-0.7738421559333801,
1.074491381645202... |
func maxPadding(x int, y int) int {
if x > y {
return len(strconv.Itoa(x))
}
return len(strconv.Itoa(y))
} | [
0.038424648344516754,
1.081315517425537,
0.46688786149024963,
-0.7722219824790955,
-1.0682698488235474,
-0.15908204019069672,
-1.7922132015228271,
-0.15655793249607086,
0.34265783429145813,
0.9346940517425537,
-0.3503747582435608,
0.032443758100271225,
0.01989039219915867,
0.58300685882568... |
func printDiffLine(strColor string, maxChars int, sOld string, sNew string, ltext string) string {
switch strColor {
case "green":
return color.GreenString("|%*s %*s %s\n", maxChars, sOld, maxChars, sNew, ltext)
case "red":
return color.RedString("|%*s %*s %s\n", maxChars, sOld, maxChars, sNew, ltext)
}
retur... | [
0.28508564829826355,
-1.0399956703186035,
0.9004042148590088,
-0.4627244174480438,
0.14001284539699554,
0.6636088490486145,
-1.2625176906585693,
-0.38482436537742615,
-0.47548407316207886,
-0.6011970043182373,
-0.0496012382209301,
0.7461269497871399,
-0.1363779604434967,
-0.315606892108917... |
func displayDiff(diff string, newLine int, oldLine int, outputAll bool) string {
var (
oldLineNum int = 0
newLineNum int = 0
maxChars int
output bool = false
diffOutput string = ""
)
scanner := bufio.NewScanner(strings.NewReader(diff))
for scanner.Scan() {
if regexp.MustCompile(`^@@`).MatchStri... | [
0.30407482385635376,
-1.2249560356140137,
1.1192137002944946,
0.026809856295585632,
-0.9244883060455322,
-0.14887508749961853,
0.7706832885742188,
0.061069246381521225,
-0.30361253023147583,
-0.15492460131645203,
0.5894469618797302,
0.47119149565696716,
0.22791868448257446,
1.1180111169815... |
func NewBaseModel() *BaseModel {
baseModel := new(BaseModel)
// initialize unique id
baseModel.Id = xid.New().String()
baseModel.CreatedOn = time.Now()
baseModel.Persisted = false
return baseModel
} | [
-0.13022877275943756,
-1.5651326179504395,
0.535029947757721,
1.0510011911392212,
0.043409816920757294,
0.8165721893310547,
-0.4973326623439789,
0.23999470472335815,
-0.48475974798202515,
0.3947069048881531,
-1.691218614578247,
-0.3542078733444214,
-0.5674554109573364,
0.31592708826065063,... |
func PausedAsReady(pausedAsReady bool) ReadyCheckerOption {
return func(c *ReadyChecker) {
c.pausedAsReady = pausedAsReady
}
} | [
-0.5502835512161255,
-0.7015246152877808,
0.5639174580574036,
-0.05878492444753647,
0.3288300633430481,
0.20120857656002045,
0.46059298515319824,
0.18062277138233185,
0.9691434502601624,
0.4922593832015991,
-0.5548389554023743,
-0.5127969980239868,
0.4472263753414154,
-0.09151153266429901,... |
func CheckJobs(checkJobs bool) ReadyCheckerOption {
return func(c *ReadyChecker) {
c.checkJobs = checkJobs
}
} | [
0.02018747106194496,
0.5861995220184326,
0.3605481684207916,
0.6316437721252441,
-0.20752637088298798,
0.6334821581840515,
0.19604115188121796,
0.11118246614933014,
0.329241007566452,
-0.06253354251384735,
-0.09522121399641037,
-0.5213240385055542,
-0.3095465302467346,
0.18495017290115356,... |
func NewReadyChecker(cl kubernetes.Interface, log func(string, ...interface{}), opts ...ReadyCheckerOption) ReadyChecker {
c := ReadyChecker{
client: cl,
log: log,
}
if c.log == nil {
c.log = nopLogger
}
for _, opt := range opts {
opt(&c)
}
return c
} | [
-0.8841884732246399,
-0.1462821364402771,
0.48811957240104675,
-0.03269191086292267,
-1.1661585569381714,
-0.13060849905014038,
0.27658218145370483,
-0.45565858483314514,
0.2889852523803711,
-0.25877130031585693,
-0.20159786939620972,
0.27734678983688354,
-0.04326057434082031,
0.7726554870... |
func (c *ReadyChecker) IsReady(ctx context.Context, v *resource.Info) (bool, error) {
var (
// This defaults to true, otherwise we get to a point where
// things will always return false unless one of the objects
// that manages pods has been hit
ok = true
err error
)
switch value := AsVersioned(v).(type)... | [
-0.7575085759162903,
-0.7529252767562866,
0.9521075487136841,
0.06775440275669098,
-0.0498991534113884,
-0.23464760184288025,
-0.09169447422027588,
-0.5848874449729919,
0.6041931509971619,
0.6775989532470703,
0.29457613825798035,
0.6708173155784607,
0.011458921246230602,
0.7393272519111633... |
func (c *ReadyChecker) isPodReady(pod *corev1.Pod) bool {
for _, c := range pod.Status.Conditions {
if c.Type == corev1.PodReady && c.Status == corev1.ConditionTrue {
return true
}
}
c.log("Pod is not ready: %s/%s", pod.GetNamespace(), pod.GetName())
return false
} | [
-1.2166976928710938,
-0.08172954618930817,
0.4576667845249176,
-0.431751549243927,
-0.2479979246854782,
0.26112622022628784,
-0.3800378143787384,
0.08500098437070847,
-0.013746718876063824,
0.6571203470230103,
-0.6226404309272766,
0.4321654736995697,
0.2254939079284668,
0.8970023393630981,... |
func (c *ReadyChecker) crdBetaReady(crd apiextv1beta1.CustomResourceDefinition) bool {
for _, cond := range crd.Status.Conditions {
switch cond.Type {
case apiextv1beta1.Established:
if cond.Status == apiextv1beta1.ConditionTrue {
return true
}
case apiextv1beta1.NamesAccepted:
if cond.Status == api... | [
-0.2402506321668625,
-0.3918220102787018,
0.886298656463623,
0.04104272648692131,
-0.34712180495262146,
-0.028946373611688614,
-0.4569987654685974,
0.24802932143211365,
-0.5097265839576721,
0.6007412075996399,
0.15601031482219696,
0.4005335867404938,
0.2151792347431183,
0.9850767850875854,... |
func GetBestScoreIntent(preResult *PredictResponse) IntentScore {
return preResult.TopScoringIntent
} | [
-0.36721885204315186,
-0.8569315671920776,
0.38717299699783325,
-0.050178442150354385,
-1.0187678337097168,
0.6265754699707031,
0.5424396991729736,
-1.0233432054519653,
0.525786817073822,
-0.5492440462112427,
0.6100154519081116,
0.5080090165138245,
-0.8058212995529175,
-0.21458138525485992... |
func strCopy(dest *[C.MaxTextExtent]C.char, src []byte) {
for i, c := range src {
dest[i] = C.char(c)
}
// This is C, we need to terminate the string!
dest[len(src)] = 0
} | [
-0.1285608559846878,
-0.7140778303146362,
0.6531485915184021,
-0.6369043588638306,
-1.1158249378204346,
0.19251883029937744,
-0.8039044737815857,
0.24720293283462524,
-0.14588329195976257,
1.2710442543029785,
0.07640279829502106,
0.8679818511009216,
-0.353502482175827,
-0.7057797312736511,... |
func (u *Uint256) Serialize(w io.Writer) error {
return binary.Write(w, binary.LittleEndian, u)
} | [
-0.12765683233737946,
0.6760076880455017,
0.3260004222393036,
-0.44499340653419495,
0.6251377463340759,
-0.27064964175224304,
0.9110751748085022,
-0.41679978370666504,
0.15946179628372192,
-0.6966007947921753,
-1.3343297243118286,
0.001929428894072771,
-1.0728479623794556,
1.11853277683258... |
func (u *Uint256) Deserialize(r io.Reader) error {
return binary.Read(r, binary.LittleEndian, u)
} | [
0.026321405544877052,
0.13918383419513702,
0.3208482563495636,
-0.7460168600082397,
-0.17911677062511444,
-0.8624454140663147,
0.006708766333758831,
-0.2665975093841553,
-0.03454117476940155,
-0.9975453615188599,
-0.8340963125228882,
-0.14666421711444855,
-1.403444766998291,
0.439536035060... |
func (u *Uint256) Bytes() []byte {
b := make([]byte, UINT256_SIZE)
copy(b, u[:])
return b
} | [
-0.322444885969162,
-0.24149766564369202,
0.24046051502227783,
-0.4067477881908417,
0.5651797652244568,
-0.34391653537750244,
-0.2778010964393616,
-0.1531769037246704,
0.7329769730567932,
-0.8914651870727539,
-0.8099502921104431,
0.8326272368431091,
-0.2326173633337021,
0.4278101623058319,... |
func (u *Uint256) FromBytes(b []byte) error {
if len(b) != UINT256_SIZE {
return ErrBytesSize
}
copy(u[:], b[:])
return nil
} | [
-0.3267459571361542,
0.07963922619819641,
0.2792653739452362,
-0.003202680964022875,
-0.055757757276296616,
-0.35434502363204956,
0.44456401467323303,
0.6990088224411011,
0.9370931386947632,
0.16580644249916077,
-0.685340940952301,
0.418320894241333,
-0.5077781677246094,
0.2856050431728363... |
func (*Count) TypeID() uint32 {
return CountTypeID
} | [
0.7098172903060913,
-0.7739078402519226,
0.6083042025566101,
0.8870556354522705,
0.4057371914386749,
1.4033162593841553,
0.9067344665527344,
-0.6166148781776428,
0.13383476436138153,
0.07438786327838898,
-0.5613806247711182,
0.32414478063583374,
-1.3014167547225952,
0.7812391519546509,
0... |
func (*Count) TypeName() string {
return "count"
} | [
-0.06318460404872894,
-0.6764340996742249,
0.7389086484909058,
0.47275620698928833,
0.018358882516622543,
0.6492782831192017,
0.6717153787612915,
-0.3433920443058014,
-0.5018641352653503,
0.18177677690982819,
-0.935539186000824,
-0.6222970485687256,
-0.3505357503890991,
-0.1166466325521469... |
func (c *Count) TypeInfo() tdp.Type {
typ := tdp.Type{
Name: "count",
ID: CountTypeID,
}
if c == nil {
typ.Null = true
return typ
}
typ.Fields = []tdp.Field{
{
Name: "Count",
SchemaName: "count",
},
}
return typ
} | [
1.0095876455307007,
0.15593889355659485,
0.4917569160461426,
-0.5836641192436218,
0.36706292629241943,
0.6812096238136292,
0.5882378220558167,
-0.19369284808635712,
-0.45809924602508545,
0.4376094937324524,
-0.7644950151443481,
-0.9122875928878784,
-0.12337706983089447,
-0.2798599600791931... |
func (c *Count) GetCount() (value int32) {
if c == nil {
return
}
return c.Count
} | [
0.9252269268035889,
1.1519486904144287,
0.5583443641662598,
0.6706826686859131,
0.43209517002105713,
0.30400192737579346,
1.195371389389038,
-0.18357886373996735,
-0.7203360795974731,
-0.5134384632110596,
-0.04504122585058212,
-0.5911595821380615,
-0.5186988115310669,
1.0818774700164795,
... |
func HTTPClientFor(config *Config) (*http.Client, error) {
transport, err := TransportFor(config)
if err != nil {
return nil, err
}
var httpClient *http.Client
if transport != http.DefaultTransport || config.Timeout > 0 {
httpClient = &http.Client{
Transport: transport,
Timeout: config.Timeout,
}
} ... | [
0.06928553432226181,
-0.15250751376152039,
0.48830175399780273,
-0.3051326870918274,
-0.3336239159107208,
0.43358710408210754,
-0.2980750799179077,
-0.0781283974647522,
-0.6124813556671143,
0.1713816076517105,
0.13379597663879395,
0.15244612097740173,
-0.37500840425491333,
-0.3367886245250... |
func TLSConfigFor(config *Config) (*tls.Config, error) {
cfg, err := config.TransportConfig()
if err != nil {
return nil, err
}
return transport.TLSConfigFor(cfg)
} | [
-0.4456159472465515,
0.6227835416793823,
0.42008158564567566,
-0.960792064666748,
-1.6684131622314453,
-0.5824587941169739,
-0.45295995473861694,
0.4655020833015442,
-0.46104931831359863,
0.5461976528167725,
-1.0955345630645752,
-1.0909942388534546,
0.47563636302948,
0.8740484714508057,
... |
func TransportFor(config *Config) (http.RoundTripper, error) {
cfg, err := config.TransportConfig()
if err != nil {
return nil, err
}
return transport.New(cfg)
} | [
-0.10533800721168518,
-0.3204984664916992,
0.5438745021820068,
-0.4494737982749939,
-0.11538033932447433,
-0.3022858798503876,
-0.004304971545934677,
-0.794442355632782,
-0.5823066234588623,
0.05472404509782791,
-0.5829043388366699,
-0.0842554122209549,
0.25147703289985657,
0.1413142681121... |
func HTTPWrappersForConfig(config *Config, rt http.RoundTripper) (http.RoundTripper, error) {
cfg, err := config.TransportConfig()
if err != nil {
return nil, err
}
return transport.HTTPWrappersForConfig(cfg, rt)
} | [
-0.9007045030593872,
-0.5983047485351562,
0.1927853524684906,
0.14339178800582886,
-0.2343745082616806,
0.11830016225576401,
-0.38282305002212524,
-0.14879366755485535,
-0.14962342381477356,
0.5039632320404053,
-0.5669287443161011,
-0.10103854537010193,
-0.3828360140323639,
0.5416187047958... |
func (c *Config) TransportConfig() (*transport.Config, error) {
conf := &transport.Config{
UserAgent: c.UserAgent,
Transport: c.Transport,
WrapTransport: c.WrapTransport,
DisableCompression: c.DisableCompression,
TLS: transport.TLSConfig{
Insecure: c.Insecure,
ServerName: c.Ser... | [
-0.09809885919094086,
-0.28336817026138306,
0.869927167892456,
-0.03277916833758354,
-0.1959577202796936,
0.008935784921050072,
0.63728266954422,
0.15152792632579803,
0.31519004702568054,
0.7029592990875244,
-1.071624994277954,
0.6022666096687317,
-0.6343494057655334,
0.1465808004140854,
... |
func (c *Config) Wrap(fn transport.WrapperFunc) {
c.WrapTransport = transport.Wrappers(c.WrapTransport, fn)
} | [
-1.408137559890747,
0.21973727643489838,
0.042534373700618744,
-0.16167910397052765,
0.20477989315986633,
0.23446357250213623,
-0.4235583245754242,
0.4388284683227539,
-0.36491861939430237,
0.473813533782959,
-0.27637583017349243,
0.11434854567050934,
1.087863564491272,
-0.2584708034992218... |
func TestGetIPAddressDetailsRequest(t *testing.T) {
request := GetIPAddressDetailsRequest{
Address: "0.0.0.0",
}
assert.Equal(t, "/ip_address/0.0.0.0", request.RequestURL())
} | [
-0.36550626158714294,
-0.11075063794851303,
0.3394288420677185,
-0.17801623046398163,
0.7231566905975342,
0.2754462957382202,
-0.13330040872097015,
-0.07282128185033798,
0.44819360971450806,
-1.1526473760604858,
0.48519155383110046,
0.7678777575492859,
0.40019264817237854,
-0.0000670332665... |
func TestMarshalAssignIPAddressRequest(t *testing.T) {
request := AssignIPAddressRequest{
Access: upcloud.IPAddressAccessPublic,
Family: upcloud.IPAddressFamilyIPv4,
ServerUUID: "009d64ef-31d1-4684-a26b-c86c955cbf46",
MAC: "foo_mac",
Floating: upcloud.True,
Zone: "foo_zone",
}
act... | [
-0.509212851524353,
-0.5012902021408081,
0.8222938179969788,
-0.8280851244926453,
0.017007293179631233,
-0.03208537772297859,
-0.14709866046905518,
0.31323716044425964,
0.3829170763492584,
-0.4791891574859619,
0.22392986714839935,
0.2414412498474121,
0.23881691694259644,
-0.094430349767208... |
func TestMarshalAssignIPAddressRequest_OmitFields(t *testing.T) {
request := AssignIPAddressRequest{
Access: upcloud.IPAddressAccessPublic,
ServerUUID: "009d64ef-31d1-4684-a26b-c86c955cbf46",
}
actualJSON, err := json.Marshal(&request)
assert.NoError(t, err)
expectedJSON := `
{
"ip_address": {
... | [
-0.7574464678764343,
-0.3648046553134918,
0.7766619324684143,
-1.1278282403945923,
-0.06329076737165451,
0.20587489008903503,
0.007613498717546463,
0.2962397634983063,
0.5322399735450745,
-0.0952538400888443,
-0.07830672711133957,
-0.06662826985120773,
-0.243376687169075,
-0.43948230147361... |
func TestModifyIPAddressRequest(t *testing.T) {
request := ModifyIPAddressRequest{
IPAddress: "0.0.0.0",
PTRRecord: "hostname.example.com",
MAC: "foo_mac",
}
actualJSON, err := json.Marshal(&request)
assert.NoError(t, err)
expectedJSON := `
{
"ip_address": {
"ptr_record": "hostname.example.c... | [
-1.0762362480163574,
-0.586121141910553,
0.48195919394493103,
-0.7492127418518066,
0.07985494285821915,
-0.26353341341018677,
-0.7477038502693176,
0.17068609595298767,
0.21862635016441345,
-0.42319256067276,
0.13456541299819946,
0.532689094543457,
-0.10177529603242874,
-0.4593701660633087,... |
func TestModifyIPAddressRequest_OmitMAC(t *testing.T) {
request := ModifyIPAddressRequest{
IPAddress: "0.0.0.0",
PTRRecord: "hostname.example.com",
}
actualJSON, err := json.Marshal(&request)
assert.NoError(t, err)
expectedJSON := `
{
"ip_address": {
"ptr_record": "hostname.example.com"
}
}
`
... | [
-0.3842308223247528,
-0.4024725556373596,
0.5505886077880859,
-0.6808841824531555,
-0.01043249573558569,
0.2992395758628845,
-0.31373828649520874,
0.13840040564537048,
0.21990136802196503,
-0.36509430408477783,
0.5164527297019958,
0.2224198877811432,
-0.5560060143470764,
-0.337285637855529... |
func TestModifyIPAddressRequest_OmitPTR(t *testing.T) {
request := ModifyIPAddressRequest{
IPAddress: "0.0.0.0",
MAC: "foo_mac",
}
actualJSON, err := json.Marshal(&request)
assert.NoError(t, err)
expectedJSON := `
{
"ip_address": {
"mac": "foo_mac"
}
}
`
assert.JSONEq(t, expectedJSON, st... | [
-0.8887801766395569,
-0.6864029765129089,
0.4903166592121124,
-0.9518800973892212,
-0.16226069629192352,
0.5529739260673523,
-0.7206738591194153,
0.14152809977531433,
0.6721946597099304,
-0.08554639667272568,
0.26075831055641174,
0.00877649337053299,
-0.6078342199325562,
-0.609320402145385... |
func TestModifyIPAddressRequest_OmitBoth(t *testing.T) {
request := ModifyIPAddressRequest{
IPAddress: "0.0.0.0",
}
actualJSON, err := json.Marshal(&request)
assert.NoError(t, err)
expectedJSON := `
{
"ip_address": {
"mac": null
}
}
`
assert.JSONEq(t, expectedJSON, string(actualJSON))
assert.Eq... | [
-0.9308784008026123,
-0.8708187341690063,
0.6032395362854004,
-0.687225341796875,
0.265718549489975,
0.3942166864871979,
-0.4228266775608063,
-0.003380675334483385,
0.7134124040603638,
-0.6477606296539307,
-0.12467894703149796,
0.2141432762145996,
-0.16918164491653442,
-0.260187029838562,
... |
func TestReleaseIPAddressRequest(t *testing.T) {
request := ReleaseIPAddressRequest{
IPAddress: "0.0.0.0",
}
assert.Equal(t, "/ip_address/0.0.0.0", request.RequestURL())
} | [
-0.8936182856559753,
-0.3915369212627411,
0.32041892409324646,
-0.077211894094944,
0.4001578390598297,
-0.03937428817152977,
-0.6124114394187927,
0.1704530566930771,
0.5147334933280945,
-0.6381022334098816,
0.2460729032754898,
0.5343339443206787,
-0.07381303608417511,
-0.4344962537288666,
... |
func New() *Plugin {
return &Plugin{metricsConfigs: make(map[string]configReader.Metric)}
} | [
0.7394095063209534,
-0.9476627707481384,
0.11848010122776031,
-0.007957971654832363,
-0.3698582947254181,
-0.11392567306756973,
-0.032413557171821594,
0.012373500503599644,
-0.8666101098060608,
0.016077063977718353,
-0.01062337588518858,
0.06466896831989288,
0.4959222078323364,
0.142627894... |
func (p *Plugin) GetMetricTypes(cfg plugin.Config) ([]plugin.Metric, error) {
configs, err := getMetricsConfig(cfg)
if err != nil {
return nil, err
}
mts := []plugin.Metric{}
for _, cfg := range configs {
namespace := plugin.NewNamespace(Vendor, PluginName)
for _, ns := range cfg.Namespace {
if ns.Sourc... | [
0.03969282656908035,
-0.28074324131011963,
0.5111970901489258,
0.16469843685626984,
0.7690985202789307,
-0.25792115926742554,
0.3033824861049652,
-0.8176340460777283,
-0.307275652885437,
0.8308007717132568,
-0.37625056505203247,
0.5856419205665588,
-0.6400439143180847,
1.24505615234375,
... |
func (p *Plugin) CollectMetrics(metrics []plugin.Metric) ([]plugin.Metric, error) {
var mtxMetrics sync.Mutex
var wgCollectedMetrics sync.WaitGroup
//initialization of plugin structure (only once)
if !p.initialized {
configs, err := getMetricsConfig(metrics[0].Config)
if err != nil {
return nil, err
}
f... | [
0.32937291264533997,
-0.9001832604408264,
0.5929243564605713,
0.16012580692768097,
0.09201540797948837,
-0.2756311893463135,
0.5733411908149719,
-0.6011865139007568,
-0.13121868669986725,
0.7605903744697571,
-0.0008855581982061267,
0.1534389704465866,
-0.2803073823451996,
0.948461830615997... |
func (p *Plugin) GetConfigPolicy() (plugin.ConfigPolicy, error) {
policy := plugin.NewConfigPolicy()
err := policy.AddNewStringRule([]string{Vendor, PluginName}, setFileConfigVar, true)
if err != nil {
return *policy, err
}
return *policy, nil
} | [
0.04375827684998512,
-0.16354727745056152,
0.372701495885849,
-0.07680561393499374,
0.4618944823741913,
-0.3844316303730011,
0.0804891586303711,
0.533561646938324,
-0.30457571148872375,
0.4059002101421356,
-0.256955087184906,
-0.23186658322811127,
-1.0400668382644653,
-0.017794502899050713... |
func (s *snmpType) newHandler(hostConfig configReader.SnmpAgent) (*snmpgo.SNMP, error) {
return snmp.NewHandler(hostConfig)
} | [
0.10062237828969955,
-0.7501223087310791,
0.05776938796043396,
0.6379523873329163,
-0.9257072806358337,
0.20343568921089172,
-0.39885440468788147,
0.43610796332359314,
0.5355168581008911,
0.14109475910663605,
-0.40514519810676575,
-0.2703680694103241,
-1.0458853244781494,
0.342096745967865... |
func (s *snmpType) readElements(handler *snmpgo.SNMP, oid string, mode string) ([]*snmpgo.VarBind, error) {
return snmp.ReadElements(handler, oid, mode)
} | [
-0.7233644723892212,
-0.6694309115409851,
0.49329182505607605,
0.26512783765792847,
-1.1725914478302002,
0.14078082144260406,
-0.39166969060897827,
-0.4170147478580475,
1.0570247173309326,
0.26349347829818726,
-0.1920708864927292,
0.6327058672904968,
-0.9932155013084412,
0.6752974390983582... |
func getConnection(agentConfig configReader.SnmpAgent) (connection, error) {
if conn, ok := snmpConnections[agentConfig.Address]; ok {
return conn, nil
}
handler, err := snmp_.newHandler(agentConfig)
if err != nil {
return connection{}, err
}
snmpConnections[agentConfig.Address] = connection{handler: handler,... | [
-0.3445241451263428,
-0.6193706393241882,
0.3599470853805542,
0.062289416790008545,
-0.4490310549736023,
-1.0200749635696411,
-0.06375540792942047,
0.2764842212200165,
0.7933011054992676,
0.18722720444202423,
0.05327743664383888,
-0.47612833976745605,
-0.8230608105659485,
-0.02455662749707... |
func watchConnections() {
for {
time.Sleep(connectionWait)
mtxSnmpConnections.Lock()
for k := range snmpConnections {
if time.Now().Sub(snmpConnections[k].lastUsed) > connectionIdle {
//close the connection
snmpConnections[k].handler.Close()
//remove the connection
delete(snmpConnections, k)... | [
0.33082008361816406,
-1.0819780826568604,
0.4928865432739258,
-0.5203391909599304,
0.21830347180366516,
-0.6928375363349915,
-0.4634708762168884,
-0.3038846254348755,
0.39945292472839355,
-0.1686096489429474,
-0.10104764997959137,
-0.46873894333839417,
-1.1483168601989746,
0.69917607307434... |
func getDynamicNamespaceElements(handler *snmpgo.SNMP, results []*snmpgo.VarBind, metric *configReader.Metric) error {
for i := 0; i < len(metric.Namespace); i++ {
//clear slice with dynamic parts of namespace
metric.Namespace[i].Values = []string{}
switch metric.Namespace[i].Source {
case configReader.NsSou... | [
-0.15385423600673676,
-0.3116488456726074,
0.7014434933662415,
0.027881575748324394,
-0.1520121842622757,
0.07151677459478378,
0.23367540538311005,
-1.300276279449463,
0.10748942941427231,
-0.00005762624277849682,
0.3630705773830414,
-0.10711482167243958,
-0.2521185278892517,
1.12896060943... |
func getMetricsConfig(cfg plugin.Config) (configReader.Metrics, error) {
setFilePath, err := cfg.GetString(setFileConfigVar)
if err != nil {
return nil, err
}
configs, err := configReader.GetMetricsConfig(setFilePath)
if err != nil {
return nil, err
}
return configs, nil
} | [
0.5940768718719482,
0.006847870070487261,
0.3892019987106323,
-0.02232675999403,
-0.3853231966495514,
-0.5608863234519958,
0.32474765181541443,
-0.2507641315460205,
-1.3209706544876099,
1.2646085023880005,
-0.5853230953216553,
0.3070441782474518,
-0.5638439059257507,
0.603797972202301,
-... |
func getMetricsToCollect(namespace string, metrics map[string]configReader.Metric) (map[string]configReader.Metric, error) {
collectedMetrics := make(map[string]configReader.Metric)
// Filter out setfile based metrics by given namespace
for ns := range metrics {
matched, err := regexp.MatchString(strings.Replace(... | [
-0.16018755733966827,
-0.33944422006607056,
0.5900542736053467,
-0.30674684047698975,
-0.11485214531421661,
-0.1753130555152893,
-0.40515369176864624,
-1.2269690036773682,
-0.5568606853485107,
0.732957661151886,
0.4454185664653778,
0.4822622239589691,
-0.04258725047111511,
0.75674134492874... |
func convertSnmpDataToMetric(snmpData string, snmpType string) (interface{}, error) {
var val interface{}
var err error
switch snmpType {
case "Counter", "Counter32", "Gauge32", "UInteger32", "TimeTicks":
val, err = strconv.ParseUint(snmpData, 10, 32)
case "Counter64":
val, err = strconv.ParseUint(snmpData, 1... | [
0.16729462146759033,
-0.47891175746917725,
0.7303990125656128,
-0.43238309025764465,
-1.000016689300537,
0.33875352144241333,
-0.8161716461181641,
-0.6946139931678772,
0.022577529773116112,
0.48004305362701416,
0.04429802671074867,
0.3503051698207855,
-0.40457168221473694,
-0.7014551162719... |
func modifyNumericMetric(data interface{}, scale float64, shift float64) interface{} {
//check if scale and shift parameters are set
if scale == 1.0 && shift == 0.0 {
return data
}
var modifiedData interface{}
//use shift and scale and convert data to float64
switch data.(type) {
case uint32:
modifiedData = ... | [
-0.7310329079627991,
0.2900557219982147,
0.8120521903038025,
0.15646255016326904,
0.07863979786634445,
0.6407609581947327,
-0.6308770775794983,
-1.0620508193969727,
-0.3555392324924469,
0.17819401621818542,
1.3627984523773193,
-0.264995813369751,
-0.6493462920188904,
0.7596536874771118,
... |
func Run(c cnfg.Config) error {
var seed int
if c.Seed == 0 {
seed = int(rand.Uint64())
if seed < 0 {
seed = -seed
}
fmt.Printf("seed = %d\n", seed)
} else {
seed = c.Seed
}
const (
chains = 5
length = 7
)
chain := Generate(rand.New(rand.NewSource(int64(seed))), chains, length)
a, b := fmt.Spri... | [
-0.31919682025909424,
0.9140811562538147,
0.9555249214172363,
-0.2881433963775635,
-0.2524734139442444,
0.06786572933197021,
1.2491068840026855,
-0.604063868522644,
-0.42781662940979004,
0.026873258873820305,
-0.16850794851779938,
0.2663610279560089,
-0.5520130395889282,
0.4843451082706451... |
func (q *queue) enqueue(id string) bool {
if q.discovered[id] {
return false
}
q.discovered[id] = true
q.list.PushBack(id)
return true
} | [
-0.3321581184864044,
0.5984508395195007,
0.5811097621917725,
-0.3085986375808716,
0.4073326587677002,
0.1393740177154541,
-1.1793725490570068,
0.048851948231458664,
0.09255852550268173,
0.06501437723636627,
-1.1282756328582764,
0.27963370084762573,
-0.8523721098899841,
0.8533307909965515,
... |
func (l Poset) ToGraphViz(svg string, colors map[string]string) error {
buf, err := gviz.Compile(l, svg, colors)
if err != nil {
return err
}
if err := ioutil.WriteFile("g.gv", buf, os.ModePerm); err != nil {
return err
}
return gviz.Dot("g.gv", svg)
} | [
-0.12102369219064713,
0.4282665550708771,
0.6479548811912537,
-0.2630928158760071,
-0.40319254994392395,
0.09887436032295227,
0.09669527411460876,
-0.009106414392590523,
-0.05113349109888077,
0.15898765623569489,
-0.08887448906898499,
0.7551044225692749,
0.6497968435287476,
-0.475321084260... |
func (l Poset) Meet(a, b string) string {
desc := l.m[b].Descendents
return BreadthFirstSearch(l, a, func(id string) bool {
if desc.Has(id) {
return true
}
return false
})
} | [
0.47324347496032715,
0.02091355249285698,
0.6307045817375183,
-0.5547741055488586,
-0.6556103825569153,
0.4735858738422394,
-1.4661056995391846,
-0.2310144454240799,
-1.44236421585083,
1.018662929534912,
0.7727882266044617,
0.061272043734788895,
-0.43426525592803955,
0.10949477553367615,
... |
func ProvideAuth(
ctx context.Context, db types.StagingQuerier, stagingDB ident.StagingSchema,
) (auth types.Authenticator, cancel func(), err error) {
cancel = func() {}
keyTable := ident.NewTable(stagingDB.Schema(), PublicKeysTable)
revokedTable := ident.NewTable(stagingDB.Schema(), RevokedIdsTable)
// Boostra... | [
-0.04693339392542839,
0.07523909211158752,
0.7230405211448669,
0.5407090187072754,
-1.0857419967651367,
-0.24798057973384857,
0.4062482416629791,
-0.18090364336967468,
0.7945875525474548,
0.13936854898929596,
0.2740110158920288,
0.28101789951324463,
0.6854867339134216,
0.02479727938771248,... |
func getSequentialFileContent() (string, map[int]compareFunc) {
sb := strings.Builder{}
expectedLines := make(map[int]compareFunc)
for i := 0; i < 1000000; i++ {
line := fmt.Sprintf(`{ "line": "%d", "id": "i%d", data: "some event %d" }`, i, i, i)
sb.WriteString(line)
sb.WriteString("\n")
expectedLines[i] =... | [
0.8944746851921082,
-0.8382703065872192,
0.4945542514324188,
-0.7542893290519714,
-0.1749950498342514,
-0.8727371692657471,
0.05823984742164612,
0.45163026452064514,
-0.6470942497253418,
-0.3741971552371979,
-0.005991622805595398,
-0.08841323852539062,
0.01446241233497858,
-0.6937851309776... |
func AddFolder(watcher *fsnotify.Watcher, conf *Configuration) error {
path, _ := filepath.Abs(conf.Path)
cpt := 0
info(fmt.Sprintf("Scanning folders",))
err := filepath.Walk(path, func(path string, f os.FileInfo, err error) error {
if err != nil {
debug(fmt.Sprintf("Folder does not exist: ", err))
panic... | [
-0.053298816084861755,
0.1979321390390396,
0.8760719895362854,
0.5130453109741211,
-0.06375673413276672,
0.5719690918922424,
0.9348350763320923,
0.3041113615036011,
-0.7284713387489319,
-0.11427584290504456,
0.22301627695560455,
-0.6643785238265991,
-0.5519297122955322,
1.7074095010757446,... |
func configure() {
var err error
// parse command line argument
flag.Parse()
if configuration.FileConfiguration != "" {
var fileConf = Configuration{}
path, _ := filepath.Abs(configuration.FileConfiguration)
if _, err := toml.DecodeFile(path, &fileConf); err != nil {
info(fmt.Sprintf("Error while readin... | [
0.3304467797279358,
-0.4492831528186798,
1.0308585166931152,
0.30981892347335815,
0.12529505789279938,
-0.1753140389919281,
0.05246720463037491,
0.6982353329658508,
-0.9177176356315613,
0.27351370453834534,
-0.200175940990448,
0.3540748953819275,
-0.9163540005683899,
1.0542504787445068,
... |
func (s ErrorCause) MarshalJSON() ([]byte, error) {
type opt ErrorCause
// We transform the struct to a map without the embedded additional properties map
tmp := make(map[string]interface{}, 0)
data, err := json.Marshal(opt(s))
if err != nil {
return nil, err
}
err = json.Unmarshal(data, &tmp)
if err != nil ... | [
-0.28371933102607727,
-0.7675071358680725,
0.6279615759849548,
-0.7017018795013428,
-0.34760522842407227,
-0.696427583694458,
-0.15917235612869263,
0.3915806710720062,
0.868235170841217,
0.37280282378196716,
-0.13636815547943115,
1.2489826679229736,
-0.1052975207567215,
-0.1063438430428505... |
func New(l *lexer.Lexer, context string) *Parser {
p := &Parser{
l: l,
Context: context,
errors: []string{},
}
p.prefixParseFns = make(map[token.Type]prefixParseFn)
p.registerPrefix(token.Ident, p.parseIdentifier)
p.registerPrefix(token.Int, p.parseIntegerLiteral)
p.registerPrefix(token.String, p.pa... | [
0.1993831992149353,
-1.1155003309249878,
0.9454162120819092,
-0.32593393325805664,
-0.717989444732666,
-0.38750606775283813,
-0.6748485565185547,
0.09135133028030396,
0.00999562256038189,
-0.30059289932250977,
-0.8027055859565735,
-0.18074600398540497,
-0.11717298626899719,
0.4586946666240... |
func (p *Parser) ParseProgram() *ast.Program {
program := &ast.Program{}
program.Statements = []ast.Statement{}
// while we didn't hit an EOF token
for p.currToken.Type != token.EOF {
stmt := p.parseStatement()
if stmt != nil {
program.Statements = append(program.Statements, stmt)
}
p.nextToken()
}
r... | [
-0.07170561701059341,
-0.861906111240387,
0.5477532744407654,
-0.4023798108100891,
-0.34680965542793274,
-0.3997052311897278,
0.204094797372818,
-0.6258309483528137,
0.6354781985282898,
-0.11271373182535172,
0.6855922937393188,
-0.5871822237968445,
-0.4272747039794922,
0.2923240065574646,
... |
func (BeeStrategy) Validate(ctx request.Context, obj runtime.Object) field.ErrorList {
o := obj.(*insect.Bee)
log.Printf("Validating fields for Bee %s\n", o.Name)
errors := field.ErrorList{}
// perform validation here and add to errors using field.Invalid
return errors
} | [
-0.6921597123146057,
0.0092080133035779,
0.46974891424179077,
0.25484710931777954,
1.1097705364227295,
0.30084025859832764,
-0.012483146972954273,
-0.624779462814331,
0.8463019728660583,
0.4079045355319977,
-0.2047898918390274,
-0.2938280999660492,
0.5416688323020935,
0.4715079069137573,
... |
func (BeeSchemeFns) DefaultingFunction(o interface{}) {
obj := o.(*Bee)
// set default field values here
log.Printf("Defaulting fields for Bee %s\n", obj.Name)
} | [
0.11471527069807053,
0.8609701991081238,
0.32047420740127563,
-0.03653679043054581,
1.023827075958252,
-0.043783076107501984,
0.46282967925071716,
0.23297463357448578,
0.42175865173339844,
-0.19138450920581818,
-1.20755136013031,
0.22362969815731049,
0.2594151198863983,
0.08201521635055542... |
func CreateConfig() *Config {
return &Config{
Headers: make(map[string]string),
Paths: make(map[string]string),
}
} | [
0.7440227270126343,
-0.9771472215652466,
0.4478895962238312,
-0.2920321524143219,
-0.16034261882305145,
0.07730808109045029,
-0.67866450548172,
0.46622347831726074,
-0.6267750859260559,
-0.26269981265068054,
-0.09877049922943115,
-0.9629615545272827,
-0.09185084700584412,
0.818198204040527... |
func New(ctx context.Context, next http.Handler, config *Config, name string) (http.Handler, error) {
if len(config.Headers) == 0 {
return nil, fmt.Errorf("headers cannot be empty")
}
return &Demo{
headers: config.Headers,
next: next,
name: name,
}, nil
} | [
-0.07620609551668167,
-0.13827334344387054,
0.45532041788101196,
0.5019474029541016,
-1.2595515251159668,
0.056436363607645035,
-0.18022561073303223,
-0.3598940372467041,
-0.28197774291038513,
-0.5012692809104919,
-0.2566116750240326,
0.2075520157814026,
0.7244355082511902,
0.4884710013866... |
func main() {
} | [
0.5935109257698059,
-0.5238813161849976,
0.06262364238500595,
1.9832351207733154,
0.3146790564060211,
0.4833202362060547,
1.6697919368743896,
0.6601263284683228,
-0.13723190128803253,
-0.6224525570869446,
-0.7590957880020142,
0.3508590757846832,
-0.36477935314178467,
0.25635138154029846,
... |
func (*GetTestRequest) Descriptor() ([]byte, []int) {
return file_yandex_cloud_loadtesting_agent_v1_test_service_proto_rawDescGZIP(), []int{0}
} | [
-0.43291419744491577,
0.2659042477607727,
0.7329198122024536,
-0.03918161615729332,
0.7471917271614075,
-0.5632071495056152,
0.8138983249664307,
-0.1511400043964386,
0.08959832787513733,
-0.16985024511814117,
-0.12313644587993622,
1.1249969005584717,
-0.2241407036781311,
0.8254859447479248... |
func (*CreateTestRequest) Descriptor() ([]byte, []int) {
return file_yandex_cloud_loadtesting_agent_v1_test_service_proto_rawDescGZIP(), []int{1}
} | [
-0.2746782898902893,
0.0695706382393837,
0.5412193536758423,
-0.06209607422351837,
0.41251298785209656,
0.045264679938554764,
0.7044779062271118,
-0.4087718725204468,
-0.09293433278799057,
0.22617681324481964,
0.021500416100025177,
0.11169849336147308,
-0.45468050241470337,
1.0970860719680... |
func (*CreateTestMetadata) Descriptor() ([]byte, []int) {
return file_yandex_cloud_loadtesting_agent_v1_test_service_proto_rawDescGZIP(), []int{2}
} | [
0.036555420607328415,
-0.08275169879198074,
0.057953063398599625,
-0.2290334552526474,
1.046875238418579,
0.47952762246131897,
0.4075014591217041,
-1.0237994194030762,
-0.1298658847808838,
0.982571005821228,
-0.7851596474647522,
0.07040999829769135,
-0.8868346810340881,
0.4728149175643921,... |
func (*UpdateTestRequest) Descriptor() ([]byte, []int) {
return file_yandex_cloud_loadtesting_agent_v1_test_service_proto_rawDescGZIP(), []int{3}
} | [
-1.140796184539795,
-0.21843159198760986,
0.5559727549552917,
0.1257273554801941,
-0.29532182216644287,
-0.20642423629760742,
0.6182386875152588,
-0.0645139291882515,
0.32541999220848083,
0.5223217010498047,
-0.04022771865129471,
0.27509361505508423,
-0.4190444350242615,
0.452640175819397,... |
func (*UpdateTestMetadata) Descriptor() ([]byte, []int) {
return file_yandex_cloud_loadtesting_agent_v1_test_service_proto_rawDescGZIP(), []int{4}
} | [
-0.6915287971496582,
-0.337358683347702,
0.3034763038158417,
-0.003815027419477701,
0.1477271169424057,
0.06374835968017578,
0.3987707197666168,
-0.6632333397865295,
-0.11433303356170654,
1.2143590450286865,
-0.8206418752670288,
0.6598892211914062,
-0.6186388731002808,
-0.3407539427280426,... |
func (_m *ServerConnexion) Delete(oath string) error {
ret := _m.Called(oath)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(oath)
} else {
r0 = ret.Error(0)
}
return r0
} | [
0.37742552161216736,
-0.2824420630931854,
0.6099812984466553,
0.263713538646698,
-0.3445439040660858,
0.36059844493865967,
0.4918310046195984,
0.52615886926651,
-0.07231225818395615,
0.000776216562371701,
0.05884181335568428,
0.7679001092910767,
-0.5194003582000732,
0.6157911419868469,
0... |
func (_m *ServerConnexion) FileSize(path string) (int64, error) {
ret := _m.Called(path)
var r0 int64
if rf, ok := ret.Get(0).(func(string) int64); ok {
r0 = rf(path)
} else {
r0 = ret.Get(0).(int64)
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(path)
} else {
r1 = ret.Erro... | [
-0.7700598835945129,
-0.1391495019197464,
0.7230296730995178,
-0.030792539939284325,
-0.25021079182624817,
-0.1722763031721115,
0.9531531929969788,
0.3370801508426666,
-0.3126291334629059,
-0.022139057517051697,
0.1511159986257553,
0.13218162953853607,
-0.42016875743865967,
0.8494021892547... |
func (_m *ServerConnexion) List(sPath string) ([]*jlaffayeftp.Entry, error) {
ret := _m.Called(sPath)
var r0 []*jlaffayeftp.Entry
if rf, ok := ret.Get(0).(func(string) []*jlaffayeftp.Entry); ok {
r0 = rf(sPath)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*jlaffayeftp.Entry)
}
}
var r1 error
if ... | [
0.42782166600227356,
-0.966189980506897,
0.4197651743888855,
0.07758327573537827,
0.06444501876831055,
-0.11849644780158997,
0.1385987102985382,
0.8896255493164062,
0.2448962926864624,
-0.06892011314630508,
-1.3997381925582886,
0.6532685160636902,
0.2220454066991806,
0.7817044258117676,
... |
func (_m *ServerConnexion) Login(sUsername string, sPwd string) error {
ret := _m.Called(sUsername, sPwd)
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(sUsername, sPwd)
} else {
r0 = ret.Error(0)
}
return r0
} | [
-0.34773939847946167,
-0.8161327838897705,
0.4102039635181427,
0.5465753674507141,
-1.0265711545944214,
0.6375722885131836,
1.2140650749206543,
1.4661765098571777,
-0.13556045293807983,
-0.781374454498291,
-0.953490138053894,
0.48523256182670593,
-0.15613125264644623,
0.062202759087085724,... |
func (_m *ServerConnexion) MakeDir(sSource string) error {
ret := _m.Called(sSource)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(sSource)
} else {
r0 = ret.Error(0)
}
return r0
} | [
-0.5319324135780334,
0.3484671413898468,
0.6752001643180847,
0.24518725275993347,
-1.4794366359710693,
0.40482455492019653,
1.5086063146591187,
1.0054296255111694,
-0.11164205521345139,
-0.5482704639434814,
-0.8991637825965881,
-0.25162696838378906,
0.22584319114685059,
0.714015543460846,
... |
func (_m *ServerConnexion) Quit() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
} | [
-0.5147231221199036,
-0.053875744342803955,
0.516176164150238,
0.45780622959136963,
0.19027160108089447,
0.3216574192047119,
0.9820773005485535,
-0.2663767337799072,
-0.4005556106567383,
0.22831308841705322,
-0.3317282199859619,
0.3964867889881134,
-0.19593173265457153,
0.25529026985168457... |
func (_m *ServerConnexion) RemoveDir(sSource string) error {
ret := _m.Called(sSource)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(sSource)
} else {
r0 = ret.Error(0)
}
return r0
} | [
-0.7251571416854858,
0.15615950524806976,
0.7369897365570068,
-0.038822922855615616,
-1.3427951335906982,
0.05901511758565903,
1.312204360961914,
1.2051430940628052,
0.17531636357307434,
-0.2227374166250229,
-0.6993022561073303,
-0.11144737154245377,
-0.13694003224372864,
0.55941241979599,... |
func (_m *ServerConnexion) RemoveDirRecur(sSource string) error {
ret := _m.Called(sSource)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(sSource)
} else {
r0 = ret.Error(0)
}
return r0
} | [
-0.36053019762039185,
-0.14218978583812714,
0.6130634546279907,
-0.2663942873477936,
-1.357965350151062,
-0.05994584411382675,
1.2553977966308594,
1.4610389471054077,
-0.3110164403915405,
-0.33585864305496216,
-1.2281253337860107,
0.09696599096059799,
-0.0431366004049778,
0.706582248210907... |
func (_m *ServerConnexion) Rename(sSource string, sDestination string) error {
ret := _m.Called(sSource, sDestination)
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(sSource, sDestination)
} else {
r0 = ret.Error(0)
}
return r0
} | [
-1.2360141277313232,
0.04087306186556816,
0.6498260498046875,
0.08515408635139465,
-1.0102664232254028,
-0.17749649286270142,
0.30855679512023926,
1.1188478469848633,
-0.29108381271362305,
0.1035887822508812,
-0.3774622976779938,
0.13598288595676422,
0.762058436870575,
-0.2380010485649109,... |
func (_m *ServerConnexion) Retr(path string) (*jlaffayeftp.Response, error) {
ret := _m.Called(path)
var r0 *jlaffayeftp.Response
if rf, ok := ret.Get(0).(func(string) *jlaffayeftp.Response); ok {
r0 = rf(path)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*jlaffayeftp.Response)
}
}
var r1 error
if... | [
-0.47399473190307617,
-0.4459463059902191,
0.5709693431854248,
0.278922438621521,
-0.04420897364616394,
0.23075997829437256,
1.1460790634155273,
-0.24869434535503387,
-0.48083826899528503,
-0.4297124743461609,
0.28805848956108093,
-0.40912264585494995,
-0.08034560084342957,
0.0522364228963... |
func (_m *ServerConnexion) Stor(path string, oReader io.Reader) error {
ret := _m.Called(path, oReader)
var r0 error
if rf, ok := ret.Get(0).(func(string, io.Reader) error); ok {
r0 = rf(path, oReader)
} else {
r0 = ret.Error(0)
}
return r0
} | [
-1.1847538948059082,
-0.8377854824066162,
0.3583770990371704,
-0.583004891872406,
-1.0731652975082397,
-0.020930863916873932,
0.6906289458274841,
-0.8290505409240723,
-0.559425950050354,
0.1916571855545044,
0.07879751920700073,
-0.5663313269615173,
-0.25632524490356445,
-0.2797448337078094... |
func TestReadmeBackstoryExample(t *testing.T) {
logs := []Timelog{
Timelog{"Eating", TimelogTS{time.Date(2016, 10, 5, 9, 5, 9, 0, time.UTC)}},
Timelog{"Coding", TimelogTS{time.Date(2016, 10, 5, 9, 29, 10, 0, time.UTC)}},
Timelog{"Resting", TimelogTS{time.Date(2016, 10, 5, 9, 54, 36, 0, time.UTC)}},
Timelog{"Me... | [
-0.052788540720939636,
0.30038055777549744,
1.1145778894424438,
0.18560686707496643,
-0.23664042353630066,
0.19744464755058289,
0.43462711572647095,
-0.8648697137832642,
0.2370559573173523,
0.48327580094337463,
-0.28114333748817444,
-0.548043966293335,
0.2997927963733673,
0.449692159891128... |
func Prompt() {
currDir := strings.Trim(commands.CurrentWD(), "\n")
fmt.Printf("%v $: ", currDir)
} | [
0.1662817746400833,
-0.7816449403762817,
0.5363976359367371,
0.01237174030393362,
0.31717726588249207,
0.7110279202461243,
1.2280750274658203,
0.12846660614013672,
0.1911950558423996,
-0.5969609022140503,
0.4174056649208069,
1.140212059020996,
0.16860245168209076,
0.2909903824329376,
0.8... |
func NetworkPolicySpec() *NetworkPolicySpecApplyConfiguration {
return &NetworkPolicySpecApplyConfiguration{}
} | [
0.7969907522201538,
-0.24061907827854156,
0.29755261540412903,
-0.338508278131485,
-0.38845181465148926,
0.2070349007844925,
-0.5181072354316711,
-0.8268159627914429,
0.4881593883037567,
0.30404168367385864,
-0.4340168833732605,
-0.5225546360015869,
0.5722156763076782,
-0.12883919477462769... |
func (b *NetworkPolicySpecApplyConfiguration) WithPodSelector(value *v1.LabelSelectorApplyConfiguration) *NetworkPolicySpecApplyConfiguration {
b.PodSelector = value
return b
} | [
-0.9304684996604919,
-0.6102291345596313,
0.3907189965248108,
-0.8254036903381348,
-0.23351487517356873,
-0.06520567089319229,
-0.39936816692352295,
-0.9704217910766602,
0.23353728652000427,
-0.25985679030418396,
-0.39950045943260193,
-1.0454416275024414,
0.33255258202552795,
0.04904342070... |
func (b *NetworkPolicySpecApplyConfiguration) WithIngress(values ...*NetworkPolicyIngressRuleApplyConfiguration) *NetworkPolicySpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithIngress")
}
b.Ingress = append(b.Ingress, *values[i])
}
return b
} | [
-0.8606665730476379,
-0.2856636345386505,
0.36642590165138245,
0.1315668225288391,
0.24798868596553802,
0.9022042751312256,
-0.6919240355491638,
-0.3604342043399811,
-0.1609266996383667,
-0.5814241170883179,
0.10320733487606049,
0.20032504200935364,
-1.2337807416915894,
0.4302789568901062,... |
func (b *NetworkPolicySpecApplyConfiguration) WithEgress(values ...*NetworkPolicyEgressRuleApplyConfiguration) *NetworkPolicySpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithEgress")
}
b.Egress = append(b.Egress, *values[i])
}
return b
} | [
-0.3115004301071167,
0.13142040371894836,
0.48191970586776733,
-0.1309596300125122,
0.4724859297275543,
0.5413995981216431,
-0.2596750557422638,
-0.5844169855117798,
-0.029674651101231575,
-0.35701465606689453,
-0.1456144005060196,
-0.7624202370643616,
0.18092764914035797,
1.0229412317276,... |
func (b *NetworkPolicySpecApplyConfiguration) WithPolicyTypes(values ...extensionsv1beta1.PolicyType) *NetworkPolicySpecApplyConfiguration {
for i := range values {
b.PolicyTypes = append(b.PolicyTypes, values[i])
}
return b
} | [
-0.24629932641983032,
-0.14213348925113678,
0.24389943480491638,
0.13846388459205627,
0.35680103302001953,
0.7859914302825928,
-0.7954028844833374,
-1.1242377758026123,
0.7096664905548096,
0.45337751507759094,
-1.066650152206421,
-0.9694327712059021,
-0.25255128741264343,
0.987894237041473... |
func TestCasingOfOperatorCombinations(t *testing.T) {
dirName := t.TempDir()
logger, _ := test.NewNullLogger()
schemaGetter := &fakeSchemaGetter{shardState: singleShardState()}
repo, err := New(logger, Config{
MemtablesFlushIdleAfter: 60,
RootPath: dirName,
QueryMaximumResults: 10000... | [
-0.40590453147888184,
0.6141314506530762,
0.8087000846862793,
0.17467939853668213,
0.2219078689813614,
0.2607244849205017,
0.42420750856399536,
-0.2929709553718567,
0.22362466156482697,
-0.2930663228034973,
-0.8241803646087646,
0.4451628625392914,
-0.40223443508148193,
0.5740571022033691,
... |
func Retrieve(cr *brokerv2alpha1.ActiveMQArtemis, namespacedName types.NamespacedName, client client.Client, objectDefinition runtime.Object) error {
// Log where we are and what we're doing
reqLogger := log.WithValues("ActiveMQArtemis Name", cr.Name)
objectTypeString := reflect.TypeOf(objectDefinition).String()
r... | [
0.6062025427818298,
-1.124755620956421,
0.5937289595603943,
-0.29461511969566345,
0.038611479103565216,
-0.7276259064674377,
-0.22087125480175018,
-0.44668900966644287,
1.0565375089645386,
0.10405084490776062,
-0.19053399562835693,
1.4035943746566772,
-1.2157288789749146,
0.007260462734848... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.