23
24 capturePostHogEvent(
25 Deno.env.get("phProjectAPIKey"),
26 webhookPayload.sender.login,
27 "GitHub Star",
3Get the Air Quality Index (AQI) for a location via open data sources.
4
5It's "easy" because it strings together multiple lower-level APIs to give you a simple interface for AQI.
6
71. Accepts a location in basically any string format (ie "downtown manhattan")
3const tokenBucket = new TokenBucket(5, 1/12);
4
5export async function getRecommendations(jobDescription, resume, apiKey) {
6
7 if (!tokenBucket.consume()) {
9 }
10
11 const endpoint = 'https://api.openai.com/v1/chat/completions';
12 const model = 'gpt-4';
13
30 method: 'POST',
31 headers: {
32 'Authorization': `Bearer ${apiKey}`,
33 'Content-Type': 'application/json'
34 },
94
95
96// Main function to execute the scraping process
97async function main() {
98 const baseUrl = "https://forums.spacebattles.com/search/69363141/?t=post&c[content]=thread&c[users]=3ndless&o=date";
104 console.log("Valid Feeds:", validFeeds);
105 } catch (error) {
106 console.error("Error during the scraping process:", error);
107 }
108}
9[](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
10
11It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).
12
13# TODO
113. 🤣🤣🤣🤣
12
13## API
14
15This val uses the [icanhazdadjoke API](https://icanhazdadjoke.com/api). You can find [more docs here](https://github.com/15Dkatz/official_joke_api), such as how to [filter by type](https://github.com/15Dkatz/official_joke_api?tab=readme-ov-file#grab-jokes-by-type).
3
4export async function dailyDadJoke() {
5 let { setup, punchline } = await fetchJSON("https://official-joke-api.appspot.com/random_joke");
6 return email({
7 text: punchline,
81. Set up a Slack bot/app and have the webhooks point at your forked Val
91. Add the following environment variables to Val.town:
10 - `DUB_API_KEY` your [Dub](https://dub.co) API key
11 - `DUB_WORKSPACE_ID` your Dub workspace ID
12 - `SLACK_MUX_LINK_SIGNING_SECRET` Signing secret for the app you created
6
7const app = new Hono();
8const openai = new OpenAI(Deno.env.get("OPENAI_API_KEY_VOICE"));
9
10class TranscriptionService {
19 return transcription;
20 } catch (error) {
21 console.error("OpenAI API error:", error);
22 throw error;
23 }
423 return c.text(translation);
424 } catch (error) {
425 console.error("OpenAI API error:", error);
426 return c.text("Error occurred during translation", 500);
427 }
450 });
451 } catch (error) {
452 console.error("OpenAI API error:", error);
453 return c.text("Error occurred during speech generation", 500);
454 }
3The app is set up so you can easily have a conversation between two people. The app will translate between the two selected languages, in each voice, as the speakers talk.
4
5Add your OpenAI API Key, and make sure to open in a separate window for Mic to work.
6
7Migrated from folder: Archive/translator