GRITY_VIOLATED: NTSTATUS = 0xC019005Bu32 as i32;
pub const STATUS_TRANSACTIONMANAGER_IDENTITY_MISMATCH: NTSTATUS = 0xC019005Cu32 as i32;
pub const STATUS_RM_CANNOT_BE_FROZEN_FOR_SNAPSHOT: NTSTATUS = 0xC019005Du32 as i32;
pub const STATUS_TRANSACTION_MUST_WRITETHROUGH: NTSTATUS = 0xC019005Eu32 as i32;
pub const STATUS_TRANSACTION_NO_SUPERIOR: NTSTATUS = 0xC019005Fu32 as i32;
pub const STATUS_EXPIRED_HANDLE: NTSTATUS = 0xC0190060u32 as i32;
pub const STATUS_TRANSACTION_NOT_ENLISTED: NTSTATUS = 0xC0190061u32 as i32;
pub const STATUS_LOG_SECTOR_INVALID: NTSTATUS = 0xC01A0001u32 as i32;
pub const STATUS_LOG_SECTOR_PARITY_INVALID: NTSTATUS = 0xC01A0002u32 as i32;
pub const STATUS_LOG_SECTOR_REMAPPED: NTSTATUS = 0xC01A0003u32 as i32;
pub const STATUS_LOG_BLOCK_INCOMPLETE: NTSTATUS = 0xC01A0004u32 as i32;
pub const STATUS_LOG_INVALID_RANGE: NTSTATUS = 0xC01A0005u32 as i32;
pub const STATUS_LOG_BLOCKS_EXHAUSTED: NTSTATUS = 0xC01A0006u32 as i32;
pub const STATUS_LOG_READ_CONTEXT_INVALID: NTSTATUS = 0xC01A0007u32 as i32;
pub const STATUS_LOG_RESTART_INVALID: NTSTATUS = 0xC01A0008u32 as i32;
pub const STATUS_LOG_BLOCK_VERSION: NTSTATUS = 0xC01A0009u32 as i32;
pub const STATUS_LOG_BLOCK_INVALID: NTSTATUS = 0xC01A000Au32 as i32;
pub const STATUS_LOG_READ_MODE_INVALID: NTSTATUS = 0xC01A000Bu32 as i32;
pub const STATUS_LOG_NO_RESTART: NTSTATUS = 0x401A000C;
pub const STATUS_LOG_METADATA_CORRUPT: NTSTATUS = 0xC01A000Du32 as i32;
pub const STATUS_LOG_METADATA_INVALID: NTSTATUS = 0xC01A000Eu32 as i32;
pub const STATUS_LOG_METADATA_INCONSISTENT: NTSTATUS = 0xC01A000Fu32 as i32;
pub const STATUS_LOG_RESERVATION_INVALID: NTSTATUS = 0xC01A0010u32 as i32;
pub const STATUS_LOG_CANT_DELETE: NTSTATUS = 0xC01A0011u32 as i32;
pub const STATUS_LOG_CONTAINER_LIMIT_EXCEEDED: NTSTATUS = 0xC01A0012u32 as i32;
pub const STATUS_LOG_START_OF_LOG: NTSTATUS = 0xC01A0013u32 as i32;
pub const STATUS_LOG_POLICY_ALREADY_INSTALLED: NTSTATUS = 0xC01A0014u32 as i32;
pub const STATUS_LOG_POLICY_NOT_INSTALLED: NTSTATUS = 0xC01A0015u32 as i32;
pub const STATUS_LOG_POLICY_INVALID: NTSTATUS = 0xC01A0016u32 as i32;
pub const STATUS_LOG_POLICY_CONFLICT: NTSTATUS = 0xC01A0017u32 as i32;
pub const STATUS_LOG_PINNED_ARCHIVE_TAIL: NTSTATUS = 0xC01A0018u32 as i32;
pub const STATUS_LOG_RECORD_NONEXISTENT: NTSTATUS = 0xC01A0019u32 as i32;
pub const STATUS_LOG_RECORDS_RESERVED_INVALID: NTSTATUS = 0xC01A001Au32 as i32;
pub const STATUS_LOG_SPACE_RESERVED_INVALID: NTSTATUS = 0xC01A001Bu32 as i32;
pub const STATUS_LOG_TAIL_INVALID:


 desc, stdout_tx, start_tx: Some(start_tx) };
        let buffer = Cursor::new("1\n2\n3\n4\n5\n6\n");
        let reader_out = BufReader::new(buffer).lines();
        (stdout_rx, status_tx, status_rx, start_rx, create, reader_out)
    }
}<reponame>dpelevin/farmanager-api-rust-bindings
use std::mem;
use std::ptr;

use crate::basic::*;
use crate::common::Enrichable;
use crate::common::string::{WideString, WideStringArray};
use crate::ffi;

pub(super) struct GlobalInfoContext {
    guid: ffi::GUID,
    title: WideString,
    description: WideString,
    author: WideString
}

#[allow(dead_code)]
pub(super) struct PluginMenuItem {
    inner: ffi::PluginMenuItem,
    guids: Box<[ffi::GUID]>,
    strings: WideStringArray,
}

impl From<&Vec<MenuItem>> for PluginMenuItem {
    fn from(menu_items: &Vec<MenuItem>) -> Self {
        let mut guids: Vec<ffi::GUID> = Vec::with_capacity(menu_items.len());
        let mut strings: Vec<WideString> = Vec::with_capacity(menu_items.len());

        for item in menu_items.iter() {
            guids.push(item.guid);
            strings.push(item.label.clone());
        }

        let guids_slice: Box<[ffi::GUID]> = guids.into_boxed_slice();
        let strings_array: WideStringArray = WideStringArray::from(strings);

        PluginMenuItem {
            inner: ffi::PluginMenuItem {
                guids: guids_slice.as_ptr(),
                strings: strings_array.as_ptr(),
                count: strings_array.len(),
            },
            guids: guids_slice,
            strings: strings_array,
        }
    }
}

impl PluginMenuItem {
    pub(super) fn as_raw(&self) -> &ffi::PluginMenuItem {
        &self.inner
    }
}

#[allow(dead_code)]
pub(super) struct PluginInfoContext {
    flags: ffi::PLUGIN_FLAGS,
    disk_menu: PluginMenuItem,
    plugin_menu: PluginMenuItem,
    plugin_config: PluginMenuItem,
    command_prefix: Option<WideString>
}

impl From<PluginInfo> for PluginInfoContext {
    fn from(plugin_info: PluginInfo) -> Self {
        PluginInfoContext {
            flags: plugin_info.flags,
            disk_menu: PluginMenuItem::from(&plugin_info.disk_menu),
            plugin_menu: PluginMenuItem::from(&plugin_info.plugin_menu),
            plugin_config: PluginMenuItem::from(&plugin_info.plugin_config),
            command_prefix: plugin_info.command_prefix
        }
    }
}

pub(super) struct Context {
    plugin_info: Option<PluginInfoContext>,
    global_info: Option<GlobalInfoContext>
}

impl Context {

    pub(super) fn plugin_guid(&self) -> ffi::GUID {
        self.global_info.as_ref().unwrap_or_else(panic_global_info_uninitialized).guid
    }
}

impl Default for Context {

    fn default() -> Context {
        Context {
            plugin_info: None,
            global_info: None,
        }
    }
}

impl Enrichable<Context, GlobalInfo> for ffi::GlobalInfo {
    fn enrich(&mut self, ctx: &mut Context, src: GlobalInfo) {
        ctx.global_info = Some(GlobalInfoContext {
            guid: src.guid,
            title: src.title,
            description: src.description,
            a


:not(.alternate).top-right .bi::before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgba(113, 126, 140, 1)" class="bi bi-toggle-off" viewBox="0 0 16 16"><path d="M11 4a4 4 0 0 1 0 8H8a4.992 4.992 0 0 0 2-4 4.992 4.992 0 0 0-2-4h3zm-6 8a4 4 0 1 1 0-8 4 4 0 0 1 0 8zM0 8a5 5 0 0 0 5 5h6a5 5 0 0 0 0-10H5a5 5 0 0 0-5 5z"/></svg>')}.quarto-color-scheme-toggle.alternate.top-right .bi::before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgba(78, 88, 98, 1)" class="bi bi-toggle-on" viewBox="0 0 16 16"><path d="M5 3a5 5 0 0 0 0 10h6a5 5 0 0 0 0-10H5zm6 9a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"/></svg>')}#quarto-appendix.default{border-top:1px solid #dee2e6}#quarto-appendix.default{background-color:#fff;padding-top:1.5em;margin-top:2em;z-index:998}#quarto-appendix.default .quarto-appendix-heading{margin-top:0;line-height:1.4em;font-weight:600;opacity:.9;border-bottom:none;margin-bottom:0}#quarto-appendix.default .footnotes ol,#quarto-appendix.default .footnotes ol li>p:last-of-type,#quarto-appendix.default .quarto-appendix-contents>p:last-of-type{margin-bottom:0}#quarto-appendix.default .quarto-appendix-secondary-label{margin-bottom:.4em}#quarto-appendix.default .quarto-appendix-bibtex{font-size:.7em;padding:1em;border:solid 1px #dee2e6;margin-bottom:1em}#quarto-appendix.default .quarto-appendix-bibtex code.sourceCode{white-space:pre-wrap}#quarto-appendix.default .quarto-appendix-citeas{font-size:.9em;padding:1em;border:solid 1px #dee2e6;margin-bottom:1em}#quarto-appendix.default .quarto-appendix-heading{font-size:1em !important}#quarto-appendix.default *[role=doc-endnotes]>ol,#quarto-appendix.default .quarto-appendix-contents>*:not(h2):not(.h2){font-size:.9em}#quarto-appendix.default section{padding-bottom:1.5em}#quarto-appendix.default section *[role=doc-endnotes],#quarto-appendix.default section>*:not(a){opacity:.9;word-wrap:break-word}.btn.btn-quarto,div.cell-output-display .btn-quarto{color:#fefefe;background-color:#6c757d;border-color:#6c757d}.btn.btn-quarto:hover,div.cell-output-display .btn-quarto:hover{color:#fefefe;background-color:#828a91;border-color:#7b838a}.btn-check:focus+.btn.btn-quarto,.btn.btn-quarto:focus,.btn-check:focus+div.cell-output-display .btn-quarto,div.cell-output-display .btn-quarto:focus{color:#fefefe;background-color:#828a91;border-color:#7b838a;box-shadow:0 0 0 .25rem rgba(130,138,144,.5)}.btn-check:checked+.btn.btn-quarto,.btn-check:active+.btn.btn-quarto,.btn.btn-quarto:active,.btn.btn-quarto.active,.show>.btn.btn-quarto.dropdown-toggle,.btn-check:checked+div.cell-output-display .btn-quarto,.btn-che


) fn new(bits: bool) -> Self {
        PE_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> PE_A {
        match self.bits {
            false => PE_A::DISABLED,
            true => PE_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        **self == PE_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        **self == PE_A::ENABLED
    }
}
impl core::ops::Deref for PE_R {
    type Target = crate::FieldReader<bool, PE_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `PE` writer - Peripheral enable"]
pub struct PE_W<'a> {
    w: &'a mut W,
}
impl<'a> PE_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: PE_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "Peripheral disabled"]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(PE_A::DISABLED)
    }
    #[doc = "Peripheral enabled"]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(PE_A::ENABLED)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
        self.w
    }
}
impl R {
    #[doc = "Bit 15 - Software reset"]
    #[inline(always)]
    pub fn swrst(&self) -> SWRST_R {
        SWRST_R::new(((self.bits >> 15) & 0x01) != 0)
    }
    #[doc = "Bit 13 - SMBus alert"]
    #[inline(always)]
    pub fn alert(&self) -> ALERT_R {
        ALERT_R::new(((self.bits >> 13) & 0x01) != 0)
    }
    #[doc = "Bit 12 - Packet error checking"]
    #[inline(always)]
    pub fn pec(&self) -> PEC_R {
        PEC_R::new(((self.bits >> 12) & 0x01) != 0)
    }
    #[doc = "Bit 11 - Acknowledge/PEC Position (for data reception)"]
    #[inline(always)]
    pub fn pos(&self) -> POS_R {
        POS_R::new(((self.bits >> 11) & 0x01) != 0)
    }
    #[doc = "Bit 10 - Acknowledge enable"]
    #[inline(always)]
    pub fn ack(&self) -> ACK_R {
        ACK_R::new(((self.bits >>


// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Text.Json.Serialization;

namespace Roslyn.LanguageServer.Protocol;

/// <summary>
/// The params sent in a <c>notebookDocument/didChange</c> notification.
/// <para>
/// See the <see href="https://microsoft.github.io/language-server-protocol/specifications/specification-current/#didChangeNotebookDocumentParams">Language Server Protocol specification</see> for additional information.
/// </para>
/// </summary>
/// <remarks>Since LSP 3.17</remarks>
internal sealed class DidChangeNotebookDocumentParams
{
    /// <summary>
    /// The notebook document that did change. The version number points
    /// to the version after all provided changes have been applied.
    /// </summary>


)

			local currentWidth = self.db.style.trackerWidth * col + self.db.style.trackerHorizontalSpacing * (col - 1)
			if currentWidth > maxWidth then
				row = row + 1
				col = 1
			end

			tracker:SetPoint(
				"TOPLEFT",
				self.frame,
				"TOPLEFT",
				self.db.style.backdropSpacing
					+ self.db.style.trackerWidth * (col - 1)
					+ self.db.style.trackerHorizontalSpacing * (col - 1),
				-self.db.style.backdropSpacing
					- self.db.style.trackerHeight * (row - 1)
					- self.db.style.trackerVerticalSpacing * (row - 1)
			)

			col = col + 1

			tracker.tickFunc()
		end
	end

	self.frame:Height(
		self.db.style.backdropSpacing * 2
			+ self.db.style.trackerHeight * row
			+ self.db.style.trackerVerticalSpacing * (row - 1)
	)
end

function ET:Initialize()
	self.db = E.db.WT.maps.eventTracker

	if not self.db or not self.db.enable or self.initialized then
		return
	end

	self:UpdateTrackers()

	for event in pairs(self.eventHandlers) do
		self:RegisterEvent(event, "HandlerEvent")
	end

	EventRegistry:RegisterCallback("WorldMapOnShow", self.UpdateTrackers, self)
	EventRegistry:RegisterCallback("WorldMapMinimized", E.Delay, E, 0.1, self.UpdateTrackers, self)
	EventRegistry:RegisterCallback("WorldMapMaximized", E.Delay, E, 0.1, self.UpdateTrackers, self)
	self:SecureHook(_G.QuestMapFrame, "Show", "UpdateTrackers")
	self:SecureHook(_G.QuestMapFrame, "Hide", "UpdateTrackers")

	self.initialized = true
end

function ET:ProfileUpdate()
	self:Initialize()

	if self.frame then
		self.frame:SetShown(self.db.enable)
	end
end

W:RegisterModule(ET:GetName())


ne, PartialEq, ::prost::Message)]
pub struct NonceChange {
    #[prost(bytes="vec", tag="1")]
    pub address: ::prost::alloc::vec::Vec<u8>,
    #[prost(uint64, tag="2")]
    pub old_value: u64,
    #[prost(uint64, tag="3")]
    pub new_value: u64,
    #[prost(uint64, tag="4")]
    pub ordinal: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountCreation {
    #[prost(bytes="vec", tag="1")]
    pub account: ::prost::alloc::vec::Vec<u8>,
    #[prost(uint64, tag="2")]
    pub ordinal: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CodeChange {
    #[prost(bytes="vec", tag="1")]
    pub address: ::prost::alloc::vec::Vec<u8>,
    #[prost(bytes="vec", tag="2")]
    pub old_hash: ::prost::alloc::vec::Vec<u8>,
    #[prost(bytes="vec", tag="3")]
    pub old_code: ::prost::alloc::vec::Vec<u8>,
    #[prost(bytes="vec", tag="4")]
    pub new_hash: ::prost::alloc::vec::Vec<u8>,
    #[prost(bytes="vec", tag="5")]
    pub new_code: ::prost::alloc::vec::Vec<u8>,
    #[prost(uint64, tag="6")]
    pub ordinal: u64,
}
/// The gas change model represents the reason why some gas cost has occurred.
/// The gas is computed per actual op codes. Doing them completely might prove
/// overwhelming in most cases.
///
/// Hence, we only index some of them, those that are costy like all the calls
/// one, log events, return data, etc.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GasChange {
    #[prost(uint64, tag="1")]
    pub old_value: u64,
    #[prost(uint64, tag="2")]
    pub new_value: u64,
    #[prost(enumeration="gas_change::Reason", tag="3")]
    pub reason: i32,
    #[prost(uint64, tag="4")]
    pub ordinal: u64,
}
/// Nested message and enum types in `GasChange`.
pub mod gas_change {
    /// Obtain all gas change reasons under deep mind repository:
    ///
    /// ```shell
    /// ack -ho 'GasChangeReason\(".*"\)' | grep -Eo '".*"' | sort | uniq
    /// ```
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Reason {
        Unknown = 0,
        Call = 1,
        CallCode = 2,
        CallDataCopy = 3,
        CodeCopy = 4,
        CodeStorage = 5,
        ContractCreation = 6,
        ContractCreation2 = 7,
        DelegateCall = 8,
        EventLog = 9,
        ExtCodeCopy = 10,
        FailedExecution = 11,
        IntrinsicGas = 12,
        PrecompiledContract = 13,
        RefundAfterExecution = 14,
        Return = 15,
        ReturnDataCopy = 16,
        Revert = 17,
        SelfDestruct = 18,
        StaticCall = 19,
        /// Added in Berlin fork (Geth 1.10+)
        StateColdAccess = 20,
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TransactionTraceStatus {
    Unknown = 0,
    Succeeded = 1,
    Failed = 2,
    Reverted = 3,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enum


"성전사의 철갑투구",
[90101] = "성전사의 다리갑옷",
[90102] = "성전사의 어깨철갑",
[90103] = "성전사의 손목보호구",
[90104] = "깨우는 자의 빛",
[90105] = "백 개의 전쟁 연대기",
[90106] = "몬스터 - Firearm_2h_Rifle_PanDung_C_01",
[90107] = "몬스터 - Firearm_2h_Rifle_PanDung_C_01 - Green",
[90108] = "몬스터 - Firearm_2h_Rifle_PanDung_C_01 - Red",
[90109] = "몬스터 - Firearm_2h_Rifle_PanDung_C_01 - Yellow",
[90110] = "빛의 장식끈",
[90111] = "빛의 발걸음",
[90112] = "빛의 팔보호구",
[90113] = "빛의 견갑",
[90114] = "빛의 로브",
[90115] = "빛의 손",
[90116] = "빛의 수도두건",
[90117] = "빛의 다리보호구",
[90118] = "평범한 검",
[90119] = "소리 없는 자객의 요대",
[90120] = "소리 없는 자객의 두건",
[90121] = "소리 없는 자객의 버선",
[90122] = "소리 없는 자객의 암흑옷",
[90123] = "소리 없는 자객의 장갑",
[90124] = "소리 없는 자객의 다리보호구",
[90125] = "소리 없는 자객의 어깨덮개",
[90126] = "소리 없는 자객의 팔보호구",
[90127] = "질풍의 팔보호구",
[90128] = "질풍의 허리띠",
[90129] = "질풍의 덧신",
[90130] = "질풍의 멜빵",
[90131] = "질풍의 분쇄장갑",
[90132] = "질풍의 가면",
[90133] = "질풍의 다리보호대",
[90134] = "질풍의 영혼 길잡이",
[90135] = "삼겹살",
[90136] = "배신자의 허리띠",
[90137] = "�


href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>

Module llmflex.Models.Cores.openai_core

Expand source code

from __future__ import annotations
import os, json
from requests.models import Response
from requests import get, post
from .base_core import BaseCore
from typing import List, Any, Optional, Dict, Union, Iterator

def parse_sse(response: Response) -> Iterator[Dict[str, Any]]:
    """Parsing streaming response from llama server.

    Args:
        response (Response): Response object from the llama server.

    Yields:
        Generator[Dict[str, Any]]: Dictionary with text tokens in the content.
    """
    buffer = ""
    for chunk in response.iter_content(chunk_size=None, decode_unicode=True):
        buffer += chunk
        while "\n\n" in buffer:
            event, buffer = buffer.split("\n\n", 1)
            event = event.strip()
            if event.startswith("data: "):
                yield json.loads(event[6:])

class OpenAICore(BaseCore):
    """Core class for llm models using openai api interface.
    """
    def __init__(self, base_url: Optional[str] = None, api_key: Optional[str] = None, model_id: Optional[str] = None,
                 tokenizer_id: Optional[str] = None, tokenizer_kwargs: Optional[Dict[str, Any]] = None) -> None:
        """Initialising the llm core.

        Args:
            base_url (Optional[str], optional): URL for the model api endpoint, if None is given, it will use the default URL for OpenAI api. Defaults to None.
            api_key (Optional[str], optional): If using OpenAI api, API key should be provided. Defaults to None.
            model_id (Optional[str], optional): If using OpenAI api or using an api with multiple models, please provide the model to use. Otherwise 'gpt-3.5-turbo' or the first available model will be used by default. Defaults to None.
            tokenizer_id (Optional[str], optional): If not using OpenAI api, repo_id to get the tokenizer from HuggingFace must be provided. Defaults to None.
            tokenizer_kwargs (Optional[Dict[str, Any]], optional): If not using OpenAI api, kwargs can be passed to load the tokenizer from HuggingFace.


in if the value is less than min', () => {
      expect(clampNumber(-5, 0, 5)).toBe(0);
    });

    it('should return same value if the it is in min/max range', () => {
      expect(clampNumber(2, 0, 5)).toBe(2);
    });
  });

  describe('sortStringsAlphabetically', () => {
    it('sort strings alphabetically', () => {
      const arr = ['ccc', 'zzz', 'aaa', 'bbb'];
      arr.sort(sortStringsAlphabetically);

      expect(arr).toEqual(['aaa', 'bbb', 'ccc', 'zzz']);
    });
  });

  describe('extractValidStrings', () => {
    const arr = [
      {
        id: 229468419218757,
        description: 'Sea water system',
      },
      {
        id: 4652973256993338,
        description: 'Main pump for system 11',
      },
      {
        id: 1184192428522618,
        description: 'Heating cable for pump A',
      },
      {
        id: 8652613591094498,
        description: 'Backup pump for system 11',
      },
    ];

    it.each`
      minLen       | maxLen       | expected
      ${undefined} | ${undefined} | ${['Sea water system']}
      ${24}        | ${30}        | ${['Backup pump for system 11']}
    `(
      'Filters responce strings length from 5 to 20 chars and with custom from $minLen to $maxLen',
      ({ minLen, maxLen, expected }) => {
        expect(
          extractValidStrings((arr as any) as Asset[], maxLen, minLen)
        ).toEqual(expected);
      }
    );
  });

  describe('WebCamCropper', () => {
    describe('Camera direction', () => {
      it('should be horizontal', () => {
        expect(shouldScaleYAxis(720, 1280, 1029, 1631)).toBeTruthy();
      });
      it('should be vertical', () => {
        expect(shouldScaleYAxis(720, 1280, 1029, 1948)).toBeFalsy();
      });
    });

    describe('AdjustCropSizeToVideoResolution', () => {
      it('should return undefined when cropsize is undefined', () => {
        expect(
          scaleCropSizeToVideoResolution(0, 0, 0, 0, undefined)
        ).toBeUndefined();
      });
      const cropSize = { width: 400, height: 200 };
      it('should scale 1 to 1', () => {
        const px = 1000;
        const scaled = scaleCropSizeToVideoResolution(px, px, px, px, cropSize);
        expect(scaled).toEqual({ width: 400, height: 200 });
      });

      it('should scale 1 to 2', () => {
        const px = 1000;
        const scaled = scaleCropSizeToVideoResolution(
          px / 2,
          px / 2,
          px,
          px,
          cropSize
        );
        expect(scaled).toEqual({ width: 200, height: 100 });
      });
    });

    describe('ScaleDomToVideoResolution', () => {
      it('should scale correctly', () => {
        const scaled = scaleDomToVideoResolution(10, 10, 20, 20);
        expect(scaled).toBeDefined();
      });
      it('should scale horizontaly with height but not width', () => {
        const sourceClientWidth = 1154;
        const sourceClientHeight = 1029;
        const scaled = scaleDomToVideoResolution(
          720,
          1280,
          sourceClientHeight,
          sourceClientWidth
        );
        expect(scaled).toEqual({
          clientHeight: 649, // this is scaled
          clientWidth: sourceClientWidth,
        });
      });
      it('should scale vertically with width but not height', () => {
        const sourceClientWidth = 2000;
        const sourceClientHeight = 1001;
        const scaled = scaleDomToVideoResolution(
          720,
          1280,
          sourceClientHeight,
          sourceClientWidth
        );
        expect(scaled).toEqual({
          clientHeight: sourceClientHeight,
          clientWidth: 1780, // this is scaled
        });


택사항:
  좌클릭 - 위치조정 프레임 호출.
  우클릭 - 상세 옵션 열기.
  Shift + 우클릭 - 프레임을 잠깐 숨깁니다.
  Ctrl + 우클릭 - 프레임 위치를 기본값으로 초기화합니다.
]=]

L["EHELP_COMMANDS"] = ([=[*ElvUI의 주요 명령어 목록입니다.|r 명령어:
 */ec|r or */elvui|r  -  ElvUI *설정|r을 열거나 닫습니다.
 */kb|r  -  단축키 설정 모드를 켭니다.
 */emove|r  -  프레임 이동 모드를 켭니다.
 */ereset|r  -  모든 프레임을 원래 위치로 재설정합니다.
 */bgstats|r  -  전장전용 정보문자 통계를 ON/OFF합니다.
 */estatus|r  -  ElvUI의 AddOn 상세 정보와 Plugins 정보창을 표시합니다.


import random

def bfs(graph, start, visited=None):
    if visited is None:
        visited = set()
    queue = [start]
    visited.add(start)
    print(start)
    while queue:
        current = queue.pop(0)
        for neighbor in graph[current] - visited:
            print(neighbor)
            queue.append(neighbor)
            visited.add(neighbor)
    return visited

def dfs(graph, start, visited=None):
    if visited is None:
        visited = set()
    visited.add(start)
    print(start)
    for next_node in graph[start] - visited:
        dfs(graph, next_node, visited)
    return visited

def create_graph():
    graph = {}
    num_nodes = int(input("Enter the number of nodes: "))
    for node in range(num_nodes):
        graph[str(node)] = set()
    num_edges = int(input("Enter the number of edges: "))
    for _ in range(num_edges):
        edge = input("Enter edge (format: node1 node2): ").split()
        node1, node2 = edge
        graph[node1].add(node2)
        graph[node2].add(node1)
    return graph

def main():
    graph = create_graph()
    while True:
        print("\nMenu:")
        print("1. Breadth-First Search (BFS)")
        print("2. Depth-First Search (DFS)")
        print("3. Reset Graph")
        print("4. Exit")
        choice = input("Enter your choice: ")
        if choice == '1':
            start_node = input("Enter the start node for BFS: ")
            print("BFS Traversal:")
            bfs(graph, start_node)
        elif choice == '2':
            start_node = input("Enter the start node for DFS: ")
            print("DFS Traversal:")
            dfs(graph, start_node)
        elif choice == '3':
            print("Resetting graph.")
            graph = create_graph()
        elif choice == '4':
            print("Exiting program.")
            break
        else:
            print("Invalid choice. Please enter a valid option.")

if __name__ == "__main__":
    main()


r \xA0][^\w\t\n\r \xA0\"\'\-\+=]*/]
        ]),
    ['lua']);
// Copyright (C) 2006 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * @fileoverview
 * some functions for browser-side pretty printing of code contained in html.
 *
 *

 * For a fairly comprehensive set of languages see the
 * README
 * file that came with this source.  At a minimum, the lexer should work on a
 * number of languages including C and friends, Java, Python, Bash, SQL, HTML,
 * XML, CSS, Javascript, and Makefiles.  It works passably on Ruby, PHP and Awk
 * and a subset of Perl, but, because of commenting conventions, doesn't work on
 * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class.
 *

 * Usage:

 *
 include this source file in an html page via
 *   {@code }
 *
 define style rules.  See the example page for examples.
 *
 mark the {@code
} and {@code } tags in your source with
 *    {@code class=prettyprint.}
 *    You can also use the (html deprecated) {@code <xmp>} tag, but the pretty
 *    printer needs to do more substantial DOM manipulations to support that, so
 *    some css styles may not be preserved.
 *

 * That's it.  I wanted to keep the API as simple as possible, so there's no
 * need to specify which language the code is in, but if you wish, you can add
 * another class to the {@code
} or {@code } element to specify the
 * language, as in {@code
}.  Any class that
 * starts with "lang-" followed by a file extension, specifies the file type.
 * See the "lang-*.js" files in this directory for code that implements
 * per-language file handlers.
 *

 * Change log:

 * cbeust, 2006/08/22
 *

 *   Java annotations (start with "@") are now captured as literals ("lit")
 *

 * @requires console
 */

// JSLint declarations
/*global console, document, navigator, setTimeout, window, define */

/** @define {boolean} */
var IN_GLOBAL_SCOPE = true;

/**
 * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
 * UI events.
 * If set to {@code false}, {@code prettyPrint()} is synchronous.
 */
window['PR_SHOULD_USE_CONTINUATION'] = true;

/**
 * Pretty print a chunk of code.
 * @param {string} sourceCodeHtml The HTML to pretty print.
 * @param {string} opt_langExtension The language name to use.
 *     Typically, a filename extension like 'cpp' or 'java'.
 * @param {number|boolean} opt_numberLines True to number lines,
 *     or the 1-indexed number of the first line in sourceCodeHtml.


amref name="identifier"/> to the set of known identifiers.
    /// </summary>
    /// <param name="identifier">The identifier to add.</param>
    public void AddKnownIdentifier (string identifier)
    {
      ArgumentUtility.CheckNotNullOrEmpty ("identifier", identifier);
      _knownIdentifiers.Add (identifier);
    }

    private bool IsKnownIdentifier (string identifier)
    {
      ArgumentUtility.CheckNotNullOrEmpty ("identifier", identifier);
      return _knownIdentifiers.Contains (identifier);
    }

    public void Reset ()
    {
      _knownIdentifiers.Clear();
      _identifierCounter = 0;
    }

    /// <summary>
    /// Gets a unique identifier starting with the given <paramref name="prefix"/>. The identifier is generating by appending a number to the
    /// prefix so that the resulting string does not match a known identifier.
    /// </summary>
    /// <param name="prefix">The prefix to use for the identifier.</param>
    /// <returns>A unique identifier starting with <paramref name="prefix"/>.</returns>
    public string GetUniqueIdentifier (string prefix)
    {
      ArgumentUtility.CheckNotNullOrEmpty ("prefix", prefix);

      string identifier;
      do
      {
        identifier = prefix + _identifierCounter;
        ++_identifierCounter;
      } while (IsKnownIdentifier (identifier));

      return identifier;
    }
  }
}


data->clk[count];
		if (idx == sclk->id)
			return &sclk->hw;
	}

	return ERR_PTR(-EINVAL);
}

static int scpi_clk_add(struct device *dev, struct device_node *np,
			const struct of_device_id *match)
{
	int idx, count, err;
	struct scpi_clk_data *clk_data;

	count = of_property_count_strings(np, "clock-output-names");
	if (count < 0) {
		dev_err(dev, "%pOFn: invalid clock output count\n", np);
		return -EINVAL;
	}

	clk_data = devm_kmalloc(dev, sizeof(*clk_data), GFP_KERNEL);
	if (!clk_data)
		return -ENOMEM;

	clk_data->clk_num = count;
	clk_data->clk = devm_kcalloc(dev, count, sizeof(*clk_data->clk),
				     GFP_KERNEL);
	if (!clk_data->clk)
		return -ENOMEM;

	for (idx = 0; idx < count; idx++) {
		struct scpi_clk *sclk;
		const char *name;
		u32 val;

		sclk = devm_kzalloc(dev, sizeof(*sclk), GFP_KERNEL);
		if (!sclk)
			return -ENOMEM;

		if (of_property_read_string_index(np, "clock-output-names",
						  idx, &name)) {
			dev_err(dev, "invalid clock name @ %pOFn\n", np);
			return -EINVAL;
		}

		if (of_property_read_u32_index(np, "clock-indices",
					       idx, &val)) {
			dev_err(dev, "invalid clock index @ %pOFn\n", np);
			return -EINVAL;
		}

		sclk->id = val;

		err = scpi_clk_ops_init(dev, match, sclk, name);
		if (err) {
			dev_err(dev, "failed to register clock '%s'\n", name);
			return err;
		}

		dev_dbg(dev, "Registered clock '%s'\n", name);
		clk_data->clk[idx] = sclk;
	}

	return of_clk_add_hw_provider(np, scpi_of_clk_src_get, clk_data);
}

static int scpi_clocks_remove(struct platform_device *pdev)
{
	struct device *dev = &pdev->dev;
	struct device_node *child, *np = dev->of_node;

	if (cpufreq_dev) {
		platform_device_unregister(cpufreq_dev);
		cpufreq_dev = NULL;
	}

	for_each_available_child_of_node(np, child)
		of_clk_del_provider(np);
	return 0;
}

static int scpi_clocks_probe(struct platform_device *pdev)
{
	int ret;
	struct device *dev = &pdev->dev;
	struct device_node *child, *np = dev->of_node;
	const struct of_device_id *match;

	if (!get_scpi_ops())
		return -ENXIO;

	for_each_available_child_of_node(np, child) {
		match = of_match_node(scpi_clk_match, child);
		if (!match)
			continue;
		ret = scpi_clk_add(dev, child, match);
		if (ret) {
			scpi_clocks_remove(pdev);
			of_node_put(child);
			return ret;
		}

		if (match->data != &scpi_dvfs_ops)
			continue;
		/* Add the virtual cpufreq device if it's DVFS clock provider */
		cpufreq_dev = platform_device_register_simple("scpi-cpufreq",
							      -1, NULL, 0);
		if (IS_ERR(cpufreq_dev))
			pr_warn("unable to register cpufreq device");
	}
	return 0;
}

static const struct of_device_id scpi_clocks_ids[] = {
	{ .compatible = "arm,scpi-clocks", },
	{}
};
MODULE_DEVICE_TABLE(of, scpi_clocks_ids);

static struct platform_driver scpi_clocks_driver = {
	.driver	= {
		.name = "scpi_clocks",
		.of_match_table = scpi_clocks_ids,
	},
	.probe = scpi_clocks_probe,
	.remove = scpi_clocks_remove,
};
module_platform_driver(scpi_clocks_driver);

MODULE_AUTHOR("Sudeep Holla <sudeep.holla@arm.com>");
MODULE_DESCRIPTION("ARM SCPI clock driver");
MODULE_LICENSE("GPL v2");


			"+1.1%"
				},
				{
					"13.8%",
					"+1.2%"
				},
				{
					"15.0%"
				}
			}
		}
	},
	[3031] = {
		desc_get = "",
		name = "支援空母",
		type = 3,
		max_level = 10,
		desc = "自身の航空攻撃後、前衛艦隊の耐久を$1回復する",
		id = 3031,
		system_transform = {},
		world_death_mark = {
			1
		},
		desc_get_add = {
			{
				"3.5%",
				"8.0%"
			}
		},
		desc_add = {
			{
				{
					"3.5%",
					"+0.5%"
				},
				{
					"4.0%",
					"+0.5%"
				},
				{
					"4.5%",
					"+0.5%"
				},
				{
					"5.0%",
					"+0.5%"
				},
				{
					"5.5%",
					"+0.5%"
				},
				{
					"6.0%",
					"+0.5%"
				},
				{
					"6.5%",
					"+0.5%"
				},
				{
					"7.0%",
					"+0.5%"
				},
				{
					"7.5%",
					"+0.5%"
				},
				{
					"8.0%"
				}
			}
		}
	},
	[3041] = {
		desc_get = "",
		name = "制空支援",
		type = 3,
		max_level = 10,
		desc = "自身の航空攻撃後、8秒間自身以外の航空母艦の航空値が$1アップ",
		id = 3041,
		system_transform = {},
		world_death_mark = {
			1
		},
		desc_get_add = {
			{
				"5%",
				"15%"
			}
		},
		desc_add = {
			{
				{
					"5.0%",
					"+1.1%"
				},
				{
					"6.1%",
					"+1.1%"
				},
				{
					"7.2%",
					"+1.1%"
				},
				{
					"8.3%",
					"+1.1%"
				},
				{
					"9.4%",
					"+1.1%"
				},
				{
					"10.5%",
					"+1.1%"
				},
				{
					"11.6%",
					"+1.1%"
				},
				{
					"12.7%",
					"+1.1%"
				},
				{
					"13.8%",
					"+1.2%"
				},
				{
					"15.0%"
				}
			}
		}
	},
	[3051] = {
		desc_get = "",
		name = "航空援護",
		type = 2,
		max_level = 10,
		desc = "自身の航空攻撃後、8秒間味方前衛艦隊が受けるダメージを$1軽減する。",
		id = 3051,
		system_transform = {},
		world_death_mark = {
			1
		},
		desc_get_add = {
			{
				"5%",
				"15%"
			}
		},
		desc_add = {
			{
				{
					"5.0%",
					"+1.1%"
				},
				{
					"6.1%",
					"+1.1%"
				},
				{
					"7.2%",
					"+1.1%"
				},
				{
					"8.3


local mod = klhtm
local me = {}
mod.alert = me

----------------------
-- Aggro loss / gain notification

-- This stuff is just debug material, to print out your threat when you gain or lose aggro.
----------------------

me.notifyaggro = false
me.targetname = "nil"
me.targettargetname = "nil"

function klhtest()

	me.notifyaggro = not me.notifyaggro

	if me.notifyaggro == true then
		mod.out.print("Now notifying you of aggro changes.")
	else
		mod.out.print("No longer notifying you of aggro changes.")
	end

end

me.onupdate = function()

	if me.notifyaggro == false then
		return
	end

	-- get current ID's. If you are targetting friend, then use HIS targets
	local targetid = "target"
	local doubletargetid = "targettarget"

	if UnitIsFriend("player", "target") then
		targetid = targetid .. "target"
		doubletargetid = doubletargetid .. "target"
	end

	-- check for valid targets
	if UnitIsFriend("player", targetid) then
		-- there are no enemies around. don't do anything
		me.targetname = "nil"
		return
	end

	-- now see if the target has changed
	local targetnow = UnitName(targetid)

	if targetnow == nil or targetnow == "Unknown Entity" then
		-- no mob targetted. ignore
		targetnow = "nil"
		return
	end

	-- get target target name
	local doubletargetnow = UnitName(doubletargetid)
	if doubletargetnow == nil then
		doubletargetnow = "nil"
	end

	-- check for target change
	if targetnow ~= me.targetname then

		-- target change. ignore targettarget therefore
		me.targetname = targetnow
		me.targettargetname = doubletargetnow
		return
	end

	-- to get here, target is valid and is the same. we want to see if targettarget is changed

	-- is change?
	if doubletargetnow ~= me.targettargetname then

		-- changed to nil
		if doubletargetnow == "nil" then


related commands",description:"print the source code for the constraints",details:"\n      This command will print the Prolog source code used by the constraints engine. Adding the `-v,--verbose` flag will print the *full* source code, including the fact database automatically compiled from the workspace manifests.\n    ",examples:[["Prints the source code","yarn constraints source"],["Print the source code and the fact database","yarn constraints source -v"]]});Ye();Ye();qt();v2();var g0=class extends ut{constructor(){super(...arguments);this.fix=ge.Boolean("--fix",!1,{description:"Attempt to automatically fix unambiguous issues, following a multi-pass process"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd);await o.restoreInstallState();let a=await o.loadUserConfig(),n;if(a?.constraints)n=new IC(o);else{let{Constraints:h}=await Promise.resolve().then(()=>(x2(),b2));n=await h.find(o)}let u,A=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let E=await n.process();if(!E)break;let{changedWorkspaces:I,remainingErrors:v}=gk(o,E,{fix:this.fix}),x=[];for(let[C,R]of I){let N=C.manifest.indent;C.manifest=new Ot,C.manifest.indent=N,C.manifest.load(R),x.push(C.persistManifest())}if(await Promise.all(x),!(I.size>0&&h>1)){u=qde(v,{configuration:r}),A=!1,p=!0;for(let[,C]of v)for(let R of C)R.fixable?A=!0:p=!1}}if(u.children.length===0)return 0;if(A){let h=p?`Those errors can all be fixed by running ${de.pretty(r,"yarn constraints --fix",de.Type.CODE)}`:`Errors prefixed by '\u2699' can be fixed by running ${de.pretty(r,"yarn constraints --fix",de.Type.CODE)}`;await Lt.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async E=>{E.reportInfo(0,h),E.reportSeparator()})}return u.children=_e.sortMap(u.children,h=>h.value[1]),$s.emitTree(u,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};g0.paths=[["constraints"]],g0.usage=nt.Usage({category:"Constraints-related commands",description:"check that the project constraints are met",details:`
      This command will run constraints on your project and emit errors for each one that is found but isn't met. If any error is emitted the process will exit with a non-zero exit code.

      If the \`--fix\` flag is used, Yarn will attempt to automatically fix the issues the best it can, following a multi-pass process (with a maximum of 10 iterations). Some ambiguous patterns cannot be autofixed, in which case you'll have to manually specify the right resolution.

      For more information as to how to write constraints, please consult our dedicated page on our website: https://yarnpkg.com/features/constraints.
    `,examples:[["Check that all constraints are satisfied","yarn constraints"],["Autofix all unmet constraints","yarn constraints --fix"]]});v2();var tdt={configuration:{enableConstraintsChecks:{description:"If true, constraints will run during installs",type:"BOOLEAN",


.any(l, _isGt3),
  'any (miss)': (l) => _nintFeats.any(l, _isNeg),
  'every': (l) => _nintFeats.every(l, _isGt3),
  'every (full)': (l) => _nintFeats.every(l, _isNum),
  'skip': (l) => _nintFeats.skip(l, 3),
  'skip while': (l) => _nintFeats.skipWhile(l, _isInt),
  'skip while (miss)': (l) => _nintFeats.skipWhile(l, _isNeg),
  'take': (l) => _nintFeats.take(l, 3),
  'take while': (l) => _nintFeats.takeWhile(l, _isInt),
  'take while (miss)': (l) => _nintFeats.takeWhile(l, _isNeg),
  'where': (l) => _nintFeats.where(l, _isGt4),
  'where (miss)': (l) => _nintFeats.where(l, _isNeg),
  'where type': _nintFeats.whereType<Null>,
  'where type (miss)': _nintFeats.whereType<String>,
  'singleWhere': (l) => _nintFeats.singleWhere(l, (n) => n == 2, null),
  'singleWhere (match)': (l) => _nintFeats.singleWhere(l, (n) => n == 2, _nf),
  'singleWhere (many)': (l) => _nintFeats.singleWhere(l, _isGt3, null),
  'singleWhere (-1 on many)': (l) => _nintFeats.singleWhere(l, _isGt3, _nf),
  'firstWhere': (l) => _nintFeats.firstWhere(l, _isGt4, null),
  'firstWhere (match)': (l) => _nintFeats.firstWhere(l, _isGt4, _nf),
  'firstWhere (miss)': (l) => _nintFeats.firstWhere(l, _isNeg, null),
  'firstWhere (-1 on miss)': (l) => _nintFeats.firstWhere(l, _isNeg, _nf),
  'lastWhere': (l) => _nintFeats.lastWhere(l, _isGt4, null),
  'lastWhere (match)': (l) => _nintFeats.lastWhere(l, _isGt4, _nf),
  'lastWhere (miss)': (l) => _nintFeats.lastWhere(l, _isNeg, null),
  'lastWhere (-1 on miss)': (l) => _nintFeats.lastWhere(l, _isNeg, _nf),
  'forEach': (l) => _nintFeats.forEach(l, (_) {}),
  'concat': (l) => _nintFeats.concat(l, _ix),
  'concat (empty)': (l) => _nintFeats.concat(l, []),
  'add': (l) => _nintFeats.add(l, _ix.first),
  'addAll': (l) => _nintFeats.addAll(l, _ix),
  'followedBy': (l) => _nintFeats.followedBy(l, _ix),
  'fillRange': (l) => _nintFeats.fillRange(l, 3, 5, _ix.first),
  'fillRange (all)': (l) => _nintFeats.fillRange(l, 0, l.length, _ix.first),
  'fillRange (invalid)': (l) =>
      _nintFeats.fillRange(l, -1, l.length, _ix.first),
  'setAll (start)': (l) => _nintFeats.setAll(l, 0, _ix),
  'setAll (mid)': (l) => _nintFeats.setAll(l, 3, _ix),
  'setAll (end)': (l) => _nintFeats.setAll


="0px" y="0px" viewBox="0 0 141.8 131.9" enable-background="new 0 0 141.8 131.9" xml:space="preserve"> <g id="Layer_1" display="none"> <g display="inline"> <g> <path fill="#58595B" d="M37.6,107.5c-1.2,0-2.4-0.4-3.3-1.2c-1.1-0.9-1.7-2.2-1.7-3.6c-0.1-1.8-1-44.6,23-65.6 C90.9,0.4,134.9,0,136.8,0c1.5,0,2.8,0.6,3.8,1.7c1,1.1,1.4,2.6,1.1,4c-7.3,46.4-32.2,75.8-34.7,78.6 c-5.6,7.4-18.6,13.3-39.8,18.1c-15.1,3.4-28.5,4.9-29.1,5C38,107.5,37.8,107.5,37.6,107.5z M130.7,10.5 c-12.7,1.5-43.1,7.7-68.1,33.6c-0.1,0.1-0.2,0.2-0.3,0.3c-15.9,13.9-19,40.8-19.6,52.4c20.4-2.8,49.7-9.5,56.3-18.6 c0.1-0.1,0.2-0.3,0.3-0.4C99.6,77.6,122.5,51.6,130.7,10.5z"/> </g> <g> <path fill="#58595B" d="M77.8,131.9c-0.5,0-1-0.1-1.5-0.2c-1.9-0.6-3.2-2.3-3.4-4.3c-1.1-11.7-4.7-23.8-7.4-24.9l1.7-9.9 c8.1,1.3,12.1,12.8,14.1,22.8l15.6-17.8v-15h10v16.8c0,1.2-0.4,2.4-1.2,3.3l-24,27.3C80.6,131.3,79.2,131.9,77.8,131.9z"/> </g> <g> <path fill="#58595B" d="M38.4,74.7c-10.9-9.7-23.5-7.4-23.7-7.3c-2.2,0.4-4.5-0.7-5.5-2.7c-1-2-0.5-4.5,1.2-6l26.2-22.5 c0.9-0.8,2.1-1.2,3.3-1.2h19.8v10H41.8L26.7,58c5.6,1.2,12.2,3.8,18.4,9.3L38.4,74.7z"/> </g> <g> <path fill="#58595B" d="M13.8,131.9c-2.8,0-5-2.2-5-5c0-21.6,4.7-36.6,14.1-44.7c8.1-7,16.4-6.1,17.3-5.9 c2.7,0.4,4.6,2.9,4.3,5.6c-0.4,2.7-2.9,4.6-5.6,4.3c-0.3,0-5-0.4-9.6,3.8c-4.8,4.3-10.4,14.2-10.4,


by running
`towles-tool setup` or `tt setup` command.
            """
        )
        exit(1)

    # if create and reset and file exists, remove it
    if create and reset and os.path.exists(cache_file_path):
        logger.info(f"Resetting cache file at {cache_file_path}")
        os.remove(cache_file_path)

    # if create and file does not exist, create it
    if create and not os.path.exists(cache_file_path):
        logger.info(f"Creating cache file at {cache_file_path}")

        # If a config file is specified, use it; otherwise, use the default config file name
        if not config_file:
            config_file = get_config_file_path()

        os.makedirs(os.path.dirname(cache_file_path), exist_ok=True)

        # Create a default cache using the Pydantic model
        default_cache = ConfigCacheFileContents(location_of_personal_config=config_file)
        # Write the cache to file using YAML
        with open(cache_file_path, "w") as f:
            yaml.dump(default_cache.model_dump(), f)

        logger.info(f"Cache file created at {cache_file_path}")

    # Here you would load the config file, e.g. using PyYAML or similar
    # For now, just return the filename

    # Read and validate the config file using Pydantic and YAML

    with open(cache_file_path) as f:
        config_cache_yaml = yaml.safe_load(f)
        config_cache = ConfigCacheFileContents(**config_cache_yaml)

    return config_cache


i bisa ga umarnin mai sayarwa kuma nan da nan danna \"Na biya\" - wannan zai sanar da mai sayarwa cewa biyan kuɗi ya cika kuma ya hana mai sayarwa daga soke cinikin.';

  @override
  String get guide250Sbnon8722Sbcustodial250Sbbuy250Sb7 => 'Da zarar mai siyar ya tabbatar da karɓar kuɗin ku, za su fara sasantawar ciniki. Za ku ga cewa matsayin ciniki zai canza zuwa \"Processing\". A wannan gaba, babu wani abu kuma da kuke buƙatar yin - za a tura kuɗin zuwa adireshin walat ɗin da kuka bayar ta atomatik. Wannan zai ɗauki ɗan lokaci (yawanci kusan mintuna 10-60), don haka kawai ku shakata kuma ku jira ciniki mai shigowa ya bayyana a cikin walat ɗin ku. Lura, za a cire kuɗin mu\'amalar hanyar sadarwar da ke da alaƙa da ciniki daga adadin cinikin, ma\'ana za ku sami ƙasa da abin da aka nuna akan shafin kasuwanci.';

  @override
  String get guide250Sbnon8722Sbcustodial250Sbbuy250Sb8 => 'Shi ke nan! Da zarar an gama sasantawar ciniki kuma kun karɓi tsabar kuɗin ku, zaku iya ganin cikakkun bayanan sasantawa ta hanyar faɗaɗa sashin \"Bayanan ciniki\" akan shafin kasuwanci. Kar a manta da barin ra\'ayi game da gogewar ku tare da wannan mai siyar!';

  @override
  String guide250Sbnon8722Sbcustodial250Sbregister(Object appName) {
    return ' Yi rijistar asusu tare da $appName. Idan kuna da asusu, tsallake zuwa mataki na gaba.';
  }

  @override
  String guide250Sbnon8722Sbcustodial250Sbsell250Sb1(Object appName) {
    return 'Ajiye tsabar kuɗin zuwa walat ɗin hukunci  $appName . Za ku ga adireshin ajiyar ku $appName a ƙarƙashin shafin \"karba\".';
  }

  @override
  String get guide250Sbnon8722Sbcustodial250Sbsell250Sb2 => 'Je zuwa babban shafin   kuma a cikin akwatin nema, zaɓi \"Siyar\". Kuna iya ƙara tace sakamakonku ta shigar da adadin da ake so da canza kuɗi, ƙasa ko hanyar biyan kuɗi (zaɓa \"Dukkan tayin kan layi\" idan ba ku da tabbacin hanyar biyan kuɗi da kuke son amfani da ita) a cikin akwatin nema. Danna \"Search\".';

  @override
  String get guide250Sbnon8722Sbcustodial250Sbsell250Sb2250Sb1 => 'Ana ɗaukar wasu hanyoyin biyan kuɗi  haɗari mai girma . Kasuwancin Cryptocurrency gaba daya ba za su iya dawowa ba. Idan an juyar da kuɗin da mai


� 드?칸 정예 암습병.
			case 244604: //?드?투 군단 드?칸 정예 마법병.
			/*** Player Lvl 70 ***/
			case 244634: //오릿사 군단 드?칸 정예 전투병.
			case 244635: //오릿사 군단 드?칸 정예 전투병.
			case 244636: //오릿사 군단 드?칸 정예 전투병.
			case 244637: //오릿사 군단 드?칸 정예 전투병.
			case 244638: //바카르마 군단 드?칸 정예 전투병.
			case 244639: //바카르마 군단 드?칸 정예 전투병.
			case 244640: //바카르마 군단 드?칸 정예 전투병.
			case 244641: //바카르마 군단 드?칸 정예 전투병.
			case 244642: //?드?투 군단 드?칸 정예 암습병.
			case 244643: //?드?투 군단 드?칸 정예 암습병.
			case 244644: //?드?투 군단 드?칸 정예 암습병.
			case 244645: //?드?투 군단 드?칸 정예 마법병.
			/*** Player Lvl 71 ***/
			case 244675: //오릿사 군단 드?칸 정예 전투병.
			case 244676: //오릿사 군단 드?칸 정예 전투병.
			case 244677: //오릿사 군단 드?칸 정예 전투병.
			case 244678: //오릿사 군단 드?칸 정예 전투병.
			case 244679: //바카르마 군단 드?칸 정예 전투병.
			case 244680: //바카르마 군단 드?칸 정예 전투병.
			case 244681: //바카르마 군단 드?칸 정예 전투병.
			case 244682: //바카르마 군단 드?칸 정예 전투병.
			case 244683: //?드?투 군단 드?칸 정예 암습병.
			case 244684: //?드?투 군단 드?칸 정예 암습병.
			case 244685: //?드?투 군


/* $NetBSD: lroundf.c,v 1.3 2008/04/26 23:49:50 christos Exp $ */

/*-
 * Copyright (c) 2004
 *	Matthias Drochner. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include <math.h>
#include <sys/ieee754.h>
#include <machine/limits.h>
#include "math_private.h"

#ifndef LROUNDNAME
#define LROUNDNAME lroundf
#define RESTYPE long int
#define RESTYPE_MIN LONG_MIN
#define RESTYPE_MAX LONG_MAX
#endif

#define RESTYPE_BITS (sizeof(RESTYPE) * 8)

RESTYPE
LROUNDNAME(float x)
{
	u_int32_t i0;
	int e, s, shift;
	RESTYPE res;

	GET_FLOAT_WORD(i0, x);
	e = i0 >> SNG_FRACBITS;
	s = (uint32_t)e >> SNG_EXPBITS;
	e = (e & 0xff) - SNG_EXP_BIAS;

	/* 1.0 x 2^-1 is the smallest number which can be rounded to 1 */
	if (e < -1)
		return (0);
	/* 1.0 x 2^31 (or 2^63) is already too large */
	if (e >= (int)RESTYPE_BITS - 1)
		return (s ? RESTYPE_MIN : RESTYPE_MAX); /* ??? unspecified */

	/* >= 2^23 is already an exact integer */
	if (e < SNG_FRACBITS) {
		/* add 0.5, extraction below will truncate */
		x += (s ? -0.5 : 0.5);
	}

	GET_FLOAT_WORD(i0, x);
	e = ((i0 >> SNG_FRACBITS) & 0xff) - SNG_EXP_BIAS;
	i0 &= 0x7fffff;
	i0 |= (1 << SNG_FRACBITS);

	shift = e - SNG_FRACBITS;
	if (shift >=0)
		res = (shift < 32 ? (RESTYPE)i0 << shift : 0);
	else
		res = (shift > -32 ? i0 >> -shift : 0);

	return (s ? -res : res);
}


 true, true, true, true}, false);
}

std::vector<NotificationData> NotifierClient::readNotifications() {
    return OswServiceAllTasks::notifier.readNotifications(publisher);
}

void NotifierClient::deleteNotification(unsigned id) {
    OswServiceAllTasks::notifier.deleteNotification(id, publisher);
}
#include "./services/OswServiceManager.h"

#include "./services/OswServiceTasks.h"
#include "esp_task_wdt.h"

std::unique_ptr<OswServiceManager> OswServiceManager::instance = nullptr;

/**
 * This enables all currently known services using their setup() and starts the loop() on core 0
 */
void OswServiceManager::setup() {
    if (this->active) return;
    this->active = true;
    for (unsigned char i = 0; i < oswServiceTasksCount; i++)
        if(oswServiceTasks[i])
            oswServiceTasks[i]->setup();
#ifndef OSW_EMULATOR
    xTaskCreatePinnedToCore([](void* pvParameters) -> void { OswServiceManager::getInstance().worker(); },
                            "oswServiceManager", this->workerStackSize /*stack*/, NULL /*input*/, 0 /*prio*/,
                            &this->core0worker /*handle*/, 0);
#else
    this->core0worker.reset(new std::jthread([]() -> void { OswServiceManager::getInstance().worker(); }));
#endif
}

/**
 * Waits this->workerStartupDelay and then starts the task loop
 */
void OswServiceManager::worker() {
    delay(this->workerStartupDelay);  // Wait two seconds to give the rest of the OS time to boot (in case a service causes a system crash -
    // wifi)
    OSW_LOG_D("Background worker started.");
    while (this->active) {
        this->loop();
        delay(this->workerLoopDelay);  // Give the kernel time to do his stuff (as we are normally running this on his core 0)
    }
    OSW_LOG_D("Background worker terminated!");
#ifndef OSW_EMULATOR
    vTaskDelete(nullptr); // Inform FreeRTOS this task is done - otherwise the kernel will take that personally and crash!
#endif
}

void OswServiceManager::loop() {
    for (unsigned char i = 0; i < oswServiceTasksCount; i++)
        if (oswServiceTasks[i])
            if (oswServiceTasks[i]->isRunning())
                oswServiceTasks[i]->loop();
}

void OswServiceManager::stop() {
    if(!this->active) return;
    this->active = false;
    for (unsigned char i = 0; i < oswServiceTasksCount; i++)
        if(oswServiceTasks[i])
            oswServiceTasks[i]->stop();
}
#ifdef OSW_FEATURE_BLE_SERVER
#include "./services/OswServiceTaskBLEServer.h"
#include "osw_hal.h"

#define BATTERY_SERVICE_UUID                         "0000180f-0000-1000-8000-00805f9b34fb"
#define BATTERY_LEVEL_CHARACTERISTIC_UUID            "00002A19-0000-1000-8000-00805f9b34fb"
#define BATTERY_LEVEL_STATUS_CHARACTERISTIC_UUID     "00002bed-0000-1000-8000-00805f9b34fb"
#define TIME_SERVICE_UUID                            "00001805-0000-1000-8000-00805f9b34fb"
#define CURRENT_TIME_CHARACTERISTIC_UUID             "00002a0c-0000-1000-8000-00805f9b34fb"
#define DEVICE_INFORMATION_SERVICE_UUID              "0000180a-0000-1000-8000-00805f9b34fb"
#define FIRMWARE_REVISION_CHARACTERISTIC_UUID


ascades::CustomControl(), _timer(new QTimer(this)) {

	Q_UNUSED(parent);
    connect(_timer, SIGNAL(timeout()), this, SIGNAL(timeout()));
    setVisible(false);
}

bool Timer::isActive() {
    return _timer->isActive();
}

int Timer::interval() {
    return _timer->interval();
}

void Timer::setInterval(int mSec) {
    if (_timer->interval() == mSec)
        return;

    _timer->setInterval(mSec);
    emit intervalChanged();
}

void Timer::start() {
    if (_timer->isActive())
        return;

    _timer->start();
    emit activeChanged();
}

void Timer::stop() {
    if (!_timer->isActive())
        return;

    _timer->stop();
    emit activeChanged();
}
/* Copyright (c) 2012 Research In Motion Limited.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <bb/cascades/Application>
#include <bb/cascades/QmlDocument>
#include <bb/cascades/AbstractPane>

#include <bps/bps.h>
#include <nfc/nfc_bps.h>

#include "NfcListener.hpp"

using namespace bb::cascades;

NfcListener::NfcListener() :
		_failedToInitialize(false),
		_emulateNdefMessage(0) {
}

NfcListener::~NfcListener() {
	if (_emulateNdefMessage) {
		CHECK(nfc_delete_ndef_message(_emulateNdefMessage, true));
	}
}

void NfcListener::startListening() {
	initialize();
}

void NfcListener::stopListening() {
	terminate();
}

void NfcListener::initialize() {

	qDebug() << "XXXX NfcListener::initialize() starts...";

	int rc = bps_initialize();
	if (rc) {
		_failedToInitialize = true;
		qDebug() << "XXXX Error: BPS failed to initialise. rc=" << rc;
	}

	rc = nfc_request_events();
	if (rc) {
		_failedToInitialize = true;
		qDebug() << "XXXX Error: Failed to request NFC BPS events. rc=" << rc;
		bps_shutdown();
	} else {
		qDebug() << "XXXX Registered for NFC BPS events OK";
		subscribe(nfc_get_domain());
	}
	qDebug() << "XXXX App::initialize() ends...";
}

void NfcListener::terminate() {
	qDebug() << "XXXX NfcListener::terminate entered ...";
	nfc_stop_events();
	unsubscribe(nfc_get_domain());
	bps_shutdown();
}

void NfcListener::event(bps_event_t *event) {
	qDebug() << "XXXX NfcListener::event() entered ...";

	int domain = bps_event_get_domain(event);
	if (nfc_get_domain() == domain) {
		handleNfcEvent(event);
	}
}

void NfcListener::handleNfcEvent(bps_event_t *event) {
	uint16_t code = bps_event_get_code(event);

	qDebug() << "XXXX NfcListener::handleEmulateNfcEvent - processing event code: " << code;

	if (NFC_VIRTUAL_TAG_SELECTION_EVENT == code) {
		qDebug() << "XXXX Nfc


-popup-add-table .toastui-editor-table-description{color:#333;margin:5px 0 0;text-align:center}.toastui-editor-popup-add-heading{width:auto}.toastui-editor-popup-add-heading .toastui-editor-popup-body{padding:0}.toastui-editor-popup-add-heading h1,.toastui-editor-popup-add-heading h2,.toastui-editor-popup-add-heading h3,.toastui-editor-popup-add-heading h4,.toastui-editor-popup-add-heading h5,.toastui-editor-popup-add-heading h6,.toastui-editor-popup-add-heading p,.toastui-editor-popup-add-heading ul{margin:0;padding:0}.toastui-editor-popup-add-heading ul{list-style:none;padding:5px 0}.toastui-editor-popup-add-heading ul li{cursor:pointer;padding:4px 12px}.toastui-editor-popup-add-heading ul li:hover{background-color:#dff4ff}.toastui-editor-popup-add-heading h1{font-size:24px}.toastui-editor-popup-add-heading h2{font-size:22px}.toastui-editor-popup-add-heading h3{font-size:20px}.toastui-editor-popup-add-heading h4{font-size:18px}.toastui-editor-popup-add-heading h5{font-size:16px}.toastui-editor-popup-add-heading h6{font-size:14px}.toastui-editor-context-menu{background-color:#fff;border:1px solid #dadde6;border-radius:2px;box-shadow:0 2px 4px 0 rgba(0,0,0,.08);color:#333;min-width:197px;padding:5px 0;position:absolute;width:auto;z-index:30}.toastui-editor-context-menu .menu-group{border-bottom:1px solid #ebedf2;font-size:13px;list-style:none;margin:0;padding:0}.toastui-editor-context-menu .menu-group:last-child{border-bottom:none!important}.toastui-editor-context-menu .menu-item{cursor:pointer;height:32px;line-height:32px;padding:0 14px}.toastui-editor-context-menu span{display:inline-block}.toastui-editor-context-menu span:before{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdIAAACSCAYAAADxT0vuAAAAAXNSR0IArs4c6QAAQABJREFUeAHtnQm8VVXZ/9e5A5PIIOWsqPlqzgNqqRnYxyzMoURARE3MCadUNDUHrpnzkIWSSYZhSIBaSlqWr17pTS1BzaEysczgjwOCMsMd9v/72+fswz7n7umcu8+5B1zr89lnTc96nmc9a3jWfIyxxkrASsBKwErASsBKwErASsBKwErASsBKwEqgKySQ6QqilqaVQDUlMHz48K0ymcw4vpenT58+pZq0LS0rASuBDV8CDRt+Fm0Oa1UCI0eOPKa9vf20urq6n6LgHqkEnyNGjDjdcZwJfN35noFGxRQpCntblPW90PkidLqVmJ+1pJ1N2m/NnDnznRLTrtfg1IOh1IN7yMTWZWZkPnXoDOrQb6PSV4tOFA/Fcccff/xBbW1tIyh75f3Vbt263fOLX/xiYTGc9de2BEIVKZ3CKxTuDTNmzJgWlQU6qlE0/stp/HtGwYXFRVTutaR5FR5mgP828LeF4SgnHLrDabzKW31R+lfLzUsRHtPU1NTwt7/9bQz8H0JcX755fM+A/9Fi2E+iH7lMJt/9sQ/G3kQyUL3D2kPuhCayvMDdQh26B3tIMb60aUHn3u7dexx2wOcPN


  var dst = output.data;

  var alphaFac = opaque ? 1 : 0;

  for (var y=0; y<h; y++) {
    for (var x=0; x<w; x++) {
      var sy = y;
      var sx = x;
      var dstOff = (y*w+x)*4;
      var r=0, g=0, b=0, a=0;
      for (var cy=0; cy<side; cy++) {
        var scy = Math.min(sh-1, Math.max(0, sy + cy - halfSide));
        var scx = sx;
        var srcOff = (scy*sw+scx)*4;
        var wt = weightsVector[cy];
        r += src[srcOff] * wt;
        g += src[srcOff+1] * wt;
        b += src[srcOff+2] * wt;
        a += src[srcOff+3] * wt;
      }
      dst[dstOff] = r;
      dst[dstOff+1] = g;
      dst[dstOff+2] = b;
      dst[dstOff+3] = a + alphaFac*(255-a);
    }
  }
  return output;
};

Filters.horizontalConvolveFloat32 = function(pixels, weightsVector, opaque) {
  var side = weightsVector.length;
  var halfSide = Math.floor(side/2);

  var src = pixels.data;
  var sw = pixels.width;
  var sh = pixels.height;

  var w = sw;
  var h = sh;
  var output = Filters.createImageDataFloat32(w, h);
  var dst = output.data;

  var alphaFac = opaque ? 1 : 0;

  for (var y=0; y<h; y++) {
    for (var x=0; x<w; x++) {
      var sy = y;
      var sx = x;
      var dstOff = (y*w+x)*4;
      var r=0, g=0, b=0, a=0;
      for (var cx=0; cx<side; cx++) {
        var scy = sy;
        var scx = Math.min(sw-1, Math.max(0, sx + cx - halfSide));
        var srcOff = (scy*sw+scx)*4;
        var wt = weightsVector[cx];
        r += src[srcOff] * wt;
        g += src[srcOff+1] * wt;
        b += src[srcOff+2] * wt;
        a += src[srcOff+3] * wt;
      }
      dst[dstOff] = r;
      dst[dstOff+1] = g;
      dst[dstOff+2] = b;
      dst[dstOff+3] = a + alphaFac*(255-a);
    }
  }
  return output;
};

Filters.separableConvolveFloat32 = function(pixels, horizWeights, vertWeights, opaque) {
  return this.horizontalConvolveFloat32(
    this.verticalConvolveFloat32(pixels, vertWeights, opaque),
    horizWeights, opaque
  );
};

Filters.gaussianBlur = function(pixels, diameter) {
  diameter = Math.abs(diameter);
  if (diameter <= 1) return Filters.identity(pixels);
  var radius = diameter / 2;
  var len = Math.ceil(diameter) + (1 - (Math.ceil(diameter) % 2))
  var weights = this.getFloat32Array(len);
  var rho = (radius+0.5) / 3;
  var rhoSq = rho*rho;
  var gaussianFactor = 1 / Math.sqrt(2*Math.PI*rhoSq);
  var rhoFactor = -1 / (2*rho*rho)
  var wsum = 0;
  var middle = Math.floor(len/2);
  for (var i=0;


except for the decimal
      digits 1 through 9, that character will be included in the string, but the
      reverse solidus will not.

    <emu-example>

          The following strings represent the same information.

'\A\C\/\D\C'

'AC/DC'

    </emu-example>
  </emu-clause>

  <emu-clause id="separators">

Paragraph and Line Separators

      Like JSON, JSON5 allows the Unicode code points U+2028 and U+2029 to
      appear unescaped in strings. Since ECMAScript 5.1 does not allow these
      code points in strings, authors should avoid including them in JSON5
      documents. JSON5 <emu-xref href="#parsers">parsers</emu-xref> should
      produce a warning when they are found unescaped in strings. JSON5
      <emu-xref href="#generators">generators</emu-xref> should escape these
      code points in strings.

  </emu-clause>
</emu-clause>

<emu-clause id="numbers">

Numbers

    The representation of numbers is similar to that used in most programming
    languages. A number may be represented in in base 10 using decimal digits,
    base 16 using hexadecimal digits, or the IEEE 754 values positive infinity,
    negative infinity, or NaN.

  <emu-grammar>
    JSON5Number ::
      JSON5NumericLiteral
      `+` JSON5NumericLiteral
      `-` JSON5NumericLiteral

    JSON5NumericLiteral ::
      NumericLiteral
      `Infinity`
      `NaN`
  </emu-grammar>

    Decimal numbers contain an integer component that may be prefixed with an
    optional plus or minus sign, which may be followed by a fraction part and/or
    an exponent part.

    A fraction part is a decimal point followed by one or more digits.

    An exponent part begins with the letter E in upper or lower case, which may
    be followed by a plus or minus sign. The E and optional sign are followed by
    one or more digits.

  <emu-example>

{
    integer: 123,
    withFractionPart: 123.456,
    onlyFractionPart: .456,
    withExponent: 123e-456,
}

  </emu-example>

    Hexadecimal numbers contain the literal characters `0x` or `0X` that may be
    prefixed with an optional plus or minus sign, which must be followed by one
    or more hexadecimal digits. The hexadecimal letters A through F can be upper
    or lower case.

  <emu-example>

{
    positiveHex: 0xdecaf,
    negativeHex: -0xC0FFEE,
}

  </emu-example>

    The IEEE 754 value positive infinity must be the literal characters
    `Infinity` and may be prefixed with an optional plus sign.

    The IEEE 754 value negative infinity must be the literal characters
    `-Infinity`.

    The IEEE 754 value NaN must be the literal characters `NaN` and may be
    prefixed with an optional plus or minus sign.

  <emu-example>

{
    positiveInfinity: Infinity,
    negativeInfinity: -Infinity,
    notANumber: NaN,
}

  </emu-example>
</emu-clause>

<emu-clause i


FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Api.ClientReflection.Descriptor, global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.HttpbodyReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.Cloud.DiscoveryEngine.V1Beta.ImportConfigReflection.Descriptor, global::Google.Cloud.DiscoveryEngine.V1Beta.PurgeConfigReflection.Descriptor, global::Google.Cloud.DiscoveryEngine.V1Beta.UserEventReflection.Descriptor, global::Google.LongRunning.OperationsReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.DiscoveryEngine.V1Beta.WriteUserEventRequest), global::Google.Cloud.DiscoveryEngine.V1Beta.WriteUserEventRequest.Parser, new[]{ "Parent", "UserEvent", "WriteAsync" }, new[]{ "UserEvent" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.DiscoveryEngine.V1Beta.CollectUserEventRequest), global::Google.Cloud.DiscoveryEngine.V1Beta.CollectUserEventRequest.Parser, new[]{ "Parent", "UserEvent", "Uri", "Ets" }, new[]{ "Uri", "Ets" }, null, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  /// <summary>
  /// Request message for WriteUserEvent method.
  /// </summary>
  [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
  public sealed partial class WriteUserEventRequest : pb::IMessage<WriteUserEventRequest>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<WriteUserEventRequest> _parser = new pb::MessageParser<WriteUserEventRequest>(() => new WriteUserEventRequest());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<WriteUserEventRequest> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::


变性疾病。这意味着预防和早期干预比晚期治疗更有希望。

2. **现行标准治疗的局限性**：目前广泛使用的乙酰胆碱酯酶抑制剂和美金刚等药物效果有限，且不能逆转疾病进程。我们应更关注根本性的代谢和血管干预。

### 个性化考量

1. **认知下降的早期识别**：个体应关注自己记忆力的变化，特别是工作记忆(短期记忆)的减退，这可能是干预的最佳时机。

2. **禁食策略的个体化**：胰岛素抵抗严重的人群可能需要更缓慢地过渡到禁食状态，先从12小时开始，逐渐延长。

3. **高风险人群需更积极干预**：有高血压、心血管疾病或家族史的人需要更早、更积极地采取预防措施，不要等到出现症状再行动。

---

这些干预措施不仅适用于已有轻度认知障碍的人群，也适用于希望预防阿尔茨海默病的健康人群。保持大脑的血流和能量供应是认知健康的基础，通过上述措施可显著降低认知下降风险。# 应对COVID-19的实用指南：从专家讨论中提取的核心行动策略

原始文件：#192 - COVID Part 2： Masks, long COVID, boosters, mandates, treatments, and more - Peter Attia (3_20_2025 9：58：22 PM).md

原文链接：https://peterattiamd.com/covid-part2/

<YouTube videoId="jAjKQY0_BQA" />

## 确定行动指南

### 高效防护策略

1. **针对性疫苗接种**：接种基础剂量疫苗是预防重症的最有效方法，尤其对40岁以上人群、有基础疾病者或免疫功能低下者至关重要。

2. **精准口罩使用**：当需要额外保护时，选择N95、KN95、FFP2、KF94或双层口罩（内层为外科口罩）。布口罩单独使用防护效果有限。

3. **合理应对感染**：如感染COVID，轻症患者应居家休息、充分水分摄入并监测症状。高风险人群应立即联系


posedHelpers.getObjectField(
                        XposedHelpers.getObjectField(it.args[0] ?: return@replaceMethod null,"mStateManager"),
                        "mState"
                    ) == overviewState
                ) {
                    transitionBlurView?.show(it.args[1] as Boolean)
                } else {
                    // 原逻辑没有 else 分支
                }
            }

        blur.methodFinder().filterByName("fastBlurWhenGestureResetTaskView")
            .first().replaceMethod {
                if (
                    XposedHelpers.getObjectField(
                        XposedHelpers.getObjectField(it.args[0] ?: return@replaceMethod null,"mStateManager"),
                        "mState"
                    ) == overviewState
                ) {
                    transitionBlurView?.show(it.args[1] as Boolean)
                } else {
                    // 原逻辑没有 else 分支
                }
            }

        blur.methodFinder().filterByName("restoreBlurRatioAfterAndroidS")
            .first().replaceMethod {
                transitionBlurView?.restore(true)
            }

        blur.methodFinder().filterByName("fastBlurWhenOpenOrCloseFolder")
            .first().replaceMethod {
                val useAnim = it.args[1] as Boolean
                if (shouldBlurWallpaper(it.args[0] ?: return@replaceMethod null)) {
                    wallpaperBlurView?.show(useAnim)
                }
                else {
                    wallpaperBlurView?.hide(useAnim)
                }
            }

        // 模糊缺失暂时不写.png
    }

    private fun shouldBlurWallpaper(launcher: Any): Boolean {
//        val isInNormalEditing = XposedHelpers.callMethod(launcher, "isInNormalEditing") as Boolean
//        val isFoldShowing = XposedHelpers.callMethod(launcher, "isFolderShowing") as Boolean
        return (XposedHelpers.callMethod(launcher, "isShouldBlur") as Boolean)
    }
}
/*
  * This file is part of HyperCeiler.

  * HyperCeiler is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
  * published by the Free Software Foundation, either version 3 of the
  * License.

  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU Affero General Public License for more details.

  * You should have received a copy of the GNU Affero General Public License
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.

  * Copyright (C) 2023-2025 HyperCeiler Contributions
*/
package com.sevtinge.hyperceiler.hook.module.hook.home.recent

import android.widget.TextView
import com.sevtinge.hyperceiler.hook.module.base.BaseHook
import com.sevtinge.hyperceiler.hook.utils.getObjectField
import com.sevtinge.hyperceiler.hook.utils.hookAfterMethod

object RecentText : BaseHook() {
    override fun init() {
        val emptyViewText = mPrefsMap.getString("home_recent_text", "")
        if (emptyViewText != "") {
            "com.miui.home.recents.views.RecentsView".hookAfterMethod(
                "showEmptyView", Int::class.javaPrimitiveType
            ) {
                (it.thisObject.getObjectField("mEmptyView") as TextView).apply {
                    this.text = emptyViewText
                }
            }
        }
    }
}
/*
  * This file is part of HyperCeiler.

  * HyperCeiler is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
  * published by the Free Software Foundation, either version 3 of the
  * License.

  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU Affero General Public License for mor


\\;\\{\\}');
    t.equal(quote([ 'a', 1, true, false ]), 'a 1 true false');
    t.equal(quote([ 'a', 1, null, undefined ]), 'a 1 null undefined');
    t.equal(quote([ 'a\\x' ]), 'a\\\\x');
    t.end();
});

test('quote ops', function (t) {
    t.equal(quote([ 'a', { op: '|' }, 'b' ]), 'a \\| b');
    t.equal(
        quote([ 'a', { op: '&&' }, 'b', { op: ';' }, 'c' ]),
        'a \\&\\& b \\; c'
    );
    t.end();
});

test('quote windows paths', { skip: 'breaking change, disabled until 2.x' }, function (t) {
    var path = 'C:\\projects\\node-shell-quote\\index.js'

    t.equal(quote([path, 'b', 'c d']), 'C:\\projects\\node-shell-quote\\index.js b \'c d\'')

    t.end()
})
import expect from 'expect.js'
import {create} from 'jss'
import * as cssVendor from 'css-vendor'
import browser from 'detect-browser'
import {stripIndent} from 'common-tags'
import functionPlugin from 'jss-plugin-rule-value-function'

import vendorPrefixer from './index'

const settings = {
  createGenerateId: () => rule => `${rule.key}-id`
}

const isIE9 = browser.name === 'ie' && browser.version === '9.0.0'
const isIEorEdge = browser.name === 'edge' || browser.name === 'ie'

describe('jss-plugin-vendor-prefixer', () => {
  let jss

  beforeEach(() => {
    jss = create(settings).use(vendorPrefixer())
  })

  describe('prefixed property', () => {
    if (isIE9) {
      return
    }

    let sheet

    beforeEach(() => {
      sheet = jss.createStyleSheet({
        a: {animation: 'yyy'}
      })
    })

    it('should generate correct CSS', () => {
      const prefixedProp = cssVendor.supportedProperty('animation')
      expect(sheet.toString()).to.be(`.a-id {\n  ${prefixedProp}: yyy;\n}`)
    })
  })

  describe('@keyframes', () => {
    let sheet

    beforeEach(() => {
      sheet = jss.createStyleSheet({
        '@keyframes a': {}
      })
    })

    it('should generate correct CSS', () => {
      if (isIEorEdge) {
        expect(sheet.toString()).to.be('@keyframes keyframes-a-id {}')
        return
      }
      const prefixedKeyframes = `@${cssVendor.prefix.css}keyframes`
      expect(sheet.toString()).to.be(`${prefixedKeyframes} keyframes-a-id {}`)
    })
  })

  describe('unknown property', () => {
    let sheet

    beforeEach(() => {
      sheet = jss.createStyleSheet({
        a: {xxx: 'block'}
      })
    })

    it('should generate correct CSS', () => {
      expect(sheet.toString()).to.be('.a-id {\n  xxx: block;\n}')
    })
  })

  describe('unknown value', () => {
    let sheet

    beforeEach(() => {
      sheet = jss.createStyleSheet({
        a: {display: 'yyy'}
      })
    })

    it('should generate correct CSS', () => {
      expect(sheet.toString()).to.be('.a-id {\n  display: yyy;\n}')
    })
  })

  describe('unknown property and value', () => {
    let sheet

    beforeEach(() => {
      sheet = jss.createStyleSheet({
        a: {xxx: 'yyy'}
      })
    })

    it('should generate correct CSS', () => {
      expect(sheet.toString()).to.be('.a-id {\n  xxx


r",
            "content": [
                {"type": "text", "text": "请描述这个 X-射线图像"},
                {"type": "image", "image": image},
            ],
        },
    ]

    inputs = processor.apply_chat_template(
        messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt"
    ).to(model.device, dtype=torch.bfloat16)

    input_len = inputs["input_ids"].shape[-1]

    with torch.inference_mode():
        generation = model.generate(**inputs, max_new_tokens=200, do_sample=False)
        generation = generation[0][input_len:]

    decoded = processor.decode(generation, skip_special_tokens=True)
    print(decoded)

def predict_med_stream(gpu_prop):
    # Load model
    import requests

    model_id = "google/medgemma-4b-it"
    MODEL_PATH = os.path.join(HF_MODEL_DIR, model_id)

    model = AutoModelForImageTextToText.from_pretrained(
        MODEL_PATH,
        torch_dtype=torch.bfloat16,
        device_map="auto",
    )
    processor = AutoProcessor.from_pretrained(MODEL_PATH, use_fast=True)

    # Image attribution: Stillwaterising, CC0, via Wikimedia Commons
    image_url = "https://upload.wikimedia.org/wikipedia/commons/c/c8/Chest_Xray_PA_3-8-2010.png"
    image = Image.open(requests.get(image_url, headers={"User-Agent": "example"}, stream=True).raw)

    messages = [
        {
            "role": "system",
            "content": [
                {
                    "type": "text",
                    "text": "你是一名放射科医生,进行语音聊天咨询， 你会进行诊断，并给出建议,言简意赅。",
                }
            ],
        },
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "请描述这个X-射线图像"},
                {"type": "image", "image": image},
            ],
        },
    ]

    inputs = processor.apply_chat_template(
        messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt"
    ).to(model.device, dtype=torch.bfloat16)

    for key, value in inputs.items():
        print(f"{key}: {value.shape=}")
    input_ids = inputs["input_ids"]
    prompt = processor.decode(input_ids[0])
    print(f"{prompt=}")

    for i in range(3):
        streamer = TextIteratorStreamer(
            tokenizer=processor, skip_prompt=True, skip_special_tokens=True
        )
        generation_kwargs = dict(
            **inputs,
            # do_sample=False,
            do_sample=True,
            temperature=0.2,
            top_k=10,
            top_p=0.9,
            num_beams=1,
            repetition_penalty=1.1,
            max_new_tokens=256,
            use_cache=True,
            streamer=streamer,
        )
        thread = Thread(target=model.generate, kwargs=generation_kwargs)
        thread.start()
        generated_text = ""
        start = perf_counter()
        times = []
        with torch.inference_mode():
            for new_text in streamer:
                times.append(perf_counter() - start)
                print(new_text, end="", flush=True)
                generated_text += new_text
                start = perf_counter()
        print(f"\n{i}. {generated_text=} TTFT: {times[0]:.2f}s total time: {sum(times):.2f}s")

"""
Gemma 3 Medical:
Text only: 27b
Multimodal: 4b

Gemma 3:
Text only: 1b
Multimodal: 4b, 12b, 27b

Gemma 2:
Text only: 2b-v2, 9b, 27b

Gemma:
Text only: 2b, 7b

    Raw (GB)	    Quantized (GB)
Model	bf16	Int4	Int4(blocks=32) SFP8
1B	    2.0	    0.5	    0.7	            1.0
+KV 	2.9	    1.4	    1.6	            1.9
4B	    8.0	    2.6	    2.9	            4.4
+KV 	12.7	7.3	    7.6	            9.1
12B 	24.0	6.6	    7.1	            12.4
+KV 	38.9	21.5	22.0	        27.3
27B 	54.0	14.1	15.3	        27.4
+KV 	72.7	32.8	34.0	        46.1

IMAGE_GPU=A100-80GB modal run src/llm/transformers/vlm/gemma3.py --task dump_model

IMAGE_GPU=L4 modal run src/llm/transformers/vlm/gemma3.py --task predict
IMAGE_GPU=L4 modal run src/llm/transformers/vlm/gemma3.py --task predict_stream

LLM_MODEL=google/gemma-3-4b-it-qat-q4_0-unquantized IMAGE_GPU=L4 modal run src/llm/transformers/vlm/gemma3.py --task predict
LLM_MODEL=google/gemma-3-4b-it-qat-q4_0-unquantized IMAGE_GPU=L4 modal run src/llm/transformers/vlm/gemma3.py --task predict_stream

LLM_MODEL=google/gemma-3-12b-it IMAGE_GPU=L40s modal run src/llm/transformers/vlm/gemma3.py --task predict
LLM_MODEL=google/gemma-3-12b-it IMAGE_GPU=L40s modal run src/llm/transformers/vlm/gemma3.py --task predict_stream

LLM_MODEL=google/gemma-3-27b-it-qat-q4_0-unquantized IMAGE_GPU=A100-80G


        a4.fromBuf(buf, 0);
                        m4.fromBuf(buf, addrIPv4.size);
                        ntry.prefix = addrPrefix.ip4toIP(new addrPrefix<addrIPv4>(a4, m4.toNetmask()));
                    } else {
                        addrIPv6 a6 = new addrIPv6();
                        addrIPv6 m6 = new addrIPv6();
                        a6.fromBuf(buf, 0);
                        m6.fromBuf(buf, addrIPv6.size);
                        ntry.prefix = addrPrefix.ip6toIP(new addrPrefix<addrIPv6>(a6, m6.toNetmask()));
                    }
                    if (debugger.rtrOlsrTraf) {
                        logger.debug("rxnet " + ntry);
                    }
                    tabRoute.addUpdatedEntry(tabRoute.addType.always, learned, rtrBgpUtil.sfiUnicast, 0, ntry, true, iface.roumapIn, iface.roupolIn, iface.prflstIn);
                    break;
                default:
                    logger.info("invalid msg " + msgTyp);
                    break;
            }
        }
        return false;
    }

    /**
     * do one work round
     *
     * @return true if table touched, false otherwise
     */
    public synchronized boolean doWork() {
        long curTim = bits.getTime();
        conn.timeout = iface.helloHold;
        conn.workInterval = iface.helloTimer;
        int done = 0;
        for (int i = learned.size() - 1; i >= 0; i--) {
            tabRouteEntry<addrIP> ntry = learned.get(i);
            if (ntry == null) {
                continue;
            }
            if ((curTim - ntry.best.time) < ntry.best.accIgp) {
                continue;
            }
            if (debugger.rtrOlsrEvnt) {
                logger.debug("netdel " + ntry);
            }
            learned.del(ntry.prefix);
            done++;
        }
        return (done > 0);
    }

    /**
     * stop work
     */
    public void bfdPeerDown() {
        iface.lower.datagramClosed(conn);
    }

}
package org.freertr.rtr;

import java.util.ArrayList;
import java.util.List;
import org.freertr.addr.addrIP;
import org.freertr.addr.addrIPv4;
import org.freertr.addr.addrPrefix;
import org.freertr.cfg.cfgAll;
import org.freertr.cfg.cfgIfc;
import org.freertr.cfg.cfgPrfxlst;
import org.freertr.cfg.cfgRoump;
import org.freertr.cfg.cfgRouplc;
import org.freertr.cfg.cfgVrf;
import org.freertr.enc.enc7bit;
import org.freertr.ip.ipFwd;
import org.freertr.ip.ipFwdIface;
import org.freertr.ip.ipRtr;
import org.freertr.pack.packHolder;
import org.freertr.prt.prtUdp;
import org.freertr.tab.tabGen;
import org.freertr.tab.tabIndex;
import org.freertr.tab.tabIntMatcher;
import org.freertr.tab.tabLabel;
import org.freertr.tab.tabLabelBier;
import org.freertr.tab.tabLabelEntry;
import org.freertr.tab.tabRoute;
import org.freertr.tab.tabRouteAttr;
import org.freertr.tab.tabRouteEntry;
import org.freertr.user.userFormat;
import org.freertr.user.userHelp;
import org.freertr.util.bits;
import org.freertr.util.cmds;
import org.freertr.util.debugger;
import org.freertr.util.logger;
import org.freertr.spf.spfCalc;
import org.freertr.spf.spfLnkst;
import org.freertr.util.


, const fftw_iodim*, int, const fftw_iodim*, double*, double*, unsigned)

//	 * native declaration : /usr/local/include/fftw3.h:820
//	 */
////	public static FFTW3Library32.fftw_plan fftw_plan_guru_dft_r2c(int rank, Pointer<fftw3.fftw_iodim_do_not_use_me > dims, int howmany_rank, Pointer<fftw3.fftw_iodim_do_not_use_me > howmany_dims, Pointer<Double > in, Pointer<Double > out, int flags) {
////		return new FFTW3Library32.fftw_plan(fftw_plan_guru_dft_r2c(rank, Pointer.getPeer(dims), howmany_rank, Pointer.getPeer(howmany_dims), Pointer.getPeer(in), Pointer.getPeer(out), flags));
////	}
//	@Ptr
//	protected native static long fftw_plan_guru_dft_r2c(int rank, @Ptr long dims, int howmany_rank, @Ptr long howmany_dims, @Ptr long in, @Ptr long out, int flags);
//	/**
//	 * Original signature : fftw_plan fftw_plan_guru_dft_c2r(int, const fftw_iodim*, int, const fftw_iodim*, double*, double*, unsigned)

//	 * native declaration : /usr/local/include/fftw3.h:822
//	 */
////	public static FFTW3Library32.fftw_plan fftw_plan_guru_dft_c2r(int rank, Pointer<fftw3.fftw_iodim_do_not_use_me > dims, int howmany_rank, Pointer<fftw3.fftw_iodim_do_not_use_me > howmany_dims, Pointer<Double > in, Pointer<Double > out, int flags) {
////		return new FFTW3Library32.fftw_plan(fftw_plan_guru_dft_c2r(rank, Pointer.getPeer(dims), howmany_rank, Pointer.getPeer(howmany_dims), Pointer.getPeer(in), Pointer.getPeer(out), flags));
////	}
//	@Ptr
//	protected native static long fftw_plan_guru_dft_c2r(int rank, @Ptr long dims, int howmany_rank, @Ptr long howmany_dims, @Ptr long in, @Ptr long out, int flags);
//	/**
//	 * Original signature : fftw_plan fftw_plan_guru_split_dft_r2c(int, const fftw_iodim*, int, const fftw_iodim*, double*, double*, double*, unsigned)

//	 * native declaration : /usr/local/include/fftw3.h:824
//	 */
////	public static FFTW3Library32.fftw_plan fftw_plan_guru_split_dft_r2c(int rank, Pointer<fftw3.fftw_iodim_do_not_use_me > dims, int howmany_rank, Pointer<fftw3.fftw_iodim_do_not_use_me > howmany_dims, Pointer<Double > in, Pointer<Double > ro, Pointer<Double > io, int flags) {
////		return new FFTW3Library32.fftw_plan(fftw_plan_guru_split_dft_r2c(rank, Pointer.getPeer(dims), howmany_rank, Pointer.getPeer(howmany_dims), Pointer.getPeer(in), Pointer.getPeer(ro), Pointer.getPeer(io), flags));
////	}
//	@Ptr
//	protected native static long fftw_plan_guru_split_dft_r


# https://github.com/meituan/YOLOv6/

# YOLOv6s model
model = dict(
    type='YOLOv6s',
    pretrained=None,
    depth_multiple=0.33,
    width_multiple=0.50,
    backbone=dict(
        type='EfficientRep',
        num_repeats=[1, 6, 12, 18, 6],
        out_channels=[64, 128, 256, 512, 1024],
        fuse_P2=True,
        cspsppf=True,
    ),
    neck=dict(
        type='RepBiFPANNeck',
        num_repeats=[12, 12, 12, 12],
        out_channels=[256, 128, 128, 256, 256, 512],
    ),
    head=dict(
        type='EffiDeHead',
        in_channels=[128, 256, 512],
        num_layers=3,
        begin_indices=24,
        anchors=3,
        anchors_init=[
            [10, 13, 19, 19, 33, 23],
            [30, 61, 59, 59, 59, 119],
            [116, 90, 185, 185, 373, 326],
        ],
        out_indices=[17, 20, 23],
        strides=[8, 16, 32],
        atss_warmup_epoch=0,
        iou_type='giou',
        use_dfl=False,  # set to True if you want to further train with distillation
        reg_max=0,  # set to 16 if you want to further train with distillation
        distill_weight={
            'class': 1.0,
            'dfl': 1.0,
        },
    ),
)


        res = self.res_proj_len(res)
        res = rearrange(res,'b l c -> b c l')
        assert x.shape == res.shape
        skip = self.skip_conv(out)
        skip = rearrange(skip,'b l c -> b c l')
        skip = self.skip_proj_len(skip)
        skip = rearrange(skip,'b c l -> b l c')
        return (x+res)*math.sqrt(0.5), skip

class BiSSM2Imputer(nn.Module):
    def __init__(
        self,
        layers,
        seq_len,
        seq_dim,
        in_channels,
        res_channels,
        diffusion_embedding_dim,
        num_steps,
        num_ssm,
        cond_ssm_num,
        input_ssm_num,
        num_ch,
        expand_c,
        expand_s,
        headdim_c,
        headdim_s
    ):
        super().__init__()
        self.in_channels = in_channels
        self.res_channels = res_channels
        self.diffusion_embedding_dim = diffusion_embedding_dim
        self.diffusion_embedding = DiffusionEmbedding(
            num_steps= num_steps,
            embedding_dim= diffusion_embedding_dim
        )
        self.input_proj = Conv1d_with_init(in_channels,res_channels,1)
        self.out_proj1 = Conv1d_with_init(self.res_channels,self.in_channels,1)
        self.layers = layers
        self.residual_layers = nn.ModuleList(
            [
                ResidualBlock(
                    in_channels=in_channels,
                    res_channels=res_channels,
                    diffusion_embedding_dim=diffusion_embedding_dim,
                    cond_ssm_num=cond_ssm_num,
                    input_ssm_num=input_ssm_num,
                    num_ssm = num_ssm,
                    num_ch=num_ch,
                    seq_len=seq_len,
                    seq_dim=seq_dim,
                    expand_c=expand_c,
                    expand_s=expand_s,
                    headdim_c=headdim_c,
                    headdim_s=headdim_s
                )
                for _ in range(layers)
            ]
        )
    def forward(self,input_data):
        noise, condition, mask, diffusion_step = input_data
        condition = condition * mask
        condition = torch.cat([condition, mask.float()], dim=1)
        diffusion_step_embed = cal_diffusion_step_embedding(diffusion_step,self.diffusion_embedding_dim)
        h = noise
        skip = 0
        for n in range(self.layers):
            h, skip_n = self.residual_layers[n]((h,condition,diffusion_step_embed))
            skip += skip_n
        x = skip/math.sqrt(self.layers)
        x = self.out_proj1(x)
        return x


glabel func_809A9030
/* 00440 809A9030 27BDFFE0 */  addiu   $sp, $sp, 0xFFE0           ## $sp = FFFFFFE0
/* 00444 809A9034 3C010001 */  lui     $at, 0x0001                ## $at = 00010000
/* 00448 809A9038 342117A4 */  ori     $at, $at, 0x17A4           ## $at = 000117A4
/* 0044C 809A903C AFBF0014 */  sw      $ra, 0x0014($sp)
/* 00450 809A9040 AFA50024 */  sw      $a1, 0x0024($sp)
/* 00454 809A9044 00812021 */  addu    $a0, $a0, $at
/* 00458 809A9048 AFA60028 */  sw      $a2, 0x0028($sp)
/* 0045C 809A904C AFA40018 */  sw      $a0, 0x0018($sp)
/* 00460 809A9050 0C02604B */  jal     Object_GetIndex
              ## ObjectIndex
/* 00464 809A9054 24050114 */  addiu   $a1, $zero, 0x0114         ## $a1 = 00000114
/* 00468 809A9058 8FA30028 */  lw      $v1, 0x0028($sp)
/* 0046C 809A905C 8FA40018 */  lw      $a0, 0x0018($sp)
/* 00470 809A9060 0440000B */  bltz    $v0, .L809A9090
/* 00474 809A9064 00402825 */  or      $a1, $v0, $zero            ## $a1 = 00000000
/* 00478 809A9068 0C026062 */  jal     Object_IsLoaded


;  Subroutines for calling unbound dynamic functions from within GDB for HPPA.
;  Subroutines for out of line prologues and epilogues on for the HPPA
;  Copyright (C) 1994-2017 Free Software Foundation, Inc.

;  This file is part of GCC.

;  GCC is free software; you can redistribute it and/or modify
;  it under the terms of the GNU General Public License as published by
;  the Free Software Foundation; either version 3, or (at your option)
;  any later version.

;  GCC is distributed in the hope that it will be useful,
;  but WITHOUT ANY WARRANTY; without even the implied warranty of
;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;  GNU General Public License for more details.

;  Under Section 7 of GPL version 3, you are granted additional
;  permissions described in the GCC Runtime Library Exception, version
;  3.1, as published by the Free Software Foundation.

;  You should have received a copy of the GNU General Public License and
;  a copy of the GCC Runtime Library Exception along with this program;
;  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
;  <http://www.gnu.org/licenses/>.

#if !defined(__pro__) && !defined(__rtems__)


lor = ColorField("Color", _target.color);
            _target.flipX = BoolField("Flip X", _target.flipX);
            _target.flipY = BoolField("Flip Y", _target.flipY);
            _target.drawMode = (SpriteDrawMode)EnumField("Draw Mode", _target.drawMode);
            _target.spriteSortPoint = (SpriteSortPoint)EnumField("Sprite Sort Point", _target.spriteSortPoint);
            ObjectFieldReadOnly("Material", _target.material);
            StringFieldReadOnly("Sorting Layer", _target.sortingLayerName);
            _target.sortingOrder = IntField("Order in Layer", _target.sortingOrder);
        }
    }
}


 an app.
func AppDestroy(appID, confirm string) error {
	gitSession := false

	c, err := client.New()

	if err != nil {
		return err
	}

	if appID == "" {
		appID, err = git.DetectAppName(c.ControllerURL.Host)

		if err != nil {
			return err
		}

		gitSession = true
	}

	if confirm == "" {
		fmt.Printf(` !    WARNING: Potentially Destructive Action
 !    This command will destroy the application: %s
 !    To proceed, type "%s" or re-run this command with --confirm=%s

> `, appID, appID, appID)

		fmt.Scanln(&confirm)
	}

	if confirm != appID {
		return fmt.Errorf("App %s does not match confirm %s, aborting.", appID, confirm)
	}

	startTime := time.Now()
	fmt.Printf("Destroying %s...\n", appID)

	if err = apps.Delete(c, appID); err != nil {
		return err
	}

	fmt.Printf("done in %ds\n", int(time.Since(startTime).Seconds()))

	if gitSession {
		return git.DeleteRemote(appID)
	}

	return nil
}

// AppTransfer transfers app ownership to another user.
func AppTransfer(appID, username string) error {
	c, appID, err := load(appID)

	if err != nil {
		return err
	}

	fmt.Printf("Transferring %s to %s... ", appID, username)

	err = apps.Transfer(c, appID, username)

	if err != nil {
		return err
	}

	fmt.Println("done")

	return nil
}
package parser

import (
	"strconv"
	"strings"

	"github.com/deis/deis/client/cmd"
	docopt "github.com/docopt/docopt-go"
)

// Apps routes app commands to their specific function.
func Apps(argv []string) error {
	usage := `
Valid commands for apps:

apps:create        create a new application
apps:list          list accessible applications
apps:info          view info about an application
apps:open          open the application in a browser
apps:logs          view aggregated application logs
apps:run           run a command in an ephemeral app container
apps:destroy       destroy an application
apps:transfer      transfer app ownership to another user

Use 'deis help [command]' to learn more.
`

	switch argv[0] {
	case "apps:create":
		return appCreate(argv)
	case "apps:list":
		return appsList(argv)
	case "apps:info":
		return appInfo(argv)
	case "apps:open":
		return appOpen(argv)
	case "apps:logs":
		return appLogs(argv)
	case "apps:run":
		return appRun(argv)
	case "apps:destroy":
		return appDestroy(argv)
	case "apps:transfer":
		return appTransfer(argv)
	default:
		if printHelp(argv, usage) {
			return nil
		}

		if argv[0] == "apps" {
			argv[0] = "apps:list"
			return appsList(argv)
		}

		PrintUsage()
		return nil
	}
}

func appCreate(argv []string) error {
	usage := `
Creates a new application.

- if no <id> is provided, one will be generated automatically.

Usage: deis apps:create [<id>] [options]

Arguments:
  <id>
    a uniquely identifiable name for the application. No other app can already
    exist with this name.

Options:
  --no-remote
    do not create a 'deis' git remote.
  -b --buildpack BUILDPACK
    a buildpack url to use for this app
  -r --remote REMOTE
    name of remote to create. [default: deis]
`
	args, err := docopt.P


   $ bundle exec ./bin/sonia start --config example/config.yml

## More Information

Follow Sonia on [Twitter](http://www.twitter.com/soniaappcom).

## Note on Patches/Pull Requests

* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
  future version unintentionally.
* Commit, do not mess with rakefile, version, or history.
  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.

## Copyright

Copyright (c) 2012 [Piotr Usewicz](http://www.layer22.com). See LICENSE for details.
# GrabAccess

**Bootkit / Windows登陆密码绕过工具**

------

[**中文**](https://github.com/Push3AX/GrabAccess/blob/main/readme_cn.md) | [English](https://github.com/Push3AX/GrabAccess/blob/main/readme.md)

在物理接触的情况下，GrabAccess可以：

1. 绕过Windows登陆密码执行任意操作（以System权限执行命令、重置Windows账户密码等）
2. 植入木马并添加自启动
3. 通过修改主板UEFI固件实现无视重装系统、更换硬盘的持久化（Bootkit）

## 快速开始

GrabAccess最基础的功能是绕过Windows登录密码。

1. 准备一个U盘。（需为`FAT16`或`FAT32`格式）

2. 下载[GrabAccess_Release.zip](https://github.com/Push3AX/GrabAccess/releases/download/Version1.1/GrabAccess_Release_1.1.0.zip)，解压到U盘根目录。

   ![1](https://raw.githubusercontent.com/Push3AX/GrabAccess/main/images/1.png)

3. 将U盘插入目标计算机。重启，在启动时进入BIOS菜单。选择从U盘启动（如果开启了`Security Boot`，还需将其设置为`DISABLE`）.

   ![2](https://raw.githubusercontent.com/Push3AX/GrabAccess/main/images/2.png)

4. 在Windows启动时会弹出CMD窗口和账户管理窗口，可以System权限执行任意命令而无需登录。

   ![3](https://raw.githubusercontent.com/Push3AX/GrabAccess/main/images/3.png)

5. 按下`ALT+F4`关闭CMD窗口后，Windows回到登陆界面。

## 自动化植入

GrabAccess可以自动植入指定的程序，并为其添加启动项。

要使用该功能，需要预先将GrabAccess与要植入的程序打包：

1. 下载[GrabAccess_Release.zip](https://github.com/Push3AX/GrabAccess/releases/download/Version1.1/GrabAccess_Release_1.1.0.zip)，解压并放置在U盘根目录。

2. 将需要植入的程序命名为`payload.exe`，放置在U盘根目录。

3. 运行`build.bat`进行打包。

   ![4](https://raw.githubusercontent.com/Push3AX/GrabAccess/main/images/4.png)

4. 将U盘插入目标计算机、从U盘启动（与前文相同）

5. Windows启动后即可看到指定的程序。

![5](https://raw.githubusercontent.com/Push3AX/GrabAccess/main/images/5.png)

## 修改主板UEFI固件实现Bootkit

GrabAccess可以被植入到计算机主板的UEFI固件。实现硬件级别的持久化（Bootkit）。

每次Windows系统启动时，GrabAccess会植入指定的程序，即使重装系统或更换硬盘之后也会重新植入。要移除它，只能刷写主板固件或更换主板。

**警告：以下操作可能损坏主板！必须对UEFI


.
  * This is necessary data for the releaseAttic function.
  *
  * @see releaseAttic
  */
export function getOrbCounts(matches: number[][][]): { [col: number]: number } {
    let orbCounts: { [col: number]: number } = {};
    _.each(matches, match => {
        _.each(match, coord => {
            if (orbCounts[coord[1]]) {
                orbCounts[coord[1]] += 1;
            } else {
                orbCounts[coord[1]] = 1;
            };
        });
    });
    return orbCounts;
};

export function getMatchData(orbs: Orb[][], matches: number[][][]): types.MatchData {
    let matchData: types.MatchData = [];
    _.each(matches, match => {
        matchData.push([orbs[match[0][0]][match[0][1]], match.length]);
    })
    return matchData;
}

/**
  * @description Replaces the value of each orb from the matches with a new value
  * of '\u241a'
  */
export function markMatches(orbs: Orb[][], matches: number[][][]): Orb[][] {
    let matchData: types.MatchData = [];
    _.each(matches, match => {
        _.each(match, coord => {
            let [row, col] = coord;
            // replace each coordinate with '\u241a'
            orbs[row][col] = '\u241a'
        })
    });
    return orbs;
}

/**
  * @description Takes a post-swap set of orbs, gathers the match data for each of the matches,
  * marks each orb in the match with '\u241a', pulls down non-match orbs over the 'marked' orbs,
  * and pulls down new orbs from the attic to fill in the rest of the board.
  *
  * @example
  *                 [5, 6, 7, 8, 9],
  *                 [6, 7, 8, 9, 5],
  *     atticOrbs   [7, 8, 9, 5, 6],
  *                 [8, 9, 5, 6, 7],
  *                 [9, 5, 6, 7, 8]                    new orbs
  *                                                                             matchData
  *                 [0, 1, 2, 3, 4],                [0, 5, 6, 7, 4],         [type, length]
  *                 [1, 2, 3, 4, 0],     returns    [1, 1, 2, 3, 0],
  *     orbs        [2, 0, 0, 0, 1],       -->      [2, 2, 3, 4, 1],     and     [0, 3]
  *                 [3, 4, 0, 1, 2],                [3, 4, 0, 1, 2],
  *                 [4, 0, 1, 2, 3]                 [4, 0, 1, 2, 3]
  */
export function evaluate(orbs: Orb[][], matches: number[][][], atticOrbs: Orb[][]): [Orb[][], types.MatchData] {
    let matchData = getMatchData(orbs, matches);
    orbs = releaseAttic(activateGravity(markMatches(orbs, matches)), atticOrbs, getOrbCounts(matches));
    return [orbs, matchData];
};

/**
  * @private
  * @description Does the dirty work for unmatch by taking a given orb and swapping with a neighbor
  * of a different type, or a random orb on the board if there are no valid neighbors.
  * @see unmatch
  */
let _unmatch = (orbs: Orb[][], row: number, col: number, match: number[][], skipToRandom: boolean = false) => {
    let thisOrb: Orb = orbs[row][col];
    let swapped = false;
    let direc