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
| using System; | |
| using System.IO; | |
| using System.Net; | |
| using System.Diagnostics; | |
| using System.IO.Compression; | |
| using System.Collections.Generic; | |
| using System.Runtime.InteropServices; | |
| namespace ScreenRec | |
| { |
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 typing import Any, Iterator | |
| def yield_unique_in_order(array: list) -> Iterator[tuple[Any, int]]: | |
| """Yields unique value and their respective indices in order. | |
| Args: | |
| array: Array of values. | |
| Returns: | |
| Iterator over unique values and their indices. |
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
| Add-Type –AssemblyName UIAutomationClient | |
| Add-Type –AssemblyName UIAutomationTypes | |
| Write-Output "===== UI automation and accessibility test =====" | |
| # start an instance of Microsoft Edge and wait for it to load | |
| Write-Output "Starting an instance of Microsoft Edge" | |
| Start-Process msedge "-inprivate https://en.wikipedia.org/wiki/Main_Page" | |
| Start-Sleep –s 2 |
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 typing import Callable, Generic, TypeVar | |
| T = TypeVar("T") | |
| class Option(Generic[T]): | |
| def __init__(self, value: T) -> None: | |
| self._value: T = value | |
| self._binds: list[Callable] = [] |
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
| ndarray = list[list[int]] | |
| def is_safe(board: ndarray, row: int, col: int) -> bool: | |
| n: int = len(board) | |
| # check cols | |
| if any(board[row][i] for i in range(n)): | |
| return False | |
| # check up left diagonal |
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 typing import Optional | |
| from functools import lru_cache | |
| @lru_cache | |
| def fib(n: int) -> int: | |
| """ Return n-th fibonacci number. | |
| >>> fib(50) | |
| 12586269025 |
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
| [ | |
| { | |
| "instruction": "Give three tips for staying healthy.", | |
| "input": "", | |
| "output": "1. Eat a balanced and nutritious diet: Make sure your meals are inclusive of a variety of fruits and vegetables, lean protein, whole grains, and healthy fats. This helps to provide your body with the essential nutrients to function at its best and can help prevent chronic diseases.\n\n2. Engage in regular physical activity: Exercise is crucial for maintaining strong bones, muscles, and cardiovascular health. Aim for at least 150 minutes of moderate aerobic exercise or 75 minutes of vigorous exercise each week.\n\n3. Get enough sleep: Getting enough quality sleep is crucial for physical and mental well-being. It helps to regulate mood, improve cognitive function, and supports healthy growth and immune function. Aim for 7-9 hours of sleep each night." | |
| }, | |
| { | |
| "instruction": "What are the three primary colors?", | |
| "input": "", | |
| "output": "The three primary colors are red, blue, |
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
| [ | |
| { | |
| "instruction": "Remember the question", | |
| "input": "", | |
| "output": "From the book fo PQ-GSP-O questions. Is the general lighting sufficient in the premises?" | |
| }, | |
| { | |
| "instruction": "Remember the question", | |
| "input": "", | |
| "output": "From the book of PQ-GSP-O questions. Is daylight available ?" |
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
| The title | |
| --------- | |
| The 12345 TEST SURVEY FROM CUSTOM STORE document | |
| The list of manufacture question | |
| --------------------------------- | |
| Is the general lighting sufficient in the premises? | |
| Are the lighting fixtures cleaned and are they intact? | |
| Is there location lighting for those workers (e.g. the elderly) who feel that the lighting in the work area is insufficient? |
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 langchain.document_loaders import TextLoader | |
| from langchain.text_splitter import RecursiveCharacterTextSplitter | |
| from langchain.vectorstores import Chroma | |
| from langchain.embeddings import HuggingFaceEmbeddings | |
| from langchain.llms import LlamaCpp | |
| from langchain.callbacks.manager import CallbackManager | |
| from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler | |
| from langchain import PromptTemplate, LLMChain |