a8b48747537_README.md2 matches
45* `migrations.ts` - code to set up the database tables the app needs
6* `queries.ts` - functions to run queries against those tables, which are imported and used in the main Hono server in `/backend/index.ts`
78## Migrations
18The queries file is where running the migrations happen in this app. It'd also be reasonable for that to happen in index.ts, or as is said above, for that line to be commented out, and only run when actual changes are made to your database schema.
1920The queries file exports functions to get and write data. It relies on shared types and data imported from the `/shared` directory.
a8b48747537_NotebookView.tsx1 match
54}
5556export function NotebookView({ onClose, avatarUrl }: NotebookViewProps) {
57const [memories, setMemories] = useState<Memory[]>([]);
58const [loading, setLoading] = useState(true);
a8b48747537_App.tsx2 matches
62};
6364export function App() {
65const [memories, setMemories] = useState<Memory[]>([]);
66const [loading, setLoading] = useState(true);
139const data = await response.json();
140141// Change the sorting function to show memories in chronological order
142const sortedMemories = [...data].sort((a, b) => {
143const dateA = a.createdDate || 0;
resume-parserresumeParser.ts12 matches
1617/**
18* Helper function to create a confidence field with a value and confidence score
19*/
20function createConfidenceField<T>(
21value: T,
22confidence: number,
37* @returns Structured resume data with confidence scores
38*/
39export async function extractResumeData(
40resumeText: string,
41options?: ResumeParserOptions
96* @returns Finalized resume data
97*/
98function postProcessResumeData(data: any, confidenceThreshold: number = 0.3): ParsedResume {
99try {
100// Ensure we have all required sections with at least empty arrays
220* Create a default personal info object with empty fields
221*/
222function createDefaultPersonalInfo(): PersonalInfo {
223return {
224name: createConfidenceField('', 0),
236* Calculate months between two dates
237*/
238function calculateMonthsBetween(startDate: Date, endDate: Date): number {
239return (endDate.getFullYear() - startDate.getFullYear()) * 12 +
240(endDate.getMonth() - startDate.getMonth());
247* @returns Validated and standardized resume data
248*/
249export function validateAndStandardize(data: ParsedResume): ParsedResume {
250// This function is now deprecated in favor of the validateResumeWithAI function
251// which uses OpenAI to validate and standardize the data
252return data;
261* @returns Confidence score between 0 and 1
262*/
263export function calculateConfidence(
264value: any,
265fieldType: string,
285* @returns Standardized value and standardization notes
286*/
287export function standardizeTerminology(
288value: string,
289fieldType: 'degree' | 'jobTitle' | 'skill' | 'language' | string
302* @returns Resume data with confidence scores added
303*/
304export function addConfidenceScores(data: any): ParsedResume {
305// This function would iterate through the resume data and add
306// confidence scores to each field based on various factors
307
MaxCareVizindex.html1 match
941let keepPoint, removePoint;
942
943// Define helper functions to check point types
944const isCode = (point) => point.codeType === 'cpt' || point.codeType === 'icd10';
945const isReasoning = (point) => point.codeType === 'step';
sqlite-storage-sizemain.tsx1 match
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
23async function getStorageSize() {
4const bytes =
5(await sqlite.execute(`SELECT page_size * page_count FROM pragma_page_size(), pragma_page_count()`)).rows[0][0];
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
23async function getStorageSize() {
4const bytes =
5(await sqlite.execute(`SELECT page_size * page_count FROM pragma_page_size(), pragma_page_count()`)).rows[0][0];
sqliteAdminDashboardmain.tsx4 matches
1// This val creates a SQLite dashboard admin panel with a sidebar for table names
2// It uses React for the frontend and the Val Town SQLite API for database operations
3// Now includes functionality to edit rows, using rowid or all columns as identifiers
4// and the ability to add new rows to tables
5// Column types are displayed next to column names in the UI
10import { vtTokenSessionAuth } from "https://esm.town/v/stevekrouse/vtTokenSessionAuthSafe";
1112function App() {
13const [tables, setTables] = useState([]);
14const [selectedTable, setSelectedTable] = useState(null);
195}
196197function client() {
198createRoot(document.getElementById("root")).render(<App />);
199}
203}
204205async function server(request: Request): Promise<Response> {
206const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
207const url = new URL(request.url);
templateTwitterAlertREADME.md2 matches
46- Key: `mentionsDiscord`
47- Value: Your Discord webhook URL.
48Notifications will be sent using this function:
4950```ts
6364- **Proxies via Val Town's [SocialDataProxy](https://www.val.town/v/stevekrouse/socialDataProxy)**: Limited to 10 cents per day for [**Val Town Pro users**](https://www.val.town/pricing). This API is *only* for Pro users.
65- **Need more calls?** Sign up for your own [SocialData API token](https://socialdata.tools) and configure the [`socialDataSearch`](https://www.val.town/v/stevekrouse/socialDataSearch) function.
templateTwitterAlertmain.tsx1 match
12const isProd = false;
1314export async function twitterAlert({ lastRunAt }: Interval) {
15// If isProd, search for tweets since that last time this interval ran
16// if not, search for tweets since 48 hours ago for testing