text
string
label_name
string
labels
int64
(length as i64)).unwrap(); } 226 => { if length >= 14i32 { if ttstub_input_read(handle.0.as_ptr(), app_sig.as_mut_ptr(), 12i32 as size_t) != 12i32 as i64 { return -...
Rust
0
tigrigna', 'brx': 'तिग्रीन्या', 'bs': 'tigrinja', 'bs-Cyrl': 'тигриња', 'bs-Latn': 'tigrinja', 'ca': 'tigrinya', 'ca-ES-valencia': 'tigrinya', 'ccp': '𑄖𑄨𑄉𑄧𑄢𑄨𑄚𑄨𑄠', 'ce': 'тигринья', 'chr': 'ᏘᎩᎵᏂᎠ', 'ckb': 'تیگرینیا', 'cs': 'tigrinijština', 'cy': 'Tigrinya', 'da': 'tigrinya', 'de': 'Tigrinya', 'dsb': 'tigrinja',...
Python
1
# Generated by Django 4.0.7 on 2023-02-02 17:12 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("api", "0046_remove_computeplan_failed_task_category"), ] operations = [ migrations.RenameModel( old_name="Algo", new_name="Fu...
Python
1
x = 2540, z = 0, y = 33300, direction = 0, word_0E = 0, dword_10 = 4, chipIndex = 4, npcIndex = 0x0101, ...
Python
1
# 定义输入名称 input_names = [input.name for input in session.get_inputs()] # 通常是 ['event_ids', 'time_intervals', 'mask'] # 运行推理 outputs = session.run(None, { input_names[0]: event_ids_np, input_names[1]: time_intervals_np, input_names[2]: mask_np ...
Python
1
/// let b3: RfIrq0 = cortex_m::interrupt::free(|cs| RfIrq0::new(gpiob.b3, cs)); /// ``` #[inline] pub fn new(mut pin: pins::B3, cs: &CriticalSection) -> Self { use sealed::RfIrq0; pin.set_rf_irq0_af(cs); Self { pin } } /// Free the GPIO pin. /// /// # Example //...
Rust
0
# Copyright 2020, Brigham Young University-Idaho. All rights reserved. from add_area_code import add_area_code import pytest def test_add_area_code(): """Verify that the add_area_code function works correctly. Parameters: none Return: nothing """ old_phone = "656-4771" new_phone = add_area_cod...
Python
1
#[derive(Serialize, Deserialize, Debug)] pub struct State { #[serde(rename = "ociVersion")] pub version: String, pub id: String, pub status: String, #[serde(default, skip_serializing_if = "Option::is_none")] pub pid: Option<i32>, pub bundle: String, #[serde(default, skip_serializing_if = "Option::is_none")] ...
Rust
0
Err(err)) => { return Err(err.into()); } None => INVALID_TIMESTAMP, }; let buffer = BufReader::new(file); let mut rev_lines = rev_lines::RevLines::with_capacity(512, buffer)?; let file_end_time = match rev_lines.nth(0) { Some(line) => ...
Rust
0
End::new_with_reason(6.into()).into()); // hand-generated, for exit policy rejections let localhost = "127.0.0.7".parse::<IpAddr>().unwrap(); msg( cmd, "04 7f000007 00000100", &msg::End::new_exitpolicy(localhost, 256).into(), ); let addr = "2001:dbfc00:db20:35b:7399::5".pars...
Rust
0
from django.http import JsonResponse from ..models import Oferta def crear_mostrar_oferta(data): correo = data.get('correo') # print(correo) # print(data) tipo_oferta = motor_viabilidad(data) # print(tipo_oferta) oferta = Oferta(correo = correo,tipo_oferta = tipo_oferta) oferta.save() ...
Python
1
for (id, last_index) in rhs.pending.drain() { self.pending.insert(id, last_index); } for (id, last_index) in rhs.corrupted.drain() { self.corrupted.insert(id, last_index); } Ok(()) } } mod ctptrader; mod xtptrader; mod qifitrader; mod qmttrader;<filename...
Rust
0
############################### # YOU CAN EDIT THE FOLLOWINGS # ############################### # Copy config.py to private_config.py and EDIT API_KEY in private_config.py API_KEY = "sk-*** YOUR API KEY ***" USE_PROXY = False if USE_PROXY: proxies = { "http": "http://localhost:7890", "https": "ht...
Python
1
} /// Takes min along specified axes. /// /// Elements of `axes` can be negative. /// /// ``` /// extern crate ndarray; /// extern crate autograd as ag; /// /// let ref x = ag::constant(ndarray::arr2(&[[2., 4.], [3., 1.]])); /// let ref y = ag::reduce_min(&x, &[0], false); /// /// assert_eq!(y.eval(&[]), Some(ndarray:...
Rust
0
999999, }; SIGNALS.sort_by(|a, b| a.timeout_s.cmp(&b.timeout_s)); LAST_TIMEOUT_S = SIGNALS[0].timeout_s; alarm(LAST_TIMEOUT_S); f(); } } // timeout 1 // timeout 2 // -> fn set_timeout(callback: fn(), timeout_s: u32) { unsafe { SIGNALS[15] = Timeout { ...
Rust
0
""" Write a function that takes two lists and returns true if they have at least one common element. assert common_element([1,2,3,4,5], [5,6,7,8,9])==True """ def common_element(list1, list2): for i in list1: if i in list2: return True return False # assert common_element([1,2,3,4,5], [5,6,...
Python
1
ty_bloodlust(state, view, event)?, Ability::Heal | Ability::GreatHeal => visualize_event_use_ability_heal(state, view, event)?, Ability::Rage => visualize_event_use_ability_rage(state, view, event)?, Ability::Knockback => visualize_event_use_ability_knockback(state, view, event)?, Abilit...
Rust
0
values=[10,20,30,40,50,60,70,80,90] search_values= 30 found = False left=0 right=len(values)-1 while left<=right: mid=(left+right)//2 if values[mid] == search_values: found = True break elif values[mid] < search_values: left=mid+1 else: right=mid-1 if found: p...
Python
1
) step_tensor = x.reshape(b_out.shape) # Permute to match node dimension order broadcast_dims = tuple(b for b in output_labels if b not in n.dim_labels) permute = [J.dim_labels[len(broadcast_dims):].index(l) for l in n.dim_labels] step_tensor = step_tensor.permute(*permute) ...
Python
1
t.loc[0, "final_cat"] == "none" # ------------------------------------------------------------------ # # 6. Фильтрация по ground-truth # ------------------------------------------------------------------ # def test_filter_by_ground_truth(): rows = [ ("O1", "P1", "weak", "weak", 50), ("O2", "P...
Python
1
llow(unused_mut)] #![allow(unused_imports)] use fltk::browser::*; use fltk::button::*; use fltk::dialog::*; use fltk::frame::*; use fltk::group::*; use fltk::image::*; use fltk::input::*; use fltk::menu::*; use fltk::misc::*; use fltk::output::*; use fltk::prelude::*; use fltk::table::*; use fltk::text::*; use fltk::t...
Rust
0
return is False: first_return_time = time.perf_counter() has_first_return = True time_record['llm_first_return'] = round(first_return_time - t1, 2) if resp[6:].startswith("[DONE]"): if extra_msg is not None: msg_response = {...
Python
1
let kind = $kind_fn(&e); let cause = $err_fn(e); p_err!(($prom; $ret) kind, cause; $desc) }, } ); ( ($prom:ident; $ret:expr) $expr:expr => $kind_fn:expr, $err_fn:expr; $desc:expr, $($arg:tt)* ) => ( match $expr { Ok(...
Rust
0
from setuptools import setup,find_packages setup( name='mathutils', version='0.1', description='A simple python library calculating rectangle and circle area', author='Dhiraj Sapkota', packages=find_packages(), )
Python
1
g_file(args) if args.subcommand == "install-core": args.func(args) elif args.subcommand in ["list-boards", "list-menu-options"]: check_for_missing_args(args) builder = ArduinoBuilder( args.arduino_package_path, args.arduino_package_name ) builder.load_board_d...
Python
1
; for item_152 in var_151 { #[allow(unused_mut)] let mut entry_154 = list_153.entry(); crate::query_ser::serialize_structure_crate_model_tag(entry_154, item_152)?; } list_153.finish(); } writer.finish(); Ok(aws_smithy_http::body::SdkBody::from(out)...
Rust
0
import slicer # Test reading/writing color table with standard terminology information colorNode = slicer.vtkMRMLColorTableNode() colorNode.SetName("CustomColors") colorNode.SetHideFromEditors(0) colorNode.SetTypeToUser() # allow editing ("File" type would not allow editing) largestLabelValue = 10 colorNode.SetNumbe...
Python
1
military time) let remain = remain % SECS_PER_HOUR; let min = remain / SECS_PER_MIN; // ... and likewise count minutes from zero let remain = remain % SECS_PER_MIN; let sec = remain; // ... and likewise count seconds from zero let nsec = self.nsecs; // ... et cetera. f...
Rust
0
}}", indent)?; writeln!( file, "{} Ok(serde_json::from_value(response).unwrap())", indent )?; writeln!(file, "{} }}", indent)?; writeln!(file, "{}}}", indent)?; Ok(()) } /// Writes an entire definition as Rust code (`fn`). fn write_definition<W: Write>( fi...
Rust
0
# -*- coding: utf-8 -*- import pandas as pd import time import numpy as np import matplotlib.pyplot as plt from sklearn.ensemble import RandomForestClassifier from sklearn.ensemble import ExtraTreesClassifier from sklearn.ensemble import GradientBoostingClassifier from sklearn.cross_validation import cross_val_score###...
Python
1
geIns { base: QuadIns, /// TODO(JP): `pt1`, `pt2`, `alpha` are currently never used. pt1: Vec2, pt2: Vec2, alpha: f32, } static SHADER: Shader = Shader { build_geom: Some(QuadIns::build_geom), code_to_concatenate: &[ Cx::STD_SHADER, QuadIns::SHADER, code_fragment!( ...
Rust
0
from nonebot.adapters.onebot.v11 import MessageEvent from .data_source import Helper main_help = Helper().on_command("菜单", "获取食用bot的方法", aliases={"menu"}) @main_help.handle() async def _main_help(): repo = Helper().menu() await main_help.finish(repo) about_me = Helper().on_command("关于", "获取关于bot的信息", ali...
Python
1
s been modified. code_filth: Filth, // Cached address hash. address_hash: Cell<Option<H256>>, } impl From<BasicAccount> for Account { fn from(basic: BasicAccount) -> Self { Account { balance: basic.balance, nonce: basic.nonce, storage_root: basic.storage_root, storage_cache: Self::empty_storage_cache...
Rust
0
from flask import Flask, render_template, session, request from pyappdata.flask import appdata import settings import logging import json from logging.handlers import RotatingFileHandler app = Flask(__name__) app.secret_key = settings.secret_key app.config.from_object(settings.configClass) formatter = logging.Formatt...
Python
1
Self::VtLeaveAlt => { const LEAVE_ALT: &[u8] = b"?1049l"; w.write_all(CSI)?; w.write_all(LEAVE_ALT)?; w.flush()?; } Self::VtCooked => unix::vt_cooked()?, Self::VtWellDone => unix::vt_well_done()?, } Ok(()) } } /// Shorthand for `ClearScreen::default().clear()`. pub fn clear() -> Result<(...
Rust
0
3463260501").unwrap(); // let b = bignum_to_digits(&a); // assert_eq!(b.len(), 2); // let a_bytes = a.to_vec(); // let a_digits: Vec<u32> = a_bytes.chunks(4).map(|c| u32::from_be_bytes(*array_ref![c, 0, 4])).collect(); // assert_eq!(b, a_digits); // } #[test] fn test...
Rust
0
sType<'arena>, Slice<'arena, ClassType<'arena>>>, >, pub enum_type: Maybe<HhasTypeInfo<'arena>>, pub methods: Slice<'arena, HhasMethod<'arena>>, pub properties: Slice<'arena, HhasProperty<'arena>>, pub constants: Slice<'arena, HhasConstant<'arena>>, pub type_constants: Slice<'arena, HhasTypeCons...
Rust
0
redictions[0].tolist(), [30522, 1037, 2450, 3564, 2006, 1996, 3509, 2007, 2014, 3899, 102]) # image and context context = ["a picture of"] inputs = processor(images=image, text=context, return_tensors="pt").to(torch_device, torch.float16) predictions = model.generate(**inputs) ...
Python
1
<i32, TestGenericStruct<String>>), "TestGenericStructMultiType<i32, TestGenericStruct<String>>" ); assert_eq!( name_of_type!( TestGenericStructMultiType<i32, TestGenericStruct<String>>), "TestGenericStructMultiType<i32, TestGenericStruct<String>>" ); } ...
Rust
0
positions and a position, returns the index of // the line the position is on. Returns -1 if the position is located before // the first line. fn lookup_line(lines: &[BytePos], pos: BytePos) -> isize { match lines.binary_search(&pos) { Ok(line) => line as isize, Err(line) => line as isize - 1 }...
Rust
0
/// A simple signature for fast rejection pub fn simple_sig(self) -> ValueRef<'scope, 'static> { unsafe { ValueRef::wrap(self.unwrap_non_null(Private).as_ref().simplesig.cast()) } } /// The `guardsigs` field. pub fn guard_sigs(self) -> ValueRef<'scope, 'static> { unsafe { ValueRef:...
Rust
0
s.unpin_block(&cid).await.unwrap(); assert!(!ipfs.is_pinned(&cid).await.unwrap()); ipfs.exit_daemon().await; } #[test] #[should_panic] fn default_ipfs_options_disabled_when_testing() { IpfsOptions::<TestTypes>::default(); } } /*! # juniper_warp This repository contains th...
Rust
0
| { println!("Unable to open session: {}", err); std::process::exit(1); }); match matches.subcommand_name() { Some("ksp") => setup_ksp( &session, authkey, !matches.is_present("no-delete"), !matches.is_present("no-export"), ...
Rust
0
photos -> submissions (submission_id)); allow_tables_to_appear_in_same_query!( photos, submissions, ); <gh_stars>0 use std::f32; use openssl::symm::{Cipher}; use openssl::symm::{Mode, Crypter}; pub fn fixed_xor(first: &[u8], second: &[u8]) -> Vec<u8> { first.iter().zip(second).map(|(&a, &b)| a ^ b).colle...
Rust
0
# **************************************************************************** # # # # ::: :::::::: # # main.py :+: :+: :+: ...
Python
1
import httpx from flask import Flask, request, jsonify import subprocess import os app = Flask(__name__) PRELOADED_MODEL_PATH = 'models/ggml-base.en.bin' @app.route('/transcribe', methods=['POST']) def transcribe(): if 'file' not in request.files: return jsonify({'error': 'No file part'}), 400 fil...
Python
1
points.len() - 1) { let j = i + 1; // Pi -> Pj rasterize_line( &points[i], &points[j], &mut buf_lhs, &mut buf_rhs, w, h, ymin, ); } rasterize_line( &points[points.len() - 1], &poin...
Rust
0
TEXTWIDTH = 5.93 LINEWIDTH = 3.22 import matplotlib as mpl import matplotlib.pyplot as plt try: from quantum_plots import global_setup global_setup(fontsize = 10) except: pass plt.rcParams.update({"text.usetex": False, "font.size": 10}) import numpy as np from qutip import basis, fidelity, Options from qu...
Python
1
self.earliest_timestamp: self.earliest_timestamp = timestamp if self.latest_timestamp is None or timestamp > self.latest_timestamp: self.latest_timestamp = timestamp def is_expired(self) -> bool: return self.latest_timestamp - self.earliest_timestamp > self.wind...
Python
1
), })), }); let res = res.unwrap().1; assert_eq!(res, expected); } } <reponame>friedsasha/piz-rs<gh_stars>0 use std::fs::{self, File}; use std::io; use std::path::PathBuf; use anyhow::*; use log::*; use memmap::Mmap; use rayon::prelude::*; use structopt::*; use piz::read::*; #...
Rust
0
plars.append(np.array(data[i])) exemplar_vectors.append(np.array(vectors[i])) vectors = np.delete(vectors, i, axis=0) data = np.delete(data, i, axis=0) selected_exemplars = np.array(selected_exemplars) exemplar_targets = np.full(m, class_...
Python
1
ue(MoveTo(x * 5, y * 3 + 1))? .queue(Print("┃"))? .queue(MoveTo(x * 5 + 5, y * 3 + 1))? .queue(Print("┃"))? // Row 3 .queue(MoveTo(x * 5, y * 3 + 2))? .queue(Print("┃"))? .queue(MoveTo(x * 5 + 5, y * 3 + 2))? .queue(Print("┃...
Rust
0
# -*- coding: utf-8 -*- # Copyright (c) 2020 Kumagai group. from pydefect.analyzer.calc_results import CalcResults from pydefect.analyzer.calc_summary import SingleCalcSummary, CalcSummary from pydefect.analyzer.defect_structure_info import DefectStructureInfo from pydefect.analyzer.make_calc_summary import make_calc_...
Python
1
# Code generated by lark_sdk_gen. DO NOT EDIT. from pylark.lark_request import RawRequestReq, _new_method_option import attr import typing import io @attr.s class UpdateTaskReqTaskOriginHref(object): url: str = attr.ib( default="", metadata={"req_type": "json", "key": "url"} ) # 具体链接地址, 示例值:"https:/...
Python
1
g purposes. /// /// /// \in type Data type indicator to convert /// \return String representation of the type /// \warning Don't free the returned SAP_UC pointer -- its's static memory... pub fn RfcGetTypeAsString(type_: RFCTYPE) -> *const SAP_UC; } extern "C" { /// Converts an RFC_DIRECTION direction indicator...
Rust
0
# segment print("Start running segment for the last time in the whole region") start = time.time() iseg = Module("i.segment") threshold = self.module.inputs.thresholds[-1] iseg( group=self.module.inputs.group, output=self.module.outputs.output, ...
Python
1
, 0]; // Hardcoded input println!("Note: this solution uses a brute force. Part 2 takes a few seconds to finish."); println!("In release mode, it finishes in about 2-3 seconds."); println!("In dev mode, it takes about 40 seconds"); println!(); let answer1 = count_numbers(&input, 2020); let ans...
Rust
0
let pos_col2 = get_string_arg(&args_map, POS_COL2_ARG)?; let input_file_config2 = InputFileConfig::new(input_file2, id_col2, pos_col2); let output_file = get_string_arg(&args_map, OUTPUT_FILE_ARG)?; file_join::join(&input_file_config1, &input_file_config2, &output_file)?; ...
Rust
0
import datetime ano = int(input("Informeo ano de nascimento: ")) idade = ano - datetime.datetime.now().year if idade < 18: print("Pessoa maior de idade") else: print("Pesssoa menor de idade")
Python
1
# -*- coding: utf-8 -*- from asyncio import gather, run import ccxt.pro from pprint import pprint async def watch_ticker_continuously(exchange, symbol): filename = exchange.id + '-' + symbol.replace('/', '-') + '.csv' print('Watching', exchange.id, symbol, filename) keys = ['index', 'exchange', 'symbol',...
Python
1
from langchain.text_splitter import RecursiveCharacterTextSplitter def split_text(documents, chunk_size=1000, chunk_overlap=200): """Splits documents into manageable chunks.""" text_splitter = RecursiveCharacterTextSplitter( chunk_size=chunk_size, chunk_overlap=chunk_overlap ) chunks = [] f...
Python
1
ed::<()>(0); /// let (s2, r2) = bounded::<()>(0); /// let (s3, r3) = bounded::<()>(1); /// /// let mut sel = Select::new(); /// let oper1 = sel.send(&s1); /// let oper2 = sel.recv(&r2); /// let oper3 = sel.send(&s3); /// /// // Only the last operation is ready. /// let oper = sel...
Rust
0
# Copyright 2022 The ipie Developers. All Rights Reserved. # # 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...
Python
1
"project", "zone") /// .doit(); /// # } /// ``` pub struct AutoscalerInsertCall<'a, C, A> where C: 'a, A: 'a { hub: &'a AutoscalerHub<C, A>, _request: Autoscaler, _project: String, _zone: String, _delegate: Option<&'a mut Delegate>, _additional_params: HashMap<String, String>, ...
Rust
0
from arm.logicnode.arm_nodes import * @deprecated('Set Canvas Color') class CanvasSetProgressBarColorNode(ArmLogicTreeNode): """Sets the color of the given UI element.""" bl_idname = 'LNCanvasSetProgressBarColorNode' bl_label = 'Set Canvas Progress Bar Color' arm_version = 2 arm_category = 'Canvas...
Python
1
)?.checked_mul(exponent.into()) { r } else { return Err(()); }; let result: D = if let Ok(r) = exp(r) { r } else { return Err(()); }; let (result, oflw) = result.overflowing_to_num::<D>(); if oflw { return Err(()); }; Ok(result) } /// power wi...
Rust
0
} fn from_str(grid_str: &str) -> Self { let map = grid_str .lines() .map(|line| { line.chars() .filter_map(|c| PositionType::from_str(&c)) .collect() }) .collect(); Grid { map } } } impl ...
Rust
0
e in r8 ; sub rsp, 0x30 ; call rax ; add rsp, 0x30 ;; load_registers!($this) ; pop rdx );}; } // Optimized version of call_write that checks if the address is in RAM and if // so does the // write directly. Useful when this check can't be performed statically. ma...
Rust
0
e6\xe6PU\x93\x0d\xbb\xaa;\xfd.d\xb5g\ \xad\x89Z\x86\xb2J]\x9b\x82\xa2\x1b\x9d.ey\xc5\ .\xac\xde\xe3Nw\xa2\xba\xd7\xc3\x0a\xa0V\xf4&G\ \xaa\xf6\x01|\xceP`Ty#\xe8H\x8c\xa0\xc8\xf6\ \x1fA\xbe\xc2\xb8\x8al~L\xbf\xda\xc8<\xfd\xcc\x87\ \xbe\x02f\x9dc\xfa\x03\xe85\xde\x9c\xcd\xef\xa9/\x05\ }\x04Q/|+|\xbf\x98\xad\xcf\xe2'}\x01...
Python
1
-10 use select::document::Document; pub trait Crawl { type Target; fn crawl(&mut self, document: Document) -> Result<Self::Target, ()>; } <reponame>Open-Reviews/Mangrove use super::error::Error; use super::review::{Review, validate_sub}; use super::schema; use diesel_geography::sql_types::Geography; use diesel...
Rust
0
#!/usr/bin/env python # -*- coding:utf-8 -*- """ Date: 2024/10/22 15:00 Desc: 巨潮资讯-数据浏览器-筹资指标-公司配股实施方案 https://webapi.cninfo.com.cn/#/dataBrowse """ import pandas as pd import py_mini_racer import requests from akshare.datasets import get_ths_js def _get_file_content_cninfo(file: str = "cninfo.js") -> str: """ ...
Python
1
import json from requests import Request from vinetrimmer.utils.BamSDK.services import Service # noinspection PyPep8Naming class drm(Service): def widevineCertificate(self): endpoint = self.client.endpoints["widevineCertificate"] req = Request( method=endpoint.method, url...
Python
1
_outputs[1].len()); for (sequence_answer, expected_sequence_answer) in answers.iter().zip(expected_outputs.iter()) { assert_eq!(sequence_answer.len(), expected_sequence_answer.len()); for (answer, expected_answer) in sequence_answer.iter().zip(expected_sequence_answer.iter()) { a...
Rust
0
# Copyright 2019 The gRPC Authors # # 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 writ...
Python
1
import numpy as np import pandas as pd import random data_path = 'dataset/news/docword.nytimes.txt' data = pd.read_csv(data_path, sep=' ', header=None) data_ = data.to_numpy() doc_id_list = list(set(data_[:,0])) random.shuffle(doc_id_list) doc_id_list = doc_id_list[0:3000] doc_id_list = set(doc_id_list) select_raw_...
Python
1
json$Json$Decode$map, function (v) { return { a2: mkmsg(v), a6: true, ba: true }; }, elm$json$Json$Decode$value))); }); var author$project$SvgXY$onMouseDown = A2(author$project$SvgXY$sliderEvt, 'mousedown', author$project$SvgXY$SvgPress); var author$project$SvgXY$SvgUnpr...
Rust
0
ergraph mod create; mod delete; mod update; <filename>obs-client/src/utils/d3d11.rs use crate::error::ObsError; use std::ptr; use winapi::{ shared::winerror::FAILED, um::{ d3d11::{D3D11CreateDevice, ID3D11Device, ID3D11DeviceContext, ID3D11Resource, D3D11_SDK_VERSION}, d3dcommon::D3D_DRIVER_TYPE...
Rust
0
""" from https://github.com/keithito/tacotron """ """ Defines the set of symbols used in text input to the model. The default is a set of ASCII characters that works well for English or text that has been run through Unidecode. For other data, you can modify _characters. See TRAINING_DATA.md for details. """ from te...
Python
1
import logging import math import os import pickle import time import cv2 import numpy as np import tensorrt as trt import torch import _init_paths from torchvision import transforms from opts_pose import opts from centernet_tensorrt_engine import CenterNetTensorRTEngine logger = logging.getLogger(__name__) TRT_LOGGE...
Python
1
# -*- coding: utf-8 -*- from odoo import fields, models class Demo(models.TransientModel): _name = "customer.wizard" name = fields.Char(string="Name", help="what is your name") Report_issue = fields.Text(string="Report", help="what is your problem") # function for submit button in wizard start ...
Python
1
SÁNH GIỮA [BÁNH A] VÀ [BÁNH B] 📌 GIÁ BÁN [BÁNH A]: 250.000₫ [BÁNH B]: 300.000₫ 📌 KÍCH THƯỚC [BÁNH A]: 20cm, phù hợp 6-8 người [BÁNH B]: 24cm, phù hợp 10-12 người 📌 THÀNH PHẦN [BÁNH A]: Kem tươi, dâu tây [BÁNH B]: Socola, cherry 📌 ƯU ĐIỂM [BÁNH A]: Vị ngọt thanh, trái cây tươi [BÁNH B]: Đ...
Python
1
""" Exceptions raised by functions exposed by program_enrollments Django app. """ # Every `__init__` here calls empty Exception() constructor. # pylint: disable=super-init-not-called # pylint: disable=missing-class-docstring class ProgramDoesNotExistException(Exception): def __init__(self, program_uuid): ...
Python
1
0x89, 0x05,// 649 = "sgdt" 0x64,// 'd' 0x02,// Code32 0x01,// True // Sgdt_m1664 0x0A,// fword 0x89, 0x05,// 649 = "sgdt" 0x71,// 'q' 0x03,// Code64 0x01,// True // Sidt_m1632_16 0x0A,// fword 0x8A, 0x05,// 650 = "sidt" 0x77,// 'w' 0x01,// Code16 0x01,// True // Sidt_m1632 0x0A,// fword 0x8A, 0x05...
Rust
0
E11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - 12:12\\] interrupt enable 12"] #[inline(always)] pub fn adc12ie12(&self) -> ADC12IE12_R { ADC12IE12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - 13:13\\] interrupt enable 13"] #[inline(always)] pub fn ...
Rust
0
on<bool>, } /// Gets the path to the settings file fn get_settings_path() -> crate::api::Result<PathBuf> { resolve_path(".tauri-settings.json", Some(BaseDirectory::App)) } /// Write the settings to the file system. pub(crate) fn write_settings(settings: Settings) -> crate::Result<()> { let settings_path = get_set...
Rust
0
to current `ProgramTest` limitations when CPIing into the system program // // #![cfg(feature = "test-bpf")] // TODO: Uncoment when will be fixed: https://github.com/solana-labs/solana/blob/6d11d5dd9f04735be5a2c7aa4a4e8517a4417b88/program-test/src/lib.rs#L361 // use { // borsh::{BorshDeserialize, BorshSerialize, ...
Rust
0
#!/usr/bin/python3 """ Lists all values in the states tables of a database where name matches the argument """ import sys import MySQLdb if __name__ == '__main__': db = MySQLdb.connect(user=sys.argv[1], passwd=sys.argv[2], db=sys.argv[3], port=3306) cur = db.cursor() cur.execute("...
Python
1
}, #[cfg(feature = "sd")] crate::Annotation { lang: "sd", tts: Some("آمهون سامهون تلوار"), keywords: &["آمهون سامهون", "آمهون سامهون تلوار", "تلوارون", "هٿيار"], }, #[cfg(feature = "si")] crate::Annotation { lang: "si", ...
Rust
0
""" Módulo para quitar acentos y caracteres diacríticos. Este módulo contiene funciones para eliminar acentos, tildes y otros caracteres diacríticos del texto, convirtiéndolos a su equivalente ASCII. """ import unicodedata from typing import Any, Dict from .utils import validar_entrada_texto, manejar_excepcion_texto ...
Python
1
"""wxPython""" # pip install wxPython """wxPython paketi deyarli barcha operatsion tizimlarda ishlaydigan grafik interfeysli dasturlar yaratish uchun mo'ljallangan. Bu paket haqida alohida darsliklar qilish mumkin, shuning uchun biz faqatgina bitta misol bilan chegralanamiz.""" import wx from googletrans import Trans...
Python
1
" with\n".pretty() + seperate(&cases[..], &"\n".pretty()) + "\nend".pretty() } &Literal { .. } => panic!(), &Type => Doc::text("Type"), } } } impl HasSpan for Term { fn get_span(&self) -> Span { use self::Term::*; match self { ...
Rust
0
else: print('Request failed:', e) if attempt < max_retries - 1: time.sleep(current_retry_delay) current_retry_delay *= 2 # exponential backoff else: raise except requests.RequestException as e: print('Re...
Python
1
parola = ''
Python
1
e); assert_eq!(Disassembler::clean_asm(" 0000 LDA $35 "), Disassembler::clean_asm(asm)); } #[test] fn can_disassemble_zero_page_indexed_addressing() { let dasm = Disassembler::new(); let code: Vec<u8> = vec![0x95, 0x44, 0x96, 0xFE]; ...
Rust
0
i a11, sp, +XT_STK_A11 l32i a12, sp, +XT_STK_A12 l32i a13, sp, +XT_STK_A13 l32i a14, sp, +XT_STK_A14 l32i a15, sp, +XT_STK_A15 ret ", options(noreturn) ) } global_asm!( r#" .macro RESTORE_CONTEXT level:req // Restore context and retur...
Rust
0
equence 1 Tokens without Activations:\n{_format_record_for_logprob_free_simulation(example.activation_records[0], include_activations=False)}\n\n" f"Sequence 1 Tokens with Activations:\n", ) prompt_builder.add_message( Role.ASSISTANT, f"{_format_re...
Python
1
# Copyright 2025 The HuggingFace Team. All rights reserved. # # 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 applicabl...
Python
1
r_type => (RelocationKind::Elf(r_type), 0), }, elf::EM_RISCV => match reloc.r_type(endian, false) { elf::R_RISCV_32 => (RelocationKind::Absolute, 32), elf::R_RISCV_64 => (RelocationKind::Absolute, 64), r_type => (RelocationKind::Elf(r_type), 0), }, ...
Rust
0
if scene_name == target_scene and seq == target_seq: sf, ef = script_info['start_frame_id'], script_info['end_frame_id'] # 키포인트 파일 경로 (handpose 디렉토리 기준) kp_path = os.path.join(data_dir, 'handpose', scene_name, 'keypoints_3d_mano', seq + '.json') ...
Python
1
postgres::test_db::TestDB, postgres::PostgresStore, Store}; use std::{future::Future, ops::Deref, pin::Pin}; use super::*; #[derive(Clone, Debug)] struct Wrap(Arc<TestDB>); impl Deref for Wrap { type Target = Store<PostgresStore>; fn deref(&self) -> &Self::Target { &*...
Rust
0