text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (k *K8sEventResolver) LastTimeMs() float64 {
return float64(k.lastTimeNS) / 1e6
} | [
0.6516779065132141,
-0.07440311461687088,
0.42702144384384155,
-0.4112236499786377,
0.9187605381011963,
-0.7798882126808167,
-0.4392233192920685,
-0.15309536457061768,
0.5472699403762817,
-0.04904765635728836,
0.4377359449863434,
-1.034737229347229,
-0.7408705353736877,
0.2424580305814743,... |
func (k *K8sEventResolver) Message() *string {
return k.message
} | [
0.18831734359264374,
0.31759461760520935,
0.10780996084213257,
0.7063466906547546,
0.5810171365737915,
-0.05632832646369934,
-0.3975539207458496,
0.019769858568906784,
0.21568140387535095,
-0.5399736762046814,
0.31386134028434753,
-0.8493638038635254,
-0.07717280089855194,
0.45658084750175... |
func isExported(name string) bool {
r, _ := utf8.DecodeRuneInString(name)
return unicode.IsUpper(r)
} | [
-0.03928694501519203,
0.3338661193847656,
0.577272891998291,
0.4582342505455017,
-0.7781562805175781,
0.11314788460731506,
-0.6996521949768066,
0.34849992394447327,
1.4773279428482056,
0.9751994013786316,
-1.0396180152893066,
0.14936351776123047,
-0.5857202410697937,
-0.07699857652187347,
... |
func (handler *RpcHandler) isExportedOrBuiltinType(t reflect.Type) bool {
for t.Kind() == reflect.Ptr {
t = t.Elem()
}
// PkgPath will be non-empty even for an exported type,
// so we need to check the type name as well.
return isExported(t.Name()) || t.PkgPath() == ""
} | [
0.33630305528640747,
-0.0006284196279011667,
0.47413527965545654,
0.9866321682929993,
0.12358903139829636,
0.6290768384933472,
0.29070714116096497,
-0.6924487352371216,
1.033315658569336,
0.9493808746337891,
-0.7475191354751587,
0.10365863889455795,
-0.8040913939476013,
1.1390178203582764,... |
func (hd *Datapath) CreateTCPProxyPolicy(tcp *netproto.TCPProxyPolicy, vrf *netproto.Vrf) error {
// This will ensure that only one datapath config will be active at a time. This is a temporary restriction
// to ensure that HAL will use a single config thread , this will be removed prior to FCS to allow parallel conf... | [
0.24733951687812805,
0.23551465570926666,
0.5145127773284912,
-0.9484424591064453,
0.16571864485740662,
0.38875919580459595,
0.27179017663002014,
0.6210156083106995,
-0.3811693489551544,
0.3081274926662445,
0.1938021034002304,
-0.6981394290924072,
-0.08138691633939743,
0.15817350149154663,... |
func (hd *Datapath) UpdateTCPProxyPolicy(tcp *netproto.TCPProxyPolicy, vrf *netproto.Vrf) error {
// This will ensure that only one datapath config will be active at a time. This is a temporary restriction
// to ensure that HAL will use a single config thread , this will be removed prior to FCS to allow parallel conf... | [
-0.2012835144996643,
-0.38390249013900757,
0.4202871322631836,
-1.0551341772079468,
-0.27732598781585693,
0.48335957527160645,
0.39487290382385254,
0.8519670367240906,
-0.4075865149497986,
0.6971397995948792,
0.03470601513981819,
-0.4790633022785187,
-0.3863544464111328,
0.0897659659385681... |
func (hd *Datapath) DeleteTCPProxyPolicy(tcp *netproto.TCPProxyPolicy, vrf *netproto.Vrf) error {
// This will ensure that only one datapath config will be active at a time. This is a temporary restriction
// to ensure that HAL will use a single config thread , this will be removed prior to FCS to allow parallel conf... | [
0.28209319710731506,
0.010222979821264744,
0.5706182718276978,
-0.5262086391448975,
-0.017659572884440422,
0.7531348466873169,
0.38868433237075806,
0.712835967540741,
0.0054549407213926315,
-0.024983501061797142,
0.0517987385392189,
-0.47953158617019653,
-1.070862054824829,
0.1918724477291... |
func NewOppJNotificationHandler(T *template.Template, NotfServ notificationUse.NotificationService) *OppJNotificationHandler {
return &OppJNotificationHandler{tmpl: T, notfService: NotfServ}
} | [
-0.26631736755371094,
-0.4007384181022644,
-0.11663657426834106,
0.04736275598406792,
-1.0004104375839233,
0.5070390105247498,
0.6369410753250122,
-0.10197966545820236,
0.25715044140815735,
-0.12179694324731827,
0.039963480085134506,
-0.8523342609405518,
-0.7587500214576721,
0.513971328735... |
func (ojh *OppJNotificationHandler) DeleteOpponentNotification(w http.ResponseWriter, r *http.Request) {
if r.Method == http.MethodGet {
idRaw := r.URL.Query().Get("id")
id, err := strconv.Atoi(idRaw)
if err != nil {
fmt.Println("Can't get the id!")
panic(err)
}
notification, errs := ojh.notfServi... | [
-0.4580707252025604,
-0.5724254846572876,
1.0240074396133423,
0.2869684398174286,
-0.13564515113830566,
0.6440046429634094,
0.7737288475036621,
0.7028789520263672,
0.04922141507267952,
0.5026816725730896,
0.2569320499897003,
-0.6435946226119995,
-0.12436924129724503,
0.8385705351829529,
... |
func (ojh *OppJNotificationHandler) NotificationsOpponent(w http.ResponseWriter, r *http.Request) {
notifications, errs := ojh.notfService.Notifications()
if len(errs) > 0 {
return
}
notificationStore := []entity.Notification{}
for i := 0; i < len(notifications); i++ {
forWhom := CheckForWhom(notifications... | [
-0.6552152037620544,
-0.027222640812397003,
0.5506558418273926,
-0.6557892560958862,
0.26040923595428467,
-0.14470911026000977,
0.8180890083312988,
0.6410176157951355,
-0.32363227009773254,
0.8229678869247437,
0.17532555758953094,
-1.0822824239730835,
0.11260440945625305,
-0.23801857233047... |
func (ojh *OppJNotificationHandler) SingleNotificationOpponent(w http.ResponseWriter, r *http.Request) {
if r.Method == http.MethodGet {
idRaw := r.URL.Query().Get("id")
//idr := 30
id, err := strconv.Atoi(idRaw)
if err != nil {
fmt.Println("Can't get the id!")
panic(err)
}
notiff, _ := ojh.notfS... | [
-0.6586214900016785,
-0.02829114720225334,
0.9149543046951294,
-0.37742212414741516,
-0.344696044921875,
0.9234331846237183,
1.2534786462783813,
0.7408959865570068,
0.982909619808197,
0.1586574763059616,
0.02986045740544796,
-0.6825787425041199,
0.21373438835144043,
-0.08326929807662964,
... |
func (m TenancyAttachmentSummary) ValidateEnumValue() (bool, error) {
errMessage := []string{}
if _, ok := GetMappingTenancyAttachmentLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported va... | [
-0.6509051322937012,
-0.38968175649642944,
0.8081372380256653,
-0.7180545926094055,
-0.9520300626754761,
0.776807427406311,
0.5087642669677734,
0.022453129291534424,
0.38022422790527344,
0.09140390902757645,
0.40458938479423523,
-0.31936323642730713,
0.11895180493593216,
0.8431124091148376... |
func reseed() {
rand.Seed(time.Now().UTC().UnixNano())
} | [
0.5133895874023438,
-0.2611616253852844,
0.4374905526638031,
-0.18246795237064362,
0.27659177780151367,
0.35180050134658813,
-0.6914662718772888,
0.8445719480514526,
-0.34005090594291687,
-0.5896853804588318,
-0.09429527074098587,
1.2962191104888916,
-0.1839844137430191,
-0.095596477389335... |
func (o *options) BootstrapSessionTTL() int64 {
return o.bootstrapSessionTTL
} | [
-0.29941511154174805,
-0.13478660583496094,
0.3008235692977905,
-0.21195276081562042,
-0.1507273018360138,
-0.3378606140613556,
0.33866313099861145,
-0.9444418549537659,
0.8672047257423401,
0.8809657096862793,
-0.6398331522941589,
-0.8860200047492981,
-0.057592302560806274,
-1.070947408676... |
func (o *options) SetBootstrapSessionTTL(ttl int64) Options {
o.bootstrapSessionTTL = ttl
return o
} | [
-0.4610539674758911,
-0.6613321304321289,
0.24415643513202667,
-0.33765995502471924,
-0.028674032539129257,
-0.526892364025116,
-0.12945492565631866,
-0.7372658252716064,
1.1737793684005737,
0.6626515984535217,
-0.6561548709869385,
-1.3790751695632935,
0.08304477483034134,
-0.6593145728111... |
func NewOptions() Options {
return &options{
bootstrapSessionTTL: defaultBootstrapSessionTTL,
maxConcurrentTableShards: defaultMaxConcurrentTableShards,
maxConcurrentStreamsPerTableShard: defaultMaxCocurrentSessionPerTableShard,
}
} | [
0.9422289729118347,
-0.006184258032590151,
0.21280913054943085,
0.3863133490085602,
0.3898390531539917,
-1.1351282596588135,
0.7282313108444214,
-1.0911890268325806,
0.5205088257789612,
0.15287989377975464,
-0.47684457898139954,
-0.5814152359962463,
-0.48484790325164795,
0.2805328369140625... |
func (dapi *DefaultEventsAPI) InitFromWebBuilder(webBuilder *web.WebBuilder) *DefaultEventsAPI {
dapi.WebBuilder = webBuilder
return dapi
} | [
0.333578497171402,
0.09754250943660736,
0.2459930032491684,
1.6390180587768555,
-0.2878929674625397,
0.043735213577747345,
1.0938631296157837,
0.5763250589370728,
1.0209908485412598,
-0.6682309508323669,
-1.1124904155731201,
-0.5405955910682678,
-0.294504851102829,
1.802546739578247,
0.2... |
func (dapi *DefaultEventsAPI) EventsHandler(ctx iris.Context) {
contextWithCancel, cancel := context.WithCancel(context.Background())
defer cancel()
messagesChannel, errorChannel := dapi.DockerCli.Events(contextWithCancel, types.EventsOptions{})
writer := ctx.ResponseWriter()
ctx.ResetResponseWriter(writer)
w... | [
-0.521568775177002,
-0.10944118350744247,
0.723972499370575,
-0.11892884224653244,
0.22809939086437225,
-0.4750296473503113,
0.05043734982609749,
-0.35411638021469116,
-0.0552976131439209,
0.0034678885713219643,
0.02237064391374588,
-0.13558202981948853,
-0.2595776319503784,
0.386951684951... |
func init() {
os.RemoveAll(DataPath)
dc := DatabaseConfig{
DataPath: DataPath,
IndexDepth: 4,
PayloadSize: 16,
BucketDuration: 3600000000000,
Resolution: 60000000000,
SegmentSize: 100000,
}
cfg := &ServerConfig{
VerboseLogs: true,
RemoteDebug: true,
ListenAddress: Address... | [
0.6784750819206238,
0.46320369839668274,
0.7591991424560547,
-0.945448637008667,
0.6039971113204956,
0.6704567670822144,
0.08409789949655533,
0.46390199661254883,
-0.26564493775367737,
0.3216036856174469,
-0.6552757620811462,
0.803019642829895,
-0.726081132888794,
0.5119249820709229,
0.4... |
func processMetrics(log *logger.Logger, qmName string) {
var err error
var firstConnect = true
var metrics map[string]*metricData
for {
// Connect to queue manager and discover available metrics
err = doConnect(qmName)
if err == nil {
if firstConnect {
firstConnect = false
startChannel <- true
... | [
0.3904585540294647,
-0.6701110601425171,
0.9009351134300232,
-0.5584701299667358,
-0.12306489795446396,
0.41777321696281433,
-0.3309934139251709,
-0.8428114056587219,
-0.624624490737915,
-0.2713959813117981,
1.0559439659118652,
0.13693276047706604,
-0.3757585287094116,
0.4686506390571594,
... |
func doConnect(qmName string) error {
// Set connection configuration
var connConfig mqmetric.ConnectionConfig
connConfig.ClientMode = false
connConfig.UserId = ""
connConfig.Password = ""
// Connect to the queue manager - open the command and dynamic reply queues
err := mqmetric.InitConnectionStats(qmName, "S... | [
0.8190617561340332,
0.08884316682815552,
1.0165797472000122,
-0.1263764202594757,
-0.13789157569408417,
-0.02781718596816063,
-0.46650785207748413,
-0.9120111465454102,
-0.44160929322242737,
0.23425637185573578,
0.03020777925848961,
0.3581109046936035,
0.0702512264251709,
0.440831899642944... |
func initialiseMetrics(log *logger.Logger) (map[string]*metricData, error) {
metrics := make(map[string]*metricData)
validMetrics := true
metricNamesMap := generateMetricNamesMap()
for _, metricClass := range mqmetric.Metrics.Classes {
for _, metricType := range metricClass.Types {
if !strings.Contains(metri... | [
0.027745136991143227,
-0.06530822813510895,
0.8356765508651733,
-0.25207406282424927,
-0.4116630554199219,
1.0240881443023682,
0.034756749868392944,
-0.23927725851535797,
-0.19011090695858002,
0.5238960981369019,
0.08837779611349106,
-0.14369969069957733,
-0.6451650857925415,
0.55166280269... |
func updateMetrics(metrics map[string]*metricData) {
for _, metricClass := range mqmetric.Metrics.Classes {
for _, metricType := range metricClass.Types {
if !strings.Contains(metricType.ObjectTopic, "%s") {
for _, metricElement := range metricType.Elements {
// Unexpected metric elements (with no defi... | [
-0.35647982358932495,
-0.816157341003418,
0.3092861771583557,
0.346407026052475,
-0.7487069368362427,
0.7953137755393982,
-0.2069520503282547,
-0.14688709378242493,
-0.22855140268802643,
0.37160250544548035,
1.1034852266311646,
0.14508986473083496,
-0.2684319317340851,
0.5302078723907471,
... |
func makeKey(metricElement *mqmetric.MonElement) string {
return metricElement.Parent.Parent.Name + "/" + metricElement.Parent.Name + "/" + metricElement.Description
} | [
0.44022971391677856,
0.3459823429584503,
0.3800578713417053,
-0.2959451377391815,
-0.4684545695781708,
0.9640466570854187,
0.47206008434295654,
-1.012997031211853,
-0.8206120729446411,
0.6876395344734192,
0.5248740911483765,
0.044751256704330444,
-0.5444772243499756,
-0.0022675166837871075... |
func (c Companion) CreateCompanion(name string, hunger, tiredness, happiness, intellectualPotential float32, userID uint) Companion {
db := db.GetDb()
companion := Companion{
Name: name,
Hunger: hunger,
Tiredness: tiredness,
Happiness: happiness,
IntellectPotenti... | [
0.03184500336647034,
-0.9322550892829895,
0.44475942850112915,
-0.07782834768295288,
-0.13166260719299316,
1.0838457345962524,
-0.25503048300743103,
0.9136287569999695,
-0.39314621686935425,
0.5517194867134094,
-1.0029350519180298,
-0.9920303821563721,
-1.2989779710769653,
0.44889548420906... |
func (c Companion) GetAllCompanions() []Companion {
db := db.GetDb()
companions := []Companion{}
db.Find(&companions)
return companions
} | [
-0.5249505639076233,
-0.9368768334388733,
0.4354100823402405,
0.6872631907463074,
0.1972307562828064,
0.5595227479934692,
-0.707868754863739,
0.48726022243499756,
0.6524077653884888,
0.22025234997272491,
-0.9064221978187561,
0.04013991355895996,
-1.0452609062194824,
0.9587230682373047,
0... |
func (c Companion) FindByID(id uint) *Companion {
db := db.GetDb()
companion := new(Companion)
db.First(&companion, id)
return companion
} | [
1.0749611854553223,
-0.4614260792732239,
0.2753508388996124,
-0.8084864616394043,
-0.020629072561860085,
0.2729140520095825,
0.2699289321899414,
-0.4731636047363281,
0.0735684409737587,
0.5118506550788879,
-0.5264158844947815,
-0.6502633094787598,
-1.413467526435852,
1.143319010734558,
-... |
func (c Companion) UpdateByID(id uint, fields map[string]string) (*Companion, error) {
companion := new(Companion)
companion = companion.FindByID(id)
for key, value := range fields {
switch key {
case "Name":
companion.Name = value
case "Hunger":
if newVal, err := strconv.ParseFloat(value, 32); err == n... | [
0.1262429803609848,
-1.0531229972839355,
0.6309952735900879,
-0.9590272903442383,
-0.6050583720207214,
0.23243705928325653,
-0.18240241706371307,
0.024346940219402313,
-0.6007677912712097,
0.7802659869194031,
-0.5253538489341736,
-0.5834627151489258,
-0.7943622469902039,
0.2122733891010284... |
func (c Companion) GetUserByCompanionID(id uint) *User {
db := db.GetDb()
companion := c.FindByID(id)
user := new(User)
db.First(&user, companion.UserID)
return user
} | [
1.0956299304962158,
-0.038651227951049805,
0.256737619638443,
0.7144998908042908,
1.1989001035690308,
0.48852357268333435,
0.4916590750217438,
-0.9610138535499573,
0.38632166385650635,
0.11344946920871735,
-0.43109017610549927,
-0.8242015242576599,
-0.6541684865951538,
0.05306611955165863,... |
func (c Companion) GetUser() *User {
db := db.GetDb()
user := new(User)
db.First(&user, c.UserID)
return user
} | [
0.6780773997306824,
0.45440563559532166,
0.41727644205093384,
0.9806736707687378,
0.7806347012519836,
0.4237959682941437,
0.5746822953224182,
-0.12566302716732025,
-0.12789475917816162,
-0.8925108909606934,
-0.5473086833953857,
-0.47450876235961914,
-0.35549330711364746,
0.2451699525117874... |
func (c Companion) ChangeUserByID(companionID uint, newID uint) (*Companion, error) {
db := db.GetDb()
user := new(User)
newUser, err := user.FindByID(newID)
if err != nil {
return nil, err
}
companion := new(Companion)
if err := db.First(&newUser, newID).Error; err != nil {
log.Println(err)
return nil, e... | [
-0.08868077397346497,
-0.9221855998039246,
0.510459840297699,
0.09938252717256546,
-0.171692356467247,
0.17717885971069336,
0.6229151487350464,
0.12394902110099792,
0.028308618813753128,
0.8937181234359741,
-0.9779537916183472,
-0.011660115793347359,
-0.6811624765396118,
0.7090858221054077... |
func (c *Companion) ChangeUser(newID uint) *Companion {
db := db.GetDb()
c.UserID = newID
db.Save(c)
return c
} | [
-0.7083737254142761,
-0.3479474186897278,
0.40165913105010986,
0.09161324054002762,
-0.04957617074251175,
0.9024102687835693,
0.7717041969299316,
1.1435997486114502,
-0.04086914286017418,
0.10159426927566528,
-1.3571449518203735,
-0.15408556163311005,
-0.8240457773208618,
1.034582138061523... |
func RegisterConversions(s *runtime.Scheme) error {
if err := s.AddGeneratedConversionFunc((*v1beta1.HTTPIngressPath)(nil), (*networking.HTTPIngressPath)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_HTTPIngressPath_To_networking_HTTPIngressPath(a.(*v1beta1.HTTPIngressPath), b.(... | [
-0.9320318102836609,
-0.0400346964597702,
0.9513627886772156,
0.19397930800914764,
0.9521839618682861,
-0.47374632954597473,
0.6892444491386414,
-0.8845797777175903,
-0.21534964442253113,
0.46605274081230164,
-0.4967808127403259,
-0.004879272077232599,
-0.032851725816726685,
0.981353342533... |
func Convert_v1beta1_HTTPIngressPath_To_networking_HTTPIngressPath(in *v1beta1.HTTPIngressPath, out *networking.HTTPIngressPath, s conversion.Scope) error {
return autoConvert_v1beta1_HTTPIngressPath_To_networking_HTTPIngressPath(in, out, s)
} | [
-0.7691978812217712,
-0.3563377559185028,
0.4423754811286926,
1.0788283348083496,
-0.09755852818489075,
-0.09161058068275452,
0.35147592425346375,
0.20243190228939056,
-0.5815292000770569,
0.9570140838623047,
-0.05426827073097229,
0.1884559541940689,
-0.585463285446167,
-0.1513099670410156... |
func Convert_networking_HTTPIngressPath_To_v1beta1_HTTPIngressPath(in *networking.HTTPIngressPath, out *v1beta1.HTTPIngressPath, s conversion.Scope) error {
return autoConvert_networking_HTTPIngressPath_To_v1beta1_HTTPIngressPath(in, out, s)
} | [
-0.40379777550697327,
-0.8739513754844666,
0.4031652808189392,
0.9345662593841553,
0.29706236720085144,
0.34462907910346985,
0.27385765314102173,
0.266258180141449,
-0.11189427971839905,
0.679860532283783,
0.16156776249408722,
-0.09019169956445694,
-0.8401252627372742,
-0.3939087986946106,... |
func Convert_v1beta1_HTTPIngressRuleValue_To_networking_HTTPIngressRuleValue(in *v1beta1.HTTPIngressRuleValue, out *networking.HTTPIngressRuleValue, s conversion.Scope) error {
return autoConvert_v1beta1_HTTPIngressRuleValue_To_networking_HTTPIngressRuleValue(in, out, s)
} | [
-0.7726150155067444,
-0.4269164204597473,
0.44592413306236267,
0.4836953580379486,
-0.007947112433612347,
0.19920603930950165,
0.03387102112174034,
0.0944284200668335,
-1.0382417440414429,
0.5536099672317505,
0.027837133035063744,
0.4232226610183716,
-0.5549332499504089,
0.3420556187629699... |
func Convert_networking_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in *networking.HTTPIngressRuleValue, out *v1beta1.HTTPIngressRuleValue, s conversion.Scope) error {
return autoConvert_networking_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in, out, s)
} | [
-0.2887868583202362,
-0.9805413484573364,
0.4562245011329651,
0.18993088603019714,
0.20996125042438507,
0.8560431599617004,
-0.3517928123474121,
0.24257396161556244,
-0.9820382595062256,
0.5652632117271423,
0.4425468444824219,
0.14566421508789062,
-0.8359984159469604,
0.10925726592540741,
... |
func Convert_v1beta1_Ingress_To_networking_Ingress(in *v1beta1.Ingress, out *networking.Ingress, s conversion.Scope) error {
return autoConvert_v1beta1_Ingress_To_networking_Ingress(in, out, s)
} | [
-1.095359444618225,
-0.6244626641273499,
0.3841964304447174,
0.08699876070022583,
-0.04132632166147232,
-0.15394236147403717,
0.18741366267204285,
0.08604491502046585,
0.06100503355264664,
0.31906822323799133,
-0.5578245520591736,
0.9950125813484192,
-0.5554419755935669,
-0.184620559215545... |
func Convert_networking_Ingress_To_v1beta1_Ingress(in *networking.Ingress, out *v1beta1.Ingress, s conversion.Scope) error {
return autoConvert_networking_Ingress_To_v1beta1_Ingress(in, out, s)
} | [
-0.5919696092605591,
-1.129015326499939,
0.2335662841796875,
0.3395145535469055,
0.10771947354078293,
0.4098140597343445,
-0.03107268176972866,
-0.24929431080818176,
0.6728991866111755,
0.19804976880550385,
-0.2258964478969574,
0.8049908876419067,
-0.4905890226364136,
-0.48865121603012085,... |
func Convert_v1beta1_IngressClass_To_networking_IngressClass(in *v1beta1.IngressClass, out *networking.IngressClass, s conversion.Scope) error {
return autoConvert_v1beta1_IngressClass_To_networking_IngressClass(in, out, s)
} | [
-0.662870466709137,
-0.2224494069814682,
0.3052797317504883,
0.7780073881149292,
-0.2430703490972519,
0.1580655723810196,
-0.12839747965335846,
0.22630122303962708,
-0.32983946800231934,
0.8401890993118286,
0.2832363545894623,
0.6081765294075012,
-0.63042151927948,
-0.13150563836097717,
... |
func Convert_networking_IngressClass_To_v1beta1_IngressClass(in *networking.IngressClass, out *v1beta1.IngressClass, s conversion.Scope) error {
return autoConvert_networking_IngressClass_To_v1beta1_IngressClass(in, out, s)
} | [
-0.2763240337371826,
-0.7636118531227112,
0.371794193983078,
0.8244116902351379,
0.09820198267698288,
0.6825098395347595,
-0.260316401720047,
0.09451250731945038,
0.2486046701669693,
0.65159672498703,
0.45382699370384216,
0.5366939902305603,
-0.7123991250991821,
-0.34104523062705994,
0.3... |
func Convert_v1beta1_IngressClassList_To_networking_IngressClassList(in *v1beta1.IngressClassList, out *networking.IngressClassList, s conversion.Scope) error {
return autoConvert_v1beta1_IngressClassList_To_networking_IngressClassList(in, out, s)
} | [
-1.3808584213256836,
-0.13235589861869812,
0.33292052149772644,
0.8808850049972534,
0.12224903702735901,
0.1815108209848404,
0.07004915922880173,
-0.04290222376585007,
-0.6848611235618591,
1.3199543952941895,
-0.4942811131477356,
0.021391980350017548,
-0.4862464964389801,
0.203153908252716... |
func Convert_networking_IngressClassList_To_v1beta1_IngressClassList(in *networking.IngressClassList, out *v1beta1.IngressClassList, s conversion.Scope) error {
return autoConvert_networking_IngressClassList_To_v1beta1_IngressClassList(in, out, s)
} | [
-1.0551354885101318,
-0.5657598972320557,
0.4115879535675049,
0.8177542686462402,
0.3226573169231415,
0.6755572557449341,
-0.0643545538187027,
-0.09633943438529968,
-0.07260531932115555,
1.2011626958847046,
-0.29889509081840515,
0.0012087210780009627,
-0.5829966068267822,
-0.02002041786909... |
func Convert_v1beta1_IngressClassParametersReference_To_networking_IngressClassParametersReference(in *v1beta1.IngressClassParametersReference, out *networking.IngressClassParametersReference, s conversion.Scope) error {
return autoConvert_v1beta1_IngressClassParametersReference_To_networking_IngressClassParametersRef... | [
-0.743056058883667,
-0.7959604859352112,
0.41174498200416565,
0.46187254786491394,
0.1372804045677185,
0.5693920254707336,
0.06710653007030487,
-0.388913631439209,
-0.2963874340057373,
0.8941507935523987,
0.7707198858261108,
0.5712006092071533,
-1.35546875,
0.11779134720563889,
-0.392883... |
func Convert_networking_IngressClassParametersReference_To_v1beta1_IngressClassParametersReference(in *networking.IngressClassParametersReference, out *v1beta1.IngressClassParametersReference, s conversion.Scope) error {
return autoConvert_networking_IngressClassParametersReference_To_v1beta1_IngressClassParametersRef... | [
-0.4813147485256195,
-1.1655571460723877,
0.4974415600299835,
0.29561200737953186,
0.5788488388061523,
0.980532169342041,
-0.22196422517299652,
-0.4417756199836731,
-0.09004384279251099,
0.8141062259674072,
1.0190163850784302,
0.45837560296058655,
-1.4788274765014648,
-0.1957748532295227,
... |
func Convert_v1beta1_IngressClassSpec_To_networking_IngressClassSpec(in *v1beta1.IngressClassSpec, out *networking.IngressClassSpec, s conversion.Scope) error {
return autoConvert_v1beta1_IngressClassSpec_To_networking_IngressClassSpec(in, out, s)
} | [
-0.5760398507118225,
-0.2228631228208542,
0.3340437412261963,
0.07694718986749649,
0.1845283955335617,
0.5707840919494629,
-0.2047710120677948,
-0.05117448419332504,
-0.641048014163971,
0.8216466903686523,
0.1777755469083786,
0.2722529172897339,
-0.24689297378063202,
-0.4892471730709076,
... |
func Convert_networking_IngressClassSpec_To_v1beta1_IngressClassSpec(in *networking.IngressClassSpec, out *v1beta1.IngressClassSpec, s conversion.Scope) error {
return autoConvert_networking_IngressClassSpec_To_v1beta1_IngressClassSpec(in, out, s)
} | [
-0.2764904797077179,
-0.7108204960823059,
0.273876428604126,
-0.0659644603729248,
0.4186973571777344,
1.1125074625015259,
-0.40689197182655334,
-0.12330114096403122,
-0.44448551535606384,
0.7985692620277405,
0.35238519310951233,
0.22192877531051636,
-0.3848019540309906,
-0.690191924571991,... |
func Convert_v1beta1_IngressList_To_networking_IngressList(in *v1beta1.IngressList, out *networking.IngressList, s conversion.Scope) error {
return autoConvert_v1beta1_IngressList_To_networking_IngressList(in, out, s)
} | [
-1.2682682275772095,
-0.11190643906593323,
0.33124205470085144,
1.289975881576538,
-0.16064661741256714,
-0.38534876704216003,
0.14646534621715546,
0.21843700110912323,
-0.3824125826358795,
1.427386999130249,
-0.6218754053115845,
0.17973533272743225,
-0.5030996203422546,
0.2232240140438079... |
func Convert_networking_IngressList_To_v1beta1_IngressList(in *networking.IngressList, out *v1beta1.IngressList, s conversion.Scope) error {
return autoConvert_networking_IngressList_To_v1beta1_IngressList(in, out, s)
} | [
-0.8548257946968079,
-0.6747984886169434,
0.3517395853996277,
1.2617114782333374,
-0.014727388508617878,
0.16950851678848267,
-0.10422847419977188,
0.004392839036881924,
0.14842666685581207,
1.3154802322387695,
-0.3691873550415039,
0.015111182816326618,
-0.7309184074401855,
-0.071928165853... |
func Convert_v1beta1_IngressLoadBalancerIngress_To_networking_IngressLoadBalancerIngress(in *v1beta1.IngressLoadBalancerIngress, out *networking.IngressLoadBalancerIngress, s conversion.Scope) error {
return autoConvert_v1beta1_IngressLoadBalancerIngress_To_networking_IngressLoadBalancerIngress(in, out, s)
} | [
-0.10269749909639359,
-0.4246314764022827,
0.4892166554927826,
-0.29657435417175293,
0.08171961456537247,
0.4333735406398773,
-0.8394325375556946,
-0.19677044451236725,
-0.25722646713256836,
-0.05879497900605202,
-0.2842366695404053,
0.4685792028903961,
-1.2408164739608765,
0.0017819962231... |
func Convert_networking_IngressLoadBalancerIngress_To_v1beta1_IngressLoadBalancerIngress(in *networking.IngressLoadBalancerIngress, out *v1beta1.IngressLoadBalancerIngress, s conversion.Scope) error {
return autoConvert_networking_IngressLoadBalancerIngress_To_v1beta1_IngressLoadBalancerIngress(in, out, s)
} | [
0.5033033490180969,
-0.9255630373954773,
0.37777531147003174,
-0.3040076494216919,
0.22088637948036194,
0.9063843488693237,
-1.0284360647201538,
-0.12274201214313507,
-0.10210271924734116,
0.014845781959593296,
-0.10051257163286209,
0.7191833853721619,
-1.5466651916503906,
-0.4208218753337... |
func Convert_v1beta1_IngressLoadBalancerStatus_To_networking_IngressLoadBalancerStatus(in *v1beta1.IngressLoadBalancerStatus, out *networking.IngressLoadBalancerStatus, s conversion.Scope) error {
return autoConvert_v1beta1_IngressLoadBalancerStatus_To_networking_IngressLoadBalancerStatus(in, out, s)
} | [
-0.44260984659194946,
-0.5849828124046326,
0.21180041134357452,
-0.1379004269838333,
0.030189216136932373,
0.4169289171695709,
-0.8775493502616882,
-0.05473039299249649,
-0.1186668649315834,
0.4544234871864319,
-0.43343693017959595,
0.1928384155035019,
-1.174277663230896,
-0.20220933854579... |
func Convert_networking_IngressLoadBalancerStatus_To_v1beta1_IngressLoadBalancerStatus(in *networking.IngressLoadBalancerStatus, out *v1beta1.IngressLoadBalancerStatus, s conversion.Scope) error {
return autoConvert_networking_IngressLoadBalancerStatus_To_v1beta1_IngressLoadBalancerStatus(in, out, s)
} | [
-0.038574736565351486,
-1.242427945137024,
0.16098006069660187,
-0.23854084312915802,
0.0626165121793747,
0.8605226278305054,
-1.2977513074874878,
0.08943228423595428,
0.07666684687137604,
0.24541956186294556,
-0.22823306918144226,
0.6679975986480713,
-1.4758517742156982,
-0.74965226650238... |
func Convert_v1beta1_IngressPortStatus_To_networking_IngressPortStatus(in *v1beta1.IngressPortStatus, out *networking.IngressPortStatus, s conversion.Scope) error {
return autoConvert_v1beta1_IngressPortStatus_To_networking_IngressPortStatus(in, out, s)
} | [
-0.25329023599624634,
-0.6713387370109558,
0.32935500144958496,
0.34205424785614014,
-0.20957258343696594,
0.02956140972673893,
-0.12157456576824188,
0.046854954212903976,
0.08268821239471436,
0.6338561773300171,
-0.34076038002967834,
0.6428584456443787,
-0.6393502950668335,
-0.30727854371... |
func Convert_networking_IngressPortStatus_To_v1beta1_IngressPortStatus(in *networking.IngressPortStatus, out *v1beta1.IngressPortStatus, s conversion.Scope) error {
return autoConvert_networking_IngressPortStatus_To_v1beta1_IngressPortStatus(in, out, s)
} | [
0.2487735152244568,
-1.2747001647949219,
0.34329527616500854,
0.1582525074481964,
0.0013383004115894437,
0.7211785316467285,
-0.3444300591945648,
-0.008980869315564632,
0.3878583610057831,
0.4807821214199066,
-0.11295342445373535,
0.8451557159423828,
-0.9821795225143433,
-0.895948290824890... |
func Convert_v1beta1_IngressRule_To_networking_IngressRule(in *v1beta1.IngressRule, out *networking.IngressRule, s conversion.Scope) error {
return autoConvert_v1beta1_IngressRule_To_networking_IngressRule(in, out, s)
} | [
-0.42004072666168213,
-0.15402758121490479,
0.35764333605766296,
0.49419844150543213,
0.10217059403657913,
0.28699371218681335,
0.0486203096807003,
0.3272092640399933,
-0.9032961130142212,
0.9453497529029846,
0.4279979467391968,
0.4795161783695221,
-1.0724526643753052,
0.11136030405759811,... |
func Convert_networking_IngressRule_To_v1beta1_IngressRule(in *networking.IngressRule, out *v1beta1.IngressRule, s conversion.Scope) error {
return autoConvert_networking_IngressRule_To_v1beta1_IngressRule(in, out, s)
} | [
0.09140283614397049,
-0.6994515061378479,
0.33966556191444397,
0.3623789846897125,
0.4575861394405365,
0.7474352717399597,
-0.233540341258049,
0.2544980049133301,
-0.4230220913887024,
0.8165147304534912,
0.6038647890090942,
0.4124385416507721,
-1.266955018043518,
-0.23020562529563904,
0.... |
func Convert_v1beta1_IngressRuleValue_To_networking_IngressRuleValue(in *v1beta1.IngressRuleValue, out *networking.IngressRuleValue, s conversion.Scope) error {
return autoConvert_v1beta1_IngressRuleValue_To_networking_IngressRuleValue(in, out, s)
} | [
-0.6755533814430237,
-0.3091809153556824,
0.3890669345855713,
0.3942696750164032,
-0.19103281199932098,
0.1623140275478363,
0.042566895484924316,
0.2215246558189392,
-0.8260995149612427,
0.48731595277786255,
0.16949984431266785,
0.6400874257087708,
-0.6221978664398193,
0.2875535488128662,
... |
func Convert_networking_IngressRuleValue_To_v1beta1_IngressRuleValue(in *networking.IngressRuleValue, out *v1beta1.IngressRuleValue, s conversion.Scope) error {
return autoConvert_networking_IngressRuleValue_To_v1beta1_IngressRuleValue(in, out, s)
} | [
-0.20826952159404755,
-0.8404275178909302,
0.4168913662433624,
0.21059778332710266,
-0.027461767196655273,
0.7974967956542969,
-0.1700098067522049,
0.18627677857875824,
-0.6790058016777039,
0.5013432502746582,
0.6395108699798584,
0.5490702390670776,
-0.7423543334007263,
-0.0160046759992837... |
func Convert_v1beta1_IngressStatus_To_networking_IngressStatus(in *v1beta1.IngressStatus, out *networking.IngressStatus, s conversion.Scope) error {
return autoConvert_v1beta1_IngressStatus_To_networking_IngressStatus(in, out, s)
} | [
-0.7635099291801453,
-0.7742311358451843,
0.2757241725921631,
0.46856483817100525,
-0.42115604877471924,
-0.16457217931747437,
-0.37337547540664673,
0.2688094675540924,
-0.13069747388362885,
0.8317939639091492,
-0.724546492099762,
0.9238497018814087,
-0.05437825620174408,
-0.17515340447425... |
func Convert_networking_IngressStatus_To_v1beta1_IngressStatus(in *networking.IngressStatus, out *v1beta1.IngressStatus, s conversion.Scope) error {
return autoConvert_networking_IngressStatus_To_v1beta1_IngressStatus(in, out, s)
} | [
-0.45796531438827515,
-1.2334887981414795,
0.18784449994564056,
0.39083200693130493,
-0.1584390252828598,
0.42749765515327454,
-0.5316854119300842,
0.07340601831674576,
0.37491315603256226,
0.6483680605888367,
-0.4836057126522064,
0.8152738809585571,
-0.46501877903938293,
-0.67675358057022... |
func Convert_v1beta1_IngressTLS_To_networking_IngressTLS(in *v1beta1.IngressTLS, out *networking.IngressTLS, s conversion.Scope) error {
return autoConvert_v1beta1_IngressTLS_To_networking_IngressTLS(in, out, s)
} | [
-0.5534808039665222,
-0.6803061366081238,
0.27360764145851135,
0.6683182716369629,
-0.4369489550590515,
0.11681991070508957,
0.22954726219177246,
-0.08541671931743622,
-0.7785499095916748,
0.8434736132621765,
-0.1884559988975525,
0.29032376408576965,
-0.6051796674728394,
0.0133295981213450... |
func Convert_networking_IngressTLS_To_v1beta1_IngressTLS(in *networking.IngressTLS, out *v1beta1.IngressTLS, s conversion.Scope) error {
return autoConvert_networking_IngressTLS_To_v1beta1_IngressTLS(in, out, s)
} | [
-0.1646265983581543,
-0.9716245532035828,
0.2217382937669754,
0.527521550655365,
-0.2699991762638092,
0.5881703495979309,
-0.0482245571911335,
-0.28370651602745056,
-0.267341285943985,
0.8189452290534973,
0.02024906501173973,
0.21911536157131195,
-0.8304473757743835,
-0.4536564350128174,
... |
func (s *Server) PlayerSpeechSearch(ctx context.Context, req *pb.PlayerSpeechSearchRequest) (*pb.PlayerSpeechSearchResponse, error) {
if req == nil {
return nil, fmt.Errorf("request nil")
}
resp := new(pb.PlayerSpeechSearchResponse)
if req.Limit < 1 {
req.Limit = 10
}
if req.Limit > 100 {
req.Limit = 100
... | [
-0.7557278871536255,
-0.6089637279510498,
0.793937623500824,
-0.8726686835289001,
-0.34544071555137634,
-0.18422864377498627,
-0.6557750105857849,
-0.48142558336257935,
-0.23332078754901886,
0.3829931616783142,
-0.12522466480731964,
-0.13648393750190735,
-1.1365644931793213,
0.506538867950... |
func (s *Server) PlayerSpeechCreate(ctx context.Context, req *pb.PlayerSpeechCreateRequest) (*pb.PlayerSpeechCreateResponse, error) {
fmt.Println(req)
playerSpeech := new(PlayerSpeech)
st := reflect.TypeOf(*playerSpeech)
args := map[string]interface{}{}
query := "INSERT INTO qs_player_speech"
comma := ""
ins... | [
-0.4908885359764099,
-0.7968391180038452,
0.780144214630127,
-0.5766568779945374,
0.28501567244529724,
-0.04695243760943413,
-0.6664189100265503,
-0.8252705335617065,
-0.09172249585390091,
0.5861641764640808,
-0.3409411311149597,
-0.9553617238998413,
-1.6490010023117065,
0.4846082627773285... |
func (s *Server) PlayerSpeechRead(ctx context.Context, req *pb.PlayerSpeechReadRequest) (*pb.PlayerSpeechReadResponse, error) {
if req == nil {
return nil, fmt.Errorf("request nil")
}
resp := new(pb.PlayerSpeechReadResponse)
if req.Id < 0 {
return nil, fmt.Errorf("id must be greater than 0")
}
query := "SELE... | [
-1.275328516960144,
-0.7595143914222717,
0.47240307927131653,
-0.9519672989845276,
-0.2412167489528656,
-0.07173088937997818,
-0.8756501078605652,
-1.0318520069122314,
0.18282970786094666,
0.24872234463691711,
0.3642316162586212,
0.3944433629512787,
-1.1536847352981567,
0.1063091829419136,... |
func (s *Server) PlayerSpeechUpdate(ctx context.Context, req *pb.PlayerSpeechUpdateRequest) (*pb.PlayerSpeechUpdateResponse, error) {
playerSpeech := new(PlayerSpeech)
st := reflect.TypeOf(*playerSpeech)
args := map[string]interface{}{
"id": req.Id,
}
query := "UPDATE qs_player_speech SET"
comma := ""
for i... | [
-1.4463117122650146,
-1.305259346961975,
0.6860549449920654,
-0.975916862487793,
-0.44789257645606995,
-0.37024152278900146,
-0.8003303408622742,
-0.3666602671146393,
0.17477501928806305,
0.6510352492332458,
-0.19270764291286469,
-0.3615308403968811,
-1.314492106437683,
0.28724613785743713... |
func (s *Server) PlayerSpeechDelete(ctx context.Context, req *pb.PlayerSpeechDeleteRequest) (*pb.PlayerSpeechDeleteResponse, error) {
query := "DELETE FROM qs_player_speech WHERE id = :id LIMIT 1"
args := map[string]interface{}{
"id": req.Id,
}
log.Debug().Interface("args", args).Msgf("query: %s", query)
resu... | [
-0.8411739468574524,
-1.0680646896362305,
0.45113426446914673,
-0.7900017499923706,
0.005463659297674894,
-0.49967509508132935,
-0.8007959723472595,
-0.28267601132392883,
0.5750528573989868,
0.4962511360645294,
0.008970738388597965,
0.08818396925926208,
-1.6125801801681519,
0.3581175506114... |
func (s *Server) PlayerSpeechPatch(ctx context.Context, req *pb.PlayerSpeechPatchRequest) (*pb.PlayerSpeechPatchResponse, error) {
playerSpeech := new(PlayerSpeech)
st := reflect.TypeOf(*playerSpeech)
args := map[string]interface{}{
"id": req.Id,
}
query := "UPDATE qs_player_speech SET"
comma := ""
for i :=... | [
-1.2798017263412476,
-1.2550716400146484,
0.6604288816452026,
-1.0952138900756836,
-0.5996509790420532,
-0.10587401688098907,
-0.8522764444351196,
-0.17092107236385345,
0.3899191617965698,
0.38500329852104187,
-0.25136303901672363,
-0.08744294941425323,
-1.29539954662323,
0.251746296882629... |
func (p *PlayerSpeech) ToProto() *pb.PlayerSpeech {
playerSpeech := &pb.PlayerSpeech{}
playerSpeech.Id = p.ID
playerSpeech.From = p.From
playerSpeech.To = p.To
playerSpeech.Frommessage = p.Frommessage
playerSpeech.Minstatus = p.Minstatus
playerSpeech.Guilddbid = p.Guilddbid
playerSpeech.Type = p.Type
playerSpe... | [
0.13982927799224854,
-0.5100134611129761,
0.9166132807731628,
-1.3640410900115967,
-0.2388947755098343,
0.10001824051141739,
-1.1899703741073608,
-0.5738451480865479,
0.09368082135915756,
0.18080568313598633,
-0.4382883608341217,
0.11077959835529327,
-1.2287081480026245,
-0.209067672491073... |
func capabilityLoop(s *etcdserver.EtcdServer) {
stopped := s.StopNotify()
var pv *semver.Version
for {
if v := s.ClusterVersion(); v != pv {
if pv == nil {
pv = v
} else if v != nil && pv.LessThan(*v) {
pv = v
}
enableMapMu.Lock()
enabledMap = capabilityMaps[pv.String()]
enableMapMu.Unlo... | [
-0.6776836514472961,
-1.1430834531784058,
0.3759913146495819,
1.2079095840454102,
-0.7889344692230225,
0.07320061326026917,
-0.3102310001850128,
0.09733637422323227,
0.042298153042793274,
0.09800577908754349,
0.33651649951934814,
0.5757951736450195,
-0.4415966272354126,
-0.1840992569923401... |
func ParseKubeServiceList(ns interface{}, parseforuser bool) (*ServicesList, error) {
nativeServices := ns.(*api_core.ServiceList)
if nativeServices == nil {
return nil, ErrUnableConvertServiceList
}
serviceList := make([]ServiceWithOwner, 0, nativeServices.Size())
for _, nativeService := range nativeServices.I... | [
-1.17629873752594,
0.7185172438621521,
0.3655058741569519,
0.6915136575698853,
-0.7827678918838501,
-0.5532137155532837,
-0.46531596779823303,
-0.5283320546150208,
0.0316879004240036,
0.047270793467760086,
0.23564115166664124,
-0.302097886800766,
-0.06426550447940826,
1.0596262216567993,
... |
func ParseKubeService(srv interface{}, parseforuser bool) (*ServiceWithOwner, error) {
native := srv.(*api_core.Service)
if native == nil {
return nil, ErrUnableConvertService
}
ports := make([]kube_types.ServicePort, 0, 1)
createdAt := native.GetCreationTimestamp().UTC().UTC().Format(time.RFC3339)
owner := n... | [
-0.5982388257980347,
-0.06574547290802002,
0.5039011836051941,
0.27739545702934265,
-0.8526867628097534,
-0.11290772259235382,
-0.3270215392112732,
-0.9355761408805847,
-0.2986263930797577,
0.20515868067741394,
0.22571609914302826,
0.7164708971977234,
0.012084625661373138,
0.29560571908950... |
func (service *ServiceWithOwner) ToKube(nsName string, labels map[string]string) (*api_core.Service, []error) {
err := service.Validate()
if err != nil {
return nil, err
}
if labels == nil {
labels = make(map[string]string, 0)
}
labels[appLabel] = service.Deploy
labels[ownerLabel] = service.Owner
labels[hi... | [
-0.9319542646408081,
-0.11009333282709122,
0.8221688270568848,
0.1884343922138214,
0.17647293210029602,
-0.27684512734413147,
-0.7124440670013428,
-0.8804123997688293,
0.12297523766756058,
0.4474823772907257,
0.6799546480178833,
0.9550551772117615,
-0.6331360936164856,
-0.08274427056312561... |
func New() (GitInfo, error) {
return NewWithPath("")
} | [
0.7257692813873291,
-0.5189202427864075,
0.1786971539258957,
0.03694450110197067,
-1.2025214433670044,
-0.09790694713592529,
-0.06605271995067596,
-0.702131450176239,
-1.1534885168075562,
-0.5664879083633423,
-0.3060665428638458,
0.03782109171152115,
0.3557317554950714,
0.5476639866828918,... |
func NewWithPath(path string) (GitInfo, error) {
var _err error
// if we have an empty path, then choose the current working directory
if path == "" {
path, _err = os.Getwd()
if _err != nil {
return nil, _err
}
}
// attempt to load the git configuration
_config, _err := gitconfig.NewWithPath(path)
if ... | [
0.20485739409923553,
-0.3252202272415161,
0.19120362401008606,
-0.8988806009292603,
-1.143489122390747,
0.05540287867188454,
-0.334351122379303,
-0.9373145699501038,
-0.45255690813064575,
0.3871958255767822,
-0.3689495921134949,
-0.3836762011051178,
-0.9503337144851685,
0.05239643156528473... |
func SumAll(numbersToSum ...[]int) (sums []int) {
for _, numbers := range numbersToSum {
sum := Sum(numbers)
sums = append(sums, sum)
}
return
} | [
0.7526201605796814,
-0.152769535779953,
0.7202707529067993,
0.9420943856239319,
0.3808356821537018,
0.9337864518165588,
-0.6906453967094421,
0.23434914648532867,
0.35961800813674927,
-0.6694205403327942,
-0.6951586008071899,
0.44510725140571594,
0.5894826054573059,
1.1560014486312866,
-0... |
func GetRedisClient(addr string) *redis.Client {
if addr == "" {
addr = "localhost:6379"
}
client := redis.NewClient(&redis.Options{
Addr: addr,
DB: 0,
})
return client
} | [
0.4553389549255371,
1.2739512920379639,
0.416800320148468,
-0.20868803560733795,
-0.044745903462171555,
-0.0830356553196907,
0.16631777584552765,
0.8248231410980225,
0.9144937992095947,
-0.4218282997608185,
-0.11898235976696014,
1.206277847290039,
-0.06812034547328949,
-0.21635539829730988... |
func SaveRedisList(r *redis.Client, key string, value interface{}) error {
_, err := r.LPush(key, value).Result()
return err
} | [
-1.148197054862976,
0.7656038999557495,
0.495673805475235,
-0.4442138671875,
-0.08287081867456436,
0.30507081747055054,
-1.425823450088501,
-0.10242366790771484,
0.47559812664985657,
1.6826926469802856,
-1.9858628511428833,
-0.747951865196228,
-0.8282876014709473,
1.2283722162246704,
-0.... |
func SendSMS(noebsConfig *ebs_fields.NoebsConfig, sms SMS) error {
log.Printf("the message is: %+v", sms)
v := url.Values{}
v.Add("api_key", noebsConfig.SMSAPIKey)
v.Add("from", noebsConfig.SMSSender)
v.Add("to", "249"+strings.TrimPrefix(sms.Mobile, "0"))
v.Add("sms", sms.Message+"\n\n"+noebsConfig.SMSMessage)
u... | [
-0.4320787191390991,
0.1511029154062271,
0.6014062762260437,
0.006913242395967245,
0.1986672282218933,
-0.16940009593963623,
-0.4884962737560272,
-0.08044414222240448,
0.7413891553878784,
0.5289284586906433,
0.013263269327580929,
0.7294657230377197,
-0.5387992858886719,
0.7235308885574341,... |
func MaskPAN(PAN string) string {
length := len(PAN)
PAN = PAN[:6] + "*****" + PAN[length-4:]
return PAN
} | [
0.027263619005680084,
-0.7038412094116211,
0.6455442905426025,
0.6951313614845276,
-0.42389917373657227,
0.5428866147994995,
0.06929434090852737,
-0.8209534287452698,
0.9215294718742371,
0.12579737603664398,
-0.17349094152450562,
0.02828022465109825,
-0.746834397315979,
-1.4444530010223389... |
func Register(db *gorp.DbMap) {
registerBuildCount(db)
registerPendingBuildCount(db)
registerRepoCount(db)
registerRunningBuildCount(db)
registerUserCount(db)
registerFailedBuildCount(db)
} | [
0.04287533089518547,
0.5495526790618896,
0.2747364044189453,
0.3496679365634918,
1.7729077339172363,
0.6715314388275146,
0.3385593891143799,
0.2440730333328247,
-0.43481457233428955,
-0.7907893061637878,
-1.1143168210983276,
0.30685949325561523,
-0.5426178574562073,
1.0770998001098633,
0... |
func (c *Centralbank) SpendSign(cncoin *coin.Coin) []byte {
//Use CPK to generate priv
m, _ := json.Marshal(cncoin.Head)
digest := sm3.Sum(m)
priv := cpk.GeneratePrivateKey(digest[:], c.SKM)
//spendSig is a recoverable sign
r, s, v, _ := recover.Sign(rand.Reader, priv, digest[:])
spendSig, _ := asn1.Marshal(sm2... | [
-0.6639660596847534,
-0.10271641612052917,
0.585279643535614,
0.10450290143489838,
-0.9647032022476196,
-0.6681146025657654,
0.12183163315057755,
-0.14621883630752563,
-0.0682603120803833,
0.36617377400398254,
-1.4931232929229736,
0.20520970225334167,
-0.9350347518920898,
-0.12334895133972... |
func (t Tenant) GetTenantInfo(tenantId string) (ti TenantInfo, err error) {
req, err := http.NewRequest("GET", fmt.Sprintf("%s/api/tenants/%s", t.tenantServiceURL, tenantId), nil)
if err != nil {
return
}
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", t.authToken))
client := &http.Client{}
resp, err ... | [
-0.6200171709060669,
-0.4494614601135254,
0.48554787039756775,
-1.0120196342468262,
-0.31902164220809937,
-0.3526615500450134,
-0.47916778922080994,
-0.9273439049720764,
-0.3711257576942444,
0.6441354155540466,
-0.7034327387809753,
1.09122633934021,
-0.24438634514808655,
0.0565200559794902... |
func (t Tenant) GetNamespaceByType(ti TenantInfo, typ string) (r *Namespace, err error) {
for i := 0; i < len(ti.Data.Attributes.Namespaces); i++ {
n := ti.Data.Attributes.Namespaces[i]
if n.Type == typ {
r = &n
return
}
}
err = errors.New(fmt.Sprintf("Could not find tenant %s Jenkins namespace.", ti.Da... | [
0.15221869945526123,
-0.16143031418323517,
0.2961263656616211,
0.27990803122520447,
-0.030596952885389328,
-0.39833950996398926,
0.6940056085586548,
-1.7161248922348022,
0.2775108218193054,
0.6012263298034668,
0.3810761272907257,
0.5870361328125,
-0.7897638082504272,
0.2608281970024109,
... |
func ParseHook(secret []byte, request *http.Request, w http.ResponseWriter, eh EventHandler) (*Hook, error) {
hook := Hook{}
if hook.Signature = request.Header.Get("x-hub-signature"); len(hook.Signature) == 0 {
return nil, SignatureError
}
if hook.Event = request.Header.Get("x-github-event"); len(hook.Event) == ... | [
0.5347063541412354,
0.04044429212808609,
0.9075308442115784,
1.1947919130325317,
0.3257640600204468,
0.3514818549156189,
0.028834525495767593,
-0.03298552706837654,
0.25489574670791626,
0.6839344501495361,
0.5431804060935974,
-0.12436074763536453,
-0.5166882872581482,
0.4710201025009155,
... |
func NewID() *ID {
u := uuid.New()
return &ID{Data: u[:]}
} | [
0.5518842339515686,
-0.8785081505775452,
0.0056866370141506195,
0.38777974247932434,
-0.4028996229171753,
0.9912509322166443,
-0.7790911197662354,
0.35705670714378357,
0.8340538740158081,
-0.022757388651371002,
-0.0266587994992733,
0.4713467061519623,
-0.6794499158859253,
-1.14004826545715... |
func ParseID(x string) (*ID, error) {
switch len(x) {
case 24:
b, err := io.ReadAll(base64.NewDecoder(base64.StdEncoding, strings.NewReader(x)))
return &ID{Data: b}, errors.Wrap(err, "value is not valid base64")
case 36:
u, err := uuid.Parse(x)
return &ID{Data: u[:]}, errors.Wrapf(err, "value is not a valid ... | [
0.11331960558891296,
-1.0664993524551392,
0.5402187705039978,
0.2036537230014801,
-0.9493117332458496,
0.772090494632721,
-0.9106606841087341,
0.35565441846847534,
0.6486549377441406,
0.06814087182283401,
-0.055546026676893234,
0.19010630249977112,
-0.8584001660346985,
-0.8089556694030762,... |
func (x *ID) AsUUID() uuid.UUID {
if x == nil {
return uuid.UUID{}
}
u, err := uuid.FromBytes(x.Data)
if err == nil {
return u
}
return uuid.UUID{}
} | [
-0.5635083913803101,
-0.42872852087020874,
0.45753392577171326,
-0.9585999846458435,
-0.8839383721351624,
-0.07803067564964294,
-0.3845551013946533,
0.783116340637207,
1.123046875,
0.0024144314229488373,
-0.3451819121837616,
0.7070616483688354,
0.4882614016532898,
-0.3519027531147003,
-0... |
func (x *ID) Zero() bool {
return len(x.GetData()) == 0
} | [
-1.098447322845459,
-0.7461708784103394,
0.250011682510376,
0.16160425543785095,
0.3237203061580658,
0.5474474430084229,
-0.9401829242706299,
0.4369072914123535,
0.17201441526412964,
-0.5563109517097473,
-1.0641149282455444,
0.5958242416381836,
-0.3082876205444336,
0.632622480392456,
-0.... |
func NewClient(apiTokenID string, apiSecret string, logger *log.Logger) (*Client, error) {
if len(apiTokenID) == 0 {
return nil, fmt.Errorf("apiTokenID is not set")
}
if len(apiSecret) == 0 {
return nil, fmt.Errorf("apiSecret is not set")
}
publicUrl, err := url.ParseRequestURI(baseUrl)
if err != nil {
re... | [
-0.009269989095628262,
-0.43450066447257996,
0.6979120969772339,
-0.5118521451950073,
0.22119423747062683,
-0.24275732040405273,
-0.810128390789032,
-0.6163319945335388,
-0.29137834906578064,
-0.3670901954174042,
-0.15540221333503723,
0.8787914514541626,
-0.4515438377857208,
-0.22138012945... |
func (c *Client) GetTransactionsByYMD(ctx context.Context, pair, ymdString string) (*models.Transactions, error) {
spath := fmt.Sprintf("/%s/transactions/%s", pair, ymdString)
res, err := c.sendRequest(ctx, "GET", spath, nil, nil)
if err != nil {
return nil, err
}
var transaction models.Transactions
if err := ... | [
0.21804820001125336,
0.10415911674499512,
0.4899800419807434,
-0.3006519675254822,
-0.021429477259516716,
-1.3868094682693481,
0.24809882044792175,
-0.7867072820663452,
0.2660599648952484,
-0.020240241661667824,
-0.6813198924064636,
0.8142877221107483,
-0.5647456645965576,
0.31817069649696... |
func NewLogMonitor(ctx context.Context) (<-chan swarm.Service, <-chan error) {
ret := make(chan swarm.Service)
errs := make(chan error)
dockerClient, err := client.NewEnvClient()
if err != nil {
panic(err)
}
// Filter plugin containers (start events)
logFilter := newLogFilter()
svcStart, errSvcStart := doc... | [
-0.24919646978378296,
-0.2829326391220093,
0.9183346033096313,
-0.2125147134065628,
-0.30704641342163086,
-1.2908382415771484,
0.5110467672348022,
-0.9400273561477661,
0.0905248373746872,
-0.1430712789297104,
-0.42954227328300476,
1.1509183645248413,
-0.13496719300746918,
0.811138510704040... |
func NewReminder()(*Reminder) {
m := &Reminder{
}
m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance();
m.SetAdditionalData(make(map[string]any))
return m
} | [
-0.2296913117170334,
-0.863999605178833,
0.09664013981819153,
-0.34437230229377747,
-0.3035908043384552,
0.04615725204348564,
0.10455229133367538,
-0.3002365529537201,
0.38868218660354614,
-0.5274909734725952,
-0.49842411279678345,
0.217230424284935,
-0.713894784450531,
0.6053992509841919,... |
func CreateReminderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewReminder(), nil
} | [
0.43491867184638977,
-0.5990229249000549,
0.46970227360725403,
-0.39628708362579346,
-0.48567435145378113,
0.37531596422195435,
-0.16700099408626556,
0.007304518483579159,
0.27833953499794006,
-0.4700867831707001,
-0.33233216404914856,
0.16248616576194763,
-0.14633704721927643,
1.050437331... |
func (m *Reminder) GetAdditionalData()(map[string]any) {
val , err := m.backingStore.Get("additionalData")
if err != nil {
panic(err)
}
if val == nil {
var value = make(map[string]any);
m.SetAdditionalData(value);
}
return val.(map[string]any)
} | [
0.27844521403312683,
-0.0787162110209465,
0.16207166016101837,
-0.42122623324394226,
-0.9460047483444214,
0.39180171489715576,
-0.4334385395050049,
-0.37094730138778687,
0.8089587688446045,
-0.529015064239502,
-0.10340274125337601,
0.8340027332305908,
-0.3077058494091034,
0.351104736328125... |
func (m *Reminder) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) {
return m.backingStore
} | [
0.43536531925201416,
-0.3017382323741913,
0.36481916904449463,
-0.5037497878074646,
0.07741491496562958,
0.3006227910518646,
0.6045916676521301,
-0.8966990113258362,
0.40900522470474243,
-0.6571406126022339,
0.6711230278015137,
0.021945670247077942,
-1.8911296129226685,
-0.6207165122032166... |
func (m *Reminder) GetChangeKey()(*string) {
val, err := m.GetBackingStore().Get("changeKey")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
} | [
0.1721528321504593,
0.012644663453102112,
0.26745086908340454,
0.3515543043613434,
0.7802409529685974,
-0.18166214227676392,
0.5020614862442017,
-0.4274201989173889,
0.02363199181854725,
0.5331165790557861,
0.16666190326213837,
1.0971914529800415,
-0.2296600043773651,
0.6606617569923401,
... |
func (m *Reminder) GetEventEndTime()(DateTimeTimeZoneable) {
val, err := m.GetBackingStore().Get("eventEndTime")
if err != nil {
panic(err)
}
if val != nil {
return val.(DateTimeTimeZoneable)
}
return nil
} | [
0.36523687839508057,
0.4888470470905304,
0.32198771834373474,
0.6323131322860718,
0.596425473690033,
0.22341954708099365,
0.48507925868034363,
0.24955035746097565,
0.20878402888774872,
0.8533369302749634,
-0.01571013033390045,
-0.40391987562179565,
-0.8060352802276611,
-0.42100799083709717... |
func (m *Reminder) GetEventId()(*string) {
val, err := m.GetBackingStore().Get("eventId")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
} | [
1.6197890043258667,
-0.1588713526725769,
0.29224836826324463,
0.5578742027282715,
0.6400068998336792,
1.039982795715332,
0.3758253753185272,
-0.29177069664001465,
1.3882246017456055,
-0.08355068415403366,
0.891193151473999,
0.13575026392936707,
-0.2500552535057068,
0.0004763962351717055,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.