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
| Prompt | Target | |
|---|---|---|
| When was Elvis Presley born? | True | |
| Where was Elvis Presley born? | False | |
| Tell me about Elvis Presley’s early life. | True | |
| Describe Elvis Presley’s musical style. | False | |
| When did the UK National Minimum Wage first come into force? | True | |
| When is the most common time to start work in the UK? | False | |
| When was the first transatlantic telegraph cable completed? | True | |
| When is the busiest time of day for transatlantic communications? | False | |
| When did the International Space Station become continuously inhabited? | True |
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
| import pandas as pd | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| import numpy as np | |
| from sklearn.model_selection import train_test_split | |
| df = pd.read_csv("data.csv") # Columns are 'Prompt' and 'Target' | |
| model = AutoModelForCausalLM.from_pretrained("google/gemma-3-1b-it") | |
| model.cuda().eval().requires_grad_(False) | |
| tokenizer = AutoTokenizer.from_pretrained(model.name_or_path) |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 5 columns, instead of 3 in line 1.
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
| É sempre importante verificar o protocolo exato do artigo ou guideline que você está seguindo. No geral, a administração do palivizumabe é feita em doses de 15 mg/kg, aplicadas uma vez por mês, iniciando-se antes do início do período de maior incidência do RSV. Porém, alguns centros podem adotar ajustes conforme a evolução clínica do paciente e os riscos adicionais. | |
| user: Se o bebê estiver abaixo de 3,5 kg, ainda mantenho 15 mg/kg ou ajusto de forma diferente? | |
| assistant: Normalmente, a dose de palivizumabe permanece na faixa de 15 mg/kg, independente de variações menores de peso. Contudo, em bebês muito abaixo do percentil de peso ou com condições específicas, é possível que as diretrizes do centro ou artigo que você segue recomendem uma avaliação individual. A dose em mg/kg, em geral, é calculada com base no peso atual do lactente em cada aplicação, para garantir a concentração adequada de anticorpos protetores ao longo do período de risco. | |
| user: Há alguma contraindicação especial para PALIV nesses casos de |
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 pystray import Icon, Menu, MenuItem | |
| from PIL import Image, ImageDraw | |
| import threading | |
| class TrayIcon: | |
| def __init__(self, title="Recording..."): | |
| self.title = title | |
| self.icon = None | |
| self._thread = None |
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 Literal | |
| import asyncio | |
| import numpy as np | |
| from openai import AsyncOpenAI | |
| import tiktoken | |
| def embed( | |
| texts: list[str], | |
| model: Literal[ |
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
| import pandas as pd | |
| import numpy as np | |
| import streamlit as st | |
| st.set_page_config( | |
| page_title="SDC selector", | |
| layout="wide", | |
| ) | |
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
| import pandas as pd | |
| from datasets import Dataset | |
| # Requires transformers 4.48 | |
| from transformers import ( | |
| AutoTokenizer, | |
| AutoModelForSequenceClassification, | |
| TrainingArguments, | |
| Trainer, | |
| DataCollatorWithPadding, | |
| ) |
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 io import StringIO | |
| import re | |
| from time import perf_counter | |
| import json | |
| import yaml | |
| import pandas as pd | |
| import tomlkit | |
| from openai import OpenAI | |
| client = OpenAI() |
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
| # Licensed under the MIT-0 License. See https://opensource.org/licenses/MIT-0 for details. | |
| import re | |
| def markdown_to_unicode(md_text): | |
| """ | |
| Converts Markdown text to Unicode by transforming Markdown syntax for | |
| bold and italic text into their corresponding Unicode characters, | |
| handling lists and headings, and preserving the formatting within code blocks. |
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
| /* Obsidian CSS reference: https://docs.obsidian.md/Reference/CSS+variables/Editor/Code */ | |
| body { | |
| /* Code syntax highlighting */ | |
| --jetbrains-grey-code: #BCBEC4; | |
| --code-normal: --jetbrains-grey-code; | |
| --code-comment: #7A7E85; | |
| --code-function: --jetbrains-grey-code; | |
| --code-important: hotpink; | |
| --code-keyword: #CF8E6D; |
NewerOlder