text
string
label_name
string
labels
int64
uration. Raises: ValueError: If `force_recomputation` is `True` and called outside a a recompute context. """ if training is None: training = tf_keras.backend.learning_phase() def dropped_inputs(): """Randomly drops elements of `inputs` when `training=True`.""" recomput...
Python
1
column in 1..4 { let start_row = column * 16; k0.append(&mut key[start_row..start_row + 4].to_vec()); k1.append(&mut key[start_row + 4..start_row + 8].to_vec()); k2.append(&mut key[start_row + 8..start_row + 12].to_vec()); k3.append(&mut key[start_row + 12..st...
Rust
0
s.to_owned())) }) } } <filename>src/logger.rs //! Logger that prints messages like `[WARN] Lorem ipsum`. use atty; use log::{self, Log, Level, Metadata, Record}; use std::io::Write; use termcolor::{Color, ColorChoice, ColorSpec, StandardStream, WriteColor}; struct Logger { level: Level, use_color:...
Rust
0
n-down", "protocol": "admin-down", "description": "" }, "HundredGigE0/2/0/11": { "status": "admin-down", "protocol": "admin-down", "description": "" }, "HundredGigE0/2/0/12": { "status": "up", "protocol": "up", "description": "To P/0.14.0.0" }, "Hu...
Python
1
} #[test] fn test_extended_niels_point_identity() { assert_eq!( ExtendedNielsPoint::identity().v_plus_u, ExtendedPoint::identity().to_niels().v_plus_u ); assert_eq!( ExtendedNielsPoint::identity().v_minus_u, ExtendedPoint::identity().to_niels().v_minus_u ); assert_e...
Rust
0
ow['Date'], 'outcome': outcome, 'bet_amount': bet_amount, 'odds': odds, 'model_prob': model_p, 'market_prob': market_p, 'edge': ...
Python
1
_x = max_x.max(ary[2]); min_y = min_y.min(ary[0]); max_y = max_y.max(ary[0]); } } (min_x, max_x, min_y, max_y) }; //println!("{:?}", (min_x, max_x, min_y, max_y)); let width = (max_x - min_x) + 5; let height = max_y+1; let shift = min_x - ...
Rust
0
angid; #[test] fn localization_format_value() { let res_mgr = ResourceManager::new("./tests/resources/{locale}/{res_id}".into()); let loc = Localization::with_env( vec!["test.ftl".into()], true, vec!["en-US".parse().unwrap(), "pl".parse().unwrap()], res_mgr, ); let mut ...
Rust
0
, 8, 6)]) batch_data_samples = get_packed_inputs( batch_size=2, with_heatmap=False)['data_samples'] _, pred_heatmaps = head.predict( feats, batch_data_samples, test_cfg=dict(output_heatmaps=True)) self.assertTrue(len(pred_heatmaps), 2) self.assertIsInstance(pred_...
Python
1
except Exception as e: st.error(f"❌ Failed to generate answer: {e}") st.markdown("---") except Exception as e: st.warning(f"❌ Could not analyze article: {e}") # Manual Forecast Tab elif menu == "📈 Forecast Stock": st.s...
Python
1
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from .models import User class UserAdmin(BaseUserAdmin): list_filter = ("role", "restaurant") def get_queryset(self, request): qs = super().get_queryset(request) if request.user.role == "owner": ...
Python
1
. impl ops::Sub for LogIndex { type Output=u64; fn sub(self, rhs: LogIndex) -> u64 { self.0.checked_sub(rhs.0).expect("underflow while subtracting LogIndex") } } impl fmt::Display for LogIndex { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::Display::fmt(&self.0, f) } } ...
Rust
0
{ info.picture_coding_label = descriptor_set .get_ul(&G_GENERICPICTUREESSENCEDESCRIPTOR_PICTUREESSENCECODING_ITEM_KEY); } } else if file.datamodel().is_subclass_of( &descriptor_set.key, &G_GENERICSOUNDESSENCEDESCRIPTOR_SET_KEY, )...
Rust
0
(parts.method, url.parse().unwrap()); let req = req.body(Box::new(Body::from(body))); Ok(req) } } impl<C: HttpClient> Into<http::Request<Body>> for Request<C> { /// Converts a `surf::Request` to an `http::Request`. fn into(self) -> http::Request<Body> { self.req.unwrap() } } im...
Rust
0
i90l7nvyeno=0, qrq7scqp48n: ieqcda4l3uu=b'', ogk9opeodqt='', uraxiylo61i: vn__tq86n3k=0j, novbcldxc1r=False, avmdz7ckh77=0.0, kwj7h9dyak3: v2_punem26w=None): global x06h7ylvad5 from hl026rvirht import pnlvy7kwzqb, jdkl0rk1r3v return aetv9lobs8d '# alloys_kites_grasp -> compressors_recruit_audit' '#...
Python
1
import theano from pylearn2.utils import sharedX import numpy as np import time # Remove a simplifier that would thwart our attempts to control what goes in the graph canonizer = theano.tensor.opt.local_mul_canonizer found = False for idx, entry in enumerate(canonizer.external_simplifiers): if entry[0] == 'softmax...
Python
1
1931_2_DEGREE); let xyz_d50 = cat_d65_to_d50 * xyz; let xyz_ref_d50 = cat_d65_to_d50 * xyz_ref; let dE = delta_E( xyz_to_lab(xyz_d50, illuminant::xy::D50), xyz_to_lab(xyz_ref_d50, illuminant::xy::D50), ); dE_mean += dE; dE_min = dE_min.min(dE); ...
Rust
0
import requests import simplejson import os from time import sleep from datetime import datetime, timedelta from dateutil.tz import tzlocal API_URL = "http://127.0.0.1:8000/api/v1/job/" scheduled_start = datetime.isoformat(datetime.now(tzlocal()) + timedelta(0, 10)) parent_job = { "name": "test_job", "command...
Python
1
import os from library.connecter.ansible.yaml import Yaml_Base class Data_DB(Yaml_Base): def router(self, content, name, yaml_tpye='main', file_type='tasks', preserve=True, together=False, describe=''): ''' 检测yaml数据的语法是否正确,如果含有include或/和roles,将把这些存储在后端数据库中 :参数 ...
Python
1
{"IS_PUNCT": True, "OP": "?"}, {"TEXT": {"REGEX": r"S\.\s?[A-Z]\.?\s?[A-Z]?\.?"}}, {"IS_PUNCT": True, "OP": "?"}, ] ], ) doc = nlp("My company is called LARGO AND MARMG S.L.") matches = matcher(doc) assert doc[matches[0][1] : matches[0][2]].text ...
Python
1
rrrrUrSrcentered_annotation centered_bodyrPr~r}s rG_gensetParser._gensetu ,' F|NN$DDF ' 5!4&) '--}/B/BC!!%3E9-1} 1W: Q #E "/!4!47J7Q7Q!QTX!XE  #Q E r`c...
Python
1
ings']}"}, # ] images = [Image.open(imagePath) for imagePath in images_path] batcher_input = BatcherInput() batcher_input._add_text_prompt('user', question) batcher_input._add_images(image = images) return batcher_input def get_correct_answer(self, sample): ...
Python
1
-> Result<(), String> { let fd = unsafe { libc::socket(libc::AF_INET, sock_type | flag, 0) }; assert!(fd >= 0); let addr = libc::sockaddr_in { sin_family: libc::AF_INET as u16, sin_port: 0u16.to_be(), sin_addr: libc::in_addr { s_addr: libc::INADDR_ANY.to_be(), }...
Rust
0
trftime('%Y-%m-%d %H:%M:%S')}\n" report += f"{'=' * 80}\n\n" report += f"Total Stocks Scored: {len(scores_df)}\n" report += f"Score Range: {scores_df['composite_score'].min():.4f} to {scores_df['composite_score'].max():.4f}\n" report += f"Mean Score: {scores_df['composite_score'...
Python
1
a web-friendly logger of some kind. println!("total_dlists: {}", dlist_interp.total_dlists()); println!("total_instructions: {}", dlist_interp.total_instructions()); println!("unmapped_calls: {:?}", dlist_interp.unmapped_calls()); println!("max_depth: {}", dlist_interp.max_depth()); ...
Rust
0
: idx, active: false }).collect(); group.throughput(Throughput::Elements(*size as u64)); group.bench_with_input(BenchmarkId::from_parameter(size), size, |b, &size| { b.iter(|| range_vec.iter().for_each(|idx| { black_box(idx); })); }); } group.finish(); } fn bench_u32_option_...
Rust
0
from teca import * import numpy as np import sys set_stack_trace_on_error() def start_sec(s): sys.stderr.write('checking '+s+'...\n') def end_sec(s): sys.stderr.write('checking '+s+'...ok\n\n') start_sec('construction') md = teca_metadata() end_sec('construction') start_sec('empty') sys.stderr.write('%s\n'...
Python
1
s not broken or stopped. while let Some(data) = notification_stream.next().await { println!( "Received data from {:?} [{:?}]: {:?}", local_name, data.uuid, data.value ...
Rust
0
-ignorables", ), "h|\ a@618,0|\ h@1179,0|\ a@1797,0|\ h@2358,0|\ a@2976,0|\ h@3537,0|\ a@4155,0" ); } #[test] fn morx_33_003() { assert_eq!( shape( "tests/fonts/text-rendering-tests/TestMORXThirtythree.ttf", ...
Rust
0
intOutputFormat) -> None: """Collect the results of zero-shot cross-dataset generalization experiments.""" # 'ms' vs. 'ss' for resolution in ["360", "720", "1080", "max"]: # '480', '2160', print(f"At resolution {resolution}") collect_results_at_res(ZERO_SHOT_DATASETS, resolution, scale, ou...
Python
1
; pub use super::ADC1R::AD1MC3; pub use super::ADC1R::AD1MC4; pub use super::ADC1R::AD1MPER; pub use super::ADC1R::AD1TAC2; pub use super::ADC1R::AD1TAC3; pub use super::ADC1R::AD1TAC4; pub use super::ADC1R::AD1TAPER; pub use super::ADC1R::AD1TARST; pub use super::ADC1R::AD1TBC2; ...
Rust
0
e) @staticmethod def deserialize(path: str) -> HostSettings: """Deserialize host settings from the path.""" with open_binary_file(path) as settings_file: return pickle.load(settings_file) def apply_defaults(self) -> None: """Apply defaults to the host settings.""" ...
Python
1
of translation completion. pub percentage: Option<u32>, /// The language locale. pub locale: String, } <gh_stars>1-10 // Copyright (c) The Starcoin Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::cli_state::CliState; use crate::StarcoinOpt; use anyhow::Result; use scmd::{CommandAction,...
Rust
0
assert request.account_name == "test_account" assert request.video_info.video_path == video_file assert request.publish_date is None def test_batch_upload_request(self, temp_dir: Path): """测试批量上传请求""" # 创建测试视频文件 video_files = [] for i in range(3): ...
Python
1
this cookie to [`xcb_glx_get_booleanv_reply`] to retrieve the reply. /// /// [`xcb_glx_get_booleanv_reply`]: XcbGlx::xcb_glx_get_booleanv_reply #[derive(Copy, Clone, Debug)] #[repr(C)] pub struct xcb_glx_get_booleanv_cookie_t { /// The sequence number of the request. pub sequence: c_uint, } impl Default for x...
Rust
0
nd((_("hero"), ":", hero)) query = re.sub(h_regex, "", query) ref_regex = r"ref:(?P<reference>\w+)" if matches := re.finditer(ref_regex, query): for re_match in matches: reference = re_match.group("reference") filters &= Q(cards__reference=refere...
Python
1
from .parse_brokers_binary_to_string import parse_brokers_binary_to_string __all__ = ["parse_brokers_binary_to_string"]
Python
1
"""The synology_chat component."""
Python
1
/// `386+` /// /// `16/32-bit` Jcxz_rel8_32, /// `JECXZ rel8` /// /// `a32 o16 E3 cb` /// /// `386+` /// /// `16/32/64-bit` Jecxz_rel8_16, /// `JECXZ rel8` /// /// `a32 o32 E3 cb` /// /// `386+` /// /// `16/32-bit` Jecxz_rel8_32, /// `JECXZ rel8` /// /// `a32 E3 cb` /// /// `X64` /// /// `64-b...
Rust
0
) in map.into_iter(){ fragments.sort(); btree.insert(ch, fragments); } btree }; /// the reverse of shape to character lookup pub static ref FRAGMENTS_UNICODE: BTreeMap<&'static Vec<Fragment>, char> = UNICODE_FRAGMENTS.iter() .fold(BTreeMap::new(),...
Rust
0
from .common import InfoExtractor from ..compat import ( compat_str, compat_urllib_parse_urlencode, ) from ..utils import ( clean_html, int_or_none, parse_duration, parse_iso8601, qualities, update_url_query, ) class UOLIE(InfoExtractor): IE_NAME = 'uol.com.br' _VALID_URL = r'h...
Python
1
Ok(-1000), btoi(b"-1000")); //! ``` //! //! All functions are [generic](https://docs.rs/num-traits/) over integer //! types. Use the turbofish syntax if a type cannot be inferred from the //! context. //! //! ``` //! # use btoi::btoi; //! // overflows the selected target type //! assert!(btoi::<u32>(b"9876543210").is_e...
Rust
0
_uu (numpy.ndarray): hessian of cost with respecto to input, shape(input_size, input_size) l_ux (numpy.ndarray): hessian of cost with respect to state and input, shape(input_size, state_size) V_x (numpy.ndarray): gradient of Value function, shape(s...
Python
1
) parser.add_argument( "--bucket_no_upscale", action="store_true", help="make bucket for each image without upscaling / 画像を拡大せずbucketを作成します", ) parser.add_argument( "--mixed_precision", type=str, default="no", choices=["no", "fp16", "bf16"], ...
Python
1
const HFUNC_WITHDRAW: ScHname = ScHname(0x9dcc0f41); pub const HVIEW_DONATION: ScHname = ScHname(0xbdb245ba); pub const HVIEW_DONATION_INFO: ScHname = ScHname(0xc8f7c726); // @formatter:on //! Contains all game card definitions. pub mod core; pub mod test; /// Enumeration of all known sets of cards. pub e...
Rust
0
assert_eq!(expect, stack_frame); let line = "\tat com.example.MainFragment.onClick(SourceFile:1)"; let stack_frame = parse_frame(line); assert_eq!(expect, stack_frame); } #[test] fn print_stack_frame() { let frame = StackFrame { class: "com.example.MainF...
Rust
0
let tokens: Vec<Token> = Vec::new(); let _graphemes = UnicodeSegmentation::graphemes(&string[..], true).collect::<Vec<&str>>(); tokens } // #[cfg(test)] // mod tests { // use super::*; // #[test] // fn test_unicode_graphemes() { // let s = " Assets:Cash $100.25\n"; // let w = Un...
Rust
0
if _v is not None: self["b"] = _v _v = arg.pop("l", None) _v = l if l is not None else _v if _v is not None: self["l"] = _v _v = arg.pop("r", None) _v = r if r is not None else _v if _v is not None: self["r"] = _v _v = arg....
Python
1
get_last_error, get_process_handle, Win32Result}; use core::mem::{size_of, zeroed}; macro_rules! user32_fn { ( $(#[$fn_meta:meta])* fn $( $fn_tokens:tt )* ) => { #[link(name = "User32")] extern "system" { $(#[$fn_meta])* fn $( $fn_tokens )*; } }; ( $( $fn_tokens:tt )* ) => { ...
Rust
0
# Copyright (c) Meta Platforms, Inc. and affiliates. # This software may be used and distributed according to the terms of the Llama 2 Community License Agreement. from dataclasses import dataclass from torch.distributed.fsdp import ShardingStrategy from torch.distributed.fsdp.fully_sharded_data_parallel import State...
Python
1
lrpru/download_file_with_progress_bar/ // and from https://github.com/benkay86/async-applied // and adjusted to my needs async fn download_task( jingle: Jingle, multibar: Arc<MultiProgress>, to_dir: PathBuf, ) -> Result<String> { let url = Url::parse(jingle.url.as_str())?...
Rust
0
import random class RockPaperScissors: def __init__(self, rounds=3): self.rounds = rounds self.choices = ['rock', 'paper', 'scissors'] self.score = {'Player 1': 0, 'Player 2': 0} def get_winner(self, choice1, choice2): if choice1 == choice2: return 'Tie' ...
Python
1
desc = meta['twitter:description'].strip() if desc and desc != '\n': print(f" Description: {desc}") print() # วิเคราะห์ Live Data live_data = data.get('live_data', {}) print(f"{Colors.GREEN}📱 LIVE DATA EXTRACTED:{Colors.END}") ...
Python
1
= *rhs).into_heap() } #[no_mangle] pub unsafe extern "C" fn py_lt(lhs: *const Object, rhs: *const Object) -> *const Object { Object::Bool(*lhs < *rhs).into_heap() } #[no_mangle] pub unsafe extern "C" fn py_lte(lhs: *const Object, rhs: *const Object) -> *const Object { Object::Bool(*lhs <= *rhs).into_heap() } ...
Rust
0
"test_messages_proto3.proto", "unittest.proto", "unittest_import.proto", "unittest_import_public.proto", ]; static DATASET_PROTOS: &[&str] = &[ "google_message1/proto2/benchmark_message1_proto2.proto", "google_message1/proto3/benchmark_message1_proto3.proto", "google_message2/benchmark_message2...
Rust
0
(), "bobo".to_owned()); let mock_dist_server = MockDistServer { path: dist_tempdir.path().to_owned(), channels: vec![ create_mock_channel("nightly", "2016-02-01", None), channel_2, ], }; setup_from_dist_server( mock_dist_server, url, f...
Rust
0
2 => BlockType::Compressed, 3 => BlockType::Reserved, _ => exit_with_message("Invalid block type"), }; let block_size = block_header >> 3; println!("last block: {:?}", last_block); println!("block type: {:?}", block_type); println!("block size: {:?}", block_size); if (!...
Rust
0
""" Increase the brightness of a display. :param display: Name of the display (e.g., 'eDP-1') :param step: Step size to increase brightness (default: 10%) """ self.logger.debug(f"Increasing brightness by {step}%...") self.change_brightness(step) def decrease_brig...
Python
1
orange) = self.inner_decode_online_loadout(bits); if let Some(unknown1) = bits.read_bit(); if let Some(unknown2) = bits.read_bit(); then { Ok(Attribute::LoadoutsOnline(LoadoutsOnline { blue, orange, unknown1,...
Rust
0
c::set_hook(Box::new(console_error_panic_hook::hook)); use database::FakeDatabase; let format = FormatType::AppleMail; let config = Config::new(None, "", vec!["<EMAIL>".to_owned()], format).unwrap(); let app = PostsackApp::<database::FakeDatabase>::new(config, FakeDatabase::total_item_count()); e...
Rust
0
P_enum(bcx, blobptr, vdefs_tg, vdefs_var, enum_ty_substs, i) }; ret {vals: args, bcx: bcx}; } fn collect_record_fields(m: match, col: uint) -> ~[ast::ident] { let mut fields: ~[ast::ident] = ~[]; for vec::each(m) |br| { alt br.pats[col].node { ast::pat_rec(fs, _) { ...
Rust
0
; let gpiog = gpio::GPIOG::take().unwrap(); modify_reg!(rcc, rcc, AHB1ENR, GPIOGEN: Enabled); modify_reg!(gpio, gpiog, MODER, MODER13: Output, MODER14: Output); loop { write_reg!(gpio, gpiog, BSRR, BR13: Reset); write_reg!(gpio, gpiog, BSRR, BR14: Reset); cortex_m::asm:...
Rust
0
FrameKind::Map => d_parse_map(input, len)?, FrameKind::BlobString => d_parse_blobstring(input, len)?, _ => e!(RedisParseError::new_custom( "check_streaming", format!("Invalid frame type: {:?}", kind) )), }; (input, DecodedFrame::Complete(frame)) }; Ok((input, frame)) }...
Rust
0
from odoo import models, fields, api, Command class AccountPaymentRegister(models.TransientModel): _inherit = 'account.payment.register' l10n_latam_new_check_ids = fields.One2many('l10n_latam.payment.register.check', 'payment_register_id', string="New Checks") l10n_latam_move_check_ids = fields.Many2many...
Python
1
CS: OutputPin, DC: OutputPin, RST: OutputPin, { /// Create a new display config pub fn new(dc: DC, rst: RST) -> Self { ST7789VConfig { cs: None, dc, rst } } /// Create a new display config with chip select pin pub fn with_cs(cs: CS, dc: DC, rst: RST) -> Self { ST7789VCo...
Rust
0
let host_config = CandidateHostConfig { base_config: CandidateBaseConfig { network: "udp".to_owned(), address: "1.2.3.5".to_owned(), port: 12350, component: 1, ..Default::default() }, ..Default::default() }; let host_remot...
Rust
0
rwise use the placeholder placeholder_ed.set_flags(flags); let meta = self.get_endpoint_meta(&placeholder_ed_id); let new_tail = self.allocate_td(); // SAFE: Locked unsafe { let tp = kernel::memory::virt::get_phys( self.get_general_td_pointer(&new_tail) ) as u32; placeholder_ed.set_head_ptr( tp ...
Rust
0
Store V0 to VX inclusive in memory starting at idx. Leave idx itself unmodified. Carries X. DumpRegisters(u8), /// FX65 - Fill V0 to VX inclusive in memory starting from idx. Leave idx itself unmodified. Carries X. FillRegisters(u8), } impl Opcode { /// Produce a single Opcode from two adjacent u8...
Rust
0
for result_item in sep_res: tmp = re.match(r'<(\d+)>\.?(.*)', result_item).groups() if len(tmp) >= 2: line = f'{tmp[0]}' result_text = f'{tmp[1]}' ...
Python
1
return sentence return sentence[0].upper() + sentence[1:] def uncapitalize(sentence: str) -> str: """ Convert the first letter of the first word in the sentence from uppercase to lowercase, with some heuristics to avoid un-capitalizing certain words. The following kind of words will not be un-...
Python
1
string name of this element. pub name: Option<String>, /// Asset management information about this element. pub asset: Option<Box<Asset>>, /// The element that contains control data. pub element: ControlElement, /// Provides arbitrary additional information about this element. pub extra: Ve...
Rust
0
[`String#valid_encoding?`]: https://ruby-doc.org/core-3.0.0/String.html#method-i-valid_encoding-3F #[inline] #[must_use] pub fn is_valid_encoding(&self) -> bool { match self.encoding { Encoding::Utf8 => self.buf.is_utf8(), Encoding::Ascii => self.buf.is_ascii(), ...
Rust
0
rctl (int __option, ...);") arg = ffi.new("int *") C = ffi.dlopen(None) C.prctl(PR_GET_PDEATHSIG, arg) return arg[0] else: sig = ctypes.c_int() libc = ctypes.cdll.LoadLibrary("libc.so.6") libc.prctl(PR_GET_PDEATHSIG, ctypes.byre...
Python
1
from fastapi import APIRouter, Depends, HTTPException from sqlalchemy.orm import Session from app.database import get_db from app.models import AccountCreate, AccountResponse, AccountStats ,Account # Use Pydantic models from app import crud from app.utils import calculate_account_metrics, get_daily_balances router =...
Python
1
[..params_len])?; b.off() }; Ok(&mut out[..out_len]) } } #[cfg(test)] mod tests { use super::*; #[test] fn transport_params() { let tp = TransportParams { idle_timeout: 30, initial_max_data: 424645563, initial_max_bidi_streams:...
Rust
0
n pub fn create_transaction_with_amount<L: Ledger, R: RngCore + CryptoRng>( ledger: &mut L, tx_out: &TxOut, sender: &AccountKey, recipient: &PublicAddress, amount: u64, fee: u64, tombstone_block: BlockIndex, rng: &mut R, ) -> Tx { let mut transaction_builder = TransactionBuilder::new...
Rust
0
number_one = 500 number_two = 600 if number_one > number_two: print("The first number is greater than the second!") elif number_one == number_two: print("Numbers are equal!") else: print("The second number is greater than the first!") print("number_one is larger") if number_one > number_two else print("nu...
Python
1
f recibir_mensajes(self, cliente): while self.conectado: try: datos = cliente.recv(1024) if datos: mensaje = descifrar_mensaje(datos) self.mostrar_mensaje(f"Cliente: {mensaje}") except Exception: self...
Python
1
NT64_KHR = 2, VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR = 3, } } enumeration! { /// [VkLineRasterizationModeEXT](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkLineRasterizationModeEXT.html) VkLineRasterizationModeEXT { VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT = 0, VK...
Rust
0
""" Автомат обрабатывает натуральное число N по следующему алгоритму: 1. Строится двоичная запись числа N. 2. Запись «переворачивается», то есть читается справа налево. Если при этом появляются ведущие нули, они отбрасываются. 3. Полученное число переводится в десятичную запись и выводится на экран. Пример. Дан...
Python
1
let url = format!("repos/{}/{}/pulls/{}", owner, repo, pull_number); let response = self .inner .post(&url) // For the 'lock_reason' object .header(reqwest::header::ACCEPT, MEDIA_TYPE_LOCK_REASON_PREVIEW) // For the 'draft' parameter .heade...
Rust
0
.end_list(); ui.end(); match status { Status::Todo => { current_list = &mut todo_list; past_list = &mut done_list; }, Status::Done => { current_list = &mut done_list; past_list = &mut todo_li...
Rust
0
SPECIFIED.into(), server_cfg.client_port.unwrap_or(0), )) .await .with_context(|| "Cannot create HQ server socket".to_string())?; let server_port = client_listener.local_addr()?.port(); let hq_secret_key = Arc::new(generate_key()); let tako_secret_key = Arc::new(generate_key()); le...
Rust
0
c->r = 0; c->g = 0; c->b = 0; c->a = 0xFF; } for (short d = 0x190; d < 0x400; d++) { uchar4* c = &palette[d]; c->r = 0xFF - 0xFF * (d - 0x190) / (0x400 - 0x190); c->g = 0; c->b = 0xFF; c->a = 0xFF; } for (short d = 0x400; d < 0x600;...
Rust
0
fset2::init() ; // let mut s: Vec<u8> = vec![] ; // bla_plus_7.to_smt2(& mut s, offset).unwrap() ; // try_parse_term!( // term_parser, & factory, // & s, // Smt2Offset::No, // bla_plus_7 // ) ; // let nested = factory.app( // factory.sym("another function symbol"), vec...
Rust
0
import os import pytest import allure import dotenv from faker import Faker from test_UI_khalimulindd_pw.pages.create_account_page import CreateAccount as CA # Создаем объект Faker fake = Faker() # Используем dotenv dotenv.load_dotenv() @allure.feature('Create account') @allure.story('Create new customer account') ...
Python
1
// cannot be zero everywhere. XoroShiro128 { s0: 0x193a6754a8a7d469, s1: 0x97830e05113ba7bb, } } pub fn from_seed_u64(seed: u64) -> XoroShiro128 { let mut rng = SplitMix64::from_seed_u64(seed); XoroShiro128::from_rng(&mut rng).unwrap() } ...
Rust
0
default_initial_settings = { "name": "Longer LK4", "manufacturer": "Longer", "start_gcode": "; LONGER Start G-code\nG21 ; metric values\nG90 ; absolute positioning\nM82 ; set extruder to absolute mode\nM107 ; start with the fan off\nG92 E0 ; Reset Extruder\nG28 ; Home all axes\nG1 Z2.0 F3000 ; Move Z Axis u...
Python
1
resource gathered from the remote device as structured data. returned: when I(state) is C(gathered) type: list sample: > This output will always be in the same format as the module argspec. parsed: description: The device native config provided in I(running_config) option parsed into structured data as ...
Python
1
texture_index: 10 + z + 1, ..Default::default() }, true, ); } commands.entity(map_entity).insert_bundle(MapBundle { map, transform: Transform::from_xyz(0.0, 0.0, z as f32 + 1.0), ..Default::de...
Rust
0
# pd_op.squeeze: (-1x64x96xf32) <- (-1x64x1x96xf32, 1xi64) squeeze_9 = paddle._C_ops.squeeze(add_22, full_int_array_4) del add_22, full_int_array_4 # pd_op.transpose: (-1x96x64xf32) <- (-1x64x96xf32) transpose_5 = paddle._C_ops.transpose(squeeze_9, [0, 2, 1]) del squeeze_9 ...
Python
1
# Copyright (c) OpenMMLab. All rights reserved. import time import unittest from unittest import TestCase import torch from mmengine.logging import MessageHub from mmengine.registry import init_default_scope from parameterized import parameterized from mmdet.registry import MODELS from mmdet.testing import demo_track...
Python
1
_null() } { let _ = unsafe { Box::from_raw(self.contents.result) }; } } else { if unsafe { !(self.contents.err as *mut ()).is_null() } { let _ = unsafe { Box::from_raw(self.contents.err) }; } } } } impl From<crate::c_types::CResultTempl<crate::lightning::routing::router::Route, crate::lightning::l...
Rust
0
lname____firstlineno____doc__rrrrE__repr__rRrXr^rfpropertyr contextlibcontextmanagerr;rrrrerdrr.rrr0rr*rrr6rur rrrrrrrr(rr=r@rFrVrNrTrZr]rorrrtrrrrrr...
Python
1
def test_single_file_legacy_scheduler_loading(self): with tempfile.TemporaryDirectory() as tmpdir: ckpt_filename = self.ckpt_path.split('/')[-1] local_ckpt_path = download_single_file_checkpoint(self.repo_id, ckpt_filename, tmpdir) local_original_config = download_original_config...
Python
1
Input + Clone + Default + FixedOutput + Update + Reset, { /// The actual AuthRequest data pub(crate) data: Vec<u8>, /// Type consumption _protocol_name: ProtocolName<Handshake, KexAlgo, Cipher, DigestType>, } impl<Handshake, KexAlgo, Cipher, DigestType> From<Vec<u8>> for AuthRequestOutput<Handshak...
Rust
0
# Run with vgmstream-cli and DATA2.DAT in the same folder # Use the command 'python3 extarctAudio_LinuxVer.py' to run it and wait for it to finish # Will create a folder for each character and extract the files to them from pathlib import Path import subprocess SoundPointer = 1 BINPointer = 1 lastNamePosition = 0; ...
Python
1
"toplevel": true, "unused": true }"###; run_exec_test(src, config, false); } #[test] fn terser_drop_unused_drop_toplevel_funcs() { let src = r###"var a, b = 1, c = g; function f(d) { return function () { c = 2; }; } a = 2; function g() {} function h() {} console.log((b = 3));"#...
Rust
0
format_err!("not derived from the base UUID")) } else { Ok(first) } } } impl From<&fidl::Uuid> for Uuid { fn from(src: &fidl::Uuid) -> Uuid { Uuid::from_bytes(src.value) } } impl From<fidl::Uuid> for Uuid { fn from(src: fidl::Uuid) -> Uuid { Uuid::from(&src)...
Rust
0
"""distutils The main package for the Python Module Distribution Utilities. Normally used from a setup script as from distutils.core import setup setup (...) """ import sys __version__ = sys.version[:sys.version.index(' ')] local = True
Python
1