This file contains hidden or 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
// MockDatabase provides test database functionality | |
type MockDatabase struct { | |
// Processor related mocks | |
InsertProcessorFunc func(ctx context.Context, description string, physicalCores, logicalCores int) error | |
ListProcessorsFunc func(ctx context.Context, unverifiedOnly bool) ([]database.ProcessorRecord, error) | |
// Add other mock functions as needed | |
} | |
This file contains hidden or 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 ( | |
"fmt" | |
"strings" | |
) | |
// Applicative represents a container for SVG elements that can be composed | |
type Applicative struct { | |
Elements []Element |
This file contains hidden or 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 ( | |
"fmt" | |
"net" | |
"time" | |
) | |
// TCPHandler is an interface for handling TCP connections | |
type TCPHandler interface { |
This file contains hidden or 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" | |
"database/sql" | |
"errors" | |
"testing" | |
"time" | |
) |
This file contains hidden or 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
openapi: 3.0.0 | |
info: | |
title: OpenWeather Proxy API | |
description: This API provides processed weather data from OpenWeather One Call API 3.0. | |
version: "1.0.0" | |
servers: | |
- url: http://localhost:8080/api/v1 | |
description: Development server | |
paths: | |
/weather: |
This file contains hidden or 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 ( | |
"encoding/json" | |
"fmt" | |
"gopkg.in/yaml.v3" | |
) | |
func main() { | |
yamlString := ` |
This file contains hidden or 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 ( | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"sync" | |
) | |
// URLFetcher is a type for functions that fetch from a URL. |
This file contains hidden or 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 "fmt" | |
type TreeNode struct { | |
Val int | |
Left *TreeNode | |
Right *TreeNode | |
} |
This file contains hidden or 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
import java.util.ArrayList; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.Objects; | |
import java.util.Optional; | |
import java.util.Set; | |
class Node { | |
private final int id; | |
Set<Node> adj = new HashSet<>(); |
This file contains hidden or 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
import java.util.ArrayDeque; | |
import java.util.HashSet; | |
import java.util.Objects; | |
import java.util.Optional; | |
import java.util.Queue; | |
import java.util.Set; | |
import java.util.Timer; | |
import java.util.TimerTask; | |
class EventListener { |
NewerOlder