Search
tfidf_analyser_90s_version
@mikehiggins
// Expanded stopwords list
HTTP
</div>
<p>TF-IDF (Term Frequency-Inverse Document Frequency) is a brilliant way to figure out how important a word or phrase is in a document. Higher scores mean more important words or phrases!</p>
<p>We show the top 7 TF-IDF scores because it's a good balance between providing enough information and not overwhelming the user. It's also considered a "lucky" number in many cultures!</p>
<p class="source-link">
<a href="${import.meta.url.replace("esm.town", "val.town")}" target="_blank">View Source</a>
if (window.jQuery && window.jQuery.fn.jQCloud) {
$('#wordCloud').jQCloud('destroy');
// Client-side character count limit
inputText.addEventListener('input', function() {
if (this.value.length > 100000) {
upstandingAmberPuffin
@hussamgalal999
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 **/
import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
export default (req: Request) => {
return new Response(
grandLimeTurkey
@nareach
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 **/
import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
export default (req: Request) => {
return new Response(
someDom
@stevekrouse
@jsxImportSource https://esm.sh/preact
Script
/** @jsxImportSource https://esm.sh/preact */
import { render } from "npm:preact-render-to-string";
const x = 1;
export const someDom = render(<div>Test {x}</div>);
simpleLogin
@rawwerks
// Check if all required environment variables are set
HTTP
const requiredEnvVars = [
"GITHUB_OAUTH_TEST1_CLIENT",
"GITHUB_OAUTH_TEST1_SECRET",
"GOOGLE_OAUTH_COVERSHEET_CLIENT",
"GOOGLE_OAUTH_COVERSHEET_SECRET"
github: {
clientId: Deno.env.get("GITHUB_OAUTH_TEST1_CLIENT"),
clientSecret: Deno.env.get("GITHUB_OAUTH_TEST1_SECRET"),
redirectUri: "https://rawwerks-simplelogin.web.val.run/auth/github/callback",
google: {
clientId: Deno.env.get("GOOGLE_OAUTH_COVERSHEET_CLIENT"),
clientSecret: Deno.env.get("GOOGLE_OAUTH_COVERSHEET_SECRET"),
redirectUri: "https://rawwerks-simplelogin.web.val.run/auth/google/callback",
minhtml
@yieldray
An interactive, runnable TypeScript val by yieldray
HTTP
minify_css_level_3: boolean;
* Minify JavaScript in <script> tags using minify-js.
* Only <script> tags with a valid or no MIME type is considered to contain JavaScript, as per the specification.
minify_js: boolean;
* Remove all bangs.
slides
@curtcox
Use the tail of the path to specify the slideshow URL. Use the left and right arrow keys to navigate. The slideshow file format is: seconds-to-show URL-to-show Here's a set of example slides. https://curtcox-slides.web.val.run/raw.githubusercontent.com/curtcox/slides/refs/heads/main/sets/ai The tail of the URL points to the plain text slide list at https://raw.githubusercontent.com/curtcox/slides/refs/heads/main/sets/ai If your slides are blocked due to the domain, you could serve them somewhere besides val.town.
An easy way to do that while still using a github repo is to embed the slides directly into an HTML page.
You could use Github Pages or https://raw.githack.com/ to serve that.
HTTP
https://raw.githubusercontent.com/curtcox/slides/refs/heads/main/sets/ai
If your slides are blocked due to the domain, you could serve them somewhere besides val.town.
An easy way to do that while still using a github repo is to embed the slides directly into an HTML page.
tidyOliveClam
@ASkumar
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 **/
import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
export default (req: Request) => {
return new Response(
zanyCyanHookworm
@nvpkp
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
import React, { useCallback, useEffect, useState } from "https://esm.sh/react@18.2.0";
const Icons = {
staticChessV2
@maxm
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import { Chess, Move, Square } from "npm:chess.js";
import minify from "npm:css-simple-minifier";
import { renderToString } from "npm:react-dom/server";
class StaticChess {
size = 8;
oceanTheremin
@all
An interactive, runnable TypeScript val by all
HTTP
if (!isPlaying) return;
const rect = whaleSong.getBoundingClientRect();
const x = event.clientX - rect.left;
const y = event.clientY - rect.top;
const minFreq = 20; // Whale sounds can go as low as 20 Hz
isthegtrainfucked
@pbt
@jsxImportSource https://esm.sh/preact
HTTP
/** @jsxImportSource https://esm.sh/preact */
import { activeGTrainAlerts } from "https://esm.town/v/pbt/gtrainalerts?v=36";
import { render } from "npm:preact-render-to-string";
import Uwuifier from "npm:uwuifier";
</main>
<aside class="text-center p-6 md:p-10 rounded text-lg">
<p>
</p>
</aside>
<footer class="text-xs">
testVTClient2
@stevekrouse
// Forked from @stevekrouse.testsVTClient
Script
export const testVTClient2 = (async () => {
const { createApiClient } = await import(
"https://esm.sh/gh/nbbaier/valtown-zodios/src/spec/valtown-client.ts"
const apiClient = createApiClient("https://api.val.town");
const params = {
params: { username: "nbbaier", val_name: "hello" },
const user = await apiClient.getValname(params);
return user;
// Forked from @stevekrouse.testsVTClient
// Forked from @nbbaier.testVTClient
favFarm
@stevekrouse
Clone of fav.farm by @wesbos A little favicon service
HTTP
<h1>I bet you need a quick favicon</h1>
<p>
This startup returns an emoji inside an SVG<br />so you can pop that sucker into a favicon.
</p>
<p>
markdocReactExample
@pomdtr
Markdoc Playground This readme is rendered using markdoc . {% val author="pomdtr" name="markdocReactExample" %}
HTTP
# [Markdoc Playground](https://pomdtr-markdocReactExample.web.val.run)
This readme is rendered using [markdoc](https://markdoc.dev/).
{% val author="pomdtr" name="markdocReactExample" %}
/** @jsxImportSource npm:react */
import { api } from "https://esm.town/v/pomdtr/api";
import Markdoc from "npm:@markdoc/markdoc";
import React from "npm:react";
import { renderToString } from "npm:react-dom/server";
const tags = {
return <iframe width="600" height="300" frameBorder="0" src={`https://www.val.town/embed/${author}/${name}`} />;
export async function markdocReactExample(req: Request) {
// extract the current val readme
const content = Markdoc.transform(ast, { tags }); // register the val tag
const rendered = Markdoc.renderers.react(content, React, {
components: {