text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (m *ItemsMutator) ExclusiveMinimum(v float64) *ItemsMutator { m.proxy.exclusiveMinimum = &v return m }
[ 0.32544660568237305, 1.2570794820785522, 0.2839295566082001, 0.5533480048179626, -0.6032905578613281, -0.22340595722198486, -0.798215925693512, -0.882537305355072, 1.1570556163787842, -0.18518474698066711, -0.5448865294456482, -0.6786539554595947, -0.9122989773750305, -0.0620768740773201, ...
func (m *ItemsMutator) ClearMaxLength() *ItemsMutator { m.lock.Lock() defer m.lock.Unlock() m.proxy.maxLength = nil return m }
[ -0.4303256869316101, 0.189116969704628, 0.09672386199235916, 0.5955331921577454, -0.9687398672103882, 0.2892434000968933, -0.5618347525596619, -0.1284630000591278, 0.6051934957504272, 0.6627072691917419, 0.10750912874937057, 0.7137891054153442, -0.4191955626010895, -0.2729587256908417, -...
func (m *ItemsMutator) MaxLength(v int) *ItemsMutator { m.proxy.maxLength = &v return m }
[ 0.37163978815078735, 0.6412667632102966, -0.07086620479822159, 0.3963474929332733, 0.05287975072860718, 0.8439672589302063, 0.25188472867012024, 0.2031368762254715, 0.9583534598350525, -0.34246280789375305, -0.6293285489082336, -0.3674773573875427, 0.06023630127310753, -0.3786918818950653,...
func (m *ItemsMutator) ClearMinLength() *ItemsMutator { m.lock.Lock() defer m.lock.Unlock() m.proxy.minLength = nil return m }
[ -0.40436413884162903, 0.013815280050039291, -0.04289327934384346, 0.3530620336532593, -0.9279220104217529, 0.3063625395298004, -0.5039171576499939, -1.1272501945495605, 0.5767743587493896, 0.3552537262439728, -0.008759502321481705, 1.1578938961029053, -1.0676854848861694, -0.32304233312606...
func (m *ItemsMutator) MinLength(v int) *ItemsMutator { m.proxy.minLength = &v return m }
[ 0.3306911885738373, 0.3133639395236969, -0.09773854166269302, 0.23259003460407257, 0.3306705057621002, 0.4537123739719391, 0.3893841803073883, -0.03903014212846756, 1.052541971206665, -0.41065800189971924, -0.49728861451148987, 0.09007032215595245, -0.036151885986328125, -0.242041423916816...
func (m *ItemsMutator) Pattern(v string) *ItemsMutator { m.lock.Lock() defer m.lock.Unlock() m.proxy.pattern = v return m }
[ -1.2229220867156982, 0.6105082631111145, 0.04572005197405815, -0.15255655348300934, 0.6470409631729126, 0.6197872757911682, 0.6473886370658875, 0.48244771361351013, 0.6915135383605957, -0.5569742918014526, -0.9347477555274963, -0.0951203927397728, -0.3150654733181, -0.15259775519371033, ...
func (m *ItemsMutator) ClearMaxItems() *ItemsMutator { m.lock.Lock() defer m.lock.Unlock() m.proxy.maxItems = nil return m }
[ -1.0389221906661987, 0.642941415309906, 0.35868382453918457, 1.093544602394104, -0.808398962020874, 0.028829267248511314, -0.5697602033615112, 0.00039934259257279336, 0.372039794921875, 0.5387369394302368, -0.34222933650016785, 0.4591324031352997, -0.574573814868927, 0.08401946723461151, ...
func (m *ItemsMutator) MaxItems(v int) *ItemsMutator { m.proxy.maxItems = &v return m }
[ -0.13484467566013336, 1.056463360786438, 0.1859196573495865, 0.19837281107902527, -0.11639411747455597, -0.28559011220932007, -0.2408832162618637, -0.4010489583015442, 0.7085434198379517, -0.37964293360710144, -0.9746549129486084, -0.7508801817893982, -0.2555411159992218, 0.014114769175648...
func (m *ItemsMutator) ClearMinItems() *ItemsMutator { m.lock.Lock() defer m.lock.Unlock() m.proxy.minItems = nil return m }
[ -0.6288501620292664, 0.014201764948666096, 0.2136605679988861, 0.2768273949623108, -0.6339190602302551, 0.0904761403799057, -0.18994839489459991, -0.9999747276306152, 0.10815197229385376, 0.11626920849084854, -0.5818418860435486, 0.24354124069213867, -1.624552845954895, -0.2728022336959839...
func (m *ItemsMutator) MinItems(v int) *ItemsMutator { m.proxy.minItems = &v return m }
[ -0.0868629515171051, 0.16950394213199615, 0.1729465126991272, -0.34817978739738464, -0.16366355121135712, -0.3803492784500122, 0.2660450041294098, -0.6363163590431213, 0.5817244052886963, -0.6356968879699707, -1.1346261501312256, -0.641485333442688, -1.0225425958633423, -0.6125859618186951...
func (m *ItemsMutator) ClearUniqueItems() *ItemsMutator { m.lock.Lock() defer m.lock.Unlock() m.proxy.uniqueItems = nil return m }
[ -1.0117385387420654, 0.49951350688934326, 0.2815052270889282, 0.628223717212677, 0.28452232480049133, -0.026206552982330322, 0.1950336992740631, 0.6538183689117432, 0.22179235517978668, 0.2853670120239258, -1.0405710935592651, 0.5375301241874695, -0.8882449269294739, -0.3051097095012665, ...
func (m *ItemsMutator) UniqueItems(v bool) *ItemsMutator { m.proxy.uniqueItems = &v return m }
[ -0.32044312357902527, 0.9278159141540527, 0.123820960521698, 0.21070441603660583, 0.3738594651222229, 0.06651068478822708, 0.319785475730896, 0.9117160439491272, 0.6405678391456604, -0.40948304533958435, -1.3240835666656494, -0.08297581970691681, -0.6891002058982849, -0.7695287466049194, ...
func (m *ItemsMutator) ClearEnum() *ItemsMutator { m.lock.Lock() defer m.lock.Unlock() _ = m.proxy.enum.Clear() return m }
[ -1.4803680181503296, 0.13963158428668976, 0.3974642753601074, 0.14215779304504395, 0.552557647228241, -0.5796065926551819, 0.2524872124195099, -0.35574764013290405, 0.6623192429542542, -0.022237297147512436, 0.2791946828365326, -0.15596894919872284, -0.592354953289032, -0.29003915190696716...
func (m *ItemsMutator) Enum(value interface{}) *ItemsMutator { m.lock.Lock() defer m.lock.Unlock() m.proxy.enum = append(m.proxy.enum, value) return m }
[ -1.7050482034683228, 0.2797604203224182, 0.5106706619262695, 0.0493699312210083, 0.7409886717796326, -0.06010410189628601, 0.6783230900764465, -0.009081554599106312, 1.214881420135498, -0.2267276495695114, -0.3014671802520752, -0.3394277095794678, -0.34629499912261963, -0.09375128895044327...
func (m *ItemsMutator) ClearMultipleOf() *ItemsMutator { m.lock.Lock() defer m.lock.Unlock() m.proxy.multipleOf = nil return m }
[ -0.43965041637420654, 0.36434289813041687, 0.3766669034957886, 0.6025731563568115, -0.3848736584186554, -0.4997415840625763, -0.1980244368314743, -0.727703332901001, -0.028524912893772125, -0.14355185627937317, 0.08026161789894104, -0.027895651757717133, -0.1733972579240799, -0.08202420920...
func (m *ItemsMutator) MultipleOf(v float64) *ItemsMutator { m.proxy.multipleOf = &v return m }
[ -0.08693664520978928, 0.5465485453605652, 0.28225067257881165, 0.6810532212257385, 0.10531584918498993, -0.36068397760391235, -0.35661542415618896, -1.2029783725738525, 0.02673823945224285, -0.5236321091651917, -0.4503934681415558, -0.8642944097518921, 0.5239438414573669, 0.570900559425354...
func (m *ItemsMutator) Extension(name string, value interface{}) *ItemsMutator { if m.proxy.extensions == nil { m.proxy.extensions = Extensions{} } m.proxy.extensions[name] = value return m }
[ -0.4904094636440277, 0.4964006245136261, 0.4304502308368683, 0.16187256574630737, -0.7196065783500671, -0.5977043509483337, -0.46634194254875183, 0.46320658922195435, 1.4257856607437134, 0.503280758857727, -1.4007254838943481, 0.005377580411732197, 0.1119634211063385, -0.08434644341468811,...
func (r *Resolver) Query() _graphql.QueryResolver { return &queryResolver{r} }
[ 0.5441671013832092, -0.3104989230632782, 0.054243333637714386, 0.14421796798706055, -0.14212314784526825, -0.3901648223400116, -0.6101261973381042, -0.10492905974388123, 0.422745019197464, -1.6211581230163574, 0.31506815552711487, -0.4886800944805145, -0.2288789302110672, -0.61288571357727...
func Configure(c config.Config, path string) (Origin, error) { if strings.Contains(path, "propeller") { parts := strings.Split(path, "/") //["", "propeller", "orgID", "channelID.m3u8"] if len(parts) != 4 { return &Propeller{}, fmt.Errorf("url path does not follow `/propeller/orgID/channelID.m3u8`") } orgID...
[ -0.20783177018165588, -0.06502290815114975, 0.7081030011177063, 0.5498510599136353, -0.46756434440612793, 0.07207271456718445, -0.06196773052215576, 0.7181666493415833, 0.07130298763513565, 0.5125807523727417, 0.13070301711559296, 0.4665127098560333, -0.7193813323974609, -0.171181157231330...
func NewManifest(c config.Config, path string) *Manifest { return &Manifest{ Origin: c.OriginHost, Path: path, } }
[ 0.28483065962791443, -1.4050012826919556, 0.2631107270717621, 0.38921278715133667, -1.5453860759735107, -0.3208276927471161, -0.7810854315757751, 0.4565747082233429, 0.060934245586395264, -0.09214544296264648, -0.5343946814537048, 0.7758564352989197, 0.05275897681713104, -0.429759949445724...
func (m *Manifest) GetPlaybackURL() string { return m.Origin + "/" + m.Path }
[ 0.6520748138427734, -0.4260402321815491, 0.7008518576622009, 0.9065650105476379, 0.004771197680383921, 0.28163090348243713, 0.6299316883087158, 0.5926781892776489, 0.28824806213378906, 0.06615665555000305, 0.7848268151283264, 1.3852155208587646, -0.17163710296154022, -0.1900356560945511, ...
func (m *Manifest) FetchManifest(c config.Config) (string, error) { return fetch(c, m.GetPlaybackURL()) }
[ 0.49600258469581604, -0.6321350336074829, 0.30149075388908386, 0.43211475014686584, -0.7845394611358643, -0.07017997652292252, -0.486022412776947, -0.3270282447338104, 1.0892988443374634, 0.19453498721122742, -0.3733902871608734, 0.3145773708820343, -0.5642226934432983, 0.5642991662025452,...
func getSum(num1, num2 int) int { return num1 + num2 }
[ 0.1894950568675995, -0.04395609349012375, 0.5936081409454346, 0.8381304740905762, -0.0630483627319336, 0.1152276024222374, 0.06309925019741058, -1.0638450384140015, -0.6557279825210571, -0.5021370053291321, -0.7299966812133789, 1.574658989906311, -0.4611075222492218, -0.3684539794921875, ...
func KToP(k Kilogram) Pound { return Pound(k * 2.205) }
[ -0.15206196904182434, 0.2653999924659729, 0.3429177701473236, 0.1729823499917984, -0.7897744178771973, 0.08631618320941925, -0.6996778249740601, -0.12669523060321808, -0.23904646933078766, 1.3211790323257446, 0.1639053076505661, -0.8536539673805237, -0.13835790753364563, -0.313936442136764...
func PToK(p Pound) Kilogram { return Kilogram(p * 0.45359237) }
[ 0.7163915038108826, 1.2006767988204956, 0.12154708057641983, 0.4215114414691925, -0.4610273838043213, 1.1308132410049438, 0.33137401938438416, -0.1774892657995224, -0.09450676292181015, 0.976194441318512, -0.008696966804564, -0.8097204566001892, -0.43948808312416077, 0.08525755256414413, ...
func NewMonopAmpBridge(amp *monopamp.SerialAmplifier, persister building.BridgePersister) *MonopAmpBridge { return &MonopAmpBridge{ amp: amp, persister: persister, } }
[ -0.4011861979961395, -0.9442911148071289, 0.3417719900608063, 0.5920044183731079, -1.074398398399353, 0.5682329535484314, -0.5567721128463745, -0.028145860880613327, 1.8826481103897095, -0.6719813942909241, -0.8912463188171387, -0.2590692341327667, -1.7341668605804443, -0.0668499767780304,...
func (b *MonopAmpBridge) Setup(ctx context.Context) error { // Populate the devices for zoneID := 1; zoneID <= maxZoneID; zoneID++ { d := &pb.Device{ // Id is populated by CreateDevice IsActive: true, Address: zoneToAddr(zoneID), Config: &pb.DeviceConfig{ Name: fmt.Sprintf("Amp Zone %d", zon...
[ -0.3423120379447937, 0.10889162123203278, 0.5636105537414551, 0.046633508056402206, 1.19740629196167, 0.6069844961166382, 1.1435083150863647, -0.3686877489089966, 1.1681262254714966, 0.33183160424232483, -0.16534432768821716, -0.16775625944137573, -1.456285834312439, 0.6408198475837708, ...
func (b *MonopAmpBridge) Bridge(ctx context.Context) (*pb.Bridge, error) { bridge, err := b.persister.Bridge(ctx) if err != nil { return nil, err } ret := &pb.Bridge{ Config: &pb.BridgeConfig{ Address: &pb.Address{ Usb: &pb.Address_Usb{ Path: "", }, }, Timezone: "UTC", }, } proto.Merg...
[ -0.7396751046180725, 0.17084825038909912, 0.5357996821403503, 0.8409482836723328, 0.5957231521606445, 1.2321149110794067, -0.4279088079929352, 0.2154572457075119, 1.5582548379898071, -0.7881514430046082, -0.30282166600227356, -0.10969085246324539, -2.260903835296631, -0.01189977303147316, ...
func (b *MonopAmpBridge) SetBridgeConfig(ctx context.Context, config *pb.BridgeConfig) error { return b.persister.SetBridgeConfig(ctx, config) }
[ 0.049131132662296295, 0.19306358695030212, 0.43267983198165894, 0.20103077590465546, 0.7014017701148987, 1.0033149719238281, 0.3842315971851349, 0.8248699903488159, 1.1272505521774292, 0.052756261080503464, -1.8277027606964111, 0.2076265662908554, -1.257200002670288, 1.541144609451294, 0...
func (b *MonopAmpBridge) SetBridgeState(ctx context.Context, state *pb.BridgeState) error { return b.persister.SetBridgeState(ctx, state) }
[ 0.00385052221827209, 0.47436660528182983, 0.5029655694961548, 0.06504597514867783, 0.7696146965026855, 1.5330593585968018, 0.000055273376347031444, 0.1203479915857315, 1.215962529182434, -0.30709606409072876, -1.4206504821777344, -0.06991638243198395, -1.5275821685791016, 0.902741909027099...
func (b *MonopAmpBridge) SearchForAvailableDevices(context.Context) error { return nil }
[ -0.792894721031189, 0.36266961693763733, 0.11378959566354752, 0.27962133288383484, 0.7659236788749695, 0.4345623552799225, 0.4501374363899231, -0.48736250400543213, 0.9578535556793213, 0.008678602986037731, -0.05723309516906738, -0.4967729151248932, -1.0437421798706055, 1.117660403251648, ...
func (b *MonopAmpBridge) AvailableDevices(ctx context.Context) ([]*pb.Device, error) { return nil, nil }
[ -0.4541265070438385, -0.2560160756111145, 0.3602652847766876, 0.7447288632392883, 0.70172518491745, 1.4443504810333252, 0.6238343119621277, -0.3415559232234955, 1.6425659656524658, 0.0006798956892453134, 0.07551135122776031, 0.3131195604801178, -1.3986057043075562, 1.2187706232070923, 0....
func (b *MonopAmpBridge) Devices(ctx context.Context) ([]*pb.Device, error) { devices, err := b.persister.Devices(ctx) if err != nil { return nil, err } for _, device := range devices { zone := b.amp.Zone(addrToZone(device.Address)) if zone == nil { return nil, ErrZoneInvalid } if err := zone.Refresh(...
[ -0.5589557886123657, -0.2637351155281067, 0.5878880023956299, 0.22840680181980133, 0.6003512740135193, 0.774056077003479, 0.7450685501098633, -0.8324140906333923, 1.7893670797348022, -0.35953742265701294, -0.2924065887928009, -0.13666555285453796, -1.1732901334762573, 0.619804859161377, ...
func (b *MonopAmpBridge) Device(ctx context.Context, id string) (*pb.Device, error) { device, err := b.persister.Device(ctx, id) if err != nil { return nil, err } proto.Merge(device, baseMonopAmpDevice) return device, nil }
[ -0.3339713215827942, 0.5277475118637085, 0.3378283679485321, 0.7494727373123169, 0.6404615640640259, 1.383379578590393, 0.6457052230834961, -1.0993584394454956, 1.6354494094848633, -1.0631636381149292, -0.45697295665740967, 0.487625390291214, -1.5772241353988647, 0.3274276554584503, 0.59...
func (b *MonopAmpBridge) SetDeviceConfig(ctx context.Context, dev *pb.Device, config *pb.DeviceConfig) error { return b.persister.SetDeviceConfig(ctx, dev, config) }
[ -0.1779535710811615, 0.6384899616241455, 0.42272284626960754, 0.29729849100112915, -0.06939022243022919, 0.9957742094993591, 0.7170340418815613, -0.1214841976761818, 1.6338729858398438, -0.09601369500160217, -1.4900492429733276, 0.033137183636426926, -0.15574409067630768, 1.103778004646301...
func (b *MonopAmpBridge) SetDeviceState(ctx context.Context, dev *pb.Device, state *pb.DeviceState) error { zoneID := addrToZone(dev.Address) if zoneID < 1 || zoneID > maxZoneID { return ErrZoneInvalid } zone := b.amp.Zone(zoneID) if zone == nil { return ErrZoneInvalid } // Ensure we are operating on the l...
[ -0.11493940651416779, -0.447893887758255, 0.8583210110664368, 0.5763006210327148, -0.2890012562274933, 0.079398013651371, 1.0804475545883179, -0.9184486269950867, 1.3857126235961914, -0.012526927515864372, -0.4838053286075592, 0.26124271750450134, 0.1432042270898819, 0.4394104480743408, ...
func (b *MonopAmpBridge) AddDevice(ctx context.Context, id string) error { return building.ErrOperationNotSupported }
[ -1.2375684976577759, 0.7072256803512573, 0.5218051075935364, 1.1437206268310547, 0.4293572008609772, 1.5929956436157227, -0.04740612953901291, -0.08012083172798157, 1.3775206804275513, -1.0090633630752563, 0.42406973242759705, -0.3484385907649994, -1.5262306928634644, 1.154733657836914, ...
func (b *MonopAmpBridge) DeleteDevice(ctx context.Context, id string) error { return building.ErrOperationNotSupported }
[ -0.6616963148117065, 0.2279932051897049, 0.5062584280967712, 1.1161075830459595, 0.19445808231830597, 1.2621551752090454, 0.32564032077789307, -0.04063403606414795, 1.607416033744812, -0.9954730272293091, 0.1072419211268425, 0.16771578788757324, -1.2603508234024048, 1.0262947082519531, 0...
func CopyAndAppend(s [][]byte, e []byte) [][]byte { line := make([]byte, len(e)) copy(line, e) return append(s, line) }
[ 1.0895488262176514, -0.6571189761161804, 0.6604589819908142, 0.00544771458953619, -1.066357970237732, -0.31840747594833374, -0.7917165756225586, 0.6685337424278259, 1.187098503112793, 0.9971536993980408, -0.07049345225095749, 0.6423608064651489, 1.0376652479171753, 0.65119868516922, 0.60...
func (w *writer) flush() error { if len(w.lines) == 0 { // No message to send, just return return nil } if err := w.sender(w.lines); err != nil { return err } // Reset the message w.lines = nil return nil }
[ 0.5851790308952332, 0.5194002389907837, 0.45313653349876404, -0.7516494393348694, 0.6008309721946716, -0.6154161095619202, 0.6721742749214172, -0.2988184690475464, -0.5464649200439453, -0.24972385168075562, 0.7286528944969177, 0.8841328024864197, -0.6577601432800293, 1.131237506866455, -...
func (w *writer) addLine(p []byte) error { w.lines = CopyAndAppend(w.lines, p) if len(w.lines) >= ItemsPerMessage { return w.flush() } return nil }
[ 0.10202378779649734, 0.7138386964797974, 0.6699965596199036, 0.043697208166122437, 0.12359391897916794, 0.4073715806007385, -0.3261703550815582, -0.2000536024570465, 0.5750956535339355, -0.5733738541603088, 0.5227033495903015, -0.6268993020057678, -1.3435938358306885, 0.722123920917511, ...
func (w *writer) consume(r io.Reader) error { buf := bufio.NewReader(r) // As `IsPageToken` will instruct us to send the _next_ line only, we // need to call it before the first iteration to allow for the case // where we want to send right from the beginning. pastPageToken := w.options.IsPageToken([]byte{}) for...
[ 0.5146856307983398, 0.33547961711883545, 1.0667804479599, 0.054690342396497726, -0.3344593048095703, -1.0969915390014648, 0.3254745602607727, -0.3344385325908661, 0.003069654107093811, 0.38925158977508545, 0.746851921081543, 0.1513819545507431, 0.1698521077632904, 0.37581050395965576, -0...
func Send(r io.Reader, sender Sender, opts SenderOpts) error { if opts.IsPageToken == nil { opts.IsPageToken = func(_ []byte) bool { return true } } writer := &writer{sender: sender, options: opts} return writer.consume(r) }
[ -0.003412028308957815, 0.10497189313173294, 0.4961621165275574, 0.29073333740234375, -0.31791460514068604, -0.9354786276817322, -0.48580631613731384, -0.17178983986377716, 0.5654360055923462, 0.5310542583465576, 0.5503553152084351, 0.046673987060785294, -0.39215031266212463, -0.10386542230...
func typeOf(obj interface{}) string { return reflect.TypeOf(obj).Name() }
[ -0.3265860676765442, -0.022409234195947647, 0.6206287145614624, -0.7770655751228333, -0.7676184177398682, 0.3719113767147064, 0.6417637467384338, -1.7881591320037842, 1.0697157382965088, 0.5270850658416748, -0.5563834309577942, -0.2616780698299408, 0.39030906558036804, -0.1255718171596527,...
func (l *LegistarApi) GetUpcomingBills() ([]*models.Bill, error) { cli := &http.Client{} today := time.Now() req, err := http.NewRequest(http.MethodGet, l.formatUrl(matters), nil) if err != nil { return nil, fmt.Errorf("unable to create http request, err: %s", err.Error()) } req.Header.Set("Content-Type", "appl...
[ -0.5263136625289917, -0.48192277550697327, 0.6640480160713196, -0.053221192210912704, -0.09029792994260788, 0.8749596476554871, -1.0781118869781494, -0.6491177678108215, -0.5326926112174988, -0.3109300434589386, -0.08911950141191483, 0.48544374108314514, -0.19343221187591553, 1.43138742446...
func (l *LegistarApi) GetSingleBillDetail(matterId int) (*models.BillDetailed, error) { resp, err := l.doSimpleAPIGetRequest(l.formatUrl(matter, matterId)) if err != nil { return nil, err } // ensure that the body is closed. we close it after every successful marshaling of the response into a struct, // this is ...
[ 0.28365379571914673, -0.328087717294693, 0.8189745545387268, -0.04129274562001228, 0.18859004974365234, 1.118122935295105, -0.3284604251384735, 0.14777378737926483, 0.37176331877708435, -0.2520199716091156, -0.40942543745040894, 0.6251927614212036, -0.5318516492843628, 1.8823256492614746, ...
func (l *LegistarApi) GetPersonVotingRecord(personId int, months int) (votes []*Vote, err error) { cli := &http.Client{} sixMonthsAgo := time.Now().AddDate(0, -months, 0) req, err := http.NewRequest(http.MethodGet, l.formatUrl(personVote, personId), nil) if err != nil { return nil, fmt.Errorf("unable to create h...
[ -0.5934572219848633, -0.007041892036795616, 0.8371301889419556, 0.24229902029037476, -0.23945115506649017, 0.07078692317008972, -1.2710540294647217, 0.18636064231395721, -0.6204427480697632, 0.1436438113451004, 0.18910057842731476, 0.718375027179718, -0.4230407476425171, 0.6802335381507874...
func (l *LegistarApi) doSimpleAPIGetRequest(URL string) (*http.Response, error) { req, err := http.NewRequest(http.MethodGet, URL, nil) if err != nil { return nil, fmt.Errorf("unable to create http request: %w", err) } req.Header.Set("Content-Type", "application/json") resp, err := l.httpCli.Do(req) if err != n...
[ -1.4522250890731812, -0.6190528869628906, 1.2283498048782349, -0.7884001731872559, 0.2507111132144928, -0.19184188544750214, -0.9638578295707703, -0.13057072460651398, 0.41164156794548035, 0.10431058704853058, -0.937254011631012, 0.13846179842948914, -0.21843960881233215, -0.47088921070098...
func (obj *script) Name() string { return obj.name }
[ -0.8127121925354004, -1.238810658454895, 0.4932069182395935, 0.038764942437410355, -1.139171838760376, -0.2960529327392578, 0.34873777627944946, -1.4089386463165283, -0.10215862840414047, 1.3152281045913696, -0.7205758690834045, 0.770636796951294, 0.6205114722251892, 0.7627498507499695, ...
func (obj *script) Version() string { return obj.version }
[ -0.579786479473114, -1.5574384927749634, 0.08611700683832169, 0.3660883903503418, 0.096353679895401, 0.6239094734191895, 0.9262020587921143, -0.7320679426193237, -0.13449633121490479, 0.4531017243862152, -0.6738155484199524, 0.2540574073791504, 0.07584239542484283, 0.7058550715446472, 0....
func (obj *script) LanguagePath() string { return obj.lang }
[ 0.05353635177016258, -0.6710172891616821, 0.3302784860134125, 0.04794861003756523, -0.7715157866477966, 0.7350015640258789, 0.46881142258644104, -0.2777586579322815, 0.16055743396282196, 0.8889642953872681, -0.1402517855167389, 0.17084507644176483, -0.28074583411216736, 0.6326796412467957,...
func (obj *script) ScriptPath() string { return obj.script }
[ -0.5030726790428162, -0.9399024844169617, 0.16757434606552124, 0.187099426984787, -0.132619708776474, 0.2818535268306732, 0.7877072691917419, -1.5768377780914307, 0.5613365173339844, 1.1934568881988525, 0.09169986099004745, 0.9432535171508789, 0.04297170788049698, 0.2895932197570801, 0.1...
func (obj *script) Output() string { return obj.script }
[ -0.07793118804693222, -0.9427259564399719, 0.41690805554389954, 0.07504334300756454, -1.0407841205596924, -0.3252026438713074, 0.8176497220993042, -1.0571939945220947, 0.31643369793891907, 0.47310298681259155, -0.03219275921583176, 1.1230921745300293, -0.20898936688899994, 0.13484175503253...
func (obj *script) HasTests() bool { return obj.tests != nil }
[ 0.2743566930294037, 0.3374665677547455, 0.4008867144584656, -0.37804335355758667, 1.2036579847335815, -0.1900184154510498, -0.018631212413311005, -0.3515101671218872, 0.8873199820518494, -0.24232299625873566, -0.6582452058792114, 0.12727560102939606, -0.23809672892093658, 1.040467977523803...
func (obj *script) Tests() Tests { return obj.tests }
[ -0.2726859450340271, -0.8954997658729553, 0.17937856912612915, -0.37855470180511475, 0.49734312295913696, -0.2927817404270172, 0.5914815664291382, -1.0728695392608643, 1.1451935768127441, -0.780842125415802, -0.4663594961166382, 1.0477454662322998, -0.50022953748703, 0.04651051387190819, ...
func (_m *KindsSupervisors) Get(kind controller.Kind) (controller.KubernetesResourceSupervisor, error) { ret := _m.Called(kind) var r0 controller.KubernetesResourceSupervisor if rf, ok := ret.Get(0).(func(controller.Kind) controller.KubernetesResourceSupervisor); ok { r0 = rf(kind) } else { if ret.Get(0) != ni...
[ -0.6167815327644348, -0.20637734234333038, 0.5797343254089355, -0.2644366919994354, 0.46772870421409607, -0.5209587812423706, 0.32921138405799866, -0.011450648307800293, -0.4992179870605469, -0.2437884658575058, 0.1315397024154663, 0.8426980972290039, -0.08320286124944687, 0.75891524553298...
func Get() (userData.Config, error) { if err := lazyInit(); err != nil { return userData.Config{}, errors.Wrap(err, "failed to lazy init") } return cachedConfig, nil }
[ -0.6630967855453491, 0.11994845420122147, 0.38451018929481506, -0.39753490686416626, -0.19336478412151337, -0.0037579769268631935, -0.7364224791526794, 0.1416369080543518, -0.3194008767604828, -0.5086243152618408, -0.871021568775177, 1.2035833597183228, 0.24551820755004883, 0.1043307557702...
func readManifest(file string) (*sbox_proto.Manifest, error) { manifestData, err := ioutil.ReadFile(file) if err != nil { return nil, fmt.Errorf("error reading manifest %q: %w", file, err) } manifest := sbox_proto.Manifest{} err = proto.UnmarshalText(string(manifestData), &manifest) if err != nil { return n...
[ -0.1299540102481842, -0.8981130123138428, 0.5829359889030457, -0.23086009919643402, -1.1113629341125488, 0.6292259693145752, -0.718761682510376, 0.34484046697616577, -0.3192322850227356, -0.5814809799194336, 0.18961097300052643, 0.14715895056724548, -0.5510259866714478, -0.3122086226940155...
func runCommand(command *sbox_proto.Command, tempDir string) (depFile string, err error) { rawCommand := command.GetCommand() if rawCommand == "" { return "", fmt.Errorf("command is required") } pathToTempDirInSbox := tempDir if command.GetChdir() { pathToTempDirInSbox = "." } err = os.MkdirAll(tempDir, 07...
[ -0.2161775529384613, -0.020098496228456497, 0.9469443559646606, -0.015824569389224052, -0.4781990945339203, -0.11135026812553406, 0.419247031211853, -0.1096716821193695, 0.4182436764240265, -0.8681631684303284, 0.7883407473564148, 0.12633256614208221, 0.5651019215583801, 0.8282293081283569...
func makeOutputDirs(copies []*sbox_proto.Copy, sandboxDir string) error { for _, copyPair := range copies { dir := joinPath(sandboxDir, filepath.Dir(copyPair.GetFrom())) err := os.MkdirAll(dir, 0777) if err != nil { return err } } return nil }
[ -1.0368698835372925, 0.2491666078567505, 0.7888624668121338, 0.926353394985199, -0.6277647018432617, 0.5264129638671875, 1.1096582412719727, -0.14259889721870422, 0.20457088947296143, -0.06825068593025208, 0.839349091053009, -0.5926097631454468, 0.1871604174375534, -0.4710090458393097, 0...
func validateOutputFiles(copies []*sbox_proto.Copy, sandboxDir string) []error { var missingOutputErrors []error for _, copyPair := range copies { fromPath := joinPath(sandboxDir, copyPair.GetFrom()) fileInfo, err := os.Stat(fromPath) if err != nil { missingOutputErrors = append(missingOutputErrors, fmt.Erro...
[ -0.7035209536552429, -0.4498990476131439, 0.889607846736908, 0.8949871063232422, -0.49715515971183777, 0.4231857359409332, 1.388051986694336, -0.04918518289923668, -0.4271550178527832, 0.5383279323577881, 1.070091724395752, -1.2021108865737915, 0.058069560676813126, 0.2767256498336792, -...
func copyFiles(copies []*sbox_proto.Copy, fromDir, toDir string, allowFromNotExists bool) error { for _, copyPair := range copies { fromPath := joinPath(fromDir, copyPair.GetFrom()) toPath := joinPath(toDir, copyPair.GetTo()) err := copyOneFile(fromPath, toPath, copyPair.GetExecutable(), allowFromNotExists) if...
[ -0.5433058142662048, 0.39755159616470337, 0.6625519394874573, 0.6413465738296509, -0.63609778881073, 0.9044396281242371, 0.5241809487342834, 0.25775814056396484, -0.22193336486816406, 0.673425018787384, 1.4755690097808838, -0.33859673142433167, -0.20948070287704468, -0.1279701143503189, ...
func copyOneFile(from string, to string, forceExecutable, allowFromNotExists bool) error { err := os.MkdirAll(filepath.Dir(to), 0777) if err != nil { return err } stat, err := os.Stat(from) if err != nil { if os.IsNotExist(err) && allowFromNotExists { return nil } return err } perm := stat.Mode() i...
[ 0.020405318588018417, 0.290761262178421, 1.088152527809143, -0.18017578125, -0.0439881794154644, 0.26334527134895325, 0.5877090692520142, 0.33302706480026245, -0.30313241481781006, 0.938133716583252, 0.6307960152626038, 0.5013076663017273, 0.10735414922237396, -0.20887324213981628, 0.451...
func copyRspFiles(rspFiles []*sbox_proto.RspFile, toDir, toDirInSandbox string) error { for _, rspFile := range rspFiles { err := copyOneRspFile(rspFile, toDir, toDirInSandbox) if err != nil { return err } } return nil }
[ -1.0508266687393188, 0.11446832120418549, 0.33133190870285034, 0.4134633541107178, 0.5275749564170837, 0.4974968135356903, 0.37700581550598145, -0.5958176851272583, -0.018526270985603333, 0.3962470293045044, -0.08060089498758316, -0.03355427458882332, -0.8735104203224182, -0.15956369042396...
func copyOneRspFile(rspFile *sbox_proto.RspFile, toDir, toDirInSandbox string) error { in, err := os.Open(rspFile.GetFile()) if err != nil { return err } defer in.Close() files, err := response.ReadRspFile(in) if err != nil { return err } for i, from := range files { // Convert the real path of the inpu...
[ -0.18927308917045593, 0.1424415409564972, 0.861524760723114, -0.011168528348207474, 0.4965444505214691, 0.07789348810911179, 0.8891258239746094, -0.35920143127441406, 0.04733768105506897, 0.26900285482406616, 0.24500784277915955, -0.34337717294692993, -0.33309173583984375, -0.4600614011287...
func applyPathMappings(pathMappings []*sbox_proto.PathMapping, path string) string { for _, mapping := range pathMappings { if strings.HasPrefix(path, mapping.GetFrom()+"/") { return joinPath(mapping.GetTo()+"/", strings.TrimPrefix(path, mapping.GetFrom()+"/")) } } return path }
[ -0.5498602390289307, -0.4625694751739502, 0.6299372911453247, 0.668347179889679, -0.46368104219436646, 0.44635719060897827, 0.29273608326911926, 0.24724362790584564, 0.7438897490501404, -0.2214946448802948, 0.2914063036441803, -1.2822564840316772, -0.5198509097099304, -0.16365472972393036,...
func moveFiles(copies []*sbox_proto.Copy, fromDir, toDir string) error { for _, copyPair := range copies { fromPath := joinPath(fromDir, copyPair.GetFrom()) toPath := joinPath(toDir, copyPair.GetTo()) err := os.MkdirAll(filepath.Dir(toPath), 0777) if err != nil { return err } err = os.Rename(fromPath, ...
[ -0.6990967988967896, 0.1403055489063263, 0.7400264143943787, 0.2461155503988266, -0.5249244570732117, -0.08329964429140091, 1.00490403175354, 0.23186108469963074, -0.4313713014125824, 0.6486665606498718, 1.011276125907898, -0.568244218826294, 0.35488033294677734, -0.6745585799217224, -0....
func rewriteDepFiles(ins []string, out string) error { var mergedDeps []string for _, in := range ins { data, err := ioutil.ReadFile(in) if err != nil { return err } deps, err := makedeps.Parse(in, bytes.NewBuffer(data)) if err != nil { return err } mergedDeps = append(mergedDeps, deps.Inputs...)...
[ -0.4876098930835724, 0.05028028413653374, 0.754474937915802, 0.3684190511703491, 0.5016610622406006, 0.23347049951553345, 1.0754269361495972, -0.2587425708770752, -0.4213770627975464, -0.16601607203483582, 0.4436565637588501, -0.5183717608451843, 0.13988293707370758, -0.07878044992685318, ...
func joinPath(dir, file string) string { if filepath.IsAbs(file) { return file } return filepath.Join(dir, file) }
[ 0.8617216348648071, 0.04118136689066887, 0.4056777358055115, 0.8943909406661987, -0.5189921259880066, 1.3411346673965454, 0.07765785604715347, -0.6089915037155151, -0.5710312724113464, 0.925064742565155, 1.856824278831482, -0.44216060638427734, 0.16387160122394562, 0.30423593521118164, -...
func (r *Resolver) Action() generated.ActionResolver { return &actionResolver{r} }
[ -0.17137651145458221, -1.3590260744094849, 0.11766317486763, 0.1650659441947937, 0.5398787260055542, 0.0693877637386322, 0.37411627173423767, 0.7083948850631714, 0.6116573214530945, -0.8161882162094116, -0.7291076183319092, -0.4935969114303589, 0.12618516385555267, -0.12216693162918091, ...
func (r *Resolver) Activity() generated.ActivityResolver { return &activityResolver{r} }
[ -0.18383191525936127, -1.6260679960250854, 0.1999870091676712, 0.3119870722293854, 0.23136596381664276, -0.0053049433045089245, 0.9330654740333557, -0.22351033985614777, 0.7047852873802185, -1.609695553779602, -0.10550505667924881, -0.7487764954566956, -0.2101132571697235, -0.4314053058624...
func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResolver{r} }
[ -0.85917729139328, -0.8114736080169678, 0.21915511786937714, 0.6041824817657471, 0.3279842734336853, -0.12314578890800476, 0.07235062122344971, 0.2440601885318756, 1.0211246013641357, -1.228659987449646, -0.5522106885910034, -1.263425350189209, 0.1981908679008484, -0.07537302374839783, -...
func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} }
[ 0.0017501392867416143, -0.48795756697654724, 0.11716366559267044, 0.41594451665878296, -0.170012965798378, -0.03253801167011261, -0.6646475195884705, 0.6134193539619446, 0.6766958832740784, -1.769515037536621, -0.099466972053051, -0.8924757242202759, -0.0530250146985054, 0.1281633079051971...
func checkUserID(userID string) error { if userID == "" { fmt.Println("UserID not found") return fmt.Errorf("Something went wrong") } return nil }
[ 0.5899753570556641, -0.9074963927268982, 0.3500477075576782, 0.7730104923248291, 0.07133375108242035, 1.1036795377731323, 0.2693861424922943, 0.22164292633533478, 0.3014405071735382, 1.0736589431762695, 0.274218887090683, 1.528707504272461, -0.5191948413848877, 1.4275012016296387, -0.287...
func BenchmarkSort(b *testing.B) { b.StopTimer() item := algorithm.Generate(0, 10000000, 5000) b.StartTimer() for i:=0;i<b.N ;i++ { Sort(item, 0, len(item)-1) } }
[ 0.24688085913658142, 0.9486536383628845, 0.3922359347343445, 0.11102417856454849, 0.6408581137657166, -0.16039229929447174, 0.9866290092468262, -0.47642892599105835, -0.7183295488357544, 0.1801917999982834, -0.5676039457321167, 0.2869047522544861, -1.0528475046157837, 0.5508764386177063, ...
func ReadProbeReply(r *bufio.Reader) (*serverpb.ProbeReply, error) { buf, err := readPayload(r) if err != nil { return nil, err } rep := new(serverpb.ProbeReply) return rep, proto.Unmarshal(buf, rep) }
[ -0.7213547825813293, -0.5637661218643188, 0.6634470820426941, -0.8585191369056702, -0.7631711363792419, 0.3788259029388428, -0.263139933347702, -0.13933318853378296, 0.31734567880630493, 0.3500942289829254, -0.022260181605815887, 0.3534436821937561, -1.6403077840805054, -0.5597608089447021...
func ReadProbeRequest(r *bufio.Reader) (*serverpb.ProbeRequest, error) { buf, err := readPayload(r) if err != nil { return nil, err } req := new(serverpb.ProbeRequest) return req, proto.Unmarshal(buf, req) }
[ -1.0692968368530273, -0.6624481081962585, 0.93170565366745, -0.13878297805786133, -0.6636937260627747, 0.11766495555639267, -0.3519527316093445, -0.2865648567676544, 0.10671885311603546, 0.10728268325328827, 0.5042552947998047, 0.006956145167350769, -1.0307791233062744, 0.13611644506454468...
func WriteMessage(pb proto.Message, w io.Writer) error { buf, err := proto.Marshal(pb) if err != nil { return fmt.Errorf("Failed marshalling proto message: %v", err) } if _, err := fmt.Fprintf(w, "\nContent-Length: %d\n\n%s", len(buf), buf); err != nil { return fmt.Errorf("Failed writing response: %v", err) } ...
[ 0.11182897537946701, 0.057653337717056274, 0.7028304934501648, -0.38759976625442505, 0.9456297755241394, 0.10264137387275696, 0.48410481214523315, 0.13299652934074402, -0.10149773210287094, -0.40015867352485657, 0.389015793800354, -0.550615668296814, -0.5763341188430786, 0.4328670501708984...
func (m *defaultResourceManager) findMeshDependency(ctx context.Context, vr *appmesh.VirtualRouter) (*appmesh.Mesh, error) { if vr.Spec.MeshRef == nil { return nil, errors.Errorf("meshRef shouldn't be nil, please check webhook setup") } ms, err := m.referencesResolver.ResolveMeshReference(ctx, *vr.Spec.MeshRef) i...
[ 0.5981239676475525, -0.25357577204704285, 0.6927409172058105, -0.1767578423023224, 0.44924333691596985, 0.05046625807881355, 0.2572839558124542, -0.10444031655788422, 0.08040408045053482, -0.14820824563503265, 0.2279302477836609, 0.28201228380203247, -1.3358832597732544, 2.1446590423583984...
func (m *defaultResourceManager) validateMeshDependencies(ctx context.Context, ms *appmesh.Mesh) error { if !mesh.IsMeshActive(ms) { return runtime.NewRequeueError(errors.New("mesh is not active yet")) } return nil }
[ 0.47385868430137634, -0.5512428283691406, 0.37307456135749817, -0.2610633671283722, 0.00023111120390240103, 0.7111192941665649, 0.4041653275489807, -0.17829696834087372, -0.27820882201194763, -0.5044702291488647, -0.20315225422382355, 0.14425714313983917, -0.35181212425231934, 1.9998815059...
func (m *defaultResourceManager) isSDKVirtualRouterControlledByCRDVirtualRouter(ctx context.Context, sdkVR *appmeshsdk.VirtualRouterData, vr *appmesh.VirtualRouter) bool { return aws.StringValue(sdkVR.Metadata.ResourceOwner) == m.accountID }
[ 0.836018979549408, -0.020735938102006912, 0.30979129672050476, 0.7238718271255493, 0.2552729845046997, 0.128205344080925, 0.1787559688091278, -0.24604403972625732, 0.8006627559661865, 0.44115200638771057, 0.005028889514505863, 0.19751675426959991, -0.3478550910949707, 0.8182645440101624, ...
func (m *defaultResourceManager) isSDKVirtualRouterOwnedByCRDVirtualRouter(ctx context.Context, sdkVR *appmeshsdk.VirtualRouterData, vr *appmesh.VirtualRouter) bool { if !m.isSDKVirtualRouterControlledByCRDVirtualRouter(ctx, sdkVR, vr) { return false } // TODO: Adding tagging support, so a existing virtualRouter ...
[ 0.3640475571155548, 0.1987103670835495, 0.42864707112312317, 0.9589567184448242, -0.07029104977846146, -0.2598579525947571, -0.046622972935438156, -0.3560163676738739, 0.46271812915802, 0.5825209617614746, -0.24180196225643158, -0.30385735630989075, -0.5838437676429749, 0.9878119230270386,...
func NewSharedInformerFactory(client client.Interface, defaultResync time.Duration) SharedInformerFactory { return NewFilteredSharedInformerFactory(client, defaultResync) }
[ 0.16714932024478912, 0.19674250483512878, 0.21581518650054932, 0.696540892124176, -0.20328669250011444, -0.1329408586025238, 1.4045166969299316, 0.36109673976898193, -0.7021033763885498, -1.0243685245513916, -0.4962579011917114, -0.4617933928966522, -1.1132396459579468, 0.3785943388938904,...
func NewFilteredSharedInformerFactory(client client.Interface, defaultResync time.Duration) SharedInformerFactory { return &sharedInformerFactory{ client: client, defaultResync: defaultResync, informers: make(map[string]cache.SharedInformer), startedInformers: make(map[string]bool), } }
[ 0.21948111057281494, 0.006612009834498167, 0.3400897979736328, 0.25849205255508423, -0.3182342052459717, -0.2802220284938812, 1.0535377264022827, 0.27499866485595703, -0.42416560649871826, -0.5544400811195374, -0.4991898536682129, 0.18154151737689972, -0.9925530552864075, 0.077765062451362...
func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { f.lock.Lock() defer f.lock.Unlock() for informerType, informer := range f.informers { if !f.startedInformers[informerType] { go informer.Run(stopCh) f.startedInformers[informerType] = true } } }
[ -0.9316405057907104, -0.3502255976200104, 0.30678609013557434, -0.21289590001106262, 0.7973398566246033, 0.296186625957489, 0.8684054017066956, 0.4673042893409729, -1.4420796632766724, -0.5165631771087646, -0.60691237449646, 0.6310812830924988, -0.8551588654518127, 1.0838932991027832, 0....
func (f *sharedInformerFactory) SyncOnSiteChange() { f.lock.Lock() defer f.lock.Unlock() go func() { f.GetInformer(FLAVOR).SyncOnce() f.GetInformer(SITERESOURCES).SyncOnce() f.GetInformer(VOLUMEPOOLS).SyncOnce() f.GetInformer(VOLUMETYPE).SyncOnce() }() }
[ -0.09382358193397522, -0.4582982659339905, 0.2637467086315155, 0.6484408378601074, 0.2046658992767334, 0.27112671732902527, 1.1769394874572754, -0.6389721632003784, -0.7975337505340576, 0.3608388304710388, -0.7761715054512024, 0.4974469542503357, -0.5330114960670471, 1.495125412940979, 0...
func (f *sharedInformerFactory) GetInformer(name string) cache.SharedInformer { f.lock.Lock() defer f.lock.Unlock() informer, exists := f.informers[name] if !exists { return cache.NewEmptyInformer() } if !informer.HasSynced() { informer.SyncOnce() } return informer }
[ -0.25382670760154724, 0.2554641366004944, 0.6354262232780457, -0.2695365250110626, -0.32668694853782654, -0.2935258746147156, 0.1271369308233261, -0.29911869764328003, -0.3526071012020111, -0.4928306043148041, -0.1996009349822998, -0.10346142947673798, -1.0885241031646729, 0.82817858457565...
func (f *sharedInformerFactory) InformerFor(name string, key string, newFunc internalinterfaces.NewInformerFunc) cache.SharedInformer { f.lock.Lock() defer f.lock.Unlock() informer, exists := f.informers[name] if exists { return informer } informer = newFunc(f.client, f.defaultResync, name, key) f.informers[n...
[ -0.2574535012245178, -0.21958062052726746, 0.46041277050971985, -1.035395622253418, -0.33022767305374146, -0.5609537363052368, -0.11212554574012756, 0.14130587875843048, -1.0252659320831299, -0.519180417060852, -0.2100909948348999, -0.07916957139968872, -0.5384426116943359, 0.0589680746197...
func (f *sharedInformerFactory) Flavor(name, key string, period time.Duration, collector internalinterfaces.ResourceCollector) flavor.InformerFlavor { return flavor.New(f, name, key, period, collector) }
[ 0.73774653673172, -0.4036542475223541, 0.2735486328601837, 0.040500540286302567, -0.4973544776439667, -0.092169851064682, 0.3086327314376831, 0.5651572942733765, -0.1325494945049286, -0.9519436955451965, 0.6475417613983154, 0.7023844718933105, -0.007208783645182848, 0.4802390933036804, 0...
func (f *sharedInformerFactory) VolumeType(name, key string, period time.Duration, collector internalinterfaces.ResourceCollector) volumetype.InformerVolumeType { return volumetype.New(f, name, key, period, collector) }
[ 0.48841795325279236, -0.4806566834449768, 0.33849015831947327, 0.11416197568178177, 0.7148540616035461, -0.4048646092414856, -0.22725945711135864, 0.2264842838048935, -0.5950035452842712, 0.023284515365958214, 0.3157673180103302, 0.1603730022907257, -0.10602282732725143, 0.2418985962867736...
func (f *sharedInformerFactory) EipPools(name, key string, period time.Duration) eipavailability.InformerEipAvailability { return eipavailability.New(f, name, key, period) }
[ -0.9435628056526184, -0.005551917478442192, 0.5659099221229553, -0.36028021574020386, -0.5052703022956848, 0.9780134558677673, 0.5476476550102234, 0.3570370674133301, -0.2721594572067261, 0.8919390439987183, -0.6275619864463806, -0.6003815531730652, -0.04553505778312683, -0.614308118820190...
func (f *sharedInformerFactory) VolumePools(name, key string, period time.Duration, collector internalinterfaces.ResourceCollector) volumepool.InformerVolumePool { return volumepool.New(f, name, key, period, collector) }
[ 0.15978935360908508, -0.4643858075141907, 0.25426894426345825, 0.0201076902449131, -0.1402873992919922, 0.4750385880470276, 0.23408272862434387, -0.2798140048980713, -0.287477970123291, 0.3827139139175415, 0.059659942984580994, 0.3188324570655823, -0.1944553554058075, -0.5730742812156677, ...
func resolveSystemRegistry(content string) string { if settings.SystemDefaultRegistry.Get() == "" { return content } exp := `image:.*` return regexp.MustCompile(exp).ReplaceAllStringFunc(content, replaceImage) }
[ 0.3619428873062134, 0.738020122051239, 0.24527710676193237, 0.1622176170349121, 0.8152158856391907, -0.661641001701355, 0.20243670046329498, 0.919340193271637, 0.05929999798536301, 0.34456321597099304, -0.42191457748413086, -0.010645747184753418, -0.7309701442718506, 1.2442290782928467, ...
func resolveRKERegistry(content, registry string) string { exp := `image:.*` return regexp.MustCompile(exp).ReplaceAllStringFunc(content, func(origin string) string { s := strings.SplitN(origin, ":", 2) if len(s) != 2 { return origin } oldImg := strings.TrimLeft(s[1], " ") if !strings.HasPrefix(oldImg, r...
[ 0.1493665874004364, -0.4582013487815857, 0.5090643763542175, -0.25147393345832825, -0.33246996998786926, -0.45725709199905396, -0.27636006474494934, 1.28585684299469, -0.059448812156915665, 0.8268048167228699, 0.023702258244156837, 0.3250676989555359, -0.06677470356225967, 0.92081135511398...
func setCertsArgs(cfg *v3.RancherKubernetesEngineConfig) { setArg := func(m map[string]string, key string, value string) { if m[key] == "" { m[key] = value } } if cfg.Services.KubeController.ExtraArgs == nil { cfg.Services.KubeController.ExtraArgs = map[string]string{} } setArg(cfg.Services.KubeController...
[ -0.10548267513513565, -0.2512362599372864, 0.662868320941925, -0.019632121548056602, -0.0347176231443882, 0.3023405075073242, -0.6524801254272461, -0.5092753767967224, -0.8748242855072021, 0.8169561624526978, 0.007676396984606981, -0.2536010444164276, -0.45233336091041565, 1.05674695968627...
func listDifference(lines1, lines2 []string) []string { difference := []string{} for _, l1 := range lines1 { found := false for _, l2 := range lines2 { if strings.Contains(l2, l1) { found = true break } } if !found { difference = append(difference, l1) } } return difference }
[ -0.0342230498790741, -1.8057106733322144, 0.8668703436851501, -0.07612694054841995, 0.2014230191707611, 0.44405168294906616, -1.385621428489685, 0.037893012166023254, -0.18262629210948944, 0.5240888595581055, 0.31822487711906433, 0.5492674708366394, -0.3340187668800354, 0.8179247975349426,...
func listIntersection(lines1, lines2 []string) []string { intersection := []string{} for _, l1 := range lines1 { for _, l2 := range lines2 { if strings.Contains(l2, l1) { intersection = append(intersection, l1) break } } } return intersection }
[ 0.6246317028999329, -1.306761622428894, 0.9210822582244873, -0.5274568200111389, -0.17198771238327026, -0.16508206725120544, -1.5697027444839478, 0.7091299891471863, -0.623744010925293, 0.9230931997299194, 0.48721376061439514, 0.10950395464897156, 0.05348263680934906, 0.6901872754096985, ...
func NumIdenticalPairs(nums []int) int { var array [][]int = nil for key, value := range nums { for i := key + 1; i < len(nums); i++ { if value == nums[i] { var pair = []int{key, i} array = append(array, pair) } } } return len(array) }
[ -0.638611912727356, -0.18493151664733887, 0.8252760171890259, -0.4911404252052307, -0.12817758321762085, 0.019628705456852913, 0.7257717847824097, 0.9708890914916992, 0.6301943063735962, 1.1089609861373901, -0.6388808488845825, -0.8261449337005615, -0.8012179136276245, 0.2872825562953949, ...
func (r GopassRepo) getState() ([]byte, error) { if err := r.prepare(); err != nil { return []byte{}, err } cmd := exec.Command("gopass", "show", "-f", r.config.Repo.State) secret, err := cmd.Output() if err != nil { // state not clearly found -> new state return []byte{}, &GetStateError{ message: err.Err...
[ -0.6403365731239319, 0.49612295627593994, 0.7200766205787659, 0.5140734910964966, 0.22734335064888, -0.35988906025886536, -0.6957502961158752, 0.1469155251979828, -0.010175429284572601, 0.4144417941570282, -0.016236618161201477, 0.6818516254425049, -1.2010914087295532, 0.05074698477983475,...
func (r GopassRepo) saveState(payload []byte) error { if err := r.prepare(); err != nil { return err } cmd := exec.Command("gopass", "insert", "-f", r.config.Repo.State) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr stdin, err := cmd.StdinPipe() if nil != err { return fmt.Errorf("obtaining stdin: %s", err.Er...
[ -0.45197737216949463, 0.465897798538208, 1.0337830781936646, -0.3740993142127991, 0.41599127650260925, 0.6417714953422546, -0.2162935584783554, -0.1194629967212677, -0.25841259956359863, 0.5044469833374023, -0.5552438497543335, -0.18715257942676544, -0.871650755405426, 0.575776219367981, ...