text
string
label_name
string
labels
int64
kernel=(7, 7), stride=(2, 2), pad=(3, 3), no_bias=True, name="conv0", workspace=workspace) body = mx.sym.BatchNorm(data=body, fix_gamma=False, ...
Python
1
let mut neibors = Vec::with_capacity(8); let mut visit_node_count = 1; while self.open.len() != 0 || !best_next.is_none() { let cur_node_idx = match best_next { None => { // 取最小的f的节点index出来 let cur_node = self.open...
Rust
0
face_t, lookup_index: ::std::os::raw::c_uint, glyph: hb_codepoint_t, start_offset: ::std::os::raw::c_uint, alternate_count: *mut ::std::os::raw::c_uint, alternate_glyphs: *mut hb_codepoint_t, ) -> ::std::os::raw::c_uint; } extern "C" { pub fn hb_ot_layout_lookup_would_sub...
Rust
0
key, text_value = normalized key = section.lower() if key.startswith("eligibility.inclusion"): inclusion.append(text_value) elif key.startswith("eligibility.exclusion"): exclusion.append(text_value) if not inclusion and not exclusion: return None return...
Python
1
eName::AlternatingSitUp, 1 => SitUpExerciseName::WeightedAlternatingSitUp, 2 => SitUpExerciseName::BentKneeVUp, 3 => SitUpExerciseName::WeightedBentKneeVUp, 4 => SitUpExerciseName::ButterflySitUp, 5 => SitUpExerciseName::WeightedButterflySi...
Rust
0
or the field to clear # # # Enter the new test email # last_email_input.send_keys(settings_email) # time.sleep(1) # Wait for the validation to appear # # # Verify the validation text # try: # act_dashboard_text = self.d...
Python
1
ontinue without clipping the ray. return 1.0; }, point1, point2, ); base.g_debug_draw.borrow_mut().draw_segment( point1, point2, B2color::new(0.8, 0.8, 0.8), ); for i in result_list { let p: B2vec2 = i.0; let n: B2vec2 = i.1; base.g_debug_draw ...
Rust
0
convert the three functions in this file to functions over that ctx. // When called, decay is positive and at most 11456. fn laplace_get_freq1(fs0 :c_uint, decay :c_int) -> c_uint { let ft = 32768 - LAPLACE_MINP * (2 * LAPLACE_NMIN) - fs0; ft * ((16384 - decay) as u32) >> 15 } #[no_mangle] /// Encode a value that ...
Rust
0
(0), winit, property_generation: Cell::new(0), created: Cell::new(false), destroyed: Cell::new(false), mapped: Cell::new(false), always_on_top: Cell::new(false), maximized_vert: Cell::new(false), maximized_horz: Cell::new(fa...
Rust
0
u16 ); rw_field!( [2](16..=23), capability_parameter, "Capability Parameter", u8 ); rw_field!([3](16..=18), command_sub_type, "Command Sub Type", u8); rw_field!([3](19..=23), endpoint_id, "Endpoint ID", u8); rw_field!([3](24..=31), slot_id, "Slot ID", u8); } impl_...
Rust
0
equired features: `\"Win32_Security_Cryptography\"`*"] pub const szOID_ENROLL_EK_CA_KEYID: &str = "1.3.6.1.4.1.311.21.43"; #[doc = "*Required features: `\"Win32_Security_Cryptography\"`*"] pub const szOID_ENROLL_EK_INFO: &str = "1.3.6.1.4.1.311.21.23"; #[doc = "*Required features: `\"Win32_Security_Cryptography\"`*"] p...
Rust
0
print('How old are you?') #This is to accept user input string and convert the string into an integer age = int(input()) if (age < 18): print ('You are a minor') elif ( age >= 18 and age <= 64): print('You are an adult') else: print('You are a senior ')
Python
1
## TY2 TYR 3-AMINO-L-TYROSINE 'TY3':'TYR', ## TY3 TYR 3-HYDROXY-L-TYROSINE 'TYB':'TYR', ## TYB TYR TYROSINAL 'TYC':'TYR', ## TYC TYR L-TYROSINAMIDE 'TYI':'TYR', ## TYI TYR 3,5-DIIODOTYROSINE 'TYN':'TYR', ## TY...
Python
1
, exec: &str, args: &[OsString]) { let html = format!("{}/cov/html/index.html", path); if !fs::metadata(&html).is_ok() { debug!("no report found, running tests"); run_tests(path, exec, args); } Command::new("open") .arg(html) .output() .expect("failed to open cove...
Rust
0
called. Let try this with current ``PassContext``: cur_pass_ctx = tvm.transform.PassContext.current() cur_pass_ctx.override_instruments( [ PassFine("PassFine_0"), PassBadRunBefore("PassBadRunBefore"), PassFine("PassFine_1"), ] ) ##########################################################...
Python
1
r: self.r * rhs.r, g: self.g * rhs.g, b: self.b * rhs.b, } } } #[cfg(test)] pub mod test_colors { use super::*; #[test] fn test_add() { assert_eq!(BLACK + WHITE, WHITE); } #[test] fn test_add_assign() { let mut color = BLACK; color +...
Rust
0
"""Tests for missing-yield-doc and missing-yield-type-doc for Numpy style docstrings with accept-no-yields-doc = no""" # pylint: disable=missing-function-docstring, unused-argument, function-redefined # pylint: disable=invalid-name, undefined-variable def my_func(self): """This is a docstring. Yields ---...
Python
1
as u8) } #[doc = "Bits 8:9"] #[inline(always)] pub fn sensitive_core_0_pif_pms_constrain_world_1_apb_adc( &self, ) -> SENSITIVE_CORE_0_PIF_PMS_CONSTRAIN_WORLD_1_APB_ADC_R { SENSITIVE_CORE_0_PIF_PMS_CONSTRAIN_WORLD_1_APB_ADC_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "B...
Rust
0
tmpval = "88888" val = RadioSettingValueString(5, 5, tmpval) val.set_charset(DTMF_CHARS_KILL) rs = RadioSetting("dtmf_revive_code", "唤醒码 (5字符 0-9 ABCD)", val) dtmf.append(rs) val = RadioSettingValueString(0, 80, ...
Python
1
x02V\xea\xcf\xee\xcf\xae\xa8?\xbb\x22*\xf6\xde\x11;\ \x88\xd2\x91.=\x84b\x0aI\x80$\x04RI\xf2\xfa\ {\xfb\xb6\xde6\xbf?f\xce}g'\xbb/\xa1\x9b\ \xc07\x9f\xcd\xdb\xbdw\xee\xcc\xdc\x99Sf\xce\x9c9\ 3\xf7N<0\xefn\xacY\xb3\x1a\x95J\x05\xa5R\ \x09\x17|\xf6+8\xff\xbcw\x82@\xe5\x0b\xf1\x12\xcc\ \xd0\x81\xc62\x9f\x8f\xfc`\xe4\xf9l\...
Python
1
e"], "availability": row["availability"], "phone_num": row["phone_num"], "status": row["status"] } return user_info except Exception as e: logger.error(f"오류: {e}") # 디버깅용 로그 raise HTTPException(status_code=500, detail=str(e)) @app.get("/delete_...
Python
1
sort_by(|a, b| b.partial_cmp(a).unwrap()); res.push(if fracs[0].0 > 0.5 && fracs[0].0 > 2.0 * fracs[1].0 { Self::MONOS[fracs[0].1] } else if 4.0 * (fracs[0].0 + fracs[1].0) > 3.0 { two(Self::MONOS[fracs[0].1], Self::MONOS[fracs[1].1]) } else if fracs[...
Rust
0
NextSignatureThreshold::<T>::put(PendingSignatureThreshold::<T>::get()); NextKeygenThreshold::<T>::put(PendingKeygenThreshold::<T>::get()); // Compute next ID for next authorities let next_id = Self::next_authority_set_id(); // We continue to rotate the next authority set in case of failure of the previous /...
Rust
0
import textwrap from prettytable import PrettyTable from ..config import get_config, save_config_value, refresh_config_warnings from .. import constants from ..log import log_to_client from ..payload import daemon_command def _eligible_config_keys_for_setting(): config = get_config() return [key for key in...
Python
1
#[must_use] pub fn from_u16(n: u16) -> Self { match n { 0 => Self::OpenSystem, 1 => Self::SharedKey, 2 => Self::FastBSSTransition, 3 => Self::SAE, 4 => Self::FILSSharedKeyWithoutPFS, 5 => Self::FILSSharedKeyWithPFS, 6 => S...
Rust
0
_MAJOR = "0" _MINOR = "1" # On main and in a nightly release the patch should be one ahead of the last # released build. _PATCH = "0" # This is mainly for nightly builds which have the suffix ".dev$DATE". See # https://semver.org/#is-v123-a-semantic-version for the semantics. _SUFFIX = "" VERSION_SHORT = f"{_MAJOR}.{_...
Python
1
nfo.tpu, transactions_socket, ) } fn send_tx_and_retry_get_balance( leader: &NodeInfo, alice: &Mint, bob_pubkey: &Pubkey, transfer_amount: u64, expected: Option<u64>, ) -> Option<u64> { let mut client = mk_client(leader); trace!("getting leader last_id"); let last_id = clien...
Rust
0
"home/blog", &Home {}, ) } #[get("/assets/{theme}/{file:.*}")] async fn assets(params: web::Path<(String, String)>) -> Result<impl Responder> { let file = Path::new(VIEWS_ROOT) .join(&params.0) .join("assets") .join(&params.1); let file = NamedFile::open(&file)?; Ok(file...
Rust
0
import playground import stormpy from stormpy import pycarl import stormpy.examples import stormpy.examples.files import stormpy._config as config def example_parametric_models_01(): # Check support for parameters if not config.storm_with_pars: print("Support parameters is missing. Try building sto...
Python
1
s not matched") # =================================== Ewaybill Through IRN ============================================= json_value = self.env["account.edi.format"]._l10n_in_edi_irn_ewaybill_generate_json(self.invoice) expected = { "Irn": None, "Distance": 20, ...
Python
1
) result_total[cav_id][i]=result_stat if i%100==0: print(f"cav:{cav_id}, interval:{i}") #print("11",time.time()) if (i % opt.save_vis_interval == 0) and (pred_box_tensor is not None or gt_box_tensor is not None): ...
Python
1
::*; use std::sync::Arc; mod error; pub use error::*; mod config; pub use config::*; pub mod internal; pub use internal::rayon::init_once_rayon_thread_pool; pub(crate) use internal::rayon::rayon_exec; pub mod entry; pub mod actor; pub mod ipc; pub mod test; // compile-flags: --edition 2018 #![feature(try_blocks...
Rust
0
"""Simple streaming example.""" import os from shannon import ShannonClient, EventType # Initialize client client = ShannonClient( grpc_endpoint="localhost:50052", api_key=os.getenv("SHANNON_API_KEY", ""), ) # Submit a task print("Submitting task...") handle = client.submit_task( "Research recent develop...
Python
1
} <filename>src/bounds.rs use core::marker::PhantomData; use typenum::consts::True; use typenum::{IsGreater, IsGreaterOrEqual, IsLessOrEqual, Unsigned}; /// A type whose behaviors enforce that its `val` member fall with in /// the range prescribed by `L` (a lower bound) and `U` (an upper /// bound). #[derive(Clone, ...
Rust
0
Some(next_value) } } fn get_lexographically_next_bit_sequence(bits: i32) -> StanfordBitIterator { StanfordBitIterator { bits } } fn flushes() -> (HashMap<i32, i32>, [i32; 10], Vec<i32>) { let mut flush_lookup = HashMap::new(); let straight_flushes = [ 7936, // int('0b1111100000000', 2...
Rust
0
hidden)] pub trait Waits: Default { fn from_val(v: u32) -> Self; fn into_val(self) -> u32; } impl Waits for () { fn from_val(_: u32) -> () { () } fn into_val(self) -> u32 { 0 } } /// Trait that provides common methods for syscall objects pub trait Object { const CLASS: u16; fn class() -> u16; // TODO: Make this...
Rust
0
''' Created on May 23, 2018 @author: venkateshwara.d ''' from selenium import webdriver import time import os # --- best example program for driver.close() and driver.quit() class SwitchToNewTab(): def test1(self): baseUrl = "https://letskodeit.teachable.com/pages/practice" chrome_driver_path =...
Python
1
.is_zero() { FALLBACK_RATIO } else { Decimal::from_ratio(supply.bonded, supply.issued) }, }; Ok(res) } #[cfg(test)] mod tests { use super::*; use std::str::FromStr; use cosmwasm_std::testing::{ mock_dependencies, mock_env, mock_info, MockQuerier, MOC...
Rust
0
escriptor is deprecated, please use the stream_description in `__init__ or `from_exception`. If many stream_descriptors are defined, the one from `as_sanitized_airbyte_message` will be discarded. """ error_message = self.as_airbyte_message(stream_descriptor=stream_descriptor) if error_...
Python
1
ogits else self.head(x) def forward(self, x): x = self.forward_features(x) x = self.forward_head(x) return x def _create_convit(variant, pretrained=False, **kwargs): if kwargs.get('features_only', None): raise RuntimeError('features_only not implemented for Vision Transformer ...
Python
1
lv in compts: obj._val.append( self._decode_comp_val(obj, obj._cont, tlv) ) #--------------------------------------------------------------------------# # OPEN TYPE #--------------------------------------------------------------------------# # TODO: decode unknown OPEN TYPE according to...
Python
1
from Crypto.Util import number #implement trivial RSA n_length = 1024 #generate the primes p1 = number.getPrime(n_length) print(p1) p2 = number.getPrime(n_length) print(p2) #modulus n = p1 * p2 print("n="+str(n)) #euler function phi = (p1-1)*(p2-1) #public parameter # e = 65537 # few bytes to 1 in the binary repr...
Python
1
!("vendor/uri.rb"); static URI_COMMON_RUBY_SOURCE: &[u8] = include_bytes!("vendor/uri/common.rb"); static URI_FILE_RUBY_SOURCE: &[u8] = include_bytes!("vendor/uri/file.rb"); static URI_FTP_RUBY_SOURCE: &[u8] = include_bytes!("vendor/uri/ftp.rb"); static URI_GENERIC_RUBY_SOURCE: &[u8] = include_bytes!("vendor/uri/generi...
Rust
0
户流量使用情况 分别为: 上传流量, 下载流量, 总流量 单位为 B """ upload = download = 0 sql = f'select download,upload from users where username="{username}"' for node in node_list: with DBApi(self.node_db_dict[node]) as db: db.cur.execute(sql) # 执行sql语句 ...
Python
1
); error!("{}", message); return Ok(Box::new(reply::with_status( message, StatusCode::INTERNAL_SERVER_ERROR, ))); } }; let mut url = Url::parse("https://img.shields.io").unwrap(); url.set_path(&format!("/badge/homo-{}%20registered-...
Rust
0
j = j.flip((0,)) if inverse_y: dirs = torch.stack([(i - K[0][2]) / K[0][0], (j - K[1][2]) / K[1][1], torch.ones_like(i)], -1) else: dirs = torch.stack([(i - K[0][2]) / K[0][0], -(j - K[1][2]) / K[1][1], -torch.ones_like(i)], -1) # # Rotate ray directions from camera frame to the world ...
Python
1
_void)>, ) -> ::std::os::raw::c_int; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sqlite3_rtree_query_info { pub pContext: *mut ::std::os::raw::c_void, pub nParam: ::std::os::raw::c_int, pub aParam: *mut sqlite3_rtree_dbl, pub pUser: *mut ::std::os::raw::c_void, pub xDelUser: ::std::opt...
Rust
0
#!/usr/bin/env python import sys, getopt, time import numpy as np from keras.layers import Dense, Activation, GRU, TimeDistributed from keras.models import Sequential, load_model from keras.optimizers import RMSprop #import theano #theano.config.openmp = True def rb_read_data(fn): d, n_col = [], 0 with open(fn, 'r...
Python
1
Self(T::lexer(s)) } } impl<'a, T, S> Iterator for Lexer<T, S> where T: Copy + Clone + PartialEq<T>, T: ::logos::Logos + ::logos::source::WithSource<S>, S: ::logos::source::Source<'a>, { type Item = T; fn next(&mut self) -> Option<Self::Item> { if self.0.token == T::END { r...
Rust
0
nding box SubDiagonal { /// The coordinates of the upper right vertex top_right: GeoPoint, /// The coordinates of the lower left vertex bottom_left: GeoPoint, }, /// Well-Known Text (WKT). WellKnownText { /// e.g. `BBOX (-74.1, -71.12, 40.73, 40.01)` wkt:...
Rust
0
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @File : logistic_regression.py # @Data : 2020/5/21 # @Author : Luo Kun # @Contact: luokun485@gmail.com import numpy as np from matplotlib import pyplot as plt class LogisticRegression: """ Logistic regression classifier(逻辑斯蒂回归分类器) """ def __init__...
Python
1
extern "C" fn opj_tcd_init( mut p_tcd: *mut opj_tcd_t, mut p_image: *mut opj_image_t, mut p_cp: *mut opj_cp_t, mut p_tp: *mut opj_thread_pool_t, ) -> OPJ_BOOL { (*p_tcd).image = p_image; (*p_tcd).cp = p_cp; (*(*p_tcd).tcd_image).tiles = opj_calloc( 1 as libc::c_int as size_t, ::std::mem::size_of:...
Rust
0
k] = I::from_usize(k); // this node is visited parents.set_root(k); l_nz[k] = I::zero(); for (inner_ind, _) in vec.iter_perm(perm.inv()) { let mut i = inner_ind; if i < k { while flag_workspace[i].index() != k { parents.uproot(i, k); ...
Rust
0
########################################################################## # # Copyright (c) 2010-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redis...
Python
1
_f64, 3.0_f64])), last_trajectory: Arc::new(Mutex::new(Vec::new())), }, DummyFull { name: vec![String::from("part2"), String::from("low")], pos: Arc::new(Mutex::new(vec![2.2_f64, 4.0_f64])), last_trajectory: Arc::new(Mutex::new(Vec:...
Rust
0
api_version = "7.1.3"
Python
1
import asyncio from playwright.sync_api import sync_playwright from steel import Steel import random from playwright.async_api import async_playwright def get_random_steel_key(file_path="list_key.txt"): with open(file_path, "r") as f: keys = [line.strip() for line in f if line.strip()] if not keys: ...
Python
1
que_kernels.len() as f64); } } println!("Total unique square count: {:?}", unique_square_count); println!("Total iterations: {:?}", total_iterations); println!("Time spent making squares: {:?}", now.elapsed()); } fn backtrack_kernels(dimension_tuples: &Vec<DimensionTuple>) -> Vec<Recipe> { ...
Rust
0
fo_font, fill="white" ) return main_img def generate_item_card( self, skin: Image.Image, rarity: str, name: str, wear: Union[str, None] ): image = Image.new("RGBA", (500, 500), "#D4D2D5") image = self.generate_item_card_band( image, self.rarity_color[rarity]...
Python
1
&[Integer], modulus: &Integer) -> Vec<Integer> { let mut ret = vec![Integer::new(); 1 << bases.len()]; // base case: 0 and 1 ret[0].assign(1); ret[1].assign(&bases[0]); // compute powerset of bases // for each element in bases for (bnum, base) in bases.iter().enumerate().skip(1) { ...
Rust
0
ries) @pytest.mark.parametrize( "idx, box_in_series", [ ([0, 1, 2, pd.NA], False), pytest.param([0, 1, 2, pd.NA], True, marks=pytest.mark.xfail), (pd.array([0, 1, 2, pd.NA], dtype="Int64"), False), (pd.array([0, 1, 2, pd.NA], dtype="Int64"), False), ...
Python
1
import frappe from frappe.query_builder import DocType def execute(): invoice_types = ["Sales Invoice", "Purchase Invoice"] for invoice_type in invoice_types: invoice = DocType(invoice_type) invoice_details = frappe.qb.from_(invoice).select(invoice.conversion_rate, invoice.name) update_payment_schedule(invoic...
Python
1
) } // serch nearest discretized area fn nearest_search(base: & Vec<f64>, target: f64) -> f64 { let mut l = 0; let mut r = (*base).len(); while l < r { let mid = ((l + r) as i32) / 2; if (*base)[mid as usize] == target {return target;} else if (*base)[mid as usize] > target { ...
Rust
0
from theme.theme import get_font, get_theme from utils.ansi_render import AnsiRender from rich.console import Console from app.app_base import AppBase class Terminal(AppBase): def __init__(self, screen_name: str, width=280, height=240): super().__init__(screen_name) # Load resources self....
Python
1
# -*- coding: utf-8 -*- # """*********************************************************************************************""" # FileName [ upstream/audio_albert/hubconf.py ] # Synopsis [ the audio albert torch hubconf ] # Author [ S3PRL ] # Copyright [ Copyleft(c), Speech Lab, NTU, Taiwan ] """...
Python
1
# Copyright (c) 2024 Microsoft Corporation. # Licensed under the MIT License """Tests for the GraphRAG LLM module.""" # Register MOCK providers from graphrag.config.enums import ModelType from graphrag.language_model.factory import ModelFactory from tests.mock_provider import MockChatLLM, MockEmbeddingLLM ModelFact...
Python
1
(|i, j| compare(i.1, j.1)); let mut ordering = sorted_box_to_ordering(sort_data); let swap_trace = build_swap_trace(&mut ordering); for i in swap_trace.iter() { self.swap_rows(i.0, i.1); } } /// Sort the entire two-dimensional array by comparing elements on a spec...
Rust
0
onnection1", "Angular velocities estimation is not available") msgs.append(msg) msg = "[{}]: Failure: {}".format("FCU connection2", "Angular velocities estimation is not available") msgs.append(msg) # myModel._add_client(StatedCopterData(copter_id=1000, checked=0, selfcheck=msgs, time_utc=1)) # myM...
Python
1
d_accounts::<T>(&vec![creator.clone(), member.clone()])?; fund_accounts::<T>(&accounts)?; let org_id = <Pallet::<T> as ControlBenchmarkingTrait<T::AccountId, T::Hash>>::create_org(creator.clone()).unwrap(); Pallet::<T>::fill_org_with_members(&org_id, &accounts)?; }: _(RawOrigin::Signed(creator), org_id, member.c...
Rust
0
print(f"Iteration Errors:") print(f" V: L2 = {iter_errors['V_L2']:.2e}, L∞ = {iter_errors['V_Linf']:.2e}") print(f" n: L2 = {iter_errors['n_L2']:.2e}, L∞ = {iter_errors['n_Linf']:.2e}") print(f" p: L2 = {iter_errors['p_L2']:.2e}, L∞ = {iter_errors['p_Linf']:.2e}") print(...
Python
1
)) } } impl Ord for $n { fn cmp(&self, other: &Self) -> core::cmp::Ordering { self.address .cmp(&other.address) .then(self.network_length.cmp(&other.network_length)) } } impl FromStr for $n { type Err = NetworkParseError; fn from_str(s: &str) -> Result<$n, NetworkParseError> { ...
Rust
0
// and clear it self.filters.rotate_right(1); self.filters[0].clear(); } // set in the future and current self.filters[0].set(key); self.filters[1].set(key); } member } pub fn check(&self, key: &[u8...
Rust
0
_ptr() as *mut c_void, flag, &mut handle) }; ft_result(handle, status) } impl Ftdi { /// Open the first device on the system. /// /// This is equivalent to calling [`with_index`] with an index of `0`. /// /// This function cannot be used to open a specific device. /// Ordering of devices on...
Rust
0
# Configuration file for the Sphinx documentation builder. # # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Project information -- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information pr...
Python
1
expected_output = { "interface": { "VFIPE1-VPLS-A": { "signaling_protocol": { "LDP": { "mtu": {"remote": "1500", "local": "1500"}, "group_id": {"remote": "0", "local": "0"}, "peer_id": "10.2.2.2:0", "...
Python
1
) => { let sp = try_get_span_from(fsp, p.span.as_ref()); match self.names.entry(p.name) { Entry::Vacant(e) => {e.insert(Entity::Op(Operator::Proc(p.clone(), ProcTC::Unchecked)));} Entry::Occupied(mut e) => match e.get() { Entity::Op(Operator::Proc(p1, _)) => { ...
Rust
0
tion::<Default>::start(&server_setup, client_registration_start_result.message, b"<EMAIL>")?; //! # let client_registration_finish_result = client_registration_start_result.state.finish(&mut client_rng, server_registration_start_result.message, ClientRegistrationFinishParameters::new(Some(Identifiers::ClientAndServerId...
Rust
0
from CPU import CPU8086 from Compiler import Lexer from Compiler import Parser cpu = CPU8086() lexer = Lexer("./Compiler/test.asm") parser = Parser(lexer.tokens) [print(x) for x in parser.instructions] cpu.Decoder.MOV("[0x00]", "ax") cpu.MEMORY.displayMemory() for ins in parser.instructions: print(ins.opcode,...
Python
1
lient.delete_messages( conv.chat_id, [msg_start.id, r.id, msg.id, details.id, video.id, text.id] ) await xx.delete() @ayiin_cmd(pattern="tw(?: |$)(.*)") async def _(event): xxnx = event.pattern_match.group(1) if xxnx: d_link = xxnx elif event.is_reply: d_link = ...
Python
1
plots/model_fit/' exists before running the function, or modify the path as needed. - RMSE provides a measure of the average magnitude of the prediction errors, with lower values indicating better model performance. - The bar plot differentiates RMSE for training and testing datasets for each ETF, a...
Python
1
::try_from) .collect::<Result<_, Self::Error>>()?, failed: error.is_some(), timestamp: NaiveDateTime::from_timestamp( (timestamp / 1_000_000) as i64, ((timestamp % 1_000_000) * 1000) as u32, ) .to_string(), state...
Rust
0
def extract_layers(model): list_layers = [] for n, _ in model.named_modules(): list_layers.append(n) return list_layers
Python
1
renderView1.CameraPosition = [6.0, 3.509006977081299, 10000.0] renderView1.CameraFocalPoint = [6.0, 3.509006977081299, 0.0] renderView1.CameraParallelScale = 6.950764703628316 # save screenshot SaveScreenshot(pngFile, renderView1, ImageResolution=[2847, 1171]) #### saving camera placements for all active views # cur...
Python
1
_headers))) => { Headers::from_raw(raw_headers).map_err(|e| From::from(e)) }, Ok(httparse::Status::Partial) => Err(Error::PartialHeaders), Err(err) => Err(From::from(err)), }? }; // Check for a nested multipart let ...
Rust
0
); } Ok(frame) } pub fn invokevirtual(env: &mut InstructionEnvironment) -> RuntimeResult<()> { invoke_instance_method(env, false) } pub fn invokeinterface(env: &mut InstructionEnvironment) -> RuntimeResult<()> { invoke_instance_method(env, true) } pub fn invokespecial(env: &mut InstructionEnvironment...
Rust
0
ified = (cache if local_cache is None else local_cache).get(self.notified_key(listing)) # not notified before, or saved information is of old type if notified is None: return NotificationStatus.NOT_NOTIFIED if isinstance(notified, str): # old style cache noti...
Python
1
Vec<Category>>> { let mut request = self.v1(Method::GET, &["games", game_id, "categories"]); if let Some(q) = embeds.to_query() { request.query_param("embed", q.as_str()); } let data: Option<Data<Vec<Category>>> = request .execute() .await? ...
Rust
0
count += steps labels_unpacked[level] = tf.reshape( tf.gather(labels, indices), [feat_size, feat_size, -1]) return labels_unpacked def label_anchors(self, gt_boxes, gt_labels): """Labels anchors with ground truth inputs. Args: gt_boxes: A float tensor with shape [N, 4] representing...
Python
1
', '𒄗', '࡞', '🔏', '🫃', '𘮗', '𑘏', '𑜻', '⦅', 'ߏ', '🫖', '⸾', 'ꏇ', 'ᇱ', 'ꇣ', '🫄', '𛅶', 'ࡤ', 'մ', '𝖈', '𔖤', '𛁋', '𐂏', '𑗉', '𖢇', 'ቪ', 'य', '᎑', '⮕', '・', 'Ბ', 'Ό', 'ᾐ', '𑛀', '𐅇', 'ք', '𐐥', 'ɜ', 'ﮅ', 'い', '⍆', 'Ꞓ', 'λ', 'ᣛ', '𝡩', 'Ⴟ', '\u{1cda}', '🨀', '\u{e01eb}', 'ⷃ', 'ﲎ', 'ꀳ', '𝛣', '...
Rust
0
# Bokeh libraries from bokeh.io import output_file from bokeh.models import CDSView, ColumnDataSource, GroupFilter from bokeh.plotting import figure, show # Output to file output_file( "west-top-2-standings-race.html", title="Western Conference Top 2 Teams Wins Race", ) # Create a ColumnDataSource west_cds = ...
Python
1
_regexes, include_source_locations=args.include_source_locations, exclude_source_locations=args.exclude_source_locations, auto_add_new_buckets=args.auto_add_new_buckets, retention_period=args.retention_period_days, identity_type=args.identity, description=args...
Python
1
import random # generowanie liczb pseudolosowych print(random.randint(1, 100)) # int od 1 do 100 print(random.randrange(1, 100)) # int od 1 do 99 print(random.randrange(6)) # int 0 do 5 print(random.random()) # 0.9823664990591615 float od 0 do 0.999999 print(random.random() * 10) # 1.719426704063598 float od 0 d...
Python
1
random.random((32, 3)), ) x = np.array([[0.0, 0.1, 0.3]]) ds = tf_data.Dataset.from_tensor_slices(x).batch(1).map(layer) for output in ds.take(1): output.numpy() def test_serialization(self): layer = layers.Discretization(num_bins=5) # Serialization befo...
Python
1
"""Tests for the storage helper with minimal mocking.""" import asyncio from datetime import timedelta import os from unittest.mock import patch import py from homeassistant.helpers import storage from homeassistant.util import dt as dt_util from tests.common import async_fire_time_changed, async_test_home_assistant...
Python
1
short(index), metadata, reserved1, reserved2)) return metadata # --------------------------------------------------------------------- # 5.1 PCO_GetErrorText # --------------------------------------------------------------------- sc2_cam.PCO_GetErrorText.argtypes = [ctypes...
Python
1
from flask import Blueprint diary = Blueprint('diary', __name__, url_prefix='/diary') from diary import routes # import po utworzeniu blueprintu
Python
1
implem = ffi_dispatch!(WAYLAND_CLIENT_HANDLE, wl_proxy_get_listener, ptr); let rust_managed = implem == &RUST_MANAGED as *const _ as *const _; if rust_managed { let data = ffi_dispatch!(WAYLAND_CLIENT_HANDLE, wl_proxy_get_user_data, ptr) as *mut UserData; WpView...
Rust
0
user can interact with the button. If this is ``True``, the button is grayed-out and can't be clicked. If the first ``st.form_submit_button`` in the form is disabled, the form will override submission behavior with ``enter_to_submit=False``. use_container_...
Python
1
""" URL configuration for JointProject project. The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/5.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name=...
Python
1
import flask from flask import request, jsonify import openai from openai import OpenAI import json import pandas as pd from tqdm import tqdm import sys sys.path.append('../') import config from flask_cors import CORS app = flask.Flask(__name__) CORS(app) client = OpenAI(api_key=config.APIKEY) system_prompt = "ple...
Python
1