text
string
label_name
string
labels
int64
!["m", "n", "o"] .iter() .map(ToString::to_string) .collect(), irmin_time: Some(10.0), tezedge_time: Some(20.0), })) .unwrap(); TIMING_CHANNEL .send(TimingMessage::Action(Action { ...
Rust
0
from conn.woocommerce_config import wcapi def obtener_pedidos_por_estado(estado): response = wcapi.get("orders", params={"status": estado}) if response.status_code != 200: print(f"Error API WooCommerce: {response.status_code}") return [] data = response.json() # Debug para ver qué devu...
Python
1
_size & (color_target_size - 1), 0); let standard_texture_size = std::mem::size_of::<Texture>(); assert_eq!(standard_texture_size & (standard_texture_size - 1), 0); } #[test] fn data_alignment() { let border_color_alignment = std::mem::align_of::<BorderColor>(); assert_eq!(...
Rust
0
libc_bit_field!(flags, MAP_STACK), ] .iter() .filter_map(|x| *x) .collect::<Vec<_>>() .join("|") } fn show_fdflags(flags: i32) -> String { vec![ if flags == 0 { libc_bit_field!(flags, O_RDONLY) } else { None }, libc_bit_field!(flags, ...
Rust
0
.format('delta') .option('mergeSchema', 'true') .mode('overwrite') .save(caminho_tabela_gold) ) else: df_resumo_impostos.delete(f"CodigoData = '{data_processamento}'") ( df_tributos_sumarizado ...
Python
1
list, &board, mask); QueenType::legals::<NotInCheckType>(&mut movelist, &board, mask); KingType::legals::<NotInCheckType>(&mut movelist, &board, mask); } else if checkers.popcnt() == 1 { PawnType::legals::<InCheckType>(&mut movelist, &board, mask); KnightType::leg...
Rust
0
label="alt:", value="-", position=alt_pos, label_font=fonts.Small, text_font=fonts.Small, label_spacing=label_spacing, ), ) def on_unload(self, ui): with ui._lock: ui.remove_element('lati...
Python
1
fyRyver, # throw a bizzare code forcing us to fail to look it up "response": False, "requests_response_code": 999, }, ), ( "ryver://apprise/ckhrjW8w672m6HG", { "instance": NotifyRyver, # Throws a series of i/o exceptions with th...
Python
1
, }; use anyhow::{Context, Error}; use crate::{FullName, TestContext}; pub(crate) fn rune_output( name: &FullName, directory: &Path, ctx: &TestContext, ) -> Result<Output, Error> { let mut cmd = ctx.rune_cmd(); cmd.arg("build") .arg(directory.join("Runefile.yml")) .arg("--debug") ...
Rust
0
""" 資料查詢介面模組 此模組提供靈活的資料查詢和篩選功能,包括多種查詢條件設定、 結果顯示和資料匯出等功能。 主要功能: - 多條件資料查詢設定 - 查詢結果表格顯示 - 資料視覺化圖表 - 查詢結果匯出 - 查詢歷史記錄 Example: ```python from src.ui.pages.data_management.data_query import show_data_query_interface show_data_query_interface() ``` Note: 此模組依賴於 DataManagementService 來執行實際的資料查詢邏輯。 """ ...
Python
1
ESP32_GPIO + 4 * W1TS0)) w1tc0 = ptr32(int(ESP32_GPIO + 4 * W1TC0)) # need to fill the column latches with "no-change" values (all ones) epd_cl = EPD_CL w1tc0[0] = epd_cl w1ts0[0] = EPD_DATA # send first byte of row with start-row signal w1tc0[W1TC1 - W1TC0] = EP...
Python
1
import numpy as np np.random.seed(0) # 定义状态转移概率矩阵P P = [ [0.9, 0.1, 0.0, 0.0, 0.0, 0.0], [0.5, 0.0, 0.5, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.6, 0.0, 0.4], [0.0, 0.0, 0.0, 0.0, 0.3, 0.7], [0.0, 0.2, 0.3, 0.5, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 1.0], ] P = np.array(P) rewards = [-1, -2, -2, 10, 1...
Python
1
order of convergence. """ # We require the order of convergence to always be larger than 1.0 if not (dim_idx == 1 and grid_type_idx == 1): # no analysis for 3d and simplices assert 1.0 < actual_ooc[dim_idx][grid_type_idx]["ooc_" + var] if grid_type_idx == 0: # Cartesian assert np.is...
Python
1
ection query. let query = "query { leggeds(first: 100) { legs } }"; let res = insert_and_query(subgraph_id, schema, vec![entity], query) .await .unwrap(); let data = extract_data!(res).unwrap(); let exp = object! { leggeds: vec![ object!{ legs: 3 }]}; assert_eq!(data, exp); // Q...
Rust
0
penssl dgst -sha1 -hmac "key"` let sigstring = "sha1=104152c5bfdca07bc633eebd46199f0255c9f49d"; let sig1 = Signature::create(HashType::SHA1, "data", "key"); let sig2 = Signature::from_str(sigstring).unwrap(); assert_eq!(sig1, sig2); assert!(sig1.verify("data", "key")); } } <f...
Rust
0
ica_id: &[Boolean], exp_encoded_node: &num::AllocatedNum<Bls12>, ) -> Result<(), SynthesisError> { let EncodingProof { node, parents } = self; let key = Self::create_key( cs.namespace(|| "create_key"), params, replica_id, node, par...
Rust
0
assification containing '{}' from output files", excluded, query ); } else { eprintln!( "Wrote {} read-pairs with classification containing '{}' to output files", included, query ); } } //quicker to adjust the function to se #[allow(unused_assignments...
Rust
0
()), // safe vec![ldb as MklInt; group_count].as_slice().as_ptr(), beta.as_ptr(), mem::transmute(c_array.as_slice().as_ptr()), // ??? vec![ldc as MklInt; group_count].as_slice().as_ptr(), group_count as MklInt, vec![size_per_group as MklInt; group_...
Rust
0
, 0)), ("varnothi", (0, 0)), ("Laplace", (0, 0)), ("fema", (0, 0)), ("HumpE", (0, 0)), ("Double", (0, 0)), ("rightthreeti", (0, 0)), ("leftthr", (0, 0)), ("hybul", (0, 0)), ("dstrok;", (273, 0)), ("cupor", (0, 0)), ("therefo", (0, 0...
Rust
0
if let Event::Resize(width, height) = e { target.width = width; target.height = height; } target.game.event(e); } target.polling = true; glfwPollEvents(); target.polling = false; le...
Rust
0
// // We know gcd(n, Δ) = 1 or else we'd have found Jacobi(d, n) == 0 above. // We know gcd(n, 2) = 1 because n is odd. // // Arrange s = (n - Jacobi(Δ, n)) / 2^r = (n+1) / 2^r. let mut s = n + 1u32; let r = trailing_zeros(&s); s >>= r; let nm2 = n - 2u32; // n - 2 // We apply ...
Rust
0
# Copyright (c) 2008 The Hewlett-Packard Development Company # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list of...
Python
1
class(&self, class: &rt::Class) -> bool; fn responds_to_selector(&self, sel: rt::Sel) -> bool; fn description(&self) -> String; fn debug_description(&self) -> String; } objc_trait! { pub unsafe objc trait IsNSObject { type Base = NSObject; trait Sub = SubNSObject; fn instance_c...
Rust
0
#!/usr/bin/env python3 import json import argparse from collections import defaultdict from typing import Dict, List, Tuple def calculate_accuracy(predictions: List[Dict]) -> Tuple[float, Dict[str, float]]: total_correct = 0 total_count = len(predictions) category_stats = defaultdict(lambda: {'corre...
Python
1
<u8>>> { let password = unsafe { czmq_sys::zsock_plain_password(self.zsock as *mut c_void) }; if password == ptr::null_mut() { Err(Error::new(ErrorKind::NullPtr, ZSockError::CmdFailed)) } else { let c_str = unsafe { CStr::from_ptr(password) }; let bytes = c_s...
Rust
0
the task is nonwritable # again! updateconns = self.updateconns changeset = self.changeset self.updateconns = None self.changeset = None # If nobody needs updating, we're done. if not (changeset or updateconns): return connections = self.app....
Python
1
from .imports import * def accuracy_np(preds, targs): preds = np.argmax(preds, 1) return (preds==targs).mean() def accuracy(preds, targs): preds = torch.max(preds, dim=1)[1] return (preds==targs).float().mean() def accuracy_thresh(thresh): return lambda preds,targs: accuracy_multi(preds, targs, ...
Python
1
App::new(env!("CARGO_PKG_NAME")) .version(crate_version!()) .author(format!("\n{}", crate_authors!("\n")).as_str()) .about(format!("{}\n{}", ASCII, crate_description!()).as_str()) .args_from_usage("-a, --no-audio 'Removes audio sources'") .args_from_usage("-b...
Rust
0
""" Database Page Objects for the automation framework This package contains database page objects following the Page Object Model pattern. Each database entity/table is represented as a page object. """ # Currently no page objects implemented # Add database page objects here as they are created __all__ = []
Python
1
if self.origin_stride != 1: H, W = depth.shape[-2:] depth = np.transpose(depth, (0, 2, 3, 1)) depth = [mmcv.imresize( x, (W//self.origin_stride, H//self.origin_stride), interpolation="nearest", ) for x in depth] depth = np.stac...
Python
1
import streamlit as st import pandas as pd st.write("hello guys k xajjjjj-") st.image('https://upload.wikimedia.org/wikipedia/commons/thumb/a/a8/TEIDE.JPG/1920px-TEIDE.JPG', caption='Sunrise by the mountains') from flask import Flask
Python
1
"""Entry point for the application.""" import logging from datetime import timezone from flask import Flask, g, request from flask_cors import CORS from waitress import serve from apis import api def create_app(config_module=None, loglevel="INFO"): """Initialize the core application.""" # create and conf...
Python
1
assuming a/b/c follow consistent convention. fn congruent(&self, other: &Triangle3d) -> bool { self.ab() == other.ab() && self.ac() == other.ac() && self.bc() == other.bc() } } fn parse_beacon(line_str: &str) -> Spec { let parts: Vec<&str> = line_str.split(',').collect(); Spec::NewBeacon(Point...
Rust
0
import re phoneNumRegex = re.compile(r'(\d\d\d)-(\d\d\d-\d\d\d\d)') # Parentheses are used to group the area code and main number, r stands for raw string mo = phoneNumRegex.search('My number is 322-444-4567.') area_code, main_number = mo.groups() # mo.groups() returns a tuple print('Phone number found: ' + 'Area code...
Python
1
from collections import deque # Define the city map city_map = [ [15, 'x', 8, 'x', 6, 9, 'x', 'x', 'x', 'x'], [14, 'x', 8, 'x', 14, 'x', 5, 11, 'x', 9], ['x', 17, 8, 'x', 17, 15, 12, 'x', 'x', 13], ['x', 13, 'x', 'x', 2, 'x', 17, 17, 1, 'x'], [6, 'x', 1, 5, 17, 'x', 2, 18, 11, 7], [12, 8, 17, ...
Python
1
# Copyright (c) 2019 - The Procedural Generation for Gazebo authors # For information on the respective copyright owner see the NOTICE file # # 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 # #...
Python
1
c = "Bit 18 - Fault Protection Trigger on Channel 2"] #[inline(always)] pub fn fchid2(&self) -> FCHID2_R { FCHID2_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Fault Protection Trigger on Channel 3"] #[inline(always)] pub fn fchid3(&self) -> FCHID3_R { FCHID3_R::new(((self.bits >> 19) ...
Rust
0
ly_avg.to_dict(), 'daily': daily_avg.to_dict(), 'monthly': monthly_avg.to_dict() } return seasonal_patterns def plot_seasonal_patterns(self, data, target_column='energy_consumption'): """Plot seasonal patterns in energy consumption data ...
Python
1
aise an exception if the given gas fee in Gwei is too high. For Type-1 transactions, pass the gasPrice; for Type-2, pass the baseFee. """ if ( self.upperLimitForBaseFeeInGwei is not None and gasFeeInGwei > self.upperLimitForBaseFeeInGwei ): ra...
Python
1
_key}: {content} with method: {method}") result = handler(content, method) return jsonify({f'{data_key}_result': result}) def index(self): return render_template('index.html') def run(self): self.app.run(debug=True) if __name__ == '__main__': analyzer = SelfIntroductionAna...
Python
1
l.0, (r: $tp_type) => r.0); impl_bin_op!(BitXor, bitxor, $tp_type, (l: $type ) => l , (r: $tp_type) => r.0); impl_bin_op!(BitXor, bitxor, $tp_type, (l: $tp_type) => l.0, (r: $type ) => r ); impl_bin_op!(Shl, shl, wrapping_shl, $tp_type, (l: $tp_type) => l.0, (r: u32) => r); impl_...
Rust
0
import torch from tabulate import tabulate import numpy as np def format_metric_time_table(metric): # dim 0 is time interval = 30 # FPS/2 table_timesteps = [i*interval for i in range(16) if i*interval< len(metric)] metric = torch.stack([metric[t] for t in table_timesteps], dim=0) # + [metric.mean(0)] ...
Python
1
lide, suggesting a moment of solitary exercise amidst the empty field.", }, { "role": "user", "content": 'Create an imaginative video descriptive caption or modify an earlier caption for the user input : " A woman is dancing, HD footage, close-up"'...
Python
1
--------------------------- @classmethod def display_error_more_verbose(cls, message): """ Write a message to standard error, as long as the current log level is at least MORE_VERBOSE. :param message: message to write :type message: str """ if cls.level >...
Python
1
} } #[doc(alias = "model")] pub fn connect_model_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_model_trampoline<F: Fn(&FilterListModel) + 'static>( this: *mut ffi::GtkFilterListModel, _param_spec: glib::ffi::gpointer, ...
Rust
0
** 2 * a_g_i outs[row_ind:row_ind + length, 5:15] = outs[row_ind:row_ind + length, 5:15] * 8 - 4 outs[row_ind:row_ind + length, 5:7] = outs[row_ind:row_ind + length, 5:7] * a_g_i + g_i * int(self.stride[i]) # landmark x1 y1 outs[row_ind:row_ind + length, 7:9] = outs[row_ind:row_in...
Python
1
w: &'a mut W, } impl<'a> TXDEFAULT_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: TXDEFAULT_A) -> &'a mut W { unsafe { self.bits(variant.into()) } } #[doc = "Output Default Value is 0"] #[inline(always)] pub fn zero(self) -> &'a...
Rust
0
n > 0 { res.insert(0, B64DIGITS[(_n & 63) as usize]); _n = _n >> 6; } res } } /// converts base 64 str to u32 pub fn b64int(a:&str) -> u32 { let mut res = 0_u32; for i in a.bytes() { let k = B64VALUES[(i & 127) as usize]; if k == 255 { break } res = (res << 6) + (k as u32); } ...
Rust
0
7014C077A5F96F75, 0xBE566C866964D01C, 0xE72AC43A35AD2166, 0x72EBB3259B77F9BB, 0x18DA8B09194FA1F0, 0xE876A080C9D6A39F, 0x809B168A3D88E8E9, 0x3D995CE5232C2DC2, 0xC7CFA44A363F628A, 0x668D46C398CAF96F, 0xD57DBB24AE27ACA1, 0x716F8EA1B8AA1086, 0x7B7796F4A86F1FD5, 0x4C7576AD01C68953, 0xE75BE79902448236, 0x8F06...
Rust
0
import uuid from datetime import datetime import sqlalchemy.dialects.postgresql as pg from sqlmodel import Column, Field, SQLModel class User(SQLModel, table=True): __tablename__ = "users" uid: uuid.UUID = Field( sa_column=Column(pg.UUID, nullable=False, primary_key=True, default=uuid.uuid4) ) ...
Python
1
_base_ = [ '../_base_/models/ocrnet_r50-d8.py', '../_base_/datasets/cityscapes.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_40k.py' ] model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101)) optimizer = dict(lr=0.02) lr_config = dict(min_lr=2e-4)
Python
1
_string(&file, &params); let r_int = vec![ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, ]; let string_vec: Vec<String> = r_int.iter().map(|x| x.to_string()).collect(); assert_eq!(results.unwrap().results, string_vec); }...
Rust
0
# coding: utf-8 """ Graphiant APIs Graphiant API documentation. The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 from __future__ import annotations import pprint import re # noqa: F401 ...
Python
1
f.write(f"{idx1} {idx2}\n") # write the vocab: for the human to look at vocab_file = file_prefix + ".vocab" inverted_merges = {idx: pair for pair, idx in self.merges.items()} with open(vocab_file, "w", encoding="utf-8") as f: for idx, token in self.vocab.items(): ...
Python
1
{ 'data': self.buffer(kind='nav') } class FrameNavUDF(BaseNavUDF): def process_frame(self, frame): self.results.data[:] = frame.sum() class TileNavUDF(BaseNavUDF): def process_tile(self, tile): self.results.data[:] = tile.sum(axis=tuple(range(1, len(tile.shape)))) class...
Python
1
ChaCha20Poly1305, KexAlg::X25519, KdfAlg::HkdfSha256) => do_setup_sender!( ChaCha20Poly1305, HkdfSha256, X25519HkdfSha256, mode, pk_recip, info, csprng ), (AeadAlg::ChaCha20Poly1305, KexAlg::X25519, KdfAlg::HkdfSha384) =...
Rust
0
onger possible here as the # persistence metadata no longer exists in the object. This should instead # be tested through unit tests on the repository in question. # verify_modified = kwargs.get("verify_modified", True) # if verify_modified and out_obj._modified_by != user_id: # ...
Python
1
SQL_FILE_PATH).await?) .execute(&self.pool) .await?; info!("Delete Data"); Ok(()) } } use super::sat::triangle_aabb_intersects; use super::vector::Vector3; use num_traits::Float; use std::collections::HashSet; #[derive(Debug, Clone, PartialEq)] pub(crate) struct Triangle<T: ...
Rust
0
# Copyright (c) OpenMMLab. All rights reserved. from .alpaca_map_fn import alpaca_map_fn from .alpaca_zh_map_fn import alpaca_zh_map_fn from .arxiv_map_fn import arxiv_map_fn from .code_alpaca_map_fn import code_alpaca_map_fn from .colors_map_fn import colors_map_fn from .crime_kg_assitant_map_fn import crime_kg_assita...
Python
1
GO_UNDERLINE_NONE, Underline::Single => ffi::PANGO_UNDERLINE_SINGLE, Underline::Double => ffi::PANGO_UNDERLINE_DOUBLE, Underline::Low => ffi::PANGO_UNDERLINE_LOW, Underline::Error => ffi::PANGO_UNDERLINE_ERROR, Underline::SingleLine => ffi::PANGO_UNDERLINE_SIN...
Rust
0
INPUT_FILE)?; } else { break; } } else { // run generator execute_generator(generator_file_lang, timeout, test_number)?; } let response_target = target_file_lang.execute(timeout as u32, test_number); let time_target: Durati...
Rust
0
eq!(consts::FRAC_PI_4, frac_pi_4); assert_eq!(consts::FRAC_PI_6, frac_pi_6); assert_eq!(consts::FRAC_PI_8, frac_pi_8); assert_eq!(consts::LN_10, ln_10); assert_eq!(consts::LN_2, ln_2); assert_eq!(consts::LOG10_E, log10_e); assert_eq!(consts::LOG2_E, log2_e); asser...
Rust
0
from_json<S: AsRef<str>>(json: S) -> RTDResult<Self> { Ok(serde_json::from_str(json.as_ref())?) } pub fn builder() -> RTDKeyboardButtonTypeRequestLocationBuilder { let mut inner = KeyboardButtonTypeRequestLocation::default(); inner.extra = Some(Uuid::new_v4().to_string()); RTDK...
Rust
0
'𒅍', '𖢉', '𝒞', 'ᐿ', '𘥻', '𘥿', '⻪', '𐑀', '⸳', '𐼊', '瓊', '⭫', '𝆹', 'ݕ', '㊺', '𝤢', 'ⶀ', '🤱', '𔐞', '𑠚', '𝄏', 'ᗵ', '𐁍', '𝒢', '🕑', 'ߩ', 'ሡ', '𘧛', '𑑀', '𝅀', '㇉', '𐩀', 'ⴓ', 'ᥒ', 'Ֆ', '𑁡', 'ꖉ', 'ˍ', 'ᑮ', '᳓', '𔒲', '𝀓', '𝔨', '𒆨', 'ﰶ', '\u{1e015}', '𞤄', '𝗻', 'ạ', 'ฐ', '𘦥', '欄', 'ဿ', '�...
Rust
0
relude::*; use crate::parsers::value::PqlValue; #[derive(Debug, Default, Clone, PartialEq)] pub struct PqlVector(pub Vec<PqlValue>); impl From<PqlVector> for PqlValue { fn from(v: PqlVector) -> Self { Self::Array(v.0) } } impl Neg for PqlVector { type Output = Self; fn neg(self) -> Self::Out...
Rust
0
e": "", "composer": "", "lyricist": "", "playlist type": "", "playlist title": "", "recommendation": "", "topic": "", "concept": "" } ''' head_map =...
Python
1
import cv2 import numpy as np # Baca gambar RGB sebagai format BGR bgr_img = cv2.imread(r'C:\Users\Fahmi\OneDrive\Documents\Raspi\Documents\Penelitian\Gambar\Kamera1\Ori\09-Aug-2023(13;06 WIB).jpg') # Ubah gambar BGR menjadi gambar HSV hsv_img = cv2.cvtColor(bgr_img, cv2.COLOR_BGR2HSV) lower = np.array([17, 5, 151]) ...
Python
1
from quspin.operators import hamiltonian from quspin.basis import spin_basis_1d from quspin.tools.measurements import obs_vs_time import numpy as np # import matplotlib.pyplot as plt try: from itertools import izip as zip except ImportError: pass def value_test(lhs, rhs, **kwargs): import matplotlib.pyplo...
Python
1
_ref() { "test_count" => GroupedOperator::new( parent, GroupedUDF { over: over_cols[0], group: group, initial: TestCount::empty(), }, ).into(), "prod" => GroupedOperator::new( parent, Grou...
Rust
0
io @patch("service.model_registration.InferenceManager.list_inference") async def test_delete_project_pipelines_delete_failed(list_inference, model_registration, servicer_context, s3_client): s3_client.return_value.list_folders.return_value = ["test-"] s3_client.return_value.delete_folder.side_effect = ClientEr...
Python
1
list = [4, 5, 6, 7, 8] for x in list: print(float(x))
Python
1
let sda = pins_1.p1_13.into_floating_input().degrade(); let pins = twim::Pins { scl, sda }; let i2c = Twim::new(p.TWIM1, pins, twim::Frequency::K100); let mut sensor = Sgp40::new(i2c, 0x59, delay); loop { if let Ok(result) = sensor.measure_voc_index() { rprintln!("VOC index:...
Rust
0
ue of the field is `ON`"] #[inline] pub fn is_on(&self) -> bool { *self == DCDCFLGCTLR::ON } #[doc = "Checks if the value of the field is `OFF`"] #[inline] pub fn is_off(&self) -> bool { *self == DCDCFLGCTLR::OFF } #[doc = "Checks if the value of the field is `AUTO`"] ...
Rust
0
as arguments when running the script. The `run()` method of the `DebugTestCaseVisitor` class is then called with these arguments to generate the debug test cases. If an error occurs during the analysis or writing the modified contents back to the file, the method prints an error message and returns `False`. Otherwise, ...
Python
1
{ let executor = fasync::LocalExecutor::new().expect("Failed to create executor"); let (client_end, server_end) = create_endpoints::<AccountHandlerContextMarker>().unwrap(); spawn_account_handler_context_server( server_end, Err(fidl_fuchsia_identity_account::Error::NotFo...
Rust
0
import sys,os data = sys.argv[1] src = sys.argv[2] import vcs.testing.regression as regression import vcs import vcsaddons, numpy import cdms2 f = cdms2.open(data) rms_xyt = f("rms_xyt") ax1 = cdms2.createAxis(['0071-0100' ,'ACCESS1-0' ,'ACCESS1-3' ,'CCSM4' ,'CESM1-BGC' ,'CESM1-CAM5', 'CESM1-FASTCHEM' ,'CESM1-W...
Python
1
from django.urls import path from .views import ProductViewSet, VendorAnalyticsView, VendorOrderViewSet urlpatterns = [ path( "products/", ProductViewSet.as_view({"get": "list", "post": "create"}), name="product-list", ), path( "products/<int:pk>/", ProductViewSet.a...
Python
1
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 //...
Rust
0
fig, ax = plt.subplots() ax.bar(data['Category'], data['Values'], color='skyblue') ax.set_xlabel('Category') ax.set_ylabel('Values') ax.set_title('Bar Chart') st.pyplot(fig) # Altair Line Chart st.write("### Altair Line Chart") alt_chart = alt.Chart(data).mark_line(point=True).encode...
Python
1
/// /// let category = Category::new("color", vec!["red", "green", "blue"]); /// assert_eq!(category.is_empty(), false); /// /// let category = Category::new("empty", Vec::<&str>::new()); /// assert_eq!(category.is_empty(), true); /// ``` pub fn is_empty(&self) -> bool { self.ele...
Rust
0
normalization inf: Large number used for attention masking """ sequence_dim: int = 384 pairwise_dim: int = 128 ipa_dim: int = 16 resnet_dim: int = 128 num_heads_ipa: int = 12 num_qk_points: int = 4 num_v_points: int = 8 dropout_rate: float = 0.1 num_blocks: ...
Python
1
, new_name: String) { let table = self.map.remove(old_name.as_slice()).unwrap(); self.map.insert(new_name, table); } pub fn get_table(&self, name: &String) -> &Table { self.map.get(name.as_slice()).unwrap() } pub fn get_mut_table(&mut self, name: &String) -> &mut Table { ...
Rust
0
to integers. Example: >>> chain_id_to_int = KeyToIntMapper() >>> chain_id_to_int("A") # 0 >>> chain_id_to_int("C") # 1 >>> chain_id_to_int("A") # 0 >>> chain_id_to_int("B") # 2 """ def __init__(self): """Initialize KeyToIntMapper with empty mapping....
Python
1
Default::default() }; let mut profiling_data = Vec::new(); let instant = Instant::now(); File::open(input).expect("Couldn't open input file").read_to_end(&mut profiling_data).expect("Error reading input file"); let profiling = read_profiling_file(&pr...
Rust
0
OPJ_BOOL { /* preconditions */ assert!(!jp2.is_null()); assert!(!p_manager.is_null()); if opj_procedure_list_add_procedure( (*jp2).m_procedure_list, ::std::mem::transmute::< Option< unsafe extern "C" fn( _: *mut opj_jp2_t, _: *mut opj_stream_private_t, _: *m...
Rust
0
= op.imm5(6) * word_size; let addr = rb.wrapping_add(offset); store(&mut *arm.bus, addr, rd); } fn ldr_imm(arm: &mut Arm7TDMI, op: ThumbOp) { ldr_imm_offset(arm, op, 4, |bus, addr| bus.read32(addr)); } fn ldrh_imm(arm: &mut Arm7TDMI, op: ThumbOp) { ldr_imm_offset(arm, op, 2, |bus, addr| bus.read_ext_u...
Rust
0
# Copyright (c) 2025 Carnegie Mellon University. # NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE # ENGINEERING INSTITUTE MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. # CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, # EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT # NOT LIMITED...
Python
1
&mut p.P0_23, get_twim_config(), ); let mut sht4 = sht4x::SHT4X { i2c: &mut twi, address: 0x44, }; let measurement = sht4.get_measurement(&sht4x::Precision::High).await.unwrap(); mem::drop(sht4); mem::drop(twi); /* Measureme...
Rust
0
e::Req { addr_high } => { if nes.cpu.state.get().is_write_cycle() { // We don't hijack write cycles (DMAState::Req { addr_high }, true) } else if is_odd { // This is currently a write cycle. This is good - next is read ...
Rust
0
{only_render_on_mobile(html! { <img onclick=self.link.callback(|_| HeaderMessage::ToggleDrawer) class="menu" src=by_theme("/images/drawer_light.svg", "/images/drawer_dark.svg") /> })} </div> ...
Rust
0
edEvent): event_mask |= InotifyConstants.IN_MOVE | InotifyConstants.IN_CREATE elif cls is DirModifiedEvent: event_mask |= ( InotifyConstants.IN_MOVE | InotifyConstants.IN_ATTRIB | InotifyConstants.IN_MODIFY ...
Python
1
(x)/s +1.25-R/S | <= 2 ** ( -61.22) */ const QR8: [f64; 6] = [ /* for x in [inf, 8]=1/[0,0.125] */ 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */ 7.32421874999935051953e-02, /* 0x3FB2BFFF, 0xFFFFFE2C */ 1.17682064682252693899e+01, /* 0x40278952, 0x5BB334D6 */ 5.57673380256401856059e+02, ...
Rust
0
import argparse import collections import json import os def main(): parser = argparse.ArgumentParser() parser.add_argument("card_db_src_dir") parser.add_argument("--write", action="store_true") args = parser.parse_args() with open(os.path.join(args.card_db_src_dir, "en_us/cards_en_us.json")) as ...
Python
1
bytes are swapped to support little-endian devices."] _1, } impl From<DBSWP_A> for bool { #[inline(always)] fn from(variant: DBSWP_A) -> Self { match variant { DBSWP_A::_0 => false, DBSWP_A::_1 => true, } } } #[doc = "Reader of field `DBSWP`"] pub type DBSWP_R = ...
Rust
0
unsafe { *self.address_init.to_ptr::<bool>() } } } impl GrowableVec<RwLock<GlobalData>> { pub fn idx(&self, index: GlobalId) -> Arc<RwLock<GlobalData>> { self.idx_usize(index.0 as usize) } } pub fn init_global_addresses(vm: &VM) { let globals = vm.globals.lock(); let mut size = 0;...
Rust
0
}; fn print_usage(cmd: &str) { eprintln!("Usage: {} config f id nclients duration_seq reqlen", cmd); } fn main() { // read command line let args: Vec<String> = env::args().collect(); if args.len() < 6 { print_usage(&args[0]); return; } // read config file let f = args[2].p...
Rust
0
Qs ] if IS_eval: IS_eval = imp_samp.evaluate(info) dic['NAIVE'] = [float(IS_eval[0]), float( (IS_eval[0] - true )**2)] dic['IS'] = [float(IS_eval[1]), float( (IS_eval[1] - true )**2)] dic['STEP IS'] = [float(IS_eval[2]), floa...
Python
1
pos) => { return Err( PERR::MissingToken(Token::RightBrace.into(), MISSING_RBRACE.into()) .into_err(pos), ); } (_, pos) => return Err(PERR::PropertyExpected.into_err(pos)), }; match input.next().unwrap(...
Rust
0
result['trend_params']['PE']['intercept'] ax1.plot(result['data'].index, trend, label='趋势线', color='green', linestyle=':') ax1.set_title(f'{valuation_code} PE分析 ({years}年)') ax1.set_ylabel('PE') ax1.legend() ...
Python
1
_digit = 0u8; // On average, we remove ~2 digits. let output = if vm_is_trailing_zeros || vr_is_trailing_zeros { // General case, which happens rarely (~0.7%). loop { let vp_div10 = div10(vp); let vm_div10 = div10(vm); if vp_div10 <= vm_div10 { ...
Rust
0