text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (m *UserMutation) AddedFields() []string { var fields []string return fields }
[ -0.2664056420326233, 0.18595153093338013, 0.21568825840950012, 0.28256291151046753, -0.23809736967086792, 0.9653463363647461, -0.013570401817560196, -0.31276342272758484, 0.7914599180221558, -0.7876774668693542, -0.423730731010437, 0.00200917711481452, -0.9669901728630066, -0.0008789419662...
func (m *UserMutation) AddedField(name string) (ent.Value, bool) { switch name { } return nil, false }
[ -1.4442195892333984, 0.7968376278877258, 0.636119544506073, -0.07465320080518723, -0.6861878633499146, 1.1785352230072021, -0.39178982377052307, -0.1967054307460785, 0.5517722368240356, -0.3760901391506195, -0.965008556842804, -1.199480652809143, -1.3883333206176758, -0.13831894099712372, ...
func (m *UserMutation) AddField(name string, value ent.Value) error { switch name { } return fmt.Errorf("unknown User numeric field %s", name) }
[ -0.8486489653587341, 0.7326155304908752, 0.5413942933082581, 0.6049480438232422, -0.5069535970687866, 1.4496479034423828, -0.6261854767799377, -0.4810045063495636, -0.1692114770412445, -0.23150967061519623, -0.07192987203598022, -1.053797960281372, -0.018065765500068665, 0.0838915631175041...
func (m *UserMutation) ClearedFields() []string { var fields []string if m.FieldCleared(user.FieldCreateByUser) { fields = append(fields, user.FieldCreateByUser) } if m.FieldCleared(user.FieldUpdateByUser) { fields = append(fields, user.FieldUpdateByUser) } if m.FieldCleared(user.FieldUpdateTime) { fields =...
[ -0.4676387906074524, 0.14634934067726135, 0.41774556040763855, 0.15300646424293518, -1.1148990392684937, 0.5381048917770386, 0.1151750311255455, -0.7412142753601074, 0.7267342209815979, -0.11933738738298416, -0.5311801433563232, -0.12151722609996796, -0.4901106655597687, -0.426210910081863...
func (m *UserMutation) FieldCleared(name string) bool { _, ok := m.clearedFields[name] return ok }
[ -0.6371085047721863, 0.34089627861976624, 0.6689589619636536, 0.10374023020267487, -0.6041589975357056, 0.3801896870136261, -0.7196622490882874, -0.04048862308263779, -0.106966532766819, -0.24793335795402527, -1.0349587202072144, -0.580564022064209, 0.31649249792099, -0.42457059025764465, ...
func (m *UserMutation) ClearField(name string) error { switch name { case user.FieldCreateByUser: m.ClearCreateByUser() return nil case user.FieldUpdateByUser: m.ClearUpdateByUser() return nil case user.FieldUpdateTime: m.ClearUpdateTime() return nil case user.FieldBirthday: m.ClearBirthday() retur...
[ -0.5299052596092224, 0.4068041443824768, 0.5781657695770264, 0.4261050224304199, -0.9689180850982666, 0.49463266134262085, 0.004370270762592554, -0.9704835414886475, 0.5789902806282043, 0.041463010013103485, -0.6645498275756836, -0.450395405292511, -0.25036996603012085, 0.14457856118679047...
func (m *UserMutation) ResetField(name string) error { switch name { case user.FieldCreateByUser: m.ResetCreateByUser() return nil case user.FieldUpdateByUser: m.ResetUpdateByUser() return nil case user.FieldCreateTime: m.ResetCreateTime() return nil case user.FieldUpdateTime: m.ResetUpdateTime() r...
[ -0.6800322532653809, 0.2258010059595108, 0.5936867594718933, 0.5978627800941467, -0.6176236271858215, 0.2597929835319519, 1.007076382637024, -0.7843330502510071, 0.19179952144622803, -0.31528231501579285, -0.9934830665588379, -0.16810005903244019, -0.6215687990188599, -0.31117621064186096,...
func (m *UserMutation) AddedEdges() []string { edges := make([]string, 0, 8) if m.create_by != nil { edges = append(edges, user.EdgeCreateBy) } if m.update_by != nil { edges = append(edges, user.EdgeUpdateBy) } if m.authHistories != nil { edges = append(edges, user.EdgeAuthHistories) } if m.jobHistories !...
[ -0.2729353606700897, -0.34022215008735657, 0.23560601472854614, 0.5965800881385803, 0.1153346374630928, 0.4466974139213562, -0.37393978238105774, -0.3066127896308899, 1.0873818397521973, -0.1125703975558281, 0.24733756482601166, 0.4401480555534363, -0.6672292947769165, 0.2051929384469986, ...
func (m *UserMutation) AddedIDs(name string) []ent.Value { switch name { case user.EdgeCreateBy: if id := m.create_by; id != nil { return []ent.Value{*id} } case user.EdgeUpdateBy: if id := m.update_by; id != nil { return []ent.Value{*id} } case user.EdgeAuthHistories: ids := make([]ent.Value, 0, le...
[ -0.5079579949378967, -0.7536311149597168, 0.4198032319545746, -0.23365581035614014, -0.3471957743167877, 0.23947134613990784, 0.05155044049024582, -0.25174835324287415, 0.41487908363342285, -0.2426127940416336, 0.26074182987213135, 0.4281293451786041, -0.4837733507156372, 0.323293983936309...
func (m *UserMutation) RemovedEdges() []string { edges := make([]string, 0, 8) if m.removedauthHistories != nil { edges = append(edges, user.EdgeAuthHistories) } if m.removedjobHistories != nil { edges = append(edges, user.EdgeJobHistories) } if m.removedcreates != nil { edges = append(edges, user.EdgeCreat...
[ -0.08599739521741867, -0.2215343415737152, 0.34491637349128723, 0.5559749007225037, -0.21035094559192657, 0.025205722078680992, -0.08841890841722488, 0.19133014976978302, 1.0788551568984985, -0.08736822009086609, -0.26804599165916443, 0.49854883551597595, -0.995555579662323, 0.152965486049...
func (m *UserMutation) RemovedIDs(name string) []ent.Value { switch name { case user.EdgeAuthHistories: ids := make([]ent.Value, 0, len(m.removedauthHistories)) for id := range m.removedauthHistories { ids = append(ids, id) } return ids case user.EdgeJobHistories: ids := make([]ent.Value, 0, len(m.remov...
[ -0.19778379797935486, -0.6888981461524963, 0.45758652687072754, -0.23614713549613953, -0.43241485953330994, -0.10466339439153671, 0.11042588949203491, 0.28884243965148926, 0.4641118347644806, -0.15634143352508545, -0.333096981048584, 0.5459502339363098, -0.8445385694503784, 0.0641962513327...
func (m *UserMutation) ClearedEdges() []string { edges := make([]string, 0, 8) if m.clearedcreate_by { edges = append(edges, user.EdgeCreateBy) } if m.clearedupdate_by { edges = append(edges, user.EdgeUpdateBy) } if m.clearedauthHistories { edges = append(edges, user.EdgeAuthHistories) } if m.clearedjobHi...
[ -0.7477406859397888, -0.11485902220010757, 0.282941073179245, 0.8067571520805359, -0.7131323218345642, 0.3103133738040924, -0.19547559320926666, -0.7657378911972046, 0.7598697543144226, 0.8668329119682312, 0.3237210214138031, 0.9081274271011353, -0.47291257977485657, -0.40026336908340454, ...
func (m *UserMutation) EdgeCleared(name string) bool { switch name { case user.EdgeCreateBy: return m.clearedcreate_by case user.EdgeUpdateBy: return m.clearedupdate_by case user.EdgeAuthHistories: return m.clearedauthHistories case user.EdgeJobHistories: return m.clearedjobHistories case user.EdgeCreates...
[ -0.7318886518478394, -0.1732429563999176, 0.6523093581199646, 0.10274889320135117, -0.6004686951637268, 0.5073053240776062, -0.12851157784461975, -0.642538845539093, 0.3214832544326782, 0.3916822373867035, -0.15375597774982452, 0.29314926266670227, -0.7805226445198059, -0.23515202105045319...
func (m *UserMutation) ClearEdge(name string) error { switch name { case user.EdgeCreateBy: m.ClearCreateBy() return nil case user.EdgeUpdateBy: m.ClearUpdateBy() return nil } return fmt.Errorf("unknown User unique edge %s", name) }
[ -1.0395840406417847, 1.0040639638900757, 0.32224923372268677, 1.5814902782440186, -0.5386055707931519, 0.3690008223056793, 0.1241547018289566, -0.1639208197593689, 0.39922842383384705, 0.6602963209152222, 0.23731684684753418, -0.270598828792572, -0.03391232341527939, 0.36020538210868835, ...
func (m *UserMutation) ResetEdge(name string) error { switch name { case user.EdgeCreateBy: m.ResetCreateBy() return nil case user.EdgeUpdateBy: m.ResetUpdateBy() return nil case user.EdgeAuthHistories: m.ResetAuthHistories() return nil case user.EdgeJobHistories: m.ResetJobHistories() return nil ...
[ -1.0600372552871704, 0.2066773921251297, 0.41606277227401733, 1.0853408575057983, 0.18287771940231323, -0.2111949622631073, 0.5071097016334534, -0.030714867636561394, 0.09313711524009705, 0.2766251862049103, -0.44573044776916504, 0.14471212029457092, -0.813908576965332, -0.1781948953866958...
func Shuffler(d *Deck) { neworder := make([]Card, len(d.Cards)) rand.Seed(int64(time.Now().Nanosecond())) m := make(map[int]bool) oid := 0 for { id := rand.Intn(len(d.Cards)) if _, ok := m[id]; !ok { m[id] = true neworder[oid] = d.Cards[id] oid++ } if len(m) == len(d.Cards) { break } } d.Ca...
[ -1.0576283931732178, 0.12852323055267334, 0.7007453441619873, -0.27472221851348877, -0.686604380607605, 0.01915673539042473, -0.2020406574010849, -0.12265075743198395, 0.16797217726707458, -0.07323388755321503, -0.11530687659978867, -0.36444899439811707, 0.49775761365890503, 1.328943133354...
func Detect(supported []Lang) Lang { l := esl.Default() bcp47, err := jibber_jabber.DetectIETF() if err != nil { l.Debug("unable to detect language", esl.Error(err)) return Default } return Select(bcp47, supported) }
[ 0.7501348853111267, -0.39452847838401794, 0.35970962047576904, 1.0927808284759521, -0.31103694438934326, -0.36601021885871887, -0.6268872022628784, -0.025726119056344032, 0.12135598063468933, 0.6512289643287659, -0.46597716212272644, -0.5166617035865784, -1.0002537965774536, 0.472668468952...
func StartOracle(oracleAddrString string) { // Update IP addresses accordingly for nodes in use // nodesTable = []string{"52.53.177.194:8001", "18.184.225.196:8001", "35.176.239.10:8001", "13.115.224.27:8001"} nodesTable = []string{"127.0.0.1:8001", "127.0.0.1:8002", "127.0.0.1:8003", "127.0.0.1:8004"} go startHTT...
[ 0.3140812814235687, -0.02779652178287506, 1.0908212661743164, -0.4594185948371887, 0.17525546252727509, -0.10940304398536682, 0.634640634059906, 0.8801283240318298, -0.0070181675255298615, 0.5283117294311523, -0.028010807931423187, 0.8897753357887268, 0.480835497379303, -0.3831793367862701...
func handleHTTPResponse(w http.ResponseWriter, r *http.Request) { fmt.Println(r.URL.Path) if r.Method == "GET" { if r.URL.Path == "/getpaths" { query := r.URL.Query() destination := query["dest"][0] source := query["source"][0] // sessionID := query["sid"][0] formPath(source, destination) GetLate...
[ 0.15008947253227234, -0.1692017763853073, 0.867347002029419, 0.1357821822166443, 0.5285835862159729, 0.1430751085281372, 0.7950841188430786, -0.7010974287986755, 0.8463649749755859, 0.7110691070556641, 0.2844633162021637, -0.27229249477386475, -0.9040679335594177, 0.34679272770881653, -0...
func SetupServer(serverAddr *net.UDPAddr, conn *net.UDPConn, buf []byte) { destAddr := ExtractFinalDestAddr(buf) fmt.Println("Dest Addr:", destAddr.String()) SID := "1001100110011001" decisionTable := make(map[string][]string) decisionTable[SID] = []string{nodesTable[0], nodesTable[2], destAddr.String()} Decisio...
[ -0.6340493559837341, 0.25847727060317993, 0.8438432216644287, -0.3770899772644043, 0.5561084151268005, 0.12418351322412491, 0.6354178786277771, 0.49267205595970154, -0.48941752314567566, 0.8087376952171326, -0.7236539125442505, 1.2405956983566284, -0.1382971853017807, 0.21204489469528198, ...
func UpdateRoutingTable(addr *net.UDPAddr, inBuf []byte) { // See if the routing table from this source exists for sourceAddress, routingTable := range oracleRoutingTable { // If it does exist. if sourceAddress == addr.String() { //Extract packet data packetData := ExtractPacketData(inBuf) //Convert Byte...
[ -0.7037302851676941, 0.017138442024588585, 0.6549507975578308, -0.771593451499939, -0.1389075368642807, -0.11239328235387802, 0.45934155583381653, 1.0716191530227661, 0.4079570174217224, 1.0011866092681885, -0.7243783473968506, 0.6165631413459778, -0.6437686681747437, 0.25801870226860046, ...
func SelectPath(conn *net.UDPConn) { latency1to2 := oracleRoutingTable[nodesTable[1]][0].Latency latency2to4 := oracleRoutingTable[nodesTable[3]][1].Latency latency1to3 := oracleRoutingTable[nodesTable[2]][0].Latency latency3to4 := oracleRoutingTable[nodesTable[3]][2].Latency // fmt.Println("1to2:", latency1to2, "...
[ -0.17786414921283722, 0.4374243915081024, 0.9339790344238281, 0.18530035018920898, 0.8012527227401733, 0.09926015883684158, 0.17248165607452393, 0.28919482231140137, -0.5266123414039612, 0.8867183327674866, -0.3343949019908905, 0.6641207933425903, -0.36357006430625916, 0.22346286475658417,...
func setPath(path []string, sessionID string) { decisionTable := make(map[string][]string) decisionTable["0001000100010001"] = path DecisionTable = decisionTable packetData := DecisionTableToByteArray(DecisionTable) blinkPacket := MakeBlinkPacket("0001000100010001", oracleAddr, oracleAddr, DecisionTableType, pack...
[ 0.09094016999006271, 0.2471122145652771, 0.48294222354888916, 0.13400907814502716, 0.5492207407951355, 0.6560162901878357, 0.34713736176490784, 0.43984416127204895, -0.037367548793554306, 1.0285921096801758, -0.32910391688346863, 0.8478802442550659, -0.4760759174823761, 0.3895161747932434,...
func formPath(nodeA string, nodeB string) { // Forms 3 paths from source(A) to destination(B) var bounceNode string pathIndex := 0 for i := range pathsArray { pathsArray[i] = make([]string, 3) } for i := 0; i < len(nodesTable); i++ { /* If middle node is not equal to A then set middle node equal to boun...
[ -0.2290055900812149, -0.20066185295581818, 0.662327766418457, -0.5894818902015686, 0.030138453468680382, 0.3104241192340851, 0.9710164666175842, -0.12938015162944794, -0.21984338760375977, 0.6437609791755676, -0.32262346148490906, 0.1563589870929718, -0.20992322266101837, 0.335868030786514...
func GetLatencyForPaths() { /* Gets latency for each path and puts it in latencyArray at corresponding index The 3 paths will then be showed to the user */ latencyIndex := 0 for i := 0; i < len(pathsArray); i++ { if pathsArray[i][1] == pathsArray[i][2] { latencyArray[latencyIndex] = -1 } else { // La...
[ 0.349332332611084, -0.06062857061624527, 0.841005802154541, -0.3239397406578064, 0.37553533911705017, -0.27886056900024414, 0.19425874948501587, 0.17393165826797485, -0.06406628340482712, 0.8135576248168945, 0.18091681599617004, -0.09166917949914932, 0.0925198569893837, -0.1142114251852035...
func sortLatencyAndPathArrays() { fmt.Println("Before:", latencyArray) fmt.Println(pathsArray) for i := 0; i < len(pathsArray)-1; i++ { for j := 0; j < len(pathsArray)-1; j++ { if latencyArray[j] > latencyArray[j+1] { tmpLat := latencyArray[j] tmpPath := pathsArray[j] latencyArray[j] = latencyArra...
[ 0.3874179422855377, -0.5809637904167175, 0.867958664894104, -0.4445587396621704, -0.2867804765701294, 0.2790680527687073, 0.4788849353790283, -0.4477175772190094, 0.03384597972035408, -0.027171744033694267, 0.15915541350841522, 0.19936063885688782, -0.7741491198539734, 0.8779094219207764, ...
func oracleRoute(A string, B string) int { for j := 0; j < len(oracleRoutingTable[A]); j++ { if oracleRoutingTable[A][j].Addr == B { return j } } return -1 }
[ -0.1806018054485321, 0.0821426510810852, 0.6755679845809937, -0.620333731174469, -0.01005692407488823, -0.6304745674133301, 0.09204570204019547, 0.5476992726325989, -0.2947700321674347, 1.715255856513977, 0.8139880299568176, 0.34400099515914917, -0.6524010300636292, -0.9030884504318237, ...
func InitHandler(router *mux.Router, chain *alice.Chain) error { router.Path("/healthz").Handler(chain.ThenFunc(healthEndpoint)).Methods("GET") return nil }
[ 0.2631606161594391, -0.6403701901435852, 0.336810827255249, 0.6058171987533569, 0.8203050494194031, 0.41560861468315125, 0.09600293636322021, 0.6574794054031372, -0.29415979981422424, -0.6076809167861938, -0.1087166965007782, 0.15442129969596863, 0.022202488034963608, 0.45462512969970703, ...
func InitRouter() *gin.Engine { r := gin.Default() r.Use(CORS()) store := cookie.NewStore([]byte("secret")) r.Use(sessions.Sessions("mysession", store)) // Endpoints related to authenication authRoutes := r.Group("/auth") { authRoutes.POST("/signup", controllers.SignUp) authRoutes.POST("/login", controlle...
[ -0.7146447896957397, -0.16725072264671326, 0.8801184296607971, 0.6446146965026855, 0.2758493721485138, 0.2165600210428238, 0.19233325123786926, -0.05999002978205681, -0.16930636763572693, -0.10674772411584854, -0.4436681270599365, 0.5065417289733887, -0.011078665032982826, 0.48630392551422...
func (r *runner) UpdateTestRun(ctrl controller.Interface, testRun *v1alpha1.TestRun) error { if testRun.Status.Status == v1alpha1.TestRunComplete { log.Printf(" | '%v/%v' is already Complete - Skipping", testRun.Namespace, testRun.Name) return nil } if testRun.Status.Status == "" { err := initializeStatus(c...
[ -1.1121938228607178, -0.7990724444389343, 0.5915622711181641, 0.20709393918514252, -0.18931059539318085, -0.08664870262145996, 0.6677197813987732, -0.411265105009079, -0.1018768697977066, 0.093254953622818, -0.31622475385665894, -0.45596542954444885, -0.6462174654006958, 1.3092153072357178...
func EvalPostfix(in string) (float64, error) { // handles special cases if in == "" { return math.NaN(), fmt.Errorf("Empty expression") } s := collection.NewArrayStack() var f float64 var err error var o func(collection.Stack) error c, b := "", "" for _, t := range in + " " { c = string(t) if c =...
[ 0.41440510749816895, 0.4790325164794922, 0.7410763502120972, -0.055623169988393784, -0.961418092250824, -0.7563673853874207, -0.1313706934452057, 0.42593979835510254, -0.5771267414093018, -0.30221229791641235, -0.7768760323524475, 0.3825116455554962, -0.666609525680542, 0.3395460247993469,...
func resolveOperator(s string) (func(collection.Stack) error, error) { o, ok := operators[s] if ok { return o, nil } return nil, fmt.Errorf("Unknown operator %q", s) }
[ -0.4673188030719757, 0.5402960777282715, 0.42242541909217834, 0.10955143719911575, -0.4904648959636688, -1.3550382852554321, 0.29278674721717834, 0.0487106591463089, 0.49347758293151855, -0.18015193939208984, -0.5859532356262207, -0.7995036840438843, 0.2777629494667053, -0.1779421716928482...
func resolveFunction(s string) (func(collection.Stack) error, error) { f, ok := functions[s] if ok { return f, nil } return nil, fmt.Errorf("Unknown operator %q", s) }
[ -0.1143297553062439, 0.7081419229507446, 0.31174033880233765, 0.3140033781528473, 0.51426762342453, -1.4208968877792358, 0.20580600202083588, 0.1546797901391983, -0.20826604962348938, -0.22242148220539093, -0.6546831130981445, -0.5555126070976257, 0.07497178763151169, -0.5860822200775146, ...
func hasMeta(path string) bool { magicChars := `*?[` if runtime.GOOS != "windows" { magicChars = `*?[\` } return strings.ContainsAny(path, magicChars) }
[ -0.12630313634872437, -0.24685674905776978, 0.6102897524833679, 0.7228330373764038, 0.10678856819868088, -0.17048083245754242, -0.41586828231811523, 1.2126059532165527, -0.41647571325302124, -0.14870290458202362, 0.23602329194545746, 0.16734939813613892, -0.20936380326747894, 0.39050015807...
func Globs(paths []string) ([]string, error) { expandedPaths := make([]string, 0, len(paths)) seenPaths := make(map[string]struct{}, len(paths)) for _, path := range paths { globbed, err := filepath.Glob(path) if err != nil { return nil, err } for _, gPath := range globbed { if _, seen := seenPaths[gP...
[ -0.23644791543483734, 0.5524381399154663, 1.0294411182403564, 0.4090122580528259, -0.15555638074874878, 0.3757566213607788, 0.2659284472465515, -0.4092608392238617, 0.18818172812461853, 0.4202815592288971, 1.2408692836761475, -0.1705581694841385, 0.40680426359176636, 0.6208740472793579, ...
func (df *DataFrame) String() string { return df.stringify() }
[ -0.5353599190711975, 0.0671718567609787, -0.19771644473075867, -0.5498025417327881, 0.16673237085342407, -0.15523606538772583, 0.3551158607006073, -0.6718389987945557, -0.6871262788772583, -1.010129690170288, 0.16124221682548523, 0.8051638603210449, -0.04708678275346756, -0.568667948246002...
func (DataFrame) Type() string { return fmt.Sprintf("%s.DataFrame", Name) }
[ -0.29824700951576233, 0.5919107794761658, 0.3817642331123352, -0.2985450327396393, 0.7160845994949341, 0.1259751319885254, 0.3482399582862854, -0.8392056226730347, 0.21346525847911835, -0.5415143370628357, 0.018543900921940804, 0.2731717824935913, 0.14949609339237213, 0.2673667073249817, ...
func (df *DataFrame) Freeze() { df.frozen = true }
[ -1.327810525894165, 0.9187992215156555, 0.2557292580604553, 0.5574113726615906, 1.0221048593521118, 0.2113291323184967, 0.060993146151304245, -0.1570589393377304, -1.0101946592330933, -0.4004448354244232, -0.1585717797279358, 0.3032437264919281, -0.32379260659217834, -0.256687730550766, ...
func (df *DataFrame) Hash() (uint32, error) { return 0, fmt.Errorf("unhashable: %s", df.Type()) }
[ 0.38120707869529724, 1.364575982093811, 0.5435810089111328, 0.6169291138648987, 0.40909039974212646, 0.22314074635505676, 0.6072304844856262, 0.19246336817741394, -0.8671277165412903, -0.6462898254394531, -0.03904901072382927, 0.7652654051780701, -0.19700154662132263, -0.2961409091949463, ...
func (df *DataFrame) Truth() starlark.Bool { // NOTE: In python, calling bool(DataFrame) raises this exception: "ValueError: The truth // value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()." // Since starlark does not have exceptions, just always return true. return true }
[ -0.5489592552185059, 0.41367003321647644, 0.5007655024528503, 0.22232189774513245, 1.1599416732788086, 0.37928786873817444, -0.4809388816356659, 0.4609108865261078, -0.37645423412323, -1.2870649099349976, -0.5139336585998535, 0.14998963475227356, -0.35335996747016907, -0.24180814623832703,...
func (df *DataFrame) Attr(name string) (starlark.Value, error) { switch name { case "columns": return df.columns, nil } return builtinAttr(df, name, dataframeMethods) }
[ -0.48252856731414795, 0.007105635013431311, 0.21639589965343475, 0.07640866935253143, -0.6534201502799988, -1.032207727432251, 0.39701247215270996, 0.10617264360189438, -0.49555301666259766, -0.8608867526054382, 0.3440554440021515, 0.7238906025886536, 0.7209379076957703, -0.078903868794441...
func (df *DataFrame) AttrNames() []string { methodNames := builtinAttrNames(seriesMethods) return append([]string{"columns"}, methodNames...) }
[ -0.9244799613952637, 0.47454553842544556, 0.4102908670902252, 0.09844589978456497, 0.03496096655726433, -0.5742090940475464, -0.46084463596343994, -0.0507693849503994, -0.019500605762004852, -0.11048410087823868, -0.16492366790771484, 0.746601402759552, 0.8056913614273071, 0.27683839201927...
func (df *DataFrame) SetField(name string, val starlark.Value) error { if df.frozen { return fmt.Errorf("cannot set, DataFrame is frozen") } if name == "columns" { idx, ok := val.(*Index) if !ok { return fmt.Errorf("cannot assign to 'columns', wrong type") } df.columns = idx return nil } return sta...
[ -1.1185319423675537, 0.92167067527771, 0.32503560185432434, -0.42230454087257385, -0.4117997884750366, 0.4090924859046936, -0.07408318668603897, -0.9133517146110535, -1.019797444343567, 0.11723966151475906, -0.4417317807674408, -0.07572302222251892, -0.1910981684923172, 0.36840254068374634...
func (df *DataFrame) SetKey(nameVal, val starlark.Value) error { if df.frozen { return fmt.Errorf("cannot set, DataFrame is frozen") } name, ok := toStrMaybe(nameVal) if !ok { return fmt.Errorf("SetKey: name must be string") } // Figure out if a column already exists with the given name columnIndex := find...
[ -0.8742494583129883, 0.4924910366535187, 0.8658668994903564, -0.03790903091430664, -0.5997961759567261, -0.6984196901321411, 0.13929593563079834, -0.9841173887252808, -0.11406946182250977, 0.8133547902107239, -0.05244520306587219, 0.951231062412262, 0.06768185645341873, 0.4685600996017456,...
func (df *DataFrame) Get(keyVal starlark.Value) (value starlark.Value, found bool, err error) { key, ok := toStrMaybe(keyVal) if !ok { return starlark.None, false, fmt.Errorf("Get key must be string") } // Find the column being retrieved, fail if not found keyPos := findKeyPos(key, df.columns.texts) if keyPos ...
[ -1.0301826000213623, -0.03908417001366615, 0.6920572519302368, -0.8193442821502686, -0.27905988693237305, -0.46146780252456665, -0.6066904664039612, -0.8901835680007935, -0.5716209411621094, -0.2764486074447632, 0.2438560128211975, 1.0608586072921753, -0.3159395158290863, -0.09219493716955...
func dataframeApply(thread *starlark.Thread, b *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error) { var ( funcVal, axisVal starlark.Value ) self := b.Receiver().(*DataFrame) if err := starlark.UnpackArgs("apply", args, kwargs, "function", &funcVal, "axis?", &axisVal, /...
[ -0.13009995222091675, 0.3401007652282715, 0.7234160900115967, -0.1266598254442215, -0.4588828980922699, -0.9296724796295166, 0.006110316142439842, -0.2800070643424988, -0.18978585302829742, -0.3329916298389435, 0.024218469858169556, 0.9761784672737122, -0.28074878454208374, -0.105449117720...
func dataframeHead(_ *starlark.Thread, b *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error) { var nVal starlark.Value if err := starlark.UnpackArgs("head", args, kwargs, "n?", &nVal, ); err != nil { return nil, err } self := b.Receiver().(*DataFrame) numRows, ok := toIn...
[ -0.7227442264556885, 1.1647579669952393, 0.644802451133728, 0.08975011855363846, -0.04801880940794945, -0.6111229658126831, 0.29722267389297485, -0.6317170262336731, -0.2650679647922516, -0.2320863902568817, -0.06677722185850143, 0.5524316430091858, -0.46364626288414, -0.031819041818380356...
func dataframeGroupBy(_ *starlark.Thread, b *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error) { var by starlark.Value if err := starlark.UnpackArgs("groupby", args, kwargs, "by", &by, ); err != nil { return nil, err } self := b.Receiver().(*DataFrame) byList, ok := by....
[ -0.8384444117546082, 0.8777782917022705, 0.3380970358848572, -0.6600625514984131, -0.34765857458114624, -1.7930638790130615, 0.2782762050628662, -0.42345407605171204, -1.0030078887939453, 0.11917377263307571, -0.07967185229063034, 0.0065118069760501385, -0.6541157960891724, 0.0845930054783...
func dataframeDropDuplicates(_ *starlark.Thread, b *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error) { var ( subset starlark.Value ) self := b.Receiver().(*DataFrame) if err := starlark.UnpackArgs("drop_duplicates", args, kwargs, "subset?", &subset, ); err != nil { ret...
[ -0.7394300699234009, 0.6187096834182739, 0.6026639342308044, -0.66440349817276, -0.39260363578796387, -0.9438262581825256, 0.38643014430999756, -0.13451334834098816, -0.6974548101425171, -0.31676313281059265, -0.28820568323135376, 0.5266205072402954, -0.021270325407385826, -0.3201663792133...
func dataframeMerge(_ *starlark.Thread, b *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error) { var ( right, leftOn, rightOn, how starlark.Value suffixesVal starlark.Value ) self := b.Receiver().(*DataFrame) if err := starlark.UnpackArgs("merge", args, kwarg...
[ -1.392810344696045, 0.575179934501648, 0.7938424348831177, 0.18860769271850586, -0.009513653814792633, -0.8625800013542175, -0.5578368306159973, 0.061466045677661896, -0.6134881377220154, -0.4973958730697632, -0.9300490617752075, 0.17704200744628906, -0.9338011145591736, 0.533928632736206,...
func dataframeResetIndex(_ *starlark.Thread, b *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error) { if err := starlark.UnpackArgs("reset_index", args, kwargs); err != nil { return nil, err } self := b.Receiver().(*DataFrame) if self.index == nil { return self, nil } new...
[ -0.998346745967865, 0.4214249849319458, 0.5449495315551758, -0.8696389198303223, 0.4968411326408386, -0.9970619678497314, 0.430557519197464, -0.26758551597595215, -0.5383709669113159, -0.326832115650177, -0.5534783601760864, 0.9959550499916077, -0.7560891509056091, -1.252334475517273, 0....
func NewEdge(from, to string, edgeType EdgeType, edgeDir EdgeDir, label string, color Color, style Style, arrowHead, arrowTail ArrowType) Edge { return Edge{ From: from, To: to, EdgeType: edgeType, EdgeDir: edgeDir, Label: label, Color: color, Style: style, ArrowHead: arrowHe...
[ -0.7095820903778076, -0.8316912651062012, 0.4610269069671631, -0.11938208341598511, -0.3779487609863281, 0.04204333946108818, -1.0274016857147217, -0.1250654011964798, 0.11153869330883026, 0.24243681132793427, 0.2761884927749634, 0.9542405009269714, 0.04365691542625427, -0.3511271476745605...
func (e *Edge) DotCode() string { first := true buf := new(bytes.Buffer) buf.WriteString(e.From + " " + string(e.EdgeType) + " " + e.To + " [") first = addListAttr(buf, first, "dirType", string(e.EdgeDir)) first = addListAttr(buf, first, "label", fmt.Sprintf("%q", e.Label)) first = addListAttr(buf, first, "color...
[ -0.5431274175643921, -0.9942489862442017, 0.9457150101661682, -1.498428225517273, 0.08582068234682083, 0.02505035139620304, -0.3806634843349457, 0.3067733943462372, 0.3721674382686615, 0.20476660132408142, -0.32870373129844666, 0.34556844830513, 0.4729715883731842, 0.12626177072525024, -...
func New(password string) *Password { return &Password{Pass: password, Length: len(password)} }
[ -0.03923873230814934, -1.2420169115066528, 0.005333194509148598, 0.01303888764232397, -1.1835416555404663, 0.05914327874779701, -0.4322894215583801, 0.31395459175109863, 0.5343433618545532, -0.4503193497657776, -0.7791149616241455, 0.6652650237083435, 0.48846715688705444, -0.08260615915060...
func GeneratePassword(length int) *Password { passwordBuffer := new(bytes.Buffer) randBytes := make([]byte, length) if _, err := rand.Read(randBytes); err == nil { for j := 0; j < length; j++ { tmpIndex := int(randBytes[j]) % len(characters) char := characters[tmpIndex] passwordBuffer.WriteString(string(...
[ -0.28805166482925415, -0.4828643798828125, 0.5774716734886169, -0.5784991383552551, -0.10572759062051773, 0.5189711451530457, -0.4011854827404022, -0.16940610110759735, 0.7619282603263855, 0.04986919090151787, -1.1040847301483154, -0.19380827248096466, -0.9765345454216003, -0.2246761173009...
func GenerateVeryStrongPassword(length int) *Password { for { p := GeneratePassword(length) p.ProcessPassword() if p.Score == 4 { return p } } }
[ 0.520230233669281, 0.014420716091990471, 0.3992847800254822, 0.16597285866737366, 0.027653029188513756, -0.20054991543293, -0.8138992786407471, -0.3728865683078766, -0.05071977898478508, 0.07074125856161118, -1.0475155115127563, -0.5261873602867126, -0.89979487657547, 0.6471395492553711, ...
func getRandomBytes(length int) []byte { randomData := make([]byte, length) if _, err := rand.Read(randomData); err != nil { log.Fatalf("%v\n", err) } return randomData }
[ -0.19064874947071075, 0.5077435374259949, 0.25043290853500366, -0.021880725398659706, -0.41808706521987915, 0.7361000776290894, -0.7935090661048889, -0.8472412824630737, 0.99429851770401, -0.24819064140319824, -0.8800633549690247, 0.6186845898628235, -1.206068515777588, -0.0504825226962566...
func (p *Password) MD5(saltConf ...*SaltConf) ([16]byte, []byte) { if len(saltConf) > 0 { var saltLength int for _, i := range saltConf[0:] { saltLength = i.Length } salt := getRandomBytes(saltLength) return md5.Sum([]byte(fmt.Sprintf("%s%x", p.Pass, salt))), salt } return md5.Sum([]byte(p.Pass)), nil...
[ -0.5323612689971924, 0.1798231452703476, 0.6649255752563477, 0.11299195140600204, -0.13796472549438477, 0.969593346118927, 0.4840148389339447, 0.5678143501281738, -0.21041448414325714, 0.5551459789276123, -0.9509819746017456, 0.15839123725891113, -0.27763602137565613, 0.2376270741224289, ...
func (p *Password) SHA256(saltConf ...*SaltConf) ([32]byte, []byte) { if len(saltConf) > 0 { var saltLength int for _, i := range saltConf[0:] { saltLength = i.Length } salt := getRandomBytes(saltLength) return sha256.Sum256([]byte(fmt.Sprintf("%s%x", p.Pass, salt))), salt } return sha256.Sum256([]byt...
[ -0.4906888008117676, -0.09556136280298233, 0.6070372462272644, 0.34736016392707825, 0.0978543758392334, 0.6336265206336975, -0.4335305094718933, 0.45885905623435974, 0.04909637197852135, 1.0417094230651855, -1.2180635929107666, 0.15911482274532318, -0.3780246376991272, 0.13162241876125336,...
func (p *Password) SHA512(saltConf ...*SaltConf) ([64]byte, []byte) { if len(saltConf) > 0 { var saltLength int for _, i := range saltConf[0:] { saltLength = i.Length } salt := getRandomBytes(saltLength) return sha512.Sum512([]byte(fmt.Sprintf("%s%x", p.Pass, salt))), salt } return sha512.Sum512([]byt...
[ -0.5911379456520081, -0.499904990196228, 0.5305665135383606, 0.38722506165504456, -1.1238551139831543, 0.687666654586792, -1.0392807722091675, 0.5011618137359619, 0.7095900177955627, 0.2829131484031677, -0.41152411699295044, 0.28201812505722046, -0.47447669506073, 0.6810938119888306, -0....
func (p *Password) GetLength() int { return p.Length }
[ 0.59563148021698, 0.28094813227653503, 0.22717081010341644, 0.09325438737869263, 0.5062397122383118, 1.4086008071899414, 0.5452080965042114, 0.9539678692817688, 0.9851526618003845, 0.037110935896635056, -0.9514244198799133, 0.3645966053009033, -0.7825307250022888, -0.18129613995552063, 0...
func (p *Password) ProcessPassword() { matchLower := regexp.MustCompile(`[a-z]`) matchUpper := regexp.MustCompile(`[A-Z]`) matchNumber := regexp.MustCompile(`[0-9]`) matchSpecial := regexp.MustCompile(`[\!\@\#\$\%\^\&\*\(\\\)\-_\=\+\,\.\?\/\:\;\{\}\[\]~]`) if p.Length < 8 { log.Fatalln("password isn't long enou...
[ -0.28002721071243286, -0.264204204082489, 0.8765646815299988, -0.4474084973335266, 0.14708822965621948, 0.3121222257614136, 0.43417730927467346, 0.5193619132041931, 0.08960986882448196, 0.1303955614566803, 0.23483271896839142, 0.17494481801986694, -0.8445850610733032, 0.39710667729377747, ...
func searchDict(word string) bool { file, err := os.Open(wordsLocation) if err != nil { log.Fatal(err) } defer file.Close() scanner := bufio.NewScanner(file) for scanner.Scan() { if strings.Contains(strings.ToLower(scanner.Text()), word) { return true } } return false }
[ 0.2120683491230011, -0.29202911257743835, 0.7676706314086914, -1.1859287023544312, -0.9128496646881104, 0.5870569944381714, -0.8530392646789551, 0.42479562759399414, -1.0267904996871948, -0.15357568860054016, 0.08808666467666626, -0.22124384343624115, -1.0049556493759155, 0.981544375419616...
func (p *Password) GetScore() int { return p.Score }
[ -0.02717956341803074, 0.0738859698176384, 0.7968584299087524, 0.5337777733802795, 0.44521012902259827, 0.06414859741926193, -0.4346068501472473, 0.14606256783008575, 0.22799161076545715, 0.49183401465415955, -0.11357670277357101, 0.07235687971115112, -1.1788285970687866, -0.098627611994743...
func (p *Password) HasUpper() bool { return p.ContainsUpper }
[ -0.08918377012014389, -0.034872155636548996, 0.608471691608429, 0.6507214903831482, -0.051104653626680374, 0.3831150531768799, -0.49134698510169983, 1.0196622610092163, 0.4640595018863678, -0.5314521789550781, -0.15439264476299286, -0.6019321084022522, -0.7052862048149109, 0.68192011117935...
func (p *Password) HasLower() bool { return p.ContainsLower }
[ 1.0929056406021118, -0.4817499816417694, 0.4149453938007355, 0.18943026661872864, 0.21489553153514862, 0.2584676146507263, -0.8730282783508301, 0.10348121076822281, 0.14011186361312866, -0.9994310140609741, -0.16779787838459015, -0.6502839922904968, -1.6953814029693604, 1.230035424232483, ...
func (p *Password) HasNumber() bool { return p.ContainsNumber }
[ -0.36228442192077637, -0.1186264231801033, 0.494265615940094, 1.0921189785003662, 0.12797588109970093, 0.24993041157722473, 0.05250619724392891, 1.0375244617462158, 0.3862186670303345, -0.7556449174880981, -0.6467806696891785, -0.2153010368347168, -0.4678225815296173, 0.2614055573940277, ...
func (p *Password) HasSpecial() bool { return p.ContainsSpecial }
[ 0.7984449863433838, 0.37116408348083496, 0.5570228695869446, 0.6676017642021179, -0.16974210739135742, -0.18827645480632782, -0.6253349781036377, 1.3543202877044678, -0.3506253659725189, -0.2618429362773895, -0.9389499425888062, 0.37665829062461853, -0.2881016731262207, -0.0832072347402572...
func (p *Password) ComplexityRating() string { return passwordScores[p.Score] }
[ -0.16958734393119812, -0.22454863786697388, 0.46816104650497437, -0.1986529380083084, -0.473504900932312, -0.010491834953427315, -0.3910139501094818, 0.8572866916656494, 0.9240835905075073, 0.8182374835014343, 0.6353424787521362, -0.01885462924838066, -1.1138806343078613, -0.79023575782775...
func (p *Password) InDictionary() bool { return p.DictionaryBased }
[ -1.0639684200286865, -0.11380984634160995, 0.4534855782985687, -0.3415200114250183, -0.3090720772743225, 0.9538962841033936, -0.4566538631916046, 0.44445303082466125, -0.34621238708496094, 0.5212472677230835, -0.2197454869747162, -0.43149974942207336, -1.3881804943084717, 0.840314745903015...
func (h *handler) deployPlans(cluster *v3.Cluster) error { // access downstream cluster clusterCtx, err := h.manager.UserContext(cluster.Name) if err != nil { return err } // create a client for GETing Plans in the downstream cluster planConfig, err := planClientset.NewForConfig(&clusterCtx.RESTConfig) if e...
[ 0.27467167377471924, -0.539246678352356, 0.8642222285270691, 0.17769291996955872, -0.5620760321617126, 0.9515716433525085, -0.2090795636177063, -0.07289600372314453, 0.1580548882484436, 1.1654304265975952, -0.09919915348291397, 0.627865731716156, -0.6638373732566833, 0.3622788190841675, ...
func cmp(a, b planv1.Plan) bool { if a.Namespace != b.Namespace { return false } if a.Spec.Version != b.Spec.Version { return false } if a.Spec.Concurrency != b.Spec.Concurrency { return false } //TODO Refactor to not use reflection if !reflect.DeepEqual(a.Spec, b.Spec) { return false } if !reflect...
[ 0.24554181098937988, -0.6338272094726562, 0.7455020546913147, -0.41153913736343384, 0.23332104086875916, 1.199410319328308, -0.057832177728414536, -0.8334774374961853, -0.0942491814494133, 0.33478105068206787, 0.01313035935163498, 0.8377441763877869, -0.047000303864479065, -0.1672808676958...
func (*TestUser) Descriptor() ([]byte, []int) { return file_any_test_any_test_proto_rawDescGZIP(), []int{0} }
[ -0.8665078282356262, -0.02974184975028038, 0.3656846284866333, 0.873231828212738, -0.49419158697128296, -0.3937242031097412, 0.9618856906890869, -0.21763551235198975, -0.5494676828384399, -1.2067488431930542, -0.502516508102417, -0.17857716977596283, -0.2893471419811249, 1.1451928615570068...
func (*TestCar) Descriptor() ([]byte, []int) { return file_any_test_any_test_proto_rawDescGZIP(), []int{1} }
[ -1.121268630027771, -0.44341421127319336, 0.4470250606536865, -0.1728249043226242, -0.1026916652917862, -0.43315064907073975, 0.7135103344917297, -0.5954474210739136, -0.6175666451454163, -0.7252196073532104, -0.20873096585273743, 0.1281161606311798, -0.5162069201469421, 1.100580096244812,...
func (*TestRental) Descriptor() ([]byte, []int) { return file_any_test_any_test_proto_rawDescGZIP(), []int{2} }
[ -0.6694645881652832, -0.26646390557289124, 0.40205010771751404, -0.3267202079296112, 0.2306688278913498, -0.3619856834411621, 0.3655218482017517, -0.42658308148384094, -0.5736047029495239, -0.37879082560539246, -0.5530956983566284, 0.2863382399082184, -0.9869064688682556, 0.367205560207366...
func (e *DTRRethinkDBExporter) Describe(ch chan<- *prometheus.Desc) { ch <- e.metrics.clusterClientConnections ch <- e.metrics.clusterClientsActive ch <- e.metrics.clusterDocsPerSecond ch <- e.metrics.clusterQueriesPerSecond ch <- e.metrics.serverClientConnections ch <- e.metrics.serverClientsActive ch <- e.met...
[ 0.263152539730072, 0.42171669006347656, 0.7934719920158386, -0.6508448719978333, 0.6073828339576721, 0.30443957448005676, 0.3914611041545868, -0.41972288489341736, -0.4402593970298767, 0.7568560838699341, 0.03424721583724022, 1.0146222114562988, -0.23070508241653442, 0.8382289409637451, ...
func (c *Client) AcceptAttachment(ctx context.Context, params *AcceptAttachmentInput, optFns ...func(*Options)) (*AcceptAttachmentOutput, error) { if params == nil { params = &AcceptAttachmentInput{} } result, metadata, err := c.invokeOperation(ctx, "AcceptAttachment", params, optFns, c.addOperationAcceptAttachme...
[ -0.9375643134117126, 0.4381406307220459, 0.7121638059616089, -0.008585048839449883, -1.242463231086731, 0.2369796186685562, 0.995475709438324, -1.048878788948059, 0.5028249025344849, -0.31932947039604187, 0.36216676235198975, 1.1182353496551514, -0.5109633803367615, -0.3650866448879242, ...
func (s) TestInsecureCreds(t *testing.T) { tests := []struct { desc string clientInsecureCreds bool serverInsecureCreds bool }{ { desc: "client and server insecure creds", clientInsecureCreds: true, serverInsecureCreds: true, }, { desc: "client only...
[ -0.5592626929283142, 0.5362568497657776, 0.696682333946228, 0.27772989869117737, 0.6592201590538025, 0.3385283648967743, 0.44985172152519226, -0.7410299181938171, 0.007119558751583099, -0.6352221965789795, -0.4687838852405548, 0.5304012894630432, -1.161312460899353, 0.38174375891685486, ...
func (r *LabelerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { _ = log.FromContext(ctx) labeler := &nulllabelerv1.Labeler{} if err := r.Client.Get(ctx, req.NamespacedName, labeler); err != nil { // Error reading the object - requeue the request. return ctrl.Result{}, err }...
[ -1.1946179866790771, -1.2024083137512207, 0.7957766652107239, -0.019555725157260895, 0.8467528223991394, -0.4608380198478699, -1.0692611932754517, -0.2988898456096649, 0.12565094232559204, 0.060789357870817184, 0.3036635220050812, -0.37271103262901306, -0.9490869045257568, 0.79382520914077...
func (r *LabelerReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). For(&nulllabelerv1.Labeler{}). Watches( &source.Kind{Type: &core.Pod{}}, handler.EnqueueRequestsFromMapFunc(r.GetAll), ). // Uncomment the following line adding a pointer to an instance of the ...
[ 0.04257204756140709, -0.7181355953216553, 0.49637651443481445, -0.8352625370025635, 0.017827525734901428, -0.6250706911087036, 0.033764392137527466, -0.6986268758773804, 0.14874333143234253, -0.4007759392261505, 0.4664888083934784, -0.49444055557250977, -0.042888179421424866, 1.51347136497...
func (d *Device) Close() error { if d.closed { return nil } d.cancel() rv := C.ibonl(d.descriptor, 0) if err := status(rv).Err(); err != nil { return err } d.closed = true return nil }
[ 0.3154643177986145, 0.9642881751060486, 0.6192933917045593, 0.40460205078125, -0.3544411361217499, 0.3797423541545868, 0.34056800603866577, 0.046486996114254, -0.41997405886650085, -0.5725520253181458, 0.4970914423465729, 0.40597447752952576, -0.7667090892791748, 0.5063273906707764, 1.89...
func (d *Device) Local() error { rv := C.ibloc(d.descriptor) return status(rv).Err() }
[ -0.4158549904823303, -0.13575540482997894, 0.19334912300109863, -0.714324951171875, -0.11373398452997208, -0.7296039462089539, 0.9047481417655945, 0.46554306149482727, -0.4244430959224701, -0.21802003681659698, 0.3115016520023346, 1.3569740056991577, 0.533759355545044, 0.11232218146324158,...
func (d *Device) Read(buf []byte) (int, error) { var ( cbuflen = C.size_t(len(buf)) cbuf = C.malloc(cbuflen) ) // TODO(paultag): Need to check the RV here. rv := C.ibrd(d.descriptor, cbuf, C.long(cbuflen)) if err := status(rv).Err(); err != nil { return 0, err } leng := C.ibcntl i := copy(buf, C.GoByt...
[ -0.38157230615615845, 0.4576883018016815, 0.6421115398406982, -0.6760844588279724, -0.18913350999355316, 0.008970103226602077, 1.0631921291351318, -0.08996235579252243, -0.19233845174312592, -0.21690714359283447, 0.19163741171360016, 0.9072685837745667, -1.4518705606460571, -0.395802319049...
func Open(board, pad, sad int, opts *Options) (*Device, error) { ctx, cancel := context.WithCancel(opts.context()) desc := C.ibdev(C.int(board), C.int(pad), C.int(sad), 0, 0, 0) if desc == -1 { return nil, fmt.Errorf("gpib: failed to open the specified device") } return &Device{ ctx: ctx, cancel: ...
[ -0.3728688955307007, 1.2130416631698608, 0.47395119071006775, 0.11980331689119339, -0.36769089102745056, 0.662780225276947, 0.7107991576194763, 0.18300427496433258, 0.2288541942834854, -0.3120136857032776, 0.6617478728294373, 1.193416953086853, -0.9655978679656982, -0.45204663276672363, ...
func GenerateManifestForEndpoints(endpointCount int, manifestPath string) (string, int, error) { configMapStr, err := ioutil.ReadFile(path.Join(K8sManifestBase, GeneratedHTMLManifest)) if err != nil { return "", 0, err } serverTemplateStr, err := ioutil.ReadFile(path.Join(K8sManifestBase, GeneratedServerManifest...
[ -0.503034234046936, -0.19979318976402283, 0.7419267892837524, -0.40894022583961487, -0.33184128999710083, -0.010151427239179611, 0.022926660254597664, 0.24465541541576385, -0.4987408220767975, 0.2408341020345688, -0.24360567331314087, -0.18763130903244019, -0.3247383236885071, 0.4696992337...
func testType(urlString string, typ interface{}) error { slice := reflect.Indirect(reflect.ValueOf(typ)).Kind() == reflect.Slice req, err := client.NewRequest("GET", urlString, nil) if err != nil { return err } // start with a json.RawMessage so we can decode multiple ways below raw := new(json.RawMessage) _...
[ -0.12197864055633545, -0.33073827624320984, 1.0761181116104126, -0.8438166975975037, 0.48791447281837463, -0.10389965772628784, 0.2573833763599396, -0.7251553535461426, -0.08877623826265335, -0.15366439521312714, -0.2582114636898041, 0.7056660652160645, -0.14534515142440796, 0.321214854717...
func Logger() HandlerFunc { return LoggerWithWriter(DefaultWriter) }
[ 0.44856277108192444, -0.37634775042533875, 0.21311016380786896, 0.22875384986400604, 0.13921888172626495, -0.6573827862739563, 0.5759037733078003, 1.134928584098816, -0.3432706296443939, -1.269783854484558, -0.1799897402524948, -1.0109789371490479, 0.39084959030151367, 0.5724799633026123, ...
func LoggerWithWriter(out io.Writer, notlogged ...string) HandlerFunc { var skip map[string]struct{} if length := len(notlogged); length > 0 { skip = make(map[string]struct{}, length) for _, path := range notlogged { skip[path] = struct{}{} } } return func(c *Context) { // Start timer start := time....
[ -0.8559979796409607, -0.7194871306419373, 0.8869684934616089, -0.06593398749828339, -0.47676143050193787, -0.11489803344011307, 0.6489066481590271, -0.2511342465877533, -0.4256533086299896, 0.5084893703460693, -0.14819255471229553, -0.7449744939804077, 0.29553988575935364, 0.11025462299585...
func NewClaimStore(store crud.Store) Store { return Store{ backingStore: crud.NewBackingStore(store), } }
[ 0.896462619304657, -0.5495392084121704, 0.1054869145154953, -0.31140127778053284, -0.9198750257492065, -0.08445310592651367, -1.26443612575531, -0.02527407743036747, 0.9557512402534485, -0.509701669216156, 0.04382825642824173, -0.02585430070757866, 0.14011001586914062, -0.20262891054153442...
func (s Store) List() ([]string, error) { return s.backingStore.List(ItemType) }
[ -0.36589184403419495, -0.3808894753456116, 0.06553879380226135, 0.2646596431732178, 0.6307368874549866, -0.059174422174692154, -1.0616375207901, 0.4752877354621887, 1.0995855331420898, 0.6176396012306213, -1.0761473178863525, 0.10099887102842331, -0.17529267072677612, 0.3808899223804474, ...
func (s Store) Save(claim Claim) error { bytes, err := json.MarshalIndent(claim, "", " ") if err != nil { return err } return s.backingStore.Save(ItemType, claim.Installation, bytes) }
[ -0.1491652876138687, 0.031915515661239624, 0.4746963679790497, -0.517038881778717, 0.3241448998451233, -0.37451231479644775, -0.30079004168510437, 0.30616551637649536, 0.02643357403576374, 1.1140077114105225, -0.9454211592674255, 0.06312213093042374, -0.7878503799438477, 0.2161829471588134...
func (s Store) Read(name string) (Claim, error) { bytes, err := s.backingStore.Read(ItemType, name) if err != nil { if err == crud.ErrRecordDoesNotExist { return Claim{}, ErrClaimNotFound } return Claim{}, err } claim := Claim{} err = json.Unmarshal(bytes, &claim) return claim, err }
[ 0.1503618359565735, -0.7834100723266602, 0.7753633260726929, -0.48182913661003113, -0.8924161195755005, -0.16662335395812988, -0.9821683168411255, 0.21176353096961975, 0.5315942168235779, 0.5102232098579407, 0.297263503074646, 0.9649624824523926, -0.544258177280426, -0.7795466780662537, ...
func (s Store) ReadAll() ([]Claim, error) { results, err := s.backingStore.ReadAll(ItemType) if err != nil { return nil, err } claims := make([]Claim, len(results)) for i, bytes := range results { var claim Claim err = json.Unmarshal(bytes, &claim) if err != nil { return nil, fmt.Errorf("error unmarsha...
[ 0.040963299572467804, -0.6468897461891174, 0.7635263800621033, 0.20896200835704803, 0.20145918428897858, 0.15403105318546295, -1.5795668363571167, 0.3609389066696167, 0.15581625699996948, 0.1761629432439804, 0.43599069118499756, 0.9734067916870117, -0.14199353754520416, 0.2912199795246124,...
func (s Store) Delete(name string) error { return s.backingStore.Delete(ItemType, name) }
[ 0.11621876060962677, 0.5353138446807861, 0.2968674600124359, 0.3348391652107239, -0.1735246330499649, 0.23781688511371613, -0.457711398601532, -0.10110228508710861, 0.6090176701545715, 0.9251056909561157, -1.0784034729003906, -0.69646817445755, -0.985548198223114, -0.2610105872154236, 0....
func (p *RecordAPI) List(domain string) (list []Record, err error) { // Get DNS record list (POST https://dnsapi.cn/Record.List) params := url.Values{} params.Set("format", "json") params.Set("login_token", p.loginToken) params.Set("domain", domain) res, err := simpleHTTP(p.client, "POST", "https://dnsapi.cn/Reco...
[ -1.5812221765518188, -0.07041993737220764, 0.840225338935852, -0.4024263918399811, 0.3672604262828827, -0.3243005871772766, -0.86903977394104, -0.0020306063815951347, 0.3259567618370056, 0.42896175384521484, -1.1114023923873901, 0.9102839827537537, -0.6578402519226074, 0.24914440512657166,...
func (p *RecordAPI) DDNS(domain string, recordID int64, opt ...DDNSOpt) (err error) { var jsonRes struct { Status Status `json:"status"` } params := url.Values{} params.Set("record_id", strconv.FormatInt(recordID, 10)) params.Set("domain", domain) params.Set("login_token", p.loginToken) params.Set("format", "j...
[ -1.090544581413269, 0.8802561163902283, 1.1199345588684082, 0.1518024504184723, 0.6378798484802246, -0.04833381995558739, -0.08323633670806885, -0.8726699352264404, 0.3238413631916046, 0.2405068576335907, -0.7517680525779724, 1.6588324308395386, -0.5037555694580078, 0.194259911775589, -0...
func (p *RecordAPI) Create(domain string, recordType RType, value string, opt ...RecordOpt) (id int64, err error) { if recordType == "MX" && (len(opt) == 0 || opt[0].MX == 0) { return 0, errors.New("Need to set up opt.MX") } params := url.Values{} params.Set("login_token", p.loginToken) params.Set("format", "jso...
[ -0.47647276520729065, 1.1370947360992432, 0.950760543346405, 0.37821120023727417, 0.03536863625049591, 0.38906940817832947, -0.26957446336746216, -0.705892026424408, -0.3931341767311096, 0.7164876461029053, -1.022391676902771, 0.49325624108314514, -0.9676521420478821, 0.07635711133480072, ...
func (p *RecordAPI) Modify(domain string, recordID int64, recordType RType, value string, opt ...RecordOpt) (err error) { if recordType == "MX" && (len(opt) == 0 || opt[0].MX == 0) { return errors.New("Need to set up opt.MX") } params := url.Values{} params.Set("login_token", p.loginToken) params.Set("format", "...
[ -1.3310517072677612, 0.73982834815979, 1.183699607849121, 0.18401259183883667, -0.1929806023836136, 0.21506385505199432, -0.22757942974567413, 0.01408251654356718, 0.24562190473079681, 0.6368796229362488, -0.335114985704422, 0.6113612055778503, -1.1997573375701904, 0.07199874520301819, 0...
func (p *RecordAPI) Remove(domain string, recordID int64) (err error) { params := url.Values{} params.Set("login_token", p.loginToken) params.Set("format", "json") params.Set("domain", domain) params.Set("record_id", strconv.FormatInt(recordID, 10)) res, err := simpleHTTP(p.client, "POST", "https://dnsapi.cn/Re...
[ -1.4369313716888428, 0.35721465945243835, 0.6542454361915588, -0.009677529335021973, -0.17102912068367004, -0.16348394751548767, -0.5986148715019226, 0.26514652371406555, 0.04626467078924179, 0.441841185092926, -1.0579838752746582, 1.0898284912109375, -1.55300772190094, 0.00079466775059700...
func (p *RecordAPI) Remark(domain string, recordID int64, remark string) (err error) { params := url.Values{} params.Set("login_token", p.loginToken) params.Set("format", "json") params.Set("domain", domain) params.Set("record_id", strconv.FormatInt(recordID, 10)) params.Set("remark", remark) res, err := simpl...
[ -0.956952691078186, 0.12663817405700684, 0.7785756587982178, -0.38265907764434814, 0.1629079133272171, 0.16453328728675842, 0.3414173126220703, -0.2893088161945343, -0.3338285982608795, -0.04825695604085922, -0.6456165909767151, 1.5333200693130493, -1.1994094848632812, 0.9116784930229187, ...