text
string
label_name
string
labels
int64
", "").strip() if current_heading is not None else "(no heading)", line=start_of_section, content="\n".join(current_section), ), ) return chunks class VueChunker(BaseChunker): """Chunks Vue Single ...
Python
1
provider: Provider<Http>, ) -> eyre::Result<Option<WalletType>> { if self.wallet.ledger { let derivation = HDPath::LedgerLive(self.wallet.mnemonic_index as usize); let ledger = Ledger::new(derivation, chain_id.as_u64()).await?; Ok(Some(WalletType::Ledger(SignerMiddleware...
Rust
0
import sys from paraview.simple import * dataFile = None tempDir = None for i, arg in enumerate(sys.argv): if arg == "-D" and i+1 < len(sys.argv): dataFile = sys.argv[i+1] + '/Testing/Data/can.ex2' elif arg == "-T" and i+1 < len(sys.argv): tempDir = sys.argv[i+1] if dataFile == None: print...
Python
1
ash, Dot, LetterSpace], 'S' => vec![Dot, Dot, Dot, LetterSpace], 'T' => vec![Dash, LetterSpace], 'U' => vec![Dot, Dot, Dash, LetterSpace], 'V' => vec![Dot, Dot, Dot, Dash, LetterSpace], 'W' => vec![Dot, Dash, Dash, LetterSpace], 'X' => vec![Dash, Dot, Dot, Dash, Let...
Rust
0
rs the /// Python object reference in PyO3's object storage. The reference count for the Python /// object will not be decreased until the GIL lifetime ends. /// /// You should prefer using [`as_ref`](#method.as_ref) if you can as it'll have less overhead. /// /// # Examples /// /// [`Py...
Rust
0
with optional downsampling of the internal dimension for queries, keys, and values. Args: embedding_dim (int): Dimensionality of input embeddings. num_heads (int): Number of attention heads. downsample_rate (int): Factor by which internal dimensions are downsampled....
Python
1
arser() config.read(filename) if section not in config.sections(): config.add_section(section) config.set(section, key, str(value)) try: with open(filename, "w") as cfgfile: config.write(cfgfile) except OSError as ex: raise exceptions.QiskitUserConfigError( ...
Python
1
tInitSystemSystemdRwFull(InitSystemSystemdBase): config = InitSystemSystemdBase.config + \ """ BR2_SYSTEM_DHCP="eth0" BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY=y BR2_PACKAGE_SYSTEMD_BACKLIGHT=y BR2_PACKAGE_SYSTEMD_BINFMT=y BR2_PACKAGE_SYSTEMD_COREDUMP=y BR2_PACKAGE_...
Python
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Embedding模型配置测试脚本 本脚本用于测试不同embedding模型的配置和功能: 1. 测试模型配置验证 2. 测试API接口 3. 测试模型切换 4. 性能基准测试 """ import os import sys import time import asyncio import aiohttp from pathlib import Path from typing import Dict, List, Any # 添加项目根目录到Python路径 project_root = Path(__file__).p...
Python
1
from timemachines.skatertools.ensembling.precisionweightedskater import normalize, weighted_average import math import numpy as np # Not written ... jus scrap for now def port_skater(y, s, k, a, t, e, r=0.5): """ Special purpose skater since 'y' here takes a rather particular form, and it is intended to ...
Python
1
import numpy as np #type: ignore import predicate as pd import propozitii as exp def main(): # Universuri U1 = list(range(-10, 11)) U2 = list(range(-100, 101)) U3 = np.arange(-10.0, 10.1, 0.1) print("a) ∀x∈U1 ∃y∈U2 : x² = y") rezultat = exp.a(None, None, U1, U2) if rezultat: print(...
Python
1
s.get('server') status = res.get('status') res_ip = ip #if int(status) in Alive_Status: try: Other_Url.objects.creat...
Python
1
numbers_string = input().split() inverted_string = [] for index in numbers_string: num = int(index) inverted_string.append(-num) print(inverted_string)
Python
1
class Grid: """Represents the simulation grid for sorting particles. Attributes: domain_size (float): The size of the domain (in each direction). num_cells (int): The number of cells along each axis of the grid. cell_size (float): The size of each cell in the grid. grid (list of...
Python
1
-> Bounds<u32> { let x1 = self.x; let x2 = self.x + self.w - 1; let y1 = self.y; let y2 = self.y + self.h - 1; Bounds::new(x1, y1, x2, y2) } fn contains(&self, x: u32, y: u32) -> bool { let Bounds(a, b) = self.bounds(); x >= a.x && x <= b.x && y >= a.y &...
Rust
0
else false_series.loc[i] for i, c in condition.items()], index=condition.index ) @handle_sheet_function_errors @filter_nans @convert_args_to_series_type('bool', 'skip', ('default', True)) def OR(*argv: pd.Series) -> pd.Series: """ { "function": "OR", "description": "Returns True if...
Python
1
{ segment = String::new(); } else { segment.push(ch); } if i == pos { break; } } if !segment.is_empty() { p...
Rust
0
""" Entry point for running the MCP RMM server as a standalone process. This allows the server to be started with `python -m mcp_rmm.server` or imported as a module. """ from auth_mcp_server import mcp def run(): """Run the MCP server.""" mcp.run(transport="sse") if __name__ == "__main__": run()
Python
1
import pytest import aioblescan as aiobs from aioblescan.plugins.atcmithermometer import * @pytest.mark.parametrize( "data, mac, temp, humidity, battery, battery_volts, counter, rssi", [ ( b"\x04>\x1d\x02\x01\x00\x008R@8\xc1\xa4\x11\x10\x16\x1a\x18\xa4\xc18@R8\x00\xf3%U\x0b\x9f\xde\xdb", ...
Python
1
from openpyxl import load_workbook from pathlib import Path from .models import Story import datetime def Data_Creation() : # Path to the excel file static_dir_api = Path(__file__).resolve().parent excel_file_path = static_dir_api / 'static/Dans_Le_Temps_notebook.xlsx' # Load the excel file workbo...
Python
1
ll() # serializer_class = EmployeeSerializer # class employeeDetailView(generics.RetrieveUpdateDestroyAPIView): # queryset = Employee.objects.all() # serializer_class=EmployeeSerializer # lookup_field ='pk' #viewSet # class EmployeeViewSet(viewsets.ViewSet): # def list(self,req): # querys...
Python
1
WARNING: This function is deprecated. Use read instead. // extern "C" fn read_response( // resource_handler: *mut _cef_resource_handler_t, // data_out: *mut ::std::os::raw::c_void, // bytes_to_read: ::std::os::raw::c_int, // bytes_read: *mut ::std::os::raw::c_int, // callbac...
Rust
0
(mention.starts_with("<:") || mention.starts_with("<a:")) && mention.ends_with('>') { let mut name = String::default(); let mut id = String::default(); let animated = &mention[1..3] == "a:"; let start = if animated { 3 } else { 2 }; for (i, x) in mention[start..].chars().enume...
Rust
0
node in ast.walk(tree): if isinstance(node, ast.FunctionDef) and node.name == func_name: return True return False def _try_match(content, prefix, entrypoint): # All markdown code blocks, as well as raw code_blocks = [m[1] for m in re.findall(r"(\`{3}.*?\n+)([\s...
Python
1
_files: bool, } /// Keeps the global configuration #[derive(Debug)] pub struct Configuration { variables: ConfigurationVariables, modified: bool, } impl Default for ConfigurationVariables { fn default() -> Self { let dirs = UserDirs::new().expect("Failed to determine default user directories"); ...
Rust
0
{ Key, KeyValueSeparator, ObjectValue, ArrayValue, ParseOpen, FirstValue, } /// I'm not smart enough to figure out the behavior of handling escape sequences when /// when scanning multi-bytes, so this fallback is for when I was to reset and /// process bytewise. It is much slower, but escaped ...
Rust
0
# coding = utf-8 """Blob represents caffe::Blob""" from __future__ import absolute_import import ctypes from .base import LIB from .base import check_call, ctypes2numpy_shared class Blob(object): """Blob in caffe, users shouldn't create object through this class. Always gets a reference from Net object ""...
Python
1
<Tensor>>, ) -> TractResult<TVec<Arc<Tensor>>> { let input = args_1!(inputs); let op = op.downcast_ref::<Delay>().ok_or("Wrong Op type")?; let buffered = op.delay + op.overlap; let input_pulse = input.shape()[op.axis]; let output_pulse = input_pulse + op.overlap; let ...
Rust
0
false => None, }?; let mut new_face = Face::debug_new(wires, polygon); if !face.orientation() { new_face.invert(); } shell0.push(new_face); } Some(shell0) } /// polyline, not always connected #[derive(Debug, Default, Clone)] struct Polyline { posi...
Rust
0
'%Y-%m-%d %H:%M:%S', time.localtime(curr_time)) json_data = json.dumps( {'time': formatted_time, 'user_speaking': user_speaking} ) yield f"data:{json_data}\n\n" time.sleep(userstate_graph_update_...
Python
1
from .fullboard import FullBoard from .composer import Composer
Python
1
= "Divide-by-6"] #[inline(always)] pub fn divcore_5(self) -> &'a mut W { self.variant(DIVCORE_A::DIVCORE_5) } #[doc = "Divide-by-7"] #[inline(always)] pub fn divcore_6(self) -> &'a mut W { self.variant(DIVCORE_A::DIVCORE_6) } #[doc = "Divide-by-8"] #[inline(always)] pub fn divcore_7(self) ->...
Rust
0
stake_pool_info = get_account( &mut context.banks_client, &stake_pool_accounts.stake_pool.pubkey(), ) .await; let stake_pool = try_from_slice_unchecked::<StakePool>(&stake_pool_info.data).unwrap(); assert_eq!(expected_carats, stake_pool.total_carats); } #[tokio::test] async fn merge_in...
Rust
0
num_stages': dq_best_config.num_stages, } tuning_result = { 'kernel_name' : 'bwd_kernel_dq', 'inputs' : inputs, 'tuned_kernel' : tuned_kernel, 'compiler_options' : compiler_options, ...
Python
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jun 8 22:38:04 2018 @author: liuchuang 检查确保它正确匹配栈顶部开始符号的类型。 如果两个符号不匹配,则字符串不匹配。 如果整个字符串都被处理完并且没有什么留在栈中, 则字符串匹配。 """ from pythonds.basic.stack import Stack def parChecker(symbolString): s=Stack() balanced = True index = 0 while i...
Python
1
root, tezedge_count, tezedge_mean_time, tezedge_max_time, tezedge_total_time, irmin_mean_time, irmin_max_time, irmin_total_time, tezedge_mem_time, tezedge_add_time, tezedge_add_tree_time, tezedge_find...
Rust
0
ipeline.DATASET_PRESETS[args.dataset]['total_steps']) # Prepare the learning-rate and pre-fetch it to device to avoid delays. lr_fn = hyper.create_learning_rate_schedule(total_steps, args.base_lr, args.decay_type, args.warm...
Python
1
om .airavata import AiravataOperator av = AiravataOperator(AuthContext.get_access_token()) grps = av.get_available_groups() grp_names = [str(x.groupResourceProfileName) for x in grps] if group is not None: assert group in grp_names, f"Group {group} was not found. Available groups: {repr(grp_names)}" gro...
Python
1
""" Test the "snabb loadtest transient" subcommand. Needs NIC names. Since there are only two NIC names available in snabb-bot, and we need to execute two programs networked to each other ("run" and "loadtest"), they are set to on-a-stick mode, so that they use one NIC each instead of two. """ import unittest from t...
Python
1
) #iswap.append(0) #if S[0, 0] < 0.: #S[:, 0] *= -1 #if abs(S[1, 1]) < np.abs(S[1, 0]).max(): #iswap.append(1) #if abs(S[0, 0]) < np.abs(S[1, 0]): #iswap.append(2) #if iswap: #i1, i2 = iswap #print(f'swap; {iswap}') #m1, m2 = mass[iswap] #...
Python
1
, slot); Some(BothReg { arch: dst_reg, phys: slot, }) } else { None } }, Some, ) } pub fn predicted_addr(&self, tag: Tag) -> (Option<AbsPc>...
Rust
0
ms to be higher, especially during the rush hours. It might reveal that # our 95% percentile estimator underestimates the demand peaks. This could be be # quantitatively confirmed by computing empirical coverage numbers as done in # the :ref:`calibration of confidence intervals <calibration-section>`. # # Looking...
Python
1
nt_rewards = rewards[:, burn_in_step:-1].unsqueeze(-1) prev_rewards = rewards[:, burn_in_step - 1 : -2].unsqueeze(-1) target_prev_rewards = agent_rewards burnin_dones = dones[:, 1:burn_in_step].unsqueeze(-1) burnin_target_dones = dones[:, 1 : burn_in_step + 1].unsqueeze(-1) agent_dones = dones[:, bu...
Python
1
ine(always)] pub const fn ptr() -> *const p0_ns::RegisterBlock { 0x418c_0500 as *const _ } } impl Deref for P0_NS { type Target = p0_ns::RegisterBlock; fn deref(&self) -> &Self::Target { unsafe { &*P0_NS::ptr() } } } #[doc = "GPIO Port 0"] pub mod p0_ns; #[doc = "GPIO Port 1"] pub st...
Rust
0
brier-score result df2_mean = pd.DataFrame(np.mean(FINAL2, axis=2), index = row_header, columns=col_header2) df2_std = pd.DataFrame(np.std(FINAL2, axis=2), index = row_header, columns=col_header2) df2_mean.to_csv(in_path + '/result_BRIER_FINAL_MEAN.csv') df2_std.to_csv(in_path + '/result_BRIER_FINAL_STD.csv') ### P...
Python
1
b == b' ').unwrap(); sum += unsafe { art.get_unchecked(space_pos + 1..) } .parse::<usize>() .unwrap(); } } write!(res, "({} : {})", cat, sum).unwrap(); } for cat in list_cat { let cat = cat.chars().next().unwrap(); ...
Rust
0
āng"), ('匪', "fěi,fēi,fēn"), ('匫', "hū"), ('匬', "yǔ"), ('匭', "guǐ"), ('匮', "kuì"), ('匯', "huì"), ('匰', "dān"), ('匱', "guì,kuì"), ('匲', "lián"), ('匳', "lián"), ('匴', "suǎn"), ('匵', "dú"), ('匶', "jiù"), ('匷', "jué"), ('匸', "xì"), ('匹', "pǐ"), ('区', "qū,ō...
Rust
0
impl ::std::default::Default for Struct_mpv_event_end_file { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } pub type mpv_event_end_file = Struct_mpv_event_end_file; #[repr(C)] #[derive(Copy)] pub struct Struct_mpv_event_script_input_dispatch { pub arg0: ::std::os::raw::c_int, pub _t...
Rust
0
make sure we look okay at default sizes when beside a textbox, // we make sure we will have at least the same height as the default textbox. let min_height = env.get(theme::BORDERED_WIDGET_HEIGHT); let min_width = 100.0; let baseline = self.label.baseline_offset(); ctx.set_basel...
Rust
0
 rgc Cst}|rzt|\}}||Wn$tjyL}zd}|dtvrt|\}}|rj|ddkr|||jtdnFt |d\}}|dur|g|dd<|t |g|jt dnh|ddkr|jtdnHt |d\}}|dur|g|dd<|t |g|jt dWYd}~n d...
Python
1
seg.change_status(|status| { *status = status.add_delay(cur_nanos, delay_nanos, duration) }); }) } /// Set the duration of this animation pub fn duration(self, duration: impl Into<Duration>) -> Self { self.change_animation_state(|seg| seg.duration = duration.int...
Rust
0
O: Write functional test for STOU command. #[derive(Debug)] pub struct Stou; #[async_trait] impl<Storager, User> CommandHandler<Storager, User> for Stou where User: UserDetail + 'static, Storager: StorageBackend<User> + 'static, Storager::Metadata: Metadata, { #[tracing_attributes::instrument] asyn...
Rust
0
from string import punctuation from typing import Iterable import pandas as pd from woodwork.column_schema import ColumnSchema from woodwork.logical_types import IntegerNullable, NaturalLanguage from featuretools.primitives.base import TransformPrimitive from featuretools.primitives.standard.transform.natural_languag...
Python
1
t enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_AWG: enPicoStringValue = 71; pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_AWG_START_DELTA_PHASE: enPicoStringValue = 72; pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_AWG_STOP_DELTA_PHASE: enPicoStringValue = 73; pub const enPicoStringValue_PICO_SV_SIGNAL_GENE...
Rust
0
me(satisfied_by) => { entries_result = query_direct_index_with_foreign_key( &satisfied_by, SATISFACTION_SATISFIES_LINK_TYPE, SATISFACTION_SATISFIES_LINK_TAG, ); }, _ => (), }; match &params.input_of { Some(input_of) => { entries_result ...
Rust
0
], 'skips_r2l', 'skips_r2l_word') for k,v in datasets.items(): v.apply_field(lambda x:list(map(len,x)), 'skips_l2r_word', 'lexicon_count') v.apply_field(lambda x: list(map(lambda y: list(map(lambda z:word_vocab.to_index(z),y)),x)), ...
Python
1
class Solution: def countPyramids(self, grid: List[List[int]]) -> int: # dp[i][j] := max height of the pyramid for which it is the apex def count(dp: List[List[int]]) -> int: ans = 0 for i in range(len(dp) - 2, -1, -1): for j in range(1, len(dp[0]) - 1): if dp[i][j] == 1: ...
Python
1
VkPipeline}; use vulkan::nv::{VkIndirectCommandsLayout,RawVkIndirectCommandsLayout}; use vulkan::nv::{VkIndirectCommandsStream,RawVkIndirectCommandsStream}; use vulkan::vk::{VkBuffer,RawVkBuffer}; /// Wrapper for [VkGeneratedCommandsInfoNV](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkGenera...
Rust
0
(f, "Extra following data at index {}", pos), ReferenceError::InvalidCharacterReference => f.write_str("Invalid character reference"), ReferenceError::MissingAmpersand => f.write_str("Missing ampersand"), ReferenceError::MissingCharacterCode => f.write_str("Missing character code"), ...
Rust
0
und_id"] ) # We should get a raw score of 10.125 . In banker's rounding (default) this will be rounded to 10.12, # in half-up rounding this should be 10.13. assert result == approx(10.13), "The calculated score did not round the expected way" def test_with_no_sub_criteria_scores(mocker, mock_get_score...
Python
1
, 0x3b, 0xd6 ] ), ( "tb1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3q0sl5k7", vec![ 0x00, 0x20, 0x18, 0x63, 0x14, 0x3c, 0x14, 0xc5, 0x16, 0x68, 0x04, 0xbd, 0x19, 0x20, 0x33, 0x56, 0xda, 0x13, 0x6c, 0x...
Rust
0
display_pdf(uploaded_file) except Exception as e: st.error(f"An error occurred: {e}") st.stop() col1, col2 = st.columns([6, 1]) with col1: st.header(f"Chat with Docs, powered by ModernBert and Llama-3.2") with col2: st.button("Clear ↺", on_click=reset_chat) # I...
Python
1
import time import pandas as pd from lxml import etree from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support import wait import os #读取配置文件 from dotenv import...
Python
1
} /*! CK3 save files can be encoded in 3 different formats: - autosave - standard - ironman Let's start with standard and ironman first. These two are similar in that there are three sections: - a save id line - the header - a zip with the compressed gamestate For standard saves, the header and the compresse...
Rust
0
matrix(); let view_without_translation = { let mut r = view; r.cols.w = Vec4::unit_w(); r }; let funny: i32 = 9; // Important: Use i32, not u32. unsafe { gl::UseProgram(self.skybox_program.inner().gl_id()); for (i, cube_map_ta...
Rust
0
lib_n = 4 lib_spots = 5 r = di.random.randint(0, max_r, size=(lib_n, lib_spots)) theta = di.random.randint(0, max_theta, size=(lib_n, lib_spots)) intensities = di.random.random((lib_n, lib_spots)) integrated_templates = di.random.random((lib_n, max_r)) center = (7, 4) max_radius = max_r ...
Python
1
5, 'R': 4, 'S': 4, 'T': 4, 'U': 5, 'V': 4, 'W': 6, 'X': 4, 'Y': 4, 'Z': 4, ' ': 2, '!': 2, '"': 3, '#': 5, '$': 4, '%': 6, '&': 5, "'": 2, '(': 2, ')': 2, '*': 3, '+': 4, ',': 2, '-': 2, '.': 2, '/': 3, ':': 2, ';': 2, '<': 4, '=': 4, '>': 4, '?': 3, '@': 7, '[': 2, '\\': 3, ']': 2, '^': 4, '_': 3, '`': 3, '{': 2, '|':...
Python
1
# # simpleArith.py # # Example of defining an arithmetic expression parser using # the infixNotation helper method in pyparsing. # # Copyright 2006, by Paul McGuire # import sys from pyparsing import * ppc = pyparsing_common ParserElement.enablePackrat() sys.setrecursionlimit(3000) integer = ppc.integer variable = W...
Python
1
shuffle=shuffle, sort=False, # sort_within_batch=, ) data_loader = DataLoader(ds_iter) return data_loader if __name__=='__main__': train_dataloader = load_data(data_base_...
Python
1
ise ValueError("`implementation` must not be an empty sequence.") if scale is None: scale = base.AUTO if query_seq_lengths is not None: query_seq_lengths = query_seq_lengths[:, None, None] if key_value_seq_lengths is not None: key_value_seq_lengths = key_value_seq_lengths[:, None, None] mask = ba...
Python
1
s: tensor: The dequeued tensor on TPU. dims: A list of integer describes how the tensor is partitioned. Returns: The same tensor with the xla_sharding attribute. """ if dims is None: return xla_sharding.replicate(tensor) elif np.prod(dims) == 1: return xla_sharding.assign_...
Python
1
bertian::new(Vec3::new(0.668, 0.6633411, 0.660882))), ); boxes2.add(Arc::new(triange)); } let allin = Translate::new( Arc::new(RotateY::new(Arc::new(BvhNode::new(boxes2.objects, 0.0, 1.0)), 90.0)), Vec3::new(85.0, 118.0, 100.0), ...
Rust
0
pub fn prepend(&mut self, r: RecordBatch) { self.num_pending_rows += r.num_rows(); self.pending.insert(0, r); } pub fn has_group(&self) -> bool { self.rows_per_group <= self.num_pending_rows } pub fn take_group(&mut self) -> RecordBatch { assert!(self.has_group())...
Rust
0
00; #[doc = " Channel Manager - Channel Change Delay"] #[doc = "** Format 'S'"] #[doc = "* Units: seconds"] #[doc = "*"] #[doc = "* Required capability: SPINEL_CAP_CHANNEL_MANAGER"] #[doc = "*"] #[doc = "* This property specifies the delay (in seconds) to be used for"] #[doc = "* a channel change request."] #[doc = "*...
Rust
0
a 0c@s6ddlmZddlmZer&ddlTn dZddlTdS))absolute_import)PY3)*TN) __future__rZ future.utilsr _markupbaseZ__future_module__Z markupbaserrm/home/tom/ab/renpy-build-fix/tmp/install.linux-x86_64/lib/python3.9/site-packages/future/moves/_m...
Python
1
es)] fn ___action377< 'input, >( text: &'input str, ___0: (usize, ::std::vec::Vec<TypeBound<TypeRef>>, usize), ___1: (usize, TypeBound<TypeRef>, usize), ___2: (usize, Tok<'input>, usize), ) -> ::std::vec::Vec<TypeBound<TypeRef>> { let ___start0 = ___1.0.clone(); let ___end0 = ___2.2.clone(); let ___temp0 = ___actio...
Rust
0
wasmtime/releases/download/dev/wasmtime-dev-x86_64-windows.msi\n"); } bail!("{}", msg); } cargo.env("__CARGO_WASI_RUNNER_SHIM", "1"); cargo.env("CARGO_TARGET_WASM32_WASI_RUNNER", env::current_exe()?); } Subcommand::Build | Subcommand::...
Rust
0
from .select import sel_menu, sel_sl, sel_sl_with_default from .show import show_cert, show_ekus __all__ = ["show_cert", "show_ekus", "sel_menu", "sel_sl", "sel_sl_with_default"]
Python
1
<Session<Described>>(), ), ("Session<Playing>", std::mem::size_of::<Session<Playing>>()), ("Demuxed", std::mem::size_of::<Demuxed>()), ("Stream", std::mem::size_of::<Stream>()), ("PacketItem", std::mem::size_of::<PacketItem>()), ("rtp::Packet", std...
Rust
0
ris_loop client = NtripClient(self.ephem, self.ntrip_config) client.get_ephemeris_loop() # Verify # Ensure RTCMReader was initialized correctly mock_rtcm_reader.assert_called_with(client.socket, quitonerror=2) # Check if the ephemeris entry was updated with new GST ...
Python
1
te_all(); //! //! let mut results = //! tracker //! .pushed() //! .drain() //! .filter(|((location, time), delta)| location.is_target()) //! .collect::<Vec<_>>(); //! //! results.sort(); //! //! println!("{:?}", results); //! //! assert_eq!(results.len(), 3); //! assert_eq!(results[0], ((Location::new_t...
Rust
0
def collate_remove_none(batch): ''' Collater that puts each data field into a tensor with outer dimension batch size. Args: batch: batch ''' batch = list(filter(lambda x: x is not None, batch)) return data.dataloader.default_collate(batch) def worker_init_fn(worker_id): ''' W...
Python
1
from chan_lun_util import * from k_line_dto import * import matplotlib as mat import numpy as np import datetime as dt import matplotlib.pyplot as plt import time stock_code = '600527.XSHG' start_date = '2016-09-01' end_date = '2017-03-17' initial_trend = "down" quotes = get_price(stock_code, start_date, end_date, fr...
Python
1
50 ], }, TestVector { c: [ 0xa7, 0xaf, 0x9d, 0xb6, 0x99, 0x0e, 0xd8, 0x3d, 0xd6, 0x4a, 0xf3, 0x59, 0x7c, 0x04, 0x32, 0x3e, 0xa5, 0x1b, 0x00, 0x52, 0xad, 0x80, 0x84, 0xa8, 0xb9, 0xda, 0x94, 0x8d, 0x32, 0x0d, 0xad, 0xd6 ], ...
Rust
0
UnlikeTweetBlock.Output, disabled=not TWITTER_OAUTH_IS_CONFIGURED, test_input={ "tweet_id": "1234567890", "credentials": TEST_CREDENTIALS_INPUT, }, test_credentials=TEST_CREDENTIALS, test_output=[ ("success", Tru...
Python
1
&svg); assert_eq!( &svg[svg.len() - 100..], r#"387481909902 1.294979325105942 Z"/> <path d="M 114.18306345846304 22.30692675357551 Z"/> </g> </svg>"# ); Ok(()) } fn invert_y(header: &Header) -> bool { if let Some(crs) = header.crs() { if crs.code() == 4326 { return...
Rust
0
901_072_952_701_192, 0.117_754_809_412_463_995_466_069, 0.133_329_810_868_462_739_215_09, 0.153_846_227_114_512_262_845_736, 0.181_818_180_850_050_775_676_507, 0.222_222_222_230_083_560_345_903, 0.285_714_285_714_249_172_087_875, 0.400_000_000_000_000_077_715_612,...
Rust
0
>, weekday: Weekday, ) { let mut items_vec = list.items_for_weekday(weekday); items_vec.sort(); show_list(&items_vec); } fn show_list<T: Display + MtcItem>(list: &[&T]) { for i in list.iter() { println!("\t\t{}", i); ...
Rust
0
: *mut ALLEGRO_FONT)>, pub get_text_dimensions: Option<extern "C" fn(arg1: *const ALLEGRO_FONT, arg2: *const ALLEGRO_USTR, arg3: *mut c_int, arg4: *mut c_int, arg5: *mut c_int, arg6: *mut c_int)>, } derive_copy_clone!(ALLEGRO_FONT_VTABLE); pub const ALLEGRO_ALIGN_LEFT: c_int = 0; pub const ALLEGRO_ALIGN_CENTRE: ...
Rust
0
#!/usr/bin/env python3 # encoding: utf-8 # # Copyright 2009 Doug Hellmann. # # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software # and its documentation for any purpose and without fee is hereby # granted, provided that the above copyright notice appear in a...
Python
1
t */", "// foo\n\t/**\n\t * Hello\n\t */", "/*\n\n \t \n*/", "/*\t */ //", "/*\n \t*/ //", "/*\n\t *//*\n \t*/", "// \t", "/*\n*/\t ", "/* \t\n\t \n \t\n\t */ \t", "/*\n\t */`\n\t `;", "/*\n\t */var a = `\n\t `, b = `\n\t `/*\t \n\t \n*/;", "/*\t `...
Rust
0
#coding=utf-8 import time import logging from blinker import signal from helpers import get_photo_url from macros.macro import EVENTS, ACTIVITY_ACTION import models photo_create = signal(EVENTS['PHOTO_CREATE']) photo_like = signal(EVENTS['PHOTO_LIKE']) photo_upload = signal(EVENTS['PHOTO_UPLOAD']) photo_unlike = sign...
Python
1
] = match old_state[i][j] { 0 => continue, 1 => { if count_occupied_neighbors(&old_state, i, j) == 0 { 2 } else {1} }, 2 => { if count_occupied_neighbors(&old_state, i, j) ...
Rust
0
.is_error, } } } <filename>tmc-langs-util/src/notification_reporter.rs //! Contains an utility for reporting warnings. use once_cell::sync::OnceCell; use serde::Serialize; type NotificationClosure = Box<dyn 'static + Sync + Send + Fn(Notification)>; static NOTIFICATION_REPORTER: OnceCell<NotificationClos...
Rust
0
## def projection_merge ## merge list of dct projections ## ## written by Quinten Vanhellemont, RBINS ## 2024-03-28 ## modifications: 2024-03-28 (QV) split from multi_tile_extent def projection_merge(dct_list, dct = None): import numpy as np for dct_ in dct_list: if dct is None: dct = {k: ...
Python
1
[server_addr]) .add_classified_addrs(Class::NotListening, vec![nonlistening_addr]) .add_classified_addrs(Class::Blackholed, vec![blackhole_addr]); // Try to connect to each address. Only the first should be checked. let mut fut = happy_eyeballs( vec![server_addr, non...
Rust
0
h, 'attack_gsl_given_bot_num.txt'), attack_gsl_given_bot, fmt='%d' ) cumu_affected_traffic_volume_given_bot = np.array([cumu_affected_traffic_volume], dtype=int) np.savetxt( os.path.join(folder_path, 'cumu_affected_traffic_volume_given_...
Python
1
.to_string() .replace(" ", "") } } <filename>2021/src/day03.rs use crate::utils::bin_to_int; fn to_digits(row: &str) -> Vec<u32> { row.chars().map(|c| c.to_digit(10).unwrap()).collect() } // TODO: refactor out the code that parse a line // TODO: refactor out the code that process matrix by columns pub...
Rust
0
merged_pkginfos_dict[key]["cuda11_or_later"] = cuda11_or_later_support if current_timestamp > merged_pkginfos_dict[key]["timestamp"]: merged_pkginfos_dict[key]["timestamp"] = current_timestamp else: merged_pkginfos_dict[key...
Python
1
if scheme == 'HTTP': if self._prefer_connect and ('CONNECT:80' in proxy.types): proto = 'CONNECT:80' else: relevant = { 'HTTP', 'CONNECT:80', 'SOCKS4', 'SOCKS5', } & pr...
Python
1