Skip to content

Instantly share code, notes, and snippets.

import { readFileSync } from 'fs';
const LIGHTRAG_URL = process.env.LIGHTRAG_URL || 'http://localhost:9621';
async function ingestTvShows() {
const data = JSON.parse(readFileSync('tmdb_tv_shows.json', 'utf-8'));
const tvShows = data.tv_shows;
console.log(`Ingesting ${tvShows.length} TV shows into LightRAG`);
console.log(`LightRAG URL: ${LIGHTRAG_URL}\n`);
import { writeFileSync } from 'fs';
const API_KEY = process.env.TMDB_API_KEY;
if (!API_KEY) {
console.error('Error: TMDB_API_KEY environment variable is required');
process.exit(1);
}
const BASE_URL = 'https://api.themoviedb.org/3/discover/tv';
@brojd
brojd / cloudSettings
Last active August 27, 2021 19:15
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-08-27T19:15:34.964Z","extensionVersion":"v3.4.3"}
import axios from 'axios';
import { find, keys } from 'ramda';
import responseCodes from '../config/responseCodes';
import socketService from '../common/services/socket';
import { ERROR, INFO, SUCCESS } from '../common/components/Alert/Alert';
function handleInfoResponse(infoCode, showAlertFn) {
const responseCodeKey = find(objKey => responseCodes[objKey].code === infoCode, keys(responseCodes));
const message = responseCodes[responseCodeKey].message;