This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id | price | name | |
---|---|---|---|
0 | 12345 | abacaba | |
0 | 12345 | cabaaba | |
1 | 54321 | wtf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// can you simplify this handler's logic? it seems to be overcomplex | |
package caldav | |
type propfindHandler struct { | |
pf *propfinder | |
logger *slog.Logger | |
fetchPeriod trn.Range | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local nav = require("navigation") | |
local Bot = { | |
pos = { x = 0, y = 0, z = 0 }, | |
facing = nav.DIRECTION.NORTH, | |
init = function(self, pos, direction) | |
self.pos = pos | |
self.facing = direction | |
end, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package misc | |
// Queue is an implementation of the list data structure, | |
// it is a FIFO (first in, first out) data structure over a slice. | |
type Queue[T any] struct { | |
l []T | |
idx int | |
end int | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package misc | |
// Queue is an implementation of the list data structure, | |
// it is a FIFO (first in, first out) data structure over a slice. | |
type Queue[T any] struct { | |
l []T | |
idx int | |
} | |
// NewQueue returns a new Queue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package exampleservice | |
import ( | |
"context" | |
api "prototemporal/_example/simple/api" | |
"go.temporal.io/sdk/temporal" | |
"go.temporal.io/sdk/workflow" | |
) | |
type ExampleService struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tmiddleware | |
import ( | |
"context" | |
"fmt" | |
"go.temporal.io/sdk/client" | |
"go.temporal.io/sdk/interceptor" | |
"google.golang.org/grpc/metadata" | |
"github.com/cappuccinotm/prototemporal/tmiddleware/overengineered" | |
"regexp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"net/http" | |
"time" | |
"github.com/aws/aws-sdk-go/aws" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bot | |
// Run starts service until context is dead. | |
func (b *Bot) Run(ctx context.Context) error { | |
if err := b.notifyAdmins(ctx, "bot started"); err != nil { | |
return fmt.Errorf("send start message to admins: %w", err) | |
} | |
wg := &sync.WaitGroup{} | |
wg.Add(b.Workers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package _example | |
import ( | |
"context" | |
_ "embed" | |
"fmt" | |
"regexp" | |
"strings" | |
"testing" | |
"time" |
NewerOlder