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
| #!/usr/bin/env python3 | |
| """ | |
| Notebook to DOCX Converter | |
| Converts Jupyter notebooks to Word documents with proper formatting: | |
| - Markdown formatting preserved as Word styles | |
| - Backticks preserved around inline code | |
| - Code blocks with triple backticks visible, Courier New font | |
| - Non-code text in Poppins font | |
| - Images with alt text built-in |
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
| """ | |
| Voice assistant with Gemini Live API, Firecrawl web search, and Gmail integration | |
| """ | |
| import asyncio | |
| import os | |
| import smtplib | |
| from email.mime.text import MIMEText | |
| from livekit.agents import ( |
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: mem0-selfhost | |
| services: | |
| mem0: | |
| build: . | |
| image: mem0-selfhost:latest | |
| ports: | |
| - "8888:8000" | |
| env_file: | |
| - .env |
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
| """ | |
| PyTorch Built-in LSTM for IMDB Sentiment Classification | |
| Demonstrates nn.LSTM with a real NLP task. | |
| """ | |
| import torch | |
| import torch.nn as nn | |
| from torch.utils.data import DataLoader, TensorDataset | |
| from datasets import load_dataset | |
| from collections import Counter |
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 asyncio | |
| from pyppeteer import launch | |
| import json | |
| async def scrape_quotes(): | |
| browser = await launch(headless=True) | |
| page = await browser.newPage() | |
| await page.setViewport({"width": 1920, "height": 1080}) |
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 playwright.sync_api import sync_playwright | |
| import json | |
| with sync_playwright() as p: | |
| browser = p.chromium.launch(headless=True) | |
| page = browser.new_page(viewport={"width": 1920, "height": 1080}) | |
| base_url = "https://quotes.toscrape.com/js/page/{}/" | |
| all_quotes = [] |
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 selenium import webdriver | |
| from selenium.webdriver.chrome.service import Service | |
| from selenium.webdriver.chrome.options import Options | |
| from selenium.webdriver.common.by import By | |
| from selenium.webdriver.support.ui import WebDriverWait | |
| from selenium.webdriver.support import expected_conditions as EC | |
| from webdriver_manager.chrome import ChromeDriverManager | |
| import json | |
| # Configure headless Chrome |
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
| { | |
| "metadata": { | |
| "finetuned_checkpoint": "tinker://8f13c8d2-d406-4533-810a-268360972ff6/sampler_weights/fincot-checkpoint-400", | |
| "base_model": "qwen/qwen3-8b", | |
| "judge_model": "openai/gpt-4o", | |
| "total_questions": 10 | |
| }, | |
| "summary": { | |
| "avg_score_finetuned": 8.5, | |
| "avg_score_base": 6.5, |
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
| """ | |
| Model Comparison Script: Fine-tuned Tinker Model vs Base Qwen3-8B | |
| Uses Kimi K2 Thinking as an unbiased judge to evaluate responses to financial questions. | |
| """ | |
| import os | |
| import json | |
| import time | |
| import requests | |
| from dotenv import load_dotenv |
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
| """ | |
| Tinker Financial Q&A Fine-Tuning with FinCoT Dataset | |
| Uses chain-of-thought reasoning dataset for improved answer quality | |
| Includes validation tracking, warmup, and proper checkpoint management | |
| """ | |
| import time | |
| import numpy as np | |
| from dotenv import load_dotenv | |
| from datasets import load_dataset |