text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func Check(t *testing.T, depth interface{}, liquidity, value float64, nodeCount int) {
t.Helper()
b, isBid := depth.(bids)
a, isAsk := depth.(asks)
var ll linkedList
switch {
case isBid:
ll = b.linkedList
case isAsk:
ll = a.linkedList
default:
t.Fatal("value passed in is not of type bids or asks")
}
l... | [
-0.07536554336547852,
0.34017589688301086,
0.8599100112915039,
0.0008202637545764446,
0.37015751004219055,
0.2663751542568207,
0.47673293948173523,
-0.3954535126686096,
-0.1708063781261444,
0.4604650139808655,
0.9705473184585571,
0.6227473616600037,
0.00646962970495224,
0.4630768597126007,... |
func NewTextBlock(text string) *TextBlock {
t := &TextBlock{currentText: text, cache: Stack{}}
return t
} | [
0.23697273433208466,
-0.1854054480791092,
-0.03380380943417549,
-0.2435058057308197,
-1.2978732585906982,
-0.22280637919902802,
-0.5181637406349182,
-0.15282420814037323,
-0.14732494950294495,
0.30364179611206055,
-1.2718758583068848,
0.11763768643140793,
-0.7466123104095459,
0.48736757040... |
func (t *TextBlock) ChangeText(newText string) {
t.cache.Push(t.currentText)
t.currentText = newText
} | [
-0.3334338665008545,
-0.2723085582256317,
0.38988301157951355,
-0.1317078173160553,
-0.6305020451545715,
0.26960575580596924,
-0.3938905596733093,
0.6791825294494629,
-0.16034114360809326,
1.317466378211975,
-1.3296599388122559,
0.6375554203987122,
-1.3145723342895508,
0.626908004283905,
... |
func (t *TextBlock) Undo() {
if t.cache.Len() > 0 {
t.currentText = t.cache.Pop()
return
}
fmt.Println("Cache is empty")
} | [
0.18541856110095978,
-0.6321455836296082,
0.722179114818573,
-0.7365443110466003,
-0.6608303785324097,
0.44030067324638367,
0.31494635343551636,
2.0174717903137207,
-0.6462234258651733,
0.932581901550293,
-0.510106086730957,
0.67498779296875,
-0.9549875259399414,
0.14923131465911865,
-0.... |
func NewMetadataLookup(executeCtx *flow.StorageExecuteContext, database tsdb.Database) Operator {
return &metadataLookup{
database: database,
metadata: database.Metadata().MetadataDatabase(),
executeCtx: executeCtx,
fields: make(map[field.ID]*aggregation.Aggregator),
}
} | [
-0.43331292271614075,
0.5430132746696472,
0.41837289929389954,
-0.3606114685535431,
-0.5233211517333984,
0.15319447219371796,
-0.4717845618724823,
0.32293975353240967,
-0.7952572703361511,
1.3162370920181274,
0.6477929949760437,
-0.0053158472292125225,
0.4208221137523651,
-0.66880929470062... |
func (op *metadataLookup) Execute() error {
// metric name => id, like table name
query := op.executeCtx.Query
metricID, err := op.metadata.GetMetricID(query.Namespace, query.MetricName)
if err != nil {
return err
}
op.executeCtx.MetricID = metricID
op.executeCtx.TagKeys = make(map[string]tag.KeyID)
if err ... | [
-0.770164430141449,
0.5146726369857788,
0.7817714214324951,
0.1998615860939026,
0.7050555348396301,
0.7744859457015991,
-0.11105138063430786,
-0.4584777057170868,
-1.1101454496383667,
1.2469786405563354,
0.6010806560516357,
-0.7452268004417419,
0.175127312541008,
-0.7525169253349304,
-0.... |
func (op *metadataLookup) groupBy() error {
groupBy := op.executeCtx.Query.GroupBy
lengthOfGroupByTagKeys := len(groupBy)
if lengthOfGroupByTagKeys == 0 {
return nil
}
op.executeCtx.GroupByTags = make(tag.Metas, lengthOfGroupByTagKeys)
op.executeCtx.GroupByTagKeyIDs = make([]tag.KeyID, lengthOfGroupByTagKeys)
... | [
-0.550559937953949,
0.3953140676021576,
0.7428235411643982,
-0.18490828573703766,
0.44676584005355835,
-0.5265302658081055,
0.2865436375141144,
-0.8239256143569946,
-0.7260522842407227,
1.0259511470794678,
0.5442827343940735,
0.19081300497055054,
0.057608041912317276,
0.39566248655319214,
... |
func (op *metadataLookup) buildField() {
lengthOfFields := len(op.fields)
op.executeCtx.Fields = make(field.Metas, lengthOfFields)
idx := 0
for fieldID := range op.fields {
f := op.fields[fieldID]
op.executeCtx.Fields[idx] = field.Meta{
ID: fieldID,
Type: f.DownSampling.GetFieldType(),
Name: f.DownS... | [
-0.49788767099380493,
0.5399171113967896,
0.5998256802558899,
-0.8075968623161316,
0.48529884219169617,
0.3035324215888977,
0.5736538171768188,
-0.06136733666062355,
-0.49846526980400085,
0.2924416959285736,
0.7804492712020874,
-0.15354134142398834,
0.21408690512180328,
-0.7594726085662842... |
func (op *metadataLookup) selectList() error {
queryStmt := op.executeCtx.Query
if queryStmt.AllFields {
fields, err := op.metadata.GetAllFields(queryStmt.Namespace, queryStmt.MetricName)
if err != nil {
return err
}
for _, fieldMeta := range fields {
op.planField(nil, fieldMeta)
}
return nil
}
se... | [
-0.7187779545783997,
0.13041378557682037,
0.4375521242618561,
0.11867786943912506,
1.1006020307540894,
0.043157659471035004,
-0.04979646950960159,
-0.19625996053218842,
0.23239098489284515,
0.9991936087608337,
0.5770091414451599,
-0.7552513480186462,
0.4440653622150421,
-0.5223072171211243... |
func (op *metadataLookup) field(parentFunc *stmt.CallExpr, expr stmt.Expr) {
if op.err != nil {
return
}
switch e := expr.(type) {
case *stmt.SelectItem:
op.field(nil, e.Expr)
case *stmt.CallExpr:
if e.FuncType == function.Quantile {
op.planHistogramFields(e)
return
}
for _, param := range e.Params... | [
0.06678539514541626,
0.6889878511428833,
0.6068351864814758,
-0.20771293342113495,
0.18394872546195984,
0.46529436111450195,
0.024273917078971863,
-0.1812792271375656,
-0.025878850370645523,
0.3806470036506653,
0.6689476370811462,
0.26992279291152954,
0.5075817704200745,
-0.194439843297004... |
func (op *metadataLookup) Identifier() string {
return "Metadata Lookup"
} | [
-0.47091883420944214,
0.23639164865016937,
0.2744848430156708,
-0.38216492533683777,
-0.2357667088508606,
1.2792575359344482,
1.3053059577941895,
1.3415182828903198,
0.6488794684410095,
0.586174726486206,
0.522230327129364,
0.038803983479738235,
1.19118070602417,
-0.5362707376480103,
0.2... |
func Zoofs(clusterid string, l int) (err error) {
o := orm.NewOrm()
// Get export & storages's ip
export, expands, _, err := _GetZoofs(clusterid)
if err != nil {
util.AddLog(err)
return
}
// Error Handing and init rozofs
if err = judgeZoofs(export, expands, l); err != nil {
util.AddLog(err)
return
}
... | [
-0.49687594175338745,
0.16004619002342224,
0.640414297580719,
-0.3899475634098053,
-0.10051621496677399,
-0.6913259625434875,
0.5294221043586731,
0.15223991870880127,
0.6210477948188782,
-0.4331945776939392,
0.4155948758125305,
-0.05178797245025635,
-0.04153921827673912,
-0.035664316266775... |
func _GetZoofs(cid string) (export string, expand []string, client []string, err error) {
clus, err := GetClustersByCid(cid)
if err != nil {
util.AddLog(err)
return
}
for _, dev := range clus.Device {
if dev.Devtype == "export" {
export = dev.Ip
} else if dev.Devtype == "storage" {
expand = append(ex... | [
-0.7190876603126526,
0.7239434719085693,
0.5446028113365173,
0.31196656823158264,
-0.26873087882995605,
-1.3134669065475464,
0.20890921354293823,
-0.8041878342628479,
0.5103071928024292,
-0.12480558454990387,
0.44768285751342773,
-0.2206404060125351,
0.1397676169872284,
-0.3664920330047607... |
func volExport(export string, expands []string, l int) (err error) {
exports_stop := make([]string, 0)
volume_create := make([]string, 0)
exports_create := make([]string, 0)
exports_start := make([]string, 0)
exports_stop = append(exports_stop, "node", "stop", "-E", export)
volume_create = append(volume_create, ... | [
0.3884264826774597,
-0.0597076341509819,
0.9657968282699585,
0.4102429151535034,
0.25223657488822937,
-0.19690610468387604,
0.4165326952934265,
-0.1891745626926422,
0.40987297892570496,
-0.24789585173130035,
0.15936389565467834,
0.26873141527175903,
-0.23266670107841492,
0.0802144557237625... |
func zoofsInsert(export string, expands []string) (err error) {
if err = InsertExports(export); err != nil {
util.AddLog(err)
return
}
configs, err := CliNodeConfig(export)
if err != nil {
util.AddLog(err)
return
}
for _, val := range expands {
cid, sid, slot, err := CliStorageConfig(configs, val)
i... | [
-0.4765339195728302,
1.313148856163025,
0.8206726908683777,
0.12862029671669006,
-0.1812441051006317,
-0.2638702392578125,
0.42440247535705566,
-0.19101682305335999,
0.04427911713719368,
0.2550239562988281,
0.19008971750736237,
-1.1326799392700195,
-0.9319229125976562,
-0.19278904795646667... |
func CliStorageConfig(config RozoRes, storage string) (cid int, sid int, slot string, err error) {
//TODO volume=1, export=1
vid, cid := 1, 1
for _, vol := range config.RozoDetail.Volume {
if vol.Cid == cid && vol.Vid == vid {
cid = vol.Cid
for _, s := range vol.Sids {
if s.Ip == storage {
sid = s.S... | [
0.07804634422063828,
-0.5847011208534241,
0.5446005463600159,
0.027744203805923462,
0.0984407588839531,
-0.7053053975105286,
-0.0728716105222702,
0.3290729820728302,
-0.38316866755485535,
1.277758240699768,
-0.08766863495111465,
0.24359211325645447,
0.21121534705162048,
-0.5418699383735657... |
func CliNodeConfig(export string) (rozo RozoRes, err error) {
cmdArgs := make([]string, 0)
cmdArgs = append(cmdArgs, "rozofs.py", "--ip", export)
outs, err := rozoCmd("python", cmdArgs)
if err != nil {
return
}
var res map[string]interface{}
if err = json.Unmarshal([]byte(outs), &res); err != nil {
return
... | [
-0.9528931379318237,
0.08807724714279175,
0.8192525506019592,
0.23737011849880219,
-0.04072430357336998,
-0.1863723248243332,
-0.1775561422109604,
0.34014931321144104,
-0.5108790993690491,
1.3103467226028442,
-0.04165724292397499,
-0.1811288744211197,
-0.4824688136577606,
-0.19223868846893... |
func NewAPIServiceHaltsParams() *APIServiceHaltsParams {
var ()
return &APIServiceHaltsParams{
timeout: cr.DefaultTimeout,
}
} | [
0.21735548973083496,
-0.13914668560028076,
0.11014878749847412,
-0.22674250602722168,
-0.5528544187545776,
0.14446809887886047,
-1.3236310482025146,
0.04466522857546806,
-0.5726210474967957,
-0.01443205401301384,
0.3240485191345215,
0.3664361834526062,
0.12822061777114868,
0.70274460315704... |
func NewAPIServiceHaltsParamsWithTimeout(timeout time.Duration) *APIServiceHaltsParams {
var ()
return &APIServiceHaltsParams{
timeout: timeout,
}
} | [
0.723218560218811,
-0.578007698059082,
0.2729756534099579,
-0.254055917263031,
-0.5214957594871521,
0.7644953727722168,
-1.9578944444656372,
-0.10263851284980774,
-0.548089861869812,
0.8044888377189636,
0.6603446006774902,
0.6746823191642761,
0.41415873169898987,
0.7229720950126648,
0.02... |
func NewAPIServiceHaltsParamsWithContext(ctx context.Context) *APIServiceHaltsParams {
var ()
return &APIServiceHaltsParams{
Context: ctx,
}
} | [
0.3543415069580078,
-0.39678969979286194,
0.37158775329589844,
-0.604240357875824,
-0.3688853979110718,
0.7589500546455383,
-1.9749668836593628,
-0.67136150598526,
-0.254233181476593,
0.257469117641449,
0.6275919675827026,
0.23074069619178772,
0.4387969672679901,
0.23320172727108002,
-0.... |
func NewAPIServiceHaltsParamsWithHTTPClient(client *http.Client) *APIServiceHaltsParams {
var ()
return &APIServiceHaltsParams{
HTTPClient: client,
}
} | [
0.1938222348690033,
-0.6390783190727234,
0.31985875964164734,
-0.37964871525764465,
-0.40755704045295715,
0.6263412237167358,
-1.079908847808838,
-0.07220544666051865,
-0.9401395916938782,
-0.09037672728300095,
0.32347309589385986,
0.1085558757185936,
0.37843888998031616,
0.379484295845031... |
func (o *APIServiceHaltsParams) WithTimeout(timeout time.Duration) *APIServiceHaltsParams {
o.SetTimeout(timeout)
return o
} | [
0.21950727701187134,
0.007095589768141508,
0.11176259070634842,
-0.7304246425628662,
-0.15341250598430634,
0.309142529964447,
-1.0951305627822876,
-0.04986259341239929,
0.07474353164434433,
0.6130223870277405,
0.6211110353469849,
0.4914247691631317,
0.553117573261261,
0.5423253774642944,
... |
func (o *APIServiceHaltsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
-0.2113245129585266,
-0.05620008707046509,
0.028050698339939117,
-0.5786714553833008,
0.12272540479898453,
0.8282597064971924,
-0.936792254447937,
0.17457269132137299,
-0.3798690140247345,
0.6996800899505615,
0.42795607447624207,
0.6221625208854675,
-0.09679947048425674,
0.7482940554618835... |
func (o *APIServiceHaltsParams) WithContext(ctx context.Context) *APIServiceHaltsParams {
o.SetContext(ctx)
return o
} | [
-0.5380247235298157,
0.10989628732204437,
0.26517951488494873,
-0.6961716413497925,
-0.1447269320487976,
0.2994648218154907,
-1.176331877708435,
-0.56927889585495,
0.44138598442077637,
0.11571136116981506,
0.5338907241821289,
0.3284977376461029,
-0.10665251314640045,
-0.10355588793754578,
... |
func (o *APIServiceHaltsParams) SetContext(ctx context.Context) {
o.Context = ctx
} | [
-0.7704265713691711,
0.1342543363571167,
0.0879463404417038,
-0.41281628608703613,
0.24377617239952087,
0.635254442691803,
-0.9876063466072083,
-0.4689292311668396,
0.34227192401885986,
0.12684863805770874,
0.20032499730587006,
0.5609821081161499,
-0.5385154485702515,
0.16724158823490143,
... |
func (o *APIServiceHaltsParams) WithHTTPClient(client *http.Client) *APIServiceHaltsParams {
o.SetHTTPClient(client)
return o
} | [
-0.16821549832820892,
-0.61960369348526,
0.20601260662078857,
-0.9277188777923584,
-0.22301459312438965,
0.050280846655368805,
-0.5016986727714539,
-0.26700952649116516,
-0.42432621121406555,
-0.18167681992053986,
0.3984282314777374,
0.14038331806659698,
0.42651844024658203,
-0.14459119737... |
func (o *APIServiceHaltsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
-0.2380121499300003,
-0.5550872087478638,
0.08656662702560425,
-1.2526962757110596,
-0.470600962638855,
0.09668822586536407,
-0.23162835836410522,
-0.3712005019187927,
-0.805936336517334,
0.06585735827684402,
-0.034048985689878464,
0.5811095237731934,
-0.35952430963516235,
-0.0705716684460... |
func (o *APIServiceHaltsParams) WithHeight(height *string) *APIServiceHaltsParams {
o.SetHeight(height)
return o
} | [
-0.3311186134815216,
-0.17220206558704376,
0.2214336097240448,
-0.22446361184120178,
-0.3880043029785156,
-0.03086671233177185,
-0.3726364076137543,
-0.40623247623443604,
-0.1603584736585617,
0.03298013284802437,
0.07568859308958054,
0.00971256010234356,
-0.27144181728363037,
0.30160611867... |
func (o *APIServiceHaltsParams) SetHeight(height *string) {
o.Height = height
} | [
-0.7477555274963379,
-0.2940918803215027,
0.07468827068805695,
-0.09579203277826309,
-0.09589945524930954,
0.21100448071956635,
-0.26897430419921875,
-0.05762355029582977,
-0.6798839569091797,
0.22191540896892548,
-0.21280381083488464,
0.19098424911499023,
-0.4864305257797241,
0.2895615696... |
func (o *APIServiceHaltsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Height != nil {
// query param height
var qrHeight string
if o.Height != nil {
qrHeight = *o.Height
}
qHeight := qr... | [
-1.0419782400131226,
0.032416895031929016,
0.7912644147872925,
-0.4511784017086029,
0.8399804830551147,
0.2158278077840805,
0.7420192360877991,
-0.2621133029460907,
-0.5999414920806885,
0.4366206228733063,
0.3579186201095581,
0.4697777330875397,
-0.368837833404541,
0.34951046109199524,
0... |
func (c *ExtendedBeegoController) SetLanguange() bool {
isNeedRedir := false
hasCookie := false
LoadLanguages()
// 1. Check URL arguments.
lang := c.Input().Get("lang")
// 2. Get language information from cookies.
if len(lang) == 0 {
lang = c.Ctx.GetCookie("lang")
hasCookie = true
} else {
isNeedRedir =... | [
-1.729278802871704,
0.3682859539985657,
0.7903002500534058,
-0.222258061170578,
0.06277163326740265,
-0.5111640691757202,
0.17774474620819092,
0.2001521736383438,
-0.04486371576786041,
0.05844879522919655,
-0.7303690314292908,
-0.3080773949623108,
-0.7783229351043701,
0.8034890294075012,
... |
func Heart() {
time.Sleep(time.Hour)
} | [
0.302517831325531,
0.44795987010002136,
0.5719772577285767,
0.8913744688034058,
0.5093333721160889,
2.0678460597991943,
-0.7151439189910889,
-0.19650673866271973,
-0.35113006830215454,
0.7565151453018188,
-0.8680498003959656,
1.2186552286148071,
-0.7305832505226135,
-0.39969632029533386,
... |
func HeartBeatRequestToMep(serviceInfo model.ServiceInfoPost) {
heartBeatRequest := ServiceLivenessUpdate{State: "ACTIVE"}
data, errJsonMarshal := json.Marshal(heartBeatRequest)
if errJsonMarshal != nil {
log.Error("Failed to marshal service info to object")
}
server, errGetServer := config.GetServerUrl()
if ... | [
-0.9117510914802551,
-0.32618147134780884,
1.0064438581466675,
0.014399885199964046,
-0.2927004396915436,
0.9308398365974426,
-0.8174203634262085,
-0.07649099081754684,
0.3328688442707062,
-0.005416715517640114,
0.14007677137851715,
-0.2822529375553131,
-0.7000649571418762,
0.0010610704775... |
func lookupFieldInStruct(reflectValue reflect.Value, name string) (interface{}, bool) {
field := reflectValue.FieldByName(name)
if field.IsValid() {
return field.Interface(), truth(field)
}
method := reflectValue.MethodByName(name)
if method.IsValid() && method.Type().NumIn() == 1 {
out := method.Call(nil)[0]
... | [
-1.211578130722046,
0.533640444278717,
0.5349717140197754,
-0.5811663269996643,
-1.0953527688980103,
0.19368703663349152,
0.2644606828689575,
-0.37309974431991577,
0.2637726664543152,
-0.10518038272857666,
-0.48937228322029114,
-0.6870514750480652,
-0.6936728954315186,
0.05559587851166725,... |
func lookup(name string, context ...interface{}) (interface{}, bool) {
// If the dot notation was used we split the word in two and perform two
// consecutive lookups. If the first one fails we return no value and a
// negative truth. Taken from github.com/hoisie/mustache.
if name != "." && strings.Contains(name, "... | [
-0.6419683694839478,
-0.03615142032504082,
0.8568781018257141,
-0.31400030851364136,
-0.7424721121788025,
-0.7421058416366577,
0.19011421501636505,
-0.4634818434715271,
0.13009725511074066,
0.07852141559123993,
-0.3210459351539612,
-0.006937515921890736,
-0.5731887221336365,
-0.40800344944... |
func truth(r reflect.Value) bool {
out:
switch r.Kind() {
case reflect.Array, reflect.Slice:
return r.Len() > 0
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
return r.Int() > 0
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
return r.Uint() > 0
... | [
-0.8224576711654663,
0.2811393439769745,
0.6962932348251343,
-0.5521764159202576,
-0.08974896371364594,
0.3433702886104584,
0.27338144183158875,
-0.23415040969848633,
0.12763848900794983,
0.1229025274515152,
-1.0740315914154053,
-0.31832683086395264,
-1.1319751739501953,
0.8555775880813599... |
func (announcement *Announcement) ToStringStringMap(properties ...string) (map[string]string, error) {
output := make(map[string]string)
for _, p := range properties {
property, err := announcement.formatProperty(p)
if err != nil {
return output, err
}
output[p] = property
}
return output, nil
} | [
-0.8181025385856628,
-1.3837759494781494,
0.7405582666397095,
-0.28728628158569336,
0.002230319892987609,
0.1696370393037796,
-0.47004884481430054,
0.05209549888968468,
-0.750510573387146,
0.6757175922393799,
0.6773772239685059,
0.22153379023075104,
0.0188294630497694,
-0.00596100790426135... |
func (announcement *Announcement) FromStringStringMap(input map[string]string) error {
for k, v := range input {
announcement.parseProperty(k, v)
}
return nil
} | [
-0.005894816014915705,
-1.6494383811950684,
0.2296016961336136,
0.2488436996936798,
-0.504966676235199,
0.35674604773521423,
-0.8805825710296631,
0.8235797882080078,
-0.9724448919296265,
0.6182897686958313,
0.5721130967140198,
0.3867952525615692,
-0.02613108605146408,
0.3969213664531708,
... |
func (announcement *Announcement) AddMetadata(key Metadata_Key, value []byte) {
for _, meta := range announcement.Metadata {
if meta.Key == key && bytes.Equal(value, meta.Value) {
return
}
}
announcement.Metadata = append(announcement.Metadata, &Metadata{
Key: key,
Value: value,
})
} | [
0.1267155408859253,
0.2542853057384491,
0.6462886333465576,
0.7075824737548828,
0.06940494477748871,
0.7137320637702942,
-1.3207337856292725,
0.6173888444900513,
-0.22223100066184998,
1.286749243736267,
0.2601589858531952,
0.928112804889679,
-0.2286556214094162,
1.2053368091583252,
-0.31... |
func (announcement *Announcement) DeleteMetadata(key Metadata_Key, value []byte) {
newMeta := make([]*Metadata, 0, len(announcement.Metadata))
for _, meta := range announcement.Metadata {
if !(meta.Key == key && bytes.Equal(value, meta.Value)) {
newMeta = append(newMeta, meta)
}
}
announcement.Metadata = new... | [
0.24974121153354645,
-0.19284120202064514,
0.6324741244316101,
0.3285767138004303,
-0.05654853209853172,
0.24140553176403046,
-0.8831325173377991,
0.9284886717796326,
-0.37903666496276855,
1.779205560684204,
-0.5002366900444031,
1.1896053552627563,
-0.5549442172050476,
0.9030070304870605,
... |
func (m *TMap) At(key interface{}) interface{} {
v, ok := m.root.Find(entry{key: key})
if !ok {
return nil
}
ent := v.(entry)
return ent.value
} | [
-0.600566029548645,
-0.6411945819854736,
0.557971715927124,
-0.6449213624000549,
-0.6553456783294678,
-0.2545958459377289,
-0.5274180173873901,
-0.5900331735610962,
-0.866174578666687,
0.47790664434432983,
0.058636005967855453,
0.02611488290131092,
0.252434104681015,
0.5602521300315857,
... |
func (m *TMap) EntryAt(key interface{}) Entry {
v, ok := m.root.Find(entry{key: key})
if !ok {
return nil
}
ent := v.(entry)
return ent
} | [
-0.15534429252147675,
-0.8427602648735046,
0.3668750822544098,
-0.764710009098053,
-0.4789963364601135,
-0.33964774012565613,
0.1275610327720642,
-0.6149928569793701,
-0.1034257635474205,
0.5352467894554138,
0.5883892774581909,
-0.3011177182197571,
0.021695228293538094,
0.41283681988716125... |
func (m *TMap) Assoc(key, value interface{}) *TMap {
m.root = m.root.Add(entry{key: key, value: value})
return m
} | [
0.18863701820373535,
-0.030352070927619934,
0.11080756038427353,
-0.26682111620903015,
-0.37071987986564636,
0.4461767077445984,
0.6601409912109375,
0.6524282693862915,
-0.5810217261314392,
0.5508154630661011,
0.7844612002372742,
0.3276423215866089,
0.7275947332382202,
0.7798925638198853,
... |
func (m *TMap) Conj(value interface{}) interface{} {
entry := value.(Entry)
return m.Assoc(entry.Key(), entry.Value())
} | [
-0.40705975890159607,
-0.06127869337797165,
0.3491646945476532,
0.16371259093284607,
-1.1050299406051636,
0.056767538189888,
0.31805670261383057,
0.5919058322906494,
-0.6437761187553406,
0.06784655153751373,
0.8011940717697144,
-1.4217705726623535,
-0.15217334032058716,
0.7083864212036133,... |
func (m *TMap) AsPersistent() *Map {
newRoot := m.root.AsPersistent()
if newRoot == m.orig.root {
return m.orig
}
return &Map{
root: newRoot,
eq: m.eq,
}
} | [
-0.46593794226646423,
-1.6107460260391235,
0.5524659156799316,
-0.6233574748039246,
-0.7479233741760254,
0.1564948856830597,
0.8725904822349548,
-0.05925370752811432,
0.3875032067298889,
0.21925850212574005,
0.2156739979982376,
-0.4961799085140228,
-0.4720853269100189,
-0.1706029623746872,... |
func (m *TMap) MakePersistent() interface{} {
return m.AsPersistent()
} | [
-0.1681911200284958,
-0.8259037733078003,
0.4028816819190979,
-0.5612692832946777,
-0.47370344400405884,
0.9382337331771851,
0.8092450499534607,
0.035878438502550125,
0.30414292216300964,
-0.5582247972488403,
-0.11986406147480011,
-1.3196769952774048,
-0.30038127303123474,
-0.8441278934478... |
func (m *TMap) Contains(key interface{}) bool {
return m.root.Contains(entry{key: key})
} | [
-0.5662142634391785,
-0.4048103094100952,
0.22135920822620392,
-0.19886986911296844,
-0.9527425169944763,
0.37827160954475403,
-0.44247251749038696,
-0.11871305853128433,
-0.3717971742153168,
0.2381225824356079,
0.2408958375453949,
-0.03790619596838951,
0.042328767478466034,
1.475909352302... |
func (m *TMap) Find(key interface{}) (value interface{}, exists bool) {
v, ok := m.root.Find(entry{key: key})
if !ok {
return nil, ok
}
ent := v.(entry)
return ent.value, ok
} | [
-0.24025402963161469,
-0.21069495379924774,
0.6846240162849426,
-0.28177228569984436,
-0.6149266362190247,
-0.2121700644493103,
-0.33819669485092163,
-0.44727686047554016,
-1.3617984056472778,
1.1969404220581055,
-0.08336631953716278,
-0.892655074596405,
-0.15163633227348328,
1.61592423915... |
func (m *TMap) Delete(key interface{}) *TMap {
m.root = m.root.Delete(entry{key: key})
return m
} | [
0.014716656878590584,
0.041187066584825516,
0.10149980336427689,
0.025130590423941612,
-0.31764233112335205,
0.4616389572620392,
0.5733484625816345,
0.9377924203872681,
0.4205586314201355,
0.7595668435096741,
0.42978784441947937,
-0.4852503836154938,
-0.6207881569862366,
0.8739980459213257... |
func (m *TMap) Equal(o interface{}) bool {
other, ok := o.(*TMap)
if !ok {
return ok
}
if m.Length() != other.Length() {
return false
}
iter := m.Iterator()
for iter.HasNext() {
key, value := iter.Next()
if !m.eq(other.At(key), value) {
return false
}
}
return true
} | [
-0.9955987930297852,
-0.08478539437055588,
0.7675564885139465,
-0.5619763135910034,
-0.055009875446558,
0.22173869609832764,
0.3411301374435425,
-0.8215751051902771,
-0.8220085501670837,
1.312752366065979,
-0.9263259172439575,
-0.5750662684440613,
-0.05941464379429817,
0.4642605185508728,
... |
func (m *TMap) Length() int {
return m.root.Length()
} | [
-0.10302885621786118,
-0.4789125323295593,
0.007364069577306509,
-0.2854940593242645,
-0.16857759654521942,
0.9118174910545349,
1.1363327503204346,
0.714338481426239,
0.34121525287628174,
0.4354994595050812,
-0.17585806548595428,
-0.18594318628311157,
0.03605813533067703,
0.904314160346984... |
func (m *TMap) Apply(args ...interface{}) interface{} {
key := args[0]
return m.At(key)
} | [
-1.0513079166412354,
-0.4232129156589508,
0.6081447005271912,
-0.4316234588623047,
-0.1984526664018631,
0.6071387529373169,
-0.175894096493721,
0.1226329579949379,
-1.036628007888794,
0.3099154531955719,
0.35948196053504944,
-0.8595253825187683,
-0.16391649842262268,
0.34994107484817505,
... |
func (m *TMap) String() string {
var b strings.Builder
fmt.Fprint(&b, "{ ")
iter := m.Iterator()
for iter.HasNext() {
entry := iter.NextEntry()
fmt.Fprintf(&b, "%s ", entry)
}
fmt.Fprint(&b, "}")
return b.String()
} | [
0.012739179655909538,
-1.3566937446594238,
0.5554737448692322,
-1.509438395500183,
-0.6988978981971741,
0.9294126033782959,
0.42240017652511597,
-0.8111034035682678,
-1.354178547859192,
0.5489526391029358,
0.6444666385650635,
0.07355649024248123,
0.14690999686717987,
0.06636688858270645,
... |
func (m *TMap) Iterator() Iterator {
return Iterator{
impl: m.root.Iterator(),
}
} | [
-0.37197503447532654,
-1.0021837949752808,
0.04190473631024361,
-0.7878754138946533,
-0.8121969103813171,
0.301161527633667,
1.1286630630493164,
0.6181783080101013,
0.19875755906105042,
-0.20944026112556458,
0.9254511594772339,
-0.7655014395713806,
0.518613338470459,
0.33962422609329224,
... |
func CollectHTTPBody(r *http.Request, g *grids.GridPacket) {
content, ok := r.Header["Content-Type"]
muxcontent := strings.Join(content, ";")
wind := strings.Index(muxcontent, "application/x-www-form-urlencode")
mind := strings.Index(muxcontent, "multipart/form-data")
jsn := strings.Index(muxcontent, "application/... | [
-0.45607438683509827,
-0.4529203772544861,
1.2519904375076294,
-0.41078895330429077,
-0.4604121148586273,
0.16818767786026,
-0.26514744758605957,
-1.047873854637146,
-0.33454686403274536,
0.4204115569591522,
0.2755749523639679,
0.3972567319869995,
-0.12799081206321716,
1.4820266962051392,
... |
func (m *HTTPService) Dial() error {
if m.cert != nil {
// return http.ListenAndServe(m.GetPath(), http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
// m.Route.IssueRequestPath(r.URL.Path, func(pack *grids.GridPacket) {
// pack.Set("Req", r)
// pack.Set("Res", rw)
// CollectHTTPBody(r, ... | [
0.2644960880279541,
-0.342558354139328,
0.8808038830757141,
0.0989077165722847,
0.13227316737174988,
0.40798816084861755,
-0.45004895329475403,
-0.00848656427115202,
0.15988147258758545,
-0.10426104813814163,
0.6766043305397034,
0.5924485325813293,
0.03889595344662666,
1.1721391677856445,
... |
func (m *HTTPService) ProcessPackets(rw http.ResponseWriter, r *http.Request) {
m.Route.IssueRequestPath(r.URL.Path, func(pack *grids.GridPacket) {
pack.Set("Req", r)
pack.Set("Res", rw)
CollectHTTPBody(r, pack)
})
} | [
-0.36848610639572144,
-0.055865269154310226,
0.5962095260620117,
-0.23284326493740082,
0.40490368008613586,
-0.18850737810134888,
-0.243700310587883,
-0.6636461615562439,
0.6047726273536682,
-0.03891992196440697,
0.5363828539848328,
-0.3297449052333832,
-0.2337099015712738,
0.9622353315353... |
func NewHTTPFactory(serviceName string, slaveAddr string, slavePort int, cert *HTTPCert, master arch.Linkage) *HTTPService {
var scheme string
if cert != nil {
scheme = "http://"
} else {
scheme = "https://"
}
desc := arch.NewDescriptor("http", serviceName, slaveAddr, slavePort, "0", scheme)
var sm = &HTTPS... | [
-0.5193820595741272,
0.23627769947052002,
0.9424597024917603,
-0.43825629353523254,
-0.29923000931739807,
-0.8667894005775452,
0.38123148679733276,
-0.05824464187026024,
-0.5759103298187256,
0.22082370519638062,
-0.1319975107908249,
1.0645142793655396,
0.8455311059951782,
1.373907089233398... |
func NewHTTPService(service, addr string, port int, master arch.Linkage) *HTTPService {
return NewHTTPFactory(service, addr, port, nil, master)
} | [
0.22066283226013184,
0.22527767717838287,
0.12754376232624054,
0.3155868351459503,
-1.198718786239624,
0.053950317203998566,
-0.8852946758270264,
-0.1418500691652298,
-0.28984445333480835,
-0.7451702952384949,
-0.2694282531738281,
0.789086639881134,
-0.13952791690826416,
0.953644871711731,... |
func NewHTTPSecureService(service, addr string, port int, cert *HTTPCert, master arch.Linkage) *HTTPService {
return NewHTTPFactory(service, addr, port, cert, master)
} | [
-0.11072586476802826,
-0.007343442179262638,
0.13629630208015442,
0.5996606349945068,
-0.7800629734992981,
-0.09169492870569229,
-1.0591062307357788,
-0.6426156163215637,
-0.14216305315494537,
-0.8268495202064514,
-0.6462085843086243,
0.6700994968414307,
-0.2091481238603592,
0.211768478155... |
func Kmer2Num(sequence []byte, K int, i int) (int, int) {
id := 0
id_rc := 0
for j:=i; j<K+i; j++ {
switch sequence[j] {
case 'A': id = id<<2
case 'C': id = id<<2 + 1
case 'G': id = id<<2 + 2
case 'T': id = id<<2 + 3
default:
return -1, -1
}
... | [
-0.7280235886573792,
-1.5052276849746704,
0.7554671764373779,
0.13087265193462372,
-0.41947904229164124,
-0.7374741435050964,
0.716966986656189,
0.09701645374298096,
-0.27425262331962585,
0.7067603468894958,
-1.4549434185028076,
-0.2829548418521881,
-0.5099090933799744,
0.23912057280540466... |
func firstIndex(sequence []byte, K int, start int, end int) int {
var j int
for i:=start; i<end-K+1; i++ {
for j=i; j<i+K; j++ {
if sequence[j]!='A' && sequence[j]!='C' && sequence[j]!='G' && sequence[j]!='T' {
break
}
}
if j==i+K {
return i
}
}
... | [
0.19221077859401703,
-1.0371124744415283,
0.5996382832527161,
-0.38158920407295227,
-0.8488254547119141,
-0.3623896539211273,
0.3863367736339569,
0.09140092134475708,
-0.4502718448638916,
0.7534915208816528,
-0.39947351813316345,
-0.2539365887641907,
-0.6650010943412781,
0.1173351034522056... |
func NumToKmer(x int, K int) string {
y := make([]byte, K)
for i:=K-1; i>=0; i-- {
base := x%4
switch base {
case 0: y[i] = 'A'
case 1: y[i] = 'C'
case 2: y[i] = 'G'
case 3: y[i] = 'T'
}
x = (x-base)>>2
}
return string(y)
} | [
-1.0977420806884766,
-0.14506684243679047,
0.6777734160423279,
-0.8090628981590271,
-0.8743164539337158,
-0.4007047414779663,
-1.2205007076263428,
-0.9729406833648682,
-0.8412148952484131,
0.4855089783668518,
-0.686336100101471,
-0.7493488192558289,
0.20854146778583527,
-0.0089651355519890... |
func PlayerWins(playerHand string, dealerHand string) bool {
pScore := handScore(playerHand)
dScore := handScore(dealerHand)
pBlackjack := isBlackjack(playerHand)
dBlackjack := isBlackjack(dealerHand)
return pScore > dScore &&
pScore <= maxScore ||
dScore > maxScore ||
pBlackjack && !dBlackjack
} | [
0.09128917008638382,
-0.49742311239242554,
0.5235490202903748,
0.4613195061683655,
-0.2100655436515808,
-0.047749992460012436,
-0.6616510152816772,
0.5057095885276794,
0.08851655572652817,
0.017985230311751366,
0.6517276763916016,
0.4698300361633301,
-0.013516555540263653,
-0.0030908212065... |
func ExampleBasic() {
manager, err := google.NewManager()
if err != nil {
panic(err)
}
err = manager.LoadConfiguration(overwatch.IamManagerConfig{
GitLocation: "github.com/SeedJobs/test-iam.git",
// If you want to always ensure that data is up to date,
// feel free to leave this field blank
TimeOut: 3 * t... | [
0.5395984649658203,
-0.6008366346359253,
0.6545307040214539,
-0.48840299248695374,
0.18460825085639954,
0.06494422256946564,
-0.484902560710907,
-0.4343324601650238,
-0.25260812044143677,
0.3532325327396393,
-0.29051557183265686,
0.6887068748474121,
0.41567158699035645,
0.5643270611763,
... |
func (a *App) InitDiffFlags(cmd *cobra.Command) {
cmd.ResetFlags()
cmd.Flags().StringArrayVarP(&a.Config.LocalFlags.DiffPath, "path", "", []string{}, "diff request paths")
cmd.Flags().StringVarP(&a.Config.LocalFlags.DiffRef, "ref", "", "", "reference gNMI target to compare the other targets to")
cmd.MarkFlagRequir... | [
0.5518093705177307,
-0.669205904006958,
0.9431363940238953,
-0.16243606805801392,
1.0511552095413208,
0.10761623084545135,
0.23625794053077698,
-0.5084434747695923,
-0.615256667137146,
-0.2750406563282013,
-0.3984842300415039,
0.9222527742385864,
-0.4824959933757782,
1.603952407836914,
0... |
func (*ImageCopySearchAnnotation) Descriptor() ([]byte, []int) {
return file_yandex_cloud_ai_vision_v1_image_copy_search_proto_rawDescGZIP(), []int{0}
} | [
-1.8782031536102295,
-0.10381662100553513,
0.5374235510826111,
0.3276248276233673,
-0.25461554527282715,
-0.25989654660224915,
0.4625590145587921,
-0.1216784343123436,
0.03025638312101364,
1.323169231414795,
-0.7194747924804688,
-0.507481575012207,
-0.024370593950152397,
-0.602174758911132... |
func (*CopyMatch) Descriptor() ([]byte, []int) {
return file_yandex_cloud_ai_vision_v1_image_copy_search_proto_rawDescGZIP(), []int{1}
} | [
-0.02912294492125511,
0.4585913121700287,
0.790673017501831,
0.5394865274429321,
-0.17241692543029785,
0.06866244971752167,
0.8166571259498596,
0.45585963129997253,
0.27497392892837524,
0.30916228890419006,
-0.33626610040664673,
-0.09211928397417068,
0.11670207232236862,
0.2137994170188903... |
func ShareWith(name string) string {
if name == "" {
name = "you"
}
return fmt.Sprintf("One for %s, one for me.", name)
} | [
0.030879182741045952,
0.02164427749812603,
0.5501821637153625,
-0.6801108717918396,
-0.6175884008407593,
-0.3959416449069977,
-0.9606336951255798,
-0.30760064721107483,
0.08312606066465378,
0.20293863117694855,
-0.3888411819934845,
-0.1223822832107544,
0.009491135366261005,
0.3838417232036... |
func NewLcdTextLine(line, pos uint8, txt string) *lcd20x4.LcdTextLine {
var i int
ltl := &lcd20x4.LcdTextLine{Line: line, Pos: pos}
// convert string to bytes
text := []byte(txt)
for len(text) > 0 && i < 20 {
r, size := utf8.DecodeRune(text)
text = text[size:]
ltl.Text[i] = ToByte(r)
i++
}
return ltl
} | [
0.9812861680984497,
-1.0781773328781128,
0.19731415808200836,
-1.348870038986206,
-0.4816741347312927,
0.2438523769378662,
-1.1297024488449097,
0.2464705854654312,
-0.12607397139072418,
-0.47158411145210266,
-0.9143683910369873,
-0.05898555740714073,
-0.6537279486656189,
-0.610005199909210... |
func RegisterSHOPPERSSHOP_VendingMachineServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
... | [
0.18572916090488434,
-0.1723782867193222,
0.676177978515625,
0.807136595249176,
-0.159017875790596,
0.34621408581733704,
-0.33104363083839417,
-0.8459071516990662,
-0.21394100785255432,
0.4134574234485626,
0.7757224440574646,
-0.21173125505447388,
-0.3596838116645813,
-0.26443713903427124,... |
func RegisterSHOPPERSSHOP_VendingMachineServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterSHOPPERSSHOP_VendingMachineServiceHandlerClient(ctx, mux, NewSHOPPERSSHOP_VendingMachineServiceClient(conn))
} | [
-0.043897610157728195,
0.4608885645866394,
0.29832160472869873,
0.47883668541908264,
-0.13990998268127441,
0.4958474934101105,
-0.3067209720611572,
-0.35561075806617737,
-0.3710003197193146,
-0.2009517401456833,
0.12278175354003906,
0.36209842562675476,
0.055422794073820114,
0.723233997821... |
func RegisterSHOPPERSSHOP_VendingMachineServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SHOPPERSSHOP_VendingMachineServiceClient) error {
mux.Handle("GET", pattern_SHOPPERSSHOP_VendingMachineService_InventorySearchAllItemCategories_0, func(w http.ResponseWriter, req *http.Request, pathParams m... | [
-0.7338846325874329,
0.6408315300941467,
0.695311427116394,
-0.023304147645831108,
-0.2103835642337799,
0.1736350655555725,
0.13201740384101868,
-1.101351261138916,
-0.4619753360748291,
-0.10896331071853638,
0.40686604380607605,
0.1718919426202774,
-0.03754740208387375,
-0.0662257894873619... |
func GetQueryCmd() *cobra.Command {
queryCmd := &cobra.Command{
Use: "ibc-router",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
}
queryCmd.AddCommand(
GetCmdParams(),
)
return queryCmd
} | [
0.5073128938674927,
-0.027606824412941933,
0.6151164174079895,
0.21941350400447845,
1.2059595584869385,
0.2974533438682556,
0.2887742221355438,
0.4287679195404053,
-0.10406537353992462,
-0.5208228826522827,
0.5075793862342834,
1.074517846107483,
-1.0467673540115356,
0.06814409047365189,
... |
func GetCmdParams() *cobra.Command {
cmd := &cobra.Command{
Use: "params",
Short: "Query the current ibc-router parameters",
Long: "Query the current ibc-router parameters",
Args: cobra.NoArgs,
Example: fmt.Sprintf("%s query ibc-router params", version.AppName),
RunE: func(cmd *cobra.Command, _... | [
0.3602537512779236,
-0.12298661470413208,
0.7457078695297241,
-0.3480798304080963,
0.5112959146499634,
0.43729886412620544,
0.24483709037303925,
0.12422285974025726,
-0.5567392706871033,
0.2092478722333908,
0.9328774809837341,
1.0129718780517578,
-1.3544731140136719,
0.28632232546806335,
... |
func NewTxCmd() *cobra.Command {
return nil
} | [
1.2892576456069946,
-0.47493767738342285,
0.5033984184265137,
0.14432980120182037,
0.04776810109615326,
0.022732356563210487,
-0.2829892933368683,
0.029643164947628975,
0.07987656444311142,
-1.2140860557556152,
-0.2843697965145111,
0.13359297811985016,
-0.422294944524765,
1.061478495597839... |
func New(s *store.Store) *Service {
return &Service{
us: client.New(s, &models.Stats{}),
}
} | [
0.7174856066703796,
-0.011522936634719372,
-0.1397947072982788,
-0.3187553286552429,
-0.5257168412208557,
0.1868125945329666,
0.11008784174919128,
-0.8874098658561707,
-0.03418207913637161,
-0.8014100193977356,
0.3099503517150879,
0.5448237657546997,
1.1146482229232788,
0.4664950668811798,... |
func (s *Service) ParseBodyRequest(r *http.Request, par httprouter.Params) (*models.Stats, []string, error) {
u := models.Stats{}
b, err := io.ReadAll(r.Body)
if err != nil {
return nil, nil, err
}
var reqBody map[string]interface{}
err = json.Unmarshal(b, &reqBody)
if err != nil {
return nil, nil, err
}
... | [
-0.4278162717819214,
-0.5355710387229919,
0.6809762716293335,
-0.6802018880844116,
0.24604178965091705,
0.06853841245174408,
-0.18084745109081268,
-0.5764980912208557,
-0.005036467686295509,
-0.1718282699584961,
-0.19407017529010773,
-0.40878862142562866,
0.29840198159217834,
1.25635445117... |
func SPIDevVarOnFlagSet(f *flag.FlagSet, p *string, name, value, usage string) {
devices := spireg.All()
var def string
var names []string
for _, d := range devices {
names = append(names, d.Name)
names = append(names, d.Aliases...)
if def == "" {
if d.Name == value {
def = d.Name
} else {
for _... | [
0.06614094972610474,
-0.24421294033527374,
0.49606087803840637,
-0.7790306210517883,
-0.268757700920105,
-0.353323370218277,
-0.17513276636600494,
0.7442572116851807,
-0.2753113806247711,
0.85456383228302,
0.1040026992559433,
0.779365062713623,
-0.10027586668729782,
0.1000160425901413,
-... |
func NewSide(sideStr string) *Side {
side := Side(sideStr)
return &side
} | [
0.980402946472168,
-0.7245046496391296,
0.25353649258613586,
-0.06917604804039001,
-0.7364603877067566,
-0.1443319022655487,
-1.3773066997528076,
-0.9653401374816895,
-0.3148502707481384,
-0.9593812823295593,
0.008803772740066051,
0.1751500815153122,
-1.4293477535247803,
-0.317918002605438... |
func (side *Side) IsOpposite(sideInQuestion *Side) bool {
if string(*side) == "SELL" && string(*sideInQuestion) == "BUY" {
return true
}
if string(*side) == "BUY" && string(*sideInQuestion) == "SELL" {
return true
}
return false
} | [
-1.2034227848052979,
-0.21784444153308868,
0.8822267651557922,
0.1082223430275917,
-0.24894961714744568,
-0.12240054458379745,
-0.9930687546730042,
-0.3243502378463745,
0.18784122169017792,
0.8225115537643433,
0.5447750091552734,
-0.9091682434082031,
-0.9872467517852783,
0.1188881844282150... |
func (side *Side) IsSame(sideInQuestion *Side) bool {
if string(*side) == "SELL" && string(*sideInQuestion) == "SELL" {
return true
}
if string(*side) == "BUY" && string(*sideInQuestion) == "BUY" {
return true
}
if string(*side) == "ZERO" && string(*sideInQuestion) == "ZERO" {
return true
}
return false
} | [
-0.9741277098655701,
-0.5222490429878235,
0.8362504243850708,
0.6487171649932861,
-0.2593086063861847,
0.2857167422771454,
-0.6039632558822632,
-0.7785145044326782,
0.3292175233364105,
0.8751493692398071,
-0.21930214762687683,
0.33999472856521606,
-1.244320273399353,
-0.10783272236585617,
... |
func (side *Side) Opposite() *Side {
switch string(*side) {
case "BUY":
return SELLSide()
case "SELL":
return BUYSide()
case "ZERO":
return ZEROSide()
}
fmt.Println("Error in Opposite")
return nil
} | [
-0.9382848739624023,
-0.1274382770061493,
0.7376551628112793,
0.0865800604224205,
-0.1841394007205963,
0.5786554217338562,
-0.6531497240066528,
-0.15974901616573334,
-0.6481698751449585,
-0.1912940889596939,
0.03787018358707428,
-0.3660142123699188,
-1.0397535562515259,
-0.3394018709659576... |
func (side *Side) IsZero() bool {
if string(*side) == "ZERO" {
return true
}
return false
} | [
-0.548376202583313,
0.016695864498615265,
0.47599366307258606,
1.4159032106399536,
0.25555887818336487,
0.017495818436145782,
-0.7451554536819458,
0.19151850044727325,
0.05319792032241821,
0.09768964350223541,
-0.5972682237625122,
0.24716508388519287,
-1.0673015117645264,
0.641484022140502... |
func SendDockerData(dCon docker.DockerContainer) (int, error) {
jsonStr, err := json.Marshal(dCon)
if err != nil {
return 0, fmt.Errorf("Error marshalling docker json to send to pod-logger: %v\n", err)
}
resp, err := sendLog(jsonStr, config.DockerURL)
if err != nil {
return 0, fmt.Errorf("Error sending log: %v... | [
-1.388667345046997,
0.3851126730442047,
0.7369264364242554,
-0.39295947551727295,
-0.5199770927429199,
-0.11736229807138443,
0.0377982035279274,
-0.04244829714298248,
-0.5583886504173279,
0.3103441894054413,
-0.4743594229221344,
0.4805276393890381,
-0.13056664168834686,
0.8646661639213562,... |
func SendCrioData(mStat models.Status) (int, error) {
jsonStr, err := json.Marshal(mStat)
if err != nil {
return 0, fmt.Errorf("Error marshalling crio json to send to pod-logger: %v\n", err)
}
resp, err := sendLog(jsonStr, config.CrioURL)
if err != nil {
return 0, fmt.Errorf("Error sending log: %v\n", err)
}
... | [
-0.6092193722724915,
-0.05147620290517807,
0.6009854674339294,
0.021238898858428,
-0.35538625717163086,
0.5112919807434082,
-0.35550132393836975,
-0.2726115584373474,
-0.9745331406593323,
0.7224714159965515,
-1.252699375152588,
0.3467276990413666,
-0.1417449712753296,
0.27413269877433777,
... |
func SendClamData(sRes api.ScanResult) (int, error) {
jsonStr, err := json.Marshal(sRes)
if err != nil {
return 0, fmt.Errorf("Error marshalling clam json to send to pod-logger: %v\n", err)
}
resp, err := sendLog(jsonStr, config.ClamURL)
if err != nil {
return 0, fmt.Errorf("Error sending log: %v\n", err)
}
... | [
-1.0994268655776978,
0.554125189781189,
0.5912390351295471,
0.07681488990783691,
-0.507378339767456,
0.20916299521923065,
-0.1886293888092041,
-0.8160462975502014,
-0.3491942882537842,
0.6369795799255371,
-0.7260741591453552,
0.4663885533809662,
-0.609515368938446,
0.3419736325740814,
0.... |
func ImageExistsLocally(ctx context.Context, imageName string, platform string) (bool, error) {
return false, errors.New("Unsupported Operation")
} | [
-1.1547553539276123,
-0.48783078789711,
0.4579276740550995,
0.5794790387153625,
0.4482656717300415,
0.2099265605211258,
-0.3651370704174042,
0.4938836097717285,
-0.5157118439674377,
1.3047071695327759,
-0.2705419957637787,
-0.0490083172917366,
0.034655094146728516,
0.2860542833805084,
-0... |
func RemoveImage(ctx context.Context, imageName string, force bool, pruneChildren bool) (bool, error) {
return false, errors.New("Unsupported Operation")
} | [
-1.4560552835464478,
0.9613175988197327,
0.6326404213905334,
0.8327754735946655,
-0.3257198929786682,
0.46912309527397156,
-0.12295301258563995,
1.0014981031417847,
-0.24503950774669647,
0.830159604549408,
-0.191554993391037,
-0.7712591290473938,
-1.0909614562988281,
-0.14926926791667938,
... |
func NewDockerBuildExecutor(input NewDockerBuildExecutorInput) common.Executor {
return func(ctx context.Context) error {
return errors.New("Unsupported Operation")
}
} | [
-0.016158942133188248,
0.06418691575527191,
0.2608020007610321,
1.4899638891220093,
-1.0959653854370117,
0.3417510390281677,
0.8767749667167664,
0.6190096735954285,
0.056628335267305374,
-1.0981768369674683,
-0.8481283187866211,
-0.01516975648701191,
-0.14469248056411743,
0.934059858322143... |
func NewDockerPullExecutor(input NewDockerPullExecutorInput) common.Executor {
return func(ctx context.Context) error {
return errors.New("Unsupported Operation")
}
} | [
0.01207918580621481,
0.6258331537246704,
0.2973431944847107,
-0.06627732515335083,
-0.717170000076294,
-0.48674479126930237,
0.13617369532585144,
0.32386842370033264,
0.33084842562675476,
-0.4256441295146942,
-0.7539533376693726,
0.028424184769392014,
0.6581836342811584,
0.4520909190177917... |
func NewContainer(input *NewContainerInput) ExecutionsEnvironment {
return nil
} | [
0.12596742808818817,
-0.5016008019447327,
0.3400372266769409,
1.0721698999404907,
0.08943204581737518,
0.4094961881637573,
1.8865455389022827,
-0.5633513331413269,
-0.1263023465871811,
-0.920232892036438,
0.6842362880706787,
0.22295501828193665,
-0.2342987209558487,
2.132612943649292,
0.... |
func network(filePath string) (Network, error) {
var network Network
file, err := os.Open(filePath)
if err != nil {
return network, err
}
defer func() {
if err := file.Close(); err != nil {
log.Error("Failed to close file: %s, error: %v", filePath, err)
}
}()
sc := bufio.NewScanner(file)
sc.Split(bufi... | [
-0.1420551985502243,
-0.9174867272377014,
0.8882619142532349,
-0.281892865896225,
-0.20696738362312317,
-0.6977099180221558,
0.23128904402256012,
-0.3716576397418976,
-0.253671795129776,
-0.3370732069015503,
-0.19982241094112396,
-0.4042174816131592,
-0.46714258193969727,
0.114117361605167... |
func printMyResult(sentence string) string {
newSentence := "Saya sedang belajar " + sentence
return newSentence
} | [
-0.19666528701782227,
-1.044700264930725,
0.24802224338054657,
-0.16876903176307678,
-0.9366135001182556,
-0.923419713973999,
-0.8264143466949463,
-0.6497251987457275,
0.38534802198410034,
0.41979724168777466,
-0.3081199526786804,
-0.10320022702217102,
-1.125143051147461,
0.074634395539760... |
func add(number, numberTwo int) int {
return number + numberTwo
} | [
-0.5886858105659485,
-0.9698209166526794,
0.804466724395752,
-0.13546788692474365,
-0.05551358684897423,
0.7777787446975708,
-0.617363452911377,
-0.481024831533432,
-0.4152418076992035,
-0.665442168712616,
-0.6913661956787109,
0.23911356925964355,
-0.35258153080940247,
0.20914702117443085,... |
func New(name string) *File {
return &File{Name: name}
} | [
0.3785482347011566,
-1.0004019737243652,
0.16150933504104614,
-0.32591956853866577,
-1.0789893865585327,
0.1721535176038742,
-0.6338655948638916,
0.1787644475698471,
-1.4103569984436035,
-0.6341931223869324,
-0.44849327206611633,
0.1060936450958252,
1.1236480474472046,
0.338753879070282,
... |
func (v *File) SetName(name string) *File {
v.Name = name
return v
} | [
-0.055471207946538925,
-0.30651992559432983,
0.26520392298698425,
0.05212586745619774,
-0.6831950545310974,
-0.24594849348068237,
0.08899788558483124,
0.826906681060791,
-0.7674166560173035,
0.3887653350830078,
-0.8767082095146179,
-0.6907604932785034,
-0.12236519902944565,
0.6022390127182... |
func (v *File) SetPerm(perm os.FileMode) *File {
v.perm = perm
return v
} | [
0.5629162788391113,
-0.03529353439807892,
0.2774019241333008,
1.0004748106002808,
-0.34478437900543213,
0.8393073081970215,
0.8844213485717773,
1.083359718322754,
-0.1779223382472992,
-1.024898886680603,
0.17401525378227234,
0.10453227162361145,
-0.6073422431945801,
-0.04536110535264015,
... |
func (v *File) SetExecutable() *File {
return v.SetPerm(0755)
} | [
0.5554290413856506,
-0.25020334124565125,
0.5310803055763245,
0.8199417591094971,
-0.052111148834228516,
0.9088722467422485,
1.0126005411148071,
0.040303558111190796,
-0.3921193778514862,
-0.5167043209075928,
0.05673207715153694,
0.06986933946609497,
-0.5957950353622437,
0.0986231863498687... |
func (v *File) Open() (*os.File, error) {
if v.Name == "" {
return nil, ErrNoFileName
}
return os.Open(v.Name)
} | [
-0.03019469603896141,
0.4786050319671631,
0.40803080797195435,
0.3639138638973236,
-0.869051456451416,
0.1533469408750534,
0.28190338611602783,
0.8094026446342468,
-0.12468242645263672,
-0.5071062445640564,
0.3757328987121582,
-0.20961658656597137,
-0.15408077836036682,
0.10578601807355881... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.