text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func WithClient(x *xray.XRay) Option {
return func(o *Options) {
o.Client = x
}
} | [
0.5575464963912964,
0.3338392972946167,
0.1342012584209442,
-0.8578940033912659,
-0.1732795238494873,
0.38886746764183044,
0.029874473810195923,
-1.4485199451446533,
0.5643110275268555,
-0.44215649366378784,
-0.46186578273773193,
0.01128103956580162,
0.2603837549686432,
-0.9990726113319397... |
func WithDaemon(addr string) Option {
return func(o *Options) {
o.Daemon = addr
}
} | [
0.2742069363594055,
-0.6994532346725464,
0.5159370303153992,
-0.5466615557670593,
-0.3015420436859131,
0.30120745301246643,
0.7698657512664795,
0.0878407284617424,
0.9501570463180542,
-1.008610486984253,
-0.2210588902235031,
0.2508242130279541,
0.5629240870475769,
-0.19023950397968292,
0... |
func (s *proxy) ServeConn(conn net.Conn) {
// this layer of packaging is to dump the output without interruption
conn = &connBuffReader{
Conn: conn,
Reader: bufio.NewReader(conn),
}
var p [1]byte
n, err := conn.Read(p[:])
if err != nil {
conn.Close()
return
}
conn = UnreadConn(conn, p[:n])
switch p[... | [
-0.1843847781419754,
-0.2188885658979416,
0.6944193243980408,
-0.0008428724831901491,
-0.13529275357723236,
-0.5717391967773438,
0.7298836708068848,
0.8239590525627136,
-0.3635033965110779,
-0.21152746677398682,
-0.10857721418142319,
-0.08157041668891907,
-0.3025883734226227,
0.81738871335... |
func CircIn(t, b, c, d float64) float64 {
if t > d {
return c
}
t /= d
return -c*(math.Sqrt(1-t*t)-1) + b
} | [
0.16315777599811554,
-0.6856793761253357,
0.3292565941810608,
-0.3252924978733063,
-0.5928865075111389,
0.9163369536399841,
0.39708325266838074,
-0.2952178120613098,
-0.6549685597419739,
0.5791493654251099,
0.5503338575363159,
0.8066324591636658,
-0.5489701628684998,
-0.05328919738531113,
... |
func CircOut(t, b, c, d float64) float64 {
if t > d {
return c
}
t /= d
t--
return c*math.Sqrt(1-t*t) + b
} | [
1.0624898672103882,
-0.06585043668746948,
0.35748109221458435,
-0.7735010981559753,
-0.22968851029872894,
0.020038003101944923,
0.5337420105934143,
0.18594972789287567,
-0.8965379595756531,
0.7597907781600952,
0.804946780204773,
0.07424265891313553,
-0.31745845079421997,
-0.560044825077056... |
func CircInOut(t, b, c, d float64) float64 {
if t > d {
return c
}
t /= d / 2
if t < 1 {
return -c/2*(math.Sqrt(1-t*t)-1) + b
}
t -= 2
return c/2*(math.Sqrt(1-t*t)+1) + b
} | [
-0.2994694113731384,
-0.4372122883796692,
0.46346190571784973,
-0.7149032950401306,
-0.7205132842063904,
0.4239218831062317,
0.8903400897979736,
0.6009518504142761,
-0.7715040445327759,
0.7552230954170227,
0.15041391551494598,
0.4956333637237549,
-0.3997267484664917,
-0.6465336084365845,
... |
func NewGcpCmd(ctx context.Context, opt *options.Common) *cobra.Command {
o := RegistryGcpOptions{
Common: opt,
}
cmd := &cobra.Command{
Use: "gcp [REGISTRY]",
DisableFlagsInUseLine: true,
Short: "Register an Artifact Registry to log in using GCP Application Default credent... | [
-0.26671746373176575,
0.3038316071033478,
0.4561496376991272,
0.006206321530044079,
0.7699908018112183,
0.3050331175327301,
0.01630862057209015,
-0.14679518342018127,
0.23519355058670044,
0.2709413766860962,
-0.05979488044977188,
0.4812292754650116,
-0.4396626949310303,
0.07706685364246368... |
func (o *RegistryGcpOptions) RunGcp(ctx context.Context, args []string) error {
var err error
reg := args[0]
if err = gcp.Login(ctx, reg); err != nil {
return err
}
o.Printer.Success.Printfln("GCP authentication successful for %q", reg)
o.Printer.Verbosef("Adding new gcp entry to configuration file %q", o.Conf... | [
-0.5147830843925476,
0.44206157326698303,
0.9199433922767639,
-0.1194915696978569,
0.8851152658462524,
1.1922714710235596,
0.8674919605255127,
-0.36284780502319336,
0.09912741929292679,
1.0658055543899536,
-0.28914302587509155,
0.44683289527893066,
-1.0772345066070557,
-0.39223945140838623... |
func init() {
Promu.AddCommand(buildCmd)
buildCmd.Flags().String("prefix", "", "Specific dir to store binaries (default is .)")
viper.BindPFlag("build.prefix", buildCmd.Flags().Lookup("prefix"))
} | [
0.35428565740585327,
-0.3640448749065399,
0.464400976896286,
0.6647890210151672,
1.2424359321594238,
0.8433219194412231,
0.40148821473121643,
1.2037354707717896,
0.0244724303483963,
-0.9921804070472717,
-0.3209834098815918,
1.6211251020431519,
0.13651610910892487,
0.9982993602752686,
0.4... |
func NewMessage(data []byte, offset int64) *Message {
internal := &mInternal{
data: data,
marked: false,
committed: false,
offset: offset,
upstreamDoneChan: make(chan struct{}),
mu: sync.Mutex{},
}
return &Message{
internal,
&MessageMock{
GetDat... | [
-0.5594124794006348,
-0.21325625479221344,
0.4445821940898895,
-0.49414703249931335,
-0.41662999987602234,
0.022880326956510544,
-0.08571649342775345,
-0.03534409776329994,
0.25601691007614136,
-0.3887648582458496,
0.6158275604248047,
0.4351293742656708,
-0.6960808038711548,
0.597920298576... |
func (internal *mInternal) getDataFunc() []byte {
return internal.data
} | [
0.16277721524238586,
-0.2924703061580658,
0.3372102379798889,
-0.25238996744155884,
-0.03854621201753616,
-0.05630085989832878,
0.4053364396095276,
-0.0779152661561966,
0.5385693311691284,
-0.9624356031417847,
-0.5056912899017334,
1.2851731777191162,
0.8373994827270508,
-0.02454824000597,
... |
func (internal *mInternal) offsetFunc() int64 {
internal.mu.Lock()
defer internal.mu.Unlock()
return internal.offset
} | [
0.27428191900253296,
0.35261213779449463,
0.25287196040153503,
-0.21248622238636017,
-0.906900942325592,
0.08436145633459091,
1.444030523300171,
0.2412189245223999,
-0.10254333913326263,
-0.5002983808517456,
1.063715934753418,
1.0997695922851562,
-0.07231704145669937,
-0.20371007919311523,... |
func (internal *mInternal) markFunc() {
internal.mu.Lock()
defer internal.mu.Unlock()
internal.marked = true
} | [
0.2701368033885956,
-0.181865856051445,
0.3481980264186859,
-0.5005295276641846,
0.9733534455299377,
-0.49069637060165405,
1.4586658477783203,
0.3927903175354004,
-0.26722830533981323,
-0.49588850140571594,
0.13470599055290222,
1.4313029050827026,
0.08360357582569122,
0.3048873841762543,
... |
func (internal *mInternal) commitFunc() {
internal.mu.Lock()
defer internal.mu.Unlock()
internal.marked = true
internal.committed = true
} | [
-0.012638712301850319,
-0.7259786128997803,
0.362763911485672,
-0.452023983001709,
0.6086657047271729,
0.34119299054145813,
1.5470374822616577,
0.5441086888313293,
-0.7558818459510803,
0.29575544595718384,
0.5673961639404297,
1.0597068071365356,
0.09533097594976425,
0.258820503950119,
-0... |
func (internal *mInternal) releaseFunc() {
internal.mu.Lock()
defer internal.mu.Unlock()
close(internal.upstreamDoneChan)
} | [
-0.40366771817207336,
0.013948368839919567,
0.35280540585517883,
-0.5679674744606018,
-0.46990910172462463,
0.04662749543786049,
1.379085898399353,
-0.1957446038722992,
-0.5378615856170654,
-0.475569486618042,
0.34553471207618713,
0.8514741063117981,
0.358719140291214,
0.18764902651309967,... |
func (internal *mInternal) commitAndReleaseFunc() {
internal.mu.Lock()
defer internal.mu.Unlock()
internal.marked = true
internal.committed = true
close(internal.upstreamDoneChan)
} | [
-1.0617955923080444,
-1.0793287754058838,
0.45901334285736084,
-0.11609780788421631,
-0.3925163745880127,
0.49398142099380493,
1.1576673984527588,
0.3425278067588806,
-0.3314158022403717,
0.16605469584465027,
0.3606530427932739,
0.6413688659667969,
0.2907031774520874,
0.6666957139968872,
... |
func (internal *mInternal) upstreamDoneFunc() chan struct{} {
internal.mu.Lock()
defer internal.mu.Unlock()
return internal.upstreamDoneChan
} | [
-0.7661200165748596,
-0.5711768865585327,
0.5048909783363342,
-0.373251348733902,
-0.22506366670131683,
0.5547912120819092,
1.108973741531372,
-0.5298661589622498,
-0.5779390931129456,
-0.6459668278694153,
0.3846421241760254,
1.1954900026321411,
0.385623037815094,
-0.0067316037602722645,
... |
func (internal *mInternal) IsMarked() bool {
internal.mu.Lock()
defer internal.mu.Unlock()
return internal.marked
} | [
-0.691838800907135,
-0.16131199896335602,
0.6574340462684631,
-0.347426176071167,
0.936436116695404,
-0.07633672654628754,
0.6211714744567871,
0.33298978209495544,
0.6541190147399902,
-0.7399774193763733,
-0.16712647676467896,
0.7696512341499329,
-1.496353030204773,
0.3514636158943176,
-... |
func (internal *mInternal) IsCommitted() bool {
internal.mu.Lock()
defer internal.mu.Unlock()
return internal.committed
} | [
-0.2834547460079193,
-0.7968824505805969,
0.6564578413963318,
-0.3921194076538086,
0.04014183208346367,
-0.07483066618442535,
0.25502273440361023,
0.12336747348308563,
-0.0693177729845047,
0.08582337945699692,
0.17454129457473755,
0.07663767784833908,
-1.4058849811553955,
0.258830428123474... |
func NewBuyOrder(seed string, assetName string, issuer string,
amount string, price string) (int32, string, error) {
sourceAccount, mykp, err := xlm.ReturnSourceAccount(seed)
if err != nil {
return -1, "", errors.Wrap(err, "could not load client details, quitting")
}
buyOffer := build.ManageBuyOffer{
Selling... | [
0.3454380929470062,
-0.23524515330791473,
0.5548457503318787,
-0.13058818876743317,
-0.8379341959953308,
-0.681583046913147,
-0.43379199504852295,
-0.26126623153686523,
-0.4417411684989929,
0.053547244518995285,
-0.7324117422103882,
0.2768901288509369,
-0.42962515354156494,
0.0750384852290... |
func NewSellOrder(seed string, assetName string, issuer string, amount string,
price string) (int32, string, error) {
sourceAccount, mykp, err := xlm.ReturnSourceAccount(seed)
if err != nil {
return -1, "", errors.Wrap(err, "could not load client details, quitting")
}
sellOffer := build.ManageBuyOffer{
Selli... | [
-0.061484161764383316,
-0.5510403513908386,
0.5999112129211426,
-0.3803689479827881,
-1.2653284072875977,
-0.2457514852285385,
-0.885966956615448,
-0.6043625473976135,
0.03552449867129326,
0.16899177432060242,
-0.6069849133491516,
0.14593389630317688,
-0.21496471762657166,
0.42127272486686... |
func DexStableCoinBuy(seed string, amount string) (int32, string, error) {
assetName := "USD"
issuer := stablecoin.AnchorUSDAddress
price, err := ticker.BinanceTicker()
if err != nil {
return -1, "", errors.New("could not fetch price form binance, quitting")
}
price = price * 1.02 // a small premium to get the ... | [
-0.16280509531497955,
0.007633468136191368,
0.5645893216133118,
0.2561144232749939,
0.06519314646720886,
-0.9770054221153259,
-0.7628757357597351,
-0.5862742066383362,
-0.4227648079395294,
0.18731451034545898,
-0.6422629356384277,
0.18923981487751007,
0.006278533488512039,
-0.3944505751132... |
func DexStableCoinSell(seed string, amount string) (int32, string, error) {
assetName := "USD"
issuer := stablecoin.AnchorUSDAddress
price, err := ticker.BinanceTicker()
if err != nil {
return -1, "", errors.New("could not fetch price form binance, quitting")
}
price = price * 1.02 // a small premium to get the... | [
-0.43013542890548706,
0.12230739742517471,
0.4870862364768982,
-0.4010225832462311,
-0.5849893689155579,
-0.6080859303474426,
-0.6462045311927795,
-0.919097900390625,
0.05048835650086403,
-0.01056621689349413,
-0.3789558410644531,
0.2540554106235504,
0.2624954879283905,
0.13124729692935944... |
func (s *storager) Open(ctx context.Context, location string, options ...storage.Option) (io.ReadCloser, error) {
started := time.Now()
defer func() {
s.logF("s3:Open %v %s\n", location, time.Since(started))
}()
var sess *session.Session
if s.config == nil {
sess = session.New()
} else {
sess = session.New(... | [
-0.5166864991188049,
-0.7140461802482605,
0.7531585693359375,
-0.09315825998783112,
-0.5471747517585754,
-0.07418463379144669,
0.440504252910614,
0.4692970812320709,
0.6527349352836609,
0.8514614105224609,
-0.18699198961257935,
0.49601688981056213,
-0.36229953169822693,
-0.3824648559093475... |
func slicePermutations(s []int) [][]int {
perms := [][]int{}
// fwd declaration to be able to call itself recursively
var helper func(arr []int, n int)
helper = func(arr []int, n int) {
if n == 1 {
tmp := make([]int, len(s))
copy(tmp, s)
perms = append(perms, tmp)
return
}
for i := 0; i < n; i++... | [
-0.8747734427452087,
-0.09107804298400879,
0.6503124833106995,
0.467229962348938,
-1.1897817850112915,
-0.9628790020942688,
1.2170469760894775,
-0.18311962485313416,
1.3524264097213745,
0.3943774998188019,
-0.07781379669904709,
-0.4922437369823456,
-0.39685896039009094,
1.0771546363830566,... |
func New(c *Config, logger *zap.Logger) *Server {
return &Server{
logger,
}
} | [
-0.5618569254875183,
-1.4191217422485352,
0.10423292219638824,
-0.3774716854095459,
-0.19698825478553772,
0.13185442984104156,
-0.11434196680784225,
0.061111416667699814,
-0.048209115862846375,
-0.02172677218914032,
-0.6132928729057312,
0.5559452176094055,
-0.1128801554441452,
0.5193990468... |
func (c Code) String() string {
switch c {
case Resident:
return "RESIDENT"
case Nonresident:
return "NONRESIDENT"
default:
return "UNKNOWN"
}
} | [
0.23454643785953522,
-0.5561989545822144,
0.39829376339912415,
-0.17872850596904755,
0.22603878378868103,
1.2528399229049683,
0.22621314227581024,
-0.2712940573692322,
-0.47373664379119873,
0.2639528214931488,
-0.004704532213509083,
0.22083134949207306,
-0.35290977358818054,
-0.33718326687... |
func NewOSTreeDeployStage(options *OSTreeDeployStageOptions) *Stage {
return &Stage{
Type: "org.osbuild.ostree.deploy",
Options: options,
}
} | [
-0.24379712343215942,
-1.0559911727905273,
0.14641354978084564,
-0.26926448941230774,
-0.40231382846832275,
-0.5474416613578796,
0.1406400203704834,
-0.2756757140159607,
0.06976790726184845,
1.160701870918274,
0.01984328404068947,
0.19656270742416382,
-0.3412158191204071,
0.634955942630767... |
func DayThreeOne() {
input, err := ioutil.ReadFile("./3/input.txt")
if err != nil {
fmt.Println(err)
os.Exit(1)
}
sliceData := strings.Split(string(input), "\n")
slope := make([][]string, len(sliceData))
for index, xString := range sliceData {
slope[index] = strings.Split(xString, "")
}
ans := calcCra... | [
0.6066765189170837,
0.39708465337753296,
0.7819990515708923,
-0.21090322732925415,
0.4306033253669739,
1.1061475276947021,
0.6457235813140869,
0.21296830475330353,
-0.4963333010673523,
0.2429712414741516,
-0.5027862191200256,
0.02932935208082199,
-0.16447822749614716,
-0.5154731273651123,
... |
func NewMetricsQueryResponse() *MetricsQueryResponse {
this := MetricsQueryResponse{}
return &this
} | [
0.48910218477249146,
-0.6087900400161743,
-0.45520415902137756,
0.36301901936531067,
-0.7092688083648682,
-0.7456334233283997,
0.4515341520309448,
-0.7900206446647644,
-0.5351786613464355,
-0.25814610719680786,
-0.4963389039039612,
-0.36374834179878235,
-0.517559289932251,
-0.5804238915443... |
func NewMetricsQueryResponseWithDefaults() *MetricsQueryResponse {
this := MetricsQueryResponse{}
return &this
} | [
0.42123663425445557,
-0.254352867603302,
-0.2922717034816742,
0.42747849225997925,
0.6612455248832703,
-0.5503026843070984,
-0.2561587393283844,
-0.7445506453514099,
-0.24639452993869781,
-0.5272163152694702,
-0.6756805181503296,
-1.518930435180664,
-0.7657977342605591,
-0.5023472309112549... |
func (o *MetricsQueryResponse) GetFromDate() int64 {
if o == nil || o.FromDate == nil {
var ret int64
return ret
}
return *o.FromDate
} | [
1.0900232791900635,
0.643079400062561,
0.36868181824684143,
0.9234934449195862,
-0.5966911911964417,
-0.23825189471244812,
-0.05540754273533821,
-0.27495819330215454,
0.540837824344635,
-1.1187996864318848,
0.41278934478759766,
-0.2440185844898224,
-1.002456784248352,
0.8401132822036743,
... |
func (o *MetricsQueryResponse) GetFromDateOk() (*int64, bool) {
if o == nil || o.FromDate == nil {
return nil, false
}
return o.FromDate, true
} | [
0.2813572585582733,
0.28125089406967163,
0.6299501657485962,
0.7033026814460754,
-1.0788079500198364,
0.5352755784988403,
0.2916002571582794,
0.49846798181533813,
-0.3865010440349579,
-0.0735977292060852,
-0.8216688632965088,
-0.3617470860481262,
-0.23401549458503723,
0.91971755027771,
-... |
func (o *MetricsQueryResponse) HasFromDate() bool {
if o != nil && o.FromDate != nil {
return true
}
return false
} | [
1.3302946090698242,
0.11426423490047455,
0.286619633436203,
0.10728315263986588,
-0.15260270237922668,
-0.09280001372098923,
-0.5906041264533997,
-0.10886059701442719,
-0.04214382544159889,
-0.9094323515892029,
-0.3208911418914795,
-0.4196438193321228,
-0.7189364433288574,
0.55997210741043... |
func (o *MetricsQueryResponse) SetFromDate(v int64) {
o.FromDate = &v
} | [
0.7482695579528809,
0.25236570835113525,
-0.28640449047088623,
0.4306887984275818,
-1.1076666116714478,
-0.0666610449552536,
-0.30067187547683716,
-1.4100791215896606,
-0.06189833581447601,
-0.21075884997844696,
0.7397552132606506,
0.9545372128486633,
-0.23667915165424347,
-0.1280741095542... |
func (o *MetricsQueryResponse) GetGroupBy() []string {
if o == nil || o.GroupBy == nil {
var ret []string
return ret
}
return o.GroupBy
} | [
0.433459997177124,
0.13620276749134064,
0.28687912225723267,
0.8844698071479797,
0.9514796137809753,
-0.24150438606739044,
0.6320317387580872,
-0.4691997766494751,
0.1554698646068573,
-0.1174323558807373,
0.24085259437561035,
-0.204222172498703,
-0.6050841808319092,
0.3116697371006012,
0... |
func (o *MetricsQueryResponse) GetGroupByOk() (*[]string, bool) {
if o == nil || o.GroupBy == nil {
return nil, false
}
return &o.GroupBy, true
} | [
0.4485573470592499,
0.25765880942344666,
0.4893517792224884,
0.7281053066253662,
-0.023170217871665955,
-0.2580541670322418,
0.6556670069694519,
-0.39442622661590576,
-0.7931561470031738,
1.09333074092865,
-1.0943773984909058,
-0.9903906583786011,
0.016284601762890816,
0.6101599931716919,
... |
func (o *MetricsQueryResponse) HasGroupBy() bool {
if o != nil && o.GroupBy != nil {
return true
}
return false
} | [
0.5723986625671387,
0.30256885290145874,
0.288451611995697,
0.496316522359848,
0.8777101039886475,
-0.7734142541885376,
0.4182749092578888,
-0.028170598670840263,
-0.7783552408218384,
-0.23139309883117676,
-0.33942994475364685,
-1.335907220840454,
-0.688244104385376,
0.33375293016433716,
... |
func (o *MetricsQueryResponse) SetGroupBy(v []string) {
o.GroupBy = v
} | [
-0.2899179756641388,
0.014486078172922134,
-0.15760384500026703,
0.5645762085914612,
0.23031416535377502,
-0.11495380848646164,
0.5009070634841919,
-0.8319791555404663,
-0.4307786524295807,
0.5719727277755737,
-0.2627011239528656,
-0.12638896703720093,
-0.4288542866706848,
0.39297568798065... |
func (o *MetricsQueryResponse) GetMessage() string {
if o == nil || o.Message == nil {
var ret string
return ret
}
return *o.Message
} | [
0.3890799582004547,
0.6578677892684937,
0.05717053264379501,
0.8526872992515564,
0.6311792731285095,
-0.46386831998825073,
0.3258247375488281,
-0.6501410603523254,
0.62381511926651,
-0.32401618361473083,
1.0579584836959839,
-1.7270073890686035,
-1.0109310150146484,
0.7817180752754211,
0.... |
func (o *MetricsQueryResponse) GetMessageOk() (*string, bool) {
if o == nil || o.Message == nil {
return nil, false
}
return o.Message, true
} | [
0.1999226212501526,
0.30037686228752136,
0.423329621553421,
0.3538464307785034,
0.4143148958683014,
0.06204943731427193,
0.6222561597824097,
0.45555251836776733,
0.017670920118689537,
0.6705449223518372,
0.007884155958890915,
-1.021604299545288,
-0.059982750564813614,
1.175521731376648,
... |
func (o *MetricsQueryResponse) HasMessage() bool {
if o != nil && o.Message != nil {
return true
}
return false
} | [
0.4108129143714905,
0.9168620705604553,
-0.02007315680384636,
0.3730030357837677,
0.9089077115058899,
-0.32627806067466736,
-0.17010536789894104,
0.039937157183885574,
0.05738261714577675,
-0.8492266535758972,
0.4206236004829407,
-1.1641167402267456,
-0.6969420909881592,
0.7169188261032104... |
func (o *MetricsQueryResponse) SetMessage(v string) {
o.Message = &v
} | [
0.20285910367965698,
0.5394735336303711,
-0.4439580738544464,
0.03838657587766647,
-0.21065577864646912,
-0.27535268664360046,
-0.4915498197078705,
-1.1837366819381714,
-0.2762952446937561,
-0.34313544631004333,
0.9421032667160034,
0.19506339728832245,
-0.9293642044067383,
-0.2879700064659... |
func (o *MetricsQueryResponse) GetQuery() string {
if o == nil || o.Query == nil {
var ret string
return ret
}
return *o.Query
} | [
0.8074651956558228,
0.3868706226348877,
-0.11887205392122269,
0.8023623824119568,
0.02103506773710251,
-0.4378516376018524,
-0.010511709377169609,
-0.6052200198173523,
1.084841012954712,
-0.6132896542549133,
0.6116398572921753,
-1.4489564895629883,
-0.5818349123001099,
0.22706174850463867,... |
func (o *MetricsQueryResponse) GetQueryOk() (*string, bool) {
if o == nil || o.Query == nil {
return nil, false
}
return o.Query, true
} | [
0.6778489351272583,
-0.06561346352100372,
0.15873919427394867,
-0.27559518814086914,
0.03946498781442642,
0.24936139583587646,
0.46261581778526306,
0.5084540247917175,
0.3545944094657898,
0.37781697511672974,
-0.4248235523700714,
-0.6609559059143066,
0.10305722802877426,
0.1944429874420166... |
func (o *MetricsQueryResponse) HasQuery() bool {
if o != nil && o.Query != nil {
return true
}
return false
} | [
0.9429910182952881,
0.04060155153274536,
-0.17778721451759338,
0.4174862504005432,
0.6412346363067627,
-0.1907755732536316,
-0.48690223693847656,
-0.13831964135169983,
0.7012420296669006,
-1.035805106163025,
0.1314607560634613,
-1.1768951416015625,
-0.01663309335708618,
-0.0634416416287422... |
func (o *MetricsQueryResponse) SetQuery(v string) {
o.Query = &v
} | [
0.8298148512840271,
-0.17956510186195374,
-0.7738444209098816,
0.42959198355674744,
-0.8087677359580994,
-0.07882657647132874,
-0.8876388072967529,
-0.9698978066444397,
0.33762431144714355,
-0.3035096228122711,
0.3003687262535095,
0.25419536232948303,
-0.28019028902053833,
-0.9509056806564... |
func (o *MetricsQueryResponse) GetResType() string {
if o == nil || o.ResType == nil {
var ret string
return ret
}
return *o.ResType
} | [
0.8002587556838989,
0.4717983603477478,
0.23925454914569855,
0.7690528035163879,
0.6359239816665649,
-0.412908673286438,
0.2592104971408844,
-0.3506719172000885,
0.8525596857070923,
-0.339307576417923,
-0.4331197738647461,
-1.1512093544006348,
-1.3862102031707764,
-0.027121614664793015,
... |
func (o *MetricsQueryResponse) GetResTypeOk() (*string, bool) {
if o == nil || o.ResType == nil {
return nil, false
}
return o.ResType, true
} | [
0.1417495459318161,
0.1865595132112503,
0.6273138523101807,
0.8092957139015198,
0.5337410569190979,
0.06250938773155212,
0.6447056531906128,
0.42034369707107544,
-0.04154140502214432,
1.2022569179534912,
-0.8987430930137634,
-0.7440980672836304,
-0.8164897561073303,
0.0015449231723323464,
... |
func (o *MetricsQueryResponse) HasResType() bool {
if o != nil && o.ResType != nil {
return true
}
return false
} | [
0.9046990275382996,
0.7077333927154541,
0.2033309042453766,
0.02095748297870159,
1.2175041437149048,
-0.9425898790359497,
-0.3415604829788208,
0.17386376857757568,
0.2612829804420471,
-0.4104042947292328,
-1.16785728931427,
-0.9797825217247009,
-0.7945989370346069,
0.25589263439178467,
0... |
func (o *MetricsQueryResponse) SetResType(v string) {
o.ResType = &v
} | [
0.9065619111061096,
0.3471827208995819,
-0.38864538073539734,
-0.06013379618525505,
-0.11014511436223984,
-0.20982666313648224,
-0.6683515906333923,
-0.9846363663673401,
-0.09760825335979462,
0.07525695860385895,
-0.11088809370994568,
0.628711998462677,
-0.9292876720428467,
-0.716914772987... |
func (o *MetricsQueryResponse) GetSeries() []MetricsQueryMetadata {
if o == nil || o.Series == nil {
var ret []MetricsQueryMetadata
return ret
}
return o.Series
} | [
0.2973560392856598,
0.5153265595436096,
-0.015879103913903236,
0.7686739563941956,
1.6146478652954102,
0.5908790826797485,
0.6068155169487,
-0.6334733366966248,
1.0476655960083008,
-0.7709428668022156,
0.6054747700691223,
0.23827452957630157,
-0.20815978944301605,
-0.6858985424041748,
-0... |
func (o *MetricsQueryResponse) GetSeriesOk() (*[]MetricsQueryMetadata, bool) {
if o == nil || o.Series == nil {
return nil, false
}
return &o.Series, true
} | [
0.26041901111602783,
0.10248417407274246,
0.20584633946418762,
0.8924498558044434,
-0.0561811737716198,
-0.010443652980029583,
0.9846665859222412,
0.05576656758785248,
0.34665828943252563,
0.38163337111473083,
-0.4859214127063751,
0.7191340327262878,
0.19180400669574738,
-0.334116697311401... |
func (o *MetricsQueryResponse) HasSeries() bool {
if o != nil && o.Series != nil {
return true
}
return false
} | [
0.449835866689682,
0.6728081703186035,
-0.30741462111473083,
-0.2098667025566101,
0.8538365364074707,
-0.4919314384460449,
-0.13183698058128357,
-0.2034517079591751,
0.8893305659294128,
-1.6573795080184937,
0.2307654321193695,
-0.7558902502059937,
0.003949380945414305,
-0.13177359104156494... |
func (o *MetricsQueryResponse) SetSeries(v []MetricsQueryMetadata) {
o.Series = v
} | [
-0.4057222604751587,
0.2420167624950409,
-0.29967445135116577,
0.3528667688369751,
0.7506510019302368,
0.7438108921051025,
-0.05332454293966293,
-0.877511739730835,
0.11351200938224792,
-0.10574562847614288,
0.09472006559371948,
0.42669478058815,
0.18129867315292358,
-0.5670296549797058,
... |
func (o *MetricsQueryResponse) GetStatus() string {
if o == nil || o.Status == nil {
var ret string
return ret
}
return *o.Status
} | [
0.8965510129928589,
0.10707147419452667,
-0.09990030527114868,
0.7276766300201416,
-0.04205648973584175,
-0.18370425701141357,
0.5719364881515503,
-0.053438592702150345,
0.9903414845466614,
-0.6510083079338074,
-0.06862055510282516,
-0.9946974515914917,
-0.18128855526447296,
0.154048442840... |
func (o *MetricsQueryResponse) GetStatusOk() (*string, bool) {
if o == nil || o.Status == nil {
return nil, false
}
return o.Status, true
} | [
-0.286883682012558,
0.9131222367286682,
0.25305497646331787,
0.896281898021698,
0.03122643008828163,
-0.3295179009437561,
0.6297596096992493,
0.8935908079147339,
-0.033902235329151154,
0.00400161137804389,
-1.2576223611831665,
-0.17666399478912354,
0.8101888298988342,
0.06039447709918022,
... |
func (o *MetricsQueryResponse) HasStatus() bool {
if o != nil && o.Status != nil {
return true
}
return false
} | [
0.6199876070022583,
-0.09986600279808044,
0.045962464064359665,
0.38165029883384705,
0.5357702970504761,
-0.02695869281888008,
-0.09895298629999161,
0.9266508221626282,
0.5386795997619629,
-0.8570452332496643,
-1.0680569410324097,
-0.836767852306366,
0.15197762846946716,
-0.007172699552029... |
func (o *MetricsQueryResponse) SetStatus(v string) {
o.Status = &v
} | [
0.8876120448112488,
-0.2109948843717575,
-0.49644356966018677,
-0.05706711485981941,
-1.2458891868591309,
0.30137211084365845,
-0.49802279472351074,
-0.4748634696006775,
0.11880215257406235,
-0.18804815411567688,
-0.25696825981140137,
0.9582700729370117,
-0.1174977719783783,
-0.87559854984... |
func (o *MetricsQueryResponse) GetToDate() int64 {
if o == nil || o.ToDate == nil {
var ret int64
return ret
}
return *o.ToDate
} | [
0.629930317401886,
0.8156585693359375,
0.4167410135269165,
0.7990659475326538,
0.17215502262115479,
-0.4461109936237335,
0.11749260872602463,
-0.35627761483192444,
0.5560461282730103,
-0.498963862657547,
0.21038329601287842,
-1.4131935834884644,
-0.7934393286705017,
0.2977626621723175,
0... |
func (o *MetricsQueryResponse) GetToDateOk() (*int64, bool) {
if o == nil || o.ToDate == nil {
return nil, false
}
return o.ToDate, true
} | [
-0.15550358593463898,
0.6726762652397156,
0.7435044050216675,
0.9174962639808655,
-0.21723461151123047,
0.6365349888801575,
0.46941256523132324,
0.6003254055976868,
-0.03998417779803276,
0.804792046546936,
-0.7035641074180603,
-1.306639552116394,
0.32635173201560974,
0.34244102239608765,
... |
func (o *MetricsQueryResponse) HasToDate() bool {
if o != nil && o.ToDate != nil {
return true
}
return false
} | [
0.8780313730239868,
0.6459224820137024,
0.17961692810058594,
-0.06420142948627472,
0.6156158447265625,
-0.2106272280216217,
-0.6409067511558533,
-0.01749590039253235,
-0.23922012746334076,
-0.2903224229812622,
-0.08332038670778275,
-1.5243018865585327,
-0.31924518942832947,
0.2963202297687... |
func (o *MetricsQueryResponse) SetToDate(v int64) {
o.ToDate = &v
} | [
0.4925327003002167,
0.5692541003227234,
-0.31767037510871887,
0.27687323093414307,
-0.6637281179428101,
-0.13562582433223724,
-0.22285331785678864,
-1.488316535949707,
-0.11082596331834793,
0.3250795006752014,
0.5914288759231567,
0.009695603512227535,
-0.05090456083416939,
-0.3203900456428... |
func (o MetricsQueryResponse) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.UnparsedObject != nil {
return json.Marshal(o.UnparsedObject)
}
if o.Error != nil {
toSerialize["error"] = o.Error
}
if o.FromDate != nil {
toSerialize["from_date"] = o.FromDate
}
if o.GroupBy != nil... | [
0.2943156957626343,
-1.002701759338379,
0.10633231699466705,
-0.7970972061157227,
-0.11642179638147354,
-0.2708527147769928,
0.3651494085788727,
-0.5175732374191284,
-0.2469855397939682,
-0.05319124832749367,
-0.12808360159397125,
0.5527286529541016,
-0.11571884155273438,
-0.35516858100891... |
func (o *MetricsQueryResponse) UnmarshalJSON(bytes []byte) (err error) {
raw := map[string]interface{}{}
all := struct {
Error *string `json:"error,omitempty"`
FromDate *int64 `json:"from_date,omitempty"`
GroupBy []string `json:"group_by,omitempty"`
Message *s... | [
0.1453297734260559,
-0.5439971089363098,
0.498509019613266,
-1.3304506540298462,
-0.2197895050048828,
0.07190804928541183,
0.4857163727283478,
-0.43018990755081177,
-0.8194651007652283,
0.19223888218402863,
-0.31575217843055725,
0.0386170819401741,
-0.43645066022872925,
-0.4687613248825073... |
func App() *kingpin.Application {
return app
} | [
1.3642213344573975,
-0.7414203882217407,
0.23786456882953644,
1.606364369392395,
-0.36979010701179504,
1.0143251419067383,
0.49839431047439575,
-0.38277027010917664,
0.46449071168899536,
-0.21165397763252258,
-0.014990922063589096,
0.31312867999076843,
-0.08742879331111908,
-0.204456344246... |
func PublishRegisteredInputs(
inputs []*types.InputDiscoveryMessage,
messageSigner *messaging.MessageSigner) {
// publish updated registered inputs
for _, input := range inputs {
logrus.Infof("PublishRegisteredInputs: publish input discovery: %s", input.Address)
// no encryption as this is for everyone to see
... | [
-1.0054152011871338,
-0.32842251658439636,
0.4452860653400421,
0.978718101978302,
0.2512560188770294,
0.6526245474815369,
1.1534912586212158,
0.541167140007019,
0.319913387298584,
0.002635420300066471,
-0.3002094328403473,
0.2886063754558563,
-0.8328173160552979,
1.6716651916503906,
-0.1... |
func (p Params) Marshal() ([]byte, error) {
return asn1.Marshal(p)
} | [
0.4608128070831299,
0.49321043491363525,
0.22376979887485504,
0.35055607557296753,
-0.11000219732522964,
0.6553335189819336,
-1.230499029159546,
0.3139321208000183,
-0.262845516204834,
-0.2249925285577774,
0.017813069745898247,
1.2184183597564697,
-0.3894539773464203,
1.0121921300888062,
... |
func UnmarshalParams(d []byte) (pubKey *signkeys.PublicKey, pubParams *jjm.BlindingParamClient, privateParams []byte, canReissue bool, err error) {
p := new(Params)
_, err = asn1.Unmarshal(d, p)
if err != nil {
return nil, nil, nil, false, err
}
pubkey, err := new(signkeys.PublicKey).Unmarshal(p.PublicKey)
if e... | [
-0.47161704301834106,
0.348568856716156,
0.6392719745635986,
-0.6626405119895935,
-0.9247865676879883,
-0.30113622546195984,
-0.19504734873771667,
0.43440794944763184,
-0.3695160448551178,
1.063917636871338,
-0.1254359781742096,
0.11429935693740845,
-0.2758035361766815,
0.4461764097213745,... |
func (p ReissuePacket) Marshal() ([]byte, error) {
return asn1.Marshal(p)
} | [
0.2634144425392151,
1.1988794803619385,
0.37547993659973145,
-0.29140469431877136,
-0.7789300084114075,
0.3114715814590454,
-1.4825639724731445,
0.7506644129753113,
0.3647223711013794,
-0.7980833649635315,
-0.21684180200099945,
1.879273772239685,
-0.17408134043216705,
0.4385766088962555,
... |
func (p *ReissuePacket) Unmarshal(d []byte) (*ReissuePacket, error) {
if p == nil {
p = new(ReissuePacket)
}
_, err := asn1.Unmarshal(d, p)
if err != nil {
return nil, err
}
return p, nil
} | [
-0.7757918238639832,
1.8907816410064697,
0.6497970819473267,
-0.8337178230285645,
-1.3243200778961182,
-0.07170940935611725,
-0.14152143895626068,
1.1827704906463623,
0.5794355273246765,
-0.36037546396255493,
0.06859228014945984,
0.9297564625740051,
-0.009289206936955452,
0.115228474140167... |
func (p ReissuePacket) Hash() [sha256.Size]byte {
return sha256.Sum256(p.Image())
} | [
0.6604968309402466,
0.3041438162326813,
0.3413447439670563,
-0.6752519607543945,
-0.1346336007118225,
0.1522224098443985,
-0.3186168968677521,
0.858542263507843,
0.5515255331993103,
-0.602705717086792,
-0.6258638501167297,
1.2386995553970337,
-0.5145291090011597,
0.43404170870780945,
0.2... |
func (p ReissuePacket) Image() []byte {
calltype := make([]byte, 8)
binary.BigEndian.PutUint32(calltype, uint32(p.CallType))
image := make([]byte, 0, sha256.Size*3)
h := sha256.Sum256(append(calltype, p.Token...))
image = append(image, h[:]...)
h = sha256.Sum256(p.BlindToken)
image = append(image, h[:]...)
h = ... | [
-0.4435308277606964,
0.4901677370071411,
0.6646520495414734,
-0.7956421971321106,
-0.16540265083312988,
0.020955365151166916,
-1.3253896236419678,
-0.09719046205282211,
0.21500863134860992,
0.6714593768119812,
-0.3490818440914154,
0.3462713658809662,
-0.8942807912826538,
0.3120937943458557... |
func (p ReissuePacket) Verify(pubkey *[ed25519.PublicKeySize]byte) error {
if len(p.Signature) != 1 && pubkey == nil { // Packet is signed but no public key is givem
return ErrSignerNeeded
}
if len(p.Signature) == 1 && pubkey == nil { // Packet is not signed
return nil
}
ok := ed25519.Verify(pubkey[:], p.Image... | [
0.02210831083357334,
0.47837772965431213,
0.534734308719635,
0.2020481526851654,
-0.24809548258781433,
-0.44370612502098083,
-0.2664477527141571,
0.39447373151779175,
0.8645780086517334,
0.002493632957339287,
-1.0393471717834473,
0.8349325656890869,
-0.7507728934288025,
1.343906283378601,
... |
func (r ReissuePacketPrivate) Marshal() ([]byte, error) {
return asn1.Marshal(r)
} | [
-0.08353032171726227,
1.2061452865600586,
0.289623498916626,
-0.28247714042663574,
-0.908397912979126,
0.05734612047672272,
-1.5111570358276367,
0.33386242389678955,
0.3580237329006195,
-0.8112208247184753,
-0.7362484931945801,
1.8206077814102173,
-0.032933834940195084,
0.3333805501461029,... |
func (r *ReissuePacketPrivate) Unmarshal(d []byte) (*ReissuePacketPrivate, error) {
if r == nil {
r = new(ReissuePacketPrivate)
}
_, err := asn1.Unmarshal(d, r)
if err != nil {
return nil, err
}
return r, nil
} | [
-1.0868887901306152,
2.043917655944824,
0.4659501910209656,
-1.031697392463684,
-1.3450027704238892,
-0.29676494002342224,
-0.5487463474273682,
0.935774564743042,
0.3673059344291687,
-0.2793457508087158,
-0.5506146550178528,
0.6615292429924011,
0.03883009031414986,
-0.18845751881599426,
... |
func (s *SpendPacket) Image() []byte {
calltype := make([]byte, 8)
binary.BigEndian.PutUint32(calltype, uint32(s.CallType))
h := sha256.Sum256(append(calltype, s.Token...))
return h[:]
} | [
-0.8326206207275391,
0.7049292922019958,
0.5346444249153137,
-0.5023893713951111,
-0.12394391000270844,
-0.13657324016094208,
-1.3096225261688232,
-0.9272719025611877,
0.8006475567817688,
1.0183771848678589,
-0.6228692531585693,
0.050491318106651306,
-1.218907356262207,
0.23029236495494843... |
func (s SpendPacket) Marshal() ([]byte, error) {
return asn1.Marshal(s)
} | [
-0.07888197153806686,
0.9036416411399841,
0.3710514008998871,
-0.2949233949184418,
-0.4497362971305847,
-0.1745385080575943,
-0.6798367500305176,
-0.16539426147937775,
0.9222768545150757,
-0.1782088726758957,
-0.28244489431381226,
1.3470317125320435,
-0.47816795110702515,
0.348007559776306... |
func (s *SpendPacket) Unmarshal(d []byte) (*SpendPacket, error) {
if s == nil {
s = new(SpendPacket)
}
_, err := asn1.Unmarshal(d, s)
if err != nil {
return nil, err
}
return s, nil
} | [
-0.7560201287269592,
1.1956716775894165,
0.7810496687889099,
-0.9105976819992065,
-0.9579144716262817,
-0.2893122434616089,
0.5461286306381226,
0.20873306691646576,
0.8727262020111084,
0.4467536509037018,
-0.009866413660347462,
0.35256850719451904,
-0.4249767065048218,
0.05965609848499298,... |
func (r *GenericResponse) WriteResponse(w http.ResponseWriter) {
if r.Headers == nil {
r.Headers = make(map[string]string)
}
// Headers
if r.MimeContent != nil {
r.Headers["Content-Type"] = r.MimeContent.MimeType
if len(r.MimeContent.Filename) > 0 {
// Does not support UTF-8 or spaces in filename
r.Head... | [
-0.8616611361503601,
-1.6981580257415771,
0.6443028450012207,
-0.3526398539543152,
0.609117329120636,
-0.6096781492233276,
0.20786535739898682,
-0.3258635699748993,
0.04089806601405144,
0.15926040709018707,
-0.08109914511442184,
-0.7230181097984314,
-0.3901784420013428,
-0.1870856434106826... |
func BasicDecodeRequest(ctx context.Context, req *http.Request) (interface{}, error) {
return DecodeRequestWithHeaders(ctx, req, map[string]string{}, map[string]string{}, nil)
} | [
-1.350534200668335,
-0.9849051237106323,
0.7338933944702148,
-0.2698202133178711,
-0.4598744511604309,
-0.5438752174377441,
-1.918877124786377,
-0.9801976680755615,
-0.28105783462524414,
-1.0067939758300781,
0.14514721930027008,
0.09853273630142212,
0.06483040750026703,
0.441292405128479,
... |
func DecodeRequest(ctx context.Context, req *http.Request, pathParams map[string]string, queryParams map[string]string) (interface{}, error) {
return DecodeRequestWithHeaders(ctx, req, pathParams, queryParams, nil)
} | [
-0.9960147142410278,
-0.5201965570449829,
0.6527773141860962,
0.0203445665538311,
-0.011844017542898655,
-0.015686247497797012,
-0.5462536811828613,
-0.5087191462516785,
-0.3421044945716858,
-0.7123411893844604,
0.36692923307418823,
0.13798946142196655,
-0.014502951875329018,
0.35501751303... |
func DecodeRequestWithHeaders(_ context.Context, req *http.Request, pathParams map[string]string, queryParams map[string]string, headers []string) (interface{}, error) {
var request = map[string]string{}
// Fetch and validate path parameter such as realm, userID, ...
var m = mux.Vars(req)
for key, validationRegExp... | [
-0.6988953351974487,
-1.1845940351486206,
0.8878192901611328,
-0.35934239625930786,
-0.7779123783111572,
-0.39208024740219116,
-0.8377909064292908,
-1.1161843538284302,
-0.44095221161842346,
-0.17532993853092194,
0.48517873883247375,
-0.027997516095638275,
-0.19698458909988403,
0.227566212... |
func EncodeReply(_ context.Context, w http.ResponseWriter, rep interface{}) error {
if rep == nil {
w.WriteHeader(http.StatusOK)
return nil
}
switch e := rep.(type) {
case GenericResponse:
e.WriteResponse(w)
case StatusCreated:
if e.Location != "" {
w.Header().Set("Location", e.Location)
}
w.WriteH... | [
-0.896377682685852,
-0.20959988236427307,
0.6956919431686401,
-0.34246358275413513,
-0.145232155919075,
-0.21718281507492065,
-0.26049545407295227,
-0.22415927052497864,
1.413185715675354,
0.6274105310440063,
0.10390132665634155,
0.38718655705451965,
-0.30076825618743896,
0.228260084986686... |
func IsPangram(s string) bool {
alpha := make([]bool, 26)
for _, c := range s {
q := c - 'a'
if q < 0 {
q += 32
}
if 0 <= q && q < 26 {
alpha[q] = true
}
}
for _, b := range alpha {
if !b {
return false
}
}
return true
} | [
-0.3385428786277771,
-0.0006066468195058405,
0.7467745542526245,
0.48512354493141174,
-1.0177215337753296,
0.4684459865093231,
-0.12150818109512329,
0.13062813878059387,
1.2451263666152954,
0.4517110586166382,
-1.1359944343566895,
-0.16183413565158844,
-0.8617578744888306,
-0.0606988966464... |
func (m *Trigger) VerboseName() string {
return "Trigger"
} | [
0.8194248080253601,
-0.3766676187515259,
0.4518750011920929,
0.38016965985298157,
-0.19469581544399261,
-0.3206251561641693,
-0.17204438149929047,
0.354231059551239,
0.03840528801083565,
1.1104915142059326,
-0.2944774627685547,
-0.05004606023430824,
0.022750020027160645,
0.1914054453372955... |
func Generate(dir string, varConfName string) {
t, dirPath := gatherVars(dir, varConfName)
output(t, dirPath)
} | [
-0.28283047676086426,
-0.07900947332382202,
0.21458853781223297,
0.21606093645095825,
-0.527068555355072,
-0.16751179099082947,
0.5857016444206238,
0.39531242847442627,
-1.1555691957473755,
0.3664095103740692,
-0.8100322484970093,
0.023675402626395226,
0.8386547565460205,
0.473224014043808... |
func autoCreateDirectory() {
// Update file directory path
FileSubDir = time.Now().Format("2006/01/02")
// Update and create a new log directory and log file
createLogFile()
timeOfEarlyMorningToday := time.Now().Truncate(24 * time.Hour)
// Set a timer, triggered when a new day coming
timer := time.NewTimer(time... | [
-0.4636096954345703,
-0.6693729758262634,
0.7980278134346008,
0.5787597298622131,
0.32247206568717957,
0.029812408611178398,
0.5931509733200073,
-0.3623594045639038,
-0.4963076710700989,
-1.0293291807174683,
-0.20604462921619415,
0.21024227142333984,
0.7627734541893005,
1.2901967763900757,... |
func TestDefaultHandler(t *testing.T) {
Handlers.Add(fakeHandler(""))
counter = 0
err := New().WithMessage("internal errors").Err()
if err == nil {
t.Error("expected not nil, got nil")
}
time.Sleep(time.Second)
if counter != 1 {
t.Error("counter not 1", "handler not called")
}
Handlers = newErrorHandlers... | [
-0.16191159188747406,
0.8670531511306763,
0.4652473032474518,
0.460174024105072,
0.732346773147583,
0.6182118654251099,
0.505526065826416,
0.38146016001701355,
0.33397921919822693,
-0.9193841814994812,
-0.7568193078041077,
0.3017502427101135,
-1.075940728187561,
0.7981047630310059,
0.417... |
func (kv *KVPaxos) kill() {
kv.dead = true
kv.l.Close()
kv.px.Kill()
} | [
-0.4280208945274353,
-0.573969841003418,
0.2582342028617859,
0.9708145260810852,
-0.3272095024585724,
1.690397024154663,
-1.2796319723129272,
0.5572518706321716,
-0.4790586829185486,
0.5213423371315002,
-0.03569053113460541,
-0.47400420904159546,
0.5724201798439026,
-0.3425077199935913,
... |
func StartServer(servers []string, me int) *KVPaxos {
// this call is all that's needed to persuade
// Go's RPC library to marshall/unmarshall
// struct Op.
gob.Register(Op{})
kv := new(KVPaxos)
kv.me = me
// Your initialization code here.
kv.data = make(map[string]string)
kv.pendingRead = make(map[... | [
-0.40675976872444153,
-0.30624258518218994,
1.0321013927459717,
0.6940509080886841,
0.22587771713733673,
0.22058041393756866,
-0.9029356241226196,
0.2627006471157074,
-0.1318376511335373,
-0.6004429459571838,
-0.14233726263046265,
0.5402891039848328,
-0.7380833625793457,
0.0283356420695781... |
func (pkt *WorkPacket) Bytes() []byte {
buf := new(bytes.Buffer)
binary.Write(buf, binary.LittleEndian, pkt)
return buf.Bytes()
} | [
-0.9376167058944702,
0.16531287133693695,
0.44213008880615234,
-1.0562454462051392,
0.7181144952774048,
0.5646727681159973,
-0.938736617565155,
-1.0302215814590454,
0.7928941249847412,
-1.3804315328598022,
-1.0172019004821777,
0.08414341509342194,
-0.7221073508262634,
0.19182677567005157,
... |
func Init() {
mux.Lock()
mux.Unlock()
// soft reset DCP
reg.Set(DCP_CTRL, CTRL_SFTRST)
reg.Clear(DCP_CTRL, CTRL_SFTRST)
// enable clocks
reg.Clear(DCP_CTRL, CTRL_CLKGATE)
// enable channel 0
reg.Write(DCP_CHANNELCTRL, DCP_CHANNEL_0)
} | [
0.5291122198104858,
0.710949718952179,
0.5171799659729004,
-0.021834401413798332,
0.775996744632721,
-0.4882679283618927,
0.5221911668777466,
0.23902460932731628,
0.6324089169502258,
0.08742356300354004,
-0.5393394827842712,
0.32451316714286804,
-0.37875646352767944,
0.2743273377418518,
... |
func (p *Parser) Parse(r dio.ReadSeekerAt) ([]types.Library, []types.Dependency, error) {
info, err := buildinfo.Read(r)
if err != nil {
return nil, nil, convertError(err)
}
libs := make([]types.Library, 0, len(info.Deps))
for _, dep := range info.Deps {
// binaries with old go version may incorrectly add mo... | [
-0.8776379227638245,
-1.377733588218689,
0.53339684009552,
-0.1563349813222885,
0.44615188241004944,
0.35460907220840454,
0.09476172178983688,
-0.3461364209651947,
-0.12926580011844635,
0.13985486328601837,
0.014197029173374176,
-0.3898797631263733,
0.22065868973731995,
0.9793453812599182,... |
func Wordize(t string) []string {
return wordizeRe.Split(t, -1)
} | [
-0.9570683240890503,
0.706405758857727,
0.49936315417289734,
-0.2630782723426819,
1.0236014127731323,
-0.5434808135032654,
-0.839528501033783,
0.26985618472099304,
-0.7601652145385742,
1.5214320421218872,
-0.526060938835144,
0.2690710127353668,
-0.8339666724205017,
0.28202468156814575,
0... |
func IndexizeWord(w string) string {
return strings.TrimSpace(strings.ToLower(w))
} | [
0.47505950927734375,
-0.05937306582927704,
0.44178879261016846,
-0.5930091738700867,
-0.1687626838684082,
0.6454967856407166,
0.318743497133255,
0.04640023410320282,
0.7491821050643921,
0.46175435185432434,
0.3761688470840454,
0.13689088821411133,
-1.3497862815856934,
-0.22755984961986542,... |
func HTMLStripTags(s string) (output string) {
output = ""
// Shortcut strings with no tags in them
if !strings.ContainsAny(s, "<>") {
output = s
} else {
// First remove line breaks etc as these have no meaning outside html tags (except pre)
// this means pre sections will lose formatting... but will resu... | [
-0.1716541349887848,
-0.7445626258850098,
0.8345584273338318,
-0.43197396397590637,
-1.5081782341003418,
-1.0840576887130737,
-0.15192767977714539,
0.36489349603652954,
-0.04253653436899185,
-0.010181359946727753,
0.2636302709579468,
-0.3639044761657715,
0.3100079894065857,
0.3918730020523... |
func HTMLExtractTitle(html string) string {
tret := titlere.FindSubmatch([]byte(html))
title := ""
if len(tret) > 1 {
title = strings.TrimSpace(string(tret[1]))
}
return title
} | [
-0.23634786903858185,
0.9691667556762695,
0.649200975894928,
0.4152609407901764,
-0.5962930917739868,
-0.3567466139793396,
-0.09542377293109894,
0.4847521185874939,
0.5097855925559998,
0.5591580867767334,
-0.36082133650779724,
-0.7610730528831482,
-1.5284348726272583,
-0.43327781558036804,... |
func HTMLExtractDescription(html string) string {
tret := descre.FindSubmatch([]byte(html))
desc := ""
if len(tret) > 1 {
desc = strings.TrimSpace(string(tret[1]))
}
return desc
} | [
0.39378443360328674,
1.1001356840133667,
0.5293424129486084,
0.4093565046787262,
-0.2466975450515747,
-0.29015085101127625,
0.3379857838153839,
0.4766998291015625,
0.36322206258773804,
0.35948726534843445,
0.27415964007377625,
0.37204262614250183,
-1.084195852279663,
0.19170179963111877,
... |
func New(opts *Options) (*API, error) {
profiles, err := auth.ReadAliyunConfig(opts.ConfigPath)
if err != nil {
return nil, fmt.Errorf("couldn't read aliyun config: %v", err)
}
if opts.Profile == "" {
opts.Profile = "default"
}
profile, ok := profiles[opts.Profile]
if !ok {
return nil, fmt.Errorf("no suc... | [
-0.3857138752937317,
-0.9232684373855591,
0.6721838712692261,
-0.5734421014785767,
-0.044174760580062866,
0.4308428168296814,
-0.15519480407238007,
-0.6136945486068726,
0.020876523107290268,
0.08453331142663956,
0.03730761632323265,
-0.1182863786816597,
0.44823354482650757,
-0.358162164688... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.