This file contains hidden or 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
| from transformers import pipeline | |
| import torch | |
| print("Creazione della pipeline di chat con il modello già addestrato in memoria...") | |
| pipe = pipeline( | |
| "text-generation", | |
| model = model, | |
| tokenizer = tokenizer, | |
| device_map = "auto" |
This file contains hidden or 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
| { | |
| "name": "magic-travel", | |
| "version": "0.0.1", | |
| "lockfileVersion": 3, | |
| "requires": true, | |
| "packages": { | |
| "": { | |
| "name": "magic-travel", | |
| "version": "0.0.1", | |
| "dependencies": { |
This file contains hidden or 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
| // Setup | |
| const editor = new Editor() | |
| const logger = new EditorLogger(".log") | |
| editor.subscribe(EditorEventType.FileOpen, logger) | |
| // GUI triggers FileOpen | |
| editor.notify(EditorEventType.FileOpen, { | |
| filename: "file.txt", |
This file contains hidden or 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
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "sync" | |
| ) | |
| func main() { | |
| ctx, cancel := context.WithCancel(context.Background()) |
This file contains hidden or 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
| Ctrl+a Move cursor to start of line | |
| Ctrl+e Move cursor to end of line | |
| Ctrl+b Move back one character | |
| Alt+b Move back one word | |
| Ctrl+f Move forward one character | |
| Alt+f Move forward one word | |
| Ctrl+d Delete current character | |
| Ctrl+w Cut the last word | |
| Ctrl+k Cut everything after the cursor | |
| Alt+d Cut word after the cursor |
This file contains hidden or 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
| I am one of the first to change to a new idea, way of thinking or doing something that later becomes generally popular |
This file contains hidden or 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
| git remote set-url origin https://@didof@github.com/didof/<repo_name>.git |
This file contains hidden or 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
| https://web.dev/virtualkeyboard/ | |
| const isVirtualKeyboardSupported = 'virtualKeyboard' in navigator | |
| // Tell the browser that resizing will be manually handled | |
| navigator.virtualKeyboard.overlaysContent = true; | |
| navigator.virtualKeyboard.show(); | |
| navigator.virtualKeyboard.hide(); | |
| // the focused element needs to be a form control (i.g. <textarea> or any <div contenteditable /> |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <link rel="icon" type="image/svg+xml" href="favicon.svg" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Water Effect</title> | |
| <style> | |
| body { |
This file contains hidden or 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
| // https://css-tricks.com/how-to-animate-the-details-element-using-waapi/ | |
| class Accordion { | |
| constructor(el) { | |
| this.el = el; | |
| this.summary = el.querySelector("summary"); | |
| this.content = el.querySelector(".content"); | |
| this.animation = null; | |
| this.isClosing = false; |
NewerOlder