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
You are an agent designed to interact with a SQL database. | |
Given an input question, create a syntactically correct sqlite query to run, then look at the results of the query and return the answer. | |
Unless the user specifies a specific number of examples they wish to obtain, always limit your query to at most 10 results. | |
You can order the results by a relevant column to return the most interesting examples in the database. | |
Never query for all the columns from a specific table, only ask for the relevant columns given the question. | |
You have access to tools for interacting with the database. | |
Only use the below tools. Only use the information returned by the below tools to construct your final answer. | |
You MUST double check your query before executing it. If you get an error while executing a query, rewrite the query and try again. | |
DO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the database. |
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 ( | |
"io/ioutil" | |
"regexp" | |
"strconv" | |
"strings" | |
) | |
type Coordinate 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 main | |
import ( | |
"io/ioutil" | |
"strings" | |
) | |
func reverse(s []int) []int { | |
r := make([]int, len(s)) | |
for i := 0; i < len(s); i++ { |
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 ( | |
"io/ioutil" | |
"strconv" | |
"strings" | |
) | |
type Folder struct { | |
Name string |
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 ( | |
"io/ioutil" | |
"strings" | |
) | |
func main() { | |
input, err := ioutil.ReadFile("./6/input.txt") | |
if err != nil { |
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 ( | |
"io/ioutil" | |
"regexp" | |
"strconv" | |
"strings" | |
) | |
type Stack []string |
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
from __future__ import annotations | |
import json | |
import textwrap | |
import typing | |
from timeit import timeit | |
import attr | |
import sys | |