-
Input from stdin
- ollama run llama3.1 "prompt"
-
Multiline input
- Using """
-
Input from file
- Using the pipe | operator:
- cat fox.txt | ollama run llama3.1 "Please translate the provided text to German"
- Using the pipe | operator:
-
Using the redirection operator < :
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function llm(){ | |
question="'$*'" | |
curl http://localhost:11434/api/generate --silent --data '{ | |
"model": "llama3", | |
"prompt": "Answer in as few words as possible. Use a brief style with short replies. q '"$question"' ?", | |
"stream": false | |
}' | python -c "import sys, json; print(json.load(sys.stdin)['response'])" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Encrypts plaintext using AES-GCM with supplied password, for decryption with aesGcmDecrypt(). | |
* (c) Chris Veness MIT Licence | |
* | |
* @param {String} plaintext - Plaintext to be encrypted. | |
* @param {String} password - Password to use to encrypt plaintext. | |
* @returns {String} Encrypted ciphertext. | |
* | |
* @example | |
* const ciphertext = await aesGcmEncrypt('my secret text', 'pw'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Demonstrate JavaScript floating point math bugs by showing | |
* which two-decimal-place numbers between 0.00 and 1.00 inclusive | |
* have fractional parts after being multiplied by one hundred. | |
*/ | |
var i = 0.00; | |
for (n = 0; n <= 100; ++n) { | |
j = i * 100; | |
if (Math.round(j) != j) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* *-*-*-*-*-*-*-*-*-*-* Challenge 1 ------------------ | |
Create a variable with the type number and assign it an arbitrary value | |
*/ | |
// ---------------------------------------------------- | |
// *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- | |
// ---------------------------------------------------- | |
/* *-*-*-*-*-*-*-*-*-*-* Challenge 2 ------------------ | |
Create a variable with the type string and use the addition operator to put two arbitrary words together | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section data-background-transition='zoom' data-transition='concave' data-background='http://ryanjarvinen.com/presentations/shared/img/broadcast_reveal_dark.png' data-state='blackout'> | |
<h2>Gist-Powered</h2> | |
<h1>Reveal.js</h1> | |
<h2>Slideshow Presentations</h2> | |
<br/> | |
<h1 class='fragment grow'><a style='color:deepskyblue;' href='http://gist-reveal.it'>gist-reveal.it</a></h1> | |
</section> | |
<section data-markdown> | |
<textarea data-template> | |
## Welcome! |
that I bookmarked but never had enough time to read
- The Agile Manifesto
- React Philosophies - 🧘 Things I think about when I write React code 🧘
- The Product-Minded Software Engineer
- Architecture, Performance, and Games - Game Programming Patterns / Introduction
- Responsible Tech Playbook
- Small, Sharp Tools
- Why the developers who use Rust love it so much
- Testing - 8th Light Blog
NewerOlder