text
string
label_name
string
labels
int64
ork' button, except for the special case # that supertype is graphics or production and there are no carousel slides - # in which case the 'add a screenshot' call-to-action will be in the carousel area instead show_add_screenshot_link = self.user.is_authenticated and ( ...
Python
1
: c_uint = 0x8533; pub const VERTEX_ARRAY_SIZE: c_uint = 0x807A; pub const VERTEX_ARRAY_SIZE_EXT: c_uint = 0x807A; pub const VERTEX_ARRAY_STORAGE_HINT_APPLE: c_uint = 0x851F; pub const VERTEX_ARRAY_STRIDE: c_uint = 0x807C; pub const VERTEX_ARRAY_STRIDE_EXT: c_uint = 0x807C; pub const VERTEX_ARRA...
Rust
0
98; pub const LUCHADOR_MASK___EL_ASTRO_SEED: u16 = 2599; pub const LUCHADOR_MASK___EL_PELIGRO: u16 = 2600; pub const LUCHADOR_MASK___EL_PELIGRO_SEED: u16 = 2601; pub const LUCHADOR_MASK___EL_TIGRE: u16 = 2602; pub const LUCHADOR_MASK___EL_TIGRE_SEED: u16 = 2603; pub const LUCHADOR_MASK___EL_VERDUGO: u16 = 2604; pub con...
Rust
0
<()> { unsafe { let hr = ((*self.lpVtbl).put_KeyCertificateSign)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } }} #[inline] pub fn get_key_agreement(&self) -> Result<bool> { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyAgreeme...
Rust
0
min_length=3, player_names=["球員A", "球員B", "球員C"], lineup_positions=None, ) assert len(streaks) == 1 streak = streaks[0] assert streak.streak_length == 3 assert streak.at_bats[0].player_name == "球員A" assert streak.at_bats[1].player_name == "球員B" assert streak.at_bats[2]....
Python
1
d(new_subnet_size)) }, receivers, threshold: number_of_nodes_from_usize( dkg_tag.threshold_for_subnet_of_size(new_subnet_size), ), registry_version, resharing_transcript: Some(transcript), }; ...
Rust
0
# http://codecombat.com/play/level/sacred-statue # Прогуляйтесь вокруг позиций огров, уничтожайте каждого врага, что повстречаете на своем пути. # Посетите статую, что бы начать бой. NE = {"x": 50, "y": 80} SE = {"x": 50, "y": 50} SW = {"x": 75, "y": 50} NW = {"x": 75, "y": 80} hero.moveXY(60, 65) while True: # Уде...
Python
1
(image_embeds)[:-1], dtype=tf.int64) # Matt: In PyTorch, only one path (itm/non-itm) is taken. However, in TensorFlow this can result in # some layers not being built! To avoid this, we always call both paths, then use an if statement to select # which output to pass to the final output. The un...
Python
1
""" Unit tests for the Team model """ from django.core.exceptions import ValidationError from django.test import override_settings import pytest from core import factories, models pytestmark = pytest.mark.django_db @override_settings(ACCOUNT_SERVICE_SCOPES=["la-suite-list-organizations-siret"]) def test_models_ac...
Python
1
_acc.clone(), get_context_br(br_nk_acc.clone(), br_acc.clone())); let mut contract = Contract::new_default_meta(br_acc.clone()); let rand_1 = contract.get_random_u32(); let rand_2 = contract.get_random_u32(); assert_ne!(rand_1, rand_2); } #[test] fn test_transfer()...
Rust
0
`\"Win32_UI_Controls\"`*"] pub const WSB_PROP_CXHSCROLL: WSB_PROP = 2i32; #[doc = "*Required features: `\"Win32_UI_Controls\"`*"] pub const WSB_PROP_CXHTHUMB: WSB_PROP = 16i32; #[doc = "*Required features: `\"Win32_UI_Controls\"`*"] pub const WSB_PROP_CXVSCROLL: WSB_PROP = 8i32; #[doc = "*Required features: `\"Win32_U...
Rust
0
t_health_check.isoformat() if self.last_health_check else None, "failure_start_time": self.failure_start_time.isoformat() if self.failure_start_time else None, "rto_target_minutes": self.rto, "rpo_target_minutes": self.rpo, "recovery_stats": self.recovery_stats, }...
Python
1
何错误,返回零损失 return torch.tensor(0.0, device=self.device, requires_grad=True) def train(self, model: torch.nn.Module, dataloader: Any, optimizer: torch.optim.Optimizer, epochs: int, **kwargs) -> torch.nn.Module: """ 执行FreeAT对抗训练 Args: model: ...
Python
1
Error}; use serde_json::value::Value; use snafu::{OptionExt, ResultExt}; /// Potential errors during helper execution mod error { use handlebars::RenderError; use snafu::Snafu; #[derive(Debug, Snafu)] #[snafu(visibility = "pub(super)")] pub(super) enum TemplateHelperError { #[snafu(display...
Rust
0
, ctx: &Self::CommonData) -> anyhow::Result<Self> { return Ok(MVCCBuf { pages: sb::new_fifo_sb( lctx.mvcc_buf_cap as usize, PageCtx { tableid: *k, blk_rows: lctx.mvcc_blk_rows, pending_ops: ctx.pending_ops, ...
Rust
0
elf { Color::Always => true, Color::Auto => supports_color::on_cached(stream).is_some(), Color::Never => false, } } } fn main() { let app = MyApp::parse(); let my_value = MyValue::new(24, "circle"); let mut display = my_value.display(); if app.color.supp...
Rust
0
time format and short sentences. Data: 元智大學EMI聯合成果展 EMI Joint Achievement Exhibition at Yuan Ze University due 2025-05-21 15:00.", "output": "You have one activity. EMI Joint Achievement Exhibition at Yuan Ze University is due May 21, 2025, at 15:00."}, {"input": "Summarize the assignments in a casual tone for pro...
Python
1
torch.tensor([[0, 0, 0, 1]]).bool(), ), # previous padding mask only ( None, torch.tensor([[0, 1, 0]]).bool(), torch.tensor([[0, 1, 0, 0]]).bool(), ), # both padding masks ( torch...
Python
1
} #[macro_export] macro_rules! sysctl_write { ($fn_name:ident, $sysctl_name:expr, $ty:ty) => { pub unsafe fn $fn_name(oldp: &mut $ty, newp: &mut $ty) -> $crate::Result<()> { $crate::sysctl_raw($sysctl_name, std::ptr::null_mut(), oldp...
Rust
0
int = -30792; pub static MDB_DBS_FULL : c_int = -30791; pub static MDB_READERS_FULL : c_int = -30790; pub static MDB_TLS_FULL : c_int = -30789; pub static MDB_TXN_FULL : c_int = -30788; pub static MDB_CURSOR_FULL : c_int = -30787; pub static MDB_PAGE_FULL : c_int = -30786; pub st...
Rust
0
from build123d import * from generate_pcb_case import default_params def xp(f, name): export_stl(f.face().thicken(4), "build/" + name + ".stl") case_w = 56.8 case_h = 8 case = Rectangle(case_w, case_h) cc_wall = 4 tol = 2*default_params["carrycase_tolerance_xy"] cc_w = case_w + tol + cc_wall cc_h = 8 cc = Rectang...
Python
1
int(f"Saving images to {imagespath}") if not os.path.exists(subredditdirpath): os.makedirs(subredditdirpath) if not os.path.exists(imagespath): os.makedirs(imagespath) submission_image_path = f"{submission_id}-image" submission_images_path = os.path.join...
Python
1
if pts3d is not None: center = pts3d.mean(0) else: center = poses[..., 3].mean(0) # 2. Compute the z axis z = normalize(poses[..., 2].mean(0)) # (3) # 3. Compute axis y' (no need to normalize as it's not the final output) y_ = poses[..., 1].mean(0) # (3) # 4. Compute the x ...
Python
1
"""Exception-related type definitions for the SDK.""" from typing import Any class EventLoopException(Exception): """Exception raised by the event loop.""" def __init__(self, original_exception: Exception, request_state: Any = None) -> None: """Initialize exception. Args: origin...
Python
1
sponses.input_items) class AsyncResponsesWithStreamingResponse: def __init__(self, responses: AsyncResponses) -> None: self._responses = responses self.create = async_to_streamed_response_wrapper( responses.create, ) self.retrieve = async_to_streamed_response_wrapper( ...
Python
1
ror reading line: {}", e); } } } // restore original TTY settings. #[cfg(unix)] tcsetattr(tty_fd, TCSADRAIN, &termios_old)?; Ok(()) } /// handles newmint command to generate a new mint with N nodes. fn newmint() -> Result<MintInfo> { let confirm = readline_prompt( ...
Rust
0
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from parlai.core.params import ParlaiParser from parlai.mturk.core.mturk_manager import MTurkManager from parlai.mturk.ta...
Python
1
import time import traceback from sys import version as pyver import os import shlex import textwrap from typing import Tuple import asyncio from pyrogram import Client from pyrogram import __version__ as pyrover from pyrogram.enums import ParseMode from pyrogram.types import ( InlineKeyboardButton, InlineKey...
Python
1
h # case 5 C(\F)=C/F is trans if ez_first == '\\' and ez_second == '/': ez_isomer = 'trans' # case 6 C(/F)=C/F elif ez_first == '/' and ez_second == '/': ez_isomer = 'cis' # case 7 C(/F)=C\F elif ez_first == '/' and ...
Python
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is subject to the terms and conditions defined in # file 'LICENSE.md', which is part of this source code package. # from kubernetes_py.models.v1.JobSpec import JobSpec from kubernetes_py.models.v1.ObjectMeta import ObjectMeta class CronJobTemplate(object):...
Python
1
from test_task_anverali.conf.base import BaseConfig class DevelopmentConfig(BaseConfig): DEBUG = True
Python
1
3); l.push(Point3D::new(-2., 2., 0.)).unwrap(); // 3 assert_eq!(l.n_vertices(), 4); l.push(Point3D::new(-2., 0., 0.)).unwrap(); // 4 -- collinear point... will be removed when closing assert_eq!(5, l.vertices.len()); l.close().unwrap(); assert_eq!(l.n_vertices(), 4); ...
Rust
0
5w"; let bytes = bech32_address_to_bytes(add); assert_ne!(0, bytes.len()) } #[test] fn test_get_private_key_from_mnemonic() { let mnemonic = "moment antenna hover credit bracket excess deny trial inspire sketch foster unable sphere toilet embody kit answer banner float position citi...
Rust
0
of this type "\70" ;; type ) "#, ) .unwrap(); let err = wasmprinter::print_bytes(&bytes).unwrap_err(); assert!( err.to_string().contains("maximum number of locals"), "{:?}", err ); } #[test] fn memarg_too_big() { let bytes = wat::pa...
Rust
0
&str = "mnemonic-length"; pub const MNEMONIC_TYPES: &[MnemonicType] = &[ MnemonicType::Words12, MnemonicType::Words15, MnemonicType::Words18, MnemonicType::Words21, MnemonicType::Words24, ]; pub const NEW_WALLET_PASSWORD_PROMPT: &str = "Enter a password for your new wallet that is at least 12 ch...
Rust
0
to compare distances computed in the previous and the current iteration (the only vertex that would need them is the starting vertex). # # In a single iteration step, for each vertex, the length of paths via each of its neighbors is computed and the smallest one is chosen. Computing path length from the starting point...
Python
1
x| Element::from_bytes(&x.into_repr().to_bytes_le())) .collect(); let commitments_el = commitments .iter() .map(|x| Element::from_bytes(&x.into_repr().to_bytes_le())) .collect(); let ext_data_hash_el = Element::from_bytes(&ext_data_hash.into_repr().to_bytes_le()); ( c...
Rust
0
; Ok(()) } fn unpack_globals<R: std::io::BufRead>(codec: &mut Codec<R>) -> Result<Globals, std::io::Error> { let date = unpack_block_date(codec)?; let chain_length = ChainLength(codec.get_u32()?); let static_params = unpack_ledger_static_parameters(codec)?; let era = unpack_time_era(codec)?; Ok...
Rust
0
// Collect the exported functions, globals and memory from the // WebAssembly module. let mut exported_functions = Vec::new(); let mut exported_globals = Vec::new(); let mut exported_memory = None; for (export_name, export) in exports { match export { ...
Rust
0
yellow(&up_arrows) } ); eprintln!( "{}", colors::dim( format!( "{}:{}:{}", module_path.to_str().unwrap(), line, col_index + 1 ) .as_str() ) ); } first = false; } } const MATRIX: [[u32; 5]; 5] = [ [131, 673, 234, 103, 18], [201, 96, 342, 965, 150], ...
Rust
0
from crewai import Crew from agents import TranscriptResearchAgents from tasks import TranscriptResearchTasks from langchain_openai import ChatOpenAI from tools.youtube_video_full_search_tool import YoutubeVideoFullSearchTool from tools.youtuve_video_transcrip_reader_tool import YoutubeVideoTranscripReaderTool import...
Python
1
d n, where n/2 = 1, for example, n=3 will make n_half=1, n_second_half=2 // use 2 * n_second_half to scale ac and t3 let n_second_half = n - n_half; let mut first = ac; for _ in 0..2 * n_second_half { first.push(0); } let mut second = t3; for _ in 0.....
Rust
0
ilder() .limits(limits) .clear_usage(ClearUsage::Yes) .build_and_run() .unwrap() .assert(CompareLimits::new(IsSuccess, limits)); TestRunnerHelper::for_simple_exec("test_clear_usage", THREADS_LOOP_500_MS, PivotRoot::Pivot) .config_builder() .limits(limits) ...
Rust
0
= "0x0f - Debug Control"] pub dbgctrl: DBGCTRL, } #[doc = "Interrupt Enable Clear\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::mo...
Rust
0
# Gerenciamento de Compras de Produtos # Você foi contratado para desenvolver um programa simples para # auxiliar em um processo de compra de produtos. O programa deve # permitir ao usuário inserir o nome e o preço de vários produtos, # perguntando se deseja continuar inserindo mais produtos após cada # entrada. Ao fin...
Python
1
_args!($($arg)*))) } /// Write formatted data into a buffer, with a newline appended. /// /// On all platforms, the newline is the LINE FEED character (`\n`/`U+000A`) alone /// (no additional CARRIAGE RETURN (`\r`/`U+000D`). /// /// For more information, see [`write!`]. For information on the format string syntax, see...
Rust
0
#!/usr/bin/env python3 import logging import socket from ctf_gameserver import checkerlib class ExampleChecker(checkerlib.BaseChecker): def place_flag(self, tick): conn = connect(self.ip) flag = checkerlib.get_flag(tick) conn.sendall('SET {} {}\n'.format(tick, flag).encode('utf-8')) ...
Python
1
import json import numpy as np tex = open('template/breadth.tex').read() data = json.load(open('data/daily_stats.json')) def get_cum_rev(arr): l = [] for i in range(len(arr)): l.append(sum(arr[:i])) return l revenue = [data[k]['revenue']/1e18 for k in data.keys()] cost = [data[k]['cost']/1e18 for...
Python
1
= (-np.log(tmpgamma) if xentropy else tmpgamma).sum(0) if err_mx.shape[0] < err_mx.shape[1]: err_mx = err_mx.T # try all alignments (permutations) of reference and detected speaker # could be written in more efficient way using dynamic programing acc = [ err_mx[perm[: err_mx.shape[1]]...
Python
1
from functools import partial choices = [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", ] def format_cot_example(example, including_answer=True): prompt = "Question:\n" question = example["question"] options...
Python
1
ference(model, im_flip, is_slide=is_slide, crop_size=crop_size, stride=stride) logit = tensor_flip(logit, flip) logit = F.interpolate(logit, [h_input, w_input], mode='bilinear'...
Python
1
if j > 0: tile = self.blend_h(row[j - 1], tile, blend_extent) result_row.append(tile[:, :, :row_limit, :row_limit]) result_rows.append(torch.cat(result_row, dim=3)) moments = torch.cat(result_rows, dim=2) posterior = DiagonalGaussianDistribution(mom...
Python
1
#!/usr/bin/env python # coding: utf-8 # Copyright (c) Saga Inc. # Distributed under the terms of the GPL License. import json from typing import Any, Dict import pandas as pd from mitosheet.is_type_utils import is_number_dtype from mitosheet.types import StepsManagerType def get_column_describe(params: Dict[str, An...
Python
1
celled(TAI_Cancelled), #[asn(key = 2, extended = false)] EmergencyAreaID_Cancelled(EmergencyAreaID_Cancelled), } #[derive(Debug, AperCodec)] #[asn(type = "CHOICE", lb = "0", ub = "2", extensible = true)] pub enum BroadcastCompletedAreaList { #[asn(key = 0, extended = false)] CellID_Broadcast(CellID_Bro...
Rust
0
try: frames = sorted(meta[2], key=lambda item: int(item.split('.')[0].split('_')[-1])) except: print(meta[0], meta[2]) if len(frames) < max(0, self.sequence_length * self.sample_every_n_frames): continue frames = [ ...
Python
1
_none")] pub description: Option<String>, /// Also known as "notes." #[serde(skip_serializing_if = "Option::is_none")] pub details: Option<String>, /// The date and time the expense took place. May differ from `created_at`. #[serde(skip_serializing_if = "Option::is_none")] pub date: Option...
Rust
0
import json from jenks import jenks def test_json(): data = json.load(open('test.json')) breaks = jenks(data, 5) assert [round(float(v), 5) for v in breaks] == \ [0.00281, 2.09355, 4.2055, 6.17815, 8.09176, 9.99798] def test_short(): data = [1, 2, 3, 100] breaks = jenks(data, 2) assert...
Python
1
accel_path}: {e}") continue samples_for_id: List[np.ndarray] = [] for _, row in labels.iterrows(): row_idx = row['id'] start_ts = row['start'] end_ts = row['end'] mask = (accel_df["timestamp"] >= start_ts) & (accel_df["timestamp"] <= end_ts)...
Python
1
from langchain_community.tools.file_management.copy import CopyFileTool, FileCopyInput __all__ = ["FileCopyInput", "CopyFileTool"]
Python
1
me) time_label.setFont(QFont("Arial", 10)) time_label.setStyleSheet("color: #757575;") title_layout.addWidget(time_label) # 如果有创建日期,也显示 if note_date: date_label = QLabel(f"创建: {note_date}") date_label.setFont(QFont(...
Python
1
), ] ] } /// generate the sidebar pub fn sidebar(model: &super::Model) -> Node<super::Msg> { nav![ C!["nav flex-column nav-pills"], model .mdf_data .interfaces .iter() .enumerate() .map(|(index, interface)| sidebar_...
Rust
0
for j in range(hFlip): hsi_g = np.flip(hsi_g,axis=0) hsi = np.flip(hsi,axis=0) msi = np.flip(msi,axis=0) # hsi_g = hsi_g[::-1,:,:] # hsi = hsi[::-1,:,:] # msi = msi[::-1,:,:] hsi = np.transpose(hsi,(2,0,1)...
Python
1
submit.click(remove_bg, [img_pil, checkbox], [mask_pil, masked_pil]) gr.Markdown("""# Recommend Colors""") with gr.Accordion("""Recommend Colors""", open=False): gr.Image(type="filepath", value=os.path.join(pwd, "favorfit_ai_gif", "3_recommend_colors.gif")) ...
Python
1
std::thread::spawn(move || { let timeout = std::time::Duration::new(cleanup_interval, 0); let timeout_start = std::time::Instant::now(); let mut timeout_remaining = timeout; loop { std::thread::park_timeout(std::time::Duration::new(cle...
Rust
0
x += encoder_features x = self.scse(x) x = self.basic_module(x) return x class FinalConv(paddle.nn.Sequential): """ A module consisting of a convolution layer (e.g. Conv3d+ReLU+GroupNorm3d) and the final 1x1 convolution which reduces the number of channels to 'out_channels'...
Python
1
usize { if height == 0 { return 0; } if height == 1 { return 1; } if eggs_num == 1 { return height; } let mut results = Vec::new(); for i in 1..height { let tmp_result = max( super_eggs(i - 1, eggs_num - 1), super_eggs(height - ...
Rust
0
hex string> <zenith timelineid as hex string> <connstr> // TODO lazy static let re = Regex::new(r"^callmemaybe ([[:xdigit:]]+) ([[:xdigit:]]+) (.*)$").unwrap(); let caps = re .captures(query_string) .ok_or_else(|| anyhow!("invalid callmemaybe: '{}'", ...
Rust
0
Matrix::translation_matrix(-anchor.x, -anchor.y) * Matrix::rotation_matrix(angle) * Matrix::translation_matrix(anchor.x, anchor.y)) ); } /* Draw the object on screen */ fn draw(&self, renderer: &Renderer); fn fill(&self, renderer: &Renderer); } <gh_s...
Rust
0
mut W { self.variant(TRIGGERED3_AW::SET) } #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[do...
Rust
0
na(&self) -> EXTMEM_CORE0_DBUS_WR_IC_INT_ENA_R { EXTMEM_CORE0_DBUS_WR_IC_INT_ENA_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4"] #[inline(always)] pub fn extmem_core0_dbus_reject_int_ena(&self) -> EXTMEM_CORE0_DBUS_REJECT_INT_ENA_R { EXTMEM_CORE0_DBUS_REJECT_INT_ENA_R::new(((se...
Rust
0
-> Endianness { self.submessage_flag.endianness() } } impl From<SubmessageFlag> for InfoTimestampSubmessageFlags { fn from(submessage_flag: SubmessageFlag) -> InfoTimestampSubmessageFlags { InfoTimestampSubmessageFlags { submessage_flag } } } impl From<InfoTimestampSubm...
Rust
0
x; padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; }} .smtp-config-form label {{ margin-top: 10px; display: block; font-weight: bold; }} .smtp-config-form input[type="checkbox"] {{ width: auto; display: inline; margin-right: 5px; }} .submit-button {{ background-...
Python
1
{ self.join_set.as_slice() } } impl fmt::Debug for Solution { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "Solution {{ model: {:?}, pre_set: {}, post_set: {}, fork_set: {}, join_set: {} }}", self.model, self.pre_set.with(&se...
Rust
0
equest, id): customer = get_object_or_404(Customer, id=id) if request.method == 'POST': customer.first_name = request.POST.get('first_name') customer.last_name = request.POST.get('last_name') customer.email = request.POST.get('email') customer.phone_number = request.POST.get('pho...
Python
1
class Solution: def groupAnagrams(self, strs: List[str]) -> List[List[str]]: ans = defaultdict(list) for s in strs: count = [0] * 26 for c in s: count[ord(c) - ord("a")] += 1 ans[tuple(count)].append(s) return ans.values()
Python
1
1.0) / 6.0 } } impl OnceDifferentiable for Trid { fn ndim(&self) -> usize { self.0 } fn value(&mut self, pos: &[f64]) -> f64 { assert_eq!(pos.len(), self.ndim()); let t1 = vsqnorm(&(1.0 - v(pos))); let t2 = vdot(&pos[1..], &pos[..pos.len()-1]); ...
Rust
0
unzoomed_roads_and_intersections(ctx) { let road = app.primary.map.get_r(r); label.add_line(Line(road.get_name(app.opts.language.as_ref())).small_heading()); // TODO Indicate which direction is uphill label.add_line(Line(format!( "{}% i...
Rust
0
# Copyright (C) 2010, 2016 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distribut...
Python
1
index: usize) -> k256::ProjectivePoint { let index_scalar = k256::Scalar::from(index as u32 + 1); // vss indices start at 1 self.coeff_commits .iter() .rev() .fold(k256::ProjectivePoint::IDENTITY, |acc, p| { acc * index_scalar + p.as_ref() ...
Rust
0
# generate URDF file from onshape CAD project import argparse import json import os from pathlib import Path import shutil if __name__ == "__main__": parser = argparse.ArgumentParser( description="Script to generate URDF file from onshape CAD project.", ) parser.add_argument( "--config", ...
Python
1
_move_type; pub mod abi_signature_type; // Copyright 2020 <NAME> // // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, ...
Rust
0
f\xf7S\xd5<\xd1%\xc48\x1c\xa7\xdf]\ ;\x00N\x9f\xfeg\x1cw\x1e\x155u\x8e)\x88\x88\ \x88\x04W]YAu\x9e\xa7\x01L\xac\x82\xe6\xc3\x9c\ ?\x00;M\x03\x04.\x00\x8c11\xe0#\x81\x9f\x8f\ Uh\xeb\x9f\x88\x88\x14\x84(\xba\x00\xa3\xdfs6\x18\ \xa7K\x89\x8e1\xc6L\x0a\xfa\xb0K\x07\xe0p`r\ \xd0\x87[\x0e:\x91\xfaqS\x1d^/\x22\x22\xe2G\ c\x04...
Python
1
#[clap(possible_values = SchemaCategory::VARIANTS, default_value = SchemaCategory::VARIANTS[0])] category: SchemaCategory, #[clap(flatten)] recipe: RecipeOpt, #[clap(flatten)] format: SchemaFormatOpt, }, /// List available groups List { #[clap(flatt...
Rust
0
attributes in generated file"), ).arg( Arg::with_name("CUSTOM_STRUCT_DERIVE") .long("custom_struct_derive") .short("C") .required(false) .takes_value(true) .help("The comma separated values to add to #[derive(...)] for ...
Rust
0
/ wasmtime_environ::WASM_PAGE_SIZE as usize) as u64 } /// Grows this WebAssembly memory by `delta` pages. /// /// This will attempt to add `delta` more pages of memory on to the end of /// this `Memory` instance. If successful this may relocate the memory and /// cause [`Memory::data_ptr`] to r...
Rust
0
325', 'lv345514113', 'lv345514225', 'lv345514561'], 'jk4' : ['lv345479991', 'lv345500329', 'lv345514118', 'lv345514231', 'lv345514567'], 'jk5' : ['lv345479993', 'lv345500330', 'lv345514126', 'lv345514239', 'lv345514569'], 'jk6' : ['lv345479994', 'lv345500332', 'lv345514132', 'lv34...
Python
1
# coding: utf-8 """ Dataddo Headless BETA API Dataddo Headless BETA API The version of the OpenAPI document: 1.0.0-beta.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 import unittest from openapi_client.models.app_authorizer...
Python
1
let rewritten_children = children.clone().try_mapped(|c| rewrite(c.into(), f))?; let casted_children = cast_to_ust(rewritten_children)?; UncheckedConjecture::CthresholdUnchecked { children: casted_children, ...
Rust
0
from rest_framework import serializers from .models import Room, Chat class ChatSerializer(serializers.ModelSerializer): class Meta: model = Chat fields = "__all__" class RoomSerializer(serializers.ModelSerializer): latest_message = serializers.SerializerMethodField() latest_message_time =...
Python
1
// Create the global operation log and first replica // and store it in the BSP kcb let log: Arc<Log<Op>> = Arc::try_new(Log::<Op>::new(LARGE_PAGE_SIZE)) .expect("Not enough memory to initialize system"); let bsp_replica = Replica::<KernelNode>::new(&log); let local_ridx = bsp_replica.regi...
Rust
0
first-kept index. let n_to_prune = bonded.iter().take_while(|&&(era_idx, _)| era_idx < first_kept).count(); // kill slashing metadata. for (pruned_era, _) in bonded.drain(..n_to_prune) { slashing::clear_era_metadata::<T>(pruned_era); } if let Some(&(_, first_session)) = bonded.first() { ...
Rust
0
st[str]=None, text_summaries: List[str]=None, image_summaries: List[str]=None, images_base64: List[str]=None, text_filenames: List[str]=None, image_filenames: List[str]=None): if text_summaries: print("Adding text summaries to store") self.store_and_...
Python
1
pos.0 + 1, units[i].pos.1), ] .contains(&unit.pos) { if (unit.hp < min) || (unit.hp == min && unit.pos.0 < best.0) || (unit.hp == min && unit.pos.0 == best.0 && unit.pos.1 < best.1...
Rust
0
pl(_) | Api::Include(_) | Api::TypeAlias(_) => Default::default(), } } } pub mod processing; pub mod utils; #[test] fn it_works() { mod my_module { use inherent_pub::inherent_pub; pub trait Foo { fn foo(self, a: i32, b: i32) -> i32; } pub struct Bar(pub i32...
Rust
0
String, } lazy_static! { static ref CONNECTION_REGEX: Regex = Regex::new(r"\[?([^\s\]]*)\]?:(\d+)->\[?([^\s\]]*)\]?:(\d+)").unwrap(); static ref LISTEN_REGEX: Regex = Regex::new(r"\[?([^\s\[\]]*)\]?:(.*)").unwrap(); } fn get_null_addr(ip_type: &str) -> &str { if ip_type.contains('4') { "0...
Rust
0
# Copyright (c) OpenMMLab. All rights reserved. import unittest from unittest import TestCase import torch from parameterized import parameterized from mmdet.structures import DetDataSample from mmdet.testing import demo_mm_inputs, get_detector_cfg from mmdet.utils import register_all_modules class TestGLIP(TestCas...
Python
1
from dataclasses import dataclass @dataclass class History: """ History of the simulator """ def __init__(self): pass
Python
1
== 0: mask = np.zeros((thumb.size[1], thumb.size[0])).astype(bool) labeled_masks.append(mask) else: all_polys = unary_union(wsi_polys) # Scale ROIs to the thumbnail size. C = sa.scale(all_polys, xfact=xfact, yfact=yfact, origin...
Python
1
write(0x1A, &tx_buf[..]); rprintln!("Result: {:?}\n{:?}", res, tx_buf); } if ctx.resources.btn3.is_low().unwrap() { rprintln!("\nREAD from address 0x1B"); let rx_buf = &mut [0; 4][..]; let res = twim.read(0x1B, rx_buf); rprintln!("Result: {:?}\...
Rust
0
vec![], vec![streamlet], ); let pkg: tydi::generator::common::Package = lib.unwrap().fancy(); assert_eq!( pkg.declare().unwrap(), "library ieee; use ieee.std_logic_1164.all; package test is component test_com port( clk : in std_logic; ...
Rust
0