text
string
label_name
string
labels
int64
import subprocess from pathlib import Path import sys # Configuración OUTPUT_DIR = Path('docs/build/pdoc') SOURCE_DIR = Path('src') def check_pdoc_installed(): try: subprocess.run(['pdoc', '--version'], capture_output=True, check=True) return True except (subprocess.SubprocessError, FileNotFou...
Python
1
::Str("features"), Token::Seq { len: Some(1) }, Token::Str("a feature"), Token::SeqEnd, Token::StructEnd, ], ); } } #![allow(unused_imports, dead_code)] extern crate gtk; #[macro_use] extern crate relm; #[macro_use] extern crate re...
Rust
0
wrap_err().kind() { ErrorKind::InvalidAudience => (), _ => unreachable!(), }; } #[test] fn aud_missing_fails() { let claims = Map::new(); let mut validation = Validation { validate_exp: false, ..Validation::default() }; validation.set_audience(&["None...
Rust
0
11E1-B4B3-E89A8F7FC3A7".into(), ("MidnightBSD", "Unix File System (UFS) Partition"), ); m.insert( "85D5E45C-237C-11E1-B4B3-E89A8F7FC3A7".into(), ("MidnightBSD", "Vinium Volume Manager Partition"), ); m.insert( "85D5E45D-237C-11E1-B4B3-E89A8...
Rust
0
value) if order_size.is_zero(): ctx.log_rule("calculated order size is zero") continue order_value = abs(account.contract_value(asset, order_size, price)) if abs(order_value) > available: ctx.log_rule( ...
Python
1
of the YAML file! let yaml = load_yaml!("cli_params.yaml"); let matches = App::from(yaml).get_matches(); let ip_addr = matches.value_of("ip").unwrap_or("127.0.0.1"); let port_str = matches .value_of("port") .expect("Port can't be none it is required"); let file_path = matches ...
Rust
0
; mod generic_path; pub use generic_path::*; mod path_segment; pub use path_segment::PathSegment; pub type Cost = usize; // Reexport of a structure that derefs to a type with lang item impls having doc links in their // comments. The doc link points to an associated item, so we check that traits in scope for that //...
Rust
0
# -*- coding: utf-8 -*- """ Test for "find all references" in a codebase encoded in Cyrillic""" import os import GPS import json from gs_utils.internal.utils import hook, run_test_driver, gps_assert, wait_tasks from workflows.promises import timeout def to_str(m): """Make a string out of a message""" return ...
Python
1
er: ::vcell::VolatileCell<u32>, } #[doc = "Pre-programmed factory code present."] pub mod ppfc; #[doc = "Number of individualy controllable RAM blocks."] pub struct NUMRAMBLOCK { register: ::vcell::VolatileCell<u32>, } #[doc = "Number of individualy controllable RAM blocks."] pub mod numramblock; #[doc = "Size of R...
Rust
0
# -*- coding: utf-8 -*- # author: itimor from workflows.models import * from rest_framework import serializers class WorkflowReadSerializer(serializers.ModelSerializer): class Meta: model = Workflow fields = '__all__' depth = 1 class WorkflowSerializer(serializers.ModelSerializer): ...
Python
1
# Form implementation generated from reading ui file 'user_widget.ui' # # Created by: PyQt6 UI code generator 6.4.2 # # WARNING: Any manual changes made to this file will be lost when pyuic6 is # run again. Do not edit this file unless you know what you are doing. from PyQt6 import QtCore, QtGui, QtWidgets class U...
Python
1
p = int(input("Введите любое число:")) p1 = p p2 = 0 while p != 0: k = (p % 10) p = p // 10 p2 = p2 * 10 + k if p1 == p2: print("True")
Python
1
re. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIA...
Rust
0
nt is maxed out. pub fn start_increment<'f, F: hil::flash::Flash<'f>>( page: Page, current_value: u32, flash: &F, buffer: &'f mut [u32; 1]) -> (ReturnCode, Option<&'f mut [u32; 1]>) { use core::convert::TryInto; const WRITE_PATTERNS: [u32; COUNTS_PER_WORD as usize] = [0x3CFFFFFF, 0x00FFFFFF, 0x0...
Rust
0
# # This Python script makes a summary of a football game by cutting # the video around the 10 % loudest moments, which generally # include the goals and other important events. # For more details, see this blog post: # http://zulko.github.io/blog/2014/07/04/automatic-soccer-highlights-compilations-with-python/ # # LI...
Python
1
iolations = [ sector for sector, compliant in sector_compliance.items() if not compliant ] # 計算行業集中度 weights = list(sector_weights.values()) sector_concentration = sum(w * w for w in weights) if weights else 0.0 return { "sector_weights": sector_weights,...
Python
1
g::from_std_str(&shortcuts.packed_file_decoder["move_left"]))); ui.get_mut_ptr_table_view_context_menu_move_rigth().set_shortcut(&QKeySequence::from_q_string(&QString::from_std_str(&shortcuts.packed_file_decoder["move_right"]))); ui.get_mut_ptr_table_view_context_menu_delete().set_shortcut(&QKeySequence::from_q...
Rust
0
foo.html <a href="/bar.html">bar</a> </body> </html> "#; let parsed = parse(url!("http://example.com/base.html"), &data, parse_url).unwrap(); assert_eq!(parsed, hashset! { url!("http://example.com/bar.html") }) } } use serde::{Deserialize, Deserializer...
Rust
0
e_name is required interface_name = None # Using getopts to handle options try: options, args = getopt.getopt(sys.argv[1:],"hi:p:f:o:w:") except getopt.GetoptError: usage() quit() # If theres a switch, override default option for key, value in options: # Help if (key == "-h"): usage() quit() ...
Python
1
{} impl<PIO: PinId> fc::SpiSckPin<PIO, flexcomm::Spi5> for Pin<PIO, Special<function::FC5_SCK>> {} impl<PIO: PinId> fc::SpiSckPin<PIO, flexcomm::Spi6> for Pin<PIO, Special<function::FC6_SCK>> {} impl<PIO: PinId> fc::SpiSckPin<PIO, flexcomm::Spi7> for Pin<PIO, Special<function::FC7_SCK>> {} impl<PIO: PinId> fc::SpiSckPi...
Rust
0
ple_transition_batch(self, rng, batch_size=None, indices=None): """Returns a batch of transitions with extra storage and the priorities.""" transition = super().sample_transition_batch(rng, batch_size, indices) transition.append(self.get_priority(transition[-1])) return transition d...
Python
1
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2021, Cisco Systems # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = r""" --- module: sg_mapping_group_deploy_status_info short_description: Information module for SG Mapping Group Deploy Status descr...
Python
1
- - - - - | // | - - - - - - - - | // | - X - X - X - - | // | - - - - - - - - | // | - - - - - - - - | // +-+-+-+-+-+-+-+-+-+ let board = BitBoard::empty() .set_square(Square::from_coordinates(File::B, Rank::Three)) .set_square(Square::from_coordinates(File::B, Rank::Five)) ...
Rust
0
ion(model_plus.model.items()) logger.info(f"model parameters count : {model_params_count} ({gguf.model_weight_count_rounded_notation(model_params_count[0])})") logger.info(f"Vocab info: {vocab}") logger.info(f"Special vocab info: {special_vocab}") model = model_plus.model model = convert_model_...
Python
1
v = v.item() assert isinstance(v, (float, int)) self.meters[k].update(v) def __getattr__(self, attr): if attr in self.meters: return self.meters[attr] if attr in self.__dict__: return self.__dict__[attr] raise AttributeError("'{}' obje...
Python
1
from sklearn.naive_bayes import GaussianNB import random import numpy as np import math from pylab import scatter,figure, clf, plot, xlabel, ylabel, xlim, ylim, title, grid, axes, show,semilogx, semilogy import matplotlib.pyplot as plt from matplotlib.font_manager import FontProperties # Generation of data to train t...
Python
1
import streamlit as st import matplotlib.pyplot as plt import seaborn as sns import pandas as pd # Load the cleaned data df = pd.read_csv('imdb_top_movies_cleaned.csv') # Creating Decade column df['Decade'] = (df['Year'] // 10) * 10 # Create a new 'Decade' column # Sidebar options st.sidebar.title("Filter Options")...
Python
1
, sunt in culpa qui officia deserunt mollit anim id est laborum." } } div.uk-modal-footer.uk-text-right { button.uk-button.uk-button-default.uk-modal-close type="button" { "Cancel" } button.uk-button.uk-button-primary type="button" { "Save" } } } } div...
Rust
0
List[str] = None, ) -> Instance: fields: Dict[str, Field] = {} token_field = TextField([Token(t) for t in tokens], self._token_indexers) fields["tokens"] = token_field fields["metadata"] = MetadataField({"tokens": tokens}) if pos_tags is not None: fields["pos_tag...
Python
1
.error()); } } else { return Err(lookahead_bool_or_span.error()); } } else if lookahead_int_or_ident.peek(Ident) { let const_ident = input.parse::<Ident>()?; // constant literal entry entries.push(PhantomEntry::Const { attributes, nam...
Rust
0
t_to_world.transform_point_abs_error(&pobj, &pobj_error, &mut it.p_error); *pdf = 1.0 / self.area(); it } fn sample_interaction(&self, i: &InteractionData, u: &Point2f, pdf: &mut Float) -> InteractionData { let pcenter = self.object_to_world.transform_point(&Point3f::new(0.0, 0.0, 0.0)...
Rust
0
""" Task Coach - Your friendly task manager Copyright (C) 2004-2016 Task Coach developers <developers@taskcoach.org> Task Coach 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 3 of the License, or ...
Python
1
['tooltip'] = ( f"{timedelta_display(interval_start_time_ago)} ago" + f"<br><strong>{incomplete_count}</strong> incomplete jobs" ) context['incomplete_count_average'] = round( sum([d['y'] for d in graph_data]) / len(graph_data)) context['incomplete_count_grap...
Python
1
s and %s' % (read_written_count,read_read_count,fastq_r1_out,fastq_r2_out)) else: while True: r1_id_line = f1_in.readline().rstrip() r1_seq_line = f1_in.readline().rstrip() r1_plus_line = f1_in.readline().rstrip() r1_qual_line = f1_in.readline().rstrip() ...
Python
1
#User function Template for python3 class Solution: def customSort(self, arr): # code here s=len(arr)//2 first=arr[:s] second=arr[s:] first.sort() second.sort(reverse=True) return first+second
Python
1
"""Mergers and Acquisitions (M&A) API endpoints.""" MA_RSS_FEED_ENDPOINT = "v4/mergers-acquisitions-rss-feed" SEARCH_MA_ENDPOINT = "v4/mergers-acquisitions/search" class MergersAndAcquisitions: """ A class to retrieve information about mergers and acquisitions (M&A) activities. Explanation: This clas...
Python
1
Endpoint '{name}'"] + lines[1:] endpoint = "\n".join(lines) return endpoint def _list_variables_used_by_fns(fns): trainable_variables = [] non_trainable_variables = [] trainable_variables_ids = set() non_trainable_variables_ids = set() for fn in fns: if hasattr(fn, "concrete_functi...
Python
1
ip first node. parents_cache.store_consumer(1); let mut i = 1; while i < num_nodes { // Ensure next buffer is ready let mut counted = false; let mut producer_val = cur_producer.load(SeqCst); while producer_val < i { if !counted { ...
Rust
0
_base_ = [ '../../../rtmpose/coco-wholebody/rtmpose-m_8xb64-270e_coco-wholebody-256x192.py' # noqa: E501 ] # model settings find_unused_parameters = False # config settings fea = True logit = True # method details model = dict( _delete_=True, type='DWPoseDistiller', teacher_pretrained='https://downl...
Python
1
_inode: &Inode, _path: &str) -> Option<BoundEndpoint> { return None; } fn GetFile(&self, task: &Task, _dir: &Inode, _dirent: &Dirent, flags: FileFlags) -> Result<File> { let i = self.lock(); if flags.Read && !flags.Write { // O_RDONLY let r = i.p.Open(task, &flags); ...
Rust
0
educed to a form that can be shared with other processes.r)globalsgetrs rreducerzBaseContext.reducersy}}[))r c|td<y)Nr)r)rrs rrzBaseContext.reducers!* +r cy...
Python
1
character reference to a white space /// character other than space (`#x20`), the normalized value contains the referenced character /// itself (`#xD`, `#xA` or `#x9`). This contrasts with the case where the unnormalized value /// contains a white space character (not a reference), which is replaced with a space chara...
Rust
0
iber //! //! # #[cfg(feature = "std")] //! dispatcher::with_default(&my_dispatch, || { //! // my_subscriber is the default //! }); //! //! // no default subscriber again //! ``` //! It's important to note that `with_default` will not propagate the current //! thread's default subscriber to any threads spawned withi...
Rust
0
'webdriver', { get: () => undefined }); ''' }) return driver async def scrape_async(self, urls: List[str], max_concurrent: int = 10) -> List[ScrapingResult]: """비동기 배치 스크래핑""" async with aiohttp.ClientSession() as session...
Python
1
ransformer for adding milliseconds if not present in value. Example: input: ""2024-05-03T04:27:56Z" output: "2024-05-03T04:27:56.000Z" """ @staticmethod def transform(timestamp): try: # Regular expression pattern to match th format '%Y-%m-%dT%H:%M:%SZ' without milli ...
Python
1
Clone)] pub struct ChallengeCell { pub input: CellInput, pub output: CellOutput, pub output_data: Bytes, } /// sync params #[derive(Clone)] pub struct SyncParam { /// contains transitions from tip to fork point pub reverts: Vec<RevertedL1Action>, /// contains transitions from fork point to new...
Rust
0
# Copyright 2017 Google, ARM Limited # # 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 required by applicable law or agreed to i...
Python
1
pixel_values.shape[3]) pixel_values = torch.cat([pixel_values, pad_pixel_values_], dim=0) pixel_values = torch.split(pixel_values, len(pixel_values) // sp_size, dim=0) pixel_values = pixel_values[sp_rank].contiguous() ...
Python
1
{ pub fn xsltTestCompMatchList( ctxt: xsltTransformContextPtr, node: xmlNodePtr, comp: xsltCompMatchPtr, ) -> ::std::os::raw::c_int; } extern "C" { pub fn xsltNormalizeCompSteps( payload: *mut ::std::os::raw::c_void, data: *mut ::std::os::raw::c_void, name: *...
Rust
0
time.sleep(30) wait = WebDriverWait(self.driver, 20) wait.until(EC.presence_of_element_located((By.XPATH, '//div[@class="company-info"]'))) elem = self.driver.find_element_by_tag_name("body") for i in range(10): # elem.send_keys(Keys.PAGE_DOWN) self.drive...
Python
1
"jp", "jrcxz", "js", "kaddb", "kaddd", "kaddq", "kaddw", "kandb", "kandd", "kandnb", "kandnd", "kandnq", "kandnw", "kandq", "kandw", "kmovb", "kmovd", "kmovq", "kmovw", "knotb", "knotd", "knotq", "knotw", "korb", "kord", "korq", "kortestb", "kortestd", "kortestq", "kortestw", "korw", "ksh...
Rust
0
def job_class(self) -> type: """Return the job class.""" return TrainModelJob def generate_jobs( self, args: dict | None = None, prev_stage_result: PREV_STAGE_RESULT = None, ) -> Generator[TrainModelJob, None, None]: """Generate training jobs for each tile locat...
Python
1
.read_register(Register::PRE_RANGE_CONFIG_VCSEL_PERIOD)?, )), VcselPeriodType::VcselPeriodFinalRange => Ok(decode_vcsel_period( self.read_register(Register::FINAL_RANGE_CONFIG_VCSEL_PERIOD)?, )), } } fn get_sequence_step_enables(&mut self) -> Result<S...
Rust
0
# # SPDX-License-Identifier: MIT # # Copyright (c) 2025 Carsten Igel. # # This file is part of simplepycons # (see https://github.com/carstencodes/simplepycons). # # This file is published using the MIT license. # Refer to LICENSE for more information # """""" # pylint: disable=C0302 # Justification: Code is generated ...
Python
1
.as_ref().into())) // } // /// Create a symbol // pub fn sym<T: AsRef<str>>(s: T) -> Ref { // Self::vref(Native::Sym(s.as_ref().into())) // } /// Create a zoned datetime pub fn zdt(dt: DateTime<FixedOffset>) -> Ref { Self::vref(Native::Zdt(dt)) } } /// Add arity, update fl...
Rust
0
# Evaluate Reverse Polish Notation (RPN) - same as postfix notation # Overall Time Complexity: O(n) # Overall Space Complexity: O(n) # Hint: Use a stack to evaluate the expression def evalRPN(tokens): stack = [] for ch in tokens: if ch == "+": stack.append(stack.pop() + stack.pop()) ...
Python
1
from typing import List class Solution: def gridGame(self, grid: List[List[int]]) -> int: n = len(grid[0]) # Prefix sum arrays for the two rows top_prefix = [0] * n bottom_prefix = [0] * n top_prefix[0] = grid[0][0] bottom_prefix[0] = grid[1][0] ...
Python
1
You can access them all via object "history" like this: model.history.save_global_objectives_chart(filename="hello/goc") model.history.save_local_objectives_chart(filename="hello/loc") model.history.save_global_best_fitness_chart(filename="hello/gbfc") model.history.save_local_best_fit...
Python
1
mpl ConstantPool { pub fn from_zero_indexed_vec(vec: Vec<ConstantPoolInfo>) -> Self { OneIndexedVec::from(vec) } } <reponame>satyamakgec/fe //! Stress tests that test broad behavior #![cfg(feature = "solc-backend")] use primitive_types::H160; use std::iter; mod utils; use utils::*; pub fn deploy_cont...
Rust
0
etInterface, EthernetInterfaceBuilder, NeighborCache, Routes}; use smoltcp::phy::Device; use smoltcp::phy::{DeviceCapabilities, RxToken, TxToken}; use smoltcp::time::Instant; use smoltcp::wire::{EthernetAddress, IpAddress, IpCidr, Ipv4Address}; use smoltcp::Error as NetError; use smoltcp::Result as NetResult; use core...
Rust
0
egister && self.op1_kind() == OpKind::Register { if self.mnemonic() == Mnemonic::Xor { return RflagsInfo::C_cos_S_pz_U_a as usize; } else { return RflagsInfo::C_acos_S_pz as usize; } } } _ => {} } result } /// All flags that are read by the CPU when executing the instruction....
Rust
0
import torch import numpy as np def load_tokens(path='kowiki_corpus.bin',seq_len=1024, batch_size=8, chunk_size=1000000000): with open(path,'rb') as f: buffer = np.array([],dtype=np.uint32) while True: chunk = np.frombuffer(f.read(chunk_size),dtype=np.uint32) if len(chunk) =...
Python
1
ptimizer) norm = ampscaler_get_grad_norm(parameters) self._scaler.step(optimizer) self._scaler.update() else: norm = None return norm def state_dict(self): return self._scaler.state_dict() def load_state_dict(self, state_dict): ...
Python
1
<F> { fn ready(&mut self, _ready: Option<&crate::mio::event::Event>, data: &mut Data) { (self.0)((), data) } } impl crate::EventSource for DummySource { type Event = (); fn make_dispatcher<Data: 'static, F: FnMut(Self::Event, &mut Data) + ...
Rust
0
ant, caplog: pytest.LogCaptureFixture ) -> None: """Test setup without discovery info.""" assert NOTIFY_DOMAIN not in hass.config.components assert await async_setup_component( hass, NOTIFY_DOMAIN, {"notify": {"platform": DOMAIN}}, ) await hass.async_block_till_done() ass...
Python
1
timeColumn: string, ?tagColumns: [string], ?valueColumns: [string]) => [A] where A: Record builtin from : (?csv: string, ?file: string) => [A] where A: Record builtin linear : (<-tables: [{ T with _time: time, _value: float }], every: duration) => [{ T with _time: time, _value: float }] builtin from : (start: A, stop...
Rust
0
ds, rect, &val)?; break; } Value::Text(t) => { self.spans.push(TextSpan::new(&rs, t)); rs.span_number += 1; line_blank = false; } Value::HexadecimalCharacter(hc) => { ...
Rust
0
import torch import torch_dct as dct import torch.nn.functional as F def modulo(x, mx): positive_input = x > 0 x = x % mx x = torch.where((x == 0) & positive_input, torch.tensor(mx, dtype=x.dtype, device=x.device), x) return x def wrapToMax(x, mx): return modulo(x + mx/2, mx) - mx/2 def deep_de...
Python
1
. pub fn receive_stripped_state_event(&mut self, event: &AnyStrippedStateEventStub) -> bool { match &event { AnyStrippedStateEventStub::RoomName(event) => self.handle_stripped_room_name(event), _ => false, } } /// Receive a presence event from an `IncomingResponse` a...
Rust
0
nd_sync_read_only!(AxisChunksIter); send_sync_read_only!(ElementsBase); send_sync_read_write!(IterMut); send_sync_read_write!(IndexedIterMut); send_sync_read_write!(LanesIterMut); send_sync_read_write!(AxisIterMut); send_sync_read_write!(AxisChunksIterMut); send_sync_read_write!(ElementsBaseMut); /// (Trait used inte...
Rust
0
u32) { // Unset the lower 8 bits, then set the radix (as an 8-bit integer). self.compressed &= !0xFF; self.compressed |= radix & 0xFF; } /// Set the exponent base. /// Unsafe, use the builder API for option validation. #[inline(always)] pub unsafe fn set_exponent_base(&mut s...
Rust
0
ray to map old (quadrilateral) local face ID to new (triangle) # local face ID old_to_new_face = np.array([2, 1, 2, 1]) # Boundary groups for bgroup in mesh.boundary_groups.values(): for bface in bgroup.boundary_faces: bface.elem_ID, bface.face_ID = modify_element_face_info( bface.elem_ID, bface.face_ID)...
Python
1
import datetime from django import forms from django.utils.safestring import mark_safe class CalendarWidget(forms.TextInput): """ Calender widget: It will set bootstrap datepicker for the specified field. """ def render(self, name, value, attrs=None): if value is not None and value != ""...
Python
1
CSlice, U1, RSlice> where T: Scalar, R: Dim, RSlice: Dim, C: Dim, CSlice: Dim, S: Storage<T, R, C>, ShapeConstraint: DimEq<R, RSlice> + DimEq<C, CSlice>, { assert_eq!(slice_rows.value(), matrix.nrows()); assert_eq!(slice_cols.value(), matrix.ncols()); let (rstride, cstride) = ma...
Rust
0
pub fn new(multicast_address: SocketAddrV4) -> Result<Self> { let addr = SocketAddrV4::new(ALL_INTERFACES.into(), multicast_address.port()); let socket = bind_multicast(&addr, &multicast_address, true)?; socket.set_read_timeout(None)?; Ok(Self { socket, multi...
Rust
0
.length2 = 0 else: patch.start2 -= 1 patch.length2 = int(m.group(4)) del text[0] while len(text) != 0: if text[0]: sign = text[0][0] else: sign = "" line = urllib...
Python
1
seconds=value) elif time_unit == "ns": td = timedelta(microseconds=value // 1_000) elif time_unit == "ms": td = timedelta(milliseconds=value) else: _raise_invalid_time_unit(time_unit) if time_zone is None: return EPOCH + td else: dt = EPOCH_UTC + td r...
Python
1
"""CompletionChunk Schema单元test模块.""" import json from typing import Any, Dict, List from pydantic import ValidationError from api.schemas.completion_chunk import ( ReasonChatCompletionChunk, ReasonChoice, ReasonChoiceDelta, ReasonChoiceDeltaToolCall, ReasonChoiceDeltaToolCallFunction, ) class ...
Python
1
Point: *mut TPoint, Result: *mut TPoint); pub fn BitBtn_ClientToParent(AObj: usize, Point: *mut TPoint, AParent: usize, Result: *mut TPoint); pub fn BitBtn_Dragging(AObj: usize) -> bool; pub fn BitBtn_HasParent(AObj: usize) -> bool; pub fn BitBtn_Hide(AObj: usize); pub fn BitBtn_Perform(AObj: usize, Msg: u32...
Rust
0
omponentOrganization", vr: US }, E { tag: Single(Tag(0x0018, 0x6046)), alias: "PixelComponentMask", vr: UL }, E { tag: Single(Tag(0x0018, 0x6048)), alias: "PixelComponentRangeStart", vr: UL }, E { tag: Single(Tag(0x0018, 0x604A)), alias: "PixelComponentRangeStop", vr: UL }, E { tag: Single(Tag(0x0018, 0...
Rust
0
if np.linalg.det(R) < 0: Vt[-1, :] *= -1 R = Vt.T @ U.T # Compute translation t = center1 - R @ center2 # Create transformation matrix transform = np.eye(4) transform[:3, :3] = R transform[:3, 3] = t return tr...
Python
1
# - Use range(start, stop, step) to generate sequences; convert to lists with list(...) or [*...] (unpack/flatten) # in python: # • range, enumerate, map → return iterators (lazy, efficient) (they don't return an array like in JS) # • Iterators aren’t lists — they need to be “unpacked” or “materialized” to become lis...
Python
1
Ok(None.into()) } /// Renounce one's intention to be a candidate for the next election round. 3 potential /// outcomes exist: /// /// - `origin` is a candidate and not elected in any set. In this case, the deposit is /// unreserved, returned and origin is removed as a candidate. /// - `origin` is a cur...
Rust
0
# Assuming you have a list of tuples representing operations data_source = [ ('ADD', 'item1'), ('REM', 'item2'), ('MOD', 'item3'), ('GET', 'item4'), ('SET', 'item5') ] # Filter out ADD, REM, and MOD tuples filtered_data = [tuple for tuple in data_source if tuple[0] not in ['ADD', 'REM', 'MOD']] pr...
Python
1
# Copyright 2023 Google LLC # # 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 required by applicable law or agreed to in writing, s...
Python
1
""" Sistema CNPJ - Pipeline com Download e Processamento Paralelos """ import os import sys import argparse from datetime import datetime from typing import List # Adiciona o diretório raiz ao path sys.path.append(os.path.dirname(os.path.abspath(__file__))) from services.pipeline_processor import PipelineProcessor fr...
Python
1
tags::FieldLabelTag, tags::Bits32<V>: Bits32TypeTag, { pub fn ser_field<FieldType, W>( field: FieldType, number: i32, out: &mut W, _: bool, ) -> Result<()> where FieldType: IntoIterator<Item = <tags::Bits32<V> as tags::NumericalTypeTag>::NativeType>, W: Wr...
Rust
0
[doc = "*Required features: `\"Win32_Graphics_Direct3D11\"`*"] pub const D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_INVALIDMIP: D3D11_MESSAGE_ID = 3145912i32; #[doc = "*Required features: `\"Win32_Graphics_Direct3D11\"`*"] pub const D3D11_MESSAGE_ID_CREATEVIDEODECODEROUTPUTVIEW_UNSUPPORTEMIP: D3D11_MESSAGE_ID = 3145...
Rust
0
aw_coords| { let coords = raw_coords .split(",") .map(|raw_coord| raw_coord.parse().expect("Couldn't parse integer")) .collect::<Vec<u64>>(); (coords[0], coords[1]) }) .collect...
Rust
0
import argparse from typing import List, TextIO indent_size = " " class GenerateAst: """_summary_ GenerateAst class """ @classmethod def main(cls, args: argparse.Namespace) -> None: print(f"{args.output_dir=}") cls.__define_ast( args.output_dir, "Expr",...
Python
1
p.objects.all().delete() create_stamps( [ ( "test_user_0", [ "Facebook", "Twitter", "POAP", "Discord", "Linkedin", ...
Python
1
ShakeType { /// First handshake exchange in client-server connection Induction = 1, /// A rendezvous connection, initial connect request, 0 Waveahand = 0, /// A rendezvous connection, response to initial connect request, -1 /// Also a regular connection client response to the second handshake...
Rust
0
ic [Option<MutexProtocolKind>] = &[]; /// Implements [`Mutex::is_locked`][1]. /// /// [1]: crate::kernel::mutex::MutexMethods::is_locked /// /// # Safety /// /// See the [Safety](self#safety) section of the module documentation. unsafe fn raw_mutex_is_locked(this: Self::RawMutexId) -> R...
Rust
0
def before_all(context): # Configure behavex-images to always attach images to reports try: from behavex_images import image_attachments from behavex_images.image_attachments import AttachmentsCondition image_attachments.set_attachments_condition(context, AttachmentsCondition.ALWAYS) ...
Python
1
tsmanager::client::Client; use cosmos_gravity::crypto::DEFAULT_HD_PATH; use serde::{Deserialize, Serialize}; use signatory::FsKeyStore; use std::io; use std::net::SocketAddr; use std::path::Path; #[derive(Clone, Debug, Deserialize, Serialize)] pub enum Keystore { File(String), Aws, } impl Default for Keystore...
Rust
0
import psycopg2 import pandas as pd import pickle import configparser import time start_time = time.time() config = configparser.ConfigParser() config.read('/home/tav/Desktop/licenta/cfg.ini') conn = psycopg2.connect( host=config['Database']['host'], database=config['Database']['db'], user=config['Da...
Python
1
g\xe8\xe1\xeb^i\xa4\xf9\x1bi\xb6\xdf\ *Zj\xaf\xbbZ\xa7\xd3mvG\x1f\xa2\xf8C\xc5\ Z\x0e\x85\xe3\xdd/\xfbNxu\xdf\x05\xeb\xb2|Y\ \xf1,7\x10\x99\xe2\xf1&\x8d\xe1\xbb\xed\x1c\xf9Zu\ \xdf\x97u}\xad\xdf\xe9O>\xb1s\xa3\xea\xbfeF\ \xb8\xf1\x1d\x9ai\x97/\x0d\xa8\x92Yv|k\xfb:\ \xe8Zj\xaf\x89\xec>+\xe8k\xa1\xf8r\xc7\xc3\xbe\ \x12\x...
Python
1
writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // //! Client for the Trusted Information Retrieva...
Rust
0
allow_inplace_modification=inplace, default_enclosing=default_enclosing, reuse_previous_enclosing=reuse_previous_enclosing, enclose_integers=enclose_ints, # This should not impact String ) transformed_library = middleware.transform(library=Library([input_string])) # Assert corre...
Python
1
import argparse import time from concurrent.futures import ThreadPoolExecutor import sky # NUM_NODES = 8 def parse_args(): parser = argparse.ArgumentParser() parser.add_argument("--num_nodes", type=int, default=32) parser.add_argument("--year", type=int, default=2023) parser.add_argument("--region", ...
Python
1