Skip to content

Instantly share code, notes, and snippets.

import logging
from dataclasses import dataclass
from datetime import (
date,
datetime,
)
from enum import Enum
from typing import Dict, List, Set
import httpx
import json
import os
import openai
from dotenv import load_dotenv
load_dotenv()
openai.api_key = os.environ.get("OPENAI_API_KEY")
@danielcorin
danielcorin / gpt3_datetimes.py
Last active February 26, 2023 23:50
Datetime parsing with GPT-3
import datetime
import json
import logging
import sys
from dotenv import load_dotenv
from langchain import PromptTemplate
from langchain.llms import OpenAI
load_dotenv()

Keybase proof

I hereby claim:

  • I am danielcorin on github.
  • I am danielcorin (https://keybase.io/danielcorin) on keybase.
  • I have a public key whose fingerprint is B55F 84C7 9246 833F 1FC2 B4E6 CA42 688F A612 7B21

To claim this, I am signing this object:

@danielcorin
danielcorin / words.exs
Last active September 7, 2015 05:22
Elixir dictionary binary search
defmodule Words do
@doc """
Module for read a list of words from a text file.
Contains functions for `split`ting the list and `find`ing a word
"""
def read(filename) do
filename
|> File.read!()
|> String.split()
end