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 mlx.core as mx | |
| import mlx.nn as nn | |
| from typing import Tuple, Type, Optional, List, Any | |
| import importlib | |
| from transformers import AutoTokenizer | |
| from mlx_lm.utils import load_model, get_model_path | |
| def get_qwen3_embedding_classes(config: dict) -> Tuple[Type[nn.Module], Type]: |
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 Foundation | |
| import UIKit | |
| private let InstagramAppURL = URL(string: "instagram://app")! | |
| class InstagramActivity: UIActivity, UIDocumentInteractionControllerDelegate { | |
| override class var activityCategory: UIActivityCategory { return .share } | |
| override var activityType: UIActivityType? { return UIActivityType("postToInstagram") } | |
| override var activityTitle: String? { return "Instagram" } | |
| override var activityImage: UIImage? { return #imageLiteral(resourceName: "instagram_activity") } |
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
| // | |
| // GIF2MP4.swift | |
| // | |
| // Created by PowHu Yang on 2020/4/24. | |
| // Copyright © 2020 PowHu Yang. All rights reserved. | |
| // | |
| /* How to use | |
| let data = try! Data(contentsOf: Bundle.main.url(forResource: "gif", withExtension: "gif")!) | |
| let tempUrl = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent("temp.mp4") |