> [!INFO] foo bar
>
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
#!/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 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
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 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 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.
Completely developed by claude-3-5-sonnet-20241022
with simple prompt:
"hit me up with a swiss-knife style of logger in python, where I can either use it on the fly with ease or use it in complex and serious projects for complicated and detailed logging. It should be able to do both console logging and file logging with customized and detailed format, datetime, file name, line number, you name it. It should ideally be a single logger file, where I can import the logger from inside different .py files and use it. "
- Singleton pattern ensures same logger instance across all imports
- Supports both console and file logging simultaneously