text
stringlengths
11
6.3k
embedding
listlengths
768
768
func calculateRatePerSec(dataP *monitoringData, prevNumOfReq, prevNumOfErr, prevNumOfErrResp, prevSuccR *int64) { data := *dataP if globalOpt.DiagnConf.TimeOut == 0 { log.Warn("globalOpt.DiagnConf.TimeOut = 0; could not calculate requests/per second") return } //log.Warnf(" BEFORE: prevNumOfReq=%d, prevNumOf...
[ 0.24959120154380798, 0.3956412672996521, 0.9763796925544739, -0.219956174492836, -0.22068524360656738, 0.03583165630698204, -0.03293244540691376, -0.06374060362577438, -0.3127344250679016, -0.25958892703056335, -0.029956955462694168, -0.3694460988044739, -0.8957206606864929, 0.041477609425...
func NewEdge() api.IEdge { o := new(Edge) return o }
[ -0.5806927680969238, 0.04849300533533096, 0.1972045749425888, 0.8805051445960999, 0.478867769241333, -0.7572824358940125, -0.26479268074035645, 0.14638158679008484, 0.14402931928634644, 0.21676096320152283, 0.1319572627544403, 0.5120782256126404, -1.1597737073898315, -0.2682381868362427, ...
func (t *Edge) XY() (x, y int) { return t.x, t.y }
[ -1.0830140113830566, -0.6374779939651489, 0.7717707753181458, -1.256055235862732, 0.12713710963726044, -0.47208499908447266, 0.028075965121388435, -0.3501218259334564, -0.7928310036659241, 0.6679627299308777, -0.19939954578876495, 0.20074841380119324, -0.009532458148896694, -0.499926954507...
func (t *Edge) YBot() int { return t.yBot }
[ 0.13550300896167755, -0.7605815529823303, 0.4161338806152344, -0.43598562479019165, 0.006135269068181515, 1.0357110500335693, 0.5038273334503174, 0.1627199351787567, -0.5688757300376892, -0.749195396900177, -1.25336754322052, 0.21817433834075928, 0.4281657338142395, -0.051216255873441696, ...
func (t *Edge) Set(xP, yP, xQ, yQ int, zP, zQ float32) { // Note: the larger Y value is at the "bottom" or lower on the display // if +Y axis is downward. if yP > yQ { t.yBot = yP } else { t.yBot = yQ } t.xP = xP t.yP = yP t.xQ = xQ t.yQ = yQ t.zP = zP t.zQ = zQ t.x = xP t.y = yP t.d = 0 t.yInc = ...
[ -0.5212538242340088, -0.2038429081439972, 0.54756760597229, -1.176413893699646, 0.04305155947804451, 0.41978442668914795, 0.6567835807800293, -0.5329570174217224, -0.5404245853424072, 0.28833091259002686, -0.3410671055316925, 0.047951433807611465, 0.39902740716934204, -0.4143028259277344, ...
func (t *Edge) Step() bool { if t.dy <= t.dx { // Each step X changes if t.x == t.xQ { return false } t.x += t.xInc t.d += t.m if t.d >= t.dx { t.y += t.yInc t.d -= t.c } } else { // Each step Y changes if t.y == t.yQ { return false } t.y += t.yInc t.d += t.m if t.d >= t.dy { ...
[ -0.908070981502533, 0.7965085506439209, 0.6729791164398193, -1.1402581930160522, -0.21355876326560974, 0.6281101703643799, 0.10652542859315872, -0.6758115291595459, -0.4647190570831299, -0.2428179830312729, -0.7004947066307068, -0.805280327796936, 0.46596771478652954, -0.2979423403739929, ...
func New(dir string, leakToSubProc bool) (f *os.File, err error) { if dir == "" { dir = os.TempDir() } flags := unix.O_RDWR | unix.O_TMPFILE | unix.O_EXCL if !leakToSubProc { flags |= unix.O_CLOEXEC } fd, err := unix.Open(dir, flags, 0600) if err != nil { err = errors.Wrapf(err, "Could not create temp fi...
[ 0.16587333381175995, 0.06956534832715988, 0.646282970905304, -0.061121318489313126, -0.7395020723342896, -0.0535777248442173, 0.3342914879322052, 0.039572350680828094, -0.6552450656890869, -0.9680333733558655, 0.5227760672569275, 0.4219437837600708, 1.076743721961975, 0.47470352053642273, ...
func world() { // print "world" 5 times for i := 0; i < 5; i++ { fmt.Println("world") } }
[ 0.1046391949057579, 0.16777236759662628, 0.5871656537055969, 0.35481539368629456, -0.1789667308330536, 0.6994131207466125, 1.0780342817306519, -1.4060314893722534, -0.7828513979911804, 0.3297579884529114, -0.44870659708976746, 0.5311346650123596, -0.5629780292510986, 1.2975376844406128, ...
func NewStudio(ctx *pulumi.Context, name string, args *StudioArgs, opts ...pulumi.ResourceOption) (*Studio, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.AuthMode == nil { return nil, errors.New("invalid value for required argument 'AuthMode'") } if args...
[ -0.5248246788978577, 0.6943899989128113, 0.6601572632789612, 0.5206462740898132, -0.44272202253341675, -0.2015155553817749, -0.4360032379627228, -0.35247910022735596, 0.073329396545887, 0.5327544212341309, -0.5812050104141235, 0.32295477390289307, -0.22488534450531006, 0.41072916984558105,...
func GetStudio(ctx *pulumi.Context, name string, id pulumi.IDInput, state *StudioState, opts ...pulumi.ResourceOption) (*Studio, error) { var resource Studio err := ctx.ReadResource("aws-native:emr:Studio", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil }
[ -0.05994199588894844, 0.43734169006347656, 0.24229085445404053, 0.7491238117218018, -0.3921873867511749, -0.6373369693756104, -0.5273677110671997, -0.43790528178215027, 1.4619709253311157, -0.5896307229995728, -0.32805296778678894, 1.0336315631866455, 0.20739983022212982, -1.49481415748596...
func (o StudioOutput) Arn() pulumi.StringOutput { return o.ApplyT(func(v *Studio) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) }
[ -0.34009355306625366, -0.9372936487197876, 0.3475513756275177, 0.8314239382743835, -0.3481667637825012, 0.10316934436559677, 0.570066511631012, 0.8473061919212341, 0.503566563129425, -0.8058740496635437, -0.23564967513084412, 1.229859709739685, 1.0834732055664062, -1.1939806938171387, 0....
func (o StudioOutput) AuthMode() StudioAuthModeOutput { return o.ApplyT(func(v *Studio) StudioAuthModeOutput { return v.AuthMode }).(StudioAuthModeOutput) }
[ -0.15755201876163483, -0.1463387906551361, 0.4452182650566101, 0.8515067100524902, -0.38931483030319214, 0.5095674991607666, 0.8778426647186279, -0.22329945862293243, 1.074973464012146, -0.8061753511428833, -0.36674392223358154, 0.6213911175727844, 1.0654479265213013, -0.9868035912513733, ...
func (o StudioOutput) DefaultS3Location() pulumi.StringOutput { return o.ApplyT(func(v *Studio) pulumi.StringOutput { return v.DefaultS3Location }).(pulumi.StringOutput) }
[ 0.23123951256275177, -0.09642276912927628, 0.30664554238319397, 0.35443177819252014, -0.09544562548398972, 0.9903179407119751, 0.3877719044685364, 0.350180059671402, 1.2322032451629639, -0.7334311008453369, -0.6877198815345764, 0.25014999508857727, 0.43641045689582825, -1.6343375444412231,...
func (o StudioOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *Studio) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) }
[ 0.08508601039648056, 0.13396315276622772, 0.14562958478927612, 0.4825490713119507, -0.27987775206565857, 0.4232378304004669, 0.09993121027946472, 0.10984509438276291, 0.7762185335159302, -0.20517723262310028, 0.1250590682029724, 1.0016355514526367, 0.2717341482639313, -1.319911003112793, ...
func (o StudioOutput) EngineSecurityGroupId() pulumi.StringOutput { return o.ApplyT(func(v *Studio) pulumi.StringOutput { return v.EngineSecurityGroupId }).(pulumi.StringOutput) }
[ 0.3029080331325531, 0.06266825646162033, 0.275349497795105, -0.04524702578783035, -0.03684159740805626, 0.8800294995307922, -0.20677760243415833, 0.3091769218444824, 0.46209436655044556, -0.17900818586349487, -0.3047260344028473, 0.4462208151817322, -0.32895174622535706, -1.018060088157653...
func (o StudioOutput) IdpAuthUrl() pulumi.StringPtrOutput { return o.ApplyT(func(v *Studio) pulumi.StringPtrOutput { return v.IdpAuthUrl }).(pulumi.StringPtrOutput) }
[ -0.748354434967041, 0.5111469626426697, 0.5352392792701721, 0.34879636764526367, -0.04189549759030342, 1.2710180282592773, 0.13549049198627472, 0.48669442534446716, 1.4209953546524048, -0.46947360038757324, -0.30648812651634216, 0.5903667211532593, 0.11625601351261139, -1.908382773399353, ...
func (o StudioOutput) IdpRelayStateParameterName() pulumi.StringPtrOutput { return o.ApplyT(func(v *Studio) pulumi.StringPtrOutput { return v.IdpRelayStateParameterName }).(pulumi.StringPtrOutput) }
[ -0.7185459136962891, 0.6821490526199341, 0.7686060070991516, -0.5767788887023926, -0.8057804107666016, 1.1861040592193604, 0.9357722997665405, -0.3996445834636688, 1.1077266931533813, 0.6511337161064148, -0.3696975111961365, 0.8340592980384827, 0.29832085967063904, -1.4270445108413696, -...
func (o StudioOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Studio) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) }
[ -0.2614682614803314, -0.39107513427734375, 0.32090818881988525, 0.3362078070640564, -1.1671850681304932, 0.20240315794944763, 0.5154268741607666, -0.4655270576477051, 0.3166620135307312, 0.26394790410995483, -0.5437019467353821, 0.47862139344215393, 1.0795706510543823, -1.0920789241790771,...
func (o StudioOutput) ServiceRole() pulumi.StringOutput { return o.ApplyT(func(v *Studio) pulumi.StringOutput { return v.ServiceRole }).(pulumi.StringOutput) }
[ 0.15935659408569336, 0.07350356876850128, 0.2575189471244812, -0.098921038210392, -0.042238738387823105, 1.0422642230987549, 0.38457435369491577, -0.308810830116272, 0.25664234161376953, -0.7080289125442505, 0.13338300585746765, 0.676033616065979, 0.06934304535388947, -0.6852559447288513, ...
func (o StudioOutput) StudioId() pulumi.StringOutput { return o.ApplyT(func(v *Studio) pulumi.StringOutput { return v.StudioId }).(pulumi.StringOutput) }
[ 0.4341098964214325, -0.11919227987527847, 0.18883346021175385, 0.5658894181251526, -0.5430752038955688, 0.4422356188297272, 0.24824483692646027, 0.3311834931373596, 1.2734788656234741, -0.21576254069805145, -0.14791618287563324, 1.010538935661316, 0.42164483666419983, -1.002943992614746, ...
func (o StudioOutput) SubnetIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *Studio) pulumi.StringArrayOutput { return v.SubnetIds }).(pulumi.StringArrayOutput) }
[ -0.012547309510409832, 0.5240146517753601, 0.44588279724121094, 1.010424256324768, -0.0065048253163695335, 1.0800353288650513, -0.365121454000473, -0.4598637819290161, 1.2069759368896484, -0.5701221823692322, -1.4569014310836792, 1.031367301940918, 0.7598218321800232, -0.700337290763855, ...
func (o StudioOutput) Tags() StudioTagArrayOutput { return o.ApplyT(func(v *Studio) StudioTagArrayOutput { return v.Tags }).(StudioTagArrayOutput) }
[ -0.04564439132809639, 0.04769492894411087, 0.5010607242584229, 0.670558750629425, 0.05964895710349083, -0.1937936544418335, 0.06891117990016937, -0.753564178943634, 0.5182477831840515, -0.8079589605331421, -0.7323563694953918, 0.35133397579193115, 1.0689796209335327, 0.36827659606933594, ...
func (o StudioOutput) Url() pulumi.StringOutput { return o.ApplyT(func(v *Studio) pulumi.StringOutput { return v.Url }).(pulumi.StringOutput) }
[ -0.1401459276676178, 0.06137705221772194, 0.23242731392383575, 0.49132323265075684, -0.0056511517614126205, 0.6595175862312317, 0.44959503412246704, 0.4831395447254181, 0.4522190988063812, -0.5234537124633789, -0.45446860790252686, 0.7949445843696594, 0.5318390727043152, -1.256050705909729...
func (o StudioOutput) UserRole() pulumi.StringPtrOutput { return o.ApplyT(func(v *Studio) pulumi.StringPtrOutput { return v.UserRole }).(pulumi.StringPtrOutput) }
[ 0.6169414520263672, 0.2256501466035843, 0.27267324924468994, 0.19227075576782227, 0.2421349138021469, 0.8883348107337952, 0.6894755959510803, 0.1369781345129013, 0.8167411088943481, -0.6006478667259216, 0.09429994970560074, 0.3397626578807831, 0.2964780032634735, -1.3096110820770264, 0.3...
func (o StudioOutput) VpcId() pulumi.StringOutput { return o.ApplyT(func(v *Studio) pulumi.StringOutput { return v.VpcId }).(pulumi.StringOutput) }
[ 0.8260279893875122, -0.5528679490089417, 0.4179704785346985, 0.0394701324403286, -0.013887823559343815, 1.2114670276641846, 0.28552475571632385, 0.31749388575553894, 0.8555670380592346, -0.49961161613464355, 0.23792800307273865, 0.9367042183876038, -0.06268928945064545, -1.6937800645828247...
func (o StudioOutput) WorkspaceSecurityGroupId() pulumi.StringOutput { return o.ApplyT(func(v *Studio) pulumi.StringOutput { return v.WorkspaceSecurityGroupId }).(pulumi.StringOutput) }
[ 0.8445760011672974, 0.25242018699645996, 0.09920278191566467, 0.2720170021057129, -0.7237516641616821, 0.8699026107788086, 0.12430228292942047, -0.05061234533786774, 1.2139700651168823, -0.13393521308898926, -0.6756933927536011, 1.0437668561935425, -0.32379817962646484, -0.3175787925720215...
func UpdateAll(config *latest.Config, cache *generated.Config, allowCyclic bool, log log.Logger) error { if config == nil || config.Dependencies == nil || len(*config.Dependencies) == 0 { return nil } log.StartWait("Update dependencies") defer log.StopWait() // Create a new dependency resolver resolver, err :...
[ -0.3293471336364746, -0.36123886704444885, 0.8373141884803772, 0.29190462827682495, -0.4061763286590576, 0.4065903127193451, -0.08473528176546097, 0.5034031271934509, -0.3480833172798157, 0.17595067620277405, -0.09621031582355499, 0.38915354013442993, -0.31792151927948, 0.7519054412841797,...
func BuildAll(config *latest.Config, cache *generated.Config, allowCyclic, updateDependencies, skipPush, forceDeployDependencies, forceBuild bool, logger log.Logger) error { if config == nil || config.Dependencies == nil || len(*config.Dependencies) == 0 { return nil } // Create a new dependency resolver resolve...
[ -0.49247246980667114, -0.26766592264175415, 0.955123782157898, 0.5891945362091064, -0.021255595609545708, 0.6200281381607056, 0.49700936675071716, 0.24947668612003326, 0.1677427738904953, 0.571770191192627, 0.08844869583845139, 0.5466248989105225, -0.03836440667510033, 1.1528562307357788, ...
func DeployAll(config *latest.Config, cache *generated.Config, allowCyclic, updateDependencies, skipPush, forceDeployDependencies, forceBuild, forceDeploy bool, logger log.Logger) error { if config == nil || config.Dependencies == nil || len(*config.Dependencies) == 0 { return nil } // Create a new dependency res...
[ -0.6214768290519714, 0.15778452157974243, 0.9123539924621582, 0.49883899092674255, 0.05689070373773575, 0.39901304244995117, 0.6162528395652771, 0.10397336632013321, 0.0647839680314064, 0.5992788672447205, -0.12406408786773682, 0.4608142673969269, -0.253830224275589, 1.6815615892410278, ...
func PurgeAll(config *latest.Config, cache *generated.Config, allowCyclic bool, logger log.Logger) error { if config == nil || config.Dependencies == nil || len(*config.Dependencies) == 0 { return nil } // Create a new dependency resolver resolver, err := NewResolver(config, cache, allowCyclic, logger) if err !...
[ -0.11654338240623474, 0.11330787092447281, 0.9259669780731201, 0.3149288594722748, -0.052850037813186646, 0.23853379487991333, 0.09759004414081573, -0.08646240830421448, 0.23932678997516632, 0.9199441075325012, 0.06122119724750519, 0.6881431937217712, 0.12278846651315689, 1.493772149085998...
func (d *Dependency) Build(skipPush, forceDependencies, forceBuild bool, log log.Logger) error { // Check if we should redeploy directoryHash, err := hash.DirectoryExcludes(d.LocalPath, []string{".git", ".devspace"}, true) if err != nil { return errors.Wrap(err, "hash directory") } // Check if we skip the depen...
[ -1.1631217002868652, -0.0777997374534607, 0.7812649607658386, -0.03854680061340332, -0.0097054960206151, 0.32273030281066895, 0.5210351347923279, 0.4675790071487427, 0.16350601613521576, 0.5617817044258118, -0.10048622637987137, -0.02847125381231308, 0.3379566967487335, 1.0784603357315063,...
func (d *Dependency) Deploy(skipPush bool, forceDependencies, forceBuild, forceDeploy bool, log log.Logger) error { // Check if we should redeploy directoryHash, err := hash.DirectoryExcludes(d.LocalPath, []string{".git", ".devspace"}, true) if err != nil { return errors.Wrap(err, "hash directory") } // Check i...
[ -0.889236569404602, 0.38711586594581604, 0.7359520792961121, 0.053755760192871094, 0.489145427942276, 0.3953396677970886, 0.120402492582798, -0.11833811551332474, 0.1857045292854309, 0.3352327346801758, 0.16875506937503815, 0.4676975905895233, 0.011533969081938267, 0.6488456130027771, 1....
func (d *Dependency) Purge(log log.Logger) error { // Switch current working directory currentWorkingDirectory, err := os.Getwd() if err != nil { return errors.Wrap(err, "getwd") } err = os.Chdir(d.LocalPath) if err != nil { return errors.Wrap(err, "change working directory") } defer func() { // Change ...
[ -0.2645677626132965, 0.039230044931173325, 0.39572253823280334, -0.2788047790527344, 0.3417855501174927, -0.15919458866119385, 0.10132363438606262, -0.1067676767706871, 0.3132500648498535, 0.42631909251213074, -0.18389898538589478, 0.7383120059967041, 0.07656380534172058, 0.367805361747741...
func NewHidePayload() Payload { return Payload { Type: "hide", } }
[ -0.1287858933210373, -0.09615720063447952, 0.2778756618499756, 0.2977522611618042, -1.0019633769989014, -0.12052378803491592, -0.4015800654888153, -0.794973611831665, 0.3678407371044159, 0.23712648451328278, -0.6730936169624329, 0.01428487803786993, -0.7053717970848083, -0.5679625868797302...
func Add(mgr manager.Manager) error { return add(mgr, newReconciler(mgr)) }
[ -0.24057555198669434, 0.12229465693235397, 0.46777674555778503, -0.6655282378196716, 0.4479011595249176, -0.17455056309700012, -0.48020607233047485, 0.6828829646110535, 0.19666412472724915, -0.7739230394363403, 0.224630668759346, 0.617239773273468, -1.010264277458191, 1.3228338956832886, ...
func newReconciler(mgr manager.Manager) reconcile.Reconciler { return &ReconcileAPIScheme{client: mgr.GetClient(), scheme: mgr.GetScheme()} }
[ 0.22576220333576202, -0.9538419842720032, 0.35802146792411804, -0.9892199635505676, -0.737001895904541, -0.04891127720475197, -0.313240647315979, 0.6397718787193298, 0.12818841636180878, 0.2160685509443283, 0.36990752816200256, -0.42837998270988464, -0.6925860047340393, 0.5782452821731567,...
func add(mgr manager.Manager, r reconcile.Reconciler) error { // Create a new controller c, err := controller.New("apischeme-controller", mgr, controller.Options{Reconciler: r}) if err != nil { return err } // Watch for changes to primary resource APIScheme err = c.Watch(&source.Kind{Type: &cloudingressv1alpha...
[ -0.06382478773593903, -0.12431014329195023, 0.6205732226371765, -1.0926637649536133, 0.9500601887702942, 0.33791428804397583, -0.5048903822898865, 0.8391708731651306, -0.1122872531414032, -0.36514991521835327, 0.2003917396068573, -0.34925344586372375, -0.22766970098018646, 0.52591723203659...
func (r *ReconcileAPIScheme) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error) { reqLogger := log.WithValues("Request.Namespace", request.Namespace, "Request.Name", request.Name) reqLogger.Info("Reconciling APIScheme") // Fetch the APIScheme instance instance := &cloudingressv1alp...
[ -0.42159605026245117, -0.3112393319606781, 0.8721134662628174, -0.33163532614707947, 0.2646564543247223, -0.014044848270714283, -0.7400023937225342, -0.26287126541137695, -0.12689857184886932, 0.47169065475463867, 0.5093084573745728, 0.17764364182949066, -0.7854788899421692, 0.499885797500...
func (r *ReconcileAPIScheme) SetAPISchemeStatus(crObject *cloudingressv1alpha1.APIScheme, reason, message string, ctype cloudingressv1alpha1.APISchemeConditionType) { crObject.Status.Conditions = utils.SetAPISchemeCondition( crObject.Status.Conditions, ctype, corev1.ConditionTrue, reason, message, utils.Up...
[ -0.5654271245002747, -0.19261787831783295, 0.5105615258216858, -0.6380267143249512, 0.2965661883354187, 0.2846277058124542, -0.21216371655464172, 0.5879994034767151, 0.24598421156406403, 1.309239149093628, -1.2115015983581543, 0.09762361645698547, -0.592114269733429, -0.18151283264160156, ...
func (r *ReconcileAPIScheme) SetAPISchemeStatusMetric(crObject *cloudingressv1alpha1.APIScheme) { if crObject.Status.State == "Ready" { localmetrics.MetricAPISchemeConditionStatus.Set(float64(1)) return } localmetrics.MetricAPISchemeConditionStatus.Set(float64(0)) }
[ -0.2661105990409851, -0.2177588939666748, 0.33507901430130005, -0.38177603483200073, -0.1047750934958458, 0.7385000586509705, 0.3161287009716034, 0.5715723633766174, -0.49338316917419434, 1.1615978479385376, -0.7152642607688904, -0.8615883588790894, 0.22092470526695251, 0.3616068661212921,...
func (a *DefaultApiService) AdvancedListStories(ctx _context.Context, body map[string]interface{}, localVarOptionals *AdvancedListStoriesOpts) (Stories, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName ...
[ -0.7094709277153015, -0.5649240612983704, 0.6587077975273132, -0.3144855201244354, -0.08793491125106812, 0.09218170493841171, -0.27704915404319763, -0.2015284299850464, -0.6293731927871704, -0.18593260645866394, 0.15388654172420502, 0.29960063099861145, -0.21691636741161346, 1.346541285514...
func (a *DefaultApiService) ListAutocompletes(ctx _context.Context, type_ string, term string, localVarOptionals *ListAutocompletesOpts) (Autocompletes, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName ...
[ -0.6417126655578613, -1.0562825202941895, 0.9207918047904968, -0.6096473932266235, 0.17682980000972748, -0.5748905539512634, -0.47019723057746887, -0.637160062789917, -0.09313701838254929, 0.18921224772930145, -0.31612688302993774, 0.631676435470581, -0.9542195796966553, 0.5864984393119812...
func (a *DefaultApiService) ListClusters(ctx _context.Context, localVarOptionals *ListClustersOpts) (Clusters, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte lo...
[ -0.7696404457092285, -0.3953639268875122, 0.6942492723464966, -0.1530861109495163, 0.3557678461074829, -0.09416450560092926, 0.12926392257213593, -0.5059438347816467, 0.10038338601589203, -0.03494279086589813, 0.31041982769966125, 0.5102606415748596, -0.8974121809005737, 0.8026540279388428...
func (a *DefaultApiService) ListHistograms(ctx _context.Context, localVarOptionals *ListHistogramsOpts) (Histograms, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byt...
[ -0.7793651223182678, -0.0940638855099678, 0.7395191192626953, -0.29934176802635193, 0.3773159086704254, 0.12962840497493744, -0.02429032512009144, -0.2426280379295349, 0.06441449373960495, 0.43576568365097046, -0.5522952079772949, 0.5346646308898926, -0.89981609582901, 1.0648497343063354, ...
func (a *DefaultApiService) ListRelatedStoriesGet(ctx _context.Context, localVarOptionals *ListRelatedStoriesGetOpts) (RelatedStories, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVar...
[ -0.26528045535087585, -0.2881891429424286, 0.5497819781303406, -0.28011494874954224, 0.31367477774620056, 0.31164002418518066, -0.08046319335699081, -0.41035404801368713, -0.11782898753881454, -0.26710009574890137, -0.13326291739940643, 0.11829299479722977, -1.0821412801742554, 0.670104563...
func (a *DefaultApiService) ListRelatedStoriesPost(ctx _context.Context, localVarOptionals *ListRelatedStoriesPostOpts) (RelatedStories, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string local...
[ -0.03904164582490921, -0.2892920672893524, 0.5257928967475891, 0.019043248146772385, 0.0152781056240201, 0.29247331619262695, 0.0841580480337143, -0.4970622658729553, 0.07683149725198746, -0.21807906031608582, -0.29685157537460327, -0.2936653196811676, -0.904487133026123, 0.822263300418853...
func (a *DefaultApiService) ListStories(ctx _context.Context, localVarOptionals *ListStoriesOpts) (Stories, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte local...
[ -0.8739724159240723, -0.39571887254714966, 0.596728503704071, -0.04408887401223183, 0.3396346867084503, 0.19876933097839355, -0.2872162461280823, -0.15835484862327576, -0.4655050039291382, 0.07151850312948227, 0.042074188590049744, 0.2702557444572449, -0.621127188205719, 1.175590991973877,...
func (a *DefaultApiService) ListTimeSeries(ctx _context.Context, localVarOptionals *ListTimeSeriesOpts) (TimeSeriesList, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes [...
[ -1.2495107650756836, -0.33770549297332764, 0.562604546546936, -0.3995334804058075, 0.12975510954856873, -0.050464533269405365, -0.6524225473403931, -0.7198396921157837, 0.1500844657421112, 0.925214409828186, -0.527427613735199, 0.37931695580482483, -0.8780401945114136, 1.0071383714675903, ...
func (a *DefaultApiService) ListTrends(ctx _context.Context, field string, localVarOptionals *ListTrendsOpts) (Trends, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []b...
[ -1.0183802843093872, -0.4567088782787323, 0.6701053977012634, -0.19943805038928986, 0.3954932689666748, 0.20294304192066193, -0.22058738768100739, -0.5729297399520874, 0.26573196053504944, 0.003381461836397648, -0.641761064529419, 1.055097222328186, -0.8185276985168457, 1.109424352645874, ...
func (files *Files) Add(filenames ...string) { for _, filename := range filenames { filename = files.absFilename(filename) files.filenames[filename] = struct{}{} } }
[ -0.8774929642677307, -0.48124372959136963, 0.53050297498703, -0.2328263223171234, 0.7303916215896606, 0.5465686917304993, -0.7347607016563416, 0.855549156665802, -0.5594320893287659, -0.010461943224072456, -0.08167242258787155, -0.08407101035118103, 0.010954570025205612, 1.2014856338500977...
func NewKeeper(coinKeeper bank.Keeper, cdc *codec.Codec, key sdk.StoreKey) Keeper { keeper := Keeper{ CoinKeeper: coinKeeper, storeKey: key, cdc: cdc, } return keeper }
[ 0.10911747813224792, -0.3942965269088745, 0.24675509333610535, 0.4274146556854248, -0.8098587393760681, 0.017514262348413467, -0.16739146411418915, 0.41338053345680237, -0.09917505085468292, -0.2180466204881668, -0.335834801197052, 0.25852519273757935, -0.39899834990501404, 0.4598025679588...
func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) }
[ -0.025604616850614548, 0.022289151325821877, 0.34670618176460266, -0.3775816559791565, 0.25128716230392456, 0.7262750267982483, -1.0307999849319458, -0.1504548341035843, 0.5355516672134399, -0.223487988114357, 0.6092982292175293, 0.20665325224399567, 0.5964348316192627, 0.9390274286270142,...
func (k Keeper) GetCommit(ctx sdk.Context, solutionScavengerHash string) (types.Commit, error) { store := ctx.KVStore(k.storeKey) var commit types.Commit byteKey := []byte(types.CommitPrefix + solutionScavengerHash) err := k.cdc.UnmarshalBinaryLengthPrefixed(store.Get(byteKey), &commit) if err != nil { return co...
[ 0.7438039779663086, -0.4069128632545471, 0.5151034593582153, 0.5644936561584473, -0.10338214039802551, -0.6477677226066589, 0.07395900785923004, -0.6426640152931213, 0.16044706106185913, 0.5144967436790466, 0.09598827362060547, 0.1724693924188614, -0.3464357852935791, -0.2531313896179199, ...
func (k Keeper) GetScavenge(ctx sdk.Context, solutionHash string) (types.Scavenge, error) { store := ctx.KVStore(k.storeKey) var scavenge types.Scavenge byteKey := []byte(types.ScavengePrefix + solutionHash) err := k.cdc.UnmarshalBinaryLengthPrefixed(store.Get(byteKey), &scavenge) if err != nil { return scavenge...
[ 0.4068463146686554, -0.09912853688001633, 0.3560342490673065, 0.7541496157646179, -0.6209412813186646, -0.694894552230835, 0.10061220824718475, -0.32413145899772644, 0.3937435746192932, 0.12011562287807465, -0.3700076937675476, 0.44417300820350647, -0.4261477589607239, 0.30839017033576965,...
func (k Keeper) SetCommit(ctx sdk.Context, commit types.Commit) { solutionScavengerHash := commit.SolutionScavengerHash store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshalBinaryLengthPrefixed(commit) key := []byte(types.CommitPrefix + solutionScavengerHash) store.Set(key, bz) }
[ 0.33537301421165466, -0.27709493041038513, 0.2873964309692383, 0.642124593257904, 0.41177183389663696, 0.32764163613319397, -0.08133421838283539, -0.27310413122177124, 0.17037305235862732, 0.6643232107162476, -0.5621483325958252, -0.3613157570362091, -0.19349318742752075, 0.251369327306747...
func (k Keeper) SetScavenge(ctx sdk.Context, scavenge types.Scavenge) { solutionHash := scavenge.SolutionHash store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshalBinaryLengthPrefixed(scavenge) key := []byte(types.ScavengePrefix + solutionHash) store.Set(key, bz) }
[ -0.015943806618452072, -0.2139643281698227, 0.22028635442256927, 0.3557010889053345, -0.13753610849380493, 0.2942180335521698, 0.042265601456165314, 0.0828045904636383, 0.6551628708839417, 0.340259850025177, -1.0190761089324951, 0.26263102889060974, -0.001958714332431555, 0.473396182060241...
func (k Keeper) DeleteScavenge(ctx sdk.Context, solutionHash string) { store := ctx.KVStore(k.storeKey) store.Delete([]byte(solutionHash)) }
[ 0.6627337336540222, 0.008767502382397652, 0.27120864391326904, 0.5297083854675293, 0.1816594898700714, 0.02933550998568535, 0.42901405692100525, 0.5351948738098145, 1.0331153869628906, 0.3406161665916443, -0.46758753061294556, -0.027989793568849564, 0.04726789519190788, 0.965642511844635, ...
func (k Keeper) GetScavengesIterator(ctx sdk.Context) sdk.Iterator { store := ctx.KVStore(k.storeKey) return sdk.KVStorePrefixIterator(store, []byte(types.ScavengePrefix)) }
[ -0.507940948009491, -0.32013246417045593, 0.1814584583044052, 0.09026292711496353, -0.6275264024734497, -0.2536635398864746, -0.5138680934906006, -0.01757766865193844, 0.5857658386230469, 0.2366037368774414, -0.28557679057121277, 0.8594929575920105, -0.011733144521713257, -0.03477467596530...
func (k Keeper) GetCommitsIterator(ctx sdk.Context) sdk.Iterator { store := ctx.KVStore(k.storeKey) return sdk.KVStorePrefixIterator(store, []byte(types.CommitPrefix)) }
[ -0.2233295738697052, -0.4821999669075012, 0.29658079147338867, -0.22226643562316895, -0.7907805442810059, -0.1945565640926361, -0.3843613862991333, 0.1761123389005661, 0.24273401498794556, 0.7295945286750793, 0.45104265213012695, 0.5796092748641968, -0.6440797448158264, -0.0946061983704567...
func NewWorker(workQueue chan ConnInfo, stoppedchan chan bool) Worker { //Creating the worker worker := Worker{ WorkQueue: workQueue, StoppedChan: stoppedchan, QuitChan: make(chan bool), } return worker }
[ -0.4855820834636688, -0.9930764436721802, 0.31234532594680786, -0.662574291229248, -0.24226641654968262, 0.8033783435821533, -1.0229477882385254, -0.4792003333568573, -0.4628860354423523, 0.2821401059627533, -0.9297763109207153, -0.42005953192710876, -0.7635051608085632, 0.5574295520782471...
func (w *Worker) Work() { go func() { for { // Add ourselves into the worker queue. select { case work := <-w.WorkQueue: // This is where we're going to store everything we log about this connection var req_log LoggedRequest // Fill out the basic info for a request based on // the data we h...
[ -0.524010181427002, -0.5588278770446777, 1.0328795909881592, 0.30372557044029236, -0.153947651386261, -0.21963590383529663, -0.37453693151474, -0.917648196220398, -0.4190039336681366, -0.33681780099868774, 0.1731298416852951, 0.46605995297431946, -0.25685444474220276, 0.5616200566291809, ...
func (w *Worker) Stop() { w.QuitChan <- true // fmt.Fprintln(os.Stderr, "Worker got stop call") }
[ -0.6490641236305237, -0.4574553072452545, 0.49305248260498047, -0.5285283327102661, 0.6010864973068237, 1.454871416091919, 0.21514546871185303, -0.38811397552490234, -0.5346192121505737, 0.1762414276599884, -0.43534615635871887, 0.6626614928245544, -0.6337596774101257, 0.7217912077903748, ...
func ToJSON(data interface{}) ([]byte, error) { jsonBytes, err := json.Marshal(data) if err != nil { return nil, errors.New(fmt.Sprintf("JSON conversion failed: %s", err.Error())) } return append(jsonBytes, "\n"...), nil }
[ -0.13365532457828522, -0.1701458990573883, 0.9495769739151001, 0.3195367753505707, -0.4374741017818451, -0.594902753829956, -0.5014227628707886, -0.37345561385154724, 0.7807648181915283, 0.5189054608345032, -0.6782963275909424, 0.927624523639679, -0.2261810302734375, 0.5397184491157532, ...
func (res *Response) StatusToError() error { switch res.Status { case Ok, Partial: return nil // FIXME: Consider if we want to not process `Partial` responses // and return an error instead. case NotFound: return fmt.Errorf("not found") case GoAway: return fmt.Errorf("not handling 'go away' chainxchg res...
[ 0.09323712438344955, -1.0617022514343262, 0.40504783391952515, -0.9144391417503357, 0.686441957950592, -0.33661404252052307, -0.2603803873062134, -0.591378927230835, 0.26776450872421265, 0.12018166482448578, -0.12790296971797943, -0.16719281673431396, 0.5254071354866028, -0.757134735584259...
func CreateNewEmployee(id string, username string, pass string, fName string, lName string) Employee { return Employee{id, username, pass, fName, lName} }
[ 0.03990528732538223, -1.5608772039413452, 0.31321200728416443, 0.3568146824836731, -0.3958947956562042, 1.4619383811950684, -1.1346186399459839, 0.44674718379974365, -1.2725344896316528, -0.38943034410476685, -0.7013370990753174, -0.01249247882515192, -0.9204294681549072, 0.302190631628036...
func (a *Employee) GetEmployeeID() string { return a.EmpID }
[ 0.8825206160545349, -0.9058358669281006, 0.3913503885269165, -0.2944207787513733, -0.02230744995176792, 1.4952797889709473, 0.47514259815216064, 0.80320143699646, 0.7444546222686768, 0.42148780822753906, 0.3493024706840515, 0.5176817774772644, -0.7453712821006775, 1.188749074935913, 0.09...
func (a *Employee) GetEmployeeUsername() string { return a.EmpUsername }
[ -0.784164547920227, -0.0347345806658268, 0.5209029912948608, 0.2633068859577179, -0.2981266975402832, 0.24064725637435913, 0.7087268829345703, 1.0364935398101807, -0.2785305082798004, 0.07107966393232346, -0.04860013350844383, -0.40924564003944397, -0.37760329246520996, 0.49401524662971497...
func (a *Employee) GetEmployeePass() string { return a.EmpPass }
[ -0.19874350726604462, -0.9830876588821411, 0.530319094657898, -0.002083463128656149, -0.319064199924469, 0.9675454497337341, 0.3770117163658142, -0.07932277023792267, 0.11694382131099701, 0.018857207149267197, -0.28349506855010986, 0.0029833479784429073, -0.6533629894256592, 0.331294476985...
func (a *Employee) GetEmployeeFName() string { return a.EmpFName }
[ 0.09690732508897781, -0.2215927392244339, 0.3752550482749939, -0.30042052268981934, -0.5045343041419983, 0.13342447578907013, 0.36672595143318176, 0.48250314593315125, -0.18342971801757812, 0.011454681865870953, -0.29247501492500305, -0.09321703016757965, -0.5275542736053467, 0.74954509735...
func (a *Employee) GetEmployeeLName() string { return a.EmpLName }
[ -0.6332281231880188, -0.7463257908821106, 0.5472486019134521, 0.009445570409297943, -1.1038357019424438, 0.833095133304596, 0.0646379366517067, 0.829025387763977, 0.8200312852859497, 0.2458149641752243, -0.2601059377193451, -0.04748823121190071, 0.08534402400255203, 0.35047435760498047, ...
func (s *Server) Start() error { conn, err := net.ListenPacket("udp", s.Addr.String()) if err != nil { os.Exit(1) } s.Log.Info().Msgf("listening on %v...", s.Addr.String()) defer conn.Close() // conn.SetReadDeadline(s.Timeout) for { buf := make([]byte, 1024) // TODO make buffer size configurable, or unlimit...
[ -0.32050570845603943, -0.14869600534439087, 0.6354414224624634, -0.19207406044006348, -0.3586006164550781, -0.39166760444641113, -0.24857164919376373, 0.7703958749771118, 0.023086819797754288, 0.09883023798465729, -0.21610383689403534, 1.1523441076278687, 0.396353155374527, 0.3090236485004...
func (s *Server) Serve(pc net.PacketConn, addr net.Addr, datagram []byte) { // Test response with an A RR aRr := dns.A{ Hdr: dns.RR_Header{ Name: "refs.com", }, A: net.IPv4(0, 4, 2, 0), } data, err := json.Marshal(aRr) if err != nil { s.Log.Error().Err(err).Msg("marshaling A RR") pc.Close() os.Exit...
[ -0.0532718263566494, 0.18078328669071198, 0.5389772653579712, -0.7554433345794678, 0.2882750928401947, -0.4218979477882385, -0.2327987551689148, 0.5254835486412048, -0.12417016178369522, 0.1474456489086151, -0.6240817904472351, 0.6736478209495544, -0.3289237320423126, -0.07117365300655365,...
func (s *Server) Stop() { // TODO write to `s.stop` channel }
[ -1.8008140325546265, -0.4997650980949402, -0.029561150819063187, -0.3243231177330017, 0.48116135597229004, 0.48398149013519287, 0.4279820919036865, 0.5735082030296326, 0.20210561156272888, -0.08648727834224701, -1.2130005359649658, 1.7012627124786377, -0.5588529109954834, 0.562355935573577...
func readToByteArray() []byte{ content, err := ioutil.ReadFile("testdata.txt") if err != nil { log.Fatal(err) } return content }
[ 0.1688479781150818, -0.5609623789787292, 0.5472082495689392, -1.034324049949646, 0.806868314743042, 0.8591184616088867, 0.11150465905666351, -0.37230727076530457, -0.7192370295524597, 0.19057588279247284, 0.26494812965393066, 0.7965513467788696, -0.5836876034736633, 0.08450611680746078, ...
func (c *Conn) GetNode(path ...NodeName) (Node, error) { var node Node err := c.Request("get", &node, pathToArgs(path)...) return node, err }
[ -0.926729679107666, 0.939225971698761, 0.6067334413528442, 0.631706178188324, 1.1692942380905151, -0.574267566204071, -0.8356719017028809, -0.2972041666507721, -0.508760392665863, -0.10322057455778122, 0.7225126028060913, 0.8847455382347107, -0.8646150231361389, -0.24347209930419922, -0....
func (c *Conn) GetNodeValue(path ...NodeName) (NodeValue, error) { var node NodeValue err := c.Request("get", &node, pathToArgs(path)...) if err == ErrReturnCode { err = nil // ignore 0 return value as failure } return node, err }
[ -1.2356053590774536, 0.6559476256370544, 0.7835439443588257, 0.5102585554122925, 0.23102989792823792, -0.17039236426353455, -0.6567847728729248, -0.39741742610931396, -0.7972973585128784, -0.4434768855571747, 0.3276955485343933, 0.7202133536338806, -0.10439987480640411, 0.26957622170448303...
func (c *Conn) GetAffectedNodes(ref string) ([]NodePath, error) { var paths []NodePath err := c.Request("get_affected_nodes", &paths, ref) return paths, err }
[ -0.985504686832428, 0.895967423915863, 0.2886454463005066, 0.5121710300445557, 0.372074693441391, -0.3847409784793854, 0.790175199508667, 0.2460799664258957, 0.3826717436313629, 0.19413207471370697, -0.4078008532524109, 1.8232030868530273, -0.5460749864578247, 0.7566396594047546, 0.22852...
func (c *Conn) ResetNode(path ...NodeName) (bool, error) { var ok Bool err := c.Request("reset", &ok, pathToArgs(path)...) return bool(ok), err }
[ -1.5535191297531128, 1.3126722574234009, 0.7145764231681824, 0.46777182817459106, 0.8946664929389954, -0.08675890415906906, -0.11893550306558609, 0.17470379173755646, -0.9139912724494934, 0.830815315246582, -0.04753527790307999, 0.4262179732322693, -1.1914976835250854, -0.83964604139328, ...
func (c *Conn) SetNode(node Node, path ...NodeName) (bool, error) { return c.SetNodeValue(node, path...) }
[ -1.2129639387130737, 1.0525038242340088, 0.3744645416736603, 0.8854804635047913, 0.1894979476928711, 0.1555507779121399, -0.574232280254364, 0.5996814370155334, -0.784648060798645, 0.11742088198661804, -0.27193477749824524, -0.5187535285949707, -0.5770829916000366, 0.2861807644367218, -0...
func (c *Conn) SetNodeValue(node NodeValue, path ...NodeName) (bool, error) { var ok Bool args := make([]interface{}, len(path)+1) args[0] = node copy(args[1:], pathToArgs(path)) err := c.Request("set", &ok, args...) return bool(ok), err }
[ -1.6587920188903809, 0.7491772770881653, 0.7580929398536682, -0.018975218757987022, -0.4282640516757965, 0.2413012981414795, -0.2473980039358139, -0.11801740527153015, -0.77634596824646, 0.5037268996238708, -0.6690962910652161, 0.20084698498249054, -0.24516279995441437, 0.10016172379255295...
func (c *Conn) GetNodes(path ...NodeName) ([]NodeName, error) { var names []NodeName err := c.Request("get_nodes", &names, pathToArgs(path)...) return names, err }
[ -1.2052733898162842, 1.4077681303024292, 0.5068010687828064, 0.41439366340637207, 1.3989334106445312, -0.6864838600158691, -0.4101523160934448, -0.5171682834625244, -0.4145651161670685, 0.4366501569747925, -0.4268527030944824, 0.84132981300354, -0.7273174524307251, 0.08403533697128296, -...
func applyInsertionPoint( ctx context.Context, file *pluginpb.CodeGeneratorResponse_File, readWriteBucket storage.ReadWriteBucket, ) error { resultData, err := calculateInsertionPoint(ctx, file, readWriteBucket) if err != nil { return err } // This relies on storageos buckets maintaining existing file permissi...
[ 0.6161919236183167, -0.47322434186935425, 0.38943013548851013, 0.10218320041894913, 0.6158286333084106, 0.41087502241134644, 0.6776227355003357, 0.6475819945335388, -0.5819154381752014, -0.05850782245397568, -0.12272968888282776, -1.3400133848190308, -0.9025510549545288, 0.2978541254997253...
func leadingWhitespace(s string) string { for i, r := range s { if !unicode.IsSpace(r) { return s[:i] } } return s }
[ 0.7956429123878479, -0.21211428940296173, 0.3102922737598419, -0.7747955322265625, -0.034830670803785324, 0.5560402870178223, -0.45352011919021606, -0.7648044228553772, 1.4512592554092407, 0.0663931593298912, 0.507169783115387, 0.6000156998634338, -0.6939619183540344, 0.492495596408844, ...
func scanWithPrefix(scanner *bufio.Scanner, prefix string) []string { var result []string for scanner.Scan() { result = append(result, prefix+scanner.Text()) } return result }
[ -0.21383993327617645, -0.4036460518836975, 0.542658269405365, 0.17282994091510773, -1.3044813871383667, -0.6455343961715698, -1.2490568161010742, -0.6187153458595276, 0.43420910835266113, -0.018055081367492676, -0.4629085063934326, 0.5910901427268982, 0.06044026091694832, 0.616705417633056...
func NewRepo() *Repo { r := &Repo{} r.LocalPath = "." r.RemoteName = "origin" return r }
[ 0.8745262026786804, -0.5659221410751343, 0.35055166482925415, 0.5626261234283447, -1.1101230382919312, 0.15984565019607544, 0.187171071767807, 0.9126808047294617, -0.29671168327331543, -0.8593774437904358, -0.23600754141807556, 0.0812845528125763, 0.9297998547554016, -0.26693618297576904, ...
func (r *Repo) Init() error { // We get all needed information about the repo based on the remote url remote, err := getRemoteFromLocalRepoPath(r.LocalPath, r.RemoteName) // Parse the remote url into needed information, different paths for ssh vs http remotes switch { case strings.Contains(remote, "://"): remot...
[ 0.16548430919647217, -0.34365132451057434, 0.5753012299537659, -1.0928529500961304, -0.31569212675094604, 0.08282987028360367, -0.2882298529148102, 0.14669953286647797, -1.0749173164367676, -0.15995977818965912, -0.18795999884605408, 0.13486504554748535, 0.39971834421157837, 0.037264045327...
func (p Product) String() string { return fmt.Sprintf("Id = %d, Name = %s, Cost = %f, Units = %d, Category = %s", p.Id, p.Name, p.Cost, p.Units, p.Category) }
[ -0.5821740627288818, -1.1007846593856812, 0.3099975287914276, -0.056392792612314224, 0.1258070170879364, 1.022935390472412, 0.16478362679481506, -1.3417953252792358, -0.533534586429596, 0.25718003511428833, -0.444484680891037, 0.1471896469593048, 0.19991901516914368, -0.8095183372497559, ...
func NewExportCommand(ctx context.Context) *cobra.Command { opts := &ExportOptions{} cmd := &cobra.Command{ Use: "export COMPONENT_ARCHIVE_PATH [-o output-dir/file] [-f {fs|tar|tgz}]", Args: cobra.ExactArgs(1), Short: "Exports a component archive as defined by CTF", Long: ` Export command exports a compone...
[ 0.6336261630058289, -0.725949227809906, 0.5841389894485474, 0.22389677166938782, 0.03250614553689957, -0.17452499270439148, 0.5492811799049377, 0.5484876036643982, 0.34573596715927124, 0.08442647755146027, 0.09904777258634567, 0.3218297064304352, -0.20985724031925201, 0.3547295033931732, ...
func (o *ExportOptions) Run(_ context.Context, fs vfs.FileSystem) error { ca, format, err := componentarchive.Parse(fs, o.ComponentArchivePath) if err != nil { return err } if format == ctf.ArchiveFormatFilesystem { return o.export(fs, ca, ctf.ArchiveFormatTar) } else { return o.export(fs, ca, ctf.ArchiveFor...
[ -0.0932975485920906, -0.8853330016136169, 0.502223551273346, -0.07217194139957428, 0.2534070312976837, -0.22871755063533783, 0.2769005596637726, 0.2328832745552063, 0.9225369095802307, 0.1790940761566162, 0.07145241647958755, 0.033006541430950165, 0.11023225635290146, -0.2981777489185333, ...
func (o *ExportOptions) Complete(args []string) error { if len(args) != 1 { return fmt.Errorf("expected exactly one argument that contains the path to the component archive") } o.ComponentArchivePath = args[0] if len(o.OutputPath) == 0 { o.OutputPath = defaultOutputPath } return o.validate() }
[ -0.12502768635749817, -0.241066113114357, 0.7070236802101135, 0.29137933254241943, 0.4250035583972931, 0.17767079174518585, 0.8680061101913452, 0.27389994263648987, 0.16809910535812378, 0.957027018070221, 0.10220707952976227, -0.5068046450614929, -0.27101409435272217, -0.4855290651321411, ...
func NewLWCmd(store *store.Store) *LWCmd { cmd := &LWCmd{store: store, keyWatchers: make(map[string]map[*qrpc.ConnectionInfo]struct{}), ciWatchMap: make(map[*qrpc.ConnectionInfo]map[string]struct{})} return cmd }
[ 0.4538230895996094, -1.3039487600326538, 0.2587032914161682, -1.045837640762329, -0.4027671813964844, -0.15060682594776154, -0.9465206265449524, -0.33089810609817505, 0.0023281704634428024, -0.9389471411705017, -0.237025186419487, 0.2735026478767395, -0.43639400601387024, 1.094958662986755...
func (cmd *LWCmd) SetServer(server *qrpc.Server) { cmd.server = server }
[ -0.5562211275100708, -1.2308721542358398, 0.3091599941253662, -0.05228466913104057, 0.880620002746582, 1.0556349754333496, 0.08548036217689514, 0.21567657589912415, -0.05992580205202103, -1.261555552482605, -0.6918827891349792, 0.7942289710044861, -1.60733163356781, 2.138465642929077, 0....
func (cmd *LWCmd) StartWatch() { if cmd.ch != nil { panic("StartWatch called twice") } cmd.ch = cmd.store.Watch() go cmd.fire() }
[ 1.5015360116958618, -0.398891806602478, 0.2212134301662445, 0.7378451824188232, 0.7718199491500854, 0.24392098188400269, 0.47862258553504944, 0.08087515085935593, 0.03468139097094536, -1.467995285987854, -0.03468052297830582, 1.3015600442886353, 0.13010506331920624, 0.9518023133277893, -...
func (cmd *LWCmd) StopWatch() { cmd.store.Unwatch(cmd.ch) }
[ 0.8162395358085632, -0.4889373183250427, -0.011238844133913517, -1.2715797424316406, 0.7431015372276306, 0.40617167949676514, 0.5922105312347412, -0.34473076462745667, -0.8912503719329834, -1.0684071779251099, 0.029059819877147675, 0.8347471952438354, -0.45113101601600647, 0.63825690746307...
func (api *ProductServerAPI) IsValidPlan(core int, memGB int) (bool, error) { planID, err := api.getPlanIDBySpec(core, memGB) if err != nil { return false, err } productServer, err := api.Read(planID) if err != nil { return false, err } if productServer != nil { return true, nil } return false, fmt.E...
[ -0.5212732553482056, -0.16273081302642822, 0.6704679727554321, 0.2947518527507782, -0.49090880155563354, 0.441283255815506, -0.029751276597380638, -1.321173071861267, 1.0070511102676392, 0.04683345928788185, -0.5542742609977722, 1.5886021852493286, -1.1366004943847656, 0.7963303923606873, ...
func (api *ProductServerAPI) GetBySpec(core int, memGB int) (*sacloud.ProductServer, error) { planID, err := api.getPlanIDBySpec(core, memGB) productServer, err := api.Read(planID) if err != nil { return nil, err } return productServer, nil }
[ 0.02478989213705063, -0.17435535788536072, 0.5695871114730835, 0.00448120990768075, 0.44639649987220764, 0.05030590668320656, -0.1225757822394371, -1.003604769706726, 0.2718639373779297, 0.4610476493835449, -0.4176657497882843, 1.8366756439208984, -0.6153457164764404, -0.36316484212875366,...
func (g *gsutilUploader) UploadJSON(data interface{}, tempFileName, gcsObjPath string) error { jsonBytes, err := json.Marshal(data) if err != nil { return err } if err := ioutil.WriteFile(tempFileName, jsonBytes, 0644); err != nil { return err } // Upload the written file. return g.UploadBytes(nil, tempFil...
[ -0.7290446758270264, -0.26954904198646545, 0.5810854434967041, -0.8062598705291748, 0.06929709017276764, 0.14178316295146942, 0.1674807369709015, -0.6182576417922974, -0.18241716921329498, 0.5991853475570679, -0.831215500831604, 0.3274539113044739, -0.06970641762018204, 0.2508605122566223,...
func prefixGCS(gcsPath string) string { return fmt.Sprintf(GCS_PREFIX+"%s", gcsPath) }
[ 0.7898910045623779, -0.23725131154060364, 0.15869419276714325, -1.0148420333862305, 0.12145601212978363, 0.7415107488632202, -0.855924129486084, -1.5408284664154053, 0.37313032150268555, 0.42325568199157715, 0.770006000995636, 0.7050691246986389, 0.25843167304992676, -0.12398704886436462, ...
func (g *gsutilUploader) UploadBytes(data []byte, fileName, dst string) error { runCmd := exec.Command("gsutil", "cp", fileName, dst) outBytes, err := runCmd.CombinedOutput() if err != nil { if runtime.GOOS == "windows" { runCmd = exec.Command("python", "gsutil.py", "cp", fileName, dst) outBytes, err = runCm...
[ -0.766403079032898, 0.8069680333137512, 0.7312993407249451, -0.3667732775211334, -0.0442383773624897, 0.5402246713638306, 0.3138352036476135, -0.6755959391593933, -0.9325536489486694, 0.5003951191902161, 0.10299365967512131, 0.7230339050292969, -0.9293026924133301, 0.7417653203010559, 1....
func (s *SpySleeper) Sleep(){ s.Calls++ }
[ 0.17807245254516602, 0.8344129920005798, 0.1885649710893631, 0.2563757002353668, -0.027262980118393898, 0.1958431452512741, 0.3434164226055145, -1.0493830442428589, 0.7337369918823242, -0.6958094835281372, -0.5451769232749939, 0.20524723827838898, -0.7822889685630798, 0.7955269813537598, ...