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
diff --git a/assets/javascript/site.js b/assets/javascript/site.js | |
index a34accb4..32ded7dc 100644 | |
--- a/assets/javascript/site.js | |
+++ b/assets/javascript/site.js | |
@@ -3,3 +3,5 @@ | |
import 'htmx.org'; | |
import './htmx'; | |
import './alpine'; | |
+import 'flowbite'; | |
+import 'flowbite/dist/datepicker'; |
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
diff --git a/apps/chat/consumers.py b/apps/chat/consumers.py | |
index cf792d9e..a4963491 100644 | |
--- a/apps/chat/consumers.py | |
+++ b/apps/chat/consumers.py | |
@@ -1,4 +1,5 @@ | |
import json | |
+import uuid | |
from channels.generic.websocket import WebsocketConsumer | |
from django.conf import settings |
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
# this is the core translation code from https://www.youtube.com/watch?v=2ItlnKhe37U | |
# It uses the OpenAI API to translate messages from one language to another. | |
import dataclasses | |
from typing import List | |
from django.conf import settings | |
from openai import OpenAI | |
from apps.translations.models import InputText, Language |
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
def clean_and_parse_json_with_ai(json_string: str, openai_key: str): | |
clean_json_fn = { | |
"name": "clean_json", | |
"description": "Cleans JSON.", | |
"parameters": { | |
"type": "object", | |
"properties": { | |
"clean_json": { | |
"type": "string", | |
"description": "The cleaned JSON.", |
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
{ | |
"name": "answer_and_sources", | |
"description": "Gets an answer and cites the relevant sources used to provide the answer.", | |
"parameters": { | |
"type": "object", | |
"properties": { | |
"answer": { | |
"type": "string", | |
"description": "The answer to the user's question.", | |
}, |
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
# see https://www.youtube.com/watch?v=CsFpVdgEXCU for details of what this does | |
from typing import List | |
from langchain import ConversationChain | |
from langchain.chat_models import ChatOpenAI | |
from langchain.indexes.vectorstore import VectorStoreIndexWrapper | |
from langchain.memory import ConversationBufferMemory | |
from langchain.prompts import ( | |
ChatPromptTemplate, |
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
{% extends "portal_base.html" %} | |
{% load staticfiles %} | |
{% block title %} Payment {% endblock %} | |
{% block content %} | |
<div class="dashboard-interactions"> | |
<div class="interactions-wrap full-width"> | |
<div class="interactions-panel"> |
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
use_bpm 95 | |
# main guitar riff | |
mini_riff_1 = [:b4, :e4, :g4, :b4] | |
mini_riff_2 = [:g4, :b3, :e4, :g4] | |
mini_riff_3 = [:a4, :c4, :gb4, :a4] | |
mini_riff_4 = [:gb4, :b3, :d4, :gb4] | |
mini_riff_5 = [:c5, :gb4, :a4, :c5] |
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
corehq/apps/accounting/bootstrap/utils.py :: | |
corehq/apps/accounting/forms.py :: | |
corehq/apps/accounting/models.py :: | |
corehq/apps/accounting/payment_handlers.py :: | |
corehq/apps/accounting/static/accounting/js/invoices.js :: | |
15a3bebbd8c (Daniel Roberts 2016-06-29 17:51:44 -0400 12) // todo: use a more specific identifier to make less brittle | |
corehq/apps/accounting/subscription_changes.py :: | |
corehq/apps/accounting/tests/test_invoicing.py :: | |
corehq/apps/analytics/ab_tests.py :: | |
f35a49c480f (Biyeun Buczyk 2016-07-06 18:12:26 -0400 29) version = random.sample(self.options, 1)[0] # todo weighted options |
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
#!/bin/bash | |
# usage: ./git_grep_blame.sh todo | |
# HT: https://stackoverflow.com/a/43664756/8207 | |
if [ "$1" = "" ] ; then | |
echo "usage: $0 <term>" 1>&2 | |
exit 1 | |
fi |
NewerOlder