text string | label_name string | labels int64 |
|---|---|---|
ILITY_BONUS, IDX_ROOK_MOBILITY, true);
Parameters::init_constants(&mut params, &QUEEN_MOBILITY_BONUS, IDX_QUEEN_MOBILITY, true);
Parameters::init_constants(&mut params, &ATTACK_WEIGHT, IDX_ATTACK_WEIGHT, false);
Parameters::init_constants(&mut params, &SAFETY_TABLE, IDX_SAFETY_TABLE, false);
... | Rust | 0 |
= led.as_mut().unwrap();
if check_interrupt(button) {
if button.is_low() {
led.set_high();
} else {
led.set_low();
}
}
clear_interrupt(button);
});
}
//
//
//
//
//
//
// "Hidden" HAL-like methods for doing interrupts with e... | Rust | 0 |
load(args.model_path, map_location=device)
print("args training: ", checkpoint['args'])
to_delete = []
for k in checkpoint['model'].keys():
if 'gc3' in k:
to_delete.append(k)
for k in to_delete: checkpoint['model'].pop(k)
#TODO: 加载AutoEncoder,使用自编码器获取句子向量
model = Summari... | Python | 1 |
pt in compliance with the License.
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either exp... | Rust | 0 |
| 1.9 |
## 🚀 Getting Started
1. Download the "Global Data on Sustainable Energy (2000-2020)" dataset from Kaggle
2. Upload it using the file uploader above
3. Explore the various analysis pages using the sidebar navigation
4. Use filters to focus o... | Python | 1 |
tdio_writer);
let duration = start.elapsed();
info!("Ending data processing. Time elapsed was: {:?}", duration);
}
<filename>src/operand.rs
use crate::types::{TypeRef, Typed, Types};
use crate::{ConstantRef, Name};
use std::fmt::{self, Display};
#[derive(PartialEq, Clone, Debug)]
pub enum Operand {
/// e.... | Rust | 0 |
_shard_ids))
}
Err(e) => {
error!("Hit error trying to create KinesisClient for Timestamper. Timestamps will not update for source based on Kinesis stream {}. {:#?}", kinc.stream_name, e);
(None, None)
}
};
Some(RtKinesisConnector {
... | Rust | 0 |
nated and its type
#[derive(Copy, Clone, Eq, PartialEq, Debug, Fail)]
pub enum SmolErrorKind {
#[fail(display = "Couldn't deserialize a data structure.")] Deserialize,
#[fail(display = "Can't use an empty model.")] EmptyModel,
#[fail(display = "Couldn't serialize a data structure.")] Serialize,
#[fail(d... | Rust | 0 |
count += 1;
}
count
}
pub fn part_2(v: &mut Vec<i32>) -> u32 {
let mut count = 0;
let mut index: usize = 0;
while index < v.len() {
let bounce = v[index];
if bounce >= 3 {
v[index] = bounce - 1;
} else {
... | Rust | 0 |
icetree/bindings/riscv/sifive-l2-cache.txt#L41
// in general all of them are the same.
/// Cache and allocation multiple alignment size
#[cfg(target_arch = "riscv")]
pub const ALIGNMENT: usize = 1 << 6;
// This size is same across all hardware for this architecture.
// - https://docs.huihoo.com/doxygen/linux/kernel/3.... | Rust | 0 |
return expanded
def get_mini_boxes(self, contour):
bounding_box = cv2.minAreaRect(contour)
points = sorted(list(cv2.boxPoints(bounding_box)), key=lambda x: x[0])
index_1, index_2, index_3, index_4 = 0, 1, 2, 3
if points[1][1] > points[0][1]:
index_1 = 0
... | Python | 1 |
er123", USR_AUDIENCE);
let db = TestDb::new().await;
let room = {
let mut conn = db.get_conn().await;
shared_helpers::insert_room(&mut conn).await
};
let mut authz = TestAuthz::new();
let room_id = room.id().to_string();
authz.allow(agent.account... | Rust | 0 |
on_state.stop_clicked:
st.write('Stop button clicked! Press "Start" to run a new test.')
event.clear() # Unset the event
# Prompt the user to enter a new file name and the number of current test
initials = st.text_input('Enter new file name:', value="Initials ").strip()
test = s... | Python | 1 |
"helper": {8},
}
def GetWord(self, word):
if word in self.index:
return self.index[word]
else:
return set()
def GetWordWildcard(self, word):
result = set()
for item in list(self.index.keys()):
if word == item[0 : len(word)]:
... | Python | 1 |
::AbstractSig, Vec<internal::Kind>), Error> {
Ok(rrd2014::elaborate(m)
.with_context(|e| format!("{}:\n{}", "type error".bright_red().bold(), e))?)
}
<filename>vcx/libvcx/build_scripts/android/debug-device/debugvcx/build.rs
use std::env;
fn main() {
let target = env::var("TARGET").unwrap();
println... | Rust | 0 |
),
}
}
fn parse_integer(pair: Pair<Rule>) -> ParseResult<Self> {
matches!(pair.as_rule(), Rule::integer);
let mut inner = pair.into_inner();
let first = inner.next().unwrap();
let integer = match inner.next() {
Some(rule) => {
let unsigned = ... | Rust | 0 |
"""
Momentum Analysis Module
RSI, Stochastic, MACD 등 모멘텀 지표들의 복합 분석 로직을 제공합니다.
기존 CompositeDetector에서 분리된 모멘텀 분석 함수들을 포함합니다.
"""
from enum import Enum
from typing import Tuple
import pandas as pd
from infrastructure.logging import get_logger
logger = get_logger(__name__)
class MomentumConsensus(Enum):
"""모멘텀... | Python | 1 |
import numpy
import onnxruntime as rt
from onnxruntime.datasets import get_example
def test():
print("running simple inference test...")
example1 = get_example("sigmoid.onnx")
sess = rt.InferenceSession(example1, providers=rt.get_available_providers())
input_name = sess.get_inputs()[0].name
print(... | Python | 1 |
amount of asset_out.
pub amount_out: Balance,
}
/// Configure the pallet by specifying the parameters and types on which it depends.
#[pallet::config]
pub trait Config: frame_system::Config {
/// Because this pallet emits events, it depends on the runtime's definition of an event.
... | Rust | 0 |
BarometricPressureGauge::from(&PRESSURE_VEC);
static ref DUST_CONC_VEC: GaugeVec = register_gauge_vec!(
"dust_concentration",
"Dust concentration particles per 0.01cf",
&["location"]
)
.unwrap();
pub static ref DUST_CONC: DustConcentrationGauge =
DustConcentrati... | Rust | 0 |
et_visible_func<'a, P: Into<Option</*Unimplemented*/Fundamental: Pointer>>, Q: Into<Option<&'a /*Ignored*/glib::DestroyNotify>>>(&self, func: /*Unknown conversion*//*Unimplemented*/TreeModelFilterVisibleFunc, data: P, destroy: Q) {
// unsafe { TODO: call ffi::gtk_tree_model_filter_set_visible_func() }
//}
... | Rust | 0 |
t!(BsonFormattable::from_bson_t::<json::Json>(&Binary(0u8, ~[0u8])).is_err());
assert!(BsonFormattable::from_bson_t::<json::Json>(&ObjectId(~[0u8])).is_err());
assert!(BsonFormattable::from_bson_t::<json::Json>(&Bool(true)).is_ok());
assert!(BsonFormattable::from_bson_t::<json::Json>(&UTCDate(15... | Rust | 0 |
import nmap
scanner = nmap.PortScanner()
print("Nmap version:", scanner.nmap_version())
print("Enter the target IP address or hostname:")
target = input().strip()
print("Target:", target)
type(target)
option = input("""\nOptions:
\n1. Syn Ack scan
\n2. UDP scan
... | Python | 1 |
,
dpi=300,
foreground_colour=config.marshoai_main_colour,
)
)
if latex_generate_ok:
result_msg.append(
ImageMsg(
raw=latex_generate_result, # type... | Python | 1 |
#!/usr/bin/env python3
import socket
import os
import time
import sys
from subprocess import Popen,PIPE,STDOUT,call
if sys.version_info < (3, 0):
input = raw_input
# Just some colors and shit
white = '\033[1;97m'
green = '\033[1;32m'
red = '\033[1;31m'
yellow = '\033[1;33m'
end = '\033[1;m'
info = '\033[1;33m[!]... | Python | 1 |
wait mdb.get_top_messages(limit)
seen_messages = set()
truncated_messages = []
for msg in top_messages:
if msg.lower() not in seen_messages and is_alphanumeric(msg):
seen_messages.add(msg.lower())
if len(msg) > 35:
truncated_messages.append(msg[... | Python | 1 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayOpenMiniAliminiabilityprodJsapiQueryModel(object):
def __init__(self):
self._bundle_id = None
self._en_name = None
self._instance_version = None
@property
d... | Python | 1 |
15
);
}
#[test]
#[serial]
fn checked_write_unchecked_overwrite_checked_read() {
midpoint::checked_write_unchecked_overwrite_checked_read::<I16>(
DATABASE_LOCATION,
42,
15
);
}
#[test]
#[serial]
fn checked_write_unchecked_overwrite_unchecked_read() {
midpoint::checked_w... | Rust | 0 |
"metrics": [
[
experiment_id,
"reported_rewards_score",
{"label": "Rewards" }
]
],
"view": "timeSeries",
... | Python | 1 |
::*`.
pub mod prelude {
pub use crate::algorithm::area::Area;
pub use crate::algorithm::bearing::Bearing;
pub use crate::algorithm::bounding_rect::BoundingRect;
pub use crate::algorithm::centroid::Centroid;
pub use crate::algorithm::chaikin_smoothing::ChaikinSmoothing;
pub use crate::algorithm::... | Rust | 0 |
::fs::File;
use std::net::{IpAddr, SocketAddr};
use std::path::Path;
use std::str::FromStr;
use hyper::Server;
use crate::argument::Argument;
use crate::config::Config;
use crate::http::handle::HandlerBuilder;
use crate::store::cos::CosBackend;
mod argument;
mod config;
mod db;
mod http;
mod id;
mod log;
mod store;
... | Rust | 0 |
import os
import argparse
from pathlib import Path
from huggingface_hub import snapshot_download
# --- Configuration ---
# Add your new model to the registry.
# The keys are the short, user-friendly names for the command line.
MODEL_REGISTRY = {
"qwen2.5-vl-7b-instruct": "Qwen/Qwen2.5-VL-7B-Instruct",
"qwen3-8... | Python | 1 |
1a\x04\x05Pv\xf0[#\
\x0c\x01l\x16a\xd0\x0eG^j\xa4\x1b\xe4\x93\x7f\xfa\
\xa0T\x13%\xc1\x06EE\xc0'\x0a\xc64]\xbc\xf0\
\xc7\xdcV\x9a\xacE\xc4\x92\x92m\x9b\xcb\x229\xd0\x10\
\x5c1uy\xb7\xaf\x18}\x8d\x1a\xae\xd6VE9\xed\
Z^\xeb\xe4od\x9f\x7f\xd5\xf6B\xab\x8f$\xc9\x08\
\x91c\x1b\x129!E\x0c\xcaIfuR\x0b|\xd9\
*\xa5\x80\xc9\x19\... | Python | 1 |
from langchain_google_genai import ChatGoogleGenerativeAI
from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain
import os
import getpass
from router_agent import router_agent_run
from math_agent import math_agent_run
from english_agent import english_agent_run
from factual_agent import fact... | Python | 1 |
#
# (C) Copyright 2014 Enthought, Inc., Austin, TX
# All right reserved.
#
# This file is open source software distributed according to the terms in
# LICENSE.txt
#
import warnings
from win32ctypes.pywin32.win32api import * # noqa
warnings.warn(
"Please use 'from win32ctypes.pywin32 import win32api'",
Depreca... | Python | 1 |
-> Box<Self> {
Box::new(Self { left, left_field, right, right_field, outer })
}
}
impl<T: Transaction> Executor<T> for HashJoin<T> {
fn execute(self: Box<Self>, txn: &mut T) -> Result<ResultSet> {
if let ResultSet::Query { mut columns, rows } = self.left.execute(txn)? {
if let Resu... | Rust | 0 |
nRefPos for v in varsThisWindow]) + 1 # To account for VCF 1-indexing vs Variant 0-indexing
if nextVarPos - lastVarPos > 1:
for refBlockStart in xrange(lastVarPos+1, nextVarPos, options.refCallBlockSize):
refBlockEnd = min(refBlockStart + options... | Python | 1 |
A::NULL),
1 => Val(FC0_SRC_A::PLL_SYS_CLKSRC_PRIMARY),
2 => Val(FC0_SRC_A::PLL_USB_CLKSRC_PRIMARY),
3 => Val(FC0_SRC_A::ROSC_CLKSRC),
4 => Val(FC0_SRC_A::ROSC_CLKSRC_PH),
5 => Val(FC0_SRC_A::XOSC_CLKSRC),
6 => Val(FC0_SRC_A::CLKSRC_GPIN0),
... | Rust | 0 |
from datasets import load_dataset, DownloadConfig
from huggingface_hub import hf_hub_download, snapshot_download
import os
import argparse
from argparse import Namespace
import yaml
base_path = "hrishivish23/MPM-Verse-MaterialSim-Small"
materials = {"Water2D":"WaterDrop2DSmall", "Water3D":"Water3DNCLAWSmall",
... | Python | 1 |
the file.
thumb_width (:obj:`int`): Optional. Thumbnail width.
thumb_height (:obj:`int`): Optional. Thumbnail height.
"""
__slots__ = (
'reply_markup',
'caption_entities',
'document_url',
'thumb_width',
'thumb_height',
'caption',
'title'... | Python | 1 |
from sqlalchemy import Boolean, ForeignKey, Integer
from wtforms.widgets import TextArea
from eNMS.database import db
from eNMS.fields import BooleanField, HiddenField, SelectField, StringField
from eNMS.forms import ConnectionForm
from eNMS.models.automation import ConnectionService
class ScrapliNetconfService(Conn... | Python | 1 |
}
}
#[cfg(feature = "nec")]
impl From<Nec16Command> for CmdEnum {
fn from(cmd: Nec16Command) -> CmdEnum {
CmdEnum::Nec16(cmd)
}
}
#[cfg(feature = "nec")]
impl From<NecSamsungCommand> for CmdEnum {
fn from(cmd: NecSamsungCommand) -> CmdEnum {
CmdEnum::NecSamsung(cmd)
}
}
#[cfg(feature = "... | Rust | 0 |
.to_string(),
None => "No work".to_string(),
};
let signature_render = match &self.signature {
Some(signature) => signature.to_string(),
None => "No signature".to_string(),
};
write!(
f,
"Block(Account: {}, Previous: {:?}, Balan... | Rust | 0 |
#!/usr/bin/env python3
# Copyright Catch2 Authors
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or copy at
# https://www.boost.org/LICENSE_1_0.txt)
# SPDX-License-Identifier: BSL-1.0
import os
import re
import sys
import subprocess
"""
Test t... | Python | 1 |
self.radius * 2)
}
}
impl<C> WithStyle<C> for Circle<C>
where
C: PixelColor,
{
fn style(mut self, style: Style<C>) -> Self {
self.style = style;
self
}
fn stroke_color(mut self, color: Option<C>) -> Self {
self.style.stroke_color = color;
self
}
fn strok... | Rust | 0 |
umn("Result", style="yellow")
recent_table.add_column("Profit/Loss", style="green")
for trade in self.executed_trades[-5:]: # Last 5 trades
if trade["success"]:
route = f"{trade['buy_dex']} → {trade['sell_dex']}"
result = "✅ S... | Python | 1 |
mut CGpuHog,
mat: *mut CGpuMat,
found: *mut CVec<Rect>,
conf: *mut CVec<c_double>,
);
fn cv_cuda_hog_set_gamma_correction(hog: *mut CGpuHog, gamma: bool);
fn cv_cuda_hog_set_group_threshold(hog: *mut CGpuHog, group_threshold: c_int);
fn cv_cuda_hog_set_hit_threshold(hog: *mut CG... | Rust | 0 |
';\
\n output: \"[\'\\#{\'\\1\\2\\3\\4\\5\\6\\7\\8\\9\'}\']\";\
\n}\
\n"
)
.unwrap(),
".result {\
\n output: \"[\\#{\'\\1\\2\\3\\4\\5\\6\\7\\8\\9\'}]\";\
\n output: \"\\#{\'\\1\\2\\3\\4\\5\\6\\7\\8\\9\'}\";\
\n output: \"#{\" \\1 \\... | Rust | 0 |
eq!(u1, 1);
assert_eq!(u2, 2);
assert_eq!(u3, 3);
assert_eq!(u4, 4);
assert_eq!(u5, 5);
Ok(())
})
.unwrap();
});
}
#[test]
fn create_and_cast_floats() {
JULIA.with(|j| {
let mut jlrs = j.borrow_mut();
jlrs.scope_with_... | Rust | 0 |
._norm_action_space.contains(action) # make sure dtypes match
action = self._convert_action(action)
assert self._true_action_space.contains(action)
reward = 0
extra = {'internal_state': self._env.physics.get_state().copy()}
for _ in range(self._frame_skip):
time_ste... | Python | 1 |
# 2-) Class Variables (Sınıf Değişkenleri)
class Personel:
personel_sayisi = 0
zam_orani = 1.05
def __init__(self, isim, soyisim, maas):
self.isim = isim
self.soyisim = soyisim
self.maas = maas
self.eposta = f'{isim}_{soyisim}@firma.com'
Personel.personel_sayisi +... | Python | 1 |
lf) -> St {
self.stream
}
}
impl<B, St, S, Fut, F> Stream for Scan<St, S, Fut, F>
where
St: Stream,
F: FnMut(&mut S, St::Item) -> Fut,
Fut: Future<Output = Option<B>>,
{
type Item = B;
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<B>> {
if self.is_... | Rust | 0 |
# -*- coding: utf-8 -*-
{
'name': "hotel",
'summary': "Hotel System",
'description': "Hotel System",
'category': 'Uncategorized',
'version': '1.0',
'depends': ['base'],
'data': [
'security/ir.model.access.csv',
'views/charges.xml',
'views/guestregistration.xml',
... | Python | 1 |
import matplotlib.pyplot as plt
import numpy as np
import math
from matplotlib.animation import FuncAnimation
e = math.e
g = lambda x : e**(-x)
def findUxt(hx,ht,Tmax):
a = 0
b = 1
N = int((b-a)/hx)
ArrX = np.linspace(a,b,N+1)
t = a
u = [[g(x)] for x in ArrX]
ti = 0
te = Tmax
... | Python | 1 |
generate_ir(module, body_expr, &mut fn_variable_scope)
// },
// &Expr::WhileLoop(ref condition, ref body) => {
// let one = self.context.bool_type().const_int(1, false);
// let start_block = self.builder.get_insert_block();
// let cond_check_block... | Rust | 0 |
(if pressed { "v" } else { "^" }),
format_gkey(*gkeys_by_scancode.get(&scancode).unwrap())
);
}
}
},
&exit,
)?;
Ok(())
})
}
f... | Rust | 0 |
1",
data={
"date": [["2024-01-01"], ["2025-01-01"]],
},
)
dates = record.chain("date", type=datetime.date.fromisoformat)
assert dates == [
datetime.date(2024, 1, 1),
datetime.date(2025, 1, 1),
]
def test_composite_record_chain_unique():
record = Composi... | Python | 1 |
scope_1503.string(var_1504);
}
#[allow(unused_mut)]
let mut scope_1505 = writer.prefix("Ipv4NetmaskLength");
if let Some(var_1506) = &input.ipv4_netmask_length {
scope_1505.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1506).i... | Rust | 0 |
Deserialize, Serialize, Clone, PartialEq, Eq)]
pub struct CommitDecision {
ledger_info: LedgerInfoWithSignatures,
}
// this is required by structured log
impl Debug for CommitDecision {
fn fmt(&self, f: &mut Formatter) -> std::fmt::Result {
write!(f, "{}", self)
}
}
impl Display for CommitDecision... | Rust | 0 |
Object {
let weaklistoffset = (*Py_TYPE(o)).tp_weaklistoffset as isize;
o.offset(weaklistoffset) as *mut *mut PyObject
}
<reponame>LemonHX/starcoin
// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use crate::account_config::constants::CORE_CODE_ADDRESS;
use crate::identifier::... | Rust | 0 |
by calling into epoll_wait().
continue;
}
return Err(EpollHelperError::Wait(e));
}
};
for event in events.iter().take(num_events) {
let ev_type = event.data as u16;
match ev_type {
... | Rust | 0 |
}
Payload::WitnessProgram {
version: witver,
program: ref witprog,
} => {
let hrp = match self.blinding_pubkey.is_some() {
true => self.params.blech_hrp,
false => self.params.bech_hrp,
};
... | Rust | 0 |
#!/usr/bin/env python3
import unittest
from gpytorch.kernels import ArcKernel, MaternKernel
from gpytorch.priors import NormalPrior
from gpytorch.test.base_kernel_test_case import BaseKernelTestCase
class TestArcKernel(unittest.TestCase, BaseKernelTestCase):
def create_kernel_no_ard(self, **kwargs):
ret... | Python | 1 |
);
vec![]
}
(Hoist::OnlyLetConst, _, ast::VarDeclKind::Var)
| (_, Level::Below, ast::VarDeclKind::Let)
| (_, Level::Below, ast::VarDeclKind::Const) => vec![],
}
}
fn pat_to_ident(pat: &ast::Pat) -> &JsWord {
match pat {
ast::Pat::Ident(ast::Ident {
... | Rust | 0 |
GeckoClient = CoinGeckoClient::default();
let res1 = aw!(client.coin_tickers::<&str>(
"bitcoin",
None,
true,
1,
TickersOrder::VolumeDesc,
true
));
assert!(res1.is_ok(), "tickers without filter should resolve");
le... | Rust | 0 |
s(sys.argv[1])
for filename in sorted(filenames)[:5]:
if filename.endswith("nml") and not filename.endswith("cell.nml"):
print("=============================\nCreating graph for %s" % filename)
dirname = os.path.dirname(filename)
tree = ET.parse(filename)
roo... | Python | 1 |
get_nymd_validator_url();
let mixnet_contract = config
.get_mixnet_contract_address()
.parse()
.expect("the mixnet contract address is invalid!");
let client_config = validator_client::Config::new(nymd_url, api_url, Some(mixnet_contract));
let inner =
... | Rust | 0 |
}
}
// Decimally shift left by `max_decimals - decimals`.
let scale_factor = max_decimals - decimals.unwrap_or(0);
for _ in 0..scale_factor {
value = match 10_u64.checked_mul(value) {
Some(v) => v,
None => return Err(ParseAmountError::TooBig),
};
}
... | Rust | 0 |
# Copyright 2017 Ericsson
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... | Python | 1 |
failure as that means there is probably a typo.
#[derive(Deserialize, Debug, PartialEq, Default)]
#[serde(rename_all = "PascalCase")]
#[serde(deny_unknown_fields)]
struct LoadConfig {
report_relative: Option<bool>,
}
/// Records load averages divided by the number of cpus
#[derive(Debug, PartialEq)]
struct Relati... | Rust | 0 |
::proc_refactoring::explo_proc::node::ExplorationNodeKind;
use crate::proc_refactoring::explo_proc::priorities::ExplorationPriorities;
use crate::proc_refactoring::explo_proc::step::ExplorationStepKind;
pub struct ExplorationConfig {}
impl AbstractConfiguration for ExplorationConfig {
type NodeKind = ExplorationN... | Rust | 0 |
FUCHSIAX: u32 = 4;
pub const IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIAX: u32 = 8;
pub const IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIAX: u32 = 16;
pub const EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA: u32 = 128;
pub const EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA: u32 = 2048;
pub co... | Rust | 0 |
"""
LangSmith Monitoring Integration for ChatBot A (쫑이/Jjongi)
Provides comprehensive monitoring and observability for AI model performance.
"""
from .langsmith_config import setup_langsmith_tracing, ChatBotATracer
__all__ = [
"setup_langsmith_tracing",
"ChatBotATracer"
] | Python | 1 |
# repo-main/config.py
import os
from dotenv import load_dotenv
# 確保 .env 檔案被載入 (在 create_app() 中也會呼叫一次,但這裡是為了 Config.validate() 能夠讀取)
load_dotenv()
class Config:
# LINE Bot API 憑證
LINE_CHANNEL_ACCESS_TOKEN = os.getenv("CHANNEL_ACCESS_TOKEN") # 替換為 CHANNEL_ACCESS_TOKEN
LINE_CHANNEL_SECRET = os.getenv("CHA... | Python | 1 |
ht),
dtype=np.float64)
desired_com_velocity = np.array(
(self.desired_speed[0], self.desired_speed[1], 0.), dtype=np.float64)
desired_com_roll_pitch_yaw = np.array((0., 0., 0.), dtype=np.float64)
desired_com_angular_velocity = np.array(
(0., 0., self.desir... | Python | 1 |
ng.gen_range(0, syls.len());
([*syls.bsearch(last_i).unwrap(), 0, 0], 1)
}
}
};
match syl_trie.lookup(last.slice_to(lastn)) {
Some(set_ref) => {
let len = set_ref.len();
let i = rng.gen_range(0, len);
... | Rust | 0 |
import numpy as np
from optics_raytracer.optics.colored_object import ColoredObject
from optics_raytracer.core.primitives import vector_dtype
circle_dtype = np.dtype(
[
("center", *vector_dtype), # Center point of the circle
("normal", *vector_dtype), # Normal vector of the circle's plane
... | Python | 1 |
3579731703863970
6744666668448173363193906175513548450251163502950418400936278360673701003848618208887523585202760410
0045660805633937757348591744510475798780010165968818315032044230809183597418280918429947256826068277
4683272697993855730500061223160274918361373258473553412704497335663924406111413972911417644029226449
... | Rust | 0 |
eps = timesteps * (offsets + timestep)
# Prepend the offset to the timesteps array
timesteps = np.hstack((offsets, timesteps))
logger.info('Predicting Orbits...')
physics_preds = physics_model.predict(timesteps)
logger.info('Estimating physics errors...')
Xs = np.concatenate((timesteps[:, :, n... | Python | 1 |
::graphene_point_init_from_vec2(p.to_glib_none_mut().0, src.to_glib_none().0);
p
}
}
}
<gh_stars>0
// struct ErrorResponse {
// // Message type ('E')
// int8 mtype = 0x45;
// // Length of message contents in bytes,
// // including self.
// int32 ... | Rust | 0 |
import numpy as np
import os.path as osp
import sys
import torch
import unittest
from pd_mesh_net.data import DualPrimalDataLoader
from pd_mesh_net.datasets import CosegDualPrimal
current_dir = osp.dirname(__file__)
class TestCosegDualPrimal(unittest.TestCase):
def test_batch_formation(self):
dataset = ... | Python | 1 |
i_Mov_R_M(1, rbp, ip_Addr_IR(99, r14)),
"41886E63",
"movb %bpl, 99(%r14)",
));
insns.push((
i_Mov_R_M(1, r8, ip_Addr_IR(99, rdi)),
"44884763",
"movb %r8b, 99(%rdi)",
));
insns.push((
i_Mov_R_M(1, r9, ip_Addr_IR(99, r8)),
"45884863",
... | Rust | 0 |
pub metadata: crate::params::Metadata,
}
<gh_stars>0
mod client;
mod lb;
mod worker;
use rszmp::{Context, Version};
use std::env;
fn main() {
let mut args = env::args();
// Skip execution file.
args.next();
let version = Version::new();
println!(
"Version: {}.{}.{}",
version.m... | Rust | 0 |
e)
# beh w2v特征
# feature_beh_tfidf = pd.read_csv(FEATURE_BEH_W2V)
# data = pd.merge(data, feature_beh_tfidf, how='left', on='id')
# data.fillna(0, inplace=True)
# 删除某一类别占比超过99%的列
# good_cols = list(data.columns)
# for col in data.columns:
# rate = data[col].value_counts(normalize=T... | Python | 1 |
"""Added service table [0701da9951a0].
Revision ID: 0701da9951a0
Revises: 0.56.1
Create Date: 2024-03-25 12:24:32.928543
"""
import sqlalchemy as sa
import sqlmodel
from alembic import op
from sqlalchemy.engine.reflection import Inspector
# revision identifiers, used by Alembic.
revision = "0701da9951a0"
down_revis... | Python | 1 |
// In Candidate or Leader, it's voted for itself.
assert!(
r.vote == INVALID_ID || r.vote == 1,
"{:?},{:?}, vote {}, want {:?} or 1",
vt,
state,
r.vote,
INVALID_ID
);
}
}
}
#[test]
fn ... | Rust | 0 |
tation
),
};
position = (position.0 + direction.0, position.1 + direction.1);
}
map
}
#[aoc(day11, part1)]
pub fn problem1(instructions: &Vec<i64>) -> usize {
let instructions = instructions.clone();
let (robo_send, robo_recv) = channel();
let (isa_send, isa_recv) = cha... | Rust | 0 |
ck
.pop()
.and_then(|index| self.children.get_mut(index))
.ok_or(PWDuckGuiError::Option)?
.update(GroupTreeMessage::ToggleExpansion(stack), vault)
}
}
GroupTreeMessage::GroupSelected(_... | Rust | 0 |
ht(rotation)
}
#[inline]
pub fn ldrb(address: u32, bus: &impl Bus) -> u32 {
bus.load8(address as usize) as u32
}
#[inline]
pub fn ldrh(address: u32, bus: &impl Bus) -> u32 {
let rotation = (address & 1) * 8;
let value = bus.load16(address as usize) as u32;
val... | Rust | 0 |
: u32, edge: GpioEdgeDetect, closure: F ) -> i32
where F: FnMut(u32, u32),
F: 'static
{
let box_closure: Box<Box<FnMut(u32, u32) >> = Box::new(Box::new(closure));
unsafe {
callback_ex(self.daemon_id, gpio, edge as u32, cb_fn_trampoline as CBFuncEx, Box::into_raw(box_closure) as *mut _ )
... | Rust | 0 |
.connect_to('192.168.1.1', 2001)
TCPSocket.send_buf(b'\xff\x06\x00\x00\xff')
Movement().update_servo()
Movement.set_speed(40)
TCPSocket.update()
start_path_moving(3)
stream_url = 'http://192.168.2.42:8080/?action=snapshot'
print("Init camera")
cam = Camera.init_cam(stream_url)
fo... | Python | 1 |
j.deref().clone()
}
pub(crate) fn start_heart_beat_timer(metadata_storage_mode: MetadataStorageMode) {
let metadata_storage = MetadataStorageWrap::new(&metadata_storage_mode);
loop {
std::thread::sleep(Duration::from_secs(5));
let job_descriptor = loop_read_job_descriptor(&metadata_storage);
... | Rust | 0 |
import requests
from bs4 import BeautifulSoup
from colorama import Fore, Style
def search_exploits(query):
try:
url = f"https://www.exploit-db.com/search?q={query}"
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.44... | Python | 1 |
#!/usr/bin/env python
import json
import logging
import os
from random import randint
import uvicorn
from crewai.flow import Flow, listen, persist, start
from kagent.crewai import KAgentApp
from pydantic import BaseModel
from poem_flow.crews.poem_crew.poem_crew import PoemCrew
os.makedirs("output", exist_ok=True)
l... | Python | 1 |
',
'exec': 'codeml',
'allow_mark': False ,
'changes': [('model' , 1),
('RateAncestor', 1),
('NSsites' , 0)]},
'b_free': {'typ': 'branch' , 'evol': 'positive-selection',
'exec': 'co... | Python | 1 |
, Debug)]
struct Pair {
token0: Token,
token1: Token,
}
#[derive(Serialize, Deserialize, Debug)]
struct Swap {
pair: Pair,
}
#[derive(Serialize, Deserialize, Debug)]
struct Swaps {
swaps: Vec<Swap>,
}
#[derive(Serialize, Deserialize, Debug)]
struct TheGraphResponse {
transactions: Vec<Swaps>,
}
... | Rust | 0 |
#self.server.checkin(self.ticket, search_key, ref_xml)
# NOT IMPLEMENTED
def _test_multicall(self):
'''NOTE: Not support by cherrypy yet!!'''
# start a multicall transaction
search_type = "prod/shot"
multicall = xmlrpclib.MultiCall(self.server)
for i in range(0, 3):... | Python | 1 |
"""fix_landing_page_module_types
Revision ID: 2a7357d60fa5
Revises: 4a5c5c46d729
Create Date: 2018-05-14 15:30:47.643214
"""
# revision identifiers, used by Alembic.
revision = '2a7357d60fa5'
down_revision = '4a5c5c46d729'
from alembic import context, op
import sqlalchemy as sa
import transaction
from assembl.lib ... | Python | 1 |
# Code generated by Lark OpenAPI.
import lark_oapi as lark
from lark_oapi.api.admin.v1 import *
def main():
# 创建client
client = lark.Client.builder() \
.app_id(lark.APP_ID) \
.app_secret(lark.APP_SECRET) \
.log_level(lark.LogLevel.DEBUG) \
.build()
# 构造请求对象
request: R... | Python | 1 |
)
}
/// A simple "score" method which scores positive for preferring C-order, negative for F-order
/// Subject to change when we can describe other layouts
#[inline]
pub(crate) fn tendency(self) -> i32 {
(self.is(Layout::CORDER) as i32 - self.is(Layout::FORDER) as i32) +
(self.is(La... | Rust | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.