text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func commitAvroSchema(w io.Writer, projectID, schemaID, avscFile string) error {
// projectID := "my-project-id"
// schemaID := "my-schema-id"
// avscFile = "path/to/an/avro/schema/file(.avsc)/formatted/in/json"
ctx := context.Background()
client, err := pubsub.NewSchemaClient(ctx, projectID)
if err != nil {
re... | [
0.4769887924194336,
-0.7131417393684387,
0.656606912612915,
-0.06459682434797287,
-0.04024742916226387,
0.46919941902160645,
0.10453151911497116,
0.09644092619419098,
-0.4619160294532776,
1.2971986532211304,
-0.17998209595680237,
0.7343944907188416,
-0.5114266276359558,
0.16702955961227417... |
func (gw *TransportGateway) AddTransport(req TransportRequest, res *TransportResponse) error {
ctx := context.Background()
gw.log.WithField("PK", req.RemotePK).WithField("type", req.Type).Info("Adding transport")
tp, err := gw.tm.SaveTransport(ctx, req.RemotePK, req.Type, transport.LabelSkycoin)
if err != nil {
g... | [
-0.5317121744155884,
-0.49982863664627075,
0.6122310757637024,
-0.5819295048713684,
0.6967946290969849,
0.5799519419670105,
-0.22304652631282806,
-0.1272391974925995,
0.4853639006614685,
0.1408170461654663,
-1.2123870849609375,
-0.08810098469257355,
-1.0796825885772705,
0.49498939514160156... |
func (gw *TransportGateway) RemoveTransport(req UUIDRequest, res *BoolResponse) error {
gw.log.WithField("ID", req.ID).Debug("Removing transport")
tr, err := gw.tm.GetTransportByID(req.ID)
if err != nil {
return err
}
if tr.Entry.Label != transport.LabelSkycoin {
return ErrIncorrectType
}
gw.tm.DeleteTranspo... | [
-1.2564438581466675,
-0.0762961283326149,
0.5063288807868958,
-0.28223201632499695,
-0.07578005641698837,
-0.11702200025320053,
-0.051547322422266006,
0.10630703717470169,
0.5292681455612183,
0.7026572823524475,
-1.0562504529953003,
-0.5371204614639282,
-1.2318841218948364,
0.1392261534929... |
func (gw *TransportGateway) GetTransports(_ struct{}, res *[]TransportResponse) error {
tps := gw.tm.GetTransportsByLabel(transport.LabelSkycoin)
for _, tp := range tps {
tResp := TransportResponse{
ID: tp.Entry.ID,
Local: gw.tm.Local(),
Remote: tp.Remote(),
Type: tp.Type(),
}
*res = append(*... | [
-0.22808516025543213,
-0.4090380072593689,
0.4461568593978882,
-0.6981912851333618,
1.0136984586715698,
-0.400325745344162,
-0.3420523703098297,
-1.223934292793274,
0.49558693170547485,
0.6379649639129639,
-1.221299648284912,
-0.44652655720710754,
-0.888534426689148,
0.3633185923099518,
... |
func NewPool(fn ResolverFactory) *Pool {
return &Pool{
factory: fn,
}
} | [
0.07565731555223465,
0.09667497128248215,
0.05786167457699776,
1.0617018938064575,
0.25856828689575195,
-0.25168508291244507,
0.09350799769163132,
0.3475705683231354,
0.3691469728946686,
-1.2090637683868408,
-0.16583020985126495,
0.18125589191913605,
0.9406716823577881,
-0.7044923901557922... |
func (p *Pool) GetResolver(ctx context.Context, scope Scope) (PermissionResolver, error) {
if r, ok := p.resolvers.Load(scope); ok {
return r.(PermissionResolver), nil
}
o, _ := p.onces.LoadOrStore(scope, &sync.Once{})
once := o.(*sync.Once)
var err error
once.Do(func() {
var r PermissionResolver
r, err ... | [
-0.5231968760490417,
-0.0818554237484932,
0.505845844745636,
-0.10569699108600616,
0.2533099055290222,
-0.7271063327789307,
0.2529253363609314,
-0.10822451859712601,
0.542711615562439,
-0.8392725586891174,
0.09821522980928421,
0.504747211933136,
-0.9958497285842896,
0.08786187320947647,
... |
func call(srv string, rpcname string,
args interface{}, reply interface{}) bool {
c, errx := rpc.Dial("unix", srv)
if errx != nil {
return false
}
defer c.Close()
err := c.Call(rpcname, args, reply)
if err == nil {
return true
}
return false
} | [
-0.7783223986625671,
0.7201847434043884,
0.8067929148674011,
-0.3408704996109009,
-0.2538143992424011,
1.1876187324523926,
-1.7101472616195679,
-0.5740378499031067,
-0.10921552032232285,
0.28518614172935486,
0.06557990610599518,
0.22693251073360443,
-1.5298774242401123,
-0.1823876947164535... |
func (ck *Clerk) LockUsingRequest(lockname string, requestId string) bool {
// prepare the arguments.
args := &LockArgs{}
args.Lockname = lockname
args.RequestId = requestId
var reply LockReply
// send an RPC request, wait for the reply.
ok := call(ck.servers[0], "LockServer.Lock", args, &reply)
if o... | [
-1.0434678792953491,
0.23948509991168976,
0.7585808634757996,
0.12424996495246887,
0.36204764246940613,
0.2376304566860199,
-0.5357886552810669,
-1.1151334047317505,
-0.339303582906723,
0.1797090768814087,
0.861139178276062,
0.2117617130279541,
-1.1154543161392212,
0.5002341270446777,
0.... |
func (ck *Clerk) UnlockUsingRequest(lockname string, requestId string) bool {
// prepare the arguments.
args := &UnlockArgs{}
args.Lockname = lockname
args.RequestId = requestId
var reply UnlockReply
// send an RPC request, wait for the reply.
ok := call(ck.servers[0], "LockServer.Unlock", args, &reply... | [
-1.1226954460144043,
0.42122676968574524,
0.7422338724136353,
-0.005556750111281872,
0.006882379297167063,
-0.0521148182451725,
-0.3523483872413635,
-0.4886089861392975,
-0.37123745679855347,
0.38430142402648926,
0.6423859000205994,
0.13162125647068024,
-1.4145574569702148,
0.2470842897891... |
func (suite *HandlerSuite) AuthenticateClientCertRequest(req *http.Request, cert *models.ClientCert) *http.Request {
ctx := authentication.SetClientCertInRequestContext(req, cert)
return req.WithContext(ctx)
} | [
-0.2541695237159729,
-0.49351873993873596,
0.40360134840011597,
0.9206724166870117,
-0.6902328133583069,
-0.06081293150782585,
-0.010354876518249512,
-0.9311930537223816,
0.12131677567958832,
-0.025121042504906654,
0.10291697084903717,
0.22827161848545074,
-0.0027932929806411266,
0.2211245... |
func (suite *HandlerSuite) AfterTest() {
for _, file := range suite.TestFilesToClose() {
file.Data.Close()
}
} | [
0.09199149161577225,
-0.7130618691444397,
0.34272080659866333,
-0.4974278509616852,
0.07555271685123444,
1.4267488718032837,
1.6285576820373535,
0.1738072782754898,
-0.44577595591545105,
-0.6900505423545837,
0.24084894359111786,
-0.5169292092323303,
-0.7732693552970886,
0.38258096575737,
... |
func TestHandlerSuite(t *testing.T) {
hs := &HandlerSuite{
BaseHandlerTestSuite: handlers.NewBaseHandlerTestSuite(notifications.NewStubNotificationSender("milmovelocal"), testingsuite.CurrentPackage(), testingsuite.WithPerTestTransaction()),
}
suite.Run(t, hs)
hs.PopTestSuite.TearDown()
} | [
0.18647609651088715,
-0.2648661434650421,
0.3651377260684967,
0.025508468970656395,
0.4550083875656128,
0.7547672986984253,
0.6589198708534241,
0.4634324610233307,
-0.13096986711025238,
-0.11713920533657074,
-0.5299402475357056,
0.0927957072854042,
0.15905344486236572,
0.4146158993244171,
... |
func detect(s string) (string, error) {
cmd := exec.Command("/bin/bash", "-c", s)
var out bytes.Buffer
cmd.Stdout = &out
err := cmd.Run()
result := out.String()
return result, err
} | [
0.544662356376648,
-0.20860767364501953,
0.8133049011230469,
0.6047560572624207,
-0.6852437257766724,
-0.6079468131065369,
-0.2568335235118866,
-1.1195536851882935,
-0.3540121018886566,
-0.29359909892082214,
-0.7213828563690186,
0.6533160209655762,
-0.05152595043182373,
0.5453409552574158,... |
func ReadOrders(fullPath string) []string {
if len(fullPath) == 0 {
fullPath = "./orderNos.txt"
}
return readLines(fullPath)
} | [
-0.20354385673999786,
0.15458190441131592,
0.6452090740203857,
0.41672033071517944,
-0.21468240022659302,
0.08248945325613022,
-0.15203692018985748,
-0.0056383186019957066,
0.18925434350967407,
0.2542705237865448,
0.542430579662323,
-0.3164452016353607,
0.06231658160686493,
0.4163869619369... |
func ReadReceiptParams(fullPath string) []ReceiptParam {
if len(fullPath) == 0 {
fullPath = "./receipts.txt"
}
lines := readLines(fullPath)
var result []ReceiptParam
for _, l := range lines {
items := strings.Split(l, ",")
result = append(result, ReceiptParam{OrderNo: items[0], ReceiptNo: items[1]})
}
retu... | [
-1.1309733390808105,
-0.6965609192848206,
0.6575907468795776,
-0.5991591215133667,
-0.49174386262893677,
0.29281359910964966,
0.02737503871321678,
1.0750821828842163,
-0.22701652348041534,
0.7834476828575134,
-0.5062648057937622,
-0.14201396703720093,
0.7288405895233154,
0.6220771670341492... |
func NewHandler(server ServiceControllerServer, hh []*PrefixAndHandler, opts ...func(*Handler)) *Handler {
h := &Handler{
Server: server,
ReportHandlers: hh,
readf: ioutil.ReadAll,
marshal: proto.Marshal,
unmarshal: proto.Unmarshal,
}
for _, opt := range opts {
opt(h)
}
ret... | [
0.6968672871589661,
-0.07722259312868118,
0.10964812338352203,
0.436206191778183,
-0.39726051688194275,
0.3446502685546875,
-0.052225109189748764,
0.49262234568595886,
-0.4794759750366211,
-1.4347765445709229,
0.5150241255760193,
0.4947720468044281,
-0.6090208292007446,
0.1340404599905014,... |
func Marshal(marshal marshalfn) func(*Handler) {
return func(h *Handler) {
h.marshal = marshal
}
} | [
0.8678741455078125,
-0.10666771978139877,
0.2285764515399933,
0.3283984959125519,
-0.8497951030731201,
0.9706202745437622,
-0.2535955309867859,
0.9706217646598816,
0.04809173196554184,
-2.015838146209717,
-0.35620808601379395,
1.2049643993377686,
0.8549004793167114,
-0.5178797245025635,
... |
func ReadHTTPBody(readf readfn) func(*Handler) {
return func(h *Handler) {
h.readf = readf
}
} | [
0.03515186905860901,
-0.09768546372652054,
0.6997061371803284,
0.25164347887039185,
-0.25703921914100647,
0.45449593663215637,
0.13125866651535034,
-0.23709142208099365,
-0.539884626865387,
-0.5004210472106934,
-0.4864560067653656,
-0.24333950877189636,
0.32739442586898804,
0.3088111877441... |
func (h *Handler) preambleProcess(w http.ResponseWriter, r *http.Request, msg proto.Message) (err error) {
body, err := h.readf(r.Body)
if err != nil {
return
}
err = h.unmarshal(body, msg)
if err != nil {
return
}
glog.V(2).Infoln(msg.String())
return
} | [
0.5128341913223267,
-0.3633735179901123,
0.932087242603302,
-0.9868814945220947,
-0.27292418479919434,
0.21825791895389557,
1.1605284214019775,
0.008480041287839413,
0.17484404146671295,
0.11571751534938812,
-0.3512004613876343,
0.45991405844688416,
-0.6587396860122681,
0.5917348265647888,... |
func (h *Handler) serverCheck(w http.ResponseWriter, r *http.Request, ctx context.Context) (resp proto.Message, err error) {
msg := &sc.CheckRequest{}
if err = h.preambleProcess(w, r, msg); err != nil {
return nil, err
}
glog.Infoln("Check: " + msg.String())
return h.Server.Check(ctx, msg)
} | [
-0.44378867745399475,
-0.15633447468280792,
0.5742948055267334,
0.3647494912147522,
0.2925378382205963,
0.38137027621269226,
0.8928709030151367,
-0.09343928098678589,
-0.05543117970228195,
1.1722242832183838,
0.05621955916285515,
0.8700644373893738,
-1.3191457986831665,
1.0846117734909058,... |
func (h *Handler) serverReport(w http.ResponseWriter, r *http.Request, ctx context.Context) (resp proto.Message, err error) {
msg := &sc.ReportRequest{}
if err = h.preambleProcess(w, r, msg); err != nil {
return nil, err
}
return h.Server.Report(ctx, msg)
} | [
-0.294011652469635,
0.32807445526123047,
0.4635508060455322,
-0.2614161968231201,
0.33033978939056396,
-0.4946315288543701,
0.954327404499054,
0.17105339467525482,
0.28756195306777954,
0.37162816524505615,
-0.3272331655025482,
0.2542145252227783,
-1.7276932001113892,
0.8810265064239502,
... |
func (h *Handler) getServerFn(w http.ResponseWriter, r *http.Request) serverFn {
if r.Method != "POST" {
w.WriteHeader(http.StatusMethodNotAllowed)
return nil
}
if strings.HasSuffix(r.RequestURI, CheckSuffix) {
return h.serverCheck
} else if strings.HasSuffix(r.RequestURI, ReportSuffix) {
return h.serverRe... | [
0.07430900633335114,
-0.081837959587574,
0.5721099376678467,
1.3719528913497925,
0.49756351113319397,
-0.6083185076713562,
0.5410261750221252,
0.4616991877555847,
-0.07993270456790924,
-1.0663725137710571,
0.4337266981601715,
0.09299551695585251,
-0.6230177283287048,
0.6917388439178467,
... |
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
t := time.Now()
ww := buildLoggingWriter(w)
if h.serveHTTP(ww, r) {
ww.LogAccess(r, time.Now().Sub(t))
}
} | [
0.2204601913690567,
0.1965348869562149,
0.6603026390075684,
0.5575815439224243,
-0.5000359416007996,
0.43186870217323303,
0.4456807076931,
-0.03162630274891853,
-0.9191123843193054,
0.547050952911377,
0.4339558184146881,
0.09701641649007797,
0.17475780844688416,
0.7200294137001038,
0.246... |
func Block277316(t *testing.T) []byte {
// hash of block of height 277316
blockHash := "0000000000000001b6b9a13b095e96db41c4a928b97ef2d944a9b31b2cc7bdc4"
resp, err := http.Get("https://blockchain.info/rawblock/" + blockHash)
if nil != err {
t.Fatal(err)
return nil
}
defer resp.Body.Close()
block, err := io... | [
-0.028507795184850693,
-0.2608722150325775,
1.299181580543518,
-0.440837025642395,
-0.05517780780792236,
-0.042984265834093094,
-0.09422757476568222,
-1.0111531019210815,
-0.18846175074577332,
0.13579149544239044,
-0.6420824527740479,
0.663600742816925,
0.3884124755859375,
0.49612909555435... |
func PossibleActionTypeValues() []ActionType {
return []ActionType{ActionTypeAllow, ActionTypeBlock, ActionTypeLog, ActionTypeRedirect}
} | [
-0.14597979187965393,
-0.5447555780410767,
0.40350404381752014,
1.8613272905349731,
-0.14191554486751556,
-0.2334328144788742,
-0.04901556670665741,
-0.5247390270233154,
0.4530313014984131,
-0.4720592200756073,
-0.5145033001899719,
0.3640098571777344,
0.13833284378051758,
1.257412433624267... |
func PossibleAggregationIntervalValues() []AggregationInterval {
return []AggregationInterval{AggregationIntervalDaily, AggregationIntervalHourly}
} | [
-0.896450936794281,
-0.07103297114372253,
0.2111193984746933,
0.48238104581832886,
-0.030425995588302612,
0.6512742042541504,
-0.4476761519908905,
-0.36068567633628845,
-0.5169957876205444,
-0.3537408113479614,
0.7493974566459656,
-0.3360201418399811,
0.24222905933856964,
0.913062214851379... |
func PossibleAvailabilityValues() []Availability {
return []Availability{AvailabilityAvailable, AvailabilityUnavailable}
} | [
-1.2397894859313965,
-1.3761394023895264,
0.23975056409835815,
1.189826488494873,
-1.06742525100708,
0.9131089448928833,
-0.7459483742713928,
1.7901967763900757,
-0.38578253984451294,
0.3639817535877228,
-0.4740062654018402,
0.11987638473510742,
0.9755414128303528,
1.099961280822754,
1.0... |
func PossibleBackendEnabledStateValues() []BackendEnabledState {
return []BackendEnabledState{BackendEnabledStateDisabled, BackendEnabledStateEnabled}
} | [
0.5971935391426086,
-0.6682714819908142,
0.1668112874031067,
0.6064350605010986,
-0.5228248238563538,
-0.2546200752258301,
-0.5520449876785278,
0.837670624256134,
0.29093867540359497,
-0.01714143715798855,
-0.44317567348480225,
0.5742254853248596,
-0.8511074781417847,
0.3212554156780243,
... |
func PossibleCertificateSourceValues() []CertificateSource {
return []CertificateSource{CertificateSourceAzureKeyVault, CertificateSourceFrontDoor}
} | [
-0.5148938894271851,
0.403812050819397,
0.0005279433098621666,
0.7286999821662903,
-0.36563777923583984,
-0.15626025199890137,
-0.020197849720716476,
0.7307426333427429,
0.065619558095932,
-0.01691129058599472,
-0.9815826416015625,
0.17671285569667816,
0.05471343919634819,
0.65594434738159... |
func PossibleCertificateTypeValues() []CertificateType {
return []CertificateType{CertificateTypeDedicated}
} | [
-0.3299161195755005,
-0.03172094747424126,
0.3270084857940674,
1.2132128477096558,
-0.325270414352417,
0.6064478158950806,
-0.4915775656700134,
0.07772519439458847,
0.04435829073190689,
-0.3774156868457794,
-0.9449532628059387,
0.21315403282642365,
-0.08437424898147583,
1.554573893547058,
... |
func PossibleCustomHTTPSProvisioningStateValues() []CustomHTTPSProvisioningState {
return []CustomHTTPSProvisioningState{CustomHTTPSProvisioningStateDisabled, CustomHTTPSProvisioningStateDisabling, CustomHTTPSProvisioningStateEnabled, CustomHTTPSProvisioningStateEnabling, CustomHTTPSProvisioningStateFailed}
} | [
-0.6003949642181396,
-0.3962452709674835,
0.1685059815645218,
0.5672153234481812,
-0.920763373374939,
0.3718258738517761,
-0.6158468723297119,
0.700174868106842,
1.1030389070510864,
0.44502192735671997,
0.04808086156845093,
-0.5110378861427307,
-0.1002117395401001,
0.32152360677719116,
0... |
func PossibleCustomHTTPSProvisioningSubstateValues() []CustomHTTPSProvisioningSubstate {
return []CustomHTTPSProvisioningSubstate{CustomHTTPSProvisioningSubstateCertificateDeleted, CustomHTTPSProvisioningSubstateCertificateDeployed, CustomHTTPSProvisioningSubstateDeletingCertificate, CustomHTTPSProvisioningSubstateDep... | [
0.2334589958190918,
-0.33769160509109497,
0.48186415433883667,
0.23463483154773712,
-1.0714584589004517,
0.8832610249519348,
-0.12124045193195343,
0.8344976902008057,
0.630412220954895,
-0.5797386765480042,
0.1447044163942337,
0.7471609115600586,
0.09250007569789886,
0.3005872666835785,
... |
func PossibleCustomRuleEnabledStateValues() []CustomRuleEnabledState {
return []CustomRuleEnabledState{CustomRuleEnabledStateDisabled, CustomRuleEnabledStateEnabled}
} | [
1.018993854522705,
-0.9368770122528076,
-0.17233490943908691,
-0.061816923320293427,
-0.39049604535102844,
-0.0943237692117691,
-0.9559318423271179,
1.3003721237182617,
0.7564327120780945,
-0.23465920984745026,
-0.803466260433197,
0.8662771582603455,
-0.26874232292175293,
0.485109716653823... |
func PossibleDynamicCompressionEnabledValues() []DynamicCompressionEnabled {
return []DynamicCompressionEnabled{DynamicCompressionEnabledDisabled, DynamicCompressionEnabledEnabled}
} | [
-0.2683330178260803,
-0.19412288069725037,
0.47091761231422424,
1.5248122215270996,
-0.3438045084476471,
-0.32510697841644287,
0.22602702677249908,
0.3001762628555298,
-0.03904624655842781,
-1.1543642282485962,
-0.9619444608688354,
-0.16521383821964264,
-0.4296165108680725,
1.5754452943801... |
func PossibleEnabledStateValues() []EnabledState {
return []EnabledState{EnabledStateDisabled, EnabledStateEnabled}
} | [
0.2685404121875763,
-0.6269313097000122,
0.07736662775278091,
0.6925517320632935,
-1.1305441856384277,
0.015142160467803478,
-0.8992934823036194,
1.2622190713882446,
0.6710332036018372,
-0.8802823424339294,
-0.5220704078674316,
0.19105933606624603,
-0.16814079880714417,
0.6635079383850098,... |
func PossibleEndpointTypeValues() []EndpointType {
return []EndpointType{EndpointTypeAFD, EndpointTypeATM, EndpointTypeAzureRegion, EndpointTypeCDN}
} | [
-0.4685259759426117,
-0.29167965054512024,
0.4093695878982544,
1.0572770833969116,
0.3073388934135437,
0.5112403035163879,
-1.1229326725006104,
0.021620359271764755,
0.0897238701581955,
0.07681460678577423,
-0.36129477620124817,
-0.3355441987514496,
-0.06952730566263199,
1.0891227722167969... |
func PossibleEnforceCertificateNameCheckEnabledStateValues() []EnforceCertificateNameCheckEnabledState {
return []EnforceCertificateNameCheckEnabledState{EnforceCertificateNameCheckEnabledStateDisabled, EnforceCertificateNameCheckEnabledStateEnabled}
} | [
0.431773841381073,
-0.14948847889900208,
0.304892361164093,
0.7640781998634338,
-0.4343392550945282,
0.42054876685142517,
-0.26850152015686035,
0.5482286810874939,
-0.16798442602157593,
0.10446994006633759,
-1.1586471796035767,
-0.2841057777404785,
-0.6129274964332581,
0.8489218354225159,
... |
func PossibleForwardingProtocolValues() []ForwardingProtocol {
return []ForwardingProtocol{ForwardingProtocolHTTPOnly, ForwardingProtocolHTTPSOnly, ForwardingProtocolMatchRequest}
} | [
-0.5333344340324402,
0.5035524368286133,
0.14273639023303986,
0.5385985970497131,
-1.0264883041381836,
0.7051547169685364,
-0.11530494689941406,
-0.3006608784198761,
-0.40489017963409424,
-0.5338504910469055,
-0.3175651431083679,
0.08158452063798904,
-0.2795412242412567,
0.2418184727430343... |
func PossibleHeaderActionTypeValues() []HeaderActionType {
return []HeaderActionType{HeaderActionTypeAppend, HeaderActionTypeDelete, HeaderActionTypeOverwrite}
} | [
-0.29218757152557373,
-1.298108458518982,
0.5722721815109253,
1.4911226034164429,
0.16141292452812195,
-0.4404138922691345,
0.09378888458013535,
-0.35736602544784546,
0.47423845529556274,
-0.5886931419372559,
-0.4545465409755707,
0.0890471339225769,
0.1817874163389206,
0.9753706455230713,
... |
func PossibleHealthProbeEnabledValues() []HealthProbeEnabled {
return []HealthProbeEnabled{HealthProbeEnabledDisabled, HealthProbeEnabledEnabled}
} | [
0.6883751153945923,
-0.18731510639190674,
0.33489686250686646,
2.1676528453826904,
-0.3320063650608063,
0.9640070796012878,
-0.9037905335426331,
0.8299684524536133,
0.2612156867980957,
-0.15878841280937195,
-0.3378499746322632,
0.4009151756763458,
-0.6859939098358154,
0.899935781955719,
... |
func PossibleHealthProbeMethodValues() []HealthProbeMethod {
return []HealthProbeMethod{HealthProbeMethodGET, HealthProbeMethodHEAD}
} | [
-0.18612094223499298,
0.05130906030535698,
0.30198273062705994,
1.1603477001190186,
0.200468972325325,
-0.0909992903470993,
-0.6579763889312744,
-0.7075681686401367,
-0.267277330160141,
-0.018162434920668602,
0.08727370202541351,
0.02107730694115162,
-0.11997334659099579,
1.106380343437194... |
func PossibleLatencyScorecardAggregationIntervalValues() []LatencyScorecardAggregationInterval {
return []LatencyScorecardAggregationInterval{LatencyScorecardAggregationIntervalDaily, LatencyScorecardAggregationIntervalMonthly, LatencyScorecardAggregationIntervalWeekly}
} | [
-0.3369767963886261,
0.07427510619163513,
0.5624822378158569,
-0.4074750244617462,
0.39910945296287537,
0.3389972448348999,
-0.8351989388465881,
-0.44842198491096497,
-0.18774175643920898,
-0.5820586681365967,
0.9814733862876892,
-0.514675498008728,
0.127874493598938,
0.7279449701309204,
... |
func PossibleManagedRuleEnabledStateValues() []ManagedRuleEnabledState {
return []ManagedRuleEnabledState{ManagedRuleEnabledStateDisabled, ManagedRuleEnabledStateEnabled}
} | [
0.9736706018447876,
-0.8028278946876526,
-0.030212655663490295,
0.07863182574510574,
-0.3137475252151489,
0.4849992096424103,
-1.402564525604248,
1.3466614484786987,
0.7223483324050903,
-0.46505507826805115,
-0.19618023931980133,
0.7100913524627686,
-0.24272485077381134,
1.242458701133728,... |
func PossibleManagedRuleExclusionMatchVariableValues() []ManagedRuleExclusionMatchVariable {
return []ManagedRuleExclusionMatchVariable{ManagedRuleExclusionMatchVariableQueryStringArgNames, ManagedRuleExclusionMatchVariableRequestBodyJSONArgNames, ManagedRuleExclusionMatchVariableRequestBodyPostArgNames, ManagedRuleEx... | [
0.3569243252277374,
-0.13998407125473022,
0.4490760266780853,
0.11971688270568848,
-1.0732368230819702,
0.7587719559669495,
-0.6619059443473816,
0.18253551423549652,
0.242494598031044,
-0.14225775003433228,
-0.14540167152881622,
0.3402702510356903,
-0.7599496245384216,
0.5063780546188354,
... |
func PossibleManagedRuleExclusionSelectorMatchOperatorValues() []ManagedRuleExclusionSelectorMatchOperator {
return []ManagedRuleExclusionSelectorMatchOperator{ManagedRuleExclusionSelectorMatchOperatorContains, ManagedRuleExclusionSelectorMatchOperatorEndsWith, ManagedRuleExclusionSelectorMatchOperatorEquals, ManagedR... | [
-0.09150054305791855,
-0.5761577486991882,
0.4718301296234131,
0.09003343433141708,
-1.6329468488693237,
0.4667610228061676,
-0.34799689054489136,
0.17494432628154755,
0.9816625118255615,
-0.4354134500026703,
0.6229028105735779,
-0.706031858921051,
-0.29568594694137573,
0.03129429370164871... |
func PossibleManagedRuleSetActionTypeValues() []ManagedRuleSetActionType {
return []ManagedRuleSetActionType{ManagedRuleSetActionTypeBlock, ManagedRuleSetActionTypeLog, ManagedRuleSetActionTypeRedirect}
} | [
0.07197637856006622,
-0.8503928184509277,
0.3165125548839569,
0.5775896906852722,
0.17509311437606812,
-0.12028757482767105,
0.08760911971330643,
-0.5792897343635559,
0.9550744891166687,
-0.2348502278327942,
0.5372132062911987,
0.8482789993286133,
0.602924644947052,
0.9649434685707092,
0... |
func PossibleMatchProcessingBehaviorValues() []MatchProcessingBehavior {
return []MatchProcessingBehavior{MatchProcessingBehaviorContinue, MatchProcessingBehaviorStop}
} | [
-0.5782833099365234,
-1.2571552991867065,
0.5897327065467834,
0.5456596612930298,
-0.42503467202186584,
-0.17005103826522827,
0.16695183515548706,
0.16243574023246765,
0.6720758080482483,
0.45348986983299255,
0.2769359350204468,
0.13938899338245392,
0.20067203044891357,
0.20259533822536469... |
func PossibleMatchVariableValues() []MatchVariable {
return []MatchVariable{MatchVariableCookies, MatchVariablePostArgs, MatchVariableQueryString, MatchVariableRemoteAddr, MatchVariableRequestBody, MatchVariableRequestHeader, MatchVariableRequestMethod, MatchVariableRequestURI, MatchVariableSocketAddr}
} | [
-0.8191937208175659,
-0.6499608755111694,
0.5674816370010376,
0.22852255403995514,
-0.9557506442070007,
-0.11841074377298355,
-0.7194100022315979,
-0.1866738349199295,
-0.2294529378414154,
-0.3682711124420166,
-0.9761170148849487,
0.3916889727115631,
-0.3767826557159424,
0.1672374308109283... |
func PossibleMinimumTLSVersionValues() []MinimumTLSVersion {
return []MinimumTLSVersion{MinimumTLSVersionOneFullStopTwo, MinimumTLSVersionOneFullStopZero}
} | [
-0.4869658648967743,
-1.1340234279632568,
0.26506197452545166,
0.8017714023590088,
-1.256537675857544,
0.5976423621177673,
-1.050750970840454,
-0.5276473760604858,
0.4445513188838959,
-0.403627872467041,
-1.153336763381958,
-0.6609417796134949,
-0.1849040538072586,
1.034622311592102,
-0.... |
func PossibleNetworkExperimentResourceStateValues() []NetworkExperimentResourceState {
return []NetworkExperimentResourceState{NetworkExperimentResourceStateCreating, NetworkExperimentResourceStateDeleting, NetworkExperimentResourceStateDisabled, NetworkExperimentResourceStateDisabling, NetworkExperimentResourceStateE... | [
0.11233970522880554,
-0.23988120257854462,
0.10387585312128067,
0.01870563253760338,
-0.7842870354652405,
0.5680285096168518,
-0.12609058618545532,
0.15461596846580505,
0.538558840751648,
-0.15830272436141968,
0.1215745359659195,
-1.5183402299880981,
-0.6254040002822876,
0.9503097534179688... |
func PossibleNetworkOperationStatusValues() []NetworkOperationStatus {
return []NetworkOperationStatus{NetworkOperationStatusFailed, NetworkOperationStatusInProgress, NetworkOperationStatusSucceeded}
} | [
-0.6220249533653259,
-0.1449493169784546,
0.16469819843769073,
0.7499174475669861,
-0.5587107539176941,
0.8142127394676208,
0.001657021464779973,
-0.20069801807403564,
-0.03503645583987236,
-0.3249551057815552,
-0.8992193937301636,
-1.4961369037628174,
0.15783004462718964,
0.79944354295730... |
func PossibleOdataTypeValues() []OdataType {
return []OdataType{OdataTypeMicrosoftAzureFrontDoorModelsFrontdoorForwardingConfiguration, OdataTypeMicrosoftAzureFrontDoorModelsFrontdoorRedirectConfiguration, OdataTypeRouteConfiguration}
} | [
-0.6276770234107971,
0.2746094763278961,
0.26094841957092285,
0.46457725763320923,
0.0563223734498024,
0.2326473742723465,
-0.17745116353034973,
-0.02663656696677208,
0.30956530570983887,
-0.19667229056358337,
-0.9409214854240417,
0.6068323254585266,
1.0388964414596558,
1.5293508768081665,... |
func PossibleOperatorValues() []Operator {
return []Operator{OperatorAny, OperatorBeginsWith, OperatorContains, OperatorEndsWith, OperatorEqual, OperatorGeoMatch, OperatorGreaterThan, OperatorGreaterThanOrEqual, OperatorIPMatch, OperatorLessThan, OperatorLessThanOrEqual, OperatorRegEx}
} | [
-0.8954837918281555,
-0.8741087317466736,
0.2224883884191513,
0.8839964270591736,
-1.3912478685379028,
-0.1075289323925972,
-0.09483188390731812,
0.013245892710983753,
0.25892406702041626,
-1.0211350917816162,
-0.6899998784065247,
-0.26470229029655457,
-0.26748594641685486,
1.0344631671905... |
func PossiblePolicyEnabledStateValues() []PolicyEnabledState {
return []PolicyEnabledState{PolicyEnabledStateDisabled, PolicyEnabledStateEnabled}
} | [
0.2057523876428604,
-1.0548533201217651,
0.1777026504278183,
0.6007294058799744,
-0.8131041526794434,
1.137674331665039,
-1.3020721673965454,
1.111267328262329,
0.7736639976501465,
-0.5068278908729553,
-0.6802592873573303,
0.15793678164482117,
-0.6282952427864075,
0.3761507570743561,
0.4... |
func PossiblePolicyModeValues() []PolicyMode {
return []PolicyMode{PolicyModeDetection, PolicyModePrevention}
} | [
-0.8409749865531921,
-0.2380015254020691,
0.2548566460609436,
0.8862318992614746,
0.07917118072509766,
0.9653644561767578,
-1.249546766281128,
0.3298311233520508,
0.6318990588188171,
-0.06081702932715416,
-1.09302818775177,
0.37767213582992554,
0.3238286077976227,
0.4470895528793335,
0.1... |
func PossiblePolicyRequestBodyCheckValues() []PolicyRequestBodyCheck {
return []PolicyRequestBodyCheck{PolicyRequestBodyCheckDisabled, PolicyRequestBodyCheckEnabled}
} | [
-0.5076736211776733,
-0.8900021910667419,
0.30028942227363586,
1.289700984954834,
-0.21150057017803192,
2.134390115737915,
-1.6912134885787964,
0.15518240630626678,
0.9211674332618713,
-0.817458987236023,
-0.2576259672641754,
0.19192448258399963,
-0.36940470337867737,
1.2005683183670044,
... |
func PossiblePolicyResourceStateValues() []PolicyResourceState {
return []PolicyResourceState{PolicyResourceStateCreating, PolicyResourceStateDeleting, PolicyResourceStateDisabled, PolicyResourceStateDisabling, PolicyResourceStateEnabled, PolicyResourceStateEnabling}
} | [
0.261393278837204,
-0.8951816558837891,
-0.08446405082941055,
-0.16400228440761566,
-0.5946518182754517,
0.7548162937164307,
-0.618367612361908,
0.2920660078525543,
1.2724770307540894,
-0.31363341212272644,
-0.39360925555229187,
-0.8271624445915222,
-0.45588842034339905,
0.3373346328735351... |
func PossiblePrivateEndpointStatusValues() []PrivateEndpointStatus {
return []PrivateEndpointStatus{PrivateEndpointStatusApproved, PrivateEndpointStatusDisconnected, PrivateEndpointStatusPending, PrivateEndpointStatusRejected, PrivateEndpointStatusTimeout}
} | [
-0.6976545453071594,
-0.4068804979324341,
0.22491683065891266,
0.12516085803508759,
0.07952538132667542,
0.5462111830711365,
-1.1147682666778564,
-0.08219490945339203,
0.38283610343933105,
-0.4442308247089386,
-0.6937366127967834,
0.16919328272342682,
0.04223095625638962,
0.467735707759857... |
func PossibleProtocolValues() []Protocol {
return []Protocol{ProtocolHTTP, ProtocolHTTPS}
} | [
-0.6476072072982788,
-0.17023485898971558,
0.18120896816253662,
1.0403201580047607,
-0.8913366198539734,
0.8288028240203857,
-1.0270174741744995,
0.04278977960348129,
-0.05449238419532776,
-0.8132110834121704,
-0.9506774544715881,
0.2548515498638153,
-0.3487771451473236,
0.5862268209457397... |
func PossibleQueryValues() []Query {
return []Query{QueryStripAll, QueryStripAllExcept, QueryStripNone, QueryStripOnly}
} | [
0.16358955204486847,
-0.30845174193382263,
0.3739180266857147,
0.9444699287414551,
-1.4906730651855469,
0.5925891399383545,
-1.199548363685608,
0.9004666805267334,
0.28404465317726135,
-0.68724125623703,
-0.1095128059387207,
0.06475648283958435,
0.6920966506004333,
1.0738272666931152,
-0... |
func PossibleRedirectProtocolValues() []RedirectProtocol {
return []RedirectProtocol{RedirectProtocolHTTPOnly, RedirectProtocolHTTPSOnly, RedirectProtocolMatchRequest}
} | [
-0.8682193160057068,
-0.3266930878162384,
0.47015249729156494,
0.7137106657028198,
-0.6579437255859375,
1.500599980354309,
0.33280766010284424,
-0.6553844213485718,
0.5039270520210266,
-0.4990672171115875,
-0.4658525884151459,
0.7993408441543579,
-0.22620141506195068,
-0.10749480873346329,... |
func PossibleRedirectTypeValues() []RedirectType {
return []RedirectType{RedirectTypeFound, RedirectTypeMoved, RedirectTypePermanentRedirect, RedirectTypeTemporaryRedirect}
} | [
-0.8007177114486694,
-0.5517246723175049,
0.46001526713371277,
0.7390848994255066,
-0.15494877099990845,
0.5140758156776428,
0.5620760917663574,
-0.5867461562156677,
1.0581650733947754,
-0.2821042537689209,
-0.33435967564582825,
0.667390763759613,
0.04756675660610199,
0.8051003813743591,
... |
func PossibleResourceStateValues() []ResourceState {
return []ResourceState{ResourceStateCreating, ResourceStateDeleting, ResourceStateDisabled, ResourceStateDisabling, ResourceStateEnabled, ResourceStateEnabling}
} | [
0.02979210950434208,
-0.46673375368118286,
-0.027050690725445747,
0.16221736371517181,
-0.5348742008209229,
0.2700437903404236,
-0.3015802502632141,
0.3204548954963684,
0.6820771098136902,
-0.2577763795852661,
-0.3678290843963623,
-0.4332742691040039,
-0.24008743464946747,
0.45072072744369... |
func PossibleResourceTypeValues() []ResourceType {
return []ResourceType{ResourceTypeMicrosoftNetworkfrontDoors, ResourceTypeMicrosoftNetworkfrontDoorsfrontendEndpoints}
} | [
0.5387282967567444,
-0.1634405106306076,
-0.09742125868797302,
0.6065271496772766,
-0.1438743770122528,
0.0657779723405838,
-0.22613604366779327,
-0.6260034441947937,
0.3815901279449463,
-0.503662109375,
-0.1689082384109497,
-0.4965085983276367,
0.057827793061733246,
1.671970248222351,
-... |
func PossibleRoutingRuleEnabledStateValues() []RoutingRuleEnabledState {
return []RoutingRuleEnabledState{RoutingRuleEnabledStateDisabled, RoutingRuleEnabledStateEnabled}
} | [
-0.13557082414627075,
-0.43635833263397217,
0.19942019879817963,
0.18275335431098938,
-0.17507264018058777,
0.5447857975959778,
-1.0034884214401245,
1.5760223865509033,
0.6179752349853516,
-0.02840900607407093,
-0.5797414779663086,
0.018846023827791214,
-0.4568954110145569,
0.6688275933265... |
func PossibleRulesEngineMatchVariableValues() []RulesEngineMatchVariable {
return []RulesEngineMatchVariable{RulesEngineMatchVariableIsMobile, RulesEngineMatchVariablePostArgs, RulesEngineMatchVariableQueryString, RulesEngineMatchVariableRemoteAddr, RulesEngineMatchVariableRequestBody, RulesEngineMatchVariableRequestF... | [
-0.23094521462917328,
-1.0476651191711426,
0.6023762226104736,
0.1853954792022705,
0.1676889955997467,
0.4295254051685333,
-0.5195323824882507,
0.1607351154088974,
-0.6552250981330872,
-0.34916701912879944,
-0.21203041076660156,
0.3499411344528198,
0.1999003291130066,
0.5807766914367676,
... |
func PossibleRulesEngineOperatorValues() []RulesEngineOperator {
return []RulesEngineOperator{RulesEngineOperatorAny, RulesEngineOperatorBeginsWith, RulesEngineOperatorContains, RulesEngineOperatorEndsWith, RulesEngineOperatorEqual, RulesEngineOperatorGeoMatch, RulesEngineOperatorGreaterThan, RulesEngineOperatorGreate... | [
-0.7711912989616394,
-0.7683650851249695,
0.33934804797172546,
0.4632694125175476,
-0.4731387794017792,
0.3200302720069885,
-0.0629589632153511,
-0.027059422805905342,
-0.07438956946134567,
-0.6336028575897217,
-0.08899836242198944,
-0.6247447729110718,
-0.08646447211503983,
0.723394453525... |
func PossibleRuleTypeValues() []RuleType {
return []RuleType{RuleTypeMatchRule, RuleTypeRateLimitRule}
} | [
-0.17652761936187744,
-0.22228050231933594,
0.15802662074565887,
1.3696281909942627,
0.5784735083580017,
0.0892305076122284,
-0.6094217300415039,
0.11529840528964996,
-0.08533115684986115,
0.1460219770669937,
-0.30121758580207825,
0.9519185423851013,
-0.2929171025753021,
1.050595998764038,... |
func PossibleSessionAffinityEnabledStateValues() []SessionAffinityEnabledState {
return []SessionAffinityEnabledState{SessionAffinityEnabledStateDisabled, SessionAffinityEnabledStateEnabled}
} | [
0.38853415846824646,
-1.5658535957336426,
0.4236204922199249,
0.7262338995933533,
-0.92990642786026,
-0.4125232398509979,
0.135931596159935,
0.8219338059425354,
1.6996508836746216,
-0.036402273923158646,
-0.19795791804790497,
0.4325501024723053,
0.531819760799408,
0.6801013946533203,
0.9... |
func PossibleSkuNameValues() []SkuName {
return []SkuName{SkuNameClassicAzureFrontDoor, SkuNamePremiumAzureFrontDoor, SkuNameStandardAzureFrontDoor}
} | [
-1.1501678228378296,
-0.34201133251190186,
0.2616899311542511,
1.2415556907653809,
-1.1632421016693115,
0.01835716888308525,
-0.4823133051395416,
1.0654537677764893,
0.43353116512298584,
0.06481704860925674,
-0.4780721962451935,
1.0369434356689453,
0.29672959446907043,
0.9702155590057373,
... |
func PossibleStateValues() []State {
return []State{StateDisabled, StateEnabled}
} | [
-0.20961815118789673,
-0.21439535915851593,
0.3022787272930145,
0.8798224925994873,
-1.1674305200576782,
0.2871910631656647,
-1.010859489440918,
1.3328684568405151,
0.5961295366287231,
-0.24913835525512695,
-0.8169196844100952,
-0.18907277286052704,
-0.04622454196214676,
0.499947726726532,... |
func PossibleTimeseriesAggregationIntervalValues() []TimeseriesAggregationInterval {
return []TimeseriesAggregationInterval{TimeseriesAggregationIntervalDaily, TimeseriesAggregationIntervalHourly}
} | [
-0.7725541591644287,
-0.1396465301513672,
0.1483028382062912,
0.08261359483003616,
0.046579692512750626,
0.500175416469574,
-0.041927747428417206,
-0.3369438648223877,
-0.3410426676273346,
-0.14134380221366882,
1.212174415588379,
-0.4307612180709839,
0.6961408853530884,
0.7761154174804688,... |
func PossibleTimeseriesTypeValues() []TimeseriesType {
return []TimeseriesType{TimeseriesTypeLatencyP50, TimeseriesTypeLatencyP75, TimeseriesTypeLatencyP95, TimeseriesTypeMeasurementCounts}
} | [
-0.6520280838012695,
-0.16867588460445404,
0.10653429478406906,
0.5439723134040833,
0.2205636352300644,
0.4208335280418396,
-0.6740878820419312,
-0.6698434352874756,
0.34373122453689575,
0.034696031361818314,
-0.9385746717453003,
-0.12686972320079803,
0.029075749218463898,
1.04976832866668... |
func PossibleTransformValues() []Transform {
return []Transform{TransformLowercase, TransformRemoveNulls, TransformTrim, TransformUppercase, TransformURLDecode, TransformURLEncode}
} | [
-0.20776647329330444,
-0.490597665309906,
0.28882819414138794,
0.0688057690858841,
-0.27381908893585205,
-0.11681858450174332,
-0.9213923215866089,
0.3363119959831238,
0.8183615207672119,
-1.3459997177124023,
-1.6051273345947266,
0.5817943215370178,
0.1864464282989502,
1.2737458944320679,
... |
func PossibleTransformTypeValues() []TransformType {
return []TransformType{TransformTypeLowercase, TransformTypeRemoveNulls, TransformTypeTrim, TransformTypeUppercase, TransformTypeURLDecode, TransformTypeURLEncode}
} | [
-0.08697357028722763,
-0.48421239852905273,
0.3989826738834381,
0.3357977867126465,
0.2830946147441864,
-0.37360697984695435,
-0.38930463790893555,
-0.06745172291994095,
0.6937541365623474,
-0.5777130722999573,
-1.514298677444458,
0.42602118849754333,
-0.10911601781845093,
1.71455180644989... |
func main() {
fs, _ := ioutil.ReadDir("gen/")
out, _ := os.Create("assets/assets.go")
defer func() {
err := out.Close()
if err != nil {
log.Printf("Error closing assets file: %s", err)
}
}()
_, err := out.Write([]byte("// Code generated by include_assets.go. DO NOT EDIT.\n\n"))
if err != nil {
log.Fat... | [
0.557062029838562,
0.11784810572862625,
1.4411046504974365,
0.04860950633883476,
-0.357749342918396,
1.0050212144851685,
1.4927328824996948,
0.1732407510280609,
-0.6733370423316956,
0.40311363339424133,
0.4802597761154175,
-0.06411236524581909,
0.20593075454235077,
-0.5450946688652039,
-... |
func NewAccountResource(store AccountStore) *AccountResource {
return &AccountResource{
Store: store,
}
} | [
-0.06315140426158905,
-0.5534352660179138,
0.004711146932095289,
0.748092770576477,
-1.6290203332901,
-0.4950273334980011,
0.30297303199768066,
1.0824472904205322,
1.2853256464004517,
0.7799155712127686,
0.165383979678154,
0.26591956615448,
0.31258001923561096,
0.20203012228012085,
-0.20... |
func corsHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
setCors(w)
} | [
-0.1823185533285141,
-0.6529764533042908,
0.29694128036499023,
-0.06813769787549973,
-0.573106586933136,
0.3614775836467743,
0.49520546197891235,
0.3750157058238983,
0.010002939961850643,
0.30445626378059387,
0.3369152843952179,
-0.44063523411750793,
-0.4532776474952698,
0.0274246223270893... |
func Zbdsqr(uplo mat.MatUplo, n, ncvt, nru, ncc int, d, e *mat.Vector, vt, u, c *mat.CMatrix, rwork *mat.Vector) (info int, err error) {
var lower, rotate bool
var abse, abss, cosl, cosr, cs, eps, f, g, h, hndrd, hndrth, meigth, mu, negone, oldcs, oldsn, one, r, shift, sigmn, sigmx, sinl, sinr, sll, smax, smin, sminl... | [
-0.15905071794986725,
0.004718191921710968,
0.8745429515838623,
-0.22491095960140228,
-0.44784075021743774,
-0.12404748052358627,
0.29324468970298767,
-0.8516372442245483,
-0.16948248445987701,
-0.3812706470489502,
0.5467122793197632,
0.013934137299656868,
-0.5798811912536621,
0.8270861506... |
func main () {
startGame() // start the game
} | [
1.056037187576294,
-0.2334410548210144,
0.4396863579750061,
1.6405441761016846,
0.6601417064666748,
1.0209176540374756,
0.5191874504089355,
1.2536067962646484,
-0.854404091835022,
0.8048094511032104,
0.07473911345005035,
0.2409001886844635,
-0.6240542531013489,
0.07109658420085907,
-0.43... |
func startGame(){
//-------------------------------------
// Declaring Variables
//-------------------------------------
var (
listOfNumbers [6]int // array of numbers for the game
positionCursor = 0 // position of the cursor
numberOfGoes = 0 // number of valid commands t... | [
0.4454464316368103,
-0.14049869775772095,
1.133838176727295,
1.1010103225708008,
-0.012161411345005035,
0.7246226668357849,
0.520919680595398,
-0.025744622573256493,
0.19022803008556366,
0.17335882782936096,
0.0019754422828555107,
-0.12022041529417038,
-0.3401215672492981,
0.64922010898590... |
func displayGameHeader(){
fmt.Printf("\n ------------------------ ")
fmt.Printf("\n ")
fmt.Printf("\n THE PALINDROME GAME ")
fmt.Printf("\n ")
fmt.Printf("\n ------------------------ ")
fmt.Printf("\n ... | [
0.7476679682731628,
-0.4978242814540863,
1.7283616065979004,
-0.6416776180267334,
-0.3920695185661316,
0.9633759260177612,
0.35303398966789246,
-0.3707440197467804,
-0.8865439891815186,
0.6561844348907471,
-0.10799911618232727,
0.6674675941467285,
-0.835635781288147,
0.7227087020874023,
... |
func displayState ( listOfNumbers [6]int , cursorValue int,numberDigits int, numberOfGoes int) {
fmt.Printf("\n\n\t\t\tGame State ") // print to console
fmt.Printf("\n ---------------------------------\n\n") // line break to split content
fmt.Printf("< ") ... | [
0.1479114592075348,
-0.5208345651626587,
1.3200442790985107,
-0.5573796629905701,
-0.520257830619812,
0.4825979471206665,
0.99004727602005,
-0.0061500477604568005,
-0.0407041534781456,
0.4925345778465271,
-0.18129028379917145,
0.29265329241752625,
-0.010669050738215446,
0.722678005695343,
... |
func moveCursorRight( positionCursor *int, numberDigits int, listOfNumbers [6]int) {
if *positionCursor == numberDigits-1 { // Scenario 1: position of cursor at the end of list
*positionCursor = 0 // set it to the beginning
positionCursor = &listOfNumbers[0] // sets address of position to be that of... | [
-0.23492027819156647,
-0.5313853621482849,
0.6636067628860474,
0.5684040784835815,
0.23437821865081787,
-0.7377315759658813,
0.0006249947473406792,
0.2762368619441986,
0.6647568941116333,
0.8912767171859741,
-0.7014689445495605,
0.11870629340410233,
-0.9462153911590576,
0.7440466284751892,... |
func moveCursorLeft(positionCursor *int, numberDigits int,listOfNumbers [6]int) {
if *positionCursor == 0 { // Scenario 1: position of cursor at the beginning of list
*positionCursor=numberDigits-1 // set it to the end
positionCursor = &listOfNumbers[numberDigits-1] // sets address of position to b... | [
0.3673686385154724,
-0.9154698848724365,
0.4983859360218048,
0.09171203523874283,
0.2928638756275177,
-0.37790045142173767,
0.1462511420249939,
0.6816774010658264,
1.3189867734909058,
0.9053102731704712,
-0.6703314781188965,
-0.2054423689842224,
-0.32451361417770386,
0.9130563139915466,
... |
func incrementDigitInListAtPos( numberAtCursor *int ) {
if *numberAtCursor == 9 { // Scenario 1: Value is 9
*numberAtCursor = 0 // resets value at position to 0
} else { // Scenario 2: value not 9
*numberAtCursor++ // increments value by one
}
} | [
-0.7326209545135498,
0.09104456007480621,
0.47535476088523865,
0.19993442296981812,
-0.47927793860435486,
-0.014257312752306461,
0.24527345597743988,
0.2878487706184387,
0.3090969920158386,
-0.09878583997488022,
-1.0064232349395752,
-0.1703736037015915,
-0.28472939133644104,
0.780838608741... |
func decrementDigitInListAtPos( numberAtCursor *int ) {
if *numberAtCursor == 0 { // Scenario 1: Value is 0
*numberAtCursor = 9 // resets value at position to 9
} else { // Scenario 2: value not 0
*numberAtCursor-- // decrements value by one
}
} | [
-0.41490501165390015,
-0.101582832634449,
0.5589450597763062,
0.24013707041740417,
-0.2051558941602707,
-0.2107604444026947,
0.43330812454223633,
0.6681492924690247,
0.11018220335245132,
-0.182571142911911,
-0.7694722414016724,
-0.42817986011505127,
-0.5775037407875061,
1.107576608657837,
... |
func getCommand( )*string {
var inputCommand string // define variable to store inputCommand
fmt.Scanln(&inputCommand) // stores character from user
return &inputCommand // returns users character
} | [
0.16101963818073273,
-1.042698860168457,
0.6974907517433167,
0.48507922887802124,
-0.3620266318321228,
0.41464024782180786,
0.3038720190525055,
-0.8370235562324524,
0.6976278424263,
-1.2140766382217407,
0.08600452542304993,
0.7983447909355164,
-0.3117798864841461,
-0.4094501733779907,
0.... |
func processCommand(command *string, listOfNumbers *[6]int, positionCursor *int, numberOfGoes *int, numberDigits int) {
if *command == "w" { // Scenario 1: User enters w
incrementDigitInListAtPos(&listOfNumbers[*positionCursor]) // increases number
*numberOfGoes += 1 // increase num... | [
0.004888677038252354,
-0.133700430393219,
1.0389994382858276,
0.3512198030948639,
-0.01146745402365923,
-0.060429126024246216,
0.7589799761772156,
0.3442133069038391,
0.40608808398246765,
0.058203890919685364,
0.03283508121967316,
0.08643496036529541,
0.10242491960525513,
0.966627299785614... |
func isPalindrome(listOfNumbers [6]int,numberDigits int ) bool {
isValid := true // initiate return value
for i := 0 ; i < numberDigits ; i++ { // loop through array size
if listOfNumbers[i] != listOfNumbers[(numberDigits -... | [
0.30407407879829407,
-0.27821028232574463,
0.6236377954483032,
0.37553665041923523,
-0.02793816849589348,
0.43604469299316406,
-0.5634372234344482,
0.4408775866031647,
1.330588698387146,
0.18912534415721893,
-0.21553516387939453,
0.34348347783088684,
-1.5411930084228516,
0.4739186465740204... |
func userWon( numberOfGoes *int){
fmt.Printf("\n")
fmt.Printf("\n*--------------------------------*")
fmt.Printf("\n* Congratulations You Won! *")
fmt.Printf("\n*--------------------------------*")
fmt.Printf("\n\n You took a total number of %d goes to create the palindrome!\n\n", *numberOfGoes)
} | [
0.7798537015914917,
0.014180086553096771,
1.0507034063339233,
-0.1234302744269371,
-0.6814205646514893,
0.7947413325309753,
0.8212427496910095,
0.15101851522922516,
-0.8936121463775635,
-0.6591798663139343,
-1.0800293684005737,
1.3163467645645142,
0.28976452350616455,
0.03617959842085838,
... |
func randomizeCursorPosition( positionCursor *int, numberDigits int) {
rand.Seed(time.Now().UTC().UnixNano()) // seeds rand by time to varey each time program runs
*positionCursor = rand.Intn(numberDigits) // set position of the cursor to random number between 0 - 6
} | [
0.08336833864450455,
-0.44172900915145874,
0.3724168837070465,
-0.3360587954521179,
0.3315666615962982,
0.1194218173623085,
0.17621953785419464,
0.5514475703239441,
0.6420828700065613,
0.4191194176673889,
-0.2683355510234833,
-0.05060852691531181,
-0.8380322456359863,
0.16761618852615356,
... |
func createRandomList( listOfNumbers [6]int, numberDigits int) [6]int {
rand.Seed(time.Now().UTC().UnixNano()) // seeds rand by time to varey each time program runs
for i := 0 ; i < numberDigits ; i++ { // loop through list
listOfNumbers[i] = rand.Intn(9) // set element in list to random number betw... | [
0.28196826577186584,
-0.2823949456214905,
0.4169410169124603,
-0.20430982112884521,
0.5362309813499451,
0.6845234036445618,
-0.504764974117279,
0.05145535618066788,
1.1870259046554565,
0.5353477001190186,
-0.4240204393863678,
-0.27440157532691956,
-0.042220596224069595,
0.7401123642921448,... |
func tryExpandPath(path string) string {
if expanded, err := homedir.Expand(path); nil == err {
path = expanded
}
return path
} | [
0.38528743386268616,
0.4321955144405365,
0.6663554310798645,
0.888744592666626,
-0.5613740682601929,
0.45691025257110596,
0.20163580775260925,
-1.292704463005066,
0.9242165088653564,
-0.6050944924354553,
0.7581228017807007,
-0.8854178190231323,
-0.6181541085243225,
0.20541709661483765,
0... |
func get(url string) (*http.Response, error) {
resp, err := http.Get(url)
if err != nil {
return nil, err
}
if resp.StatusCode != http.StatusOK {
resp.Body.Close()
return nil, fmt.Errorf("get failed: %s\n", resp.Status)
}
return resp, nil
} | [
-0.6639442443847656,
-0.4708919823169708,
0.5992981791496277,
-0.706075131893158,
-0.09215104579925537,
0.2077094167470932,
-0.5684766173362732,
-0.26846128702163696,
-0.1581924557685852,
-0.058687806129455566,
-0.23179098963737488,
0.5361649394035339,
-0.5937497019767761,
-0.4822356998920... |
func GetIssue(owner, repo string, params map[string]string, issueN int) (*Issue, error) {
url := APIURL + strings.Join([]string{"repos", owner, repo, "issues", strconv.Itoa(issueN)}, "/")
url += "?"
for k, v := range params {
url += k + "=" + v
}
resp, err := get(url)
if err != nil {
return nil, err
}
var... | [
-1.022385835647583,
0.20642784237861633,
0.8227970600128174,
0.5372059345245361,
1.3148070573806763,
-1.0341044664382935,
-0.8865194320678711,
-0.29938003420829773,
-0.4052158296108246,
-0.03951260820031166,
0.09180135279893875,
0.26380103826522827,
-0.707060694694519,
0.1153038889169693,
... |
func GetIssues(owner, repo string, params map[string]string) (*IssuesList, error) {
url := APIURL + strings.Join([]string{"repos", owner, repo, "issues"}, "/")
url += "?"
for k, v := range params {
url += k + "=" + v
}
resp, err := get(url)
if err != nil {
return nil, err
}
var result IssuesList
if err ... | [
-1.1465821266174316,
0.35509276390075684,
0.6758987307548523,
0.08444775640964508,
1.3085275888442993,
-0.36348220705986023,
-0.8454121351242065,
-0.21790048480033875,
-0.3201547861099243,
0.46781373023986816,
-0.17187616229057312,
0.0052363015711307526,
-0.6818995475769043,
0.536162436008... |
func (do *DecodedOperand) AbsoluteAddress(runtimeAddress uint64) (uint64, error) {
var resultAddress C.ZyanU64
ret := C.ZydisCalcAbsoluteAddress(
do.instr.zdi,
do.zdo,
C.ZyanU64(runtimeAddress),
&resultAddress,
)
if zyanFailure(ret) {
return 0, fmt.Errorf("zydis: failed to compute absolute address: 0x%x",... | [
-0.7309581637382507,
-0.17769365012645721,
0.7331032752990723,
0.17572154104709625,
-0.3871595859527588,
-0.3196937143802643,
0.4346780478954315,
-0.26920562982559204,
0.6294659376144409,
-0.3226311206817627,
0.466952919960022,
0.99966961145401,
-0.41284748911857605,
0.4971526265144348,
... |
func (do *DecodedOperand) AbsoluteAddressWithContext(runtimeAddress uint64, context RegisterContext) (uint64, error) {
var rctx C.ZydisRegisterContext
for reg, val := range context {
rctx.values[reg] = C.ZyanU64(val)
}
var resultAddress C.ZyanU64
ret := C.ZydisCalcAbsoluteAddressEx(
do.instr.zdi,
do.zdo,
C... | [
-0.7576415538787842,
-0.23909667134284973,
0.7212929129600525,
0.20172788202762604,
-0.5414877533912659,
-0.492618590593338,
0.25735917687416077,
-0.5912631750106812,
1.1778815984725952,
0.18468983471393585,
-0.013829737901687622,
0.6298303008079529,
-0.38960739970207214,
0.431520193815231... |
func CheckVersion(ctx context.Context) error {
_, err := executeFastCommand(ctx, "version")
if err != nil {
return fmt.Errorf(
"failed to execute \"docker version\":\n\t%s\n\n'src batch' requires \"docker\" to be available.",
err,
)
}
return nil
} | [
0.14426599442958832,
0.2616642117500305,
0.6201929450035095,
1.159203290939331,
0.9600577354431152,
0.5712715983390808,
0.2837526500225067,
0.4667193591594696,
-0.5628644227981567,
0.5742223262786865,
0.004692956805229187,
0.35623401403427124,
-0.10147267580032349,
1.478886604309082,
0.0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.