text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (processor *Processor) Execute(input <-chan Message) <-chan Message {
var wg sync.WaitGroup
numTasks := processor.demux.FanOut()
wg.Add(numTasks)
out := make(chan Message)
work := func(taskId int, inputStream <-chan Message) {
for message := range inputStream {
processor.process(processor.name, process... | [
-0.2539461553096771,
0.5759151577949524,
0.8372657895088196,
-0.1799982339143753,
-0.4009251594543457,
-0.16481973230838776,
0.2077808678150177,
-0.5552442073822021,
-0.8834888935089111,
0.1545441746711731,
-0.11061041802167892,
-0.0906396359205246,
-1.0639079809188843,
0.3877628743648529,... |
func NewProcessor(name string, cfg Config, process ProcessFunction, demux ChannelDemux) Processor {
return Processor{name: name, cfg: cfg, process: process, demux: demux}
} | [
-0.4029483199119568,
-0.3164786696434021,
0.14149180054664612,
-0.5629028081893921,
-1.370491623878479,
-1.2295280694961548,
-0.7613105773925781,
0.4038737416267395,
-0.20889310538768768,
-0.012856249697506428,
-0.5221274495124817,
0.12555035948753357,
-0.06916522234678268,
0.3137905299663... |
func (*MutateMediaFilesRequest) Descriptor() ([]byte, []int) {
return file_google_ads_googleads_v14_services_media_file_service_proto_rawDescGZIP(), []int{0}
} | [
-0.9376333951950073,
0.3407444655895233,
0.530022144317627,
-0.11967094242572784,
0.24073132872581482,
-0.7879758477210999,
0.41949447989463806,
-0.2705480456352234,
0.2949028015136719,
0.2947975695133209,
-0.20073986053466797,
0.4448350667953491,
-0.4701390862464905,
0.6975746750831604,
... |
func (*MediaFileOperation) Descriptor() ([]byte, []int) {
return file_google_ads_googleads_v14_services_media_file_service_proto_rawDescGZIP(), []int{1}
} | [
-0.1053488552570343,
0.9751290678977966,
0.4909307062625885,
-0.050873398780822754,
-0.7024961709976196,
-1.046748399734497,
1.0581618547439575,
1.0908491611480713,
-0.8598262071609497,
0.3199022114276886,
0.21347254514694214,
-1.2280771732330322,
-1.1524672508239746,
-0.40102607011795044,... |
func (*MutateMediaFilesResponse) Descriptor() ([]byte, []int) {
return file_google_ads_googleads_v14_services_media_file_service_proto_rawDescGZIP(), []int{2}
} | [
0.08883263915777206,
0.10066211968660355,
0.000917914614547044,
-0.3294145166873932,
0.215217724442482,
-1.079827904701233,
0.8700619339942932,
-0.2771602272987366,
0.36926376819610596,
0.7542523145675659,
-0.5898035168647766,
-0.04086504504084587,
-1.1839274168014526,
0.1457219421863556,
... |
func (*MutateMediaFileResult) Descriptor() ([]byte, []int) {
return file_google_ads_googleads_v14_services_media_file_service_proto_rawDescGZIP(), []int{3}
} | [
0.11852395534515381,
0.30712389945983887,
0.2000569999217987,
-0.09708897769451141,
0.12552258372306824,
-0.956028401851654,
0.660361111164093,
0.23273824155330658,
-0.6671662330627441,
0.15802940726280212,
-0.5232797265052795,
0.06394834071397781,
-1.011494517326355,
0.821243166923523,
... |
func DestroyPhonebook(db *gorm.DB, phonebookID int) (err error) {
err = db.Exec(`delete from phonebooks where phonebook_id = ?`, phonebookID).Error
if err != nil {
return err
}
return err
} | [
-0.3756375014781952,
0.07058737426996231,
-0.00098647759296,
0.8859180212020874,
0.20982927083969116,
0.19410423934459686,
-0.8365066051483154,
0.07880659401416779,
0.6457942128181458,
0.1789657324552536,
0.022912167012691498,
-1.4145232439041138,
-1.2243791818618774,
0.7285268902778625,
... |
func NewDeleteRuntimeContainerOK() *DeleteRuntimeContainerOK {
return &DeleteRuntimeContainerOK{}
} | [
0.16269128024578094,
-0.44245094060897827,
0.719976544380188,
0.7864536643028259,
0.021890699863433838,
-0.894934356212616,
0.26357996463775635,
0.9353349804878235,
0.3963036835193634,
-0.5929105877876282,
-0.712460994720459,
-0.42857441306114197,
0.32277756929397583,
0.21985512971878052,
... |
func (o *DeleteRuntimeContainerOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(200)
} | [
-0.41337674856185913,
-0.6140767931938171,
0.26105254888534546,
0.36295589804649353,
1.2337309122085571,
-1.3041340112686157,
0.367048054933548,
-0.11505357176065445,
0.40011945366859436,
0.2587191164493561,
0.26029467582702637,
-0.4324282109737396,
-0.5066458582878113,
0.3490253686904907,... |
func NewDeleteRuntimeContainerBadRequest() *DeleteRuntimeContainerBadRequest {
return &DeleteRuntimeContainerBadRequest{}
} | [
0.15365082025527954,
-0.3382478952407837,
0.9016379714012146,
0.6923040151596069,
0.04086005315184593,
-0.4895886480808258,
-0.7928033471107483,
0.20727890729904175,
-0.16679607331752777,
-0.9798611402511597,
0.12604045867919922,
0.7686869502067566,
-0.354005366563797,
0.8382629156112671,
... |
func (o *DeleteRuntimeContainerBadRequest) WithPayload(payload string) *DeleteRuntimeContainerBadRequest {
o.Payload = payload
return o
} | [
0.09201257675886154,
0.20358891785144806,
0.5457733869552612,
0.23992598056793213,
0.3354751169681549,
-0.8895245790481567,
-0.9970659017562866,
-0.328299343585968,
0.6094856858253479,
-0.7527338862419128,
0.811217188835144,
-0.10696566104888916,
-0.2032150775194168,
0.34013432264328003,
... |
func (o *DeleteRuntimeContainerBadRequest) SetPayload(payload string) {
o.Payload = payload
} | [
-0.38407760858535767,
0.443564236164093,
0.3444235920906067,
0.19269520044326782,
0.853689432144165,
-0.542959451675415,
-1.2636308670043945,
-0.4337749481201172,
0.2664390802383423,
-0.6678008437156677,
0.4852568507194519,
0.06889909505844116,
-0.6004923582077026,
0.7878861427307129,
1.... |
func (o *DeleteRuntimeContainerBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(400)
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
} | [
-0.5288496017456055,
-0.2215232402086258,
0.47416558861732483,
0.6660449504852295,
1.4800795316696167,
-0.7636812925338745,
-0.5422523617744446,
-0.6171743273735046,
0.8024418950080872,
0.02698300965130329,
0.3661002814769745,
-0.1578732132911682,
-0.5478742122650146,
0.00463872542604804,
... |
func NewDeleteRuntimeContainerNotFound() *DeleteRuntimeContainerNotFound {
return &DeleteRuntimeContainerNotFound{}
} | [
0.15873970091342926,
-1.120801329612732,
0.49211040139198303,
-0.07844334840774536,
0.5183684229850769,
-0.6539452075958252,
0.419095903635025,
-0.12136667221784592,
0.22449371218681335,
-0.8816618323326111,
-0.6081223487854004,
0.32761234045028687,
0.006850830279290676,
0.3650414645671844... |
func (o *DeleteRuntimeContainerNotFound) WithPayload(payload string) *DeleteRuntimeContainerNotFound {
o.Payload = payload
return o
} | [
0.00879562459886074,
-0.3428438603878021,
0.3234768509864807,
-0.46710264682769775,
0.5295620560646057,
-0.8444898724555969,
0.06019815057516098,
-0.6695582270622253,
1.034328579902649,
-0.5728738307952881,
0.0853007584810257,
-0.242771178483963,
0.19122043251991272,
0.09259044378995895,
... |
func (o *DeleteRuntimeContainerNotFound) SetPayload(payload string) {
o.Payload = payload
} | [
-0.3094921112060547,
-0.023623162880539894,
0.16864311695098877,
-0.5019098520278931,
0.8420541882514954,
-0.5224794745445251,
-0.06280653178691864,
-0.7172240018844604,
0.5763487815856934,
-0.4563160240650177,
-0.08282528072595596,
-0.08006679266691208,
-0.2807788550853729,
0.441788673400... |
func (o *DeleteRuntimeContainerNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(404)
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
} | [
-0.7188190221786499,
-0.472196102142334,
0.22456885874271393,
0.24856871366500854,
1.7240605354309082,
-0.9167399406433105,
0.39234933257102966,
-0.6132419109344482,
0.7183020710945129,
0.27033212780952454,
0.1867971569299698,
-0.3246394991874695,
-0.30356624722480774,
-0.16431474685668945... |
func (o *DeleteRuntimeContainerInternalServerError) WithPayload(payload string) *DeleteRuntimeContainerInternalServerError {
o.Payload = payload
return o
} | [
-0.14332297444343567,
0.5121613144874573,
0.3340538740158081,
-0.8921895027160645,
-0.43445953726768494,
-0.5828313827514648,
0.10791300982236862,
-0.3098505139350891,
1.0661410093307495,
-0.2696608603000641,
0.557884931564331,
0.044234491884708405,
-0.2481723576784134,
0.16800270974636078... |
func (o *DeleteRuntimeContainerInternalServerError) SetPayload(payload string) {
o.Payload = payload
} | [
-0.4061335027217865,
0.5298795700073242,
0.25385013222694397,
-0.7804503440856934,
-0.015126125887036324,
-0.44368377327919006,
-0.026250123977661133,
-0.22232717275619507,
0.5987710952758789,
-0.06457780301570892,
0.24226447939872742,
0.17221005260944366,
-0.6531513929367065,
0.7270848155... |
func (o *DeleteRuntimeContainerInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(500)
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
} | [
-0.7899889349937439,
0.08341885358095169,
0.2697733938694,
0.10976030677556992,
0.9024839401245117,
-0.8236039280891418,
0.3501795828342438,
-0.20655450224876404,
0.9695835113525391,
0.40895113348960876,
0.524308979511261,
-0.09772671014070511,
-0.6948354840278625,
-0.025157472118735313,
... |
func (o *RecoverOptions) List(client *ctrlclient.CtrlClient) ([]string, cobra.ShellCompDirective) {
pods, err := o.selectPods(client, []string{})
if err != nil {
common.PrettyPrint(errors.Wrap(err, "select pods").Error(), 0, common.Red)
return nil, cobra.ShellCompDirectiveNoFileComp
}
var names []string
for _... | [
-0.07077333331108093,
-1.5197148323059082,
0.6842746734619141,
-0.7604749798774719,
0.6500728130340576,
0.22483563423156738,
0.28167805075645447,
-0.11159154027700424,
-0.05180933326482773,
0.2613409161567688,
-0.8690531253814697,
-0.46862590312957764,
-0.34126272797584534,
-0.249748378992... |
func GetTagSummaryInstance() *TagSummaries {
if tagSummaryMapInstance == nil {
mut.Lock()
defer mut.Unlock()
tagSummaryMapInstance = &TagSummaries{}
tagSummaryMapInstance.summary = make(map[string]*map[string]*models.TagSummary)
}
return tagSummaryMapInstance
} | [
-0.6707776784896851,
0.33029699325561523,
0.43389689922332764,
-1.313986897468567,
-0.722914457321167,
0.7493478059768677,
-0.8019440174102783,
-0.07019408792257309,
-0.3373778164386749,
-0.19766515493392944,
-0.7208030819892883,
-0.21582038700580597,
0.12904112040996552,
-0.12799784541130... |
func (r *TagSummaries) updateTagSummaries(article *models.Article) error {
if article == nil {
return fmt.Errorf("Invalid article")
}
articleDate := article.Date
summaryInstance := GetTagSummaryInstance()
dateMapValue, dateMapValueFound := summaryInstance.summary[articleDate]
if !dateMapValueFound {
m := ma... | [
-0.9683842062950134,
0.21453700959682465,
0.5695751309394836,
-0.8711960911750793,
-0.2602253556251526,
0.2582387626171112,
-0.6933916807174683,
-0.6495707035064697,
-0.4160621464252472,
0.7687816023826599,
-0.47416165471076965,
-0.28719931840896606,
0.77914959192276,
0.7105815410614014,
... |
func NilAsZeroValue() {
fmt.Println("NilAsZeroValue")
var s []string = nil
var p *int
var ch chan int
var fn func()
var i interface{}
var m map[string]string
if s == nil {
fmt.Println("Zero Value for Slice is nil")
}
if p == nil {
fmt.Println("Zero Value for pointer is nil")
}
if ch == nil {
fmt.Prin... | [
0.4016319513320923,
-1.1005176305770874,
0.6714292764663696,
-0.20240192115306854,
-0.043692462146282196,
-0.2868741452693939,
0.3894307613372803,
0.18592780828475952,
-0.4105064868927002,
-0.2569613456726074,
0.2868802547454834,
0.838284432888031,
-0.380264014005661,
1.6963468790054321,
... |
func AppendExample() {
fmt.Println("Append Example")
var s []string = []string{"a", "b"}
fmt.Printf("len=%d, cap=%d, %v\n", len(s), cap(s), s)
// Output
// len=2, cap=2, [a b]
// One Element
s = append(s, "c")
fmt.Printf("len=%d, cap=%d, %v\n", len(s), cap(s), s)
// Output
// len=3, cap=4, [a b c]
// More... | [
0.5447022318840027,
-0.7211993336677551,
0.9274467825889587,
-0.12372148036956787,
-0.7860147356987,
-0.8123551607131958,
0.0006372285424731672,
-0.22348463535308838,
0.901576042175293,
0.5746781229972839,
-1.2686777114868164,
0.614281952381134,
0.33157673478126526,
0.8793162107467651,
0... |
func make() {
var s1 []string = make([]string)
var s2 []string = make([]string, 10)
} | [
0.36065438389778137,
0.3775253891944885,
0.21885444223880768,
-0.779475212097168,
0.4751335084438324,
-0.7551894783973694,
0.003070008708164096,
-0.14154936373233795,
-0.19191932678222656,
-0.10093676298856735,
-0.9355198740959167,
1.015683650970459,
0.7727830410003662,
-0.0150839090347290... |
func sendAndResetBucket(bucket *[]int64, ws *websocket.Conn, timeNow *int64) {
b, _ := json.Marshal(bucket)
var jsonStr = []byte(b)
ws.Write(jsonStr)
for i := range *bucket {
(*bucket)[i] = 0
}
*timeNow = atomic.LoadInt64(&analysis.TimeStamp)
} | [
-0.9013938307762146,
-0.34524813294410706,
0.6266207098960876,
-0.07793646305799484,
0.744440495967865,
-0.7174234986305237,
0.0017338009783998132,
-0.7105911374092102,
-0.36612778902053833,
0.9161685705184937,
-1.0256540775299072,
1.0224950313568115,
0.2767404317855835,
0.1426265984773636... |
func clientHandler(ws *websocket.Conn, everyMs int64, dataCh <-chan []int64) {
connectionClosedCh := make(chan bool)
go func(connectionClosedCh chan bool) {
_, err := ws.Read(make([]byte, 1))
if err != nil {
fmt.Println(err)
connectionClosedCh <- true
}
}(connectionClosedCh)
bucket := make([]int64, 60)... | [
0.3491637110710144,
-0.5865069031715393,
0.8412639498710632,
-0.45661231875419617,
-0.1818905472755432,
-0.14416706562042236,
1.0320833921432495,
-1.11051344871521,
-0.3833026885986328,
-0.08044421672821045,
-0.17578254640102386,
0.278169184923172,
0.13185837864875793,
0.274487167596817,
... |
func serverMain(registerNewClientCh chan<- splitterRequest, deleteClientCh chan<- splitterRequest) {
http.HandleFunc("/data/", func(w http.ResponseWriter, r *http.Request) {
fmt.Print(r.URL)
// Get ID as variable
re := regexp.MustCompile("^/data/(\\d+)/?$")
regexParsed := re.FindStringSubmatch(r.URL.String())
... | [
-0.6653040051460266,
-0.2546336352825165,
0.9860811829566956,
-0.15404193103313446,
0.18778987228870392,
-0.08145444840192795,
0.7347866296768188,
0.1727401614189148,
-0.19938844442367554,
0.2767685651779175,
-0.5664689540863037,
1.1502575874328613,
-0.9023853540420532,
0.6603087782859802,... |
func gotoReturnAddress(w http.ResponseWriter, r *http.Request, userId int64, alertCode string) {
// Return address (pre-login) was saved as a cookie. Return the user to that address,
// so they can continue what they were doing before logging in.
returnAddress := GetAndDecodeCookie(r, kLoginReturnAddress, "/news/")... | [
-0.4650602638721466,
-0.22144155204296112,
0.5544609427452087,
-0.00500082690268755,
0.08868391811847687,
-0.8224064111709595,
0.5789939165115356,
0.06929155439138412,
0.7184646129608154,
-0.26359885931015015,
0.2443237155675888,
1.2157111167907715,
-0.5799492001533508,
-0.5145118236541748... |
func registerDetailsHandler(w http.ResponseWriter, r *http.Request){
//RefreshSession(w, r)
const (
//kName = "name"
//kZipCode = "zipCode"
kBirthYear = "birthYear"
//kCountry = "country"
kGender = "gender"
kParty = "party"
kRace = "race"
//kMaritalStatus = "maritalStatus"
kSchoolCompleted = "schoo... | [
-0.34144753217697144,
0.28165560960769653,
0.7041924595832825,
-0.1347273290157318,
-0.08524421602487564,
0.22904087603092194,
0.32987651228904724,
-0.6820773482322693,
-0.04235861450433731,
-0.2394510954618454,
-0.3220197558403015,
-0.18158046901226044,
-0.17781314253807068,
0.66266965866... |
func emailPreferenceHandler(w http.ResponseWriter, r *http.Request){
form := makeForm(
nuSelectField(kEmailPreference, "Select Email Preference", emailPref, true, false, false, false, "Please select your email preference"),
)
userId := GetSession(w, r)
if userId == -1 { // Secure cookie not found. Either sessio... | [
-0.19168128073215485,
0.30088186264038086,
0.6391475200653076,
0.22520442306995392,
-0.18567872047424316,
-0.30854740738868713,
0.10109180212020874,
0.1822078675031662,
0.4511348009109497,
1.0101529359817505,
0.42139899730682373,
0.5308213233947754,
0.03003489039838314,
0.11481356620788574... |
func updatePasswordHandler(w http.ResponseWriter, r *http.Request){
userId, err := strconv.ParseInt(r.FormValue("userId"), 10, 64)
check(err)
// TODO: implement updatePassword form, and get actual password from there.
passwordHashInts := GetPasswordHash256("#NewPassword1234")
// Update user's password in the dat... | [
-0.31290480494499207,
-0.4979826807975769,
0.41987404227256775,
0.3742523789405823,
-0.15559853613376617,
-0.025354279205203056,
0.5329505801200867,
-0.32688114047050476,
-0.3384108543395996,
0.7611883878707886,
-0.46474316716194153,
-0.030466897413134575,
-0.0022884795907884836,
0.2755036... |
func loginSignupHandler(w http.ResponseWriter, r *http.Request){
args := struct {
PageArgs
Reason string
}{
PageArgs: makePageArgs(r, "Login / Signup", "", ""),
Reason: parseUrlParam(r, "reason"),
}
executeTemplate(w, kLoginSignup, args)
} | [
-1.1953377723693848,
-0.27914199233055115,
0.5196744203567505,
-0.31225380301475525,
-0.23772546648979187,
0.28769704699516296,
0.11505798995494843,
1.035549521446228,
0.7026383876800537,
0.9169596433639526,
0.5925704836845398,
-0.3772912919521332,
-0.47845643758773804,
-0.4159557819366455... |
func loginFBHandler(w http.ResponseWriter, r *http.Request){
args := struct {
PageArgs
}{
PageArgs: makePageArgs(r, "Login with Facebook", "", ""),
}
executeTemplate(w, kLoginFB, args)
} | [
-0.22996218502521515,
-0.1574006974697113,
0.673820436000824,
0.8382176756858826,
-0.04053221270442009,
-0.3147464692592621,
0.3633284568786621,
0.16078881919384003,
0.400010347366333,
-0.07062841951847076,
-0.06679019331932068,
-0.2768386900424957,
-1.145858645439148,
0.2501842677593231,
... |
func deleteNode_237(node *ListNode) {
node.Val = node.Next.Val
node.Next = node.Next.Next
} | [
-0.2963019013404846,
0.5099709033966064,
0.5308093428611755,
-0.10384952276945114,
-0.04732758179306984,
-0.7689849138259888,
-0.12315763533115387,
0.42892417311668396,
0.6673569083213806,
0.060821663588285446,
-0.2932477295398712,
1.1553972959518433,
0.1372392177581787,
0.3572663366794586... |
func SwaggerRoutes(router *mux.Router) {
// Define server settings:
serverConnURL, _ := utils.ConnectionURLBuilder("server")
// Build Swagger route.
getSwagger := httpSwagger.Handler(
httpSwagger.URL("http://"+serverConnURL+"/swagger/doc.json"),
httpSwagger.DeepLinking(true),
httpSwagger.DocExpansion("none")... | [
-0.1876066029071808,
0.08348120003938675,
0.5530710220336914,
0.4713175892829895,
-0.5203276872634888,
-0.5635397434234619,
-0.32714924216270447,
0.5575321316719055,
-0.46355459094047546,
-0.04562411457300186,
-0.38880395889282227,
0.33701470494270325,
-0.28354358673095703,
-0.116478405892... |
func NewResourceProperties() *ResourceProperties {
this := ResourceProperties{}
return &this
} | [
-0.0015069267246872187,
-0.8743389844894409,
-0.1270863562822342,
0.546490490436554,
-0.4390814006328583,
-0.11372975260019302,
0.6932401657104492,
-0.20395779609680176,
0.2581757605075836,
0.3971439599990845,
-1.017459750175476,
-0.5439398884773254,
-1.4139437675476074,
-0.450216382741928... |
func NewResourcePropertiesWithDefaults() *ResourceProperties {
this := ResourceProperties{}
return &this
} | [
0.06610459089279175,
-0.40013793110847473,
-0.2065729796886444,
0.045769233256578445,
0.5470406413078308,
-0.2674286365509033,
-0.2342114895582199,
-0.3363727927207947,
0.16836482286453247,
-0.12517835199832916,
-0.7395658493041992,
-1.851586103439331,
-0.9416582584381104,
0.03672256320714... |
func (o *ResourceProperties) GetName() *string {
if o == nil {
return nil
}
return o.Name
} | [
0.45193448662757874,
0.12443328648805618,
0.03778371214866638,
0.7228914499282837,
-0.03182373568415642,
-0.27955225110054016,
0.17884725332260132,
0.10647811740636826,
-0.07646846771240234,
0.4308010935783386,
0.03981897979974747,
-1.296466588973999,
0.13345465064048767,
-0.57880079746246... |
func (o *ResourceProperties) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Name, true
} | [
-0.09184686839580536,
-0.02631397917866707,
0.6496220827102661,
0.23653726279735565,
-0.4452703297138214,
0.7291710376739502,
-0.01588956080377102,
-0.1739000827074051,
-0.440777987241745,
1.203108549118042,
-1.2090656757354736,
-1.1506115198135376,
0.4533160328865051,
-0.03439111635088920... |
func (o *ResourceProperties) SetName(v string) {
o.Name = &v
} | [
0.24845246970653534,
-0.4670599400997162,
-0.23873953521251678,
-0.17661026120185852,
-1.5712354183197021,
-0.5760671496391296,
-0.6188223361968994,
-0.8148528337478638,
-0.5121003985404968,
0.9104263782501221,
-0.19706639647483826,
-0.07942183315753937,
-0.15715532004833221,
-0.6439107656... |
func (o *ResourceProperties) HasName() bool {
if o != nil && o.Name != nil {
return true
}
return false
} | [
0.5028651356697083,
-0.2801767587661743,
0.27264726161956787,
0.31084245443344116,
-0.184744194149971,
-0.5144538879394531,
-0.10664308816194534,
0.05847572907805443,
-0.17413319647312164,
0.5238019824028015,
-0.39372336864471436,
-1.5724101066589355,
-0.0016718736151233315,
-0.04004467651... |
func (o *ResourceProperties) GetSecAuthProtection() *bool {
if o == nil {
return nil
}
return o.SecAuthProtection
} | [
0.25093039870262146,
0.7099978923797607,
0.2555451989173889,
1.0551857948303223,
-0.5594913363456726,
-0.5640497207641602,
0.40173134207725525,
-0.18448427319526672,
1.1899501085281372,
0.19431272149085999,
-1.4507896900177002,
-0.8700305819511414,
-0.4072933495044708,
-0.9906323552131653,... |
func (o *ResourceProperties) GetSecAuthProtectionOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.SecAuthProtection, true
} | [
0.20081736147403717,
0.6120954155921936,
0.5163824558258057,
1.2904300689697266,
-0.7924237847328186,
-0.17439383268356323,
0.8010479807853699,
0.5209382176399231,
0.9194313287734985,
1.38753080368042,
-1.9101226329803467,
-1.3373793363571167,
0.6649736762046814,
-0.4023367166519165,
0.4... |
func (o *ResourceProperties) SetSecAuthProtection(v bool) {
o.SecAuthProtection = &v
} | [
0.3876133859157562,
0.27156224846839905,
-0.12108168751001358,
0.664435863494873,
-0.947283148765564,
-0.5908396244049072,
0.4121744930744171,
-0.5798673629760742,
0.7027795314788818,
0.7421592473983765,
-1.263666033744812,
-0.8170496821403503,
-0.08091331273317337,
-0.8238428831100464,
... |
func (o *ResourceProperties) HasSecAuthProtection() bool {
if o != nil && o.SecAuthProtection != nil {
return true
}
return false
} | [
0.9181552529335022,
0.6499447822570801,
0.4013521671295166,
0.5821787118911743,
-0.035951923578977585,
-1.6602916717529297,
0.3436349332332611,
0.24374014139175415,
0.5688337683677673,
-0.022618930786848068,
-1.6295461654663086,
-1.328879475593567,
0.5041046738624573,
0.3938504457473755,
... |
func NewAccountAPI(ctx context.Context, opt *Options) (account.AccountAPIServer, error) {
// Validation
var err error
switch {
case ctx == nil:
err = errs.NilObject("context")
case opt == nil:
err = errs.NilObject("options")
case opt.AppName == "":
err = errs.MissingField("app name")
case opt.EmailDisplayN... | [
-0.7194876670837402,
-0.5156561732292175,
0.8674749135971069,
0.48045894503593445,
-0.04238000512123108,
-0.2773503065109253,
1.01260244846344,
-0.14103403687477112,
0.6657407879829407,
0.6226152181625366,
0.20076823234558105,
-0.04340165853500366,
-0.8541024327278137,
1.0794645547866821,
... |
func PersonalyCallback(
getUserByID dependencyGetUserByID,
getNumberOfPersonalyOffers dependencyGetNumberOfPersonalyOffers,
getSystemConfig dependencyGetSystemConfig,
createPersonalyIncome dependencyCreatePersonalyIncome,
broadcast dependencyBroadcast,
) gin.HandlerFunc {
return func(c *gin.Context) {
payload :... | [
0.28608742356300354,
0.04573233798146248,
1.176383376121521,
0.4256466329097748,
-0.4048672914505005,
0.13029499351978302,
1.2467747926712036,
-0.13220110535621643,
0.5408204793930054,
-0.052387382835149765,
-0.18376556038856506,
0.688401460647583,
-0.1393015831708908,
0.5541837811470032,
... |
func GetRadixEnvironments(ctx context.Context, client radixclient.Interface, appName string) ([]radixv1.RadixEnvironment, error) {
res, err := client.RadixV1().RadixEnvironments().List(ctx, v1.ListOptions{LabelSelector: labelselector.ForApplication(appName).String()})
if err != nil {
return nil, err
}
return res.... | [
-0.713914692401886,
-0.20941242575645447,
0.26579034328460693,
0.5201143622398376,
0.5141553282737732,
0.6441075801849365,
-0.45507320761680603,
-0.4838836193084717,
0.4928116202354431,
0.4839327335357666,
0.12268131971359253,
0.6501529812812805,
-1.0240859985351562,
0.4307295083999634,
... |
func GetRadixEnvironment(ctx context.Context, client radixclient.Interface, appName, envName string) (*radixv1.RadixEnvironment, error) {
reName := operatorutils.GetEnvironmentNamespace(appName, envName)
re, err := client.RadixV1().RadixEnvironments().Get(ctx, reName, v1.GetOptions{})
if err != nil {
return nil, e... | [
-0.05946335196495056,
-0.12965604662895203,
0.3394012451171875,
0.27396276593208313,
0.11929681152105331,
-0.21963806450366974,
-0.21370354294776917,
-0.7923519015312195,
0.4736238121986389,
0.41141989827156067,
-0.047413986176252365,
1.6046171188354492,
-0.677127480506897,
-0.129708006978... |
func GetConnmark(appID uint8, aceID uint32, drop bool) uint32 {
mark := uint32(appID)<<24 | aceID
if drop {
mark |= AceDropAction
}
return mark
} | [
-0.5300365686416626,
-0.19341138005256653,
0.24541953206062317,
0.23848064243793488,
0.6707265973091125,
-0.10266442596912384,
0.06948154419660568,
-0.06843357533216476,
0.4422937333583832,
0.35666555166244507,
0.318625807762146,
0.4933430850505829,
-0.5445615649223328,
-0.0849632099270820... |
func ParseConnmark(mark uint32) (appID uint8, aceID uint32, drop bool) {
appID = uint8(mark >> 24)
aceID = mark & AceIDMask
drop = (mark & AceActionMask) == AceDropAction
return
} | [
-0.4279819428920746,
-1.0783805847167969,
0.37554556131362915,
0.4984375834465027,
0.3941662907600403,
0.043811898678541183,
0.40513449907302856,
-0.19801045954227448,
0.6374987959861755,
0.5724321603775024,
-0.3794383406639099,
-0.3636687695980072,
-0.39565810561180115,
0.0372251123189926... |
func TestAdd(t *testing.T) {
feed := New()
feed.Add(Item{})
if len(feed.Items) != 1 {
t.Errorf("Item was not added")
}
} | [
0.5390868186950684,
0.004583943635225296,
0.49430331587791443,
0.3340141773223877,
1.2038146257400513,
0.7758340239524841,
-0.2715969979763031,
-0.26084190607070923,
0.039459146559238434,
-1.2368817329406738,
-0.324972927570343,
0.3891531229019165,
-0.5505005717277527,
0.36608684062957764,... |
func NewLRU(size int) *LRU {
return &LRU{
size: size,
list: list.New(),
items: make(map[interface{}]*list.Element),
}
} | [
-0.04759310930967331,
-0.28536832332611084,
0.3598150610923767,
-0.7434563040733337,
-1.0034867525100708,
-0.39754733443260193,
-1.2516205310821533,
0.3707943856716156,
0.4582958221435547,
-0.9894623756408691,
-0.7516672015190125,
1.016345500946045,
-0.558320939540863,
-0.03845947980880737... |
func (l *LRU) Put(key, value interface{}) bool {
// if item exists, update the value and Put it on the top of the stack
if item, ok := l.items[key]; ok {
l.list.MoveToFront(item)
item.Value.(*entry).value = value
return true
}
// if item does not exist, create a new entry, add it to the item list and map
ite... | [
-0.40807005763053894,
1.10907781124115,
0.7926874160766602,
-0.9736763834953308,
0.0033745281398296356,
0.3276914060115814,
-0.5103476643562317,
0.6633944511413574,
-0.19100190699100494,
0.7696141004562378,
-1.257328987121582,
-0.4209448993206024,
-0.7719488739967346,
-0.3667375147342682,
... |
func (l *LRU) Get(key interface{}) interface{} {
if item, ok := l.items[key]; ok {
l.list.MoveToFront(item)
return item.Value.(*entry).value
}
return nil
} | [
-0.48314836621284485,
0.2625868022441864,
0.4367038309574127,
-0.1968010663986206,
0.19419321417808533,
-0.43294674158096313,
-1.1849700212478638,
0.027894172817468643,
0.11220113933086395,
0.3462018370628357,
-0.35427024960517883,
0.4981386661529541,
-0.03456142172217369,
0.08679702132940... |
func (r *Register) Routes() authapi.RouteTable {
return authapi.RouteTable{
"/register": r.registerHandler,
}
} | [
-0.18539370596408844,
1.2339128255844116,
-0.019761351868510246,
0.276463121175766,
0.528905987739563,
-0.4267895817756653,
-0.06006782874464989,
0.47082751989364624,
-0.46263715624809265,
-0.4389849305152893,
-0.7449288964271545,
0.5825127959251404,
0.4357120096683502,
0.4514625370502472,... |
func (r *Register) Storage() authapi.StorageOptions {
return authapi.StorageOptions{
r.PrimaryID: authapi.String,
authapi.StorePassword: authapi.String,
}
} | [
-0.29076117277145386,
0.3431612253189087,
0.014898211695253849,
0.5947077870368958,
0.5640389919281006,
0.09106810390949249,
0.2680022716522217,
-0.6544144153594971,
0.7160021662712097,
-0.335920125246048,
-0.720576822757721,
0.5519328713417053,
-0.2601054310798645,
0.9995571970939636,
0... |
func (*RestrictedStaticType) isStaticType() {} | [
-0.28202322125434875,
-0.1529129147529602,
0.330209344625473,
1.8603777885437012,
-0.31593969464302063,
0.023128993809223175,
0.7040629386901855,
-0.242205411195755,
0.9561476111412048,
0.019233928993344307,
-0.7371407747268677,
0.06822062283754349,
-0.5006386637687683,
0.449731707572937,
... |
func (*query) _T(ctx context.Context, args _TArgs) *_T {
return &_T{}
} | [
-0.40730270743370056,
0.22492846846580505,
0.12408486008644104,
-1.3450369834899902,
0.34227150678634644,
-0.32273155450820923,
0.10011725127696991,
-1.0758525133132935,
-0.5826429128646851,
0.08116994053125381,
0.009064177051186562,
-0.1567189246416092,
0.589377224445343,
-1.1407690048217... |
func (*query) _TSearch(ctx context.Context, args _TSearchArgs) _TResult {
return _TResult{}
} | [
-1.2162530422210693,
1.4219563007354736,
0.3607468903064728,
-1.1491608619689941,
0.139482319355011,
-0.6026763319969177,
0.26266664266586304,
-0.9834855794906616,
-0.5045461654663086,
0.7605747580528259,
0.010095741599798203,
-1.2204464673995972,
0.5111351013183594,
-0.864664614200592,
... |
func NewClient(log logr.Logger, config *rest.Config) (*Client, error) {
discoveryClient, err := discovery.NewDiscoveryClientForConfig(config)
if err != nil {
return nil, err
}
return &Client{
discovery: discoveryClient,
log: log,
timeout: defaultTimeout,
}, nil
} | [
0.8389893770217896,
-0.0584159754216671,
0.35338538885116577,
0.8699357509613037,
-0.46037039160728455,
0.1490897238254547,
0.42872652411460876,
-0.1543063372373581,
0.033821821212768555,
-0.4501510560512543,
-0.29608964920043945,
0.11206264793872833,
0.03574971482157707,
-0.06927087157964... |
func (c *Client) GetConstraintGroupResources() ([]schema.GroupResource, error) {
c.log.V(2).Info("discovering resources types for category", "category", gatekeeperConstraintCategory)
categoryExpander := restmapper.NewDiscoveryCategoryExpander(c.discovery)
groupResources, exists := categoryExpander.Expand(gatekeeperC... | [
-0.1931583285331726,
0.1986207515001297,
0.17164847254753113,
0.12497862428426743,
-0.17785532772541046,
-0.11726249009370804,
0.681359052658081,
-0.5274312496185303,
-0.5536308884620667,
0.6236940622329712,
0.8146631717681885,
-0.44570496678352356,
-0.7330867052078247,
0.7514211535453796,... |
func (c *Client) CreateKindToGVRMap() (map[string][]schema.GroupVersionResource, error) {
c.log.V(1).Info("creating Kind to GroupVersionResource mappings")
kindToGVR := map[string][]schema.GroupVersionResource{}
apiGroupResources, err := restmapper.GetAPIGroupResources(c.discovery)
if err != nil {
return nil, err... | [
-0.7553509473800659,
-0.5466125011444092,
0.5260154604911804,
-0.46313607692718506,
-0.42377206683158875,
0.11957404017448425,
0.0525941401720047,
-0.777329683303833,
-0.24900871515274048,
0.8887410759925842,
0.046951957046985626,
0.37578755617141724,
-0.5481696128845215,
0.211609542369842... |
func (c *Client) SetTimeout(timeout time.Duration) error {
if timeout.Seconds() < 0 {
return fmt.Errorf("Invalid timeout: %v", timeout)
}
c.timeout = timeout
return nil
} | [
0.5233400464057922,
0.870590329170227,
0.1415850669145584,
0.47783008217811584,
-0.07888440042734146,
0.9644445180892944,
-0.3322658836841583,
0.049922388046979904,
0.0038548093289136887,
0.24410898983478546,
-0.4389331340789795,
0.8102108240127563,
-0.06517137587070465,
0.4643930792808532... |
func RemoveDuplicates(el []string) []string {
found := map[string]bool{}
// Create a map of all unique elements.
for v := range el {
found[el[v]] = true
}
// Place all keys from the map into a slice.
result := []string{}
for key := range found {
result = append(result, key)
}
return result
} | [
-0.8277745246887207,
-0.6298384070396423,
0.574444055557251,
-0.30471083521842957,
-0.2464393526315689,
-0.14748786389827728,
-0.23315869271755219,
1.0083659887313843,
0.8074751496315002,
0.8079168796539307,
-0.7354456782341003,
-0.0004133822803851217,
-0.37523382902145386,
0.3048737943172... |
func RemoveDuplicatePodIDs(el []podmodel.ID) []podmodel.ID {
found := map[podmodel.ID]bool{}
// Create a map of all unique elements.
for v := range el {
found[el[v]] = true
}
// Place all keys from the map into a slice.
result := []podmodel.ID{}
for key := range found {
result = append(result, key)
}
ret... | [
-1.5668656826019287,
-1.2728074789047241,
0.6752722263336182,
0.26407477259635925,
0.48891595005989075,
0.0074952514842152596,
0.30458417534828186,
0.016544269397854805,
0.49174535274505615,
1.137509822845459,
-1.7452406883239746,
-0.43966859579086304,
-0.9228992462158203,
0.13758027553558... |
func Intersect(a []string, b []string, s ...[]string) []string {
if len(a) == 0 || len(b) == 0 {
return []string{}
}
set := make([]string, 0)
hash := make(map[string]bool)
for _, el := range a {
hash[el] = true
}
for _, el := range b {
if _, found := hash[el]; found {
set = append(set, el)
}
}
if le... | [
0.7457423806190491,
0.2479994148015976,
1.1682747602462769,
1.0013017654418945,
-0.522956371307373,
-0.5691026449203491,
-0.7446710467338562,
0.10363166034221649,
-0.6358174085617065,
1.1947153806686401,
0.9123467206954956,
0.0524493046104908,
0.14888602495193481,
-0.038078226149082184,
... |
func Difference(a []string, b []string) []string {
diffStr := []string{}
m := map[string]int{}
for _, aVal := range a {
m[aVal] = 1
}
for _, bVal := range b {
m[bVal] = m[bVal] + 1
}
for mKey, mVal := range m {
if mVal == 1 {
diffStr = append(diffStr, mKey)
}
}
return diffStr
} | [
-0.5901643633842468,
-0.6210536360740662,
0.7009418606758118,
0.05930064246058464,
-0.12073905020952225,
-0.05414613336324692,
-0.1697685271501541,
0.23100659251213074,
-0.04636305198073387,
0.8395280838012695,
0.02603522129356861,
0.6161195039749146,
0.21904124319553375,
0.764966130256652... |
func UnstringPodID(pods []string) []podmodel.ID {
podIDs := []podmodel.ID{}
for _, pod := range pods {
parts := strings.Split(pod, "/")
podID := podmodel.ID{
Name: parts[1],
Namespace: parts[0],
}
podIDs = append(podIDs, podID)
}
return podIDs
} | [
-0.8217124342918396,
-1.462111234664917,
0.5182597637176514,
-0.5953717231750488,
0.08877091109752655,
0.23751789331436157,
-0.6073245406150818,
-0.10139922052621841,
0.35765400528907776,
1.3628451824188232,
-0.9629587531089783,
-0.43035009503364563,
-0.8133541941642761,
-0.921367943286895... |
func StringPodID(pods []podmodel.ID) []string {
podIDs := []string{}
for _, pod := range pods {
podID := pod.Namespace + "/" + pod.Name
podIDs = append(podIDs, podID)
}
return podIDs
} | [
-0.5059406161308289,
-1.5262335538864136,
0.5855832695960999,
-0.3203842341899872,
0.11333423852920532,
0.5328294038772583,
-0.9925262331962585,
-1.0904872417449951,
1.051859736442566,
1.8770009279251099,
-0.43943384289741516,
0.20550979673862457,
-0.4344943165779114,
-0.033460088074207306... |
func UnstringPolicyID(policies []string) []policymodel.ID {
policyIDs := []policymodel.ID{}
for _, policy := range policies {
parts := strings.Split(policy, "/")
policyID := policymodel.ID{
Name: parts[1],
Namespace: parts[0],
}
policyIDs = append(policyIDs, policyID)
}
return policyIDs
} | [
0.02672724798321724,
-1.4834181070327759,
0.18436311185359955,
-0.901637852191925,
0.3145139217376709,
0.911398708820343,
-0.8574117422103882,
0.09422210603952408,
0.5537309646606445,
1.1436572074890137,
-0.6721107959747314,
-0.07251004129648209,
-0.9631596803665161,
-0.6794306635856628,
... |
func StringPolicyID(policies []policymodel.ID) []string {
policyIDs := []string{}
for _, policy := range policies {
policyID := policy.Namespace + "/" + policy.Name
policyIDs = append(policyIDs, policyID)
}
return policyIDs
} | [
0.26092004776000977,
-1.4489816427230835,
0.2149195522069931,
-0.49087974429130554,
0.314598947763443,
1.3103787899017334,
-1.021109938621521,
-0.6844982504844666,
1.2033946514129639,
1.5308412313461304,
-0.47184649109840393,
0.5758419036865234,
-0.7675071358680725,
0.2416134923696518,
-... |
func UnstringNamespaceID(namespaces []string) []namespacemodel.ID {
namespaceIDs := []namespacemodel.ID{}
for _, namespace := range namespaces {
namespaceID := namespacemodel.ID(namespace)
namespaceIDs = append(namespaceIDs, namespaceID)
}
return namespaceIDs
} | [
0.013022094033658504,
-1.1689049005508423,
0.2630995512008667,
-0.4722360372543335,
-0.19999909400939941,
0.09273365885019302,
-1.066748857498169,
-0.3022835850715637,
1.3184998035430908,
0.9864936470985413,
-1.1505628824234009,
0.05417116358876228,
-0.8382395505905151,
0.9198924899101257,... |
func ConstructLabels(key string, values []string) []*policymodel.Policy_Label {
policyLabel := []*policymodel.Policy_Label{}
for _, label := range values {
policyLabel = append(policyLabel,
&policymodel.Policy_Label{
Key: key,
Value: label,
})
}
return policyLabel
} | [
-0.9716363549232483,
-0.4677448570728302,
0.2789686322212219,
-0.9919154047966003,
-0.06670136004686356,
1.1646878719329834,
-1.5689287185668945,
0.40072548389434814,
-0.5859575867652893,
0.596676230430603,
0.29873865842819214,
-0.36444833874702454,
0.2457701861858368,
0.5909770727157593,
... |
func CompareInts(a, b int) int {
if a < b {
return -1
}
if a > b {
return 1
}
return 0
} | [
-0.42963549494743347,
-0.5314274430274963,
0.5679987072944641,
-0.7074489593505859,
-0.5456510782241821,
-0.029185939580202103,
-0.6847413182258606,
-0.39758095145225525,
-0.6407076120376587,
0.142156720161438,
0.26624640822410583,
0.8180263638496399,
-0.8106310367584229,
-0.06557135283946... |
func CompareIPNets(a, b *net.IPNet) int {
// Handle 0/0
if len(a.IP) == 0 {
if len(b.IP) == 0 {
return 0
}
return 1
}
if len(b.IP) == 0 {
return -1
}
// Normalize IP addresses.
// Order IPv4 before IPv6.
var aNorm, bNorm *net.IPNet
if a.IP.To4() != nil {
if b.IP.To4() == nil {
return -1
}
... | [
-0.3654114603996277,
0.0830310583114624,
0.9433546662330627,
-0.236955925822258,
0.010162433609366417,
-0.45758771896362305,
0.4550584554672241,
-0.6623860001564026,
0.15076671540737152,
-0.10541072487831116,
-0.420941025018692,
-0.6628164052963257,
-0.06006290763616562,
-0.479064315557479... |
func ComparePorts(a, b uint16) int {
if a == b {
return 0
}
if a == 0 {
return 1
}
if b == 0 {
return -1
}
if a < b {
return -1
}
return 1
} | [
0.7309898138046265,
-0.4133329689502716,
0.7564343214035034,
-0.6821916699409485,
0.7190871834754944,
-0.32479363679885864,
0.17354872822761536,
-0.8010266423225403,
0.2616908550262451,
-0.07252703607082367,
0.28388649225234985,
0.3782201409339905,
-0.6179825067520142,
0.058107826858758926... |
func CompareIPNetsBytes(aPrefixLen uint8, aIP [16]byte, bPrefixLen uint8, bIP [16]byte) int {
prefixOrder := CompareInts(int(aPrefixLen), int(bPrefixLen))
if prefixOrder != 0 {
return prefixOrder
}
return bytes.Compare(aIP[:], bIP[:])
} | [
0.22790998220443726,
-0.44316014647483826,
0.6411660313606262,
-0.9540749788284302,
0.36209678649902344,
0.3611251711845398,
-0.3724300265312195,
-0.5816107392311096,
0.3889203667640686,
-0.09615012258291245,
-0.4511090815067291,
0.20927168428897858,
-0.9167364835739136,
-0.373158454895019... |
func GetOneHostSubnet(hostAddr string) *net.IPNet {
ip := net.ParseIP(hostAddr)
if ip == nil {
return nil
}
return GetOneHostSubnetFromIP(ip)
} | [
0.380905419588089,
0.6776821613311768,
0.6510748863220215,
0.7069885730743408,
-0.5155290961265564,
-0.543359637260437,
-0.000733988534193486,
0.22166284918785095,
0.4612751603126526,
-0.49813976883888245,
0.2729838192462921,
-0.09580651670694351,
-0.04213263466954231,
0.19600121676921844,... |
func GetOneHostSubnetFromIP(hostIP net.IP) *net.IPNet {
ipNet := &net.IPNet{IP: hostIP}
if hostIP.To4() != nil {
ipNet.Mask = net.CIDRMask(net.IPv4len*8, net.IPv4len*8)
} else {
ipNet.Mask = net.CIDRMask(net.IPv6len*8, net.IPv6len*8)
}
return ipNet
} | [
-0.06910078227519989,
0.41175660490989685,
0.5929651856422424,
1.2660387754440308,
-0.16647236049175262,
-0.36803141236305237,
0.17341729998588562,
-0.11816293001174927,
0.8792322278022766,
-0.42681968212127686,
-0.08199789375066757,
-0.6994538307189941,
-0.2079908400774002,
-0.62751007080... |
func (r *Row) insertChar (char string, index int) {
content := r.content.Bytes()
newBuffer := bytes.NewBuffer(nil)
newBuffer.Write(content[:index])
newBuffer.Write([]byte(char))
newBuffer.Write(content[index:])
r.content = newBuffer
r.size = newBuffer.Len()
} | [
0.04275622218847275,
0.4805148243904114,
0.4255344569683075,
-1.2795556783676147,
0.48472049832344055,
0.09185123443603516,
0.6730538010597229,
0.0004170865286141634,
-0.3563220798969269,
-0.5078524351119995,
-0.7077886462211609,
0.45121967792510986,
-1.2495378255844116,
-0.264162093400955... |
func (e *Element) GetId() uint64 {
return e.Id
} | [
0.32320526242256165,
0.3098934292793274,
0.43416357040405273,
1.0691819190979004,
1.0335400104522705,
0.9064425826072693,
0.5839394927024841,
0.34508946537971497,
1.5219001770019531,
-0.48954516649246216,
-0.4313201904296875,
0.15959854423999786,
-0.9058050513267517,
1.25023353099823,
0.... |
func (e *Element) DropVersion() {
e.Version = uint16(0)
} | [
-0.3430542051792145,
0.022910943254828453,
0.43456733226776123,
0.22600576281547546,
1.5431081056594849,
1.1761724948883057,
0.6067335605621338,
0.9266467094421387,
0.13194726407527924,
0.5583758354187012,
-1.2377235889434814,
-0.5609914064407349,
-0.34974750876426697,
0.8712809085845947,
... |
func (e *Element) DropTimestamp() {
e.Timestamp = nil
} | [
-0.47934678196907043,
0.2385149449110031,
0.5540698766708374,
-0.4283001124858856,
1.2336149215698242,
0.5128496289253235,
-0.0940830335021019,
-0.28174158930778503,
0.9872783422470093,
0.27414244413375854,
-0.9067351222038269,
-0.6569443345069885,
-0.1949228197336197,
0.5283082127571106,
... |
func (e *Element) DropChangeset() {
e.Changeset = uint64(0)
} | [
-0.381824254989624,
-0.0037099835462868214,
0.47331151366233826,
-1.1304694414138794,
0.1937386393547058,
0.4726065695285797,
0.2631385624408722,
-0.9284654259681702,
-0.1120491772890091,
-0.2745859920978546,
-0.10970906168222427,
0.7171805500984192,
-0.5637072920799255,
1.0894876718521118... |
func (e *Element) DropUserId() {
e.UserId = uint64(0)
} | [
-0.14590737223625183,
-0.28372055292129517,
0.2638692855834961,
0.4112226068973541,
-0.0439244881272316,
1.4223921298980713,
1.083219289779663,
0.6362327337265015,
0.7289459705352783,
0.5906792879104614,
-0.3975706100463867,
0.7296464443206787,
-0.6164674758911133,
0.9896845817565918,
-0... |
func (e *Element) DropUserName() {
e.UserName = ""
} | [
-0.7873399257659912,
0.36677810549736023,
0.25832322239875793,
0.29063302278518677,
0.20397154986858368,
0.8880364894866943,
1.2403699159622192,
0.5465942621231079,
0.2577861547470093,
0.22399090230464935,
-0.8007462024688721,
-0.057021137326955795,
-0.8859694600105286,
0.10010694712400436... |
func TestVCCThkRpcMakeVccProof(t *testing.T) {
var err error
var connection = web3.NewWeb3(providers.NewHTTPProvider("rpctest.thinkey.xyz", 10, false))
from := "0x2c7536e3605d9c16a7a3d7b1898e529396a65c23"
to := "0x0000000000000000000000000000000000020000"
nonce, err := connection.Thk.GetNonce(from, "2")
if err !... | [
1.0807288885116577,
0.694560170173645,
0.954605221748352,
0.020107217133045197,
0.4303717315196991,
0.10383646190166473,
0.01396864466369152,
-0.736672043800354,
0.13601621985435486,
0.1649208813905716,
-0.46956366300582886,
0.10748101770877838,
-1.210945963859558,
-0.3414864242076874,
0... |
func (s *Server) GenerateServiceCode(ctx context.Context, req *GenerateServiceCodeRequest) (*GenerateServiceCodeResponse, error) {
query := map[string]string{
"query": `
{
services(where: {id: {_eq: "` + req.ServiceId + `"}}){
id
name
models {
name
service_id
update... | [
-1.2458159923553467,
-0.08256249874830246,
1.0318189859390259,
-0.14422115683555603,
-0.06413684040307999,
-0.5826950073242188,
0.07692822068929672,
-0.7421450614929199,
-0.5933611392974854,
0.0806410014629364,
-0.31636765599250793,
0.7959150671958923,
-0.5205696821212769,
0.44131353497505... |
func (r *terminal) Start() {
if r == nil {
return
}
fd := int(os.Stdin.Fd())
reset, err := enableNonBlockingRead(fd)
if err != nil {
log.Warnf("failed to put terminal (fd %d) into raw mode: %v", fd, err)
return
}
r.reset = reset
} | [
0.004211663734167814,
0.1000591367483139,
0.4725521206855774,
-0.44698601961135864,
-0.07636483013629913,
0.20273175835609436,
0.22098511457443237,
0.18062227964401245,
-1.1769375801086426,
0.13908614218235016,
0.08624919503927231,
1.0097439289093018,
0.6530317068099976,
-0.430422246456146... |
func (r *terminal) Monitor(ctx context.Context) {
if r == nil {
return
}
in := bufio.NewReader(stdin)
for {
char, err := in.ReadByte()
if err != nil {
log.Warnf("failed to read input: %v", err)
return
}
log.Debugf("received byte %v (%v)", char, string(char))
chResume := make(chan struct{})
swit... | [
-0.018524399027228355,
-0.5052750110626221,
0.8288783431053162,
-0.04449871927499771,
0.23637166619300842,
-0.4636543393135071,
0.3994069993495941,
-0.4395636320114136,
0.5412523746490479,
-0.47794002294540405,
-0.27745604515075684,
-0.5938646197319031,
-0.47026968002319336,
-0.37378707528... |
func (r *terminal) Events() <-chan Event {
if r == nil {
return nil
}
return r.ch
} | [
0.017109740525484085,
-0.5191416144371033,
0.4802669882774353,
-0.6524788737297058,
0.24598193168640137,
-0.16357696056365967,
-0.15671314299106598,
-0.4594065845012665,
0.5676044225692749,
-1.0949609279632568,
0.1549779772758484,
0.3532470166683197,
-0.094244085252285,
-0.30645751953125,
... |
func NewDefaultCommand() *cobra.Command {
cmd := cobra.Command{
Use: path.Base(os.Args[0]),
Short: "kwir",
Long: "Kube Webhook Image Rewriter (kwir) is a mutating admission webhook manager that rewrites container's images based on config rules",
SilenceUsage: true,
}
viper.SetEnvPref... | [
0.32645073533058167,
-0.6625941395759583,
0.37335219979286194,
0.558050811290741,
0.9238082766532898,
-0.5911498069763184,
0.2612049877643585,
0.15443849563598633,
0.2951236963272095,
-0.11416768282651901,
-0.10777926445007324,
0.7335474491119385,
-0.6044848561286926,
1.9003965854644775,
... |
func EmailLocal(in string) (string, error) {
if in == "" {
return "", trace.BadParameter("address is empty")
}
addr, err := mail.ParseAddress(in)
if err != nil {
return "", trace.BadParameter("failed to parse address %q: %q", in, err)
}
parts := strings.SplitN(addr.Address, "@", 2)
if len(parts) != 2 {
ret... | [
-0.40853920578956604,
-0.6437641978263855,
0.774384617805481,
-0.7810397148132324,
-1.4845582246780396,
0.024815592914819717,
0.7069640755653381,
0.14536239206790924,
0.28105223178863525,
0.9874499440193176,
-0.16595923900604248,
1.226315975189209,
-0.39647483825683594,
-0.7190057635307312... |
func (p *Expression) Namespace() string {
return p.namespace
} | [
0.30138301849365234,
-0.6018518209457397,
0.03436538577079773,
0.6339396238327026,
-0.5989469289779663,
0.6006152033805847,
0.18930238485336304,
0.03205029293894768,
1.0579625368118286,
-0.43797263503074646,
0.631347119808197,
0.9672552347183228,
-0.7968822121620178,
-0.14031413197517395,
... |
func (p *Expression) Name() string {
return p.variable
} | [
-0.5064701437950134,
-0.9221196174621582,
0.35373473167419434,
-0.013081536628305912,
-1.27275550365448,
0.2828209102153778,
0.4935043454170227,
0.3120611310005188,
-0.4516061544418335,
1.2567299604415894,
-0.514884889125824,
0.3983939290046692,
-0.7574653625488281,
-0.17840778827667236,
... |
func (p *Expression) Interpolate(traits map[string][]string) ([]string, error) {
values, ok := traits[p.variable]
if !ok {
return nil, trace.NotFound("variable is not found")
}
out := make([]string, len(values))
for i := range values {
val := values[i]
var err error
if p.transform != nil {
val, err = p.... | [
-0.22078837454319,
-0.3634064495563507,
0.690480649471283,
-0.5098180174827576,
0.22453826665878296,
-0.6394108533859253,
-0.5822684168815613,
0.48563703894615173,
-0.5237958431243896,
1.1127914190292358,
0.606976330280304,
-0.3356536328792572,
-0.5226055979728699,
-0.019400613382458687,
... |
func walk(node ast.Node) (*walkResult, error) {
var result walkResult
switch n := node.(type) {
case *ast.CallExpr:
switch call := n.Fun.(type) {
case *ast.Ident:
return nil, trace.BadParameter("function %v is not supported", call.Name)
case *ast.SelectorExpr:
// Selector expression looks like email.loc... | [
-0.7171468138694763,
0.5476720333099365,
0.9735984206199646,
-0.5127823948860168,
-0.25962033867836,
-0.4789716303348541,
0.5484890937805176,
-0.740132749080658,
0.9252592921257019,
-0.09962688386440277,
-0.20058926939964294,
0.4771377444267273,
-0.030085206031799316,
0.11080680787563324,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.