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
| def ask_ai_background(ctx): | |
| global app | |
| from openai import OpenAI, AsyncOpenAI | |
| from functools import partial | |
| from feeluown.utils.aio import run_fn, run_afn | |
| from feeluown.library import ModelType | |
| from PyQt5.QtCore import Qt | |
| from PyQt5.QtWidgets import QMessageBox |
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
| class BlurWidget(QWidget): | |
| def __init__(self, *args, **kwargs): | |
| super().__init__(*args, **kwargs) | |
| effect = QGraphicsBlurEffect(self) | |
| effect.setBlurRadius(120) | |
| self.setGraphicsEffect(effect) | |
| self.parent().installEventFilter(self) |
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 Foundation import NSRunLoop, NSMutableDictionary, NSObject | |
| from MediaPlayer import MPRemoteCommandCenter, MPNowPlayingInfoCenter | |
| from MediaPlayer import ( | |
| MPMediaItemPropertyTitle, MPMediaItemPropertyArtist, | |
| MPMusicPlaybackState, MPMusicPlaybackStatePlaying, MPMusicPlaybackStatePaused | |
| ) | |
| class No |
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 MediaPlayer | |
| import Network | |
| let cmdCenter = MPRemoteCommandCenter.shared() | |
| cmdCenter.togglePlayPauseCommand.addTarget{ (e) -> MPRemoteCommandHandlerStatus in | |
| return .success | |
| } |
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 MediaPlayer | |
| import Network | |
| let cmdCenter = MPRemoteCommandCenter.shared() | |
| cmdCenter.togglePlayPauseCommand.addTarget{ (e) -> MPRemoteCommandHandlerStatus in | |
| return .success | |
| } |
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 | |
| from tomlkit import document, value, dumps | |
| from fuocore.models.uri import reverse | |
| from fuo_xiami import provider | |
| user = provider._user | |
| if user is None: | |
| raise Exception('你可能没有登录') |
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 List | |
| class SongDisplayModel: | |
| pass | |
| class SongModel: | |
| pass |
This file has been truncated, but you can view the full file.
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
| goroutine 3620521 [running]: | |
| runtime/pprof.writeGoroutineStacks(0x40a8ae0, 0xc00827fdc0, 0x0, 0x0) | |
| /usr/local/go/src/runtime/pprof/pprof.go:679 +0x9d | |
| runtime/pprof.writeGoroutine(0x40a8ae0, 0xc00827fdc0, 0x2, 0x13951e6, 0xc009e2b340) | |
| /usr/local/go/src/runtime/pprof/pprof.go:668 +0x44 | |
| runtime/pprof.(*Profile).WriteTo(0x5a60da0, 0x40a8ae0, 0xc00827fdc0, 0x2, 0xc00827fdc0, 0xd) | |
| /usr/local/go/src/runtime/pprof/pprof.go:329 +0x3da | |
| net/http/pprof.handler.ServeHTTP(0xc011b55991, 0x9, 0x40fd480, 0xc00827fdc0, 0xc001003400) | |
| /usr/local/go/src/net/http/pprof/pprof.go:245 +0x33a | |
| net/http/pprof.Index(0x40fd480, 0xc00827fdc0, 0xc001003400) |
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
| #include <stdint.h> | |
| #include <sys/ioctl.h> | |
| #include <sys/fcntl.h> | |
| #include <sys/stat.h> | |
| #include <linux/fs.h> | |
| #include <stdio.h> | |
| #include <unistd.h> | |
| #include <errno.h> | |
| int main (int argc, char **argv) { |
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
| def add_download_action(ctx): | |
| from fuocore import aio | |
| from fuocore.models import ModelType, SearchType | |
| global app | |
| def sample(models): | |
| for model in models: | |
| if model.meta.model_type == ModelType.song: | |
| print(str(model)) |
NewerOlder