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
| WhatsMyColorIntent what's my favourite colour | |
| WhatsMyColorIntent what is my favourite colour | |
| WhatsMyColorIntent what's my colour | |
| WhatsMyColorIntent what is my colour | |
| WhatsMyColorIntent my colour | |
| WhatsMyColorIntent my favourite colour | |
| WhatsMyColorIntent get my colour | |
| WhatsMyColorIntent get my favourite colour | |
| WhatsMyColorIntent give me my favourite colour | |
| WhatsMyColorIntent give me my colour |
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
| Sub ROT13UX() | |
| ' Obscure material on screen temporarily. | |
| ' Problem: how do I share screens and avoid accidental sharing of content? | |
| Selection.text = ROT13(Selection.text) | |
| End Sub | |
| ' Formatting preserved (yay) | |
| Function ROT13(ByRef text As String) | |
| Const kLowerCaseStart = 97 | |
| Const kAlphabetRange = 26 |
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
| # commands to set up the Docker image | |
| FROM tensorflow/tensorflow:latest | |
| # for natural language processing | |
| RUN pip install nltk | |
| # general data analysis (statistical: like R for python) | |
| RUN pip install pandas | |
| # interesting visualisations |
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
| # inspired by example in https://docs.pytest.org/en/latest/example/simple.html | |
| import pytest | |
| def pytest_addoption(parser): | |
| parser.addoption( | |
| "--runchargeable", action="store_true", default=False, help="run tests that may incur a charge" | |
| ) | |
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
| const fs = require('fs'); | |
| const path = require('path'); | |
| async function create_file_in_new_folder_with_promises() { | |
| try { | |
| await fsp.mkdir(path.join(__dirname, '/promise-test')); | |
| await fsp.writeFile( | |
| path.join(__dirname, '/promise-test', 'writeFile-promise-demo.txt'), | |
| "Hello world from the land of promises" | |
| ); |
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://github.com/spulec/moto is great for mocking out AWS, | |
| but I accidentally had it included in requirements.txt instead of a dev dependency. | |
| Completely insane cryptic messages when calling sam build. | |
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
| DEBUG urllib3.connectionpool:connectionpool.py:442 https://autoextract.scrapinghub.com:443 "POST /v1/extract HTTP/1.1" 200 None | |
| DEBUG root:article.py:247 Download time took 3.2365484610000004s | |
| DEBUG root:article.py:249 { | |
| "query": { | |
| "id": "1604607287688-bc624d2ae5f0dbd1", | |
| "domain": "netlify.app", | |
| "userQuery": { | |
| "url": "https://lisn-tests.netlify.app/pdf.pdf", | |
| "pageType": "article" | |
| } |
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 trafilatura.core import bare_extraction, extract | |
| from pathlib import Path | |
| import json | |
| from sentence_splitter import SentenceSplitter | |
| html_path = Path("data") / "testfile-3.html" | |
| html = html_path.read_text() | |
| result_json_text = extract( | |
| output_format="json", | |
| filecontent=html, |
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
| Runnig on ollama 0.1.25 / web-ui v1.0.0-alpha.100 / ubuntu 22.04 | |
| Feb 16 12:27:52 gruntus ollama[57441]: {"timestamp":1708086472,"level":"ERROR","function":"load_model","line":378,"message":"unable to load model","model":"/usr/share/ollama/.ollama/models/blobs/sha256:883e646838a09df3315b167aac81293affbf48dbccf927eb144191dc9c959942"} | |
| Feb 16 12:27:52 gruntus ollama[57441]: time=2024-02-16T12:27:52.809Z level=WARN source=llm.go:162 msg="Failed to load dynamic library /tmp/ollama2601240208/cpu_avx2/libext_server.so error loading model /usr/share/ollama/.ollama/models/blobs/sha256:883e646838a09df3315b167aac81293affbf48dbccf927eb144191dc9c959" | |
| Feb 16 12:27:52 gruntus ollama[57441]: [GIN] 2024/02/16 - 12:27:52 | 500 | 203.311184ms | 127.0.0.1 | POST "/api/chat" | |
| Feb 16 12:27:53 gruntus ollama[57441]: time=2024-02-16T12:27:53.013Z level=INFO source=cpu_common.go:11 msg="CPU has AVX2" | |
| Feb 16 12:27:53 gruntus ollama[57441]: time=2024-02-16T12:27:53.013Z level=INFO source=gpu.go:146 msg="CUDA Compute Capabi |
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
| // How do you make a Flutter HTTP GET request with parameters? | |
| // Most examples have no parameters or have parameters embedded in the URL. | |
| // This took me hours to find so here we go | |
| // no prototcol or slashes | |
| // path and parameters are both properly URL encoded. | |
| // Uri is part of dart:core | |
| import 'package:http/http.dart' as http; |
OlderNewer