text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (m *KerberosResponse) Validate(formats strfmt.Registry) error { var res []error if err := m.validateAdmin(formats); err != nil { // prop res = append(res, err) } if err := m.validateType(formats); err != nil { // prop res = append(res, err) } if len(res) > 0 { return errors.CompositeValidationEr...
[ 0.38458573818206787, -0.843894362449646, 0.13878360390663147, 0.39981770515441895, 0.1685595065355301, -0.3737921714782715, 0.011945746839046478, -1.0105701684951782, -0.2019818127155304, -0.08450566232204437, 0.21236740052700043, 0.23129256069660187, -0.9027092456817627, 0.644134938716888...
func NewArtifactCmd(ctx context.Context, opt *commonoptions.Common) *cobra.Command { cmd := &cobra.Command{ Use: "artifact", DisableFlagsInUseLine: true, Short: "Interact with Falco artifacts", Long: "Interact with Falco artifacts", SilenceErrors: tr...
[ 0.4524216949939728, -0.30903196334838867, 0.6200456023216248, 0.5023251175880432, 0.3261687457561493, -0.009076853282749653, 1.3654166460037231, 0.23154230415821075, 0.6978102326393127, -0.3229634463787079, 0.23613472282886505, 0.24034501612186432, 0.14017821848392487, 0.08002563565969467,...
func getMaiAuthTimestamp(token string) (time.Time, error) { var timestamp time.Time fields := strings.Split(token, "@") if len(fields) != 2 { return timestamp, errors.New("Token should be MAI-AUTHENTICATION@{time}") } // parse rfc t, err := time.Parse(time.RFC3339Nano, fields[1]) if err == nil { return t, er...
[ -0.5379452705383301, 0.4809270203113556, 0.6533861756324768, -0.24340654909610748, -0.42005541920661926, -0.5321937799453735, -0.7927669882774353, 0.22037701308727264, 0.8295483589172363, 0.2984479069709778, -0.250820130109787, -0.21458947658538818, -0.33157116174697876, 0.0666035041213035...
func SendPostgresNotification(ctx context.Context, wg *sync.WaitGroup, notificationChannel chan []byte, pool *pgxpool.Pool) { defer wg.Done() for { select { case <-ctx.Done(): return case msg := <-notificationChannel: _, err := pool.Exec(context.Background(), "select pg_notify('chat', $1)", msg) if er...
[ -0.6310580372810364, 0.10592018812894821, 0.6578359603881836, 0.6052780151367188, 0.27418938279151917, 0.2591148912906647, -0.09308229386806488, -0.7478287816047668, -1.3555107116699219, 1.031392216682434, -0.08217823505401611, 0.5789093375205994, -0.5249219536781311, 0.2446586787700653, ...
func ListenToPostgresNotifications(ctx context.Context, wg *sync.WaitGroup, pool *pgxpool.Pool) { defer wg.Done() conn, err := pool.Acquire(context.Background()) if err != nil { fmt.Fprintln(os.Stderr, "Error acquiring connection:", err) return } defer conn.Release() _, err = conn.Exec(context.Background(),...
[ 0.4906948506832123, -0.6516528129577637, 0.8232902884483337, -0.5625384449958801, 0.8960869908332825, 0.29850080609321594, -0.19763582944869995, -0.4017154574394226, -2.139571189880371, 0.3434818983078003, -0.10566997528076172, 0.3612050414085388, 0.3496462404727936, 0.46820634603500366, ...
func (inp ThingFrom) ThingPipeSeen() (out ThingFrom) { cha := make(chan Thing) go inp.pipeThingSeenAttr(cha, nil) return cha }
[ -0.9524371027946472, -0.7888211011886597, 0.5984110832214355, -1.0319427251815796, -0.491943359375, 0.15956276655197144, -0.7342605590820312, 0.19274643063545227, -0.6717456579208374, -0.976823091506958, -0.6550852060317993, 1.489527702331543, 1.1878564357757568, -0.7829618453979492, 0.0...
func (inp ThingFrom) ThingPipeSeenAttr(attr func(a Thing) interface{}) (out ThingFrom) { cha := make(chan Thing) go inp.pipeThingSeenAttr(cha, attr) return cha }
[ -1.216032862663269, -0.7539545893669128, 0.6057104468345642, -1.4387645721435547, -1.0611261129379272, -0.22995050251483917, -0.40052562952041626, -0.12905855476856232, -0.579752504825592, -0.3035559058189392, 0.27188917994499207, 0.948346734046936, 1.3430209159851074, -0.46659114956855774...
func (inp ThingFrom) ThingForkSeen() (new, old ThingFrom) { cha1 := make(chan Thing) cha2 := make(chan Thing) go inp.forkThingSeenAttr(cha1, cha2, nil) return cha1, cha2 }
[ -0.5808018445968628, -0.7084232568740845, 0.5877243280410767, 0.04957856237888336, -0.5528701543807983, -0.9570144414901733, -0.8913401961326599, -1.1680173873901367, -1.2312326431274414, -0.7460269927978516, -0.9009778499603271, 1.6793147325515747, 0.9584289789199829, 0.490849107503891, ...
func (inp ThingFrom) ThingForkSeenAttr(attr func(a Thing) interface{}) (new, old ThingFrom) { cha1 := make(chan Thing) cha2 := make(chan Thing) go inp.forkThingSeenAttr(cha1, cha2, attr) return cha1, cha2 }
[ -0.7170435786247253, -0.8999488949775696, 0.5959275960922241, -0.31777578592300415, -1.222778081893921, -1.3151034116744995, -0.17057041823863983, -1.0657113790512085, -0.7468400597572327, -0.34375038743019104, -0.11393382400274277, 1.3011499643325806, 1.041103720664978, 0.7166711091995239...
func (inp ThingFrom) ThingTubeSeen() (tube func(inp ThingFrom) (out ThingFrom)) { return func(inp ThingFrom) (out ThingFrom) { return inp.ThingPipeSeen() } }
[ -0.8763830065727234, -0.43779483437538147, 0.6510339379310608, -0.24979782104492188, -0.6304895877838135, -0.4586303234100342, -0.07039282470941544, 0.02907920442521572, -0.7547682523727417, -0.18563979864120483, -0.7900739908218384, 0.489553302526474, 0.8980010747909546, -1.00388836860656...
func (inp ThingFrom) ThingTubeSeenAttr(attr func(a Thing) interface{}) (tube func(inp ThingFrom) (out ThingFrom)) { return func(inp ThingFrom) (out ThingFrom) { return inp.ThingPipeSeenAttr(attr) } }
[ -1.0782074928283691, -0.8578300476074219, 0.6698439121246338, -0.6803653836250305, -0.8815276026725769, -1.0193607807159424, 0.31350627541542053, 0.32730311155319214, -0.3285573124885559, 0.4162042438983917, 0.13986839354038239, 0.14255839586257935, 1.1172327995300293, -0.3764416575431824,...
func (this *Solution) Reset() []int { return this.nums }
[ -0.8933955430984497, -0.08718784898519516, 0.5052358508110046, 0.9251705408096313, 0.6603835225105286, -0.05292598530650139, 1.3540500402450562, -0.3212534487247467, 0.03011728823184967, -0.28660669922828674, -0.6918725967407227, 1.135729432106018, -0.3732658922672272, -0.4610070288181305,...
func (this *Solution) Shuffle() []int { nums := make([]int, len(this.nums)) copy(nums, this.nums) rand.Shuffle(len(nums), func(i int, j int) { nums[i], nums[j] = nums[j], nums[i] }) return nums }
[ -0.9707754254341125, -0.26514947414398193, 0.5945864915847778, -0.3159239888191223, -0.03371630609035492, 0.18947733938694, 1.0492384433746338, -0.24782025814056396, 1.4181374311447144, -0.5904433131217957, 0.11335798352956772, 0.7297255992889404, 0.0333053357899189, 0.00880518089979887, ...
func ConvertAddr(ipaddr string) uint32 { ip := net.ParseIP(ipaddr) if len(ip) == 16 { return binary.BigEndian.Uint32(ip[12:16]) } return binary.BigEndian.Uint32(ip) }
[ 0.05391286313533783, 0.3820718228816986, 0.593538761138916, -0.6713339686393738, -0.3588692843914032, 0.23805026710033417, -0.8802388310432434, -0.2716039717197418, 0.945892333984375, -0.11290115118026733, 1.0080403089523315, -0.40296491980552673, 0.2062070518732071, -0.024621309712529182,...
func DNSDomainIs(host, domain string) bool { if len(host) < len(domain) { return false } return strings.HasSuffix(host, domain) }
[ -0.3638781011104584, 0.942663311958313, 0.32860612869262695, 0.39942994713783264, -0.45648857951164246, -0.09184423089027405, -1.5871777534484863, -0.046836577355861664, 0.4268125593662262, 0.14744435250759125, -0.6913037300109863, 1.5514004230499268, -0.5169894099235535, 0.546216130256652...
func ShExpMatch(str, shexp string) bool { shexp = strings.Replace(shexp, ".", "\\.", -1) shexp = strings.Replace(shexp, "?", ".?", -1) shexp = strings.Replace(shexp, "*", ".*", -1) matched, err := regexp.MatchString("^"+shexp+"$", str) return err == nil && matched }
[ 0.2090224176645279, -0.8155043721199036, 0.9334225654602051, 0.17117159068584442, -0.8922208547592163, 0.20963256061077118, -1.3178297281265259, 1.0716876983642578, 0.33854860067367554, 0.612627387046814, -0.770183801651001, -0.5656862258911133, -0.49638673663139343, -0.15790259838104248, ...
func IsInNet(host, netip, netmask string) bool { if len(host) == 0 { return false } address, err := net.ResolveIPAddr("ip", host) if err != nil { return false } net := net.IPNet{ IP: net.ParseIP(netip), Mask: net.IPMask(net.ParseIP(netmask)), } return net.Contains(address.IP) }
[ -0.5610015392303467, -0.19042618572711945, 0.7677494883537292, 0.5484136343002319, -0.22640356421470642, -0.5890434384346008, -1.0201117992401123, 0.08087674528360367, -0.2462342530488968, -0.4201219975948334, 0.1888943463563919, -0.24371843039989471, -0.4812522530555725, -0.05540553480386...
func MyIPAddress() string { hostname, err := os.Hostname() if err != nil { return "127.0.0.1" } return DNSResolve(hostname) }
[ -1.142754077911377, -0.7777390480041504, 0.614936888217926, -0.1613280475139618, -0.31940263509750366, -1.131251335144043, -0.5217259526252747, 0.7474615573883057, 0.2664516568183899, 0.10017374902963638, -0.40885108709335327, -0.5189733505249023, -0.7326681613922119, -0.3414328694343567, ...
func DNSResolve(host string) string { address, err := net.ResolveIPAddr("ip", host) if err != nil { return "" } return address.String() }
[ -0.49549245834350586, 1.155524492263794, 0.30521759390830994, 0.326386421918869, -0.5002963542938232, -1.0529327392578125, -1.558876872062683, -0.6279120445251465, -0.09858031570911407, 0.019306929782032967, -0.6439757943153381, -0.16756819188594818, -0.3377447724342346, -0.774258196353912...
func IsPlainHostName(host string) bool { return strings.Index(host, ".") == -1 }
[ -1.5104930400848389, 0.19025179743766785, 0.6414594054222107, 0.6734141707420349, -1.2393056154251099, 0.3792000412940979, -0.47372040152549744, 0.3745710253715515, 0.9702781438827515, -0.2052496373653412, -0.6801977753639221, -0.09009426087141037, -0.7868605256080627, 0.3590230643749237, ...
func LocalHostOrDomainIs(host, hostdom string) bool { if host == hostdom { return true } return strings.LastIndex(hostdom, host+".") == 0 }
[ -0.5253166556358337, -0.6716002225875854, 0.3763076663017273, 0.11883002519607544, -0.4380761981010437, -0.1691747009754181, -1.1420389413833618, 0.14576388895511627, 0.9293922185897827, -0.24646779894828796, 0.18687710165977478, 1.0346930027008057, -0.20763902366161346, -0.113246262073516...
func IsResolvable(host string) bool { if len(host) == 0 { return false } if _, err := net.ResolveIPAddr("ip", host); err != nil { return false } return true }
[ -1.1128336191177368, 0.8608353734016418, 0.7865363955497742, 0.7085047364234924, -0.303744375705719, -0.42300674319267273, -1.1554155349731445, 1.054764747619629, -0.5330147743225098, 0.20828777551651, -0.5730015635490417, -0.8225151300430298, -0.4578186273574829, -0.08796300739049911, -...
func DNSDomainLevels(host string) int { return strings.Count(host, ".") }
[ -0.8755873441696167, 1.0107282400131226, 0.27358195185661316, 0.4186144173145294, -0.753021240234375, 0.4010103940963745, 0.0947461873292923, 0.058162324130535126, -0.10265784710645676, -0.3482849895954132, -1.1507972478866577, 0.017402207478880882, -0.05852089822292328, 0.8574719429016113...
func WeekdayRange(wd1, wd2, gmt string) bool { wd1 = strings.ToUpper(wd1) wd2 = strings.ToUpper(wd2) gmt = strings.ToUpper(gmt) if wd2 == "GMT" { wd2 = "" gmt = "GMT" } if wd2 == "" { wd2 = wd1 } now := DefaultNower.Now() if gmt == "GMT" { now = now.UTC() } today := now.Weekday() var ( ok = ...
[ -1.016401767730713, -0.4058767855167389, 0.7855941653251648, -0.4483124911785126, -0.9384384751319885, 0.044132716953754425, -1.3748195171356201, -0.13071618974208832, -1.4423696994781494, -0.13250906765460968, 0.18087127804756165, 0.1645173728466034, -0.8991100788116455, 1.224857687950134...
func DateRange(args []string) bool { getMonth := func(name string) time.Month { month, _ := month[name] return month } argc := len(args) if argc < 1 { return false } for k, v := range args { args[k] = strings.ToUpper(v) } now := DefaultNower.Now() isGMT := args[argc-1] == "GMT" if isGMT { argc-- n...
[ -0.4584749937057495, 0.3931475579738617, 1.0345593690872192, 0.8993350267410278, 0.0014589750207960606, 1.0104851722717285, -0.16191105544567108, -0.5233588814735413, -1.2036850452423096, 0.4650500416755676, 0.22686707973480225, -0.21524551510810852, -0.6622560024261475, 1.0235717296600342...
func TimeRange(args []string) bool { argc := len(args) if argc < 1 { return false } for k, v := range args { args[k] = strings.ToUpper(v) } now := DefaultNower.Now() isGMT := args[argc-1] == "GMT" if isGMT { argc-- now = now.UTC() } date1 := now date2 := now switch argc { case 1: tmp, err := strc...
[ -0.5116611123085022, -0.13163767755031586, 1.0411535501480103, 0.709956705570221, -0.22438837587833405, 0.528093159198761, -0.36824485659599304, -0.7915363907814026, -1.5823876857757568, 0.5306357741355896, -0.4132178723812103, -0.5571864247322083, -1.0084515810012817, 0.5939344763755798, ...
func Count(diagrama []string) int { altura := len(diagrama) if altura == 0 { return 0 } largura, count := len(diagrama[0]), 0 for y := 0; y < altura-1; y++ { for x := 0; x < largura-1; x++ { if diagrama[y][x] == '+' { count += Search(x, y, largura, altura, diagrama) } } } return coun...
[ -0.14936701953411102, -0.09427149593830109, 0.7007278800010681, -0.2489379644393921, -0.4845269024372101, 0.07745227962732315, 0.45390698313713074, 0.5914832949638367, 0.9634862542152405, 0.7370030283927917, -0.08672872185707092, -0.0907188132405281, 0.4440232515335083, 0.3035804033279419,...
func TestGitRemoteAnnouncer_Reset(t *testing.T) { g := MockRepositoryProducer{t: t} a, err := announcer.NewGitRemoteAnnouncer(announcer.GitRemoteAnnouncerConfig{ Git: &g, }) assert.NotNil(t, a) assert.Nil(t, err) prevClones := g.clones err = a.Reset() assert.Nil(t, err) assert.Equal(t, prevClones+1, g.clones...
[ 0.05171254277229309, 0.5766329765319824, 0.3047618567943573, -0.5733600854873657, 0.15820124745368958, 0.5261920094490051, 0.39414462447166443, -0.21187017858028412, -0.5545670986175537, 0.9772272109985352, -0.4523026645183563, 1.5559643507003784, -0.6477770209312439, -0.04934673383831978,...
func NewBaseHandler(cfg *config.Config) *baseHandler { // Created a client by the given node address rpcClient, err := rpc.Dial(cfg.NodeURL) if err != nil { log.Fatal("failed to deal with ETH node", err) } nodeClient := ethclient.NewClient(rpcClient) // Parse private key d := new(big.Int).SetBytes(common.From...
[ 0.28675132989883423, -0.6692104935646057, 0.7181447744369507, -0.6535042524337769, -0.15352237224578857, 0.263771653175354, -0.5044140815734863, 0.026542004197835922, -0.4027571678161621, 0.31161603331565857, -0.19550561904907227, 0.3199743628501892, -0.9367027878761292, -0.053441725671291...
func (k *Keeper) sendEth(ctx context.Context, to common.Address, amount *big.Int) error { txOpts := k.buildTxOpts(ctx) tx := types.NewTx(&types.LegacyTx{ Nonce: txOpts.Nonce.Uint64(), To: &to, Value: amount, Gas: txOpts.GasLimit, GasPrice: txOpts.GasPrice, Data: nil, }) signedTx, e...
[ 0.052967533469200134, -0.14173069596290588, 1.0501066446304321, -0.6393292546272278, 0.03906557336449623, 0.55991131067276, 0.020977256819605827, -0.4934972822666168, -0.12894177436828613, 0.3597017228603363, -0.2396291345357895, 0.4020576775074005, -0.09048762172460556, 0.0548317134380340...
func CreateRemoteRepo(name string) error { repoName := name if name == "" { dir, _ := os.Getwd() dir = strings.Replace(dir, " ", "\\ ", -1) dir = dir[strings.LastIndex(dir, "/")+1:] repoName = dir } repo := types.Repo{Name: repoName, Uname: config.Uname} inp := iocli.PromptRune("Create a remote repo at ...
[ 0.15105214715003967, 0.22248215973377228, 0.9411580562591553, 0.11140046268701553, -0.4349820911884308, 1.219577670097351, -0.43386954069137573, -0.12330681830644608, -0.5667557716369629, 0.45954522490501404, -1.4188740253448486, 0.45970258116722107, -0.9181333780288696, -0.668124258518219...
func (n *Network) AddTUN(iface string, ip net.IP) error { return errors.New("networking: unsupported platform for tun") }
[ -1.715959906578064, 0.4117294251918793, 0.44524049758911133, 0.17878523468971252, -0.07658014446496964, 0.29993635416030884, -0.2824038565158844, 0.30834656953811646, -0.21017315983772278, -0.7057833671569824, -0.4289415776729584, -0.4656798839569092, -0.3065713346004486, -0.16722500324249...
func Test_Errorcode_Build(t *testing.T) { errorCode := uerrors.NewCodeErrorWithPrefix("test", "test0001") errorCode.WithMsgBody("this is error message content with param.") errorCode.WithMsgBody("params: ${p1} , ${p2} , ${p3}.") //log.Printf() res := errorCode.Build("hello-message ", "my deal-other ", "define...
[ -0.30366262793540955, -0.8518350124359131, 0.644356906414032, 0.8139480948448181, 0.6380307078361511, -0.11934072524309158, 0.4740998148918152, 0.3299572765827179, -0.19666065275669098, -0.20529142022132874, -0.5088748931884766, 0.5936858654022217, -0.3095320463180542, -0.1151590645313263,...
func Test_Errorcode_BuildMap(t *testing.T) { errorCode := uerrors.NewCodeErrorWithPrefix("test", "test0001") errorCode.WithMsgBody("this is error message content with param.") errorCode.WithMsgBody("params: ${p1} , ${p2} , ${p3}.") paramValue := make(map[string]interface{}, 0) paramValue["p1"] = 122345 paramVa...
[ -0.5597525238990784, -0.4748099744319916, 0.7110074162483215, 0.1498575359582901, 0.3334643244743347, 0.35029488801956177, 0.9451613426208496, 0.34881290793418884, -0.18544384837150574, -0.072896309196949, -0.7342211008071899, 0.5853832960128784, -0.027236739173531532, -0.28904229402542114...
func (m *ChunkManager) Shutdown() { // Recover from the panic in case shutdown is nil . defer func() { _ = recover() }() // Only the main process needs to be shutdown. The other goroutines should // shut down on their own as they are fitted with exit on timeout. close(m.shutdown) }
[ 0.29089227318763733, -0.5882193446159363, 0.5115109086036682, 0.07529595494270325, 0.11337579786777496, 0.6586177349090576, -0.5856987833976746, 0.07963471859693527, -0.05484272912144661, 0.01788833737373352, 0.3325555622577667, 0.17653560638427734, -0.6260210871696472, 0.2759035527706146,...
func (m *ChunkManager) UploadExists(filepath string) bool { m.lock.RLock() defer m.lock.RUnlock() _, ok := m.incomplete[filepath] return ok }
[ -0.8779008984565735, -0.6660246253013611, 0.7526717185974121, -0.6711658835411072, 0.9892132878303528, -0.014207934960722923, 0.2833485007286072, -0.4306788444519043, -1.2558966875076294, 0.7822561264038086, 0.1169268861413002, -0.6337683796882629, -1.0125395059585571, -0.07829783856868744...
func (m *ChunkManager) PutWithStatus(filepath string, filesize int, r io.Reader) chan UploadStatus { m.Init() // Calculate the number of chunks chunks := int(math.Ceil(float64(filesize) / float64(m.ChunkSizeLimit))) // If the number of chunks is less than 2, we should make the parts channel // at least 2 big. n...
[ 0.07166828215122223, -0.5627251863479614, 0.5845164060592651, -1.0839002132415771, -0.5639122128486633, -0.41997480392456055, -0.163202166557312, 0.03880694508552551, -0.43799933791160583, 0.4545523524284363, 0.021375292912125587, 0.2022104561328888, -0.3137234151363373, -0.046005550771951...
func (m *ChunkManager) ResumePutWithStatus(filepath string, r io.Reader) (chan UploadStatus, error) { m.lock.RLock() upload := m.incomplete[filepath] m.lock.RUnlock() // Check if the upload is still processing (it should be). If not, we should not be trying to resume it. if upload == nil { return nil, ErrUpload...
[ 0.5314277410507202, -1.0802736282348633, 0.5775021314620972, -0.855256974697113, -0.7587782740592957, -0.6014485955238342, -0.04177168384194374, -0.19232189655303955, -0.1689639538526535, 0.4865446984767914, 0.4407622516155243, 0.24508197605609894, -0.9175665378570557, -0.6617847084999084,...
func (m *ChunkManager) RunUploader() { m.Init() for { select { // Exit when we shut down. case <-m.shutdown: return // Every hour, we want to check the expiry of uploads. If the uploads have expired, // we want to remove them. case <-time.After(time.Hour): m.lock.Lock() for id, u := range m.inco...
[ -0.5983433723449707, -0.7339863181114197, 0.6791042685508728, -0.014578684233129025, 0.13363179564476013, -0.7952191829681396, 0.4799918532371521, 0.05800146237015724, -0.8330544233322144, -0.26797473430633545, 0.03319752961397171, -0.1973562240600586, -0.5018169283866882, 0.61321133375167...
func (m *ChunkManager) GetIncompleteUpload(filepath string) Upload { m.lock.RLock() defer m.lock.RUnlock() return m.incomplete[filepath] }
[ -0.9061887264251709, -0.6981588006019592, 0.5323453545570374, -0.3596985638141632, -0.4207826554775238, -0.6383760571479797, 0.7477560639381409, -0.8066859245300293, -1.3355940580368042, 0.1325259953737259, -0.03613855317234993, -0.2631183862686157, -1.5433225631713867, 0.12114441394805908...
func (m *ChunkManager) GetChunkSize() int { return m.ChunkSizeLimit }
[ 0.44964125752449036, 0.2644398510456085, 0.6062941551208496, 0.519983172416687, -0.3137562870979309, -0.2506782114505768, -0.08772362768650055, 0.5028470754623413, -0.6021260023117065, -0.9786183834075928, 0.08532867580652237, 0.9822326898574829, -0.9920651912689209, 0.29903531074523926, ...
func (u *ChunkUpload) GetFilepath() string { return u.Filepath }
[ 0.5751649141311646, -0.45484668016433716, 0.50527423620224, 0.17481882870197296, 0.6486841440200806, 0.4129640460014343, 0.6857931613922119, -0.26900678873062134, -0.152226984500885, 0.11984633654356003, -0.14224320650100708, 0.015404227189719677, -0.8103750348091125, 0.38429850339889526, ...
func (u *ChunkUpload) UpdateExpiry(tm time.Time) { u.lock.Lock() defer u.lock.Unlock() u.Expiry = tm }
[ -0.5262317657470703, -1.1283015012741089, 0.25554516911506653, -0.2635635733604431, 0.5092530250549316, -0.018050292506814003, -0.8201382160186768, -0.07684090733528137, -0.7899748682975769, 1.0543103218078613, -0.9481093287467957, 0.27993157505989075, -0.7929752469062805, 0.35566550493240...
func (u *ChunkUpload) NumReceivedParts() int { u.lock.RLock() defer u.lock.RUnlock() return u.numReceivedParts }
[ 0.4643123149871826, 0.1898859590291977, 0.5763301849365234, -1.412362813949585, -0.5348917245864868, -0.4902568757534027, -0.3196737766265869, 0.3580421507358551, -0.2131309062242508, 0.26283183693885803, -1.0064057111740112, -0.17667727172374725, -0.767306387424469, -0.9335406422615051, ...
func (u *ChunkUpload) IsComplete() bool { u.lock.RLock() defer u.lock.RUnlock() return u.numReceivedParts >= u.Chunks }
[ 0.11577007174491882, -0.28225111961364746, 0.8454070687294006, 0.03898528218269348, 0.09573625028133392, -0.878159761428833, -0.48483550548553467, -0.547502338886261, -0.6962898373603821, 0.8387724161148071, -0.03766869381070137, -0.2561843693256378, -1.050405740737915, -0.3620624542236328...
func (u *ChunkUpload) incrementNumReceivedParts() { u.lock.Lock() defer u.lock.Unlock() u.numReceivedParts++ }
[ 0.11871704459190369, -0.040840815752744675, 0.5724409818649292, -1.2697511911392212, -0.36436283588409424, -0.4767535328865051, -0.3979760706424713, -0.05862416326999664, 0.11501399427652359, -0.25589272379875183, -0.6729594469070435, 0.36406567692756653, -0.6954239010810852, -0.8409795761...
func (u *ChunkUpload) IsProcessing() bool { u.lock.RLock() defer u.lock.RUnlock() return u.isProcessing }
[ -0.7876119017601013, 0.12128637731075287, 0.6513199806213379, 0.1881580799818039, 0.3180612325668335, -0.8701291680335999, -0.22723020613193512, 0.022784018889069557, -0.3414003849029541, 0.7052814364433289, -0.357785701751709, 0.3334367573261261, -1.2431244850158691, 0.018732363358139992,...
func (u *ChunkUpload) GetUploaded() int { u.lock.RLock() defer u.lock.RUnlock() return u.uploadedBytes }
[ -0.2244866043329239, 0.5739204287528992, 0.876569926738739, 0.00540717039257288, 0.12914854288101196, -0.8645060062408447, 1.1659473180770874, -0.5003219246864319, -0.7835240960121155, -0.7617151737213135, -1.1469570398330688, 0.7385914921760559, -1.5121901035308838, -0.18470069766044617, ...
func (u *ChunkUpload) Send(r io.Reader, chunkSizeLimit int) { for { b := make([]byte, chunkSizeLimit) n, err := r.Read(b) if err == io.EOF { // do nothing! return } if err != nil { u.notifier <- ErrUploadStatus(err) return } if n == 0 { continue } // The byte array *always* has size ch...
[ -0.31189489364624023, -0.22021706402301788, 0.5753116011619568, -0.22949804365634918, -0.20958462357521057, -0.4089282751083374, -0.416820228099823, -0.42676958441734314, -0.6045316457748413, 0.561484158039093, -0.044880460947752, 0.7739335298538208, -0.08332382887601852, 0.170728459954261...
func (u *ChunkUpload) Run() error { u.SetIsProcessing(true) defer func() { u.SetIsProcessing(false) close(u.parts) }() if !u.FS.IsInitialized() { if err := u.FS.InitializeChunk(u); err != nil { // Errors are returned to the calling functions through the notifier channel. // returning error here allows ...
[ -0.4592621624469757, -0.20719978213310242, 0.8751410245895386, -0.4297166168689728, 0.3004433214664459, -0.7114802598953247, 0.37000635266304016, -0.12345438450574875, -0.6021626591682434, -0.3283833861351013, -0.31780701875686646, 0.039503972977399826, -0.7760117053985596, 0.3119496703147...
func (impl *ProjectAPIClient) AllTemplates(ctx context.Context, token *api.Token) (reply []*api.TemplateStatus, err error) { err = client.CallHTTP(ctx, impl.BaseURL, "ProjectAPI.AllTemplates", atomic.AddUint64(&impl.sequence, 1), &reply, token) return }
[ -0.849865198135376, 0.07337091863155365, 0.5574602484703064, 0.6574730277061462, -0.12108603864908218, -0.16099563241004944, -1.085397720336914, -0.397168904542923, 0.7303838729858398, 0.41411441564559937, -0.9253436326980591, 0.47136038541793823, -1.2625713348388672, 0.7984742522239685, ...
func (impl *ProjectAPIClient) List(ctx context.Context, token *api.Token) (reply []application.Definition, err error) { err = client.CallHTTP(ctx, impl.BaseURL, "ProjectAPI.List", atomic.AddUint64(&impl.sequence, 1), &reply, token) return }
[ -0.9571684002876282, 0.16213682293891907, 0.3150736689567566, 0.6017546057701111, 0.528566837310791, -0.010275968350470066, -0.6151463389396667, -0.5743600130081177, -0.10977010428905487, 0.748831570148468, -0.7959457635879517, 0.2888934910297394, -0.626036524772644, 0.7063206434249878, ...
func (impl *ProjectAPIClient) Templates(ctx context.Context, token *api.Token) (reply []*api.Template, err error) { err = client.CallHTTP(ctx, impl.BaseURL, "ProjectAPI.Templates", atomic.AddUint64(&impl.sequence, 1), &reply, token) return }
[ -1.4177435636520386, 0.39021459221839905, 0.29196083545684814, 0.016497384756803513, 0.0011285129003226757, -0.5544747114181519, -0.6297751069068909, -1.0555596351623535, 0.4283369779586792, 0.31851670145988464, -0.8136216998100281, 0.7752253413200378, -1.2259420156478882, -0.1783331781625...
func (impl *ProjectAPIClient) Create(ctx context.Context, token *api.Token) (reply *application.Definition, err error) { err = client.CallHTTP(ctx, impl.BaseURL, "ProjectAPI.Create", atomic.AddUint64(&impl.sequence, 1), &reply, token) return }
[ -1.1096765995025635, 0.5577993988990784, 0.28808918595314026, 0.7886877059936523, 0.03697383403778076, 0.5597313046455383, -0.33739152550697327, -0.8068938255310059, -0.8292560577392578, 0.7287425994873047, -0.4275337755680084, -0.12283492088317871, -1.1276051998138428, 0.5107278227806091,...
func (impl *ProjectAPIClient) CreateFromTemplate(ctx context.Context, token *api.Token, templateName string) (reply *application.Definition, err error) { err = client.CallHTTP(ctx, impl.BaseURL, "ProjectAPI.CreateFromTemplate", atomic.AddUint64(&impl.sequence, 1), &reply, token, templateName) return }
[ -0.5628809332847595, -0.14219880104064941, 0.35208529233932495, 0.42302659153938293, -0.2939646244049072, 0.389763206243515, -0.2835965156555176, -0.875434935092926, -0.6009658575057983, 0.40016159415245056, -0.9597446322441101, -0.3125288784503937, -0.9460150003433228, 0.5726056098937988,...
func (impl *ProjectAPIClient) CreateFromGit(ctx context.Context, token *api.Token, repo string) (reply *application.Definition, err error) { err = client.CallHTTP(ctx, impl.BaseURL, "ProjectAPI.CreateFromGit", atomic.AddUint64(&impl.sequence, 1), &reply, token, repo) return }
[ -0.1221836656332016, 0.3137856721878052, 0.326006144285202, 0.44082337617874146, 0.13572196662425995, 0.6371746063232422, -0.9126231670379639, -0.9318785667419434, -0.797522783279419, 0.5814358592033386, -0.7351226806640625, 0.3324016034603119, -0.4342234432697296, 0.8604097366333008, 0....
func GetPasswdsPath(workDirectory string) (string, error) { return fmt.Sprintf("%s/.PASSWDS", workDirectory), nil }
[ -0.6546611189842224, -0.3282838463783264, 0.57823646068573, -0.5126965045928955, 0.027949687093496323, 0.4122926592826843, 0.9316004514694214, -0.655134916305542, 0.305342435836792, 0.19283847510814667, 0.4390242099761963, 0.299461305141449, -0.4120914936065674, 0.6636700630187988, -1.00...
func GetBoardPath(workDirectory string) (string, error) { return fmt.Sprintf("%s/.BRD", workDirectory), nil }
[ 0.07360395789146423, 0.6856376528739929, 0.7173075675964355, 0.7254140973091125, -0.4921082556247711, 0.6338047981262207, 1.7560765743255615, -0.6530590653419495, -0.36968111991882324, 0.09201047569513321, 0.057449888437986374, 0.6276981234550476, -1.2582393884658813, 1.2264841794967651, ...
func GetUserFavoritePath(workDirectory string, userid string) (string, error) { return fmt.Sprintf("%s/home/%c/%s/.fav", workDirectory, userid[0], userid), nil }
[ 0.23139163851737976, 0.6595608592033386, 0.39084818959236145, 1.55105721950531, -0.8695921897888184, 0.5844329595565796, 0.5501081943511963, -0.946477472782135, -0.2038285881280899, 0.6718853712081909, 0.03851412236690521, 1.0730959177017212, -0.04657610505819321, 0.00786879938095808, 0....
func GetLoginRecentPath(workDirectory string, userid string) (string, error) { return fmt.Sprintf("%s/home/%c/%s/logins.recent", workDirectory, userid[0], userid), nil }
[ -0.9984948635101318, 0.2561316192150116, 0.781431257724762, 0.013995766639709473, -0.2591029703617096, 0.5643011331558228, 0.5411143898963928, -0.6345212459564209, -0.014839394018054008, 0.023340316489338875, 1.2434239387512207, 0.7362381815910339, -0.7092692852020264, -0.16499556601047516...
func UserNotFoundException() error { return fmt.Errorf("user does not exist or wrong credentials") }
[ 0.48028793931007385, -0.722880482673645, 0.00914526917040348, 0.4668779671192169, -0.32157543301582336, 0.5722531676292419, -0.035441212356090546, -0.5221478939056396, -0.03775021433830261, 0.35120126605033875, 0.05136074498295784, 0.4647469222545624, 0.9199473261833191, 0.6288222074508667...
func UserAlreadyExists() error { return fmt.Errorf("user already exists") }
[ -0.16350243985652924, -0.5399155616760254, 0.2354585975408554, -0.3251143991947174, 0.25157514214515686, 0.04939001053571701, 0.4442638158798218, -0.6258559823036194, 0.03813488781452179, 0.410746693611145, -0.349449098110199, 0.22572623193264008, 1.5323331356048584, 0.7983638048171997, ...
func mockASRockBMC() *httptest.Server { handler := http.NewServeMux() handler.HandleFunc("/", index) handler.HandleFunc("/api/session", session) handler.HandleFunc("/api/asrr/fw-info", fwinfo) handler.HandleFunc("/api/fru", fruinfo) handler.HandleFunc("/api/asrr/inventory_info", inventoryinfo) handler.HandleFunc...
[ 0.14854209125041962, -0.5456059575080872, 0.9898438453674316, -0.5023223757743835, 0.21222543716430664, -0.32387056946754456, 0.48638761043548584, -0.4254890978336334, -0.030923521146178246, -0.34510305523872375, 0.2087269276380539, 0.449850469827652, -1.1528024673461914, 0.742820560932159...
func CreateKindCluster(clusterName string) error { lb, err := actions.SetUpLoadBalancer(clusterName) if err != nil { return errors.Wrap(err, "failed to create load balancer") } lbipv4, _, err := lb.IP() if err != nil { return errors.Wrap(err, "failed to get ELB IP") } cpMounts := []cri.Mount{ { Contai...
[ 1.1122193336486816, -0.06899785995483398, 0.8436732292175293, -0.4070129990577698, 0.5785151720046997, 0.302185982465744, -0.06119260936975479, -1.0081154108047485, -0.19850018620491028, 0.20121300220489502, -0.014189510606229305, 0.7287357449531555, -0.5472316741943359, 0.7129110097885132...
func (*ShellResize) Descriptor() ([]byte, []int) { return file_shell_proto_rawDescGZIP(), []int{0} }
[ -0.615702748298645, 1.3374850749969482, 0.5770343542098999, -0.6499767303466797, 0.08679687976837158, -0.6386629939079285, -0.5729967951774597, 0.2102910429239273, -0.6589794158935547, -0.31703445315361023, -0.7984267473220825, 0.6259243488311768, -0.7526416182518005, 0.4650682806968689, ...
func (*ShellData) Descriptor() ([]byte, []int) { return file_shell_proto_rawDescGZIP(), []int{1} }
[ -0.5815469026565552, 0.4488682746887207, 0.3229154050350189, -0.7029098868370056, -0.27542993426322937, 0.8439465761184692, -0.3985230028629303, 0.5069159865379333, -0.4261462986469269, -0.6479923725128174, -0.7567309737205505, 1.0474432706832886, -0.015412505716085434, 0.6635856628417969,...
func (e *MediatorError) GetType() ErrorType { return e.Type }
[ -0.19396871328353882, -0.20323112607002258, 0.241611048579216, 0.3473426401615143, 1.3052774667739868, -0.23568195104599, 0.32340607047080994, 0.10343846678733826, 1.344286561012268, -0.050396449863910675, 0.1580081582069397, 0.7003638744354248, -0.6142412424087524, 0.44687193632125854, ...
func (w *Workspace) optionSet(updates []interface{}) { optionName := updates[1] wid := util.ReflectToInt(updates[4]) // new, err := strconv.Atoi(updates[2].(string)) // if err != nil { // return // } w.optionsetMutex.Lock() switch optionName { case editor.config.Editor.OptionsToUseGuideWidth: w.setBuffTS(w...
[ -0.6875060200691223, -0.6826106905937195, 0.2888616919517517, -0.44795751571655273, 0.08866830915212631, -0.19773849844932556, 0.7413678765296936, -1.0634582042694092, 0.3227974772453308, 0.35845205187797546, 0.23651130497455597, 0.05478266254067421, -0.6431924700737, 0.5471773743629456, ...
func ReadFeed(filename string) { feedCh <- filename }
[ 1.034354567527771, -0.5864713788032532, 0.47306761145591736, 0.05114273354411125, 0.5014596581459045, 0.7577841877937317, 0.20010775327682495, -0.047770220786333084, -1.926504373550415, -0.47476863861083984, 0.20135733485221863, 1.3197405338287354, 0.271355003118515, 0.32636165618896484, ...
func indexer() { for { select { case file := <-feedCh: readFeed(file) } } }
[ 0.23501497507095337, -0.9191760420799255, 0.2069016546010971, 0.272246390581131, 0.27995723485946655, -0.24664032459259033, 0.8390333652496338, -0.27570703625679016, -1.2925902605056763, -0.3794746398925781, 0.9840642213821411, 0.06208352372050285, -0.09730707854032516, 0.5521681904792786,...
func Start() { go indexer() // Start pulling feeds NewFeed("hn.rss", 2*time.Hour, "http://news.ycombinator.com/bigrss") }
[ 0.22691935300827026, -0.058006998151540756, 0.24781109392642975, 0.9730627536773682, 1.0184494256973267, -0.5330073833465576, -0.6907843947410583, 0.5430864095687866, -0.6349487900733948, -0.5985065698623657, -0.9339348077774048, 0.7411359548568726, 0.0235726498067379, 0.07459597289562225,...
func NewConfig() *Config { return &Config{} }
[ 0.9363105297088623, -0.48618748784065247, -0.15157464146614075, 0.7617097496986389, -0.8610808849334717, -0.11573035269975662, 0.047758352011442184, 0.44236356019973755, -0.17933401465415955, -0.671612560749054, -0.08021540939807892, 0.4060926139354706, -0.0494607575237751, 0.5062091350555...
func (cfg *Config) ServiceID() string { return os.Getenv("SERVICE_ID") }
[ 0.5523250699043274, -0.7547292709350586, 0.1507032960653305, 0.5833119750022888, 0.2145199179649353, 1.8432320356369019, 0.6152475476264954, -0.05759638920426369, -0.39415743947029114, 1.0813498497009277, 0.1994192898273468, 1.109366774559021, -0.48164090514183044, 1.9219555854797363, 0....
func (cfg *Config) CacheServer() string { return os.Getenv("CACHE_SERVER") }
[ -1.3765887022018433, -0.6861971020698547, 0.34343546628952026, 0.39022284746170044, -0.16613049805164337, 1.4874483346939087, -0.09562796354293823, 0.2683534324169159, -0.6036853790283203, 0.20848217606544495, -0.7422345876693726, 0.5369648337364197, -0.5789331793785095, 1.008520483970642,...
func (cfg *Config) MQServers() string { return os.Getenv("MQ_SERVERS") }
[ -0.3053157925605774, -0.6677210330963135, 0.32819464802742004, -0.43701642751693726, -0.6163701415061951, 0.8650180697441101, -0.649015486240387, -0.2788909673690796, 0.8564485311508179, 0.4509415924549103, -0.5503756403923035, 0.12041781842708588, -0.6868213415145874, 1.1830008029937744, ...
func (t *Topology) AddNode(n Node) error { return nil }
[ -1.0651830434799194, 1.142371416091919, 0.41043901443481445, 0.6653115153312683, 0.7523743510246277, 0.6940092444419861, -0.11793734133243561, -0.02450021542608738, 0.5898419618606567, -0.7150489091873169, -0.0684400200843811, -0.903293788433075, -0.11802679300308228, 0.7287835478782654, ...
func (t *Topology) RemoveNode(n Node) error { return nil }
[ -0.9517416954040527, 0.9693195223808289, 0.3146134316921234, 0.18375320732593536, 0.7092258334159851, 0.2030138224363327, 0.30854564905166626, 0.4970412254333496, 0.5485610365867615, -0.21121643483638763, -0.5101348161697388, -1.24166738986969, -0.035945069044828415, 0.5066542625427246, ...
func (t *Topology) AddLink(idx uint, idy uint, l Link) error { return nil }
[ -1.2277755737304688, 0.47143542766571045, 0.36454451084136963, 0.4584803581237793, 1.0704833269119263, 0.14690645039081573, -0.2863045036792755, -0.45521774888038635, 0.4676887094974518, -1.3638006448745728, 0.5500515103340149, -0.3176620602607727, -0.5051000118255615, -0.25674834847450256...
func (t *Topology) RemoveLink(idx uint, idy uint) error { return nil }
[ -1.2268129587173462, 0.12186434119939804, 0.36828818917274475, 0.08058825135231018, 0.7576974034309387, -0.6061643362045288, 0.36883407831192017, -0.010822168551385403, 0.2754128873348236, -0.8968976140022278, 0.43507349491119385, -0.40213659405708313, -0.6494715213775635, -0.8128288984298...
func (*Polygon) Descriptor() ([]byte, []int) { return file_yandex_cloud_ai_ocr_v1_ocr_proto_rawDescGZIP(), []int{0} }
[ -0.510373055934906, -0.414850652217865, 0.5286799669265747, -0.8075351119041443, 0.016052691265940666, -0.24021683633327484, 0.13960152864456177, 0.8159955739974976, 0.2734605073928833, -0.9582448601722717, -1.1096357107162476, 0.35468924045562744, 0.20219409465789795, 0.044432688504457474...
func (*Vertex) Descriptor() ([]byte, []int) { return file_yandex_cloud_ai_ocr_v1_ocr_proto_rawDescGZIP(), []int{1} }
[ -0.4611566960811615, 0.06897486746311188, 0.31855443120002747, -0.17701852321624756, -0.33233189582824707, -0.4765174388885498, 0.5001806020736694, 0.5415694117546082, -0.18569673597812653, -0.668458104133606, -0.48756149411201477, 0.7427014112472534, -0.255389928817749, 0.0600610412657260...
func (*TextAnnotation) Descriptor() ([]byte, []int) { return file_yandex_cloud_ai_ocr_v1_ocr_proto_rawDescGZIP(), []int{2} }
[ -0.515132486820221, 0.040241532027721405, 0.5347030162811279, -0.6414979100227356, -0.1981128454208374, -0.258810818195343, 0.31254690885543823, 0.3394693434238434, -0.29933834075927734, 0.8675143122673035, -1.1249512434005737, -0.0744800716638565, -0.19626225531101227, 0.4235702455043793,...
func (*Entity) Descriptor() ([]byte, []int) { return file_yandex_cloud_ai_ocr_v1_ocr_proto_rawDescGZIP(), []int{3} }
[ -1.1166483163833618, -0.2554796040058136, 0.5433385968208313, -0.7147417664527893, 0.25712335109710693, -0.053323615342378616, 0.3901738226413727, 0.4288744628429413, 0.09879599511623383, -0.45771369338035583, 0.020341243594884872, 0.11775163561105728, 0.6724278330802917, 1.157466530799865...
func (*Block) Descriptor() ([]byte, []int) { return file_yandex_cloud_ai_ocr_v1_ocr_proto_rawDescGZIP(), []int{4} }
[ -0.834728479385376, 0.7481765151023865, 0.7276906967163086, -0.14939682185649872, 0.08481620252132416, -0.006191362626850605, 0.5144124031066895, -0.051037538796663284, -0.008120153099298477, -1.0244348049163818, -0.2037440538406372, 0.29133811593055725, 0.09905675798654556, 0.657999694347...
func (*Alternative) Descriptor() ([]byte, []int) { return file_yandex_cloud_ai_ocr_v1_ocr_proto_rawDescGZIP(), []int{5} }
[ -0.7045733332633972, -0.014289852231740952, 0.6763598322868347, -0.5574023127555847, -0.7029857039451599, 0.16071206331253052, -0.29131829738616943, 0.015087024308741093, -0.8176109790802002, 0.15641942620277405, 0.06346137076616287, 0.05296553671360016, 0.40392938256263733, 0.793411910533...
func (*Line) Descriptor() ([]byte, []int) { return file_yandex_cloud_ai_ocr_v1_ocr_proto_rawDescGZIP(), []int{6} }
[ -0.554600715637207, 0.10674145072698593, 0.4337184429168701, 0.2773391306400299, 0.388601690530777, -0.15951508283615112, -0.24104005098342896, 0.03582329675555229, -0.34096840023994446, -1.2026609182357788, -0.34140250086784363, -0.3919995427131653, -0.2749469578266144, 0.4352778792381286...
func (*Word) Descriptor() ([]byte, []int) { return file_yandex_cloud_ai_ocr_v1_ocr_proto_rawDescGZIP(), []int{7} }
[ -0.5582229495048523, 0.30586978793144226, 0.5518973469734192, 0.14210236072540283, -0.6154017448425293, 0.2489815205335617, 0.32478436827659607, 0.03977831453084946, 0.23182466626167297, -0.3263894319534302, -0.11080371588468552, 0.14708906412124634, 0.23930492997169495, 0.8433541655540466...
func (*Block_DetectedLanguage) Descriptor() ([]byte, []int) { return file_yandex_cloud_ai_ocr_v1_ocr_proto_rawDescGZIP(), []int{4, 0} }
[ 0.14865849912166595, -0.20692689716815948, 0.3041971027851105, 0.8246152997016907, 0.07692232728004456, -0.3172779083251953, 0.38720428943634033, -0.16624771058559418, -0.22209376096725464, -1.016390323638916, -0.7340877652168274, -0.05883863940834999, -0.1555277556180954, 1.07575356960296...
func (h HEX) ToRGB() RGB { var x RGB if len(h) == 7 || len(h) == 4 { hex := `(?i)^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})` comp := regexp.MustCompile(hex) r := comp.FindStringSubmatch(string(h)) HEXControl(r) tr, _ := strconv.ParseInt(r[1], 16, 0) tg, _ := strconv.ParseInt(r[2], 16, 0) tb, _ := strconv.Pa...
[ 0.019108358770608902, 0.2517329156398773, 0.6756592392921448, -0.49946466088294983, 0.3944070339202881, 0.19202914834022522, -0.4101298749446869, 0.9398787617683411, -0.6682934165000916, 0.27047038078308105, -0.3205643892288208, -0.3706086575984955, -0.5930327773094177, -0.0986205711960792...
func (c *IndexController) IndexHandler(ctx *iris.Context) { if err := ctx.Render("index.html", nil); err != nil { fmt.Println(err.Error()) panic(err) } }
[ 0.707901120185852, 0.03217913210391998, 0.2543298602104187, 0.48466044664382935, 0.4511369466781616, 1.1371712684631348, 1.3636811971664429, 1.3631373643875122, 0.17241016030311584, -0.19337184727191925, 0.7199856638908386, -0.21794304251670837, -0.5497062802314758, -0.5082212090492249, ...
func (c *IndexController) GetShortHandler(ctx *iris.Context) { url := ctx.Param("url") longURL := client.Get(url).Val() if len(longURL) > 0 { if strings.HasPrefix(longURL, "http://") || strings.HasPrefix(longURL, "https://") { ctx.Redirect(longURL) return } ctx.Redirect("http://" + longURL) return }...
[ -0.003646034514531493, 0.7208080887794495, 0.711963951587677, 0.30014821887016296, -0.05151089280843735, 0.5569753050804138, 0.7263769507408142, 0.44558802247047424, 0.8382730484008789, -0.8976798057556152, 0.01904582604765892, 0.4321557283401489, 0.05483973026275635, 0.2828187346458435, ...
func (c *IndexController) ShortURLHandler(ctx *iris.Context) { url := ctx.FormValue("url") resp := new(Response) inputURL := string(url) if !strings.HasPrefix(inputURL, "http") { inputURL = "http://" + inputURL } if inputURL == "" { resp.Result = false resp.Message = "Please input URL first..." ctx.JSO...
[ -0.2959827482700348, -0.12807032465934753, 0.8020885586738586, 0.13389350473880768, -0.29818370938301086, 0.9239878058433533, 0.9491625428199768, -0.0008967051981016994, 0.42752471566200256, 0.60013347864151, -0.2833581566810608, 0.418976366519928, -0.8949458599090576, 0.054282184690237045...
func NewController(betValidator BetValidator, betService BetService) *Controller { return &Controller{ betValidator: betValidator, betService: betService, } }
[ 0.767859697341919, -0.21276023983955383, 0.23222722113132477, 1.180543303489685, -0.5539354085922241, 0.9686689376831055, -0.2968207001686096, -0.0038355346769094467, 0.15689751505851746, -0.16493941843509674, 0.879738986492157, 0.7197993993759155, 0.1422158181667328, 0.5527234077453613, ...
func (e *Controller) ProcessBet() gin.HandlerFunc { return func(ctx *gin.Context) { var betRequestDto models.BetRequestDto err := ctx.ShouldBindWith(&betRequestDto, binding.JSON) if err != nil { ctx.String(http.StatusBadRequest, "bet request is not valid.") return } if !e.betValidator.BetIsValid(betRe...
[ -0.5237987041473389, -0.7411818504333496, 0.6894654631614685, 0.18025802075862885, 0.11294696480035782, 0.5989133715629578, 0.3548661768436432, 0.16602694988250732, -0.5407885909080505, -0.10891567170619965, 0.9813735485076904, -0.06799118965864182, 0.12344565242528915, 0.36646032333374023...
func (*InitializeDatabaseReq) Descriptor() ([]byte, []int) { return file_idx_idx_proto_rawDescGZIP(), []int{0} }
[ -1.115383267402649, 0.6871752142906189, 0.9377701878547668, 0.32406696677207947, 0.9895992875099182, -0.1965661197900772, 0.33305230736732483, 1.2159130573272705, -0.42305177450180054, -0.546540379524231, -1.1887508630752563, 0.8450742959976196, -0.7494049072265625, 1.0822962522506714, 0...
func (*InitializeDatabaseStatus) Descriptor() ([]byte, []int) { return file_idx_idx_proto_rawDescGZIP(), []int{1} }
[ -0.2989938259124756, 0.673873245716095, 0.43258774280548096, -0.35232993960380554, 0.6284459233283997, -0.0149920042604208, 0.3520171642303467, 0.6011764407157898, -0.24996502697467804, -0.22875766456127167, -1.9078469276428223, 0.7648321390151978, -0.8556678295135498, 0.6116393804550171, ...
func (*PreparePlatformsReq) Descriptor() ([]byte, []int) { return file_idx_idx_proto_rawDescGZIP(), []int{2} }
[ -1.2460561990737915, 0.8373475074768066, 0.6622738242149353, 0.5733746886253357, -0.039860229939222336, 0.07439462095499039, 0.9996371269226074, 0.26268571615219116, -0.388730525970459, -0.30427300930023193, -0.7613182663917542, -0.023243455216288567, 0.13077592849731445, 1.121266961097717...
func (*PreparePlatformsStatus) Descriptor() ([]byte, []int) { return file_idx_idx_proto_rawDescGZIP(), []int{3} }
[ -0.3102143108844757, 0.8112977147102356, 0.2323990911245346, 0.23823781311511993, -0.249249666929245, 0.21431300044059753, 1.0185106992721558, 0.1731243133544922, 0.001845926628448069, 0.17398355901241302, -1.590478539466858, -0.2857048213481903, 0.03901403769850731, 0.6005937457084656, ...
func (o *FormatScoreServiceUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewFormatScoreServiceUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } ...
[ -0.7738635540008545, -0.8407487273216248, 0.8653190732002258, 0.4047255516052246, 0.22235706448554993, -0.8755003809928894, 0.2405894249677658, -0.4763110280036926, 0.7468611598014832, 0.38864368200302124, 0.8980107307434082, -0.4632880687713623, -1.1182279586791992, -0.21245510876178741, ...
func NewFormatScoreServiceUpdateOK() *FormatScoreServiceUpdateOK { return &FormatScoreServiceUpdateOK{} }
[ -1.1867722272872925, -0.8747746348381042, 0.4149388074874878, 0.8183934092521667, -0.7809810042381287, 0.3000263571739197, 0.7635928988456726, 0.5267083644866943, -0.23062387108802795, 0.1983279138803482, 0.35626500844955444, -0.25884997844696045, 0.6885693669319153, -0.08690790086984634, ...