Mrcool 🇵🇸
Mrcool 🇵🇸
DDeno
Created by WaterKnight on 2/21/2025 in #help
How to import GoogleAIFileManager from @google/generative-ai/files
5 replies
DDeno
Created by WaterKnight on 2/21/2025 in #help
How to import GoogleAIFileManager from @google/generative-ai/files
This should work
import {
GoogleAIFileManager,
} from "npm:@google/generative-ai@0.21.0/server";
const files = new GoogleAIFileManager(GOOGLE_API_KEY);
import {
GoogleAIFileManager,
} from "npm:@google/generative-ai@0.21.0/server";
const files = new GoogleAIFileManager(GOOGLE_API_KEY);
5 replies
DDeno
Created by WaterKnight on 2/21/2025 in #help
How to import GoogleAIFileManager from @google/generative-ai/files
You don't need esm, its not recommended its hash changes from time to time it gets annoying
5 replies
DDeno
Created by vrugtehagel on 2/20/2025 in #help
Read file as text in JSR package (easy with NPM, not Deno)
Also the url of the file ends being a local one , not a remote https url
11 replies
DDeno
Created by vrugtehagel on 2/20/2025 in #help
Read file as text in JSR package (easy with NPM, not Deno)
console.log(await fetch(import.meta.resolve("./b.txt")).then((r) => r.text()));
console.log(await fetch(import.meta.resolve("./b.txt")).then((r) => r.text()));
11 replies
DDeno
Created by vrugtehagel on 2/20/2025 in #help
Read file as text in JSR package (easy with NPM, not Deno)
I read the file like this
11 replies
DDeno
Created by vrugtehagel on 2/20/2025 in #help
Read file as text in JSR package (easy with NPM, not Deno)
It seems to work , u can test this package import * as jsr_test from "@sigmasd/jsr-test";
11 replies
DDeno
Created by Char on 12/15/2024 in #help
Linux Zip Compression From CLI
You can use https://jsr.io/@zip-js/zip-js which don't require zip cli, its pure js
6 replies
DDeno
Created by Gyong on 11/19/2024 in #help
How to install deno with auto yes?
curl -fsSL https://deno.land/install.sh | sh -s -- -y (chatgpt)
6 replies
DDeno
Created by TheYuriG on 11/18/2024 in #help
How can I do simple image recognition with Deno?
There are simple ways like looking for pixels colors if a yellow object is inside a dark background you can find it
6 replies
DDeno
Created by Gyong on 11/19/2024 in #help
How to install deno with auto yes?
No description
6 replies
DDeno
Created by Gyong on 11/19/2024 in #help
How to install deno with auto yes?
it has a yes option
6 replies
DDeno
Created by TheYuriG on 11/18/2024 in #help
How can I do simple image recognition with Deno?
and there are many models to choose from
6 replies
DDeno
Created by TheYuriG on 11/18/2024 in #help
How can I do simple image recognition with Deno?
You can explore hugging js, for example a simple object detection
import { HfInference } from "npm:@huggingface/inference";

const HF_TOKEN = ...
const inference = new HfInference(HF_TOKEN);
const result = await inference.objectDetection({
data: await (await fetch(import.meta.resolve("./img.png"))).blob(),
});
console.log(result);
import { HfInference } from "npm:@huggingface/inference";

const HF_TOKEN = ...
const inference = new HfInference(HF_TOKEN);
const result = await inference.objectDetection({
data: await (await fetch(import.meta.resolve("./img.png"))).blob(),
});
console.log(result);
6 replies
DDeno
Created by somnid on 10/14/2024 in #help
Can Deno Jupyter output images like jpegs?
It can but you have to give it on the right format, I think it needs a base64 encoded image, I'll have to lookup how I used to do this
8 replies
DDeno
Created by m4rc3l05 on 9/21/2024 in #help
How to check if stdin is a file?
No description
20 replies
DDeno
Created by m4rc3l05 on 9/21/2024 in #help
How to check if stdin is a file?
stdin.isTerminal()
20 replies
DDeno
Created by mabasic on 7/19/2024 in #help
How to get source code from packages used in Helix editor?
The workaround is to vendor dependencies when you need this, add vendor: true to deno.json
5 replies
DDeno
Created by LambdAurora on 5/18/2024 in #help
How to properly publish a JSR package with browser compatibility?
you can still try to import your module in the browser using esm.sh for example import {parse} from https://esm.sh/jsr/@std/csv@0.224.0
8 replies
DDeno
Created by LambdAurora on 5/18/2024 in #help
How to properly publish a JSR package with browser compatibility?
Browser compatibility is still in the works
8 replies