text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (o LookupNetworkAttachedDataNetworkResultOutput) DnsAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupNetworkAttachedDataNetworkResult) []string { return v.DnsAddresses }).(pulumi.StringArrayOutput)
} | [
-0.4131009578704834,
0.32139554619789124,
0.3885453939437866,
0.2218560427427292,
0.8138749003410339,
0.09986188262701035,
0.04682357981801033,
-1.1580787897109985,
1.601641058921814,
-0.711728036403656,
-0.6953502297401428,
0.28202855587005615,
0.41796624660491943,
-0.54865562915802,
-0... |
func (o LookupNetworkAttachedDataNetworkResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupNetworkAttachedDataNetworkResult) string { return v.Id }).(pulumi.StringOutput)
} | [
0.3941578269004822,
0.019150158390402794,
0.21921034157276154,
-0.35474592447280884,
0.1772671490907669,
1.1207472085952759,
0.1492317020893097,
-0.5799156427383423,
1.292798638343811,
-0.9940628409385681,
0.12821491062641144,
-0.2321217656135559,
0.16396816074848175,
-0.7152770161628723,
... |
func (o LookupNetworkAttachedDataNetworkResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupNetworkAttachedDataNetworkResult) string { return v.Location }).(pulumi.StringOutput)
} | [
0.007619353011250496,
-0.49530118703842163,
0.29963570833206177,
-0.5616804361343384,
-0.07504046708345413,
1.02498459815979,
0.41228193044662476,
-0.5690927505493164,
0.7517436742782593,
-0.9613066911697388,
0.6350620985031128,
-0.19986796379089355,
0.8337641358375549,
-1.1797974109649658... |
func (o LookupNetworkAttachedDataNetworkResultOutput) NetworkAddressPortTranslations() GetNetworkAttachedDataNetworkNetworkAddressPortTranslationArrayOutput {
return o.ApplyT(func(v LookupNetworkAttachedDataNetworkResult) []GetNetworkAttachedDataNetworkNetworkAddressPortTranslation {
return v.NetworkAddressPortTrans... | [
0.41865289211273193,
0.32891109585762024,
0.4949396550655365,
-0.7399616241455078,
-0.22600533068180084,
0.36843013763427734,
0.4865743815898895,
-1.2161476612091064,
1.4399893283843994,
-0.15727835893630981,
-0.7731364369392395,
-0.708492636680603,
0.5312094688415527,
-0.5709943771362305,... |
func (o LookupNetworkAttachedDataNetworkResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupNetworkAttachedDataNetworkResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
} | [
0.14326082170009613,
0.36681488156318665,
0.3446127772331238,
-0.9904491305351257,
0.47772160172462463,
0.660831868648529,
-0.5149780511856079,
-0.6300015449523926,
0.14436621963977814,
-0.7333356142044067,
-0.7377592325210571,
-0.5039499402046204,
0.850986123085022,
-0.09244969487190247,
... |
func (o LookupNetworkAttachedDataNetworkResultOutput) UserPlaneAccessIpv4Address() pulumi.StringOutput {
return o.ApplyT(func(v LookupNetworkAttachedDataNetworkResult) string { return v.UserPlaneAccessIpv4Address }).(pulumi.StringOutput)
} | [
0.1588132530450821,
-0.7481427788734436,
0.5069238543510437,
-0.07330296188592911,
-0.7413766980171204,
1.0823512077331543,
0.6796555519104004,
-0.4304148852825165,
1.178946852684021,
-0.4970540702342987,
0.8089165091514587,
0.04729640111327171,
-0.2749812602996826,
-1.1930301189422607,
... |
func (o LookupNetworkAttachedDataNetworkResultOutput) UserPlaneAccessIpv4Gateway() pulumi.StringOutput {
return o.ApplyT(func(v LookupNetworkAttachedDataNetworkResult) string { return v.UserPlaneAccessIpv4Gateway }).(pulumi.StringOutput)
} | [
0.2176949828863144,
-0.025410231202840805,
0.3658955693244934,
-0.34020760655403137,
-1.0098724365234375,
1.125223159790039,
0.2697739899158478,
-0.3175031244754791,
0.5831037759780884,
-0.2944785952568054,
0.45288363099098206,
-0.2357763797044754,
-0.21134436130523682,
-0.0446905605494976... |
func (o LookupNetworkAttachedDataNetworkResultOutput) UserPlaneAccessIpv4Subnet() pulumi.StringOutput {
return o.ApplyT(func(v LookupNetworkAttachedDataNetworkResult) string { return v.UserPlaneAccessIpv4Subnet }).(pulumi.StringOutput)
} | [
0.707768976688385,
-0.3048200309276581,
0.5052549839019775,
0.11051453649997711,
-0.8593804836273193,
1.538740634918213,
0.2598326802253723,
-0.8291372656822205,
0.5433293581008911,
-1.381624698638916,
0.4318893253803253,
0.16410022974014282,
0.12964428961277008,
-0.9361066818237305,
0.3... |
func (o LookupNetworkAttachedDataNetworkResultOutput) UserPlaneAccessName() pulumi.StringOutput {
return o.ApplyT(func(v LookupNetworkAttachedDataNetworkResult) string { return v.UserPlaneAccessName }).(pulumi.StringOutput)
} | [
0.3723022937774658,
-0.49629878997802734,
0.7125194072723389,
-0.16726011037826538,
-1.1182981729507446,
1.840225100517273,
0.7675562500953674,
-0.7711879014968872,
0.5363857746124268,
-0.13440294563770294,
0.8790522813796997,
-0.14846940338611603,
0.3588232100009918,
-0.5701958537101746,
... |
func Test_SendJSON(t *testing.T) {
req, err := http.NewRequest(http.MethodPost, "/sendjson", nil)
if err != nil {
t.Fatal("创建Request失败")
}
rw := httptest.NewRecorder()
http.DefaultServeMux.ServeHTTP(rw, req)
log.Println("code:", rw.Code)
log.Println("body:", rw.Body.String())
} | [
-0.9987421035766602,
0.8328829407691956,
1.3987549543380737,
0.09279179573059082,
-0.335267037153244,
0.40700602531433105,
0.5221086144447327,
-0.015138262882828712,
-0.3582006096839905,
0.5626208186149597,
-0.8914080858230591,
1.9006626605987549,
-0.7085681557655334,
0.5423467755317688,
... |
func Test_MockServer(t *testing.T) {
//创建一个模拟的服务器
server := MockServer()
defer server.Close()
//Get请求发往模拟服务器的地址
resq, err := http.Get(server.URL)
if err != nil {
t.Fatal("创建Get失败")
}
defer resq.Body.Close()
log.Println("code:", resq.StatusCode)
json, err := ioutil.ReadAll(resq.Body)
if err != nil {
log.... | [
-1.2381906509399414,
0.08831378817558289,
1.0478607416152954,
-0.29837071895599365,
0.6293169260025024,
0.6942014694213867,
0.6938196420669556,
-0.041516873985528946,
0.15178172290325165,
0.16281786561012268,
-0.6654457449913025,
1.181081771850586,
-1.0953527688980103,
0.2966950833797455,
... |
func (k Keeper) GetMessageCount(ctx sdk.Context) uint64 {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.MessageCountKey))
byteKey := types.KeyPrefix(types.MessageCountKey)
bz := store.Get(byteKey)
// Count doesn't exist: no element
if bz == nil {
return 0
}
// Parse bytes
count, er... | [
-0.2577466368675232,
0.05599859729409218,
0.8405819535255432,
-0.1979605108499527,
0.31356531381607056,
-0.8184718489646912,
0.048583984375,
0.3478263318538666,
0.2351270169019699,
0.3399052321910858,
0.09819071739912033,
0.24016161262989044,
-0.6813835501670837,
0.9205031991004944,
-0.0... |
func (k Keeper) SetMessageCount(ctx sdk.Context, count uint64) {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.MessageCountKey))
byteKey := types.KeyPrefix(types.MessageCountKey)
bz := []byte(strconv.FormatUint(count, 10))
store.Set(byteKey, bz)
} | [
-0.251577228307724,
0.07643875479698181,
0.6422685980796814,
-0.783256471157074,
0.3561466634273529,
-0.23489423096179962,
-0.062325358390808105,
0.08131936937570572,
0.19508984684944153,
0.4621518552303314,
-1.2216699123382568,
0.10994777828454971,
-0.3276267945766449,
1.2295418977737427,... |
func (k Keeper) AppendMessage(
ctx sdk.Context,
message types.Message,
) uint64 {
// Create the message
count := k.GetMessageCount(ctx)
// Set the ID of the appended value
message.Id = count
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.MessageKey))
appendedValue := k.cdc.MustMarshal... | [
-0.48067912459373474,
1.137007713317871,
0.554829478263855,
-0.6925839185714722,
0.08362162113189697,
-0.2721624970436096,
-0.21970970928668976,
-0.22833053767681122,
0.24113602936267853,
-0.37533730268478394,
-0.007808346766978502,
-0.32501333951950073,
-1.5112974643707275,
1.420952796936... |
func (k Keeper) SetMessage(ctx sdk.Context, message types.Message) {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.MessageKey))
b := k.cdc.MustMarshalBinaryBare(&message)
store.Set(GetMessageIDBytes(message.Id), b)
} | [
-0.4896961450576782,
0.8694190979003906,
0.2348209172487259,
0.09873593598604202,
0.6298340559005737,
0.1190139502286911,
-0.13892802596092224,
0.0648910328745842,
0.5593926310539246,
-0.09688830375671387,
-0.07663524895906448,
0.3123794198036194,
-1.11593496799469,
0.7453848719596863,
-... |
func (k Keeper) GetMessage(ctx sdk.Context, id uint64) types.Message {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.MessageKey))
var message types.Message
k.cdc.MustUnmarshalBinaryBare(store.Get(GetMessageIDBytes(id)), &message)
return message
} | [
-0.4067598283290863,
0.5731701850891113,
0.19741672277450562,
-0.25141873955726624,
0.610393762588501,
-0.7279781699180603,
-0.2162872850894928,
-0.7552832365036011,
0.776939332485199,
-0.34658941626548767,
0.37637031078338623,
0.41038066148757935,
-1.046541452407837,
0.18647372722625732,
... |
func (k Keeper) HasMessage(ctx sdk.Context, id uint64) bool {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.MessageKey))
return store.Has(GetMessageIDBytes(id))
} | [
-0.3032474219799042,
0.40021657943725586,
0.3568023443222046,
-0.06461439281702042,
0.2742035984992981,
-0.4701578617095947,
-0.8590288162231445,
-0.06716585904359818,
0.717808187007904,
0.006640969775617123,
-0.020008260384202003,
-0.2104911357164383,
-0.6354963779449463,
0.98919576406478... |
func (k Keeper) GetMessageOwner(ctx sdk.Context, id uint64) string {
return k.GetMessage(ctx, id).Creator
} | [
0.28121042251586914,
0.12579840421676636,
0.311840683221817,
0.27422773838043213,
-0.16595064103603363,
-0.2531093657016754,
-0.04106129705905914,
-0.8099647164344788,
0.12610580027103424,
-0.8397315144538879,
0.2834571599960327,
0.06267854571342468,
-0.3140668272972107,
0.987035870552063,... |
func (k Keeper) RemoveMessage(ctx sdk.Context, id uint64) {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.MessageKey))
store.Delete(GetMessageIDBytes(id))
} | [
-0.8347161412239075,
0.44641926884651184,
0.1321078985929489,
-0.30102965235710144,
0.11105069518089294,
-0.5922317504882812,
-0.3244987428188324,
0.5217136740684509,
0.9116439819335938,
0.4095390737056732,
-0.14677512645721436,
-0.22576136887073517,
-1.0235011577606201,
0.7669338583946228... |
func (k Keeper) GetAllMessage(ctx sdk.Context) (list []types.Message) {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.MessageKey))
iterator := sdk.KVStorePrefixIterator(store, []byte{})
defer iterator.Close()
for ; iterator.Valid(); iterator.Next() {
var val types.Message
k.cdc.MustU... | [
-0.1937493085861206,
0.10994779318571091,
0.6354054808616638,
0.6018714904785156,
0.6655163168907166,
-0.055060528218746185,
-1.2114150524139404,
-0.03116949461400509,
0.16162241995334625,
0.004529420752078295,
-0.0721602737903595,
0.6040951013565063,
-0.8123807907104492,
1.519108772277832... |
func GetMessageIDBytes(id uint64) []byte {
bz := make([]byte, 8)
binary.BigEndian.PutUint64(bz, id)
return bz
} | [
0.2928146719932556,
0.20844994485378265,
0.32938525080680847,
0.025676794350147247,
0.4863855242729187,
-0.07693152874708176,
-0.8038687109947205,
-0.9202777147293091,
1.4298416376113892,
0.4700673520565033,
-0.768224835395813,
0.45439425110816956,
-1.6434639692306519,
1.0706151723861694,
... |
func GetMessageIDFromBytes(bz []byte) uint64 {
return binary.BigEndian.Uint64(bz)
} | [
0.7745446562767029,
-1.0084134340286255,
0.30225279927253723,
0.3249603509902954,
0.49327975511550903,
0.09440650790929794,
-0.1456892043352127,
0.05848507210612297,
1.3012031316757202,
0.48392048478126526,
-0.3670967221260071,
-0.37832626700401306,
-1.3095985651016235,
1.3181815147399902,... |
func GetBinaries() ([]os.FileInfo, error) {
binariesPath := config.BinariesPath()
binaries, err := ioutil.ReadDir(binariesPath)
if err != nil {
return nil, err
}
return binaries, nil
} | [
-0.06636983156204224,
0.3463802933692932,
0.4709630012512207,
0.2503279149532318,
0.8889723420143127,
0.3440605401992798,
0.039152346551418304,
-0.6422052383422852,
-0.7495208978652954,
-0.6901015639305115,
-0.5136530995368958,
0.7865291833877563,
-0.5140777826309204,
1.0515679121017456,
... |
func SplitTrackedName(trackedName string) (string, string) {
parts := strings.Split(trackedName, "-kktag:")
return parts[0], parts[1]
} | [
-0.36883652210235596,
-0.5025117993354797,
0.477851927280426,
0.655448317527771,
-0.06361684948205948,
0.549689531326294,
-0.26605117321014404,
0.4330487549304962,
-0.7466321587562561,
0.997431755065918,
-1.2907402515411377,
-0.26525938510894775,
-0.4768197536468506,
-0.06816834211349487,
... |
func ValidIdentifier(identifier string) bool {
return regexp.MustCompile("[A-Za-z0-9-.]*").FindString(identifier) == identifier
} | [
-0.1595684140920639,
-1.1594465970993042,
0.48918142914772034,
-0.296709269285202,
-1.2503248453140259,
1.478009581565857,
-0.5100305080413818,
0.8601175546646118,
0.9649308323860168,
0.34264710545539856,
-0.8105999231338501,
-0.3842788636684418,
-0.20281840860843658,
-0.24344198405742645,... |
func (co *CMDOptions) GetTLSConfig() (*tls.Config, error) {
if !co.Feature {
return nil, fmt.Errorf("no etcd registry feature on")
}
config, err := ssl.ClientTslConfVerity(co.CA, co.Cert, co.Key, "")
if err != nil {
return nil, err
}
return config, nil
} | [
1.1310590505599976,
0.6478809714317322,
0.44215714931488037,
-0.14525049924850464,
0.07160539925098419,
0.020607812330126762,
-0.23633742332458496,
0.23861083388328552,
-0.8729356527328491,
1.1383476257324219,
-0.036497585475444794,
0.1456221342086792,
0.17733372747898102,
0.90517771244049... |
func VenueListView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
var venues []Venue
var errGetVenue helios.Error
venues, errGetVenue = GetAllVenue(... | [
-0.9823192954063416,
-0.28944337368011475,
0.589624285697937,
0.130838543176651,
-0.706989049911499,
-0.025064188987016678,
0.03871644288301468,
0.8110179305076599,
0.6766859889030457,
0.35303643345832825,
-0.3704529404640198,
0.8043199777603149,
-0.042956337332725525,
0.5671617388725281,
... |
func VenueCreateView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
var venueData VenueData
var venue Venue
var err helios.Error
err = req.Deserial... | [
-0.5260095000267029,
-0.0031108239199966192,
0.7893363237380981,
-0.04232580214738846,
-0.13413868844509125,
0.15470434725284576,
0.1360844224691391,
0.42249828577041626,
0.3109528720378876,
-0.07664898037910461,
-0.00839956197887659,
0.2835438549518585,
-0.32223933935165405,
0.37683051824... |
func VenueDeleteView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
venueID, errParseVenueID := req.GetURLParamUint("venueID")
if errParseVenueID != ... | [
-0.48854631185531616,
-0.39981406927108765,
0.7324587106704712,
0.12318520247936249,
-0.521084725856781,
0.053139060735702515,
0.6152018308639526,
0.8353318572044373,
0.9924108982086182,
-0.19071261584758759,
0.5191082954406738,
1.1121126413345337,
-0.4871651828289032,
0.306354820728302,
... |
func EventListView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
var events []Event = GetAllEventOfUser(user)
serializedEvents := make([]EventData, ... | [
-0.7383976578712463,
-0.31913211941719055,
0.8158398866653442,
0.052575498819351196,
-0.6344766616821289,
-0.3300780951976776,
-0.04619693383574486,
0.1602945476770401,
0.46932291984558105,
0.037111807614564896,
-0.30935925245285034,
0.5954899787902832,
0.4812263548374176,
0.34189584851264... |
func EventCreateView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
var eventData EventData
var event Event
var err helios.Error
err = req.Deserial... | [
-0.2388538420200348,
0.36109405755996704,
0.9361926913261414,
0.20255951583385468,
-0.03112194500863552,
0.2986370325088501,
-0.2829158306121826,
0.10124896466732025,
-0.09455031156539917,
-0.26244235038757324,
0.19417129456996918,
-0.17845523357391357,
0.025371648371219635,
0.552866220474... |
func ParticipationListView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
var eventSlug string = req.GetURLParam("eventSlug")
var participations []Pa... | [
-0.7473556399345398,
-0.3828268051147461,
0.6185277700424194,
-0.26037147641181946,
-0.20715047419071198,
-0.13266630470752716,
0.3434083163738251,
0.6609265804290771,
0.34494245052337646,
0.25429674983024597,
-0.020951641723513603,
0.009283795952796936,
-0.1702999472618103,
0.241900265216... |
func ParticipationCreateView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
var eventSlug string = req.GetURLParam("eventSlug")
var participationData... | [
-0.8223916888237,
-0.14489446580410004,
0.8963153958320618,
-0.2653486430644989,
-0.017184721305966377,
0.004619476851075888,
0.6121076345443726,
0.33969342708587646,
-0.1512506902217865,
0.5169312357902527,
0.31654664874076843,
-0.765681803226471,
-0.5766818523406982,
-0.14870111644268036... |
func ParticipationVerifyView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
var eventSlug string = req.GetURLParam("eventSlug")
var verificationData ... | [
-0.17776469886302948,
-0.15052530169487,
0.7240874171257019,
0.15808023512363434,
0.15959666669368744,
-0.03188551217317581,
0.37480780482292175,
0.5114414095878601,
-0.23503926396369934,
-0.24960452318191528,
0.04797938093543053,
0.20868678390979767,
-0.8355264067649841,
0.424269467592239... |
func ParticipationDeleteView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
var eventSlug string = req.GetURLParam("eventSlug")
participationID, errP... | [
-0.5157250165939331,
-0.617749810218811,
0.7702977061271667,
-0.17843179404735565,
-0.2542325258255005,
-0.2234230637550354,
0.9733040928840637,
0.735378086566925,
0.271208792924881,
0.20346777141094208,
0.9277159571647644,
-0.20583690702915192,
-0.805995762348175,
-0.19190599024295807,
... |
func ParticipationStatusListView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
var eventSlug string = req.GetURLParam("eventSlug")
var status []Par... | [
-0.6888763904571533,
-0.6469082832336426,
0.5344624519348145,
-0.2640375792980194,
0.0007888229447416961,
0.1828552782535553,
0.14176668226718903,
0.8162881135940552,
0.05142103508114815,
0.039747465401887894,
-0.21279288828372955,
-0.04017796739935875,
-0.47162926197052,
0.268064051866531... |
func ParticipationStatusDeleteView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
var eventSlug string = req.GetURLParam("eventSlug")
sessionID, errP... | [
0.08602571487426758,
-1.040945291519165,
0.8270334005355835,
-0.4480971693992615,
-0.3752773404121399,
0.007127577904611826,
0.6499508023262024,
0.8860905766487122,
0.5329537391662598,
-0.21502645313739777,
0.6416207551956177,
-0.25306087732315063,
-0.7250781655311584,
-0.21406902372837067... |
func QuestionListView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
var eventSlug string = req.GetURLParam("eventSlug")
var questions []Question
va... | [
-0.43260401487350464,
-0.8740540742874146,
0.7344604134559631,
0.25819990038871765,
-0.7363542318344116,
0.2461128979921341,
0.3878549635410309,
0.1179146021604538,
0.2592407464981079,
-0.14798398315906525,
-0.46657297015190125,
-0.1163027286529541,
0.4595097005367279,
0.5298292636871338,
... |
func QuestionCreateView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
var eventSlug string = req.GetURLParam("eventSlug")
var questionData QuestionD... | [
-0.20713123679161072,
-0.18304814398288727,
1.0088258981704712,
0.06454737484455109,
-0.13549074530601501,
0.5732970833778381,
-0.37047240138053894,
0.022794637829065323,
-0.16655166447162628,
-0.1900140643119812,
0.028447091579437256,
-0.42456021904945374,
-0.04872024804353714,
0.38216313... |
func QuestionDetailView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
var eventSlug string = req.GetURLParam("eventSlug")
questionNumber, errParseQue... | [
0.2275998294353485,
-0.3446275591850281,
1.0509840250015259,
0.3830038905143738,
-0.7232031226158142,
0.7962896227836609,
0.528729259967804,
0.3076523244380951,
0.12951989471912384,
-0.594312846660614,
0.6048651933670044,
0.3102649748325348,
0.34365177154541016,
0.3161865472793579,
-0.63... |
func QuestionDeleteView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
var eventSlug string = req.GetURLParam("eventSlug")
questionNumber, errParseQu... | [
-0.05413743108510971,
-0.6295951008796692,
0.9386782646179199,
0.28458327054977417,
-0.6658791303634644,
0.5470566153526306,
0.3730514943599701,
0.3870275914669037,
0.4717443287372589,
-0.6327915787696838,
0.5931068062782288,
0.13170890510082245,
-0.05717713013291359,
0.16824689507484436,
... |
func SubmissionCreateView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
var eventSlug string = req.GetURLParam("eventSlug")
questionNumber, errParse... | [
-0.5012528896331787,
-0.28488293290138245,
0.9662010669708252,
0.4398386776447296,
-0.661321759223938,
0.6112042665481567,
0.03991585224866867,
-0.2493377923965454,
0.09740492701530457,
-0.2028311789035797,
0.19482967257499695,
-0.31871265172958374,
0.10597619414329529,
0.6041209697723389,... |
func GetSynchronizationDataView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
var eventSlug string = req.GetURLParam("eventSlug")
var event *Event
v... | [
-0.6371080875396729,
0.6653938889503479,
0.771195650100708,
0.6183148622512817,
-0.695441722869873,
0.12044497579336166,
0.4197767674922943,
0.4122733473777771,
-0.025553416460752487,
-0.0521329790353775,
0.12344067543745041,
0.7596570253372192,
0.01599866896867752,
0.4646114110946655,
-... |
func PutSynchronizationDataView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
var synchronizationData SynchronizationData
var errDeserialization hel... | [
-0.7411998510360718,
0.4806406795978546,
0.9423220157623291,
0.2573787271976471,
-0.6246570348739624,
0.44613534212112427,
0.6561996340751648,
0.20049729943275452,
-0.12962599098682404,
0.331641286611557,
-0.5219624042510986,
0.1361856758594513,
-0.07593328505754471,
-0.1970505267381668,
... |
func DecryptEventDataView(req helios.Request) {
user, ok := req.GetContextData(auth.UserContextKey).(auth.User)
if !ok {
req.SendJSON(helios.ErrInternalServerError.GetMessage(), helios.ErrInternalServerError.GetStatusCode())
return
}
var eventSlug string = req.GetURLParam("eventSlug")
var decryptRequest Decry... | [
-0.6116515398025513,
0.43399888277053833,
0.9133800864219666,
-0.039699625223875046,
-0.5205066204071045,
-0.2863350510597229,
0.3466740846633911,
0.7537885904312134,
-0.19488820433616638,
-0.10373145341873169,
0.3808450400829315,
0.6745955348014832,
-0.20933754742145538,
-0.08935264497995... |
func NewTransaction() *Transaction {
return NewTransactionN(10)
} | [
0.3840494751930237,
0.5586920976638794,
0.24292737245559692,
-0.5139716267585754,
0.686614453792572,
-0.9736412763595581,
0.16265647113323212,
-0.20829828083515167,
0.2787039577960968,
-0.33295440673828125,
-1.473290205001831,
-0.5792545080184937,
-0.05122973397374153,
-0.2183995544910431,... |
func NewTransactionN(n int) *Transaction {
return &Transaction{Deltas: make([]Delta, 0, n), deltas: make(map[Delta]struct{}, n)}
} | [
-0.6111884117126465,
-0.0834197998046875,
0.33872008323669434,
0.3697265386581421,
-0.44790560007095337,
-0.7203668355941772,
0.2538362145423889,
-0.23357568681240082,
0.06357616186141968,
-0.6004461050033569,
-1.793681025505066,
-1.0211797952651978,
0.48075804114341736,
0.2749207615852356... |
func (t *Transaction) AddQuad(q quad.Quad) {
ad, rd := createDeltas(q)
if _, adExists := t.deltas[ad]; !adExists {
if _, rdExists := t.deltas[rd]; rdExists {
t.deleteDelta(rd)
} else {
t.addDelta(ad)
}
}
} | [
-0.1365244835615158,
-0.5100170969963074,
0.9943158626556396,
-1.1999050378799438,
-0.1324382871389389,
0.8232961893081665,
-0.4410618543624878,
-0.43701332807540894,
0.6000816822052002,
-0.1316298395395279,
-0.053617846220731735,
0.3103243410587311,
0.2227444350719452,
0.1206291988492012,... |
func (t *Transaction) RemoveQuad(q quad.Quad) {
ad, rd := createDeltas(q)
if _, adExists := t.deltas[ad]; adExists {
t.deleteDelta(ad)
} else {
if _, rdExists := t.deltas[rd]; !rdExists {
t.addDelta(rd)
}
}
} | [
-0.19805531203746796,
-0.5828561782836914,
0.6162071228027344,
-1.5145000219345093,
-0.7088769674301147,
0.28055456280708313,
-0.12354322522878647,
-0.054320380091667175,
0.545745849609375,
0.3394498825073242,
-0.5535632371902466,
-0.051469337195158005,
-0.22746063768863678,
-0.00702618248... |
func NewDescribeClustersOK() *DescribeClustersOK {
return &DescribeClustersOK{}
} | [
0.05133264511823654,
0.5128363370895386,
0.21017955243587494,
0.7147615551948547,
0.12777268886566162,
-0.10553425550460815,
0.391773521900177,
-0.2678971588611603,
-0.1586817055940628,
-0.13260924816131592,
-0.2569836378097534,
0.5146299004554749,
-0.29263877868652344,
0.47591137886047363... |
func (o *DescribeClustersOK) WithPayload(payload *models.Cluster) *DescribeClustersOK {
o.Payload = payload
return o
} | [
0.3759475648403168,
0.9423748850822449,
-0.1691543012857437,
0.08096913248300552,
-0.006071680691093206,
-0.26939502358436584,
0.30603259801864624,
-0.6660685539245605,
0.28629133105278015,
0.06623049825429916,
0.2878629267215729,
-0.18023106455802917,
-0.5455361604690552,
-0.1127985417842... |
func (o *DescribeClustersOK) SetPayload(payload *models.Cluster) {
o.Payload = payload
} | [
0.157849982380867,
1.0518854856491089,
0.007019017357379198,
0.3391660451889038,
0.29774612188339233,
0.26549625396728516,
0.028715403750538826,
-0.45723646879196167,
0.09260085970163345,
0.6547514796257019,
0.10043144971132278,
0.24095574021339417,
-1.1022365093231201,
0.303909569978714,
... |
func (o *DescribeClustersOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
} | [
-0.40344536304473877,
0.20115932822227478,
0.2646026015281677,
0.5682167410850525,
0.94724041223526,
-0.4074482023715973,
0.39610621333122253,
-0.4070829749107361,
0.38555607199668884,
0.749683141708374,
0.4066925048828125,
-0.35696661472320557,
-0.8786471486091614,
-0.2675732970237732,
... |
func NewDescribeClustersDefault(code int) *DescribeClustersDefault {
if code <= 0 {
code = 500
}
return &DescribeClustersDefault{
_statusCode: code,
}
} | [
-0.05931004881858826,
1.049107313156128,
0.1426754891872406,
0.3126369118690491,
1.6114106178283691,
-0.25701481103897095,
0.3230600357055664,
-0.019185025244951248,
0.3848913609981537,
-0.11744287610054016,
-0.3336935341358185,
0.01887829601764679,
-1.3759486675262451,
0.11277591437101364... |
func (o *DescribeClustersDefault) WithStatusCode(code int) *DescribeClustersDefault {
o._statusCode = code
return o
} | [
0.16509371995925903,
0.6256605386734009,
-0.1590060293674469,
0.2901341915130615,
1.0005581378936768,
-0.3820098042488098,
0.09850376099348068,
0.28856873512268066,
0.37264949083328247,
0.19491732120513916,
-0.2519005835056305,
-0.26307180523872375,
-0.519760251045227,
0.02606050670146942,... |
func (o *DescribeClustersDefault) SetStatusCode(code int) {
o._statusCode = code
} | [
0.0753054991364479,
0.889252781867981,
0.007438060361891985,
0.4283955693244934,
1.051143765449524,
0.24815550446510315,
0.3223089575767517,
0.6216927170753479,
0.02250896766781807,
0.10737622529268265,
-0.17911231517791748,
0.07589513808488846,
-1.022476077079773,
0.2208220213651657,
0.... |
func (o *DescribeClustersDefault) WithPayload(payload *models.Error) *DescribeClustersDefault {
o.Payload = payload
return o
} | [
0.3869887888431549,
1.3455442190170288,
-0.13413891196250916,
-0.11456632614135742,
1.1689478158950806,
-0.3328559994697571,
0.05734506621956825,
-0.4348130226135254,
0.3886356055736542,
-0.403542697429657,
0.23047225177288055,
-0.45041704177856445,
-0.9818176031112671,
-0.2217861562967300... |
func (o *DescribeClustersDefault) SetPayload(payload *models.Error) {
o.Payload = payload
} | [
0.13061989843845367,
1.2440543174743652,
-0.029845498502254486,
0.07344230264425278,
1.5170602798461914,
0.321231484413147,
-0.16101011633872986,
-0.16010607779026031,
0.14226458966732025,
0.11370652914047241,
0.06045207381248474,
0.09721924364566803,
-1.2860684394836426,
-0.11910308152437... |
func (o *DescribeClustersDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(o._statusCode)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
} | [
-0.4095165431499481,
0.5710645318031311,
0.2703186273574829,
0.5251474976539612,
1.770460605621338,
-0.28321993350982666,
0.2375260889530182,
-0.17405077815055847,
0.47349226474761963,
0.30249232053756714,
0.30923721194267273,
-0.5823079943656921,
-1.046090841293335,
-0.6292199492454529,
... |
func romanToInt(s string) int {
if len(s) == 0 {
return 0
}
res := 0
for i := range s[:len(s)-1] {
if numerals[s[i]] < numerals[s[i+1]] {
res -= numerals[s[i]]
} else {
res += numerals[s[i]]
}
}
//last one is always added
res += numerals[s[len(s)-1]]
return res
} | [
0.33663424849510193,
-0.651541531085968,
0.5370108485221863,
-1.324052333831787,
-0.4537964165210724,
-0.33914002776145935,
0.2735552489757538,
-0.5342304110527039,
0.6719721555709839,
0.517869234085083,
-0.965332567691803,
0.5087344646453857,
-1.9552419185638428,
-0.876261293888092,
0.5... |
func DataverseMeta(base string, id float64) {
// Injecting string version of id into the search uri
search_uri := "/api/dataverses/" + fmt.Sprint(id)
// Variable that will store the json from the GET request
var status map[string]interface{}
// Executing GET request
resp, err := http.Get(base + search_uri)
i... | [
-0.8486829996109009,
-0.42477869987487793,
1.0922003984451294,
-0.4332246780395508,
0.3408760130405426,
0.27284783124923706,
-0.8620935082435608,
-0.14136312901973724,
-0.629324197769165,
0.4009908139705658,
0.3672347962856293,
1.5275568962097168,
-0.1732185184955597,
-0.20429997146129608,... |
func DataverseMetadataIds(base string) []float64 {
// This search uri finds the metadata of the dataverse and displays info objects with according id's
search_uri := "/api/metadatablocks"
// Variable that will store the json from the GET request
var metadata map[string]interface{}
// Make a GET request
resp, e... | [
-0.46436595916748047,
-0.3078137934207916,
0.6530950665473938,
-0.24403761327266693,
0.044273220002651215,
0.2741476893424988,
-0.3294178545475006,
-0.5841504335403442,
-0.790525496006012,
0.607384443283081,
-0.06461858004331589,
1.2966097593307495,
-0.7804632782936096,
0.9216628074645996,... |
func SearchForDataverses(base *string, max_results_opt ...int) ([]*DataverseDescription, error) {
// Send a GET request to Dataverse url
max_results := 0
if len(max_results_opt) > 0 {
max_results = max_results_opt[0]
}
// Search API for dataverses
search_uri := "/api/search"
options := "?q=*&type=dataverse&s... | [
-1.3500943183898926,
0.26493921875953674,
0.7353261113166809,
-1.1026233434677124,
0.5697457194328308,
-0.7637354731559753,
-0.4197879433631897,
-0.4105008840560913,
-0.22719928622245789,
0.10788445174694061,
0.15575331449508667,
0.6727977395057678,
-0.7891138792037964,
0.2925741970539093,... |
func NewWhois() Whois {
return Whois{
Price: MinNamePrice,
}
} | [
-0.581441342830658,
-0.6394106149673462,
0.08147816359996796,
0.15483184158802032,
-1.4194142818450928,
-0.006528285797685385,
-1.2383500337600708,
-0.7911514043807983,
0.35757726430892944,
0.018705494701862335,
-0.1307031214237213,
0.12305375933647156,
0.04452608525753021,
-0.651810586452... |
func NewRealClock() Clock {
return &realClock{}
} | [
0.7100204825401306,
-0.7594801783561707,
0.0860959142446518,
0.0765298455953598,
-1.2167936563491821,
-0.7754518985748291,
0.08260923624038696,
0.34323379397392273,
0.47491946816444397,
-0.7378649115562439,
-1.2289048433303833,
0.1767663210630417,
-0.39188066124916077,
0.23193280398845673,... |
func VFn(v int) (string, int) {
return "key", v
} | [
-0.7665627598762512,
-0.42989957332611084,
0.3217085599899292,
-0.18473660945892334,
-0.29899802803993225,
-1.387375831604004,
-0.2644330859184265,
0.2927592992782593,
-0.18131023645401,
0.451521635055542,
-0.7546073198318481,
0.1891857534646988,
1.2192150354385376,
0.020888620987534523,
... |
func KvFn(k string, v int) (string, int) {
return k, v
} | [
-0.03172140568494797,
-1.2153674364089966,
0.6541999578475952,
0.23491106927394867,
-1.1868629455566406,
-1.071291208267212,
-0.627530574798584,
0.6561012268066406,
-0.3060600459575653,
-0.0841444805264473,
-0.61348557472229,
-0.185903400182724,
0.8226052522659302,
-0.8573272824287415,
0... |
func KvEmitFn(k string, v int, emit func(string, int)) {
emit(k, v)
} | [
0.2614891529083252,
-0.42415785789489746,
0.31121793389320374,
0.35752370953559875,
-0.8343809843063354,
-0.8709076642990112,
-0.8668932318687439,
0.6384718418121338,
-0.2072240710258484,
0.376747727394104,
-1.0211678743362427,
0.0032168682664632797,
0.6240986585617065,
-0.8913299441337585... |
func (s *SCombine) otherMethod(v beam.V) beam.V {
return v
} | [
0.7516173124313354,
-0.17010359466075897,
0.3512231409549713,
0.2630232274532318,
0.238887757062912,
0.11597408354282379,
0.9367011785507202,
-0.1938380002975464,
0.8346217274665833,
0.3643183410167694,
0.3012301027774811,
0.30134010314941406,
-0.6780139207839966,
1.2230345010757446,
-0.... |
func IsJVMAvailable() bool {
return bool(C.isJVMAvailable())
} | [
-0.3819963335990906,
-0.4742131233215332,
0.27608397603034973,
0.4175317585468292,
-0.40879330039024353,
-0.16694776713848114,
-0.2998286187648773,
0.0025207437574863434,
0.7772881388664246,
1.4782252311706543,
-0.5768837928771973,
-0.011073446832597256,
0.42930057644844055,
1.231877565383... |
func QueryInterface(obj interface{}, method uintptr, interfaceID *com.GUID, client interface{}) error {
return com.NotImplementedError
} | [
-0.19063466787338257,
-0.12267547845840454,
0.19088080525398254,
-0.09801387786865234,
-0.6685370802879333,
0.6716432571411133,
0.5366346836090088,
-0.6915737986564636,
0.11273476481437683,
0.2756357789039612,
0.18438714742660522,
0.023380108177661896,
-1.6127716302871704,
0.08238821476697... |
func AddRef(obj interface{}, method uintptr) int32 {
return zero
} | [
-0.25672805309295654,
0.4677303731441498,
0.621690034866333,
0.5862460136413574,
-0.09845766425132751,
0.1109035536646843,
0.7444350719451904,
-0.7167986631393433,
0.8630473613739014,
-0.14207476377487183,
0.756770133972168,
-0.13337916135787964,
-0.6689164042472839,
1.068585753440857,
0... |
func Release(obj interface{}, method uintptr) int32 {
return zero
} | [
-0.8696994185447693,
0.147414430975914,
0.41994503140449524,
0.16607815027236938,
-0.800407886505127,
-0.4020419120788574,
0.7642101049423218,
-0.43676191568374634,
0.6758602261543274,
0.24969834089279175,
0.22275309264659882,
-0.1400948464870453,
-0.8113040924072266,
0.5613558888435364,
... |
func QueryInterfaceService(self *interface{}, interfaceID *com.GUID, client **interface{}) uint32 {
return com.NoInterfaceErrorCode
} | [
-0.16602317988872528,
0.33638623356819153,
0.32761892676353455,
-0.6397260427474976,
-0.5139250755310059,
0.4708368182182312,
1.0024889707565308,
-1.5278420448303223,
-0.006941129453480244,
-0.3692222237586975,
0.4525972604751587,
0.01088330801576376,
-2.1239352226257324,
0.422534734010696... |
func AddRefService(self *interface{}) int32 {
return zero
} | [
-1.063216209411621,
0.4512159824371338,
0.7252968549728394,
0.2098744809627533,
0.5057740211486816,
0.6943652629852295,
0.7060489654541016,
-1.4757188558578491,
0.8783008456230164,
-0.9424821734428406,
0.4482067823410034,
0.48726800084114075,
-1.6183617115020752,
1.9985063076019287,
0.14... |
func ReleaseService(self *interface{}) int32 {
return zero
} | [
-1.286637783050537,
0.2535082697868347,
0.6372882723808289,
-0.15740588307380676,
-0.533780574798584,
0.06033527851104736,
0.6325424909591675,
-0.6437212824821472,
0.3787965774536133,
-0.2485881894826889,
-0.15296947956085205,
0.33806687593460083,
-1.3032029867172241,
1.3003623485565186,
... |
func VirtualTableService() *VirtualTable {
return &VirtualTable{
QueryInterface: syscall.NewCallback(QueryInterfaceService),
AddRef: syscall.NewCallback(AddRefService),
Release: syscall.NewCallback(ReleaseService)}
} | [
0.6998597383499146,
-0.5903272032737732,
0.0814325138926506,
0.5703547596931458,
-0.5497552156448364,
-0.33153530955314636,
0.1983584612607956,
-1.3306726217269897,
0.6445887684822083,
0.5806618928909302,
-0.030635109171271324,
0.4284891188144684,
-1.0077680349349976,
0.8359583020210266,
... |
func IUnknownService(obj *interface{}) (*com.ServerObject, error) {
return Service(obj, VirtualTableService(), InterfaceID)
} | [
-0.983707845211029,
-0.4093165993690491,
0.24866962432861328,
0.07866410166025162,
-0.5234783887863159,
-0.424769788980484,
0.23072639107704163,
-0.6545450091362,
0.1202160194516182,
0.5189970135688782,
-0.7978067994117737,
0.23563599586486816,
-0.3892425000667572,
0.6954765319824219,
-0... |
func InitRedisRepo(dbNum int) (*RedisRepo, error) {
ret := &RedisRepo{}
redisSrv := os.Getenv("REDIS_SERVER")
if len(redisSrv) == 0 {
redisSrv = "localhost"
}
client := redis.NewClient(&redis.Options{
Addr: redisSrv + ":6379",
Password: "", // no password set
DB: dbNum,
})
_, err := client.Pi... | [
-0.23437221348285675,
1.2208466529846191,
0.7195123434066772,
-0.5812506675720215,
-0.435195654630661,
-0.28810685873031616,
-0.2698638439178467,
0.5046529769897461,
0.09994961321353912,
-0.051707684993743896,
-1.090758204460144,
-0.1581467092037201,
-0.505338728427887,
0.3055664896965027,... |
func CloseRedisRepo(repo *RedisRepo) {
log.Println(repo.client.Close())
} | [
-0.19417327642440796,
0.4289170503616333,
0.20580250024795532,
-1.0457184314727783,
-0.65992671251297,
0.6390336751937866,
-0.33613383769989014,
-0.3782070577144623,
-0.05254519730806351,
-0.23559559881687164,
-0.2759917974472046,
0.07482077926397324,
-0.20410794019699097,
0.68144524097442... |
func (r *RedisRepo) AddBook(book *models.Book) error {
key := book.ISBN
bs, err := json.Marshal(book)
if err != nil {
log.Printf("Unable to marshal book entry into bytes: %s\n", err)
return err
}
if err = r.client.Set(key, bs, 0).Err(); err != nil {
log.Printf("Unable to store book entry into redis: %s\n", e... | [
-1.2743772268295288,
0.5611187219619751,
0.9125298857688904,
0.5059979557991028,
0.4556865990161896,
1.348875641822815,
-0.7649711966514587,
0.24197353422641754,
-0.42972010374069214,
0.6519926190376282,
-0.10244142264127731,
-0.10346286743879318,
-0.8129837512969971,
1.3763972520828247,
... |
func (r *RedisRepo) GetBook(isbn string) (*models.Book, error) {
ret, err := r.getBookUsingKey(isbn)
if err != nil {
if err == redis.Nil {
return nil, errors.New("No book with this ISBN")
}
return nil, err
}
log.Printf("GetBook %v is successful \n", ret)
return ret, nil
} | [
-1.145504355430603,
0.9787638783454895,
0.7241598963737488,
1.3393458127975464,
0.5178906917572021,
0.18485282361507416,
-0.5256767272949219,
0.11141936480998993,
-0.5215499997138977,
0.3783150911331177,
0.41740262508392334,
0.12330783903598785,
-1.060866117477417,
0.8401555418968201,
0.... |
func (r *RedisRepo) UpdateBook(isbn string, book *models.Book) error {
bs, err := json.Marshal(book)
if err != nil {
log.Printf("Unable to mashal book entry (isbn=%s) into bytes: %s\n", isbn, err)
return err
}
if isbn == book.ISBN {
if err = r.client.SetXX(isbn, bs, 0).Err(); err != nil {
log.Printf("Unabl... | [
-1.3666197061538696,
-0.1064867377281189,
1.0416995286941528,
0.5548672080039978,
0.013474192470312119,
0.8135140538215637,
-0.648448646068573,
0.46462032198905945,
-0.36787840723991394,
1.1751829385757446,
-0.20169807970523834,
0.22649508714675903,
-0.735733687877655,
1.4605575799942017,
... |
func (r *RedisRepo) DeleteBook(isbn string) error {
err := r.deleteKey(isbn)
if err != nil {
return err
}
err = r.deleteKeyFromList(isbn, 0)
if err != nil {
return err
}
log.Println("DeleteBook successfull")
return nil
} | [
-1.1441093683242798,
0.5694882869720459,
0.62384033203125,
0.8189858794212341,
0.33143243193626404,
0.7264506220817566,
-0.6562358736991882,
1.2037334442138672,
-0.10325046628713608,
0.21908292174339294,
-0.2752533555030823,
-0.1939295083284378,
-1.1359245777130127,
1.5030776262283325,
0... |
func (r *RedisRepo) AllBooks() ([]models.Book, int, error) {
var (
books []models.Book
)
keys, err := r.client.LRange(booklist, 0, -1).Result()
if err != nil {
log.Println("Can't get booklist from db:", err)
return nil, 0, err
}
for _, key := range keys {
book, err := r.getBookUsingKey(key)
if err != ... | [
-0.6171982288360596,
-0.10138528048992157,
0.5141462683677673,
0.9894641637802124,
-0.19262278079986572,
0.3706440031528473,
-0.8280985355377197,
0.573545515537262,
-0.2886742055416107,
0.40696093440055847,
-0.3044501841068268,
-0.4057726562023163,
-0.5081833600997925,
1.6658823490142822,
... |
func (r *RedisRepo) Books(start uint64, count int64) ([]models.Book, int, error) {
var books []models.Book
//if use "lrange 0 1" returned 2 rows so use "lrange 0 0" for 1
if start == 0 {
count--
}
keys, err := r.client.LRange(booklist, int64(start), count).Result()
if err != nil {
log.Println("Can't get book... | [
-1.2993459701538086,
0.010176165029406548,
0.469708114862442,
0.7662688493728638,
-0.17540337145328522,
0.23796367645263672,
-0.4580748975276947,
0.22995740175247192,
-1.0386327505111694,
0.6301969289779663,
0.010395608842372894,
-0.8864254355430603,
-0.29266121983528137,
1.144937515258789... |
func (o *AllConnectionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewAllConnectionsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
... | [
-0.2994413673877716,
-1.3874034881591797,
0.7851212024688721,
0.5717737674713135,
0.14646382629871368,
-1.2399741411209106,
-0.3077374994754791,
-0.10165932774543762,
0.7724199295043945,
0.28090614080429077,
0.6188740134239197,
-0.9013266563415527,
-0.9359661340713501,
0.12959127128124237,... |
func NewAllConnectionsOK() *AllConnectionsOK {
return &AllConnectionsOK{
}
} | [
0.45315128564834595,
-1.2559068202972412,
0.2770606279373169,
0.9630050659179688,
-1.518549919128418,
-0.8285255432128906,
-0.32189154624938965,
0.42252546548843384,
0.30035126209259033,
-0.201400488615036,
-0.7961204051971436,
-1.0891000032424927,
0.5538427829742432,
0.49281373620033264,
... |
func NewAllConnectionsBadRequest() *AllConnectionsBadRequest {
return &AllConnectionsBadRequest{
}
} | [
-0.13525491952896118,
-1.1930007934570312,
0.7174754738807678,
0.8832753896713257,
-0.6738623380661011,
-0.6637266874313354,
-1.4372166395187378,
0.09773379564285278,
0.20664866268634796,
-1.1979542970657349,
0.1421976536512375,
-0.19870008528232574,
-0.22136375308036804,
1.017667889595031... |
func NewAllConnectionsNotFound() *AllConnectionsNotFound {
return &AllConnectionsNotFound{
}
} | [
0.20630168914794922,
-1.725653052330017,
0.27302300930023193,
0.6070296764373779,
-0.9100888967514038,
-0.1868448257446289,
-0.28114840388298035,
0.1281670480966568,
0.9061455726623535,
-0.6207574009895325,
-0.6060752868652344,
-0.32474571466445923,
-0.14426465332508087,
0.6278368830680847... |
func NewWerckerInitStep(options *PipelineOptions) (*WerckerInitStep, error) {
werckerInit := "wercker/wercker-init@2.1.0"
stepConfig := &StepConfig{ID: werckerInit, Data: make(map[string]string)}
initStep, err := NewStep(stepConfig, options)
if err != nil {
return nil, err
}
return &WerckerInitStep{
External... | [
-0.8538206815719604,
-1.002892017364502,
0.35662364959716797,
-0.25849688053131104,
-0.07266400754451752,
-0.3490038812160492,
0.13780292868614197,
-0.13361069560050964,
-0.8721907734870911,
-0.41315439343452454,
-0.5248719453811646,
0.7116987705230713,
-0.37726736068725586,
1.166355013847... |
func (s *WerckerInitStep) Fetch() (string, error) {
hostStepPath := s.options.HostPath(s.safeID)
scriptPath := s.options.HostPath(s.safeID, "init.sh")
err := os.MkdirAll(hostStepPath, 0755)
if err != nil {
return "", err
}
err = ioutil.WriteFile(scriptPath, []byte(initSh), 0755)
if err != nil {
return "", ... | [
0.3013787865638733,
-0.8337894082069397,
0.42111843824386597,
0.08805020153522491,
0.3183816969394684,
0.28639212250709534,
0.12077271938323975,
-0.25606057047843933,
-0.6277204751968384,
-0.017093727365136147,
-0.5644689798355103,
0.5833635330200195,
0.1772100180387497,
1.3063889741897583... |
func Register(w http.ResponseWriter, r *http.Request, opt router.UrlOptions, sm session.ISessionManager, s store.IStore) {
switch r.Method {
case "GET":
utils.RenderTemplate(w, r, "register", sm, make(map[string]interface{}))
case "POST":
var newUser *user.User
dfc := s.GetDataSource("persistence")
p, ok ... | [
-1.5668306350708008,
0.2656441032886505,
1.0435974597930908,
0.7903524041175842,
0.3452598750591278,
-0.08216668665409088,
0.4594397246837616,
0.23195402324199677,
-0.33871012926101685,
0.023734645918011665,
-0.5374905467033386,
-0.05692256987094879,
-0.28711649775505066,
0.079712800681591... |
func (o *ErrorMessage) GetMessage() string {
if o == nil || o.Message == nil {
var ret string
return ret
}
return *o.Message
} | [
0.09678028523921967,
0.6921343803405762,
0.39457830786705017,
0.8280223608016968,
0.46854519844055176,
-0.7313399314880371,
0.364059180021286,
-0.5594968795776367,
0.9382615089416504,
-0.40202540159225464,
0.7851264476776123,
-1.5302585363388062,
-1.0609350204467773,
1.1583073139190674,
... |
func (o *ErrorMessage) GetMessageOk() (*string, bool) {
if o == nil || o.Message == nil {
return nil, false
}
return o.Message, true
} | [
-0.04911003261804581,
0.10750484466552734,
0.5881054997444153,
0.3707425892353058,
0.11837003380060196,
-0.041867151856422424,
0.3753756582736969,
0.5811184644699097,
0.2057572901248932,
0.6551517248153687,
-0.31645581126213074,
-0.8728600740432739,
0.013972757384181023,
1.3463512659072876... |
func (o *ErrorMessage) HasMessage() bool {
if o != nil && o.Message != nil {
return true
}
return false
} | [
0.13597290217876434,
0.8179802298545837,
0.4765738844871521,
0.46092352271080017,
0.6382096409797668,
-0.44122740626335144,
-0.30251920223236084,
0.3143226206302643,
0.5704272389411926,
-0.917914867401123,
-0.00146626983769238,
-0.6984062194824219,
-0.6140668392181396,
0.8794936537742615,
... |
func (o *ErrorMessage) SetMessage(v string) {
o.Message = &v
} | [
-0.22289735078811646,
0.5186497569084167,
-0.08026804029941559,
0.22866444289684296,
-0.31285738945007324,
-0.7309950590133667,
-0.7505428791046143,
-0.9426273703575134,
0.20990020036697388,
-0.2422282099723816,
0.5004040598869324,
1.0316308736801147,
-1.0794587135314941,
0.283755362033844... |
func NewMongoConnection(dbURL string, dbName string) MongoConnection {
session, err := mgo.Dial(dbURL)
if err != nil {
panic(err)
}
mc := MongoConnection{session, dbURL, dbName}
mc.createLocalConnection()
return mc
} | [
-0.05873492360115051,
-0.017001139000058174,
0.3596675992012024,
0.5883334875106812,
-0.49057596921920776,
-0.7698018550872803,
-0.8511868715286255,
0.08331502228975296,
0.47352415323257446,
0.5639845728874207,
-0.6186564564704895,
-0.004577823914587498,
-0.7688190340995789,
0.453447520732... |
func getInternalIP(node *v1.Node) (string, error) {
for _, address := range node.Status.Addresses {
if address.Type == v1.NodeInternalIP && address.Address != "" {
return address.Address, nil
}
}
return "", fmt.Errorf("couldn't get the internal IP of host %s with addresses %v", node.Name, node.Status.Addresse... | [
-0.4538730978965759,
-0.017239190638065338,
0.8359190821647644,
-0.32024887204170227,
-0.7112796902656555,
-0.19139446318149567,
-0.3435581922531128,
0.35784634947776794,
-0.57329261302948,
0.32743901014328003,
0.7652732729911804,
0.2886506915092468,
-0.7261512279510498,
-0.419087648391723... |
func getSubnetPrefix(ctx context.Context, c clientset.Interface) (*net.IPNet, error) {
node, err := getReadySchedulableWorkerNode(ctx, c)
if err != nil {
return nil, fmt.Errorf("error getting a ready schedulable worker Node, err: %w", err)
}
internalIP, err := getInternalIP(node)
if err != nil {
return nil, fm... | [
-0.19699835777282715,
0.20984147489070892,
0.8353208303451538,
0.08363282680511475,
-0.8104655146598816,
-0.4326343834400177,
-0.17544697225093842,
-0.3731851577758789,
0.758787989616394,
0.14930105209350586,
0.05132677033543587,
0.7550827860832214,
-0.047539204359054565,
-0.11552885919809... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.