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
# top-most EditorConfig file | |
root = true | |
# Unix-style newlines with a newline ending every file | |
[*] | |
end_of_line = lf | |
insert_final_newline = true | |
trim_trailing_whitespace = true | |
[*.cs] |
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
<script async="async" src="https://h7hbzrzw.mindtouch.es/@embed/acfe4e14b3108d82e03675e6b0bc9d22adaed60f156ad62a090e6c3e335211b0.js"></script> | |
<script type="mindtouch/embed" data-case-id="2" data-search-query="how" id="mindtouch-embed-acfe4e14b3108d82e03675e6b0bc9d22adaed60f156ad62a090e6c3e335211b0"></script> | |
Example of linking to case | |
https://h7hbzrzw.mindtouch.es/@embed/acfe4e14b3108d82e03675e6b0bc9d22adaed60f156ad62a090e6c3e335211b0.html?case-id=1 | |
?search-query=how | |
Window events: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener | |
mindtouch-web-widget:salesforce:loaded |
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
// See https://aka.ms/new-console-template for more information | |
using SynthesizerAudio; | |
using System.Media; | |
var cts = new CancellationTokenSource(); | |
cts.CancelAfter(TimeSpan.FromSeconds(10)); | |
var text = string.Empty; | |
if (args.Length > 0 && File.Exists(args[0])) { | |
text = await File.ReadAllTextAsync(args[0], cts.Token) ?? string.Empty; | |
} else { | |
Environment.Exit(1); |
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
https://pypi.org/project/mqtt-client/ | |
mqtt-client publish --host=192.168.4.100:1883 --topic=work/notify --payload=ok |
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
namespace UserTriggerTextToSpeech | |
{ | |
public class Mimic3Service | |
{ | |
private static readonly HttpClient _client = new(); | |
private readonly Uri _url = new("http://127.0.0.1:59125"); | |
public Mimic3Service() { | |
} |
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
import puppeteer from "puppeteer"; | |
(async () => { | |
const browser = await puppeteer.launch({ headless: false }); | |
const page = await browser.newPage(); | |
await page.goto( | |
"https://sfbay.craigslist.org/search/sby/sof#search=1~thumb~0~0" | |
); | |
// Set screen size |
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
using System; | |
using System.IO; | |
using System.Security.Cryptography; | |
using System.Net.Http; | |
// Server API Token key and secret are available from API token management dashboard when Server API Token is generated | |
var key = "da28b6ec3ea350db524d80099f8c9f40f2fab2f4caf91a8d49d4cb4d659a9785"; | |
var secret = "60a63916a77ef70c0ecf42b134f44fbb9732b395ae33dc6d5165aad2b5668bb4"; | |
// include username prefixed with '=' |
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
from simple_http_server import route, server | |
from threading import Thread | |
import spotipy | |
from spotipy.oauth2 import SpotifyClientCredentials | |
import spotipy | |
from spotipy.oauth2 import SpotifyOAuth | |
import os | |
from simple_http_server import route, server | |
@route("/") |
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
import requests | |
import xml.etree.ElementTree as ET | |
def get_current_weather(uri: str, client = requests) -> str: | |
result = client.get(uri) | |
weather = ET.ElementTree(ET.fromstring(result.text)).getroot().findall("./weather")[0].text | |
return weather | |
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
from langchain.llms import GPT4All | |
from langchain.vectorstores import Chroma | |
from langchain.indexes import VectorstoreIndexCreator | |
from langchain.indexes.vectorstore import VectorStoreIndexWrapper | |
from langchain.document_loaders import DirectoryLoader, TextLoader, UnstructuredMarkdownLoader | |
from langchain.chains import RetrievalQA | |
import sys | |
import os | |
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler | |
from langchain.embeddings import HuggingFaceEmbeddings, SentenceTransformerEmbeddings |
OlderNewer