> [!INFO] foo bar
>
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
#!/usr/bin/env python3 | |
# Write a function that takes in a non-empty array of distinct integers and an integer representing a target sum. | |
# The function should find all quadruplets in the array that sum up to the target sum and return a two-dimensional | |
# array of all these quadruplets in no particular order. If no four numbers sum up to the target sum, the function | |
# should return an empty array. | |
# Sample input: [7, 6, 4, -1, 1, 2], 16 | |
# Sample output: [[7, 6, 4, -1], [7, 6, 1, 2]] |
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 transformers import AutoTokenizer, AutoModelForCausalLM, \ | |
GenerationConfig, BitsAndBytesConfig, StoppingCriteria, \ | |
TextStreamer, pipeline | |
import torch | |
class GenerateSqlStoppingCriteria(StoppingCriteria): | |
def __call__(self, input_ids, scores, **kwargs): | |
# stops when sequence "```\n" is generated |
keys = {
{
'\\',
':Neotree action=focus source=filesystem position=left toggle=true<CR>',
},
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
import os | |
import time | |
from dotenv import load_dotenv | |
from openai import OpenAI | |
load_dotenv() | |
client = OpenAI() | |
model = "gpt-4o-2024-05-13" | |
assistant = client.beta.assistants.create( |
- To visit the state of a repository under certain commit, first clone the repo without checkout:
git clone https://github.com/karpathy/build-nanogpt.git --no-checkout
This command downloads all the repository data, but does not check out the working files.
- Navigate to the directoryone should see an seemingly empty directory.