text
string
label_name
string
labels
int64
8_datah; #[doc = "BUF_09_ID register accessor: an alias for `Reg<BUF_09_ID_SPEC>`"] pub type BUF_09_ID = crate::Reg<buf_09_id::BUF_09_ID_SPEC>; #[doc = "CAN Buffer ID Register"] pub mod buf_09_id; #[doc = "BUF_09_DLC register accessor: an alias for `Reg<BUF_09_DLC_SPEC>`"] pub type BUF_09_DLC = crate::Reg<buf_09_dlc::B...
Rust
0
import os, time, threading, heapq import logging logger = logging.getLogger(__name__) def _dir_size_bytes(root: str) -> int: total = 0 for p, _, files in os.walk(root): for f in files: try: total += os.path.getsize(os.path.join(p, f)) except FileNotFoundError: ...
Python
1
import unittest import json from tests.test_base import BaseTestCase from app.models.workflow import WorkflowRun from app.extensions import DB class TestPostRunToDifferentEngines(BaseTestCase): """Test that posting runs to different engines work """ def setUp(self): """Set up test fixtures""" ...
Python
1
_MULT_A::RC_START_OSC_STATUS_12MHZ, } } #[doc = "Checks if the value of the field is `RC_START_OSC_STATUS_3MHZ`"] #[inline(always)] pub fn is_rc_start_osc_status_3mhz(&self) -> bool { *self == RC_CLOCK_MULT_A::RC_START_OSC_STATUS_3MHZ } #[doc = "Checks if the value of the field i...
Rust
0
field_u8: Some(1), field_u16: Some(2), field_u32: Some(3), field_u64: Some(4), field_i8: None, field_i16: None, field_i32: None, field_i64: None, field_f32: None, field_f64: None, field_bool: None, }; if let Ok(buf) = usecase...
Rust
0
e.Rect(center_x-100, rect_y + 3*text_spacing -5, 500, 2)) pygame.draw.rect(screen, confi.lsbackground_col, pygame.Rect(center_x-100, rect_y + 4*text_spacing -5, 500, 2)) pygame.draw.rect(screen, confi.lsbackground_col, pygame.Rect(center_x-100, rect_y + 5*text_spacing -5, 500, 2)) pygame.draw.rect(screen, c...
Python
1
x02,// 302 = "retf" // Retfq 0x19,// OpSize2 0x9C, 0x09,// 1180 = "retfq" 0xAE, 0x02,// 302 = "retf" 0xAE, 0x02,// 302 = "retf" 0x9C, 0x09,// 1180 = "retfq" // Int3 0x0B,// Ib 0xD5, 0x06,// 853 = "int" // Int_imm8 0x01,// Normal_1 0xD5, 0x06,// 853 = "int" // Into 0x01,// Normal_1 0xF6, 0x07,// 1014 ...
Rust
0
invalid, scheduled ) .len(), backed_candidates.len() / 2 ); } } } //! Unify multiple sub-transports into one pool. use crate::transport::*; use futures::future::FutureExt; use futures::sink::SinkExt; use futures::stream::StreamExt; use ghost_actor::dependencies::must_future::MustBoxFuture; use g...
Rust
0
]; state.store(&mut output); let expected = [ 0x6170_7865, 0x3320_646e, 0x7962_2d32, 0x6b20_6574, 0x9972_f211, 0xef6d_79e1, 0x586a_dc0b, 0x9458_011f, 0...
Rust
0
others ### this is done for checking bottom up approach self.enpointsBtmUp = sorted(endpoints, key=lambda x :x[0]) self.branchLength = len(self.sortedPointList) return self.singlBranchImg, self.sortedPointList,self. enpointsBtmUp, self.btmMostEndpnt def print_branch_details(self): ...
Python
1
# # Copyright (c) 2017, Massachusetts Institute of Technology 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 o...
Python
1
sueldo = int(input('Sueldo: ')) basico = 1130 if sueldo > basico : # se cumple la condición1 print('Sueldo superior al básico') elif sueldo < basico: # se cumple la condición2 print('Sueldo inferior al básico') else: # No se cumple ninguna condición print('Sueldo igual al básico')
Python
1
import numpy as np import cv2 import matplotlib.pyplot as plt img = cv2.imread('F:\\StudyatCLass\\Study\\class\\Xulianhso\\Code\\lena.tif', cv2.IMREAD_GRAYSCALE) ro, co = img.shape binary = np.zeros([ro, co], dtype='uint8') hard = np.zeros([ro, co], dtype='uint8') soft = np.zeros([ro, co], dtype='uint8') T = 120 f...
Python
1
ber(0); assert_ok!(propose_set_balance_and_note(1, 2, 1)); fast_forward_to(2); 0 } fn aye(who: u64) -> Vote<u64> { Vote { aye: true, balance: Balances::free_balance(&who), } } fn nay(who: u64) -> Vote<u64> { Vote { aye: false, balance: Balances::free_balance(&wh...
Rust
0
character: '\u{010d}', description: "LATIN SMALL LETTER C WITH CARON", }, Digraph { sequence: ['D', '<'], character: '\u{010e}', description: "LATIN CAPITAL LETTER D WITH CARON", }, Digraph { sequence: ['d', '<'], character: '\u{010f}...
Rust
0
, ) -> Vec<(Option<&'a T>, f64)> { let mut out = Vec::new(); out.resize(k, (None, f64::INFINITY)); self.nearest_neighbors(query, &mut out, max_dist); out.retain(|nn| nn.0.is_some()); out } } fn coords_cmp(a: &UTMCoordinates, b: &UTMCoordinates, y_axis: bool) -> Orderin...
Rust
0
import streamlit as st import pandas as pd import difflib import docx from io import BytesIO import re from html import escape def read_text(file): return file.read().decode("utf-8") def read_word(file): doc = docx.Document(file) return "\n".join([para.text for para in doc.paragraphs]) def read_excel(fil...
Python
1
ls.DateTimeField(auto_now_add=True) # updated_at = models.DateTimeField(auto_now=True) # status = models.CharField(max_length=20, default="Pending") # def __str__(self): # return f'Order {self.id} by {self.user.username}' # class OrderItem(models.Model): # order = models.ForeignKey(Order, on_...
Python
1
import os import subprocess import sys import textwrap import unittest import install_test_helper class DrakePythonDirInstallTest(unittest.TestCase): def test_drake_python_dir(self): cmake_source_dir = install_test_helper.create_temporary_dir("pydir_src") cmake_prefix_path = install_test_helper....
Python
1
/// witnesses that need to be added for the build function to succeed /// this allows checking that witnesses are present at build time (instead of when submitting to a node) /// This is useful for APIs that can keep track of which witnesses will be required (like transaction builders) required_wits: Re...
Rust
0
- C > 0.7 enables quantum information integration - d ≥ 7 allows self-aware recursion Together: Stable, integrated, self-aware information processing = CONSCIOUSNESS (by definition in information-theoretic terms) QED: These 5 are necessary and sufficient. """...
Python
1
# -*- coding: utf-8 -*- # Copyright (c) 2008 - 2010 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing the writer class for writing a highlighting styles XML file. """ import os import time from KdeQt.KQApplication import e4App from XMLWriterBase import XMLWriterBase from Config import highlight...
Python
1
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ @Project :MaxKB @File :deepseek_model_provider.py @Author :Brian Yang @Date :5/12/24 7:40 AM """ import os from common.utils.common import get_file_content from models_provider.base_model_provider import IModelProvider, ModelProvideInfo, ModelInfo, ModelTypeCo...
Python
1
i_lowercase() == y.to_ascii_lowercase()) } } impl Eq for CaseInsensitiveName {} #[derive(Clone, Copy)] enum ProofOrder { Pre, Post } struct BuildDoc<'a, W> { thm_folder: PathBuf, source: &'a LinedString, base_url: Option<Url>, env: Environment, axuse: (Vec<ThmId>, AxiomUse), index: Option<W>, mangler:...
Rust
0
. //! Instead they can be lazily bound on first use. The lazy_bind //! are contains a stream of BIND opcodes to bind all lazy symbols. //! Normal use is that dyld ignores the lazy_bind section when //! loading an image. Instead the static linker arranged for a //! lazy pointer to initially point to a helper function ...
Rust
0
import pytest import jsonschema import json SCHEMA_FILE = "card.dfu.rsp.notecard.api.json" def test_minimal_valid_rsp(schema): """Tests a minimal valid response (empty object).""" instance = {} jsonschema.validate(instance=instance, schema=schema) def test_valid_name_field(schema): """Tests valid res...
Python
1
); r.rotate_90_ccw(); test_rsq("d5", "(1x -1y 9adr)", &r); } // 桂馬のテスト { let mut r = RelAdr2D::new(0, -1); test_rsq("g1", "(0x -1y -1adr)", &r); r.rotate(Angle::Ccw45); test_rsq("g2", "(1x -1y 9adr)", &r); r.double_rank(); test_rsq("g3", "(1x -...
Rust
0
if hasattr(predictor, 'realistic_goal_timeline'): timeline = predictor.realistic_goal_timeline(lift_type, target_1rm) else: timeline = predictor.goal_timeline(lift_type, target_1rm) if not timeline['success']: st.error(f"❌ {timeline.get('message', 'Could not calculate timeline')...
Python
1
# Copyright (C) 2009, Lorenzo Berni # Based on previous work under copyright (c) 2001, 2002 McMillan Enterprises, Inc. # # This program 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 2 # of the...
Python
1
from __future__ import annotations import os from functools import lru_cache from typing import Optional from google.cloud import firestore @lru_cache(maxsize=1) def get_client(project_id: Optional[str] = None) -> firestore.Client: """Return a cached Firestore client. Project ID resolution order: - exp...
Python
1
Mode::Border(color) => color, _ => Vector4::default(), } } } pub struct Sampler { sampler_state: *mut ID3D11SamplerState, } impl Sampler { pub fn new(device: *mut ID3D11Device, filter: D3D11_FILTER, address_mode: AddressMode) -> Self { let d3d_address_mode = address_mode.as_d3d...
Rust
0
2 + 1]; repulse_grad(&mut gradient, x, y, v1, v2, m); } } } } for v1 in 0..self.n { let x = loc[v1 * 2]; let y = loc[v1 * 2 + 1]; let d = (x * x + y * y).sqrt(); //gradient[v1 * 2] ...
Rust
0
``` :param _builtins.str account_id: Identifier. :param _builtins.str tag_name: The name of the tag """ __args__ = dict() __args__['accountId'] = account_id __args__['tagName'] = tag_name opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts) __ret__ ...
Python
1
#[serde(skip_serializing_if = "Option::is_none")] pub last_name: Option<String>, } } #[derive(setter, Serialize, Deserialize, Debug)] pub struct ChosenInlineResult { pub result_id: String, pub from: User, pub offset: String, #[serde(skip_serializing_if = "Option::is_none")] pub locati...
Rust
0
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from ..preprocess import Smooth def test_Smooth_inputs(): input_map = dict( args=dict( argstr="%s", ), environ=dict( nohash=True, usedefault=True, ), in_file=dict( argstr="...
Python
1
pr(C)] pub struct RegisterBlock { #[doc = "0x00 - PWM Submodule"] pub sm0: SM, _reserved1: [u8; 8usize], #[doc = "0x60 - PWM Submodule"] pub sm1: SM, _reserved2: [u8; 8usize], #[doc = "0xc0 - PWM Submodule"] pub sm2: SM, _reserved3: [u8; 8usize], #[doc = "0x120 - PWM Submodule"] ...
Rust
0
e alias to extract the correct [PAC](crate::target_device) SERCOM type /// from the [`Sercom`] instance pub type SERCOM<S> = <S as Sercom>::SERCOM; macro_rules! sercom { ( $($Sercom:ident),+ ) => { paste! { $( /// Represents the corresponding SERCOM instance pub ...
Rust
0
**kwargs, ) # type: ignore if streaming: full_response = "" while True: try: chunk = response.__next__() # type: ignore if not chunk or not chunk.choices: continue delta = ( ...
Python
1
vals.push(covariances[i][a]); } } DMatrix::from_row_slice(num_files, num_files, &vals) } else { let mut vals: Vec<f64> = Vec::with_capacity(num_files * num_files); for i in 0..num_files { for a in 0..num_files { ...
Rust
0
self.network.decoder.deep_supervision = False ret = nnUNetTrainer.predict_preprocessed_data_return_seg_and_softmax(self, data, do_mirroring=do_mirroring, mirror_axes=mirror_axes, ...
Python
1
vated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn format(this: &VideoFrame) -> Option<VideoPixelFormat>; #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (structural , method , getter , js_class = "VideoFrame" , j...
Rust
0
Status::NOT_SUPPORTED, .. }) ); Ok(()) } #[fasync::run_singlethreaded(test)] pub async fn test_set_active_healthy_when_recovery() -> Result<(), Error> { let paver = MockPaverForTest::new(|p| p.active_config(paver::Configuration::Recovery)); assert_eq!( Status::BA...
Rust
0
hooks = [] if no_rewrite: assert not flatten_sequential if hasattr(model, 'reset_classifier'): # make sure classifier is removed? model.reset_classifier(0) layers['body'] = model hooks.extend(self.feature_info.get_dicts()) else: ...
Python
1
ing = [c for c in required_cookies if c not in cookies] if missing: logger.error(f'缺少必要的 cookies: {missing}') return False return True except Exception as e: logger.error(f"验证cookies失败: {str(e)}") return False def _...
Python
1
, LOCAL_TIME_TYPE_1.is_dst()); assert_eq!(local_time_type_1.time_zone_designation(), LOCAL_TIME_TYPE_1.time_zone_designation()); assert_eq!(local_time_type_2.ut_offset(), LOCAL_TIME_TYPE_2.ut_offset()); assert_eq!(local_time_type_2.is_dst(), LOCAL_TIME_TYPE_2.is_dst()); assert_eq!(local...
Rust
0
let node = mmr::DataOrHash::Data(leaf.into_opaque_leaf()); pallet_mmr::verify_leaf_proof::<MmrHashing, _>(root, node, proof) } } #[cfg(feature = "runtime-benchmarks")] impl frame_benchmarking::Benchmark<Block> for Runtime { fn benchmark_metadata(extra: bool) -> ( Vec<frame_benchmarking::BenchmarkLis...
Rust
0
ated_abcd_efgh(&b"abcdxxxx"[..]), Error(Position(ErrorKind::Tag, &b"xxxx"[..]))); } #[test] fn delimited() { named!( tag_abc, tag!("abc") ); named!( tag_def, tag!("def") ); named!( tag_ghi, tag!("ghi") ); named!( delimited_abc_def_ghi<&[u8], &[u8]>, delimited!(tag_abc, tag_def, tag_ghi) ); a...
Rust
0
} command.stderr(Stdio::piped()); command.stdout(Stdio::piped()); command } } impl<'a, R: RngCore> SpawnBuilder<'a, R, Node> { pub fn build(mut self) -> Result<Node> { let dir = self.working_dir.join(self.alias.to_owned()); std::fs::DirBuilder::new().recursive(...
Rust
0
test_yaml_file_path); let registry = YamlNodeRegistry::new(test_yaml_file_path) .expect("Failed to create YamlNodeRegistry"); let mut node = get_node_1(); node.display_name = "".to_string(); let result = registry.insert_node(node); match re...
Rust
0
inson //! Basic DOM data structures. use std::collections::{HashMap, HashSet}; pub type AttrMap = HashMap<String, String>; #[derive(Debug)] pub struct ParserInfo { line_num: usize, col_num: usize, } impl std::fmt::Display for ParserInfo { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { ...
Rust
0
import cv2 import numpy as np from mss import mss import time import mss.tools sct = mss.mss() monitor = sct.monitors[1] boundingbox = {'top': monitor['top'], 'left': monitor['left'], 'width': monitor['width'], 'height': monitor['height']} template = cv2.imread('template.jpg', 0) threshold = 0.7 def is_scene_detected...
Python
1
eponame>Trisfald/weasel use std::fmt::{Display, Formatter, Result}; use weasel::character::StatisticId; use weasel::rules::entropy::UniformDistribution; use weasel::rules::statistic::SimpleStatistic; use weasel::{ battle_rules, rules::empty::*, Actor, BattleRules, CharacterRules, Entities, EntityId, Entropy, Ro...
Rust
0
data: &FstTestData<W, F>) -> Result<()> where F: SerializableFst<W> + MutableFst<W>, W: SerializableSemiring + WeightQuantize, { let ref_props = test_data.fst_properties; let props = test_data.raw.properties(); assert_eq!(props, ref_props); Ok(()) } enum Enum { P = 3, //~^ NOTE first u...
Rust
0
img2_boxes, img2_scores = filter_predictions(img2_predictions, MMGD_PRED_SCORE_THRESHOLD, MMGD_NMS_IOU_THRESHOLD, DEVICE) # Init SAM 2 Model and Predict Mask with Box Prompt if len(img1_boxes) == 0 and len(img2_boxes) == 0: change_mask = np.zeros(img1.shape[:2]).astype(np.uint8) elif len(img1_b...
Python
1
> { eprintln!("[{}:{}]", file!(), line!()); }; ($val:expr $(,)?) => { // Use of `match` here is intentional because it affects the lifetimes // of temporaries - https://stackoverflow.com/a/48732525/1063961 match $val { tmp => { eprintln!("[{}:{}] {} = ...
Rust
0
).as_secs_f64(); } return sum / repetitions as f64; } fn time(f: &dyn Fn()) { time_with_label(f, "Solved in"); } fn time_with_label(f: &dyn Fn(), label: &str) { let duration = get_duration(f); println!("{} {:.9}s\n", label, duration.as_secs_f64()); } fn get_duration(f: &dyn Fn()) -> Duration { ...
Rust
0
import streamlit as st from team.dsa_team import get_dsa_team_and_docker from config.docker_utils import start_docker_container,stop_docker_container from autogen_agentchat.messages import TextMessage from autogen_agentchat.base import TaskResult import asyncio st.title("Agentorithm") st.write("Agentorithm is an agent...
Python
1
#!/usr/bin/env python """ Copyright 2015-2020 Knights Lab, Regents of the University of Minnesota. This software is released under the GNU Affero General Public License (AGPL) v3.0 License. """ import click import os from ninja_utils.utils import verify_make_dir from ninja_utils.parsers import FASTA from dojo.datab...
Python
1
on_current_count >= game_player.summon_target_count for game_player in game_ctrl_list if game_player.player_id in yiren_list): print("All players task done. Ending the program.") break #召唤结束,清空召唤次数 for game_player in game_ctrl_list: if game_player.player_id in yiren_list: ...
Python
1
# shopping_list_manager.py def display_menu(): print(f"Shopping List Manager") print(f"1. Add Item") print(f"2. Remove Item") print(f"3. View List") print(f"4. Exit") def add_item(shopping_list): item = input("Enter the item to add: ").strip() shopping_list.append(item) print(f"'{item}...
Python
1
_raw), 'f1': sum(s['f1'] for s in bert_scores_raw) / len(bert_scores_raw) } if bert_scores_raw else {} average_bert_rag = { 'precision': sum(s['precision'] for s in bert_scores_rag) / len(bert_scores_rag), 'recall': sum(s['recall'] for s in bert_scores_rag) / len(bert_scores_rag), ...
Python
1
xcfg::attr::syntax::parse_attr_config(&mut top_xcfg, &mi); scope_stack.last_mut().parse_xcfg_config(&top_xcfg); // Build the scope config for this item scope_stack.push_ast_item(&i, Some(mi), &self.external_config, cx); Cros...
Rust
0
from typing import Annotated from fastapi import Depends from sqlalchemy.ext.asyncio import AsyncSession from workout_api.config.database import get_session DatabaseDependency = Annotated[AsyncSession, Depends(get_session)]
Python
1
; } } if options.validate_exp && !matches!(claims.exp, TryParse::Parsed(exp) if exp >= now-options.leeway) { return Err(new_error(ErrorKind::ExpiredSignature)); } if options.validate_nbf && !matches!(claims.nbf, TryParse::Parsed(nbf) if nbf <= now + options.leeway) ...
Rust
0
e, 'perturbation_size' : args.perturbation_size, 'perturb_steps' : args.perturb_steps_test, 'step_size' : args.step_size_test, 'num_classes': args.num_classes, 'batch_size': BATCH_SIZE, 'alpha': args.alpha, 'beta': args.beta} Scheduler = args.scheduler device = torch.device("cuda:%d"%(args.device_num) if torch....
Python
1
.point) } } fn test_index<T>(index: &T) where T: NearestNeighbors<Point, SoftPoint>, { let target = Euclidean([0.0, 0.0, 0.0]); assert_eq!( index.nearest(&target).expect("No nearest neighbor found"), Neighbor::new(&SoftPoint::new(1.0, 2.0, 2.0), ...
Rust
0
import h5py import tempfile import lindi from .utils import lists_are_equal def test_store(): with tempfile.TemporaryDirectory() as tmpdir: filename = f"{tmpdir}/test.h5" with h5py.File(filename, "w") as f: f.create_dataset("dataset1", data=[1, 2, 3]) group1 = f.create_grou...
Python
1
import torch import torch.nn as nn import torchvision.models as models import torch.nn.functional as F from torch.autograd import Variable from utils.utils import weights_init_normal # VIDEO only network class DeepVAD_video(nn.Module): def __init__(self, args): super(DeepVAD_video, self).__init__() ...
Python
1
# PLY package # Author: David Beazley (dave@dabeaz.com) __version__ = '3.9' __all__ = ['lex','yacc']
Python
1
# -*- coding: utf-8 -*- # # Copyright 2024 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
`] and wraps in a /// [`MessageWrapper`]. pub fn deserialize_message(input: &[u8]) -> anyhow::Result<MessageWrapper> { if input.is_empty() { return Err(anyhow!("Empty input")); } match input[0] { CLIENT_HELLO_HEADER => { let message: ClientHello = Deserializable::deserialize(inpu...
Rust
0
ir, device_map="auto", load_in_4bit=True, trust_remote_code=args.trust_remote_code ) else: # fp16 base = AutoModelForCausalLM.from_pretrained( args.base_dir, device_map="auto", torch_dtyp...
Python
1
= x.clone() len_raw = cloned.size(1) n_mask = int((len_raw + self.stride-0.1) // self.stride) ts = torch.randint(0, self.window, size=(n_mask, 2)) for t, t_end in ts: if len_raw - t <= 0: continue t_start = random.randrange(0, len_raw - t) ...
Python
1
from fastapi import HTTPException, status def validate_passwords(password: str, confirm_password: str): if password != confirm_password: raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail="Las contraseñas no coinciden") if len(password) < 8: raise HTTPException(status_code=stat...
Python
1
None if language == 'ru' and text: entities = extract_entities_ru(text) elif language == 'en' and text: entities = extract_entities_en(text) else: entities = [] data = { "url" :url, "canonical_url":canonical_url , "domain" : domain , "published_ti...
Python
1
class Counter: def __init__(self, current=1, min_value=0, max_value=10): self.current = current self.min_value = min_value self.max_value = max_value def set_current(self, start): self.current = start def set_max(self, max_max): self.max_value = max_max def se...
Python
1
import starlette.status as status from app.exceptions.exception_base import PathOfModifiersAPIError class RateLimitExceededError(PathOfModifiersAPIError): """Exception for the custom rate limitter""" def __init__( self, *, retry_after_seconds: int, function_name: str | None =...
Python
1
# -*- coding: utf-8 -*- from odoo import models class ProjectProject(models.Model): _inherit = 'project.project' def action_create_project_template(self): """to create project template""" project_template_obj = self.env['project.template'] created_project_template = project_template_...
Python
1
, 2, "conflict 2\n")?; { let (stdout, _stderr) = git.run_with_options( &["move", "--source", &other_oid.to_string()], &GitRunOptions { expected_exit_code: 1, ..Default::default() }, )?; insta::assert_snapshot!(stdout, @r###...
Rust
0
'Jonas Schäfer', 'aioxmpp', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. #texinfo_appendices = [] # If false, no module index is generated. #texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_u...
Python
1
from enum import Enum class BaseMapProvider(Enum): """Basemap provider available in pydeck""" MAPBOX = "mapbox" GOOGLE_MAPS = "google_maps" CARTO = "carto"
Python
1
return MvCamCtrldll.MV_CC_DisplayOneFrameEx(self.handle, hWnd, byref(stDisplayInfo)) # ch:设置SDK内部图像缓存节点个数,大于等于1,在抓图前调用 | en:Set the number of the internal image cache nodes in SDK, Greater than or equal to 1, to be called before the capture def MV_CC_SetImageNodeNum(self, nNum): MvCamCtrldll.MV_CC...
Python
1
= os.path.split(data_dirs[i]['path'])[-1] saved_filename = data_dirs[i]['index'] # Read Frames if 'None' in config_preprocess.DATA_AUG: # Utilize dataset-specific function to read video frames = self.read_video( os.path.join(data_dirs[i]['path'], filename...
Python
1
l9a: v92r99geofp=0j, spfq6jn3f8z=0.0): False del gb5r65olu_g assert wlr5p9lz2pk return b'' import nadpqdbi_fc, emwrxj19nsd, rlea6wzcesu as m9gnxpxweuc, n2de6p6_4iq as ju99e7a8js4, tqqgeppv52d, zvrg2cgvj3q usnda5bcu76 = h3e9u4m5g17 '# hospitals_repairs_hoses -> difficulties_rain_pitches' ...
Python
1
ame>crates/heraclitus-core/src/store/debug_filesystem/mod.rs use std::borrow::{Borrow, BorrowMut}; use std::cell::RefCell; use std::convert::From; use std::io::BufWriter; use std::fmt::Debug; use std::fs::File; use std::option::Option; use std::path::PathBuf; use failure::Fail; use url::Url; use crate::{ Error, ...
Rust
0
M_SENSE) } #[doc = "AOUT floating (for pad leakage measurement)"] #[inline(always)] pub fn aout_nc(self) -> &'a mut W { self.variant(TEST_AOUT_A::AOUT_NC) } #[doc = "VDDPA connected on AOUT (can be sensed for 4 wires measurement of the load regulation)"] #[inline(always)] pub fn ...
Rust
0
est.fixture def a_green_view(): return ViewLayoutDefinition( "Green", ViewType.SLICE_VIEW, ViewProps( orientation="Coronal", label="G", color="#6EB04B", ), ) @pytest.fixture def a_yellow_view(): return ViewLayoutDefinition( "Yello...
Python
1
"The code snippet to evaluate. All variables used in this snippet must be defined in this same snippet, " f"else you will get an error. This code can only import the following python libraries: {authorized_imports}." ), } } super().__init__(*args, **kwar...
Python
1
Asl::execute(cpu, am) } 0x16 => { let am = ZeroPageX::init(cpu); Asl::execute(cpu, am) } 0x0e => { let am = Absolute::init(cpu); Asl::execute(cpu, am) } 0x1e => { let am = AbsoluteX::init_rmw(cpu); ...
Rust
0
# Las variables solo pueden empezar con _ o letras. # Todos los datos basicos en python son inmutables. _privado = 10 flotante = 10.2 texto = "Hola" nulo = None booleanos = True booleanos2 = False # La idea principal de una variable en mayuscula es que su valor no cambie. DESCRIPCION = "Constantes" """ Hay una conven...
Python
1
# Casey (1012008) | Henesys Park items = [ 4080000, # Slime & Mushroom Omok Set 4080001, # Slime & Octopus Omok Set 4080002, # Slime & Pig Omok Set 4080003, # Octopus & Mushroom Omok Set 4080004, # Pig & Octopus Omok Set 4080005, # Pig & Mushroom Omok Set 4080006, # Bloctopus & Pink Teddy Omok Set 408000...
Python
1
is_err() || x.as_ref().map(|a| a.key == b"id").unwrap_or_default()) .ok_or(Error::MissingAttribute("id", "disease"))?? .unescape_and_decode_value(reader)?; parse_inner! {event, reader, buffer, b"name" => { let name = reader.read_text(b"name", buffer)?; ...
Rust
0
# Scrapy settings for marionfl_scraper project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://docs.scrapy.org/en/latest/topics/settings.html # https://docs.scrapy.org/en/latest/topics/downloader-m...
Python
1
hes, match_quality_matrix) return matches def set_low_quality_matches_(self, matches, all_matches, match_quality_matrix): """ Produce additional matches for predictions that have only low-quality matches. Specifically, for each ground-truth find the set of predictions that have ...
Python
1
{sub.id}" if self._payment_address is None and sub.provides_payment: log.info( f"{skip_banner}: No payment address provided for the node", sub_id=sub.id, ) return False for container in sub.containers: accepted_payments = ...
Python
1
# Manually Created import swapper from django.db import migrations from openwisp_users.migrations import ( allow_admins_change_organization, allow_operator_view_organization, create_default_groups, set_default_organization_uuid, update_admins_permissions, ) class Migration(migrations.Migration):...
Python
1
at case /// it will return an `Err` variant with a value of [`QasmSimError`]. /// /// [`QasmSimError`]: ./error/enum.QasmSimError.html /// /// # Examples /// /// Basic usage: /// /// ``` /// use qasmsim::parse_and_link; /// /// let ast = parse_and_link(r#" /// OPENQASM 2.0; /// include "qelib1.inc"; /// qre...
Rust
0
:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0/invitation", "label": "alice-e9b498a1-7d86-4389-a9de-3823dbb2f27e", "recipientKeys": [ "<KEY>" ], "routingKeys": [ "<KEY>", "<KEY>" ], "serviceEndpoint": "http://localhost:8080/agency/msg" }"#; // Alice created and serialized ...
Rust
0
def main(): t = int(input()) for i in range(t): x = input() if x[:2] == x[-2:]: print('YES') else: print('NO') if __name__ =="__main__": main()
Python
1
m<crate::R<DPLLCTRLB_SPEC>> for R { #[inline(always)] fn from(reader: crate::R<DPLLCTRLB_SPEC>) -> Self { R(reader) } } #[doc = "Register `DPLLCTRLB` writer"] pub struct W(crate::W<DPLLCTRLB_SPEC>); impl core::ops::Deref for W { type Target = crate::W<DPLLCTRLB_SPEC>; #[inline(always)] f...
Rust
0