text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (c *Controller) syncNode(key string) error {
startTime := time.Now()
glog.V(3).Infof("Syncing node")
defer func() {
glog.V(3).Infof("Finished syncing node, duration: %s", time.Now().Sub(startTime))
}()
_, _, err := cache.SplitMetaNamespaceKey(key)
if err != nil {
return err
}
node, err := c.nodeListe... | [
-0.2064334601163864,
0.500059187412262,
0.5517268180847168,
0.11658860743045807,
-0.40491369366645813,
-0.24600175023078918,
-0.35885322093963623,
0.11710867285728455,
0.27962401509284973,
1.9039322137832642,
0.06628543138504028,
1.1508582830429077,
0.40062591433525085,
0.6335599422454834,... |
func addTaintsToNode(node *corev1.Node, machine *mapiv1.Machine) {
for _, mTaint := range machine.Spec.Taints {
glog.V(3).Infof("Adding taint %v from machine %q to node %q", mTaint, machine.Name, node.Name)
alreadyPresent := false
for _, nTaint := range node.Spec.Taints {
if nTaint.Key == mTaint.Key && nTaint... | [
-0.12578406929969788,
-0.5368491411209106,
0.6095855832099915,
-1.3051644563674927,
-0.03307332471013069,
1.009552240371704,
0.16373595595359802,
-0.4092691242694855,
-0.2916853725910187,
0.28936058282852173,
0.7447989583015442,
0.8009963035583496,
0.23570048809051514,
0.7996271848678589,
... |
func Numericf(value float64, precision int) string {
return f(value, precision, "LC_NUMERIC", true)
} | [
1.15915846824646,
-0.25983890891075134,
0.4373124837875366,
-0.31810462474823,
-1.0787711143493652,
-0.4507710337638855,
-0.9245979189872742,
0.1429573893547058,
-1.1602129936218262,
-0.6135542392730713,
0.27531930804252625,
-0.6154482364654541,
0.8079026937484741,
-0.7751842737197876,
-... |
func Monetaryf(value float64, precision int) string {
return f(value, precision, "LC_MONETARY", false)
} | [
1.229752779006958,
-0.38512134552001953,
0.185800701379776,
-0.35061514377593994,
-1.094044804573059,
-0.10887652635574341,
-0.6220109462738037,
-0.43587395548820496,
-0.510378897190094,
-0.6002899408340454,
0.8512347936630249,
-0.015069103799760342,
0.4909951984882355,
-0.3323594331741333... |
func f(value float64, precision int, envvar string, fixed bool) string {
parts := strings.Split(strconv.FormatFloat(value, 'f', -1, 64), ".")
if !fixed && len(parts) > 1 {
for ; precision < len(parts[1]); precision += 1 {
if parts[1][precision] == '0' {
break
}
}
}
envlang, ok := os.LookupEnv(envvar)... | [
0.012752369046211243,
0.30588042736053467,
0.7388144731521606,
0.4130084812641144,
-0.6893115043640137,
-0.4168105721473694,
0.0752129778265953,
0.007443192880600691,
-1.3507293462753296,
-0.45785000920295715,
1.253413200378418,
-0.09190696477890015,
0.5191062092781067,
0.7136186361312866,... |
func (block *Block) translateExprLHS(expr ast.Expr) (Assignable, *GoDiag) {
switch expr.(type) {
case *ast.Ident:
ident, _ := expr.(*ast.Ident)
lVal := block.Scope.lookupVar(ident.Name)
if !lVal.LValue() {
return nil, DiagFromAST(expr, "Unable to assign to variable \"%s\".", ident)
}
return lVal, nil
de... | [
-0.07688666135072708,
-0.6143820285797119,
0.6254655718803406,
-0.30152639746665955,
-1.0317602157592773,
0.06455466151237488,
-0.6479436755180359,
0.24756595492362976,
0.09243603050708771,
1.036699891090393,
-0.21709929406642914,
0.1458175629377365,
-0.04531053453683853,
0.221864804625511... |
func (block *Block) translateAssign(assign *ast.AssignStmt) *GoDiag {
// for now, we can't do short assignments, just long assignments.
if len(assign.Lhs) != len(assign.Rhs) {
return DiagFromAST(assign, "Every variable must have an equivalent rValue")
}
for idx, lExpr := range assign.Lhs {
lValue, diag := block... | [
-0.5989581942558289,
-0.53437739610672,
0.6021826267242432,
-0.0396493524312973,
-0.9371983408927917,
-0.7520346641540527,
0.09892310202121735,
0.33103320002555847,
0.006840715184807777,
0.7527877688407898,
-0.22921986877918243,
0.30155521631240845,
0.3243532180786133,
0.8126680254936218,
... |
func main() {
start := time.Now()
data := readInData()
// Can't use go routines because I actually need checkGroupsOfOne to finish before checkGroupsOfTwo
// I'm going to keep a map of what functional dependencies I got from one and then not print them if that's what
// I get from two
relArr := checkGroupsOfOne... | [
0.163810595870018,
-0.6513530611991882,
0.6719934940338135,
0.8690500855445862,
0.11742301285266876,
0.20398160815238953,
0.10059641301631927,
0.0359526090323925,
-1.0505691766738892,
-0.4445266127586365,
-0.07656769454479218,
0.5122370719909668,
0.0672290176153183,
0.4714353382587433,
0... |
func (r *StoriesReportRequest) FillFrom(from interface {
GetUserID() (value InputUserClass)
GetID() (value []int)
GetReason() (value ReportReasonClass)
GetMessage() (value string)
}) {
r.UserID = from.GetUserID()
r.ID = from.GetID()
r.Reason = from.GetReason()
r.Message = from.GetMessage()
} | [
0.6199278235435486,
-0.15629079937934875,
0.6046271920204163,
0.057808831334114075,
0.21779756247997284,
0.4693419635295868,
-0.11568968743085861,
-0.7988321781158447,
0.01812014728784561,
-0.7683137059211731,
0.6882156133651733,
0.10310817509889603,
-0.08005661517381668,
0.860032916069030... |
func (*StoriesReportRequest) TypeID() uint32 {
return StoriesReportRequestTypeID
} | [
0.7025015354156494,
-0.3296566307544708,
0.39787599444389343,
-0.2560960352420807,
0.4614240229129791,
1.0739045143127441,
0.15168236196041107,
-0.3174666464328766,
-0.17497991025447845,
-0.7233670353889465,
0.3169925808906555,
0.017010966315865517,
-1.6046712398529053,
0.8666096329689026,... |
func (*StoriesReportRequest) TypeName() string {
return "stories.report"
} | [
0.43269938230514526,
-0.31415367126464844,
0.3957444131374359,
-0.13654333353042603,
0.4490024745464325,
0.36641013622283936,
0.3238387107849121,
-0.08398699760437012,
-0.5802007913589478,
-0.7780122756958008,
0.3504525125026703,
-0.6434434652328491,
-0.551223874092102,
0.12793034315109253... |
func (r *StoriesReportRequest) TypeInfo() tdp.Type {
typ := tdp.Type{
Name: "stories.report",
ID: StoriesReportRequestTypeID,
}
if r == nil {
typ.Null = true
return typ
}
typ.Fields = []tdp.Field{
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "ID",
SchemaName: "id",
... | [
0.8250698447227478,
-0.09873421490192413,
0.4710089862346649,
-1.0538437366485596,
0.6811010241508484,
0.38493043184280396,
0.2510990500450134,
-0.6348444819450378,
-0.9039427638053894,
-0.09145960956811905,
-0.05144040659070015,
-0.8089343905448914,
-0.48005715012550354,
-0.19798496365547... |
func (r *StoriesReportRequest) GetUserID() (value InputUserClass) {
if r == nil {
return
}
return r.UserID
} | [
1.0193759202957153,
0.053202178329229355,
0.2711675763130188,
1.2869371175765991,
0.3870336711406708,
1.4610716104507446,
1.3209210634231567,
-0.0925062820315361,
0.5990434885025024,
-1.101141333580017,
0.6522396206855774,
-0.47338858246803284,
-0.39031514525413513,
1.2172603607177734,
0... |
func (r *StoriesReportRequest) GetID() (value []int) {
if r == nil {
return
}
return r.ID
} | [
0.8255740404129028,
0.25456905364990234,
0.26855793595314026,
0.6116870045661926,
1.6298730373382568,
0.7627967000007629,
0.26081860065460205,
-0.2643470764160156,
0.7368289828300476,
-0.8165178894996643,
0.10447558015584946,
-1.0284078121185303,
-0.717297375202179,
1.3291215896606445,
0... |
func (r *StoriesReportRequest) GetReason() (value ReportReasonClass) {
if r == nil {
return
}
return r.Reason
} | [
1.220448613166809,
0.31453052163124084,
0.06330481171607971,
0.6817461848258972,
0.7944181561470032,
0.041930828243494034,
0.47918421030044556,
-0.24109774827957153,
0.9700405597686768,
-1.4785435199737549,
0.6546089053153992,
0.5872193574905396,
-0.7778242230415344,
0.5405519008636475,
... |
func (r *StoriesReportRequest) GetMessage() (value string) {
if r == nil {
return
}
return r.Message
} | [
0.30397066473960876,
0.8992974162101746,
0.12613262236118317,
0.3326357901096344,
1.0253090858459473,
-0.004908515606075525,
0.3202876150608063,
-0.5073765516281128,
-0.13205893337726593,
-1.0128082036972046,
1.7550803422927856,
-1.103275179862976,
-0.7869126796722412,
1.057184100151062,
... |
func (c *Client) StoriesReport(ctx context.Context, request *StoriesReportRequest) (bool, error) {
var result BoolBox
if err := c.rpc.Invoke(ctx, request, &result); err != nil {
return false, err
}
_, ok := result.Bool.(*BoolTrue)
return ok, nil
} | [
-0.1775948703289032,
1.2034049034118652,
0.5796091556549072,
0.001451005577109754,
0.48692744970321655,
0.23120182752609253,
0.21358095109462738,
-0.36224326491355896,
-0.8657335042953491,
-0.6250838041305542,
0.1147906631231308,
-0.780377984046936,
-0.7823600769042969,
-0.0320921950042247... |
func (o Orientation) Validate() error {
switch o {
case OrientationNorth, OrientationEast, OrientationSouth, OrientationWest:
return nil
default:
return ErrorInvalidOrientation
}
} | [
-0.22969692945480347,
0.2162761390209198,
0.3720687925815582,
0.6050059795379639,
0.23438380658626556,
0.07309287786483765,
0.937197744846344,
-0.7485543489456177,
0.12956266105175018,
0.4535271227359772,
0.35595208406448364,
-0.6414411664009094,
-0.19882220029830933,
-1.0574833154678345,
... |
func (p *Stream) Release() {
p.Reset()
streamCache.Put(p)
} | [
-0.6203368902206421,
0.6633856892585754,
-0.013257036916911602,
-0.11286626756191254,
-0.12347141653299332,
-0.13705085217952728,
-0.3593033254146576,
-0.10936707258224487,
0.3144845962524414,
-0.007523862179368734,
-0.33985424041748047,
1.2687965631484985,
-1.286843180656433,
0.5322337746... |
func (p *Stream) GetReadPos() int {
return p.readSeg*streamBlockSize + p.readIndex
} | [
0.47020241618156433,
-0.16101469099521637,
0.8769916296005249,
-0.31982654333114624,
-0.6265015602111816,
-0.18854045867919922,
0.05735582858324051,
-0.39222946763038635,
-0.3192788362503052,
-0.426766037940979,
0.43805456161499023,
-0.07074452191591263,
-0.8313897252082825,
-0.88187515735... |
func (p *Stream) SetReadPos(pos int) bool {
if pos >= streamPosBody {
readSeg := pos / streamBlockSize
readIndex := pos % streamBlockSize
if (readSeg == p.writeSeg && readIndex <= p.writeIndex) ||
(readSeg < p.writeSeg) {
p.readIndex = readIndex
if p.readSeg != readSeg {
p.readSeg = readSeg
p.re... | [
-0.32938477396965027,
-0.6799420118331909,
0.9270391464233398,
-0.5514572858810425,
-0.9075536727905273,
0.08953671902418137,
-0.01642571948468685,
-1.0129249095916748,
-0.02568649686872959,
-0.020230857655405998,
-0.12498436123132706,
-0.5639771223068237,
-0.8223242163658142,
-0.639997899... |
func (p *Stream) CanRead() bool {
return p.readIndex < p.writeIndex || p.readSeg < p.writeSeg
} | [
0.46320706605911255,
-0.6889898180961609,
0.5091667175292969,
0.19515737891197205,
0.05296093970537186,
1.2565362453460693,
-0.11237964034080505,
-0.06972771137952805,
-0.9022113084793091,
-0.33596107363700867,
1.6213860511779785,
0.6435637474060059,
-0.8433617949485779,
-0.8062784075737,
... |
func (p *Stream) IsReadFinish() bool {
return p.readIndex == p.writeIndex && p.readSeg == p.writeSeg
} | [
-0.17912842333316803,
-1.2555339336395264,
0.38627463579177856,
-0.3234764039516449,
0.8796244859695435,
0.13002607226371765,
-0.3340221643447876,
-1.1762186288833618,
-0.3182333707809448,
0.014176416210830212,
0.06961271166801453,
0.41064950823783875,
-0.5475194454193115,
-0.2053163200616... |
func (p *Stream) peekSkip() (int, byte) {
op := p.readFrame[p.readIndex]
if skip := readSkipArray[op]; skip > 0 && p.CanRead() {
return skip, op
} else if skip < 0 {
return 0, op
} else if p.isSafetyReadNBytesInCurrentFrame(5) {
b := p.readFrame[p.readIndex:]
return int(uint32(b[1]) |
(uint32(b[2]) << 8)... | [
-0.7944362163543701,
-0.1622471809387207,
1.0630946159362793,
0.1658233255147934,
-1.051560878753662,
-0.4244706332683563,
0.7808667421340942,
-0.40710732340812683,
0.3407807946205139,
0.29316654801368713,
-0.1799508035182953,
0.358828067779541,
-0.3752720355987549,
-0.38277900218963623,
... |
func (p *Stream) WriteBool(v bool) {
switch v {
case true:
p.writeFrame[p.writeIndex] = 2
case false:
p.writeFrame[p.writeIndex] = 3
}
p.writeIndex++
if p.writeIndex == streamBlockSize {
p.gotoNextWriteFrame()
}
} | [
-0.5002294182777405,
0.35132497549057007,
0.69439697265625,
0.48219481110572815,
0.7194332480430603,
0.16302606463432312,
1.0638340711593628,
0.22977694869041443,
-0.21820442378520966,
0.5994497537612915,
-0.9421860575675964,
0.10872091352939606,
-0.6653640270233154,
-0.01670411415398121,
... |
func (p *Stream) WriteFloat64(value float64) {
if value == 0 {
p.writeFrame[p.writeIndex] = 4
p.writeIndex++
if p.writeIndex == streamBlockSize {
p.gotoNextWriteFrame()
}
} else {
v := math.Float64bits(value)
if p.writeIndex < streamBlockSize-9 {
b := p.writeFrame[p.writeIndex:]
b[0] = 5
b[1] ... | [
-0.5985109210014343,
0.859176754951477,
0.9594458341598511,
0.4146462678909302,
0.499835342168808,
-0.37338417768478394,
1.080358624458313,
-0.7756336331367493,
0.0810406357049942,
-0.07964333891868591,
-0.6122332215309143,
0.16585512459278107,
-1.069669485092163,
1.1162934303283691,
-0.... |
func (p *Stream) WriteInt64(v int64) {
if v > -8 && v < 33 {
p.writeFrame[p.writeIndex] = byte(v + 21)
p.writeIndex++
if p.writeIndex == streamBlockSize {
p.gotoNextWriteFrame()
}
return
}
if v >= -32768 && v < 32768 {
v += 32768
if p.writeIndex < streamBlockSize-3 {
b := p.writeFrame[p.writeInd... | [
-0.7634744048118591,
0.28665658831596375,
1.1748318672180176,
0.32625114917755127,
0.27986645698547363,
-0.3925676941871643,
1.199397087097168,
-0.7779495120048523,
0.20255477726459503,
0.11995191872119904,
-0.6072369813919067,
0.28017669916152954,
-1.092939019203186,
0.3540334403514862,
... |
func (p *Stream) WriteUint64(v uint64) {
if v < 10 {
p.writeFrame[p.writeIndex] = byte(v + 54)
p.writeIndex++
if p.writeIndex == streamBlockSize {
p.gotoNextWriteFrame()
}
} else if v < 65536 {
if p.writeIndex < streamBlockSize-3 {
b := p.writeFrame[p.writeIndex:]
b[0] = 9
b[1] = byte(v)
b[2]... | [
-0.9144229888916016,
0.3382714092731476,
1.1862969398498535,
-0.2115830034017563,
0.36847901344299316,
-0.5483989715576172,
1.107386827468872,
-0.48097869753837585,
0.27620983123779297,
0.016080640256404877,
-0.606225848197937,
0.21821752190589905,
-0.635357677936554,
0.2629634439945221,
... |
func (p *Stream) writeRTMap(v RTMap) string {
if thread := v.rt.thread; thread != nil {
readStream := thread.rtStream
length := int(*v.length)
if length == 0 {
p.writeFrame[p.writeIndex] = 96
p.writeIndex++
if p.writeIndex == streamBlockSize {
p.gotoNextWriteFrame()
}
return StreamWriteOK
}... | [
-0.9584212303161621,
-0.5408518314361572,
1.0993345975875854,
-0.4840267300605774,
-0.23911643028259277,
-0.43009626865386963,
0.7149015665054321,
-0.24517351388931274,
0.4524998664855957,
0.753989040851593,
-0.3734983205795288,
-0.06356175243854523,
-0.5680699348449707,
-0.339182019233703... |
func (p *Stream) ReadFloat64() (float64, *base.Error) {
v := p.readFrame[p.readIndex]
if v == 4 {
if p.CanRead() {
p.gotoNextReadByteUnsafe()
return 0, nil
}
} else if v == 5 {
if p.isSafetyReadNBytesInCurrentFrame(9) {
b := p.readFrame[p.readIndex:]
p.readIndex += 9
return math.Float64frombits(... | [
-0.10048861056566238,
-0.052575334906578064,
1.1180368661880493,
0.613890528678894,
-0.14181144535541534,
-0.8383673429489136,
0.6588315367698669,
-0.6465100646018982,
0.0835600346326828,
-0.324615478515625,
0.5660422444343567,
0.5636010766029358,
-1.1057623624801636,
0.6652922034263611,
... |
func (p *Stream) ReadInt64() (int64, *base.Error) {
v := p.readFrame[p.readIndex]
if v > 13 && v < 54 {
if p.CanRead() {
p.gotoNextReadByteUnsafe()
return int64(v) - 21, nil
}
} else if v == 6 {
if p.isSafetyReadNBytesInCurrentFrame(3) {
b := p.readFrame[p.readIndex:]
p.readIndex += 3
return int... | [
-0.3590198755264282,
-0.5047059655189514,
0.9896105527877808,
0.3915681838989258,
-0.5911850929260254,
-0.8128519058227539,
0.5894315838813782,
-0.7445671558380127,
0.3059841990470886,
0.08763999491930008,
0.6294888854026794,
0.4379749000072479,
-1.5402456521987915,
0.010081600397825241,
... |
func (p *Stream) ReadUint64() (uint64, *base.Error) {
v := p.readFrame[p.readIndex]
if v > 53 && v < 64 {
if p.CanRead() {
p.gotoNextReadByteUnsafe()
return uint64(v) - 54, nil
}
} else if v == 9 {
if p.isSafetyReadNBytesInCurrentFrame(3) {
b := p.readFrame[p.readIndex:]
p.readIndex += 3
return ... | [
-0.6239705681800842,
-0.3483375310897827,
0.9438260793685913,
0.2740205228328705,
-0.45887669920921326,
-0.6371696591377258,
0.4857739806175232,
-0.4927302598953247,
0.5190905332565308,
-0.19568392634391785,
0.7419198155403137,
0.3853868246078491,
-0.9935054183006287,
-0.03536738082766533,... |
func (p *Stream) ReadString() (string, *base.Error) {
// empty string
v := p.readFrame[p.readIndex]
if v == 128 {
if p.CanRead() {
p.gotoNextReadByteUnsafe()
return "", nil
}
} else if v > 128 && v < 191 {
strLen := int(v - 128)
if p.isSafetyReadNBytesInCurrentFrame(strLen + 2) {
if p.readFrame[p.r... | [
0.07603131979703903,
-0.3670559525489807,
0.9820903539657593,
0.1600789874792099,
-0.7607144713401794,
-0.4564950168132782,
0.44312572479248047,
-0.9683109521865845,
0.1544273942708969,
0.13578912615776062,
0.7611130475997925,
0.5803342461585999,
-0.9128564596176147,
-0.8131886720657349,
... |
func (p *Stream) ReadBytes() (Bytes, *base.Error) {
// empty bytes
v := p.readFrame[p.readIndex]
if v == 192 {
if p.CanRead() {
p.gotoNextReadByteUnsafe()
return Bytes{}, nil
}
} else if v > 192 && v < 255 {
bytesLen := int(v - 192)
ret := make(Bytes, bytesLen)
if p.isSafetyReadNBytesInCurrentFrame... | [
-0.29864701628685,
-0.010872449725866318,
0.8555291295051575,
0.08401001989841461,
-0.6760908961296082,
-0.7165161371231079,
0.4252202808856964,
-0.7235909700393677,
0.12847694754600525,
-0.21907980740070343,
0.28086626529693604,
0.7847257256507874,
-1.1870962381362915,
0.08661065995693207... |
func (p *Stream) ReadMap() (Map, *base.Error) {
v := p.readFrame[p.readIndex]
if v >= 96 && v < 128 {
mapLen := 0
totalLen := 0
readStart := p.GetReadPos()
if v == 96 {
if p.CanRead() {
p.gotoNextReadByteUnsafe()
return Map{}, nil
}
} else if v < 127 {
mapLen = int(v - 96)
if p.isSafety... | [
0.16197530925273895,
-0.593405544757843,
1.1606178283691406,
-0.011349521577358246,
-0.7991528511047363,
-0.2127687782049179,
0.4102923572063446,
-0.49188336730003357,
0.8446183204650879,
0.0032570166513323784,
0.33839526772499084,
0.58395916223526,
-0.7061976790428162,
-0.0459287725389003... |
func (p *Stream) Read() (ret Any, err *base.Error) {
defer func() {
if err != nil {
ret = nil
}
}()
op := p.readFrame[p.readIndex]
switch op {
case byte(1):
return p.ReadNil()
case byte(2):
fallthrough
case byte(3):
return p.ReadBool()
case byte(4):
fallthrough
case byte(5):
return p.ReadFloa... | [
0.021602850407361984,
-0.38939639925956726,
0.7808354496955872,
0.734842836856842,
-0.2784374952316284,
-0.5608897805213928,
0.2647274434566498,
-0.9709252715110779,
0.4557058811187744,
-0.9277188181877136,
0.6025908589363098,
0.21119819581508636,
-0.824628472328186,
0.09610810875892639,
... |
func (p *Stream) ReadRTArray(rt Runtime) (RTArray, *base.Error) {
if thread := rt.thread; thread != nil {
v := p.readFrame[p.readIndex]
if v >= 64 && v < 96 {
cs := thread.rtStream
arrLen := 0
totalLen := 0
readStart := p.GetReadPos()
if p != cs {
cs.SetReadPos(cs.GetWritePos())
if !cs.writ... | [
-0.12134380638599396,
-0.8952029347419739,
1.0587764978408813,
-0.24323947727680206,
-0.25710025429725647,
-0.433677077293396,
0.4615536332130432,
-0.8254530429840088,
0.30296075344085693,
0.44118595123291016,
0.1336853802204132,
0.707793116569519,
-1.0658278465270996,
0.5010433197021484,
... |
func (p *Stream) ReadRTMap(rt Runtime) (RTMap, *base.Error) {
if thread := rt.thread; thread != nil {
v := p.readFrame[p.readIndex]
if v >= 96 && v < 128 {
cs := thread.rtStream
mapLen := 0
totalLen := 0
readStart := p.GetReadPos()
if p != cs {
cs.SetReadPos(cs.GetWritePos())
if !cs.writeStr... | [
0.18019713461399078,
-0.7959569096565247,
0.9323437809944153,
-0.6919209957122803,
-0.40418022871017456,
-0.32607799768447876,
0.4774777591228485,
-0.773698627948761,
0.7113809585571289,
0.20243151485919952,
0.24661089479923248,
0.29835256934165955,
-1.0478320121765137,
0.14974303543567657... |
func (p *Stream) ReadRTValue(rt Runtime) (RTValue, *base.Error) {
if thread := rt.thread; thread != nil {
cs := thread.rtStream
if p != cs {
cs.SetReadPos(cs.GetWritePos())
if !cs.writeStreamNext(p) {
return RTValue{err: base.ErrStream}, base.ErrStream
}
}
if op := cs.readFrame[cs.readIndex]; op>... | [
-0.5004374384880066,
-0.49255746603012085,
0.8840576410293579,
-0.2146562933921814,
-0.6296138167381287,
-0.05590398982167244,
0.12066575884819031,
-0.6689742207527161,
-0.04247837886214256,
0.06355591863393784,
0.8465405106544495,
0.8287966847419739,
-0.20596212148666382,
0.54043006896972... |
func getFoodTarget(p *Player, data PlayerInput) (mgl32.Vec2, bool) {
targetAcquired := false
ok := false
var target mgl32.Vec2
var closestFood []int
tmpPos := p.Pos[0]
min[0], min[1] = float64(tmpPos[0]-p.viewRadius), float64(tmpPos[1]-p.viewRadius)
max[0], max[1] = float64(tmpPos[0]+p.viewRadius), float64(tmpPo... | [
-0.745780348777771,
-0.6720737814903259,
0.973457932472229,
-0.3074156939983368,
-0.4509221911430359,
-0.6780440807342529,
0.11826585233211517,
-0.6449719667434692,
-0.6451133489608765,
-0.535211443901062,
0.3305243253707886,
0.8508388996124268,
-0.5886655449867249,
0.02661057747900486,
... |
func DocxOnDiscUnzip(pathToFile string) error {
saveLocation := fmt.Sprintf("./saves/dir-%d/unzip", uuid.New())
zip, err := ExtractLocalDocx(pathToFile)
if err != nil {
panic(err)
}
if err := zip.MapFiles(saveLocation); err != nil {
return err
}
return nil
} | [
0.05879254266619682,
-0.0716627687215805,
0.7329457998275757,
0.5097209215164185,
0.16340629756450653,
-0.06568145751953125,
0.7734789252281189,
1.1027042865753174,
0.6874474287033081,
0.2673371732234955,
-0.2918947637081146,
-1.089773416519165,
1.018776535987854,
-1.1162056922912598,
0.... |
func ExtractLocalDocx(pathToFile string) (*UnZip, error) {
file, err := os.Open(pathToFile)
if err != nil {
return nil, err
}
defer file.Close()
src, err := ioutil.ReadAll(file)
if err != nil {
return nil, err
}
zipReader, err := zip.NewReader(bytes.NewReader(src), int64(len(src)))
return &UnZip{
Read... | [
0.392182320356369,
-0.17990921437740326,
0.5858873128890991,
-0.6622325778007507,
-0.5269742608070374,
-0.12492330372333527,
0.2722659707069397,
0.7104053497314453,
0.32465630769729614,
0.3044317364692688,
-0.18039211630821228,
-0.5744955539703369,
-0.07533758878707886,
-0.3186723887920379... |
func (f *UnZip) MapFiles(saveLocation string) error {
if err := os.MkdirAll(saveLocation, 0755); err != nil {
return err
}
for _, file := range f.Files {
fi := Document{file}
path := filepath.Join(saveLocation, file.Name)
dirPath := filepath.Dir(path)
os.MkdirAll(dirPath, 0777)
_, err := os.Create(path)
... | [
-0.658184289932251,
0.2994866669178009,
0.9145632982254028,
-0.37668004631996155,
-0.09566338360309601,
0.780048131942749,
1.2622740268707275,
0.3873749077320099,
0.8102928400039673,
0.594628632068634,
0.07212313264608383,
-1.3534104824066162,
-0.022355495020747185,
-0.625490665435791,
-... |
func (d *Document) CopyToOS(filePath string) error {
fileReader, err := d.Doc.Open()
if err != nil {
return err
}
defer fileReader.Close()
targetFile, err := os.OpenFile(filePath, os.O_WRONLY|os.O_TRUNC, d.Doc.Mode())
if err != nil {
return err
}
defer targetFile.Close()
if _, err := io.Copy(targetFile,... | [
-0.3008064329624176,
0.5947444438934326,
0.49353528022766113,
-0.23028667271137238,
-0.5644510984420776,
0.9916089177131653,
0.4391360580921173,
-1.0907350778579712,
0.4263996183872223,
1.2271944284439087,
-0.002557748230174184,
-0.18494223058223724,
0.7457210421562195,
-0.1791291534900665... |
func (f *UnZip) FindDoc(searchDoc string) (file *Document) {
for _, fi := range f.Files {
if fi.Name == searchDoc {
file = &Document{
Doc: fi,
}
}
}
return file
} | [
1.0562249422073364,
-0.5111193656921387,
0.45614203810691833,
-0.0994836688041687,
-0.10049783438444138,
-0.0935836061835289,
0.7862275838851929,
-0.41335228085517883,
-0.5341794490814209,
-0.23223862051963806,
0.5919398069381714,
-0.12906570732593536,
-0.32973602414131165,
0.1740197390317... |
func (d *Document) XMLExtractText() XMLDocMacroData {
var doc XMLDocMacroData
file, err := d.Doc.Open()
if err != nil {
panic(err)
}
defer file.Close()
data, err := ioutil.ReadAll(file)
if err != nil {
panic(err)
}
if err := xml.Unmarshal(data, &doc); err != nil {
panic(err)
}
return doc
} | [
0.259978711605072,
0.26592832803726196,
0.29983940720558167,
0.07441365718841553,
-1.2731825113296509,
0.062130749225616455,
-0.454895555973053,
0.17387200891971588,
0.20872986316680908,
0.5590876936912537,
0.0718020498752594,
-0.49753299355506897,
-0.7846902012825012,
-0.5674421191215515,... |
func AddonsBaseManifest(client clientset.Interface) error {
currentClusterVersion, err := kubeadm.GetCurrentClusterVersion(client)
if err != nil {
return err
}
clusterConfiguration, err := kubeadm.GetClusterConfiguration(client)
if err != nil {
return errors.Wrap(err, "Could not fetch cluster configuration")
... | [
-0.47692322731018066,
-1.4109960794448853,
0.47338104248046875,
0.1208874061703682,
-0.31405141949653625,
0.38912373781204224,
-0.9713706374168396,
-0.6060124039649963,
0.2503000795841217,
1.0102994441986084,
-0.40382567048072815,
0.8319382071495056,
-1.0791882276535034,
-0.089735113084316... |
func NewFormFromElement(elem stravaganza.Element) (*DataForm, error) {
if n := elem.Name(); n != "x" {
return nil, fmt.Errorf("xep0004: invalid form name: %s", n)
}
if ns := elem.Attribute(stravaganza.Namespace); ns != FormNamespace {
return nil, fmt.Errorf("xep0004: invalid form namespace: %s", ns)
}
typ := e... | [
0.3008088171482086,
0.2674434781074524,
0.3365950286388397,
-0.0503520667552948,
-0.7807210087776184,
-0.5049963593482971,
-0.09747809916734695,
-0.7411141991615295,
0.27877193689346313,
-0.5748575925827026,
-1.0875338315963745,
-0.028922559693455696,
0.6334323883056641,
-0.267804265022277... |
func (f *DataForm) Element() stravaganza.Element {
sb := stravaganza.NewBuilder("x")
sb.WithAttribute(stravaganza.Namespace, FormNamespace)
if len(f.Title) > 0 {
sb.WithChild(
stravaganza.NewBuilder("title").
WithText(f.Title).
Build(),
)
}
if len(f.Type) > 0 {
sb.WithAttribute("type", f.Type)
}
... | [
0.002174174878746271,
0.6643118262290955,
0.4077851474285126,
-0.15725238621234894,
-0.23189416527748108,
0.25118473172187805,
0.19070421159267426,
0.4094087779521942,
-0.21657073497772217,
-1.0244100093841553,
-0.4800772964954376,
0.6851308941841125,
0.28097760677337646,
0.004629870876669... |
func LoadConfig(fname string, ctx *interfaces.Context) (err error) {
doc, err := ioutil.ReadFile(fname)
if err != nil {
ctx.Logger.Error().Msgf("Could not read config file: %s", err.Error())
return
}
toml.Unmarshal(doc, &ctx.Config)
ctx.Logger.Debug().Msg(spew.Sprint(ctx.Config))
return nil
} | [
0.5313679575920105,
0.3979005217552185,
0.6760867238044739,
-0.3477955758571625,
-0.55504310131073,
0.5130121111869812,
-0.12135698646306992,
1.0568764209747314,
-0.3158579468727112,
0.6984688639640808,
-0.06497547030448914,
-0.14470016956329346,
0.012236460112035275,
0.3836628794670105,
... |
func New() *Config {
return &Config{DataFormat: "influx"}
} | [
0.683472216129303,
-0.7396163940429688,
0.012663199566304684,
-0.2400115728378296,
-0.7766892910003662,
-0.4316195547580719,
-0.9998417496681213,
0.5351270437240601,
-0.9987022280693054,
-0.5928186774253845,
-0.8221518993377686,
0.09216417372226715,
1.590328335762024,
0.8941364884376526,
... |
func NewTelegrafConfig(clone *Config) *serializers.Config {
tc := &serializers.Config{
DataFormat: clone.DataFormat,
GraphiteTagSupport: clone.GraphiteTagSupport,
InfluxMaxLineBytes: clone.InfluxMaxLineBytes,
InfluxSortFields: clone.InfluxSortFields,
InfluxUintSupport: clo... | [
0.6619558334350586,
-0.33434492349624634,
0.3286089301109314,
-0.8318568468093872,
-0.262890100479126,
-0.8056031465530396,
-0.284076988697052,
-0.00611635809764266,
-0.03540591150522232,
-0.1806308776140213,
-0.08231116086244583,
0.8252999782562256,
0.5515526533126831,
-0.2547504603862762... |
func (o *Object) Value() interface{} { return o } | [
-0.3082406520843506,
-0.8447490334510803,
0.42430245876312256,
0.6565030813217163,
0.37762460112571716,
1.0541744232177734,
1.2308030128479004,
-0.8404083847999573,
1.1924335956573486,
-0.016803329810500145,
-0.7481078505516052,
0.7766785621643066,
0.5212506651878357,
-0.1873629093170166,
... |
func (o *Object) GetPrototypeOf() Value {
if o.prototype == nil {
// should not happen
return Null
}
return o.prototype
} | [
0.5172150731086731,
0.5086953639984131,
0.5924739837646484,
0.3866755962371826,
-0.1423119753599167,
-1.0895253419876099,
-0.047361284494400024,
-1.0815277099609375,
1.0140140056610107,
-0.1691368967294693,
-0.48455068469047546,
-0.6154099702835083,
-0.2338319569826126,
-0.1880430579185485... |
func (o *Object) SetPrototypeOf(val Value) Boolean {
if val == Null {
o.prototype = nil
return True
}
if t := val.Type(); t != TypeObject {
panic(fmt.Sprintf("Invalid type %v for field prototype, need Object or Null", t))
}
o.prototype = val.(*Object)
return True
} | [
-0.4077671766281128,
0.316954642534256,
0.5420034527778625,
0.08688656985759735,
-0.4910314381122589,
-0.17791740596294403,
-0.056155551224946976,
-0.8164976835250854,
0.39223945140838623,
0.6182947754859924,
-1.0707628726959229,
-0.6547530889511108,
-0.11137110739946365,
-0.03848033025860... |
func (o *Object) IsExtensible() Boolean {
return Boolean(o.extensible)
} | [
0.5153419375419617,
0.45155632495880127,
0.7867582440376282,
1.027645468711853,
-0.796166718006134,
0.003175275167450309,
-0.007417698856443167,
0.04211761802434921,
0.17103955149650574,
0.9521029591560364,
-1.3894392251968384,
0.28336986899375916,
-0.35174596309661865,
-0.2773628532886505... |
func (o *Object) PreventExtensions() Boolean {
o.extensible = false
return True
} | [
-0.4424991011619568,
0.9390444755554199,
0.5696319937705994,
0.8101471662521362,
-0.8238860368728638,
0.34599801898002625,
0.6144262552261353,
-0.6281588673591614,
0.04243484139442444,
0.4214116036891937,
-0.77196204662323,
-0.7315700650215149,
-1.4326144456863403,
-0.6117255687713623,
-... |
func (o *Object) GetOwnProperty(key StringOrSymbol) *Property {
return o.fields[key]
} | [
0.27990981936454773,
-0.30233991146087646,
0.40234723687171936,
0.26254552602767944,
-0.4297568202018738,
-0.15134909749031067,
1.315638542175293,
-0.40177449584007263,
0.26128309965133667,
0.038401469588279724,
-0.28208887577056885,
0.6665700674057007,
-0.26385077834129333,
-1.02039396762... |
func (o *Object) DefineOwnProperty(key StringOrSymbol, val *Property) Boolean {
o.fields[key] = val
return True
} | [
0.30934587121009827,
-0.43004682660102844,
0.5941120982170105,
0.11437403410673141,
-0.38561707735061646,
0.0008111161296255887,
0.5766581296920776,
-0.022069880738854408,
0.10900680720806122,
-0.22863472998142242,
-0.8579650521278381,
-0.05114300921559334,
-0.07518716156482697,
-0.2127849... |
func (o *Object) HasProperty(key StringOrSymbol) Boolean {
_, ok := o.fields[key]
return Boolean(ok)
} | [
-0.18381212651729584,
-0.21069122850894928,
0.66659015417099,
-0.07883750647306442,
0.004257530905306339,
-0.3425121605396271,
0.2322155386209488,
0.6693373322486877,
0.18609942495822906,
0.5346042513847351,
-0.7324941754341125,
-0.8944279551506042,
-0.008012649603188038,
-0.46251335740089... |
func (o *Object) HasOwnProperty(key StringOrSymbol) Boolean {
panic("TODO")
} | [
0.44225355982780457,
-0.6137756109237671,
0.7706016302108765,
0.307370126247406,
-0.2839902639389038,
-0.03850381448864937,
1.1452988386154175,
0.2273918241262436,
0.17374828457832336,
0.039841875433921814,
-0.8881226181983948,
0.30346134305000305,
-0.02397320419549942,
-0.5055727958679199... |
func (o *Object) Get(key StringOrSymbol, receiver Value) Value {
if p, ok := o.fields[key]; ok {
return p.Value()
}
return Undefined
} | [
-0.6679083704948425,
0.24939624965190887,
0.27612772583961487,
-0.8005958199501038,
0.39461326599121094,
-0.8407282829284668,
-0.6598747372627258,
0.06368260085582733,
-0.11558319628238678,
-0.18127325177192688,
0.0905260518193245,
0.12383317947387695,
0.4831404685974121,
-0.97315448522567... |
func (o *Object) Set(key StringOrSymbol, val, receiver Value) Boolean {
if p, ok := o.fields[key]; ok {
return p.Set()(val)
}
return False
} | [
-1.0340784788131714,
0.6010774970054626,
0.2310207337141037,
-0.9790261387825012,
-0.34640631079673767,
0.1264176368713379,
-0.36753007769584656,
0.14715997874736786,
-0.003015228547155857,
0.4772346019744873,
-0.2474984973669052,
-0.5632812976837158,
-0.16690902411937714,
-0.5699670910835... |
func (o *Object) Delete(key StringOrSymbol) Boolean {
// FIXME: deletable?
delete(o.fields, key)
return True
} | [
-0.2995530068874359,
1.1186705827713013,
0.6223306059837341,
0.07720897346735,
-0.07315649092197418,
0.1837935894727707,
0.21173755824565887,
0.2470720261335373,
0.12332570552825928,
0.5972027778625488,
-0.8044417500495911,
-1.0827562808990479,
-0.6836206316947937,
-0.5503086447715759,
-... |
func (o *Object) OwnPropertyKeys() (res []StringOrSymbol) {
res = make([]StringOrSymbol, len(o.fields))
i := 0
for k := range o.fields {
res[i] = k
}
return
} | [
-1.1345088481903076,
-1.0733633041381836,
0.4448780417442322,
-0.1591179072856903,
0.16012124717235565,
-0.7612465620040894,
0.7309300303459167,
-0.5607889294624329,
-0.42006126046180725,
0.35431161522865295,
-1.0145277976989746,
0.8040998578071594,
-0.6662803888320923,
-0.1686368137598037... |
func crawl(url, start_domain string) (map[string]bool, map[string]bool) {
urls := make(map[string]bool)
assets := make(map[string]bool)
resp, err := http.Get(url)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
// Check response HTTP status
if resp.StatusCode != 200 {
return nil, nil
}
tokenize... | [
-0.5449535846710205,
-0.6883573532104492,
0.7627705335617065,
-0.5014259219169617,
-0.6323860287666321,
-0.4805462658405304,
0.3365981876850128,
0.07856999337673187,
-0.9918910264968872,
-0.08523226529359818,
-0.32422971725463867,
0.4727289080619812,
0.5540021061897278,
0.3579401969909668,... |
func processUrl(new_url, domain string) string {
u, err := url.Parse(new_url)
if err != nil {
log.Println("URL from page so damaged even url.Parse won't handle it -", err)
return ""
}
base, err := url.Parse(domain)
if err != nil {
log.Fatal("Should never happen, domain validated earlier -", err)
}
processe... | [
-0.004721391946077347,
-0.35062992572784424,
0.5875598192214966,
-0.15215300023555756,
0.02639416605234146,
-0.12135132402181625,
-0.20096948742866516,
0.49464571475982666,
0.019091129302978516,
0.19481506943702698,
1.0560592412948608,
0.20614488422870636,
-0.2907101809978485,
0.4669391512... |
func getMapKeys(res map[string]bool) []string {
keys := make([]string, len(res))
i := 0
for key, _ := range res {
keys[i] = key
i++
}
return keys
} | [
-1.4519522190093994,
0.09426404535770416,
0.5716888904571533,
0.4415907561779022,
-0.08426593244075775,
-0.10649207979440689,
-0.6727689504623413,
0.25909939408302307,
0.43803226947784424,
1.1090879440307617,
-0.6971590518951416,
-0.5261748433113098,
-0.30267107486724854,
-0.47777146100997... |
func validateCmdLineOpts(start_domain string, max_concurrent int) (bool, string) {
if govalidator.IsURL(start_domain) == false {
return false, fmt.Sprintf("Please specify a valid URL to crawl. You entered %s.\n", start_domain)
}
// We only need to confirm if start_domain starts with http.
// govalidator validates... | [
-0.12248332053422928,
-0.0501035638153553,
0.5462794303894043,
-0.7989521622657776,
0.32080787420272827,
0.7156480550765991,
0.4195898473262787,
-0.1912670135498047,
-0.4408632218837738,
0.2677195370197296,
0.2967566251754761,
0.3458445966243744,
-0.5504269599914551,
0.6719840168952942,
... |
func AdminUserPwdUpdate(context *gin.Context,
cacheDB int,
sqlHandle,
adminUserID,
adminUserPwd,
adminUserAginPwd string) *protocol.Response {
var pwd, oldPwd string
var err error
var oldUser *models.AdminUser
var errResult protocol.Response
if !util.VerifyPasswordFormat(pwd) {
log.Debug("Modify admin use... | [
-0.006873062811791897,
-0.6647964119911194,
0.9881970286369324,
0.22781778872013092,
-0.7185079455375671,
0.8797407150268555,
-0.05609850585460663,
-0.606987476348877,
0.7908816337585449,
1.054141640663147,
-0.09992696344852448,
0.7628269791603088,
-0.5013439059257507,
0.9965600967407227,
... |
func StringSlice(input interface{}) (output []string, err error) {
var castError error
switch castValue := input.(type) {
case StringSlicer:
output = castValue.StringSlice()
return
case []string:
output = castValue
return
case []interface{}:
output = make([]string, len(castValue))
for index := range ca... | [
-1.5280338525772095,
-0.9148762226104736,
0.8055509328842163,
-0.20067423582077026,
-0.9749469757080078,
-0.5355149507522583,
0.20239827036857605,
-0.9421994090080261,
0.18664075434207916,
0.7836821675300598,
-0.33318060636520386,
0.9397621750831604,
-0.21175245940685272,
0.752928137779235... |
func MustStringSlice(input interface{}) []string {
output, err := StringSlice(input)
if err != nil {
panic(err)
}
return output
} | [
-0.9885879755020142,
-0.8614288568496704,
0.15784339606761932,
0.6521551012992859,
0.013080612756311893,
0.5753495097160339,
-0.8456103801727295,
-1.0842365026474,
0.06362274289131165,
0.6885858774185181,
0.37376824021339417,
0.47873204946517944,
-0.2573125660419464,
0.9581364393234253,
... |
func TimeStampToSeconds(ts string) int {
totalSec := 0
data := strings.Split(ts, ":")
timeVal := []int{}
for _, val := range data {
time, err := strconv.Atoi(val)
if err != nil {
return 0
}
timeVal = append(timeVal, time)
}
for i, j := 0, len(timeVal)-1; i < j; i, j = i+1, j-1 { // reverse
timeVal[i]... | [
0.05770904943346977,
-0.044725414365530014,
0.8158429265022278,
-0.9847060441970825,
0.04648059234023094,
-0.6185102462768555,
-0.48838794231414795,
-0.397861123085022,
-0.020019598305225372,
1.1673122644424438,
-0.946316659450531,
0.06859292089939117,
0.13348840177059174,
-0.4607258737087... |
func New(config *model.NotifMail, meta model.Meta) notifier.Notifier {
return notifier.Notifier{
Handler: &Client{
cfg: config,
meta: meta,
},
}
} | [
0.41259825229644775,
-0.5984803438186646,
0.05686556547880173,
-0.26021867990493774,
-0.32609134912490845,
0.7360957264900208,
-0.18897555768489838,
0.6432991027832031,
-1.4082424640655518,
0.2681751251220703,
-0.6543052792549133,
0.753295361995697,
0.6605184674263,
0.32246968150138855,
... |
func (c *Client) Name() string {
return "mail"
} | [
0.07058854401111603,
-0.3983789384365082,
0.5603657364845276,
-0.5054958462715149,
-1.418778657913208,
0.7576900124549866,
0.12733414769172668,
-0.7257472276687622,
-0.317410409450531,
1.1185946464538574,
-1.2999566793441772,
1.2284327745437622,
-0.09373614937067032,
-0.15535248816013336,
... |
func (c *Client) Send(entry model.NotifEntry) error {
h := hermes.Hermes{
Theme: new(Theme),
Product: hermes.Product{
Name: c.meta.Name,
Link: c.meta.URL,
Logo: c.meta.Logo,
Copyright: fmt.Sprintf("%s © %d %s %s",
c.meta.Author,
time.Now().Year(),
c.meta.Name,
c.meta.Version),
},
}
... | [
0.47299274802207947,
0.8999953269958496,
0.7043640613555908,
-0.5905622243881226,
-0.22413931787014008,
0.10279927402734756,
-0.4555407762527466,
0.29568538069725037,
-1.0090906620025635,
0.6949465274810791,
-0.2736832797527313,
0.8662449717521667,
-0.04174258932471275,
-0.0860537439584732... |
func (signup *EventSignup) OnAdded(container *ioccontainer.Container) error {
err := signup.Validate()
if err != nil {
return err
}
var eventRepository EventRepository
container.Make(&eventRepository)
event, err := eventRepository.GetEventByID(signup.EventID)
if err != nil {
return err
}
err = event.Obs... | [
0.9099833369255066,
-0.3860905170440674,
1.0454192161560059,
0.12913955748081207,
-0.12773360311985016,
-0.08647289872169495,
-0.3484685719013214,
0.4536680579185486,
0.6314691305160522,
-0.06745220720767975,
-0.63791823387146,
0.12576736509799957,
0.3046588599681854,
0.45566028356552124,
... |
func (signup *EventSignup) OnDeleted(container *ioccontainer.Container) error {
err := signup.Validate()
if err != nil {
return err
}
var eventRepository EventRepository
container.Make(&eventRepository)
event, err := eventRepository.GetEventByID(signup.EventID)
if err != nil {
return err
}
return signup... | [
1.1352713108062744,
-0.4231615960597992,
0.7746078372001648,
0.3403998017311096,
-0.0965777337551117,
-0.1088244765996933,
0.04942936822772026,
0.7671023011207581,
0.8632472157478333,
-0.03502067178487778,
-0.46007388830184937,
0.16072654724121094,
-0.25656628608703613,
-0.0896947383880615... |
func PossibleActionTypeValues() []ActionType {
return []ActionType{ActionTypeInternal}
} | [
-0.5601526498794556,
-0.5830596685409546,
0.3392101228237152,
1.4000688791275024,
0.016080733388662338,
-0.2766742408275604,
-0.2958509624004364,
-0.3082595765590668,
-0.1405542939901352,
-0.6515928506851196,
-0.4285736382007599,
0.39212343096733093,
0.22798587381839752,
1.4518378973007202... |
func PossibleCreatedByTypeValues() []CreatedByType {
return []CreatedByType{CreatedByTypeApplication, CreatedByTypeKey, CreatedByTypeManagedIdentity, CreatedByTypeUser}
} | [
0.3171686828136444,
-0.2813301682472229,
0.2336374819278717,
1.6769580841064453,
0.6502969264984131,
0.40716323256492615,
0.5122723579406738,
-0.5966024994850159,
-0.6570273041725159,
-0.6844436526298523,
-0.5955080986022949,
1.0114426612854004,
-0.15979433059692383,
1.3321988582611084,
... |
func PossibleFhirResourceVersionPolicyValues() []FhirResourceVersionPolicy {
return []FhirResourceVersionPolicy{FhirResourceVersionPolicyNoVersion, FhirResourceVersionPolicyVersioned, FhirResourceVersionPolicyVersionedUpdate}
} | [
0.059683751314878464,
-1.1078437566757202,
0.04408487305045128,
0.6111934781074524,
-0.08173766732215881,
0.6409381628036499,
-0.5516185164451599,
-0.7059311270713806,
0.2828906178474426,
-0.43586310744285583,
-0.43109139800071716,
-0.08934272825717926,
0.188481405377388,
1.038153886795044... |
func PossibleFhirServiceKindValues() []FhirServiceKind {
return []FhirServiceKind{FhirServiceKindFhirR4, FhirServiceKindFhirStu3}
} | [
-0.32983916997909546,
-0.42364171147346497,
0.19729265570640564,
0.8024045825004578,
-0.09328000247478485,
-0.41824501752853394,
-0.42783838510513306,
0.6071274876594543,
-0.299985408782959,
-1.5210806131362915,
-0.3900509476661682,
0.48217713832855225,
0.28851455450057983,
1.7130130529403... |
func PossibleIotIdentityResolutionTypeValues() []IotIdentityResolutionType {
return []IotIdentityResolutionType{IotIdentityResolutionTypeCreate, IotIdentityResolutionTypeLookup}
} | [
-1.2057437896728516,
-0.28697797656059265,
0.3171790540218353,
0.2484523057937622,
1.1712456941604614,
0.14271138608455658,
-0.41503259539604187,
-0.8197063207626343,
0.3913852870464325,
-0.2640348970890045,
-1.27803635597229,
-1.0341007709503174,
-0.053353201597929,
-0.0902814045548439,
... |
func PossibleKindValues() []Kind {
return []Kind{KindFhir, KindFhirR4, KindFhirStu3}
} | [
0.19873496890068054,
0.21661101281642914,
0.29955199360847473,
1.4475626945495605,
-0.38363146781921387,
0.33596375584602356,
-0.6738696694374084,
0.38357511162757874,
-0.6410688161849976,
-0.9759423732757568,
-0.6900646686553955,
0.6318503022193909,
-0.2534843981266022,
1.4616801738739014... |
func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType {
return []ManagedServiceIdentityType{ManagedServiceIdentityTypeNone, ManagedServiceIdentityTypeSystemAssigned}
} | [
-0.2606118321418762,
-0.7066802978515625,
0.29326769709587097,
0.8034911155700684,
0.2509060800075531,
0.5264132022857666,
-0.7028776407241821,
-0.002830859273672104,
0.6903249621391296,
-0.9029682874679565,
0.07128558307886124,
0.040665093809366226,
-0.3274194300174713,
1.592347502708435,... |
func PossibleOperationResultStatusValues() []OperationResultStatus {
return []OperationResultStatus{OperationResultStatusCanceled, OperationResultStatusFailed, OperationResultStatusRequested, OperationResultStatusRunning, OperationResultStatusSucceeded}
} | [
-0.5351672172546387,
-0.2211659997701645,
0.3115444481372833,
0.7537646889686584,
-0.4468017816543579,
0.28076183795928955,
0.40015971660614014,
-0.18053175508975983,
0.10154370218515396,
-0.14105774462223053,
-1.0746928453445435,
-0.8148439526557922,
0.2655443847179413,
0.1063491180539131... |
func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState {
return []PrivateEndpointConnectionProvisioningState{PrivateEndpointConnectionProvisioningStateCreating, PrivateEndpointConnectionProvisioningStateDeleting, PrivateEndpointConnectionProvisioningStateFailed, Pr... | [
-0.6899594068527222,
-0.4892613887786865,
0.38105276226997375,
0.3316788375377655,
0.12687520682811737,
-0.08258258551359177,
-1.2575947046279907,
0.3200194537639618,
0.5821847319602966,
0.22583091259002686,
0.3631596565246582,
-1.1248290538787842,
-0.4327188730239868,
-0.4095202684402466,... |
func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus {
return []PrivateEndpointServiceConnectionStatus{PrivateEndpointServiceConnectionStatusApproved, PrivateEndpointServiceConnectionStatusPending, PrivateEndpointServiceConnectionStatusRejected}
} | [
-0.3006707727909088,
-0.7195380926132202,
0.338114857673645,
0.024111181497573853,
-0.22039826214313507,
0.47554171085357666,
-1.3126715421676636,
0.2166515588760376,
-0.001989556010812521,
-0.4374268651008606,
0.08441950380802155,
-0.4926733672618866,
-0.07652579247951508,
0.5959640741348... |
func PossibleProvisioningStateValues() []ProvisioningState {
return []ProvisioningState{ProvisioningStateAccepted, ProvisioningStateCanceled, ProvisioningStateCreating, ProvisioningStateDeleting, ProvisioningStateDeprovisioned, ProvisioningStateFailed, ProvisioningStateMoving, ProvisioningStateSucceeded, ProvisioningS... | [
-0.452738493680954,
-0.16098588705062866,
0.11163216084241867,
0.7912912368774414,
-0.9061139822006226,
0.6674906611442566,
-0.7218726277351379,
0.39039576053619385,
0.6244704127311707,
0.08521147072315216,
-0.003308852668851614,
-0.7587881684303284,
-0.0351206511259079,
0.5834293961524963... |
func PossiblePublicNetworkAccessValues() []PublicNetworkAccess {
return []PublicNetworkAccess{PublicNetworkAccessDisabled, PublicNetworkAccessEnabled}
} | [
-0.3369823098182678,
-0.2442554086446762,
0.19033992290496826,
0.35045337677001953,
-1.0118458271026611,
0.8602492213249207,
0.0652761310338974,
0.24344228208065033,
-0.44284725189208984,
-0.8383534550666809,
-0.10151536762714386,
-0.2487458735704422,
0.06268215924501419,
1.074503183364868... |
func PossibleServiceEventStateValues() []ServiceEventState {
return []ServiceEventState{ServiceEventStateDisabled, ServiceEventStateEnabled, ServiceEventStateUpdating}
} | [
0.44149839878082275,
-0.8345451354980469,
0.4143880605697632,
0.7559344172477722,
-0.8302615284919739,
0.5559016466140747,
-0.21091319620609283,
0.40417784452438354,
0.5261625051498413,
-0.6154992580413818,
-0.868223249912262,
0.048535849899053574,
-0.059314239770174026,
0.5335617661476135... |
func PossibleServiceManagedIdentityTypeValues() []ServiceManagedIdentityType {
return []ServiceManagedIdentityType{ServiceManagedIdentityTypeNone, ServiceManagedIdentityTypeSystemAssigned, ServiceManagedIdentityTypeSystemAssignedUserAssigned, ServiceManagedIdentityTypeUserAssigned}
} | [
-0.38422536849975586,
-0.4662209153175354,
0.4810057282447815,
0.11669187247753143,
0.21550540626049042,
0.3817645013332367,
-0.3493576943874359,
-0.6498974561691284,
0.5683416128158569,
-0.5965806245803833,
-0.2550075352191925,
0.6171393394470215,
-0.5456740260124207,
1.4035793542861938,
... |
func PossibleServiceNameUnavailabilityReasonValues() []ServiceNameUnavailabilityReason {
return []ServiceNameUnavailabilityReason{ServiceNameUnavailabilityReasonAlreadyExists, ServiceNameUnavailabilityReasonInvalid}
} | [
-0.7250803112983704,
-1.189928650856018,
0.20737075805664062,
-0.0792158842086792,
-0.6580997109413147,
0.9068534970283508,
-1.0309950113296509,
0.9946021437644958,
0.893264651298523,
-0.14964927732944489,
-0.008282504975795746,
0.6336208581924438,
0.29648879170417786,
0.5328901410102844,
... |
func tcpServer(cfg *ztesip.SipConfig) {
fmt.Println("Launching server...")
// listen on all interfaces
ln, _ := net.Listen("tcp", fmt.Sprintf(":%d", cfg.XmlPort))
// accept connection on port
conn, _ := ln.Accept()
// run loop forever (or until ctrl-c)
for {
// will listen for message to process ending in n... | [
0.3435676097869873,
-0.8375752568244934,
0.6802807450294495,
-0.6344348192214966,
-0.18953752517700195,
0.6352224946022034,
0.08881011605262756,
-0.1392490118741989,
-0.48083963990211487,
0.14832065999507904,
0.028937766328454018,
-0.3131876289844513,
-0.8278855085372925,
0.237057924270629... |
func (d Duration) MarshalJSON() ([]byte, error) {
return []byte(`"` + time.Duration(d).String() + `"`), nil
} | [
-0.10075737535953522,
0.4625098705291748,
0.3059486448764801,
-0.39546194672584534,
-0.7252323627471924,
0.20354829728603363,
-0.6706523895263672,
-0.2881942391395569,
0.45029017329216003,
1.2699774503707886,
-0.6898193359375,
1.046930193901062,
0.4873485863208771,
0.925434947013855,
0.1... |
func (d *Duration) UnmarshalJSON(data []byte) error {
if len(data) < 2 {
return errors.New("invalid duration string")
}
data = data[1 : len(data)-1]
du, err := time.ParseDuration(string(data))
if err != nil {
return err
}
*d = Duration(du)
return nil
} | [
-0.6360886096954346,
0.5868439078330994,
0.4358791410923004,
-0.6563972234725952,
-0.8594302535057068,
-0.11029967665672302,
0.2993973195552826,
0.1567288637161255,
0.18757446110248566,
0.9738534092903137,
-0.296888530254364,
0.38274791836738586,
0.02455807477235794,
0.2701450288295746,
... |
func (d *Dispatcher) key(m *Message) string {
// Message to runnable: Cmds
if m.To != nil && m.To.Type == RunnableIdentifierType {
return fmt.Sprintf("to.runnable.%s.%s", *m.To.Worker, *m.To.Name)
}
// Message from runnable: Events
if m.From.Type == RunnableIdentifierType {
return fmt.Sprintf("from.runnable.%... | [
-0.8164598345756531,
-0.1254797875881195,
0.6570366621017456,
-0.056756533682346344,
0.1668386608362198,
0.3879353106021881,
0.1760898381471634,
-0.245911106467247,
-1.1053798198699951,
0.8606279492378235,
-0.11690773814916611,
-0.10244262963533401,
-0.8399354219436646,
0.01293559093028307... |
func TestInitialDateTimeChecks3(t *testing.T) {
expected := false
currDate := time.Now().Format("2006-01-02")
beforeRestaurantOpenCheck, _ := restaurantBooking.InitialDateTimeChecks(currDate, "12:00")
afterRestaurantOpenCheck, _ := restaurantBooking.InitialDateTimeChecks(currDate, "22:00")
if (beforeRestaurantO... | [
-0.5086788535118103,
0.05903325974941254,
0.7715827226638794,
0.6592012047767639,
-0.44077321887016296,
1.3240467309951782,
0.20464807748794556,
0.7801668047904968,
-0.5437426567077637,
-0.43419116735458374,
-0.13746945559978485,
0.47743433713912964,
-0.461984783411026,
0.4166997969150543,... |
func TestInitialDateTimeChecks4(t *testing.T) {
expected := true
currDate := time.Now().Add(24 * time.Hour).Format("2006-01-02")
actual, _ := restaurantBooking.InitialDateTimeChecks(currDate, "15:00")
if actual != expected {
t.Fail()
}
} | [
-0.21212299168109894,
-0.5839112997055054,
0.7283722162246704,
0.9658330678939819,
-0.09652265161275864,
1.3916910886764526,
-0.10965042561292648,
0.5803097486495972,
-0.7083452939987183,
-0.4248635768890381,
-0.3956086039543152,
0.08393877744674683,
-0.626948893070221,
0.9240661263465881,... |
func Parse(rawtemplate string) (template *Template, err error) {
template = new(Template)
template.raw = rawtemplate
split := strings.Split(rawtemplate, "{")
template.parts = make([]templatePart, len(split)*2-1)
for i, s := range split {
if i == 0 {
if strings.Contains(s, "}") {
err = errors.New("unexpect... | [
-0.1903051882982254,
-0.05630066990852356,
0.8532599210739136,
0.06669033318758011,
-1.5503981113433838,
-0.4517318308353424,
0.2511453926563263,
0.4686109721660614,
-0.38889405131340027,
-0.36393606662750244,
-0.4809175133705139,
-0.47605475783348083,
-0.2425665408372879,
-0.4187956154346... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.