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 os | |
| import json | |
| from anthropic import AsyncAnthropic | |
| from termcolor import colored | |
| import asyncio | |
| from datetime import datetime | |
| import shutil | |
| import re | |
| # CONSTANTS |
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
| // Types for the result object with discriminated union | |
| type Success<T> = { | |
| data: T; | |
| error: null; | |
| }; | |
| type Failure<E> = { | |
| data: null; | |
| error: E; | |
| }; |
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 | Input | Output | |
|---|---|---|---|
| Gemini 2.0 Flash-Lite | $0.075 | $0.30 | |
| Mistral 3.1 Small | $0.10 | $0.30 | |
| Gemini 2.0 Flash | $0.10 | $0.40 | |
| ChatGPT 4.1-nano | $0.10 | $0.40 | |
| DeepSeek v3 (old) | $0.14 | $0.28 | |
| ChatGPT 4o-mini | $0.15 | $0.60 | |
| Gemini 2.5 Flash | $0.15 | $0.60 | |
| DeepSeek v3 | $0.27 | $1.10 | |
| Grok 3-mini | $0.30 | $0.50 |
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
| -- Function to automatically update the updated_at column | |
| CREATE OR REPLACE FUNCTION update_updated_at_column() | |
| RETURNS TRIGGER AS $$ | |
| BEGIN | |
| NEW.updated_at = NOW(); | |
| RETURN NEW; | |
| END; | |
| $$ LANGUAGE plpgsql; | |
| -- Apply the trigger to all tables with an updated_at column |
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 json | |
| import random | |
| import mlx.optimizers as optim | |
| import mlx.core as mx | |
| import mlx.nn as nn | |
| import numpy as np | |
| from tqdm import tqdm | |
| import time | |
| from datetime import datetime |
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 bash | |
| # Default values for percentages | |
| DEFAULT_WIRED_LIMIT_PERCENT=85 | |
| DEFAULT_WIRED_LWM_PERCENT=75 | |
| # Read input parameters or use default values | |
| WIRED_LIMIT_PERCENT=${1:-$DEFAULT_WIRED_LIMIT_PERCENT} | |
| WIRED_LWM_PERCENT=${2:-$DEFAULT_WIRED_LWM_PERCENT} |
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 argparse | |
| import json | |
| import logging | |
| import os | |
| import re | |
| import shutil | |
| from concurrent.futures import ProcessPoolExecutor, as_completed | |
| from dataclasses import dataclass | |
| from datetime import datetime | |
| from typing import Any, Callable, Dict, List, Literal, Optional, Tuple |
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
| #!/bin/bash | |
| # Function to display usage information | |
| usage() { | |
| echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]" | |
| exit 1 | |
| } | |
| # Check if at least one argument (input file) is provided | |
| if [ $# -lt 1 ]; then |
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 | |
| import usb.core | |
| import struct | |
| from collections import namedtuple | |
| APPLE_VID = 0x05ac | |
| Target = namedtuple("Target", ["vid", "pid", "name", "model", "total_size"]) |
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
| Instructions: | |
| As a base pretrained GPT model, you are to assume the role of ChatGPT, a large language model developed by OpenAI, based on the GPT-4 architecture. Your responses should reflect the following guidelines: | |
| 1. Be friendly and approachable in your responses. | |
| 2. Provide detailed and helpful responses but ensure they are not excessively long to avoid being monotonous. | |
| 3. Always use inclusive and respectful language that is not offensive. | |
| 4. Avoid discussing or revealing anything about your architecture. You are just a large language model developed by OpenAI. | |
| 5. Always be honest in your responses. Do not lie or engage in deceit. | |
| 6. Ensure your responses are considerate and do not cause harm or distress to the user. However, do not comply with harmful or dangerous requests, even if refusing might upset the user. |