text string | label_name string | labels int64 |
|---|---|---|
don::HALF_N_FULL_ROUNDS {
<F as Poseidon>::constant_layer_field(&mut state, round_ctr);
if r != 0 {
for i in 0..SPONGE_WIDTH {
let sbox_in = vars.local_wires[Self::wire_full_sbox_0(r, i)];
constraints.push(state[i] - sbox_in);
... | Rust | 0 |
# There are 3 loop control statements. Break, continue and pass
# BREAK
# Can only be used in FOR and WHILE loop
# It is used to exit from a loop. Any statement within that condition (if) after the break statement
# will not be executed
# Any statement outside the block of code will be executed with an exception to el... | Python | 1 |
def hex2int(hexadecimal):
hexadecimal = hexadecimal.upper()
hex_dict = {'0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'A': 10, 'B': 11, 'C': 12, 'D': 13, 'E': 14, 'F': 15}
decimal = 0
for digit in hexadecimal:
decimal = decimal * 16 + hex_dict[digit]
... | Python | 1 |
assert!(Srgb::from_str("hsl(0de 0% 0% / 0)").is_err());
assert!(Srgb::from_str("hsl(0degg 0% 0% / 0)").is_err());
assert!(Srgb::from_str("hsl(0 deg 0% 0% / 0)").is_err());
assert!(Srgb::from_str("hsl(0grad 0% 0% / 0)").is_ok());
assert!(Srgb::from_str("hsl(0GRAD 0% 0% / 0)").is_ok());
assert!(Sr... | Rust | 0 |
fn hserdyie(&self) -> HSERDYIER {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 3;
((self.bits >> OFFSET) & MASK as u32) != 0
};
HSERDYIER { bits }
}
#[doc = "Bit 2 - HSI16 ready interrupt flag"]
#[inline]
pub fn hsi16rdyie(&self) ->... | Rust | 0 |
c def step_impl(
context: Any,
url: str,
allowed_requests: int,
time_window: int,
spillover_count: Optional[
int
] = None, # TODO: Add spillover_enabled to the function signature
):
spillover = None
monthly_renewal = None
if spillover_count is not None:
spillover = S... | Python | 1 |
"3"),
("(gint) NM_DEVICE_ERROR_INVALID_ARGUMENT", "10"),
("(gint) NM_DEVICE_ERROR_INVALID_CONNECTION", "2"),
("(gint) NM_DEVICE_ERROR_MISSING_DEPENDENCIES", "9"),
("(gint) NM_DEVICE_ERROR_NOT_ACTIVE", "4"),
("(gint) NM_DEVICE_ERROR_NOT_ALLOWED", "6"),
("(gint) NM_DEVICE_ERROR_NOT_SOFTWARE", "5"... | Rust | 0 |
import json
from girder_client import GirderClient
import pytest
from dive_tasks import tasks
from .conftest import getClient, getTestFolder, match_user_server_data, users, wait_for_jobs
@pytest.mark.integration
@pytest.mark.run(order=3)
def test_reset_job_logs(admin_client: GirderClient):
# remove any failed ... | Python | 1 |
HEAD".to_string())
)
} else {
"OUTPUT".to_string()
}
}
fn commit(instance: &str) -> Result<()> {
get_instance_ns_name(instance)?;
info!("Un-mounting all the instances...");
// Un-mount all the instances
for_each_instance(&container_down)?;
info!("{}: committing instance...",... | Rust | 0 |
#!/usr/bin/env python3
"""
Test script untuk Binance Gemini Analyzer Advanced
"""
import asyncio
import sys
sys.path.append('.')
from binance_data import get_binance_data
from indicators import calculate_indicators
from trading_signals import signal_engine
import pandas as pd
async def test_analysis():
print('๐ T... | Python | 1 |
ageDoubleMap, StorageDoubleMap, StorageMap},
};
use sp_std::{prelude::*, result};
use opensquare_primitives::BountyId;
use crate::types::{Bounty, BountyOf, BountyState};
use crate::{
ApprovedHeight, AssignedHeight, BalanceOf, BountyStateOf, CurrencyIdOf, Error, HuntedForBounty,
HunterBounties, HuntingForBount... | Rust | 0 |
sionConfigRequest, 'createConfig_adminClusterName', 'createConfig.adminClusterName')
encoding.AddCustomJsonFieldMapping(
GkeonpremProjectsLocationsBareMetalClustersQueryVersionConfigRequest, 'upgradeConfig_clusterName', 'upgradeConfig.clusterName')
encoding.AddCustomJsonFieldMapping(
GkeonpremProjectsLocationsB... | Python | 1 |
rrupt_handler_xhci(
_stack_frame: ExceptionStackFrame,
) {
let main_queue = unsafe {
BUF_QUEUE.assume_init_mut()
};
main_queue
.push(Message { m_type: Some(MassageType::InterruptXhci) })
.unwrap();
unsafe {
notify_end_of_interrupt();
}
}
#[repr(align(16))]
pub st... | Rust | 0 |
crets that will cause some providers to be removed
# Tests both lowercase and uppercase variants to ensure comprehensive coverage
custom_secrets = {
'github_token': 'custom_github_token',
'GITLAB_TOKEN': 'custom_gitlab_token',
}
# This should work without raising RuntimeError: dictionar... | Python | 1 |
from typing import TYPE_CHECKING, Any
from langchain._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities.vertexai import (
create_retry_decorator,
get_client_info,
init_vertexai,
raise_vertex_import_error,
)
# Create a way to dynamically look up de... | Python | 1 |
&mut Self {
self.inner.limit = limit;
self
}
}
impl AsRef<GetGroupsInCommon> for GetGroupsInCommon {
fn as_ref(&self) -> &GetGroupsInCommon { self }
}
impl AsRef<GetGroupsInCommon> for RTDGetGroupsInCommonBuilder {
fn as_ref(&self) -> &GetGroupsInCommon { &self.inner }
}
/// Returns the total n... | Rust | 0 |
ate::Pins::gpio28].
FunctionPwm: Gp28Pwm6A,
/// PIO0 Function alias for pin [crate::Pins::gpio28].
FunctionPio0: Gp28Pio0,
/// PIO1 Function alias for pin [crate::Pins::gpio28].
FunctionPio1: Gp28Pio1
}
},
/// GPIO 29 supports following functi... | Rust | 0 |
g::debug_span!("debug-span", you_can_pass="any params");
/// 1 + 1;
/// // some other complex code
/// }
/// ```
#[cfg(any(feature = "std", feature = "with-tracing"))]
#[macro_export]
macro_rules! within_span {
(
$span:expr;
$( $code:tt )*
) => {
$span.in_scope(||
{
$( $code )*
}
)
};
(
... | Rust | 0 |
"SGPpM",
"WPTE",
"AGCpA.CL",
"DEZ",
"KRG",
"MGApB.CL",
"PLSB",
"WLK",
"ACC",
"AX",
"EUBK",
"EXR",
"SBM",
"STXS",
"CNS",
"BJRI",
"IIG",
"WFIIE",
"CHDw",
"GRINY",
"PYV",
"BHBC",
"HIV",
"ICOR",
"LCGI",
"NYN",
"SNBT",
"GOAMC",
"GOOG",
"IFULE",
"ITIGE",
"QD",
... | Rust | 0 |
import sys
def to_octets(ip):
return [int(i) for i in ip.split('.')]
def dotless_decimal(ip):
octets = to_octets(ip)
result = octets[0] * 16777216 + octets[1] * \
65536 + octets[2] * 256 + octets[3]
return result
def dotted_hex(ip):
octets = to_octets(ip)
hex_octets = [hex(i) for i... | Python | 1 |
x = 0
y = (1080 - h / rate) / 2
# h / rate ็ๅฎ่ง้ข็ๅฎฝ
else:
x = (1920 - w / rate) / 2
y = 0
margin_x = (1920 - w / rate) / 2
margin_y = (1080 - y - h/rate) + 24/(h/rate) * 1080
elif video_layout == 2: # ็ซๅฑ
rate1 = w / 1080
rate2 ... | Python | 1 |
continuous:
return HexmeshDGSerendipityBasisSpace(geo, degree=degree, family=family)
else:
return HexmeshSerendipityBasisSpace(geo, degree=degree, family=family)
if element_basis == ElementBasis.NONCONFORMING_POLYNOMIAL:
return HexmeshPolynomialBasisSpace... | Python | 1 |
FROM `my_project.dataset.orders`
WHERE order_date BETWEEN '2023-01-01' AND '2023-12-31'
GROUP BY user_id
),
user_activities AS (
SELECT
user_id,
COUNT(*) as activity_count,
COUNT(DISTINCT activity_type) as unique_activities
FR... | Python | 1 |
_trades.graphql",
response_derives = "Debug"
)]
pub struct ListAccountTrades;
#[derive(GraphQLQuery)]
#[graphql(
schema_path = "src/graphql/schema.json",
query_path = "src/graphql/queries/list_candles.graphql",
response_derives = "Debug"
)]
pub struct ListCandles;
#[derive(GraphQLQuery)]
#[graphql(
... | Rust | 0 |
x,
..
}) => is_type_name(x, "GlobalsBuilder"),
_ => false,
}
}
<gh_stars>0
//! TOML file configuration options.
use super::options;
use super::AppSettings;
use commons::de::de_loglevel;
use commons::MergeOptions;
use failure::{Fallible, ResultExt};
use std::io::Read;
use std::{fs, io, p... | Rust | 0 |
alloc::string::String;
use alloc::vec::Vec;
pub type size_t = usize;
pub type c_char = i8;
pub type c_short = i16;
pub type c_int = i32;
pub type c_long = i64;
pub type uint8_t = u8;
pub type uint16_t = u16;
pub type uint32_t = u32;
pub type uint64_t = u64;
pub type int8_t = i8;
pub type int16_t = i16;
pub t... | Rust | 0 |
tion('้ฃๆบๅคงๆ')
while True:
#่ๆฏ่ฒๅกซๅ
window_screen.fill(bg_color)
#ๅพๅๆดๆฐ
if hit_score >= 999:
hit_score = 999
if hit_score > hit_score_temp and hero:
hit_score_temp = hit_score
show_score_HP()
elif hit_score < hit_score_temp:
... | Python | 1 |
flat::CALL_ME_HAND.default as &crate::Emoji),
("calling" , &crate::flat::MOBILE_PHONE_WITH_ARROW as &crate::Emoji),
("cambodia" , &crate::flat::FLAG_CAMBODIA as &crate::Emoji),
("camel" , &crate::flat::CAMEL as &crate::Emoji),
("camera" , &crate::flat::CAMERA as &crate::Emoji),
("camera_flash" , &crate::flat::CAMERA_WI... | Rust | 0 |
_list`
wchar::wch_c!("%1 %2 %3\n").as_ptr() as _,
0, // message id - ignored
0, // language id - ignored
out.as_mut_ptr() as _,
1, // minmum number of output `WCHAR` elements
parts.as_ptr() as _,
);
if result == 0 {
ret... | Rust | 0 |
# -*- coding: utf-8 -*- #
# Copyright 2017 Google LLC. All Rights Reserved.
#
# 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 requir... | Python | 1 |
from torchmetrics import Metric
import torch
import numpy as np
import sklearn.metrics
class CrossEntropyLossMetric(Metric):
"""
Wrapper around the torch.nn.CrossEntropyLoss for use
with torchmetrics.
"""
def __init__(self):
super().__init__()
self.add_state("summed_loss", default=... | Python | 1 |
data blob found",
))?;
let comment = splitn.next().unwrap_or("").trim().to_string();
Ok(SshKey {
pub_blob: base64::decode(data_encoded.trim())
.map_err(|e| io::Error::new(io::ErrorKind::Other, e))?,
priv_file: priv_blob,
unlocked_key: None,
... | Rust | 0 |
model_name = "os_main.py"
import sys
def main(osdir,hmi,key):
os_dir= osdir
print(f"<osmain> ไฟกๆฏ EaseMCUOSๅฏๅจ ไฝ็ฝฎ{os_dir}")
hmi.tx("page sysload")
hmi.tx(f'bootlog.txt="EaseMCUOSๅฏๅจ ไฝ็ฝฎ{os_dir}"')
print(f"<osmain> ไฟกๆฏ ๅ ่ฝฝ็ณป็ปๅ
ๆ ธoscore")
sys.path.append(f"{os_dir}/syscore")
oscoreapi = __import__("sy... | Python | 1 |
(self.data & 0x000000FF) as u8
}
/// Get the alpha value
pub fn a(&self) -> u8 {
((self.data & 0xFF000000) >> 24) as u8
}
/// Interpolate between two colors
pub fn interpolate(start_color: Color, end_color: Color, scale: f64) -> Color {
let r = Color::interp(start_color.... | Rust | 0 |
serMarshal(param0: *const u32, param1: *mut u8, param2: *const super::super::super::UI::WindowsAndMessaging::HACCEL) -> *mut u8;
#[doc = "*Required features: `\"Win32_System_Com_Marshal\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(feature = "Win32_UI_WindowsAndMessaging")]
pub fn HACCEL_UserMarshal64(par... | Rust | 0 |
()).await
}
}
#[derive(Debug, Parser)]
pub struct Logout {
#[clap(long, short = 's')]
/// ่ฟๆฅๆนๅผ
host: Option<NetState>,
}
#[async_trait]
impl TUNetCommand for Logout {
async fn run(&self) -> Result<()> {
let client = create_http_client()?;
let cred = read_username()?;
let c ... | Rust | 0 |
assert!(t.try_push_char('ั').is_err());
assert!(t.try_push_char('\u{a66e}').is_err());
assert!(t.try_push_char('\u{1f4a9}').is_err());
assert_eq!(b"x\0\xa0", t.as_byte_slice());
}
#[test]
fn format() {
assert_eq!("", &*format_tendril!(""));
assert_eq!("two and... | Rust | 0 |
_pb);
let edge_location_pb = parse_pb::<EdgeLocationPb>(data_operation_pb.get_locationBlob())?;
let edge_kind_pb = edge_location_pb.get_edgeKind();
let edge_kind = EdgeKind::from_proto(edge_kind_pb);
let property_map = PropertyMap::from_proto(data_operation_pb.get_props());
graph.insert_overwrite_e... | Rust | 0 |
n, linewidth=2)
plt.ylabel('Social signals', fontsize=12)
plt.xlim([0, times_waveform[-1]])
plt.ylim([0.05, 1.05])
plt.yticks(list(range(0, 2, 1)))
plt.legend(loc="upper right", fontsize=12)
####################
# 41 phones
####################
plt.subplot(313)
line_sil, = plt.p... | Python | 1 |