Skip to content

Instantly share code, notes, and snippets.

Wiktionary API

@carbide-public
carbide-public / cell0.js
Created February 4, 2022 18:45
untitled
let word = 'red'
let endpoint = 'https://en.wiktionary.org/api/rest_v1/page/definition'
let url = `${endpoint}/${word}`
let resObj = await fetch(url, {orgin:'test'})
let res = await resObj.json()
let output = ''
for (let meaning of res.en) {
output += meaning.partOfSpeech
@carbide-public
carbide-public / cell0.js
Created November 10, 2021 22:13
untitled
"use strict";
const functions = require("firebase-functions");
const { WebhookClient } = require("dialogflow-fulfillment");
const { Card, Suggestion } = require("dialogflow-fulfillment");
const axios = require('axios');
const fetch = require('node-fetch');
process.env.DEBUG = "dialogflow:debug"; // enables lib debugging statements
var points = [];
for (var i = -50; i < 50; i++) {
points.push(Math.sin(i / 2));
}
points

Three.JS Cubes

Neural Network XOR