x2YmqFxJNtgBL4vXwvsGsKj703DzDF0xHs9Q9vfmYiaoHfaFENWb2ZVqGgg0yTEepWhH4OvwejT0nZfH4flCFtWlJjW.GQ7zT7lYM97OCZlAQuUydGWw9fYav6sRI7XRsloslBQcXqqcLjJqhCS7hx1oqJvRTsccGiArKloFqY4NF9s3YW2c3XnIZGnv3gTz3I800OiYWlqecxHQ2rXscbhb_dNZPsv1XrsGcI7UQ--%26lp=http%3A%2F%2Fwww.ifcmarkets.com%2Fen%2Fforex-cfd-trading%3Futm_source%3Dyahoo%26utm_medium%3Dcpc%26utm_term%3D%26utm_content%3Dexcellent_new%26utm_campaign%3Denglish_native_asia" data-reactid="118">IFC Markets. Forex & CFD trading

Excellent Conditions for Professional Trading! 500+ trading instruments. 2 regulations: CySEC and BVI FSC. 100% dividend adjustment on stock CFDs.

                                                                <img class="Trsdu(.42s) W(100%) Trsdu(0s)! Bdrs(2px)" alt="Meet the Designers Who Are Happy to Dress Melania Trump as First Lady - and the Ones Who Won't" style="" src="/sy/uu/api/res/1.2/suS69_6DnHbDv..IcWI.Kg--/Zmk9c3RyaW07aD0xOTM7cHlvZmY9MDtxPTgwO3c9MjIwO3NtPTE7YXBwaWQ9eXRhY2h5b24-/http://media.zenfs.com


import aio_pika
from pydantic import ValidationError

from messenger.settings import settings
from messenger.rmq import rmq_connector
from messenger.sockets.schemas import MessageResponseSchema
from .sync import BaseSynchronizer

async def consume_messages_from_queue(syncs: list[BaseSynchronizer]):
    queue = await rmq_connector.create_queue()
    buffer = []  # Буфер для хранения сообщений

    async with queue.iterator() as queue_iter:
        async for message in queue_iter:  # type: aio_pika.abc.AbstractIncomingMessage
            buffer.append(message)

            # Если в буфере накопились сообщения
            if len(buffer) >= settings.sync.bulk_size:

                messages = []
                for msg in buffer:
                    try:
                        messages.append(MessageResponseSchema.model_validate_json(msg.body.decode("utf-8")))
                    except ValidationError as exc:
                        await msg.reject()
                        print(f"Ошибка при обработке сообщения: {exc}")
                        buffer.remove(msg)

                # Обрабатываем сообщения
                sync_success = True
                for sync in syncs:
                    try:
                        await sync.synchronize(messages)
                    except Exception as exc:
                        print(f"Ошибка при синхронизации: {exc}")
                        sync_success = False

                if sync_success:
                    # Подтверждаем обработку сообщений
                    for msg in buffer:
                        await msg.ack()
                else:
                    for msg in buffer:
                        await msg.nack(requeue=True)

                # Очищаем буфер
                buffer.clear()


/*
 * Copyright 2010 Red Hat Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Authors: Ben Skeggs
 */

#include "drmP.h"
#include "nouveau_drv.h"
#include "nouveau_hw.h"

int
nv50_calc_pll(struct drm_device *dev, struct pll_lims *pll, int clk,
	      int *N1, int *M1, int *N2, int *M2, int *P)
{
	struct nouveau_pll_vals pll_vals;
	int ret;

	ret = nouveau_calc_pll_mnp(dev, pll, clk, &pll_vals);
	if (ret <= 0)
		return ret;

	*N1 = pll_vals.N1;
	*M1 = pll_vals.M1;
	*N2 = pll_vals.N2;
	*M2 = pll_vals.M2;
	*P = pll_vals.log2P;
	return ret;
}

int
nva3_calc_pll(struct drm_device *dev, struct pll_lims *pll, int clk,
	      int *pN, int *pfN, int *pM, int *P)
{
	u32 best_err = ~0, err;
	int M, lM, hM, N, fN;

	*P = pll->vco1.maxfreq / clk;
	if (*P > pll->max_p)
		*P = pll->max_p;
	if (*P < pll->min_p)
		*P = pll->min_p;

	lM = (pll->refclk + pll->vco1.max_inputfreq) / pll->vco1.max_inputfreq;
	lM = max(lM, (int)pll->vco1.min_m);
	hM = (pll->refclk + pll->vco1.min_inputfreq) / pll->vco1.min_inputfreq;
	hM = min(hM, (int)pll->vco1.max_m);

	for (M = lM; M <= hM; M++) {
		u32 tmp = clk * *P * M;
		N  = tmp / pll->refclk;
		fN = tmp % pll->refclk;
		if (!pfN && fN >= pll->refclk / 2)
			N++;

		if (N < pll->vco1.min_n)
			continue;
		if (N > pll->vco1.max_n)
			break;

		err = abs(clk - (pll->refclk * N / M / *P));
		if (err < best_err) {
			best_err = err;
			*pN = N;
			*pM = M;
		}

		if (pfN) {
			*pfN = (((fN << 13) / pll->refclk) - 4096) & 0xffff;
			return clk;
		}
	}

	if (unlikely(best_err == ~0)) {
		NV_ERROR(dev, "unable to find matching pll values\n");
		return -EINVAL;
	}

	return pll->refclk * *pN / *pM / *P;
}


YNC_EDGE_FAST                      // expects GPLEV0 in r4, result in r8
        CAPTURE_2_BITS_8BPP_WIDE_ATARI                // input in r8
        WAIT_FOR_PSYNC_EDGE_FAST                      // expects GPLEV0 in r4, result in r8
        CAPTURE_3_BITS_8BPP_WIDE_ATARI r10            // input in r8

        WRITE_R5_R6_R7_R10

        subs    r1, r1, #2
        bne     loop6_8bpp_Atari

        pop     {r0, pc}

preload_capture_line_atari_sixbits_8bpp:
        SETUP_DUMMY_PARAMETERS
        b       capture_line_atari_sixbits_8bpp

        .ltorg

        // *** 8 bit ***
        .align 6
        b       preload_capture_line_atari_sixbits_double_8bpp
capture_line_atari_sixbits_double_8bpp:
        push    {lr}
        mov    r1, r1, lsl #1
        SETUP_VSYNC_DEBUG_R11_R12_DOUBLE
        SKIP_PSYNC_NO_OLD_CPLD
        mov    r1, r1, lsr #2
loop6d_8bpp_Atari:
        WAIT_FOR_PSYNC_EDGE_FAST                      // expects GPLEV0 in r4, result in r8
        CAPTURE_LOW_BITS_DOUBLE_8BPP_WIDE_ATARI r11                // input in r8
        WAIT_FOR_PSYNC_EDGE_FAST                      // expects GPLEV0 in r4, result in r8
        CAPTURE_HIGH_BITS_DOUBLE_8BPP_WIDE_ATARI r5                // input in r8
        WAIT_FOR_PSYNC_EDGE_FAST                      // expects GPLEV0 in r4, result in r8
        CAPTURE_LOW_BITS_DOUBLE_8BPP_WIDE_ATARI r12                // input in r8
        WAIT_FOR_PSYNC_EDGE_FAST                      // expects GPLEV0 in r4, result in r8
        CAPTURE_HIGH_BITS_DOUBLE_8BPP_WIDE_ATARI r6                // input in r8

        WRITE_R5_R6_IF_LAST
        cmp     r1, #1
        popeq   {r0, pc}

        WAIT_FOR_PSYNC_EDGE_FAST                      // expects GPLEV0 in r4, result in r8
        CAPTURE_LOW_BITS_DOUBLE_8BPP_WIDE_ATARI r11                // input in r8
        WAIT_FOR_PSYNC_EDGE_FAST                      // expects GPLEV0 in r4, result in r8
        CAPTURE_HIGH_BITS_DOUBLE_8BPP_WIDE_ATARI r7                // input in r8
        WAIT_FOR_PSYNC_EDGE_FAST                      // expects GPLEV0 in r4, result in r8
        CAPTURE_LOW_BITS_DOUBLE_8BPP_WIDE_ATARI r12                // input in r8
        WAIT_FOR_PSYNC_EDGE_FAST                      // expects GPLEV0 in r4, result in r8
        CAPTURE_HIGH_BITS_DOUBLE_8BPP_WIDE_ATARI r10               // input in r8

        WRITE_R5_R6_R7_R10

        subs    r1, r1, #2
        bne     loop6d_8bpp_Atari

        pop     {r0, pc}

preload_capture_line_atari_sixbits_double_8bpp:
        SETUP_DUMMY_PARAMETERS
        b       capture_line_atari_sixbits_double_8bpp

        .ltorg

.macro CAPTURE_HUE_B


SkockoGame.hasGotItRight(this)) {
      this.points = SkockoGame.WINNER_POINTS;
      this.gameEnded = true;
    } else if (this.tries.length >= 6) {
      this.gameEnded = true;
    }

    return this.gameEnded === true;
  }
}
import { ClassDefinition } from "./class.types";

export interface LazyHasOne<RelatingInstance, RelatedInstance> {
  (this: RelatingInstance): Promise<RelatedInstance | null>
}

export interface LazyHasOneOrFail<RelatingInstance, RelatedInstance> {
  (this: RelatingInstance): Promise<RelatedInstance>
}

export interface LazyHasMany<RelatingInstance, RelatedInstance> {
  (this: RelatingInstance): Promise<RelatedInstance[]>
}

export type Relatable<ThisClass extends ClassDefinition = ClassDefinition> = string | ThisClassimport { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { GaugeLabel, GaugeSegment } from "ng-gauge";

/*
  fungsi dari app widget adalah untuk membuat semua view widget yang akan di proses oleh developer
  adapun jenis widget yang digunakan untuk sementara sekarang adalah widget default, widget store,
  widget dashboard
*/

@Component({
  selector: 'app-widget',
  templateUrl: './widget.component.html',
  styleUrls: ["./widget.component.css"]
})
export class WidgetComponent implements OnInit {

  constructor() { }
  @Input() label:string;
  /*
    input template ini untuk menentukan jenis widget yang akan digunakan. dalam kasus untuk widget
    default input ini tidak perlu di disikan. namun pada kasus lain harus diisi seperti pada contoh

    ==> widget store

  <-- Grid
         <app-widget [template]="'store'"></app-widget>

    ==> widget dashboard

 <-- grid
         </app-widget [template]="'dashboard'"></app-widget>

    ==> widget default

 <-- grid
         </app-widget></app-widget>

    *N.B developer harus menentukan sendiri grid yang akan digunakan pada page masing masing

  */
  @Input() template:any;
  /*
    inputan config ini digunakan untuk menentukan tampilan dari masing masing widget. inputan config
    ini berupa data json. dan property dari inputan disesuaikan dengan jenis widget yang digunakan
    berikut masing masing penjelasannya. *buat dulu data yang akan diinputkan terlebih dahulu

    ==>   Widget default
    myWidget = {
      label:"Total Energy",
      category:"watt",
      value:100
    }
    **** Keterangan ****
    1.) property label digunakan untuk title pada widget
    2.) property value digunakan untuk menentukan nilai dari widget type nya integer. nanti output dari
        widget akan otomatis dikonversi misalkan 1000 W menjadi 1,0 KW. sedangkan value yang diinputkan
        tergantung dari category yang dipilih.
    3.) property category merupakan inputan untuk menentukan jenis widget default yang akan digunakan
        sedangkan jenis jenis nya adalah sebagai berikut. sekaligus value yang harus disisikan

        ================================================
        *  category          *  value                  *
        ================================================
        *  watt              *  1000                   *
        *  watthour          *  1000                   *
        *  default           *  1000                   *
        *  performance


�聊Gradle的语法。

### 语法
Gradle构建脚本是使用[Groovy](http://www.groovy-lang.org/)语言写的。所以在继续深入之前我想说几个Groovy中比较重要的概念。Groovy的语法跟Java语法很类似，所以希望你在理解上不会有大问题。

如果你对Groovy比较熟悉，那你可以跳过这部分。

要理解Gradle脚本，你需要明白Groovy中很重要的一个概念——闭包。

#### 闭包
要理解Gradle就必须搞明白[`闭包`](http://www.groovy-lang.org/closures.html)这个重要的概念。闭包是一个独立的代码块，它可以接收参数、可以有返回值，而且还可以赋值给变量。有点像`Callable`接口、`Future`和方法指针的混合体，随便你怎么叫。

大体来说就是个代码块，当你调用它的时候它才会执行，而非创建时就执行。下面是一个简单的闭包的例子：

~~~gradle
def myClosure = { println 'Hello world!' }

//execute our closure
myClosure()

#output: Hello world!
~~~

亦或是接收一个参数的闭包：

~~~gradle
def myClosure = {String str -> println str }

//execute our closure
myClosure('Hello world!')

#output: Hello world!
~~~
如果闭包只有一个参数，那这个参数可以通过`it`来引用：

~~~gradle
def myClosure = {println it }

//execute our closure
myClosure('Hello world!')

#output: Hello world!
~~~

接收多个参数的闭包：

~~~gradle
def myClosure = {String str, int num -> println "$str : $num" }

//execute our closure
myClosure('my string', 21)

#output: my string : 21
~~~

顺便插一句，闭包的参数类型是可选的。所以上面的例子可以简写成下面这样：

~~~gradle
def myClosure = {str, num -> println "$str : $num" }

//execute our closure
myClosure('my string', 21)

#output: my string : 21
~~~

闭包可以引用它所在上下文环境中的变量，这一点非常酷。这个上下文环境默认是闭包被创建时所在的类：

~~~gradle
def myVar = 'Hello World!'
def myClosure = {println myVar}
myClosure()

#output: Hello world!
~~~

另一个比较酷的特性是：闭包的上下文环境可以通过`Closure#setDelegate()`进行改变。这个特性在以后会非常重要：

~~~gradle
def myClosure = {println myVar} //I'm referencing myVar from MyClass class
MyClass m = new MyClass()
myClosure.setDelegate(m)
myClosure()

class MyClass {
    def myVar = '


9); }
.cm-s-midnight .CodeMirror-gutters {background: #0F192A; border-right: 1px solid;}
.cm-s-midnight .CodeMirror-guttermarker { color: white; }
.cm-s-midnight .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
.cm-s-midnight .CodeMirror-linenumber {color: #D0D0D0;}
.cm-s-midnight .CodeMirror-cursor {
    border-left: 1px solid #F8F8F0 !important;
}

.cm-s-midnight span.cm-comment {color: #428BDD;}
.cm-s-midnight span.cm-atom {color: #AE81FF;}
.cm-s-midnight span.cm-number {color: #D1EDFF;}

.cm-s-midnight span.cm-property, .cm-s-midnight span.cm-attribute {color: #A6E22E;}
.cm-s-midnight span.cm-keyword {color: #E83737;}
.cm-s-midnight span.cm-string {color: #1DC116;}

.cm-s-midnight span.cm-variable {color: #FFAA3E;}
.cm-s-midnight span.cm-variable-2 {color: #FFAA3E;}
.cm-s-midnight span.cm-def {color: #4DD;}
.cm-s-midnight span.cm-bracket {color: #D1EDFF;}
.cm-s-midnight span.cm-tag {color: #449;}
.cm-s-midnight span.cm-link {color: #AE81FF;}
.cm-s-midnight span.cm-error {background: #F92672; color: #F8F8F0;}

.cm-s-midnight .CodeMirror-matchingbracket {
  text-decoration: underline;
  color: white !important;
}
/*

    Name:       Paraíso (Dark)
    Author:     Jan T. Sott

    Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror)
    Inspired by the art of Rubens LP (http://www.rubenslp.com.br)

*/

.cm-s-paraiso-dark.CodeMirror {background: #2f1e2e; color: #b9b6b0;}
.cm-s-paraiso-dark div.CodeMirror-selected {background: #41323f !important;}
.cm-s-paraiso-dark.CodeMirror ::selection { background: rgba(65, 50, 63, .99); }
.cm-s-paraiso-dark.CodeMirror ::-moz-selection { background: rgba(65, 50, 63, .99); }
.cm-s-paraiso-dark .CodeMirror-gutters {background: #2f1e2e; border-right: 0px;}
.cm-s-paraiso-dark .CodeMirror-guttermarker { color: #ef6155; }
.cm-s-paraiso-dark .CodeMirror-guttermarker-subtle { color: #776e71; }
.cm-s-paraiso-dark .CodeMirror-linenumber {color: #776e71;}
.cm-s-paraiso-dark .CodeMirror-cursor {border-left: 1px solid #8d8687 !important;}

.cm-s-paraiso-dark span.cm-comment {color: #e96ba8;}
.cm-s-paraiso-dark span.cm-atom {color: #815ba4;}
.cm-s-paraiso-dark span.cm-number {color: #815ba4;}

.cm-s-paraiso-dark span.cm-property, .cm-s-paraiso-dark span.cm-attribute {color: #48b685;}
.cm-s-paraiso-dark span.cm-keyword {color: #ef6155;}
.cm-s-paraiso-dark span.cm-string {color: #fec418;}

.cm-s-paraiso-dark span.cm-variable {color: #48b685;}


9]=t.substr(3&e[19]|8,1),e[8]=e[13]=e[18]=e[23]="-",null==e?void 0:e.join("")},getDate:function(){var e=new Date,t=null==e?void 0:e.getFullYear(),n=(null==e?void 0:e.getMonth())+1,r=null==e?void 0:e.getDate(),o=null==e?void 0:e.getHours(),i=null==e?void 0:e.getMinutes(),a=null==e?void 0:e.getSeconds();return n=n>9?n:"0"+n,r=r>9?r:"0"+r,o=o>9?o:"0"+o,i=i>9?i:"0"+i,a=a>9?a:"0"+a,"".concat(t,"/").concat(n,"/").concat(r," ").concat(o,":").concat(i,":").concat(a)},getWeek:function(){var e=new Array("周日","周一","周二","周三","周四","周五","周六"),t=new Date;return e[null==t?void 0:t.getDay()]},getMatchMap:function(e){return{Trident:(null==e?void 0:e.indexOf("Trident"))>-1||(null==e?void 0:e.indexOf("NET CLR"))>-1,Presto:(null==e?void 0:e.indexOf("Presto"))>-1,WebKit:(null==e?void 0:e.indexOf("AppleWebKit"))>-1,Gecko:(null==e?void 0:e.indexOf("Gecko/"))>-1,Safari:(null==e?void 0:e.indexOf("Safari"))>-1,Chrome:(null==e?void 0:e.indexOf("Chrome"))>-1||(null==e?void 0:e.indexOf("CriOS"))>-1,IE:(null==e?void 0:e.indexOf("MSIE"))>-1||(null==e?void 0:e.indexOf("Trident"))>-1,Edge:(null==e?void 0:e.indexOf("Edge"))>-1,Firefox:(null==e?void 0:e.indexOf("Firefox"))>-1||(null==e?void 0:e.indexOf("FxiOS"))>-1,"Firefox Focus":(null==e?void 0:e.indexOf("Focus"))>-1,Chromium:(null==e?void 0:e.indexOf("Chromium"))>-1,Opera:(null==e?void 0:e.indexOf("Opera"))>-1||(null==e?void 0:e.indexOf("OPR"))>-1,Vivaldi:(null==e?void 0:e.indexOf("Vivaldi"))>-1,Yandex:(null==e?void 0:e.indexOf("YaBrowser"))>-1,Arora:(null==e?void 0:e.indexOf("Arora"))>-1,Lunascape:(null==e?void 0:e.indexOf("Lunascape"))>-1,QupZilla:(null==e?void 0:e.indexOf("QupZilla"))>-1,"Coc Coc":(null==e?void 0:e.indexOf("coc_coc_browser"))>-1,Kindle:(null==e?void 0:e.indexOf("Kindle"))>-1||(null==e?void 0:e.indexOf("Silk/"))>-1,Iceweasel:(null==e?void 0:e.indexOf("Iceweasel"))>-1,Konqueror:(null==e?void 0:e.indexOf("Konqueror"))>-1,Iceape:(null==e?void 0:e.indexOf("Iceape"))>-1,SeaMonkey:(null==e?void 0:e.indexOf("SeaMonkey"))>-1,Epiphany:(null==e?void 0:e.indexOf("Epiphany"))>-1,360:(null==e?void 0:e.indexOf("QihooBrowser"))>-1||(null==e?void 0:e.indexOf("QHBrowser"))>-1,"360EE":(null==e?void 0:e.indexOf("360EE"))>-1,"360SE":(null==e?void 0:e.indexOf("360SE"))>-1,UC:(null==e?void 0:e.indexOf("UC


e `rnnoise_process_frame()`
#[no_mangle]
pub unsafe extern "C" fn rnnoise_get_frame_size() -> c_int {
    crate::DenoiseState::FRAME_SIZE as c_int
}

/// Return the size of DenoiseState
///
/// It should be avoided, use directly `rnnoise_create`
#[no_mangle]
pub unsafe extern "C" fn rnnoise_get_size() -> c_int {
    std::mem::size_of::<DenoiseState>() as c_int
}

/// Init a pre-allocated DenoiseState
///
/// It should be avoided, use directly `rnnoise_create`
#[no_mangle]
pub unsafe extern "C" fn rnnoise_init(st: *mut DenoiseState, model: *mut RNNModel) -> c_int {
    let state = if model.is_null() {
        crate::DenoiseState::default()
    } else {
        crate::DenoiseState::from_model_owned(Cow::Borrowed(&*(model as *mut crate::RnnModel)))
    };

    *st = DenoiseState(state);

    0
}

/// Create and initialize a DenoseState
///
/// Use `rnnoise_destroy` to deallocate it
#[no_mangle]
pub unsafe extern "C" fn rnnoise_create(model: *mut RNNModel) -> *mut DenoiseState {
    let state = if model.is_null() {
        crate::DenoiseState::default()
    } else {
        crate::DenoiseState::from_model_owned(Cow::Borrowed(&*(model as *mut crate::RnnModel)))
    };

    Box::into_raw(Box::new(DenoiseState(state)))
}

/// Deallocate and destroy a DenoiseState
///
/// Use it only on pointers returned by `rnnoise_create`.
#[no_mangle]
pub unsafe extern "C" fn rnnoise_destroy(st: *mut DenoiseState) {
    let _ = Box::from_raw(st);
}

/// Processes a chunk of samples.
///
/// It processes `rnnoise_get_frame_size()` samples at time.
///
/// The current output of `process_frame` depends on the current input, but also on the
/// preceding inputs. Because of this, you might prefer to discard the very first output; it
/// will contain some fade-in artifacts.
#[no_mangle]
pub unsafe extern "C" fn rnnoise_process_frame(
    st: *mut DenoiseState,
    out: *mut c_float,
    input: *mut c_float,
) -> c_float {
    let state = st.as_mut().expect("Invalid pointer");
    let output = std::slice::from_raw_parts_mut(out, crate::DenoiseState::FRAME_SIZE);
    let input = std::slice::from_raw_parts(input, crate::DenoiseState::FRAME_SIZE);

    state.0.process_frame(output, input)
}

/// Load a custom model from a file.
#[no_mangle]
pub unsafe extern "C" fn rnnoise_model_from_file(file: *mut FILE) -> *mut RNNModel {
    use libc::{dup, fclose, fileno};
    use std::os::unix::io::FromRawFd;

    let fd = dup(fileno(file));
    fclose(file);

    let mut file = File::from_raw_fd(fd);
    let mut data = Vec::new();
    if file.read_to_end(&mut data).is_err() {
        return std::ptr::null_mut();
    }
    match crate::RnnModel::from_bytes(&data) {
        Some(model) => Box::into_raw(Box::new(RNNModel(model))),


ck);
        }

        public byte[] GetData(ImageHandle handle)
        {
            var dimensions = GetDimensions(handle);
            var data = new byte[dimensions.Width * dimensions.Height * 4];
            GetData(handle, data);
            return data;
        }

#if UNITY_EDITOR || UNITY_STANDALONE
        public Texture2D GetTexture(ImageHandle handle)
        {
            var dimensions = GetDimensions(handle);
            var texture = new Texture2D((int)dimensions.Width, (int)dimensions.Height, TextureFormat.RGBA32, false, true);
            texture.LoadRawTextureData(GetData(handle));
            texture.Apply();
            return texture;
        }
#endif
    }
}


#region License Information
/* HeuristicLab
 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
 *
 * This file is part of HeuristicLab.
 *
 * HeuristicLab is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * HeuristicLab is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
 */
#endregion

using HeuristicLab.Core;
using HeuristicLab.Encodings.IntegerVectorEncoding;
using HeuristicLab.Encodings.ScheduleEncoding.PermutationWithRepetition;
using HeuristicLab.Tests;
using Mi


 + self.target_recmotion_embeddings, axis=0).cpu().numpy()

        ## GENERATED MOTION
        # Compute fid
        mu, cov = calculate_activation_statistics_np(all_genmotions)
        gt_mu, gt_cov = calculate_activation_statistics_np(all_gtmotions)
        metrics["FID"] = calculate_frechet_distance_np(gt_mu, gt_cov, mu, cov)
        # Compute diversity
        metrics["Diversity"] = calculate_diversity_np(all_genmotions,self.diversity_times)

        ## GROUNDTTURTH MOTION
        # Compute fid
        # gt_mu, gt_cov = calculate_activation_statistics_np(all_gtmotions)
        # metrics["FID_GT"] = calculate_frechet_distance_np(gt_mu, gt_cov, gt_mu, gt_cov)
        # Compute diversity
        # metrics["Diversity_GT"] = calculate_diversity_np(all_gtmotions,self.diversity_times)

        return {**metrics}

    def update(
        self,
        length_source, source_recmotion, source_gtmotion,
        length_target, target_recmotion, target_gtmotion,
    ):
        ## source motion
        self.source_count_seq += len(length_source)
        masks_rec, masks_gt = lengths_to_mask(length_source, source_recmotion.device),  lengths_to_mask(length_source, source_gtmotion.device)

        motion_rec_dict = {'length': length_source, 'mask': masks_rec,'x': source_recmotion}
        motion_gt_dict = {'length': length_source, 'mask': masks_gt, 'x': source_gtmotion}
        latent_motion_A = self.TMR.encode(motion_rec_dict, sample_mean=True)
        latent_motion_B = self.TMR.encode(motion_gt_dict, sample_mean=True)

        self.source_recmotion_embeddings.append(torch.flatten(latent_motion_A,start_dim=1).detach())
        self.source_gtmotion_embeddings.append(torch.flatten(latent_motion_B,start_dim=1).detach())

        ## target motion
        self.target_count_seq += len(length_target)
        masks_rec, masks_gt = lengths_to_mask(length_target, target_recmotion.device),  lengths_to_mask(length_target, target_gtmotion.device)

        motion_rec_dict = {'length': length_target, 'mask': masks_rec,'x': target_recmotion}
        motion_gt_dict = {'length': length_target, 'mask': masks_gt, 'x': target_gtmotion}
        latent_motion_A = self.TMR.encode(motion_rec_dict, sample_mean=True)
        latent_motion_B = self.TMR.encode(motion_gt_dict, sample_mean=True)

        self.target_recmotion_embeddings.append(torch.flatten(latent_motion_A,start_dim=1).detach())
        self.target_gtmotion_embeddings.append(torch.flatten(latent_motion_B,start_dim=1).detach())


 has failed.
	Failed(Cow<'static, str>),
}

impl DeploymentStatus {
	/// Returns success.
	pub const fn success() -> Self {
		Self::Success
	}

	/// Returns a failure.
	pub fn failed<S: Into<Cow<'static, str>>>(reason: S) -> Self {
		Self::Failed(reason.into())
	}

	/// Checks if the deployment was successful.
	pub fn is_success(&self) -> bool {
		self == &Self::Success
	}

	/// Checks if the deployment has failed.
	pub const fn is_failed(&self) -> bool {
		matches!(self, &Self::Failed(_))
	}
}

impl fmt::Display for DeploymentStatus {
	fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
		match self {
			Self::Success => f.write_str("Success"),
			Self::Failed(reason) => write!(f, "Failed: {}", reason),
		}
	}
}

impl<E> From<E> for DeploymentStatus
where
	E: std::error::Error,
{
	fn from(value: E) -> Self {
		Self::failed(value.to_string())
	}
}

/// Describes the deployment of a dotfile.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Deployment {
	/// The time the deployment was started.
	time_start: SystemTime,
	/// The time the deployment was finished.
	time_end: SystemTime,
	/// The status of the deployment.
	status: DeploymentStatus,
	/// The dotfiles that were deployed.
	dotfiles: HashMap<PathBuf, DeployedDotfile>,
}

impl Deployment {
	/// Returns the time the deployment was started.
	pub const fn time_start(&self) -> &SystemTime {
		&self.time_start
	}

	/// Returns the time the deployment was finished.
	pub const fn time_end(&self) -> &SystemTime {
		&self.time_end
	}

	/// Returns the duration the deployment took.
	pub fn duration(&self) -> Result<Duration, SystemTimeError> {
		self.time_end.duration_since(self.time_start)
	}

	/// Returns the status of the deployment.
	pub const fn status(&self) -> &DeploymentStatus {
		&self.status
	}

	/// Returns the dotfiles.
	pub const fn dotfiles(&self) -> &HashMap<PathBuf, DeployedDotfile> {
		&self.dotfiles
	}

	/// Builds the deployment.
	pub fn build() -> DeploymentBuilder {
		DeploymentBuilder::default()
	}
}

/// A builder for a [`Deployment`].
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DeploymentBuilder {
	/// The start time of the deployment.
	///
	/// This used to keep track of the total execution time of the deployment
	/// process.
	time_start: SystemTime,

	/// All dotfiles which were already process by the deployment process.
	dotfiles: HashMap<PathBuf, DeployedDotfile>,
}

impl DeploymentBuilder {
	/// Adds a dotfile with the given `status` to the builder.
	pub fn add_dotfile(
		&mut self,
		path: PathBuf,
		dotfile: Dotfile,
		status: DotfileStatus,
	) -> &mut Self {
		self.dotfiles.insert(
			path,
			DeployedDotfile {
				kind: DeployedDotfileKind::Dotfile(dotfile),
				status,
			},
		);
		self
	}

	/// Adds the child of a dotfile directory with the given `status` to the
	/// builder.
	pub fn add_child(
		&mut self,
		path: PathBuf,
		parent: PathBuf,
		status: DotfileStatus,
	) -> &mut Self {
		self.dotfiles.insert(
			path,
			Deploy


/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 * All rights reserved.
 *
 * Licensed under the Oculus SDK License Agreement (the "License");
 * you may not use the Oculus SDK except in compliance with the License,
 * which is provided at the time of installation or download, or which
 * otherwise accompanies this software in either electronic or hard copy form.
 *
 * You may obtain a copy of the License at
 * https://developer.oculus.com/licenses/oculussdk/
 *
 * Unless required by applicable law or agreed to in writing, the Oculus SDK
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/************************************************************************************

Filename    :   ReflectionData.h
Content     :   Data for introspection and reflection of C++ objects.
Created     :   11/16/2015
Authors     :   Jonathan E. Wright

*************************************************************************************/

#pragma once

#include "Reflection.h"

#define MEMBER_SIZE(type_, member_) sizeof(((type_*)0)->member_)

namespace OVRFW {

//=============================================================================================
// Reflection Data
//=============================================================================================

extern ovrTypeInfo TypeInfoList[];

} // namespace OVRFW


.7 64 64 64 64-28.7 64-64-28.7-64-64-64zm0 96c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zM192 80c0-44.1-35.9-80-80-80S32 35.9 32 80v241.9C11.7 342.6 0 370.8 0 400c0 61.8 50.2 112 112 112s112-50.2 112-112c0-29.2-11.7-57.4-32-78.1V80zm-80 400c-44.1 0-80-35.9-80-80 0-25.5 12.2-48.9 32-63.8V80c0-26.5 21.5-48 48-48s48 21.5 48 48v256.2c19.8 14.8 32 38.3 32 63.8 0 44.1-35.9 80-80 80zm16-125.1V80c0-8.8-7.2-16-16-16s-16 7.2-16 16v274.9c-18.6 6.6-32 24.2-32 45.1 0 26.5 21.5 48 48 48s48-21.5 48-48c0-20.9-13.4-38.5-32-45.1z"],
    "temperature-hot": [576, 512, [], "f76a", "M128 240c0 52.9 43.1 96 96 96s96-43.1 96-96-43.1-96-96-96-96 43.1-96 96zm160 0c0 35.3-28.7 64-64 64s-64-28.7-64-64 28.7-64 64-64 64 28.7 64 64zm192 114.9V80c0-8.8-7.2-16-16-16s-16 7.2-16 16v274.9c-18.6 6.6-32 24.2-32 45.1 0 26.5 21.5 48 48 48s48-21.5 48-48c0-20.9-13.4-38.5-32-45.1zm64-33V80c0-44.1-35.9-80-80-80s-80 35.9-80 80v241.9c-20.3 20.8-32 48.9-32 78.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-29.2-11.7-57.4-32-78.1zM464 480c-44.1 0-80-35.9-80-80 0-25.5 12.3-48.9 32-63.8V80c0-26.5 21.5-48 48-48s48 21.5 48 48v256.2c19.8 14.8 32 38.3 32 63.8 0 44.1-35.9 80-80 80zM263.9 359.6L224 419.2l-39.9-59.7c-3.6-5.4-10-8.2-16.4-6.8l-70.4 14 13.9-70.4c1.3-6.3-1.4-12.8-6.8-16.4L44.8 240l59.7-39.9c5.4-3.6 8-10.1 6.8-16.4l-13.9-70.4 70.4 14c6.4 1.3 12.8-1.4 16.4-6.8L224 60.8l39.9 59.7c3.6 5.4 9.9 8.1 16.4 6.8L352 113V80.4l-67.4 13.4-47.3-70.7c-6-8.9-20.6-8.9-26.6 0l-47


ZYNQMP_DISP_AUD_CH_STATUS3			0x14
#define ZYNQMP_DISP_AUD_CH_STATUS4			0x18
#define ZYNQMP_DISP_AUD_CH_STATUS5			0x1c
#define ZYNQMP_DISP_AUD_CH_A_DATA0			0x20
#define ZYNQMP_DISP_AUD_CH_A_DATA1			0x24
#define ZYNQMP_DISP_AUD_CH_A_DATA2			0x28
#define ZYNQMP_DISP_AUD_CH_A_DATA3			0x2c
#define ZYNQMP_DISP_AUD_CH_A_DATA4			0x30
#define ZYNQMP_DISP_AUD_CH_A_DATA5			0x34
#define ZYNQMP_DISP_AUD_CH_B_DATA0			0x38
#define ZYNQMP_DISP_AUD_CH_B_DATA1			0x3c
#define ZYNQMP_DISP_AUD_CH_B_DATA2			0x40
#define ZYNQMP_DISP_AUD_CH_B_DATA3			0x44
#define ZYNQMP_DISP_AUD_CH_B_DATA4			0x48
#define ZYNQMP_DISP_AUD_CH_B_DATA5			0x4c
#define ZYNQMP_DISP_AUD_SOFT_RESET			0xc00
#define ZYNQMP_DISP_AUD_SOFT_RESET_AUD_SRST		BIT(0)

#endif /* _ZYNQMP_DISP_REGS_H_ */


dyn Error + Sync + Send>> {
    // Note that  we must have our logging only write out to stderr.
    info!("starting generic LSP server");

    // Create the transport. Includes the stdio (stdin and stdout) versions but this could
    // also be implemented to use sockets or HTTP.
    let (connection, io_threads) = Connection::stdio();

    // Run the server and wait for the two threads to end (typically by trigger LSP Exit event).
    let server_capabilities = {
        let mut server_capabilities = ServerCapabilities::default();
        server_capabilities.definition_provider = Some(OneOf::Left(true));
        server_capabilities.text_document_sync =
            Some(TextDocumentSyncCapability::Kind(TextDocumentSyncKind::Full));
        let mut compopt = CompletionOptions::default();
        compopt.trigger_characters = Some( vec!["\\".to_owned(), "+".to_owned() , "#".to_owned()]);
        server_capabilities.completion_provider = Some(compopt);
        serde_json::to_value(&server_capabilities).unwrap()
    };
    info!("server_capabilities: {:?}", server_capabilities);
    let initialization_params = connection.initialize(server_capabilities)?;
    main_loop(&connection, initialization_params)?;
    io_threads.join()?;

    // Shut down gracefully.
    info!("shutting down server");
    Ok(())
}

fn main_loop(
    connection: &Connection,
    params: serde_json::Value,
) -> Result<(), Box<dyn Error + Sync + Send>> {
    let _params: InitializeParams = serde_json::from_value(params).unwrap();
    info!("starting example main loop");

    // let mut buffers = Buffers::default();
    let mut buffers: HashMap<Url, Buffer> = HashMap::new();

    for msg in &connection.receiver {
        info!("got msg: {:?}", msg);
        match msg {
            Message::Request(req) => {
                if connection.handle_shutdown(&req)? {
                    return Ok(());
                }
                info!("got request: {:?}", req);
                let method = &req.method;
                match method.as_str() {
                    "textDocument/completion" => {
                        let (id, params) = cast_req::<Completion>(req).unwrap();

                        let uri = &params.text_document_position.text_document.uri;
                        // let text = buffers.get(&uri);
                        let resp = buffers
                            .get(uri)
                            .and_then(|buf| get_completion_response(&buf, params));

                        if let Some(resp) = resp {
                            let result = serde_json::to_value(&resp).unwrap();
                            let resp = Response {
                                id,
                                result: Some(result),
                                error: None,
                            };
                            connection.sender.send(Message::Response(resp))?;
                            continue;
                        }
                    }
                    "textDocument/definition" => {
                        let (id, params) = cast_req::<GotoDefinition>(req).unwrap();

                        let uri = &params.text_document_position_params.text_document.uri;
                        let resp = buffers
                            .get(uri)


import tensorflow as tf
import numpy as np

def add_noise(x, y):
    x += np.random.uniform(0.0, 0.01)
    return x, y

def one_hot(x, y):
    if y == 0:
        return x, np.array([1, 0])
    else:
        return x, np.array([0, 1])

if __name__ == '__main__':
    data = np.array([0.1, 0.4, 0.6, 0.2, 0.8, 0.8, 0.4, 0.9, 0.3, 0.2])
    print(data)
    label = np.array([0, 0, 1, 0, 1, 1, 0, 1, 0, 0])
    print(label)

    dataset = tf.data.Dataset.from_tensor_slices((data, label))

    print('traversal all data')
    for x, y in dataset:
        print(x, y)

    print('use iterator')
    dataset = dataset.repeat()
    it = dataset.__iter__()
    for i in range(20):
        x, y = it.next()
        print(x, y)

    print('random shuffle')
    dataset = dataset.shuffle(buffer_size=10)
    it = dataset.__iter__()
    for i in range(10):
        x, y = it.next()
        print(x, y)

    print('batch')
    dataset_batch = dataset.batch(batch_size=5)
    it = dataset_batch.__iter__()
    for i in range(2):
        x, y = it.next()
        print(x, y)

    print('one hot')
    dataset_one_hot = dataset.map(one_hot)
    it = dataset_one_hot.__iter__()
    for i in range(10):
        x, y = it.next()
        print(x, y)

    print('add noise')
    dataset_add_noise = dataset.map(add_noise)
    it = dataset_add_noise.__iter__()
    for i in range(10):
        x, y = it.next()
        print(x, y)

    print('add noise')
    dataset_add_noise = dataset.map(lambda x, y: tf.py_function(add_noise, inp=[x, y], Tout=[tf.float64, tf.int64]),
                                    num_parallel_calls=tf.data.experimental.AUTOTUNE)
    it = dataset_add_noise.__iter__()
    for i in range(10):
        x, y = it.next()
        print(x, y)


otate_right();
    let vel = end - *edge;

    let vertex = (*edge * radius) + center;

    let offset_start = *offset_start as i32;
    let offset_end = *offset_end as i32;
    if radius - offset_start - offset_end <= 0 {
        return Err(RoomGenerationError::BadEdgeOffset {
            radius,
            edge: *edge,
            offset_start,
            offset_end,
        });
    }

    let it = (offset_start..(radius - offset_end)).map(move |i| vertex + (vel * i));
    Ok(it)
}

struct TerrainChunks {
    pub chunks: Vec<HashSet<Axial>>,
}

/// Find the connecting `Plain` chunks.
/// The first one will be the largest chunk
fn calculate_plain_chunks(terrain: View<Axial, TerrainComponent>) -> TerrainChunks {
    trace!("calculate_plain_chunks");
    let mut visited = HashSet::new();
    let mut todo = VecDeque::new();
    let mut startind = 0;
    let mut chunk_id = 0;

    let mut chungus_id = 0;
    let mut chungus_mass = 0;
    let mut chunks = Vec::with_capacity(4);
    while let Some((i, current)) = terrain
        .iter()
        .enumerate()
        .skip(startind)
        .find_map(|(i, (p, t))| (t.0.is_walkable() && !visited.contains(&p)).then(|| (i, p)))
    {
        startind = i;
        todo.clear();
        todo.push_back(current);
        let mut chunk = HashSet::new();

        while let Some(current) = todo.pop_front() {
            if !visited.insert(current) {
                continue;
            }
            chunk.insert(current);
            terrain.query_hex(Hexagon::new(current, 1), |p, t| {
                if t.0.is_walkable() && !visited.contains(&p) {
                    todo.push_back(p);
                }
            });
        }
        let mass = chunk.len();
        if mass > chungus_mass {
            chungus_mass = mass;
            chungus_id = chunk_id;
        }
        chunks.push(chunk);
        chunk_id += 1;
    }
    if chunks.len() >= 2 {
        chunks.swap(0, chungus_id);
    }
    trace!("calculate_plain_chunks done, found {} chunks", chunks.len());
    debug_assert!(
        !chunks
            .iter()
            .zip(chunks.iter().skip(1))
            .any(|(a, b)| !a.is_disjoint(b)),
        "Internal error: chunks must be disjoint!"
    );
    TerrainChunks { chunks }
}

/// Print a 2D TerrainComponent map to the console, intended for debugging small maps.
#[allow(unused)]
fn print_terrain(from: Axial, to: Axial, terrain: View<Axial, TerrainComponent>) {
    assert!(from.q < to.q);
    assert!(from.r < to.r);

    for y in (from.r..=to.r) {
        for x in (from.q..=to.q) {
            match terrain.at(Axial::new(x, y)) {
                Some(TerrainComponent(TileTerrainType::Wall)) => print!("#"),
                Some(TerrainComponent(TileTerrainType::Plain)) => print!("."),
                Some(TerrainComponent(TileTerrainType::Bridge)) => print!("x"),
                Some(TerrainComponent(TileTerrainType::Empty)) | None => print!(" "),
            }
        }
        println!();
    }
}

#[cfg(test)]
mod tests {
    use super::*;
    use crate::pathfinding::pathfinding_room::find_path_in_room;
    use crate::storage::views::View;
    use crate::{components::EntityComponent, tables::morton_table::MortonTable};

    #[test]
    fn maps_are_not_homogeneous() {
        let mut terrain = HexGrid::new(8);


                *tmp.entry(8).or_insert(0) = x;
            } else {
                *tmp.entry(i - 1).or_insert(0) += x;
            }
        }
        tracker = tmp.clone();
    }

    println!(
        "{:?}",
        tracker
            .into_values()
            .collect::<Vec<_>>()
            .iter()
            .sum::<u64>()
    );
}
fn part2_array() {
    let input: Vec<u8> = fs::read_to_string("day06/input.txt")
        .unwrap()
        .split(',')
        .map(|x| x.parse::<u8>().unwrap())
        .collect();

    let mut tracker: [u64; 9] = [0; 9];

    for i in input {
        tracker[i as usize] += 1;
    }

    for _ in 0..256 {
        tracker.rotate_left(1);
        tracker[6] += tracker[8];
    }

    println!("{:?}" , tracker.into_iter().sum::<u64>());
}

fn main() {
    bench(part_1);
    bench(part_2);
    bench(part2_array);
}
<reponame>EuKaique/Projeto-Diagnostico-Medico<gh_stars>0
net.sf.jasperreports.charts.ChartCopyObjectFactory
<reponame>elefevre/lost-in-transation
use std::collections::HashMap;
use std::fs::File;
use std::io::BufReader;
use std::io::prelude::*;
use std::env;

fn main() -> std::io::Result<()> {
    let args: Vec<_> = env::args().collect();
    if args.len() != 2 {
        eprintln!("usage: {} filename", args[0]);
        return Result::Err(std::io::Error::new(std::io::ErrorKind::Other, ""))
    }

    let file = File::open(&args[1])?;
    let buf_reader = BufReader::new(file);
    let lines = buf_reader.lines().map(|l| l.unwrap());

    let mut freqs = HashMap::new();

    for l in lines {
        let words = l.split_whitespace();
        for w in words {
            let val = match freqs.get(&w.to_string()) {
                Some(c) => c+1,
                None => 1,
            };
            freqs.insert(w.to_string(), val);
        }
    }
    let mut counts: Vec<_> = freqs.iter().collect();
    counts.sort_by(|a, b| b.1.cmp(a.1)); // compare by count value
    for (w, c) in counts.iter().take(25) {
        println!("{}:{}", w, c);
    }
    Ok(())
}
<reponame>56quarters/whisper-mk2<filename>core/benches/lib.rs<gh_stars>1-10
#![feature(test)]
extern crate memento_core;
extern crate test;

use memento_core::encoder::{memento_encode_database, memento_encode_header};
use memento_core::parser::{memento_parse_database, memento_parse_header};

#[bench]
fn bench_memento_parse_header(b: &mut test::Bencher) {
    let bytes = include_bytes!("../../tests/mean_01.wsp");
    b.iter(|| {
        memento_parse_header(bytes).unwrap();
    });
}

#[bench]
fn bench_memento_parse_database(b: &mut test::Bencher) {
    let bytes = include_bytes!("../../tests/mean_01.wsp");
    b.iter(|| {
        memento_parse_database(bytes).unwrap();
    });
}

#[bench]
fn bench_memento_encode_header(b: &mut test::Bencher) {
    let bytes = &include_bytes!("../../tests/mean_01.wsp")[0..76];
    let header = memento_parse_header(bytes).unwrap().1;
    let mut buf


int(0,0,0)
ren1.GetActiveCamera().SetPosition(0,1,0)
ren1.GetActiveCamera().SetViewUp(0,0,1)

#ren2.AddActor(diskActor)
ren2.AddActor(gActor2)
ren2.SetBackground(0,0,0)
ren2.GetActiveCamera().SetFocalPoint(0,0,0)
ren2.GetActiveCamera().SetPosition(0,0,1)

#ren3.AddActor(diskActor)
ren3.AddActor(gActor3)
ren3.SetBackground(0,0,0)
ren3.GetActiveCamera().SetFocalPoint(0,0,0)
ren3.GetActiveCamera().SetPosition(normal)

#ren4.AddActor(diskActor)
ren4.AddActor(gActor4)
ren4.SetBackground(0,0,0)
ren4.GetActiveCamera().SetFocalPoint(0,0,0)
ren4.GetActiveCamera().SetPosition(specNormal)

#ren5.AddActor(diskActor)
ren5.AddActor(gActor5)
ren5.SetBackground(0,0,0)
ren5.GetActiveCamera().SetFocalPoint(0,0,0)
ren5.GetActiveCamera().SetPosition(0,0,1)

renWin.SetSize(600, 400)

iRen.Initialize()
ren0.ResetCamera()
ren1.ResetCamera()
ren2.ResetCamera()
ren3.ResetCamera()
ren4.ResetCamera()
ren5.ResetCamera()
renWin.Render()

# Interact with the data
iRen.Start()


 disabled.
///
/// # Safety
///
/// This function mutates global state (namely signal handlers).
pub unsafe fn signal() {
    #[cfg(debug_assertions)]
    INITIALIZED.with(|init| {
        let exch = init.compare_exchange(false, true, Ordering::SeqCst, Ordering::Acquire);
        if exch.is_ok() {
            let id = thread::current().id();
            info!("Enabling FPU exceptions on thread {id:?}");

            let exch = HANDLING.compare_exchange(false, true, Ordering::SeqCst, Ordering::Acquire);
            if exch.is_ok() {
                #[cfg(unix)]
                unix::install_signal_handler();

                #[cfg(windows)]
                windows::install_exception_handler();
            }

            #[cfg(all(debug_assertions, any(target_arch = "x86", target_arch = "x86_64")))]
            x86_64::enable_fp_exceptions();
            #[cfg(all(
                debug_assertions,
                not(any(target_arch = "x86", target_arch = "x86_64"))
            ))]
            compile_error!("Unsupported platform");

            info!("FPU exceptions enabled on thread {id:?}");
        }
    });
}
//! Bitcoin specific types shared across protocol requests

use crate::errors::{ProtocolError, Result};

#[cfg(feature = "secp256k1")]
use nash_mpc::curves::secp256_k1::Secp256k1Point;
#[cfg(feature = "k256")]
use nash_mpc::curves::secp256_k1_rust::Secp256k1Point;

use nash_mpc::curves::traits::ECPoint;

/// Placeholder for BTC address
#[derive(Clone, Debug, PartialEq)]
pub struct Address {
    pub(crate) inner: String,
}

impl Address {
    pub fn new(s: &str) -> Result<Self> {
        Ok(Self {
            inner: s.to_string(),
        })
    }
}

#[derive(Clone, Debug, PartialEq)]
pub struct PublicKey {
    inner: Secp256k1Point,
}

impl PublicKey {
    pub fn new(hex_str: &str) -> Result<Self> {
        let inner = Secp256k1Point::from_hex(hex_str).map_err(|_| {
            ProtocolError("Could not create public key (Secp256k1Point) from hex string")
        })?;
        Ok(Self { inner })
    }

    pub fn to_address(&self) -> Result<Address> {
        Err(ProtocolError("This has not been implemented for BTC"))
    }

    pub fn to_hex(&self) -> String {
        self.inner.to_hex()
    }
}

#[cfg(test)]
mod tests {
    use super::Address;
    #[test]
    fn address() {
        let _btc_addr = Address::new("3DxbL9tNd2yCn6yqCghgkGYnUcJihMbjtw").unwrap();
    }
}
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
    #[doc = "0x00 - PWM configuration register"]
    pub pwmcfg: crate::Reg<pwmcfg::PWMCFG_SPEC>,
    _reserved1: [u8; 0x04],
    #[doc = "0x08 - PWM count register"]
    pub pwmcount: crate::Reg<pwmcount::PWMCOUNT_SPEC>,
    _reserved2: [u8; 0x04],
    #[doc = "0x10 - Scaled PWM


        settingsFragment = SettingsFragment()
        supportFragmentManager
            .beginTransaction()
            .replace(R.id.settingsFrame, settingsFragment!!)
            .commit()
    }

    override fun onOptionsItemSelected(item: MenuItem): Boolean {
        if (item.itemId == android.R.id.home) {
            finish()
            return true
        }
        return super.onOptionsItemSelected(item)
    }

    override fun onResume() {
        super.onResume()
        sharedPrefs!!.registerOnSharedPreferenceChangeListener(this)
    }

    override fun onPause() {
        super.onPause()
        sharedPrefs!!.unregisterOnSharedPreferenceChangeListener(this)
    }

    override fun onPreferenceChange(preference: Preference, newValue: Any): Boolean {
        return false
    }

    override fun onSharedPreferenceChanged(
        sharedPreferences: SharedPreferences, key: String?
    ) {
        if (key != null && key == SharedPrefKeys.THEME.key) {
            val pref = settingsFragment!!.findPreference<Preference>(SharedPrefKeys.THEME.key)
            if (pref != null) {
                pref.summary = currentThemeName
            }
            Themes.initCurrentTheme(sharedPrefs!!)
        }
    }

    private val currentThemeName: String
        get() = resources.getString(Themes.getCurrent(sharedPrefs!!).labelId)
}
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

val composeBOM: String by rootProject.extra

kotlin {
    compilerOptions {
        extraWarnings.set(true)
    }
}

plugins {
    id("com.android.application")
    id("org.jetbrains.kotlin.android")
    id("org.jetbrains.kotlin.plugin.serialization")
    id("org.jetbrains.kotlin.plugin.compose")
}

android {
    compileSdk = 36

    defaultConfig {
        applicationId = "com.geode.launcher"
        minSdk = 23
        targetSdk = 35
        versionCode = 22
        versionName = "1.6.1"

        vectorDrawables {
            useSupportLibrary = true
        }

        @Suppress("UnstableApiUsage")
        externalNativeBuild {
            cmake {
                arguments("-DUSE_TULIPHOOK:BOOL=OFF", "-DANDROID_STL=c++_shared", "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES:BOOL=OFF")
            }
        }

        //noinspection ChromeOsAbiSupport (not my fault)
        ndk.abiFilters += listOf("arm64-v8a", "armeabi-v7a")
    }

    splits {
        abi {
            isEnable = true
            reset()

            //noinspection ChromeOsAbiSupport. i'm sorry!
            include("arm64-v8a", "armeabi-v7a")

            isUniversalApk = true
        }
    }

    buildTypes {
        release {
            isMinifyEnabled = true
            isShrinkResources = true

            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }
    }
    compileOptions {
        // enables a polyfill for java Instant on api levels < 26 (used for updater)
        isCoreLibraryDesugaringEnabled = true

        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }
    kotlin {
        compilerOptions {
            jvmTarget = JvmTarget.JVM_1_8
        }
    }
    buildFeatures {
        compose = true
        buildConfig = true
    }
    packaging {
        resources {
            excludes += "/META-INF/{AL2.0,LGPL2.1}"
        }
    }
    externalNativeBuild {
        cmake {
            version = "3.25.0+"
            path = file("src/main/cpp/CMakeLists.txt")
        }
    }
    namespace = "com.geode.launcher"
    ndkVersion = "28.1.13356709"
}

dependencies {
    implementation (platform("androidx


rly_minutes(checkout):
    if not checkout.get("shift"):
        return 0

    try:
        shift = frappe.get_doc("Shift Type", checkout["shift"])
    except frappe.DoesNotExistError:
        return 0

    shift_end = timedelta_to_time(shift.end_time)
    grace = 10
    checkout_time = checkout["time"]
    shift_datetime = datetime.combine(checkout_time.date(), shift_end)
    grace_start = shift_datetime - timedelta(minutes=grace)

    if checkout_time < grace_start:
        diff_seconds = (shift_datetime - checkout_time).total_seconds()
        diff_minutes = math.ceil(diff_seconds / 60)
        return int(diff_minutes)

    return 0

def timedelta_to_time(td):
    total_seconds = int(td.total_seconds())
    hours = total_seconds // 3600
    minutes = (total_seconds % 3600) // 60
    seconds = total_seconds % 60
    return time(hour=hours, minute=minutes, second=seconds)


();
  this.dispatchEvent( 'dragMove', event, [ pointer, moveVector ] );
};

proto.dragEnd = function( event, pointer ) {
  if ( this.options.freeScroll ) {
    this.isFreeScrolling = true;
  }
  // set selectedIndex based on where flick will end up
  var index = this.dragEndRestingSelect();

  if ( this.options.freeScroll && !this.options.wrapAround ) {
    // if free-scroll & not wrap around
    // do not free-scroll if going outside of bounding slides
    // so bounding slides can attract slider, and keep it in bounds
    var restingX = this.getRestingPosition();
    this.isFreeScrolling = -restingX > this.slides[0].target &&
      -restingX < this.getLastSlide().target;
  } else if ( !this.options.freeScroll && index == this.selectedIndex ) {
    // boost selection if selected index has not changed
    index += this.dragEndBoostSelect();
  }
  delete this.previousDragX;
  // apply selection
  // TODO refactor this, selecting here feels weird
  // HACK, set flag so dragging stays in correct direction
  this.isDragSelect = this.options.wrapAround;
  this.select( index );
  delete this.isDragSelect;
  this.dispatchEvent( 'dragEnd', event, [ pointer ] );
};

proto.dragEndRestingSelect = function() {
  var restingX = this.getRestingPosition();
  // how far away from selected slide
  var distance = Math.abs( this.getSlideDistance( -restingX, this.selectedIndex ) );
  // get closet resting going up and going down
  var positiveResting = this._getClosestResting( restingX, distance, 1 );
  var negativeResting = this._getClosestResting( restingX, distance, -1 );
  // use closer resting for wrap-around
  var index = positiveResting.distance < negativeResting.distance ?
    positiveResting.index : negativeResting.index;
  return index;
};

/**
 * given resting X and distance to selected cell
 * get the distance and index of the closest cell
 * @param {Number} restingX - estimated post-flick resting position
 * @param {Number} distance - distance to selected cell
 * @param {Integer} increment - +1 or -1, going up or down
 * @returns {Object} - { distance: {Number}, index: {Integer} }
 */
proto._getClosestResting = function( restingX, distance, increment ) {
  var index = this.selectedIndex;
  var minDistance = Infinity;
  var condition = this.options.contain && !this.options.wrapAround ?
    // if contain, keep going if distance is equal to minDistance
    function( d, md ) { return d <= md; } : function( d, md ) { return d < md; };
  while ( condition( distance, minDistance ) ) {
    // measure distance to next cell
    index += increment;
    minDistance = distance;
    distance = this.getSlideDistance( -restingX, index );
    if ( distance === null ) {
      break;
    }
    distance = Math.abs( distance );
  }
  return {
    distance: minDistance,
    // selected was previous index
    index: index - increment
  };
};

/**
 * measure distance between x and a slide target
 * @param {Number} x
 * @param {Integer} index - slide index
 */
proto.getSlideDistance = function( x, index ) {
  var len = this.slides.length;
  // wrap around if at least 2 slides
  var isWrapAround = this.options.wrapAround && len > 1;
  var slideIndex = isWrapAround ? utils.modulo( index, len ) : index;
  var slide = this.slides[ slideIndex ];
  if ( !slide ) {
    return null;
  }
  // add distance for wrap-around slides
  var wrap = isWrapAround ? this.


Index: PredicateWithIndex<string, A>) =>
  pipe(fa, filterWithIndex(predicateWithIndex))
/* istanbul ignore next */
const traverseWithIndex_ = <F>(
  F: Applicative<F>
): (<A, B>(ta: ReadonlyRecord<string, A>, f: (k: string, a: A) => HKT<F, B>) => HKT<F, ReadonlyRecord<string, B>>) => {
  const traverseWithIndexF = traverseWithIndex(F)
  return (ta, f) => pipe(ta, traverseWithIndexF(f))
}
/* istanbul ignore next */
const wither_ = <F>(
  F: Applicative<F>
): (<A, B>(fa: ReadonlyRecord<string, A>, f: (a: A) => HKT<F, Option<B>>) => HKT<F, ReadonlyRecord<string, B>>) => {
  const witherF = wither(F)
  return (fa, f) => pipe(fa, witherF(f))
}
/* istanbul ignore next */
const wilt_ = <F>(
  F: Applicative<F>
): (<A, B, C>(
  fa: ReadonlyRecord<string, A>,
  f: (a: A) => HKT<F, Either<B, C>>
) => HKT<F, Separated<ReadonlyRecord<string, B>, ReadonlyRecord<string, C>>>) => {
  const wiltF = wilt(F)
  return (fa, f) => pipe(fa, wiltF(f))
}

// -------------------------------------------------------------------------------------
// pipeables
// -------------------------------------------------------------------------------------

/**
 * @category Filterable
 * @since 2.5.0
 */
export const filter: {
  <A, B extends A>(refinement: Refinement<A, B>): (fa: Readonly<Record<string, A>>) => Readonly<Record<string, B>>
  <A>(predicate: Predicate<A>): (fa: Readonly<Record<string, A>>) => Readonly<Record<string, A>>
} = <A>(predicate: Predicate<A>): ((fa: Readonly<Record<string, A>>) => Readonly<Record<string, A>>) =>
  filterWithIndex((_, a) => predicate(a))

/**
 * @category Filterable
 * @since 2.5.0
 */
export const filterMap: <A, B>(
  f: (a: A) => Option<B>
) => (fa: Readonly<Record<string, A>>) => Readonly<Record<string, B>> = (f) => filterMapWithIndex((_, a) => f(a))

/**
 * @category Filterable
 * @since 2.5.0
 */
export const partition: {
  <A, B extends A>(refinement: Refinement<A, B>): (
    fa: Readonly<Record<string, A>>
  ) => Separated<Readonly<Record<string, A>>, Readonly<Record<string, B>>>
  <A>(predicate: Predicate<A>): (
    fa: Readonly<Record<string, A>>
  ) => Separated<Readonly<Record<string, A>>, Readonly<Record<string, A>>>
} = <A>(
  predicate: Predicate<A>
): ((fa: Readonly<Record<string, A>>) => Separated<Readonly<Record<string, A>>, Readonly<Record<string, A>>>) =>
  partitionWithIndex((_, a) => predicate(a))

/**
 * @category Filterable
 * @since 2.5.0
 */
export const partitionMap: <A, B, C>(
  f: (a: A) => Either<B, C>
) => (fa: Readonly<Record<string, A>>) => Separated<Readonly<Record<string, B>>, Readonly<Record<string, C>>> = (f) =>
  partitionMapWithIndex((_, a) => f(a))

/**
 * @category Foldable
 * @since 2.5.0
 */
export const reduce: <A, B>(b: B, f: (b: B, a: A) => B) => (fa: Readon


 value;
        } else {
          lower[i] = lower2[i];
          upper[i] = upper2[i];
        }
      }
      //qpTemp.writeMps("bad.mps");
      //modelPtr_->writeMps("bad2.mps");
      //qpTemp.objectiveAsObject()->setActivated(0);
      //qpTemp.primal();
      //qpTemp.objectiveAsObject()->setActivated(1);
      qpTemp.primal();
      //assert (!qpTemp.problemStatus());
      if (qpTemp.objectiveValue() < bestObjectiveValue_ && !qpTemp.problemStatus()) {
        delete[] bestSolution_;
        bestSolution_ = CoinCopyOfArray(qpTemp.primalColumnSolution(), numberColumns);
        bestObjectiveValue_ = qpTemp.objectiveValue();
        //printf("better qp objective of %g\n", bestObjectiveValue_);
      }
    }
  }
}
//#############################################################################
// Constructors, destructors clone and assignment
//#############################################################################
//-------------------------------------------------------------------
// Default Constructor
//-------------------------------------------------------------------
OsiSolverLinearizedQuadratic::OsiSolverLinearizedQuadratic()
  : OsiClpSolverInterface()
{
  bestObjectiveValue_ = COIN_DBL_MAX;
  bestSolution_ = NULL;
  specialOptions3_ = 0;
  quadraticModel_ = NULL;
}
OsiSolverLinearizedQuadratic::OsiSolverLinearizedQuadratic(ClpSimplex *quadraticModel)
  : OsiClpSolverInterface(new ClpSimplex(*quadraticModel), true)
{
  bestObjectiveValue_ = COIN_DBL_MAX;
  bestSolution_ = NULL;
  specialOptions3_ = 0;
  quadraticModel_ = new ClpSimplex(*quadraticModel);
  // linearize
  int numberColumns = modelPtr_->numberColumns();
  const double *solution = modelPtr_->primalColumnSolution();
  // Replace objective
  ClpObjective *trueObjective = modelPtr_->objectiveAsObject();
  ClpObjective *objective = new ClpLinearObjective(NULL, numberColumns);
  modelPtr_->setObjectivePointer(objective);
  double offset;
  double saveOffset = modelPtr_->objectiveOffset();
  memcpy(modelPtr_->objective(), trueObjective->gradient(modelPtr_, solution, offset, true, 2),
    numberColumns * sizeof(double));
  modelPtr_->setObjectiveOffset(saveOffset + offset);
  delete trueObjective;
  checkQP(quadraticModel_);
}
//-------------------------------------------------------------------
// Clone
//-------------------------------------------------------------------
OsiSolverInterface *
OsiSolverLinearizedQuadratic::clone(bool /*copyData*/) const
{
  //assert (copyData);
  return new OsiSolverLinearizedQuadratic(*this);
}

//-------------------------------------------------------------------
// Copy constructor
//-------------------------------------------------------------------
OsiSolverLinearizedQuadratic::OsiSolverLinearizedQuadratic(
  const OsiSolverLinearizedQuadratic &rhs)
  : OsiSolverInterface(rhs)
  , OsiClpSolverInterface(rhs)
{
  bestObjectiveValue_ = rhs.bestObjectiveValue_;
  if (rhs.bestSolution_) {
    bestSolution_ = CoinCopyOfArray(rhs.bestSolution_, modelPtr_->numberColumns());
  } else {
    bestSolution_ = NULL;
  }
  specialOptions3_ = rhs.specialOptions3_;
  if (rhs.quadraticModel_) {
    quadraticModel_ = new ClpSimplex(*rhs.quadraticModel_);
  } else {
    quadraticModel_ = NULL;
  }
  checkQP(rhs.quadraticModel_);
  checkQP(quadraticModel_);
}

//-------------------------------------------------------------------
// Destructor
//-----------------------------------


 OPEN CIRCLE ARROWS",
    "category": 7,
    "tags": [
      "anticlockwise",
      "arrow",
      "withershins"
    ]
  },
  {
    "id": "1F519",
    "shortcode": "back",
    "description": "BACK WITH LEFTWARDS ARROW ABOVE",
    "category": 7,
    "tags": [
      "arrow"
    ]
  },
  {
    "id": "1F51A",
    "shortcode": "end",
    "description": "END WITH LEFTWARDS ARROW ABOVE",
    "category": 7,
    "tags": [
      "arrow"
    ]
  },
  {
    "id": "1F51B",
    "shortcode": "on",
    "description": "ON WITH EXCLAMATION MARK WITH LEFT RIGHT ARROW ABOVE",
    "category": 7,
    "tags": [
      "arrow",
      "mark",
      "on!"
    ]
  },
  {
    "id": "1F51C",
    "shortcode": "soon",
    "description": "SOON WITH RIGHTWARDS ARROW ABOVE",
    "category": 7,
    "tags": [
      "arrow"
    ]
  },
  {
    "id": "1F51D",
    "shortcode": "top",
    "description": "TOP WITH UPWARDS ARROW ABOVE",
    "category": 7,
    "tags": [
      "arrow",
      "up"
    ]
  },
  {
    "id": "1F6D0",
    "shortcode": "place_of_worship",
    "description": "PLACE OF WORSHIP",
    "category": 7,
    "tags": [
      "religion"
    ]
  },
  {
    "id": "269B-FE0F",
    "shortcode": "atom_symbol",
    "category": 7,
    "tags": [
      "atheist"
    ]
  },
  {
    "id": "1F549-FE0F",
    "shortcode": "om_symbol",
    "category": 7,
    "tags": [
      "hindu",
      "religion"
    ]
  },
  {
    "id": "2721-FE0F",
    "shortcode": "star_of_david",
    "category": 7,
    "tags": [
      "jew",
      "jewish",
      "religion"
    ]
  },
  {
    "id": "2638-FE0F",
    "shortcode": "wheel_of_dharma",
    "category": 7,
    "tags": [
      "buddhist",
      "religion"
    ]
  },
  {
    "id": "262F-FE0F",
    "shortcode": "yin_yang",
    "category": 7,
    "tags": [
      "religion",
      "tao",
      "taoist"
    ]
  },
  {
    "id": "271D-FE0F",
    "shortcode": "latin_cross",
    "category": 7,
    "tags": [
      "christian",
      "religion"
    ]
  },
  {
    "id": "2626-FE0F",
    "shortcode": "orthodox_cross",
    "category": 7,
    "tags": [
      "christian",
      "religion"
    ]
  },
  {
    "id": "262A-FE0F",
    "shortcode": "star_and_crescent",
    "category": 7,
    "tags": [
      "islam",
      "muslim",
      "religion"
    ]
  },
  {
    "id": "262E-FE0F",
    "shortcode": "peace_symbol",
    "category": 7
  },
  {
    "id": "1F54E",
    "shortcode": "menora


import datetime
import numpy as np
import os
import os.path as osp
import glob
import cv2
import insightface

assert insightface.__version__>='0.4'

def detect_person(img, detector):
    bboxes, kpss = detector.detect(img)
    bboxes = np.round(bboxes[:,:4]).astype(np.int)
    kpss = np.round(kpss).astype(np.int)
    kpss[:,:,0] = np.clip(kpss[:,:,0], 0, img.shape[1])
    kpss[:,:,1] = np.clip(kpss[:,:,1], 0, img.shape[0])
    vbboxes = bboxes.copy()
    vbboxes[:,0] = kpss[:, 0, 0]
    vbboxes[:,1] = kpss[:, 0, 1]
    vbboxes[:,2] = kpss[:, 4, 0]
    vbboxes[:,3] = kpss[:, 4, 1]
    return bboxes, vbboxes

if __name__ == '__main__':
    import glob
    detector = insightface.model_zoo.get_model('scrfd_person_2.5g.onnx', download=True)
    detector.prepare(0, nms_thresh=0.5, input_size=(640, 640))
    img_paths = glob.glob('data/images/*.jpg')
    for img_path in img_paths:
        img = cv2.imread(img_path)
        bboxes, vbboxes = detect_person(img, detector)
        for i in range(bboxes.shape[0]):
            bbox = bboxes[i]
            vbbox = vbboxes[i]
            x1,y1,x2,y2 = bbox
            vx1,vy1,vx2,vy2 = vbbox
            cv2.rectangle(img, (x1,y1)  , (x2,y2) , (0,255,0) , 1)
            alpha = 0.8
            color = (255, 0, 0)
            for c in range(3):
                img[vy1:vy2,vx1:vx2,c] = img[vy1:vy2, vx1:vx2, c]*alpha + color[c]*(1.0-alpha)
            cv2.circle(img, (vx1,vy1) , 1, color , 2)
            cv2.circle(img, (vx1,vy2) , 1, color , 2)
            cv2.circle(img, (vx2,vy1) , 1, color , 2)
            cv2.circle(img, (vx2,vy2) , 1, color , 2)
        filename = img_path.split('/')[-1]
        cv2.imwrite('./outputs/%s'%filename, img)


adb8e80  ! 1448: LDXA_R	ldxa	[%r14, %r0] 0x74, %r29
	.word 0xbe342051  ! 1452: ORN_I	orn 	%r16, 0x0051, %r31
cpu_intr_3_106:
	setx	0x280233, %g1, %o0
	ta	T_SEND_THRD_INTR
T3_asi_reg_wr_74:
	mov	0x3c5, %r14
	.word 0xf2f38e40  ! 1458: STXA_R	stxa	%r25, [%r14 + %r0] 0x72
iob_intr_3_121:
!$EV trig_pc_d(3,expr(@VA(.MAIN.iob_intr_3_121), 16, 16)) -> intp(3, 0, 39)
cpu_intr_3_107:
	setx	0x2b0218, %g1, %o0
	ta	T_SEND_THRD_INTR
	.word 0xfea421cb  ! 1469: STWA_I	stwa	%r31, [%r16 + 0x01cb] %asi
T3_asi_reg_wr_75:
	mov	0x3c7, %r14
	.word 0xfaf38400  ! 1472: STXA_R	stxa	%r29, [%r14 + %r0] 0x20
	.word 0xf0344000  ! 1475: STH_R	sth	%r24, [%r17 + %r0]
iob_intr_3_122:
!$EV trig_pc_d(3,expr(@VA(.MAIN.iob_intr_3_122), 16, 16)) -> intp(3, 0, 36)
	ta	T_CHANGE_HPRIV
iob_intr_3_123:
!$EV trig_pc_d(3,expr(@VA(.MAIN.iob_intr_3_123), 16, 16)) -> intp(3, 0, 2c)
cpu_intr_3_108:
	setx	0x280110, %g1, %o0
	ta	T_SEND_THRD_INTR
cpu_intr_3_109:
	setx	0x2a0107, %g1, %o0
	ta	T_SEND_THRD_INTR
	ta	T_CHANGE_TO_TL1
	.word 0xf4b5606f  ! 1497: STHA_I	stha	%r26, [%r21 + 0x006f] %asi
T3_asi_reg_rd_73:
	mov	0x3c5, %r14
	.word 0xf0db8e80  ! 1499: LDXA_R	ldxa	[%r14, %r0] 0x74, %r24
	.word 0xf0f4a026  ! 1502: STXA_I	stxa	%r24, [%r18 + 0x0026] %asi
	.word 0xbabca1a6  ! 1505: XNORcc_I	xnorcc 	%r18, 0x01a6, %r29
iob_intr_3_124:
!$EV trig_pc_d(3,expr(@VA(.MAIN.iob_intr_3_124), 16, 16)) -> intp(3, 0, 1e)
	.word 0xb2bca056  ! 1513: XNORcc_I	xnorcc 	%r18, 0x0056, %r25
	.word 0xb72cd000  ! 1516: SLLX_R	sllx	%r19, %r0, %r27
	.word 0xb6a48000  ! 1517: SUBcc_R	subcc 	%r18, %r0, %r27
cpu_intr_3_110:
	setx	0x29022e, %g1, %o0
	ta	T_SEND_THRD_INTR


#ifndef X3F_PARSER_H
#define X3F_PARSER_H
#include "ByteStream.h"
#include "FileMap.h"

/*
RawSpeed - RAW file decoder.

Copyright (C) 2013 Klaus Post

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

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

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

http://www.klauspost.com
*/

namespace RawSpeed {

class X3fDirectory
{
public:
  X3fDirectory() : offset(0), length(0), id(string()){};
  X3fDirectory(ByteStream *bytes);
  X3fDirectory(const X3fDirectory &other) : offset(other.offset), length(other.length), id(other.id), sectionID(other.sectionID) {};
  uint32 offset;
  uint32 length;
  string id;
  string sectionID;
};

class X3fImage
{
public:
  X3fImage();
  X3fImage(ByteStream *bytes, uint32 offset, uint32 length);
  /*  1 = RAW X3 (SD1)
  2 = thumbnail or maybe just RGB
  3 = RAW X3 */
  uint32 type;
  /*  3 = 3x8 bit pixmap
  6 = 3x10 bit huffman with map table
  11 = 3x8 bit huffman
  18 = JPEG */
  uint32 format;
  uint32 width;
  uint32 height;
  // Pitch in bytes, 0 if Huffman encoded
  uint32 pitchB;
  uint32 dataOffset;
  uint32 dataSize;
};

class X3fPropertyCollection
{
public:
  X3fPropertyCollection(){};
  void addProperties(ByteStream *bytes, uint32 offset, uint32 length);
  X3fPropertyCollection(const X3fPropertyCollection &other)
    : props(other.props) {};
  string getString( ByteStream *bytes );
  map<string, string> props;
};

class X3fDecoder;
class RawDecoder;

class X3fParser {
public:
  X3fParser(FileMap* file);
  virtual ~X3fParser(void);
  virtual RawDecoder* getDecoder();
protected:
  void readDirectory();
  string getId();
  void freeObjects();
  ByteStream *bytes;
  X3fDecoder *decoder;
  FileMap* mFile;
};

} // namespace RawSpeed
#endif


 = capabilities.button.button.held(additional_fields)
    elseif value.value == 1 then
        event = capabilities.button.button.pushed(additional_fields)
    elseif value.value == 2 then
        event = capabilities.button.button.double(additional_fields)
    end
    if event ~= nil then
        device:emit_event_for_endpoint(
        zb_rx.address_header.src_endpoint.value,
        event)
    end
end

local ezviz_button = {
	NAME = "ezviz button",
    zigbee_handlers = {
        attr = {
            [0xFE05] = {
              [0x0000] = button_handler
            }
        }
    },
    lifecycle_handlers = {
    },
	can_handle = can_handle
}

return ezviz_button


ne_app)
  - : PWA が起動された際に、ブラウザーのタブではなく、自分自身で専用のウィンドウで起動されるように指定する方法を説明します。
- [アプリのアイコンを定義](/ja/docs/Web/Progressive_web_apps/How_to/Define_app_icons)
  - : PWA が端末にインストールされた際に使用するアイコンセットを自分自身で定義する方法を説明しています。
- [アプリの色のカスタマイズ](/ja/docs/Web/Progressive_web_apps/How_to/Customize_your_app_colors)
  - : PWA の背景色とテーマ色を設定するにはどうすればよいかを記述しています。
- [バッジの表示](/ja/docs/Web/Progressive_web_apps/How_to/Display_badge_on_app_icon)
  - : PWA のアイコンにバッジを表示する方法について説明しています。例えば、ユーザーに新しいメッセージが届いたことを知らせる場合などです。
- [アプリのよくあるアクションをショートカットとして公開](/ja/docs/Web/Progressive_web_apps/How_to/Expose_common_actions_as_shortcuts)
  - : PWA の一般的な操作を公開する方法について、オペレーティングシステムのアプリショートカットメニューから起動できることが記述されています。
- [アプリ間のデータ共有](/ja/docs/Web/Progressive_web_apps/How_to/Share_data_between_apps)
  - : PWA がオペレーティングシステムのアプリ共有メカニズムを使用して、他にもデータを共有できることを説明しています。
- [PWA からのインストールの起動](/ja/docs/Web/Progressive_web_apps/How_to/Trigger_install_prompt)
  - : 開発者が自分自身で UI を提供し、ユーザーに PWA のインストールを促す方法を説明しています。
- [PWA とのファイルの関連付け](/ja/docs/Web/Progressive_web_apps/How_to/Associate_files_with_your_PWA)
  - : ファイルの種類と PWA の関連付けを作成する方法を説明し、ユーザーがファイルをクリックすると、PWA が起動して何かを処理するようにすることができます。

## チュートリアル

これらのチュートリアルでは、PWA をゼロから作成します。チュートリアルでは、アプリを作成する段階を最初から最後まで順を追って説明し、アプリのさまざまな機能の実装方法について解説します。

- [初めての PWA の作成](/ja/docs/Web/Progressive_web_apps/Tutorials/CycleTracker)
  - : これは初心者向けのチュートリアルで、月の周期を追跡する PWA の作成方法を説明しています。レッスンには、完全に機能するウェブアプリを作成


           dfs(i + 1, now + arr.get(i));
                add += 1;
            }
            if (sub > 0) {
                sub -= 1;
                dfs(i + 1, now - arr.get(i));
                sub += 1;
            }
            if (mul > 0) {
                mul -= 1;
                dfs(i + 1, now * arr.get(i));
                mul += 1;
            }
            if (divi > 0) {
                divi -= 1;
                dfs(i + 1, now / arr.get(i));
                divi += 1;
            }
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        n = sc.nextInt();

        for (int i = 0; i < n; i++) {
            int x = sc.nextInt();
            arr.add(x);
        }

        add = sc.nextInt();
        sub = sc.nextInt();
        mul = sc.nextInt();
        divi = sc.nextInt();

        // DFS 메서드 호출
        dfs(1, arr.get(0));

        // 최댓값과 최솟값 차례대로 출력
        System.out.println(maxValue);
        System.out.println(minValue);
    }
}import java.util.*;

public class Main {

    public static void quickSort(int[] arr, int start, int end) {
        if (start >= end) return; // 원소가 1개인 경우 종료
        int pivot = start; // 피벗은 첫 번째 원소
        int left = start + 1;
        int right = end;
        while (left <= right) {
            // 피벗보다 큰 데이터를 찾을 때까지 반복
            while (left <= end && arr[left] <= arr[pivot]) left++;
            // 피벗보다 작은 데이터를 찾을 때까지 반복
            while (right > start && arr[right] >= arr[pivot]) right--;
            // 엇갈렸다면 작은 데이터와 피벗을 교체
            if (left > right) {
                int temp = arr[pivot];
                arr[pivot] = arr[right];
                arr[right] = temp;
            }
            // 엇갈리지 않았다면 작은 데이터와 큰 데이터를 교체
            else {
                int temp = arr[left];
                arr[left] = arr[right];
                arr[right] = temp;
            }
        }
        // 분할 이후 왼쪽 부분과 오른쪽 부분에서 각각 정렬 수행
        quickSort(arr, start, right - 1);
        quickSort(arr, right + 1, end);
    }

    public static void main(String[] args) {
        int n = 10;
        int[] arr = {7, 5, 9, 0, 3, 1, 6, 2, 4, 8};

        quickSort(arr, 0, n - 1


put-box input.input-text {
  width: 100%;
}

/* ============================================ *
 * My Account Global Styles
 * ============================================ */
body.customer-account .my-account .page-title h1 {
  border: 0;
  text-align: left;
}
body.customer-account .my-account .title-buttons {
  position: relative;
  text-align: right;
}
body.customer-account .my-account .title-buttons h1 {
  text-align: left;
}
body.customer-account .my-account .title-buttons .button {
  position: absolute;
  right: 0;
  top: 0;
}
body.customer-account .my-account .title-buttons a,
body.customer-account .my-account .title-buttons span.separator {
  position: relative;
  top: -42px;
}
body.customer-account .my-account .fieldset h2,
body.customer-account .my-account .addresses-list h2,
body.customer-account .my-account .order-details h2 {
  width: 100%;
  display: inline-block;
}
body.customer-account .my-account .addresses-list h3 {
  font-size: 14px;
  font-weight: 600;
}
body.customer-account .my-account .fieldset {
  margin-top: 30px;
  margin-bottom: 30px;
}
body.customer-account .data-table {
  margin-top: 5px;
}
body.customer-account .data-table td a {
  font-family: "Raleway", "Helvetica Neue", Verdana, Arial, sans-serif;
  text-transform: uppercase;
  font-style: normal;
  font-size: 13px;
}
body.customer-account .data-table span.nobr {
  white-space: normal;
}
body.customer-account .data-table span.nobr a {
  white-space: nowrap;
}
body.customer-account .data-table td.view a {
  display: block;
}
body.customer-account .data-table .separator {
  display: none;
}
body.customer-account .sidebar .block ol#compare-items li {
  margin: 10px 0;
}
body.customer-account .sidebar .block .block-content p.block-subtitle {
  margin-bottom: 15px;
}
body.customer-account .sidebar .block .block-content .actions {
  margin-top: 30px;
}
body.customer-account .sidebar ol#cart-sidebar-reorder li {
  margin-top: 10px;
  margin-bottom: 0;
}
body.customer-account .sidebar ol#cart-sidebar-reorder p.product-name {
  display: inline-block;
  margin-bottom: 0;
}
body.customer-account .sidebar .block-cart .summary {
  margin-bottom: 15px;
}
body.customer-account .sidebar .block-reorder ol#cart-sidebar-reorder li {
  margin-top: 10px;
  margin-bottom: 0;
}
body.customer-account .sidebar .block-reorder ol#cart-sidebar-reorder li input {
  margin-right: 10px;
}
body.customer-account .sidebar .block-reorder ol#cart-sidebar-reorder p.product-name {
  display: inline;
  margin-bottom: 0;
}

.form-list .customer-dob .dob-month,
.form-list .customer-dob .dob-day {
  width: 40px;
  float: left;
  margin-right: 10px;
}
.form-list .customer-dob .dob-year {
  width: 80px;
  float: left;
}

/* ================================


na|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(5))},function(e,t,n){!function(e){"use strict";e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar


global_load_ushort v42, v[43:44], off
	global_load_ushort v43, v[45:46], off
	s_waitcnt vmcnt(0)
	s_barrier
	ds_write_b16 v23, v41
	ds_write_b16 v23, v42 offset:1280
	ds_write_b16 v23, v43 offset:2560
	s_and_saveexec_b32 s16, vcc_lo
	s_cbranch_execz BB46_3
	s_addk_i32 s15, 0x5800
	v_or_b32_e32 v41, s15, v21
	v_add3_u32 v41, v41, v22, v28
	v_ashrrev_i32_e32 v42, 31, v41
	v_lshlrev_b64 v[41:42], 1, v[41:42]
	v_add_co_u32 v41, s1, s10, v41
	v_add_co_ci_u32_e64 v42, s1, s11, v42, s1
	global_load_ushort v41, v[41:42], off
	s_waitcnt vmcnt(0)
	ds_write_b16 v23, v41 offset:3840
BB46_3:
	s_or_b32 exec_lo, exec_lo, s16
	s_lshl_b32 s1, s6, 15
	v_or3_b32 v49, s1, v30, s4
	v_or_b32_e32 v41, v49, v29
	v_or_b32_e32 v43, v49, v33
	v_or_b32_e32 v45, v49, v36
	v_or_b32_e32 v47, v49, v38
	v_ashrrev_i32_e32 v42, 31, v41
	v_ashrrev_i32_e32 v44, 31, v43
	v_ashrrev_i32_e32 v46, 31, v45
	v_ashrrev_i32_e32 v48, 31, v47
	v_lshlrev_b64 v[41:42], 1, v[41:42]
	v_lshlrev_b64 v[43:44], 1, v[43:44]
	v_lshlrev_b64 v[45:46], 1, v[45:46]
	v_lshlrev_b64 v[47:48], 1, v[47:48]
	v_add_co_u32 v55, s1, s12, v41
	v_add_co_ci_u32_e64 v56, s1, s13, v42, s1
	v_add_co_u32 v53, s1, s12, v43
	v_or_b32_e32 v43, v49, v32
	v_add_co_ci_u32_e64 v54, s1, s13, v44, s1
	v_add_co_u32 v51, s1, s12, v45
	v_or_b32_e32 v45, v49, v34
	v_add_co_ci_u32_e64 v52, s1, s13, v46, s1
	v_add_co_u32 v41, s1, s12, v47
	v_ashrrev_i32_e32 v44, 31, v43
	v_add_co_ci_u32_e64 v42, s1, s13, v48, s1
	v_or_b32_e32 v47, v49, v37
	s_clause 0x3
	global_load_ushort v57, v[55:56], off
	global_load_ushort v58, v[53:54], off
	global_load_ushort v59, v[51:52], off
	global_load_ushort v60


200000, 0xf000000, 0xfffffff}
	// p2562P is the twice prime modulus as a field element.
	p2562P = [p256Limbs]uint32{0x1ffffffe, 0xfffffff, 0x1fffffff, 0x7ff, 0, 0, 0x400000, 0xe000000, 0x1fffffff}
)

// p256Precomputed contains precomputed values to aid the calculation of scalar
// multiples of the base point, G. It's actually two, equal length, tables
// concatenated.
//
// The first table contains (x,y) field element pairs for 16 multiples of the
// base point, G.
//
//   Index  |  Index (binary) | Value
//       0  |           0000  | 0G (all zeros, omitted)
//       1  |           0001  | G
//       2  |           0010  | 2**64G
//       3  |           0011  | 2**64G + G
//       4  |           0100  | 2**128G
//       5  |           0101  | 2**128G + G
//       6  |           0110  | 2**128G + 2**64G
//       7  |           0111  | 2**128G + 2**64G + G
//       8  |           1000  | 2**192G
//       9  |           1001  | 2**192G + G
//      10  |           1010  | 2**192G + 2**64G
//      11  |           1011  | 2**192G + 2**64G + G
//      12  |           1100  | 2**192G + 2**128G
//      13  |           1101  | 2**192G + 2**128G + G
//      14  |           1110  | 2**192G + 2**128G + 2**64G
//      15  |           1111  | 2**192G + 2**128G + 2**64G + G
//
// The second table follows the same style, but the terms are 2**32G,
// 2**96G, 2**160G, 2**224G.
//
// This is ~2KB of data.
var p256Precomputed = [p256Limbs * 2 * 15 * 2]uint32{
	0x11522878, 0xe730d41, 0xdb60179, 0x4afe2ff, 0x12883add, 0xcaddd88, 0x119e7edc, 0xd4a6eab, 0x3120bee,
	0x1d2aac15, 0xf25357c, 0x19e45cdd, 0x5c721d0, 0x1992c5a5, 0xa237487, 0x154ba21, 0x14b10bb, 0xae3fe3,
	0xd41a576, 0x922fc51, 0x234994f, 0x60b60d3, 0x164586ae, 0xce95f18, 0x1fe49073, 0x3fa36cc, 0x5ebcd2c,
	0xb402f2f, 0x15c70bf, 0x1561925c, 0x5a26704, 0xda91e90, 0xcdc1c7


        }
        let copy_geoes_count = s.read(&0u16);
        if copy_geoes_count > 1 {
            panic!("Copy geometries are not supported yet.");
        }
    }

    // color,
    fn hit(&self, r: &Ray3) -> Option<Vec3> {

        // TODO search by kdtree for geometries
        for g in self.gs.iter() {

        }
        None
    }
}
use std::{
    collections::{BTreeMap, VecDeque},
    fs::File,
    path::Path,
};

use swirl::PerformError;

pub fn gen_scripts(export_script: &Path, import_script: &Path) -> Result<(), PerformError> {
    let config: VisibilityConfig = toml::from_str(include_str!("dump-db.toml")).unwrap();
    let export_sql = File::create(export_script)?;
    let import_sql = File::create(import_script)?;
    config.gen_psql_scripts(export_sql, import_sql)
}

/// An enum indicating whether a column is included in the database dumps.
/// Public columns are included, private are not.
#[derive(Clone, Copy, Debug, Deserialize, PartialEq)]
#[serde(rename_all = "lowercase")]
enum ColumnVisibility {
    Private,
    Public,
}

/// Filtering information for a single table. The `dependencies` field is only
/// used to determine the order of the tables in the generated import script,
/// and should list all tables the current tables refers to with foreign key
/// constraints on public columns. The `filter` field is a valid SQL expression
/// used in a `WHERE` clause to filter the rows of the table. The `columns`
/// field maps column names to their respective visibilities.
#[derive(Clone, Debug, Default, Deserialize)]
struct TableConfig {
    #[serde(default)]
    dependencies: Vec<String>,
    filter: Option<String>,
    columns: BTreeMap<String, ColumnVisibility>,
    #[serde(default)]
    column_defaults: BTreeMap<String, String>,
}

/// Subset of the configuration data to be passed on to the Handlbars template.
#[derive(Debug, Serialize)]
struct HandlebarsTableContext<'a> {
    name: &'a str,
    filter: Option<&'a str>,
    columns: String,
    column_defaults: BTreeMap<&'a str, &'a str>,
}

impl TableConfig {
    fn handlebars_context<'a>(&'a self, name: &'a str) -> Option<HandlebarsTableContext<'a>> {
        let columns = self
            .columns
            .iter()
            .filter(|&(_, &vis)| vis == ColumnVisibility::Public)
            .map(|(col, _)| format!("\"{}\"", col))
            .collect::<Vec<String>>()
            .join(", ");
        if columns.is_empty() {
            None
        } else {
            let filter = self.filter.as_ref().map(String::as_str);
            let column_defaults = self
                .column_defaults
                .iter()
                .map(|(k, v)| (k.as_str(), v.as_str()))
                .collect();
            Some(HandlebarsTableContext {
                name,
                filter,
                columns,
                column_defaults,
            })
        }
    }
}

/// Maps table names to the respective configurations. Used to load `dump_db.toml`.
#[derive(Clone, Debug, Default, Deserialize)]
#[serde(transparent)]
struct VisibilityConfig(BTreeMap<String, TableConfig>);

/// Subset of the configuration data to be passed on to the Handlbars template.
#[derive(Debug, Serialize)]
struct HandlebarsContext<'a> {
    tables: Vec<HandlebarsTableContext<'a>>,
}

impl VisibilityConfig {
    /// Sort the tables in a way that dependencies come before dependent tables.
    ///
    /// Returns a vector of table names.
    fn topological_sort(&self) -> Vec


IS how many steps already passed
    let mlistlen: Option<usize> = redis::cmd("LLEN").arg(redis_key).query_async(cnx).await?;
    let listlen = mlistlen.unwrap_or(0);

    if is_last {
        if step as usize == listlen {
            Ok(FlowResult::LastOk)
        } else {
            Ok(FlowResult::LastBlock)
        }
    } else {
        if step as usize == listlen {
            let (_, mexpire): ((), Option<i64>) = redis::pipe()
                .cmd("LPUSH")
                .arg(redis_key)
                .arg("foo")
                .cmd("TTL")
                .arg(redis_key)
                .query_async(cnx)
                .await?;
            let expire = mexpire.unwrap_or(-1);
            if expire < 0 {
                let _: () = redis::cmd("EXPIRE")
                    .arg(redis_key)
                    .arg(timeframe)
                    .query_async(cnx)
                    .await?;
            }
        }
        // never block if not the last step!
        Ok(FlowResult::NonLast)
    }
}

async fn ban_react<CNX: redis::aio::ConnectionLike>(
    logs: &mut Logs,
    cnx: &mut CNX,
    elem: &FlowElement,
    redis_key: &str,
    blocked: bool,
    bad: SimpleDecision,
) -> SimpleDecision {
    let ban_key = get_ban_key(redis_key);
    let banned = is_banned(cnx, &ban_key).await;
    if banned {
        logs.debug(|| format!("Key {} is banned!", ban_key));
    }
    if banned || blocked {
        let action = extract_bannable_action(
            cnx,
            logs,
            &elem.action,
            redis_key,
            &ban_key,
            if banned {
                BanStatus::AlreadyBanned
            } else {
                BanStatus::NewBan
            },
        )
        .await;

        stronger_decision(
            bad,
            SimpleDecision::Action(
                action,
                serde_json::json!({
                    "initiator": "flow_check",
                    "name": elem.name,
                }),
            ),
        )
    } else {
        bad
    }
}

pub async fn flow_check(
    logs: &mut Logs,
    flows: &HashMap<SequenceKey, Vec<FlowElement>>,
    reqinfo: &RequestInfo,
    tags: &mut Tags,
) -> anyhow::Result<SimpleDecision> {
    let sequence_key = session_sequence_key(reqinfo);
    match flows.get(&sequence_key) {
        None => Ok(SimpleDecision::Pass),
        Some(elems) => {
            let mut bad = SimpleDecision::Pass;
            // do not establish the connection if unneeded
            let mut cnx = crate::redis::redis_async_conn().await?;
            for elem in elems.iter() {
                if !flow_match(reqinfo, tags, elem) {
                    continue;
                }
                logs.debug(|| format!("Testing flow control {} (step {})", elem.name, elem.step));
                match build_redis_key(reqinfo, tags, &elem.key, &elem.id, &elem.name) {
                    Some(redis_key) => {
                        match check_flow(&mut cnx, &redis_key, elem.step, elem.timeframe, elem.is_last).await? {
                            FlowResult::LastOk => {
                                tags.insert(&elem.name);


eu/reva/v2/pkg/rgrpc/todo/pool"
	"github.com/riandyrn/otelchi"

	"github.com/opencloud-eu/opencloud/pkg/account"
	"github.com/opencloud-eu/opencloud/pkg/log"
	"github.com/opencloud-eu/opencloud/pkg/middleware"
	"github.com/opencloud-eu/opencloud/pkg/tracing"
	"github.com/opencloud-eu/opencloud/pkg/x/io/fsx"
	"github.com/opencloud-eu/opencloud/services/web/pkg/assets"
	"github.com/opencloud-eu/opencloud/services/web/pkg/config"
	"github.com/opencloud-eu/opencloud/services/web/pkg/theme"
)

// ErrConfigInvalid is returned when the config parse is invalid.
var ErrConfigInvalid = `Invalid or missing config`

// Service defines the service handlers.
type Service interface {
	ServeHTTP(w http.ResponseWriter, r *http.Request)
	Config(w http.ResponseWriter, r *http.Request)
}

// NewService returns a service implementation for Service.
func NewService(opts ...Option) (Service, error) {
	options := newOptions(opts...)

	m := chi.NewMux()
	m.Use(options.Middleware...)

	m.Use(
		otelchi.Middleware(
			"web",
			otelchi.WithChiRoutes(m),
			otelchi.WithTracerProvider(options.TraceProvider),
			otelchi.WithPropagators(tracing.GetPropagator()),
		),
	)

	svc := Web{
		logger:          options.Logger,
		config:          options.Config,
		mux:             m,
		coreFS:          options.CoreFS,
		themeFS:         options.ThemeFS,
		gatewaySelector: options.GatewaySelector,
	}

	themeService, err := theme.NewService(
		theme.ServiceOptions{}.
			WithThemeFS(options.ThemeFS).
			WithGatewaySelector(options.GatewaySelector),
	)
	if err != nil {
		return svc, err
	}

	m.Route(options.Config.HTTP.Root, func(r chi.Router) {
		r.Get("/config.json", svc.Config)
		r.Route("/branding/logo", func(r chi.Router) {
			r.Use(middleware.ExtractAccountUUID(
				account.Logger(options.Logger),
				account.JWTSecret(options.Config.TokenManager.JWTSecret),
			))
			r.Post("/", themeService.LogoUpload)
			r.Delete("/", themeService.LogoReset)
		})
		r.Route("/themes", func(r chi.Router) {
			r.Get("/{id}/theme.json", themeService.Get)
			r.Mount("/", svc.Static(
				options.ThemeFS.IOFS(),
				path.Join(svc.config.HTTP.Root, "/themes"),
				options.Config.HTTP.CacheTTL,
			))
		})
		r.Mount(options.AppsHTTPEndpoint, svc.Static(
			options.AppFS,
			path.Join(svc.config.HTTP.Root, options.AppsHTTPEndpoint),
			options.Config.HTTP.CacheTTL,
		))
		r.Mount("/", svc.Static(
			svc.coreFS,
			svc.config.HTTP.Root,
			options.Config.HTTP.CacheTTL,
		))
	})
	_ = chi.Walk(m, func(method string, route string, handler http.Handler, middlewares ...func(http.Handler) http.Handler) error {
		options.Logger.Debug().Str("method", method).Str("route", route).Int("middlewares", len(middlewares)).Msg("serving endpoint")
		return nil
	})

	return svc, nil
}

// Web defines the handlers for the web service.
type Web struct {
	logger          log.Logger
	config          *conf


int _eval(String expression) {
  List<String> hexNums = expression.split("+");
  int result = 0;
  for (var n in hexNums) {
    n = n.replaceFirst("0x", "");
    int num = int.parse(n, radix: 16);
    result += num;
  }
  return result;
}

String _sanitizeFileName(String name) {
  var keywords = {":", "*", "?", "\"", "\\", "/", "<", ">", "|", "\\0", "　"};
  for (var keyword in keywords) {
    name = name.replaceAll(keyword, " ");
  }
  if (name.startsWith(".")) {
    name = name.substring(1);
  }
  if (name.endsWith(".")) {
    name = name.substring(0, name.length - 1);
  }
  // 替换连续空格为一个空格
  name = name.replaceAllMapped(RegExp("\\s+"), (_) => " ");
  return name.trim();
}
import 'package:flutter/material.dart';
import 'package:whatsapp_clone/common/screens/homescreen.dart';
import 'package:whatsapp_clone/screens/chats/chat_screen.dart';
import 'package:whatsapp_clone/screens/login/login_screen.dart';
import 'package:whatsapp_clone/screens/onboarding_screen/onboarding_screen.dart';
import 'package:whatsapp_clone/screens/otp/otp_screen.dart';
import 'package:whatsapp_clone/screens/profile/profile_screen.dart';
import 'package:whatsapp_clone/screens/settings/settings_screen.dart';
import 'package:whatsapp_clone/screens/signup/signup_screen.dart';

final Map<String, WidgetBuilder> routes = {
  OnboardingScreen.routeName: (context) => const OnboardingScreen(),
  LoginScreen.routeName: (context) => const LoginScreen(),
  OTPScreen.routeName: (context) => const OTPScreen(),
  SignupScreen.routeName: (context) => const SignupScreen(),
  HomeScreen.routeName: (context) => const HomeScreen(),
  ChatScreen.routeName: (context) => const ChatScreen(),
  SettingsScreen.routeName: (context) => const SettingsScreen(),
  ProfileScreen.routeName: (context) => const ProfileScreen(),
} ;class Channel{
  final String channelName;
  final String profilePicture;
  final String message;
  final String timeStamp;
  final int unreadMessages;
  final bool isRead;

  const Channel({
    required this.channelName,
    required this.profilePicture,
    required this.message,
    required this.timeStamp,
    this.unreadMessages = 0,
    this.isRead = false,
  });
}

// demo products
List<Channel> channelNews = [
  const Channel


镜子数量来追求最高的总能量捕获，但其代价是镜间干扰加剧，导致部分区域光线集中，从而推高了总成本和峰值热流。此设计适用于对技术指标有极致要求、且成本与设备可靠性约束相对宽松的示范性工程。

方案B (成本优先型): 该方案实现了最低的初始投资成本。其决策变量 (A_z,1=2.35,A_lim=1.81) 均为较大值。这导致生成算法构建了一个整体稀疏的镜场布局。稀疏的布局虽然因镜子总数和占地面积的减少而有效降低了成本，但也因总采光面积的下降而牺牲了光学性能。此设计适用于预算严格、对快速投资回报有较高要求的商业化项目。

方案C (均衡型): 该方案位于帕累托前沿的“膝点”（Knee Point）区域，在三个目标间取得了最优的折中，尤其在控制峰值热流上表现突出。其决策变量 (A_z,1=1.92,A_lim=1.48) 取值居中。这表明算法找到了一组能够巧妙平衡周向密度（由$A_{z,1}控制）与∗∗径向疏密节奏∗∗（由A_{lim}$控制）的参数组合，在保证较高土地利用率的同时，通过合理的镜间距有效缓解了阴影遮挡和过度能量集中，最终实现了三个目标的最佳协同。

4.5均衡型方案深度剖析

为具体展示优化成果的实际形态，并探讨其工程可信度，本节对综合性能最佳的“方案C”进行深度剖析。

4。5.1布局形态的重构

为直观对比，图5并排展示了未经优化的基准布局与H-MOWOA-ABC优化得到的方案C布局。基准布局采用标准的360°全场径向交错模式，定日镜均匀地环绕在吸热塔周围。而优化后的方案C在宏观形态上被根本性地重构：（1）算法智能地摒弃了光学性能低下的南侧区域，将几乎所有定日镜集中在光学性能更优的北侧扇形区域内，从源头上避免了巨大的余弦损失；（2）布局不再是均匀的，而是呈现出由优化参数 (A_z,1=1.92,A_lim=1.48) 驱动生成的、高度有序且**“疏密有致”**的非均匀结构。这种为实现全局性能最优而自发形成的非均匀密度分布，是智能优化算法价值的核心体现。


(b)
R.b = b
printtable(R.b)
print('----------------')

c = R.evaluate('gender <- c(rep("male",2), rep("female", 3)); gender <- factor(gender)')
print(c._class)
printtable(c)
R.c = c
printtable(R.c)
print('----------------')

-- ask Rserve for 10 random numbers
printtable(R.evaluate("rnorm(10)"))

-- ask Rserve for a vector
printtable(R.evaluate('a <- c(1, 2, 5.3, 6, -2, 4)'))
printtable(R.evaluate('b <- c("one","two","three")'))
printtable(R.evaluate('c <- c(TRUE,TRUE,TRUE,FALSE,TRUE,FALSE)'))

-- ask Rserve for a matrix
printtable(R.evaluate('y <- matrix(1:20, nrow=5, ncol=4)'))
printtable(R.evaluate('y <- matrix(1:20, nrow=5, ncol=4, byrow=TRUE)'))

-- ask Rserve for a data.frame
printtable(R.evaluate('d <- c(1,2,3,4); e <- c("red", "white", "red", NA); f <- c(TRUE,TRUE,TRUE,FALSE); mydata <- data.frame(d,e,f)'))
printtable(R.evaluate('d <- c(1,2,3,4); e <- c("red", "white", "red", NA); f <- c(TRUE,TRUE,TRUE,FALSE); mydata <- data.frame(d,e,f); names(mydata) <- c("ID","Color","Passed"); mydata'))

-- ask Rserve for a factor
c = R.evaluate('gender <- c(rep("male",2), rep("female", 3)); gender <- factor(gender)')
print(c._class)
printtable(c)
printtable(R.evaluate('v <- c(1,3,5,8,2,1,3,5,3,5); x <- factor(v)'))

-- ask Rserve for a data.frame
a = (R.evaluate('n <- c(2, 3, 5); s <- c("aa", "bb", "cc"); b <- c(TRUE, FALSE, TRUE); df <- data.frame(n, s, b)'))
printtable(a)

-- ask Rserve for a linear regression
printtable(R('library(MASS); data(cats); lm(Hwt ~ Bwt, data=cats[1:5,])'))


-- table-filter.lua
-- Pandoc filter to generate tables with black outer border and gray inner lines

function Table(elem)
    -- Only process if we're generating LaTeX
    if FORMAT ~= "latex" then
        return elem
    end

    -- Get table dimensions
    local num_cols = #elem.colspecs

    -- Build LaTeX table manually with custom column separators
    local latex_lines = {}

    -- Define custom column types with gray vertical rules
    table.insert(latex_lines, "\\newcolumntype{G}{!{\\color{gray!40}\\vrule}}")
    table.insert(latex_lines, "\\newcolumntype{B}{!{\\color{black}\\vrule}}")

    -- Create column specification: black outer borders, gray inner separators
    -- Use >{\\raggedright\\arraybackslash} for left-aligned, top-aligned text
    local colspec = "B"
    for i = 1, num_cols do
        colspec = colspec .. ">{\\raggedright\\arraybackslash}p{" .. string.format("%.2f", 0.9 / num_cols) .. "\\textwidth}"
        if i < num_cols then
            colspec = colspec .. "G"  -- Gray separator between columns
        end
    end
    colspec = colspec .. "B"  -- Black right border

    -- Start table with black outer border and improved styling
    table.insert(latex_lines, "\\sloppy")  -- Encourage line breaks without overfull hboxes
    table.insert(latex_lines, "\\arrayrulecolor{black}")
    table.insert(latex_lines, "\\begin{longtable}{" .. colspec .. "}")
    table.insert(latex_lines, "\\tablefontsize")  -- Shrink font if necessary
    table.insert(latex_lines, "\\hline")

    -- Process header if exists
    if elem.head and elem.head.rows and #elem.head.rows > 0 then
        for _, row in ipairs(elem.head.rows) do
            local row_content = {}
            for _, cell in ipairs(row.cells) do
                -- Convert cell contents to LaTeX, preserving formatting
                local cell_latex = pandoc.write(pandoc.Pandoc(cell.contents), 'latex')
                -- Clean up the LaTeX output (remove extra newlines and paragraph tags)
                cell_latex = cell_latex:gsub("\\par\n", "")
                cell_latex = cell_latex:gsub("\n", " ")
                cell_latex = cell_latex:gsub("^%s+", "")
                cell_latex = cell_latex:gsub("%s+$", "")


ron-LM 等分布式训练框架，熟悉 3D 并行、ZeRO 优化、混合精度训练等技术。

2) 推理优化：掌握 TensorRT、ONNX Runtime、vLLM 等推理引擎，熟悉 PD 分离架构、KV Cache 管理、投机采样等技术。

3) 硬件适配：熟悉 GPU 架构，精通 CUDA/CUDNN 编程，有算子优化经验者优先。

4) 系统设计：具备分布式系统开发经验，熟悉 Kubernetes、Docker 等容器化技术，有 GPU 集群管理经验者加分。

2. 项目经验

1) 至少主导过 1 个千亿参数模型的训练加速项目，或实现推理延迟降低 50% 以上的工程案例。

3. 其他

1) 具备系统思维与工程化落地能力，能从全局视角设计技术方案，平衡性能、成本与可维护性。

2) 较强的学习能力与问题解决能力，能够快速掌握前沿技术。

3) 优秀的沟通协作能力，能与算法、产品、运维团队高效配合，推动技术方案落地。

4) 计算机、电子工程等相关专业优先。

5) 5 年以上大模型基础设施研发经验，有训练加速或推理优化项目落地经验者优先。

4. 加分项

1) 在相关会议（NeurIPS、ICML、SC）发表过分布式训练或推理优化相关论文。

2) 参与过开源项目（如 Hugging Face、PyTorch 生态）贡献，或主导过企业级 AI Infra 平台开发。
</details>

---

#### [诚云科技-高级IDC运维工程师-IDC事业部（设施）](https://careers.aliyun.com/off-campus/position-detail?positionId=2000046104&track_id=SSP1752746408225lgLVGrQaZM3442)

📍 乌兰察布/嘉兴/中卫/南京 | ⌛ 3年

<details>
<summary>职位描述</summary>

1. 建立并完善风险管理机制，负责重大事件的上报和跟踪处