text
string
label_name
string
labels
int64
for the assigned scores. Example format: {{ "technical_score": 85, "technical_comment": "Candidate demonstrated strong knowledge of...", "communication_score": 78, "communication_comment": "Explained concepts clearly but...", "problem_solving_score": 90, "problem_solving_comment": "Logical rea...
Python
1
s = input() countUpper = sum(1 for x in s if x.isupper()) countSlower = sum(1 for x in s if x.islower()) print(countUpper) print(countSlower)
Python
1
child_node return None # If all moves are already expanded, return none def simulate(board, current_player): """ Simulate a random playout from the given board state. Randomly play the game to completion and return the result. """ sim_b...
Python
1
.chain(generics.params.iter().filter_map(|param| { if let hir::GenericParamKind::Lifetime { .. } = &param.kind { Some(param.name.ident().as_str().to_string()) } else { None } })) .collect::<FxHashSet<String>>(); let a_to_z_repeat_n...
Rust
0
tent": unicode_content, "tags": "unicode,test,emoji", }, ) # Delete the Unicode note delete_result = await client.call_tool( "delete_note", { "project": test_project.name, "identifier": "Unicode Test Note", ...
Python
1
PubKey-Hash inside P2SH ShWpkh(Pk), /// Pay-to-ScriptHash Sh(Miniscript<Pk>), /// Pay-to-Witness-ScriptHash Wsh(Miniscript<Pk>), /// P2SH-P2WSH ShWsh(Miniscript<Pk>), } #[derive(Debug, Eq, PartialEq, Clone, Ord, PartialOrd, Hash)] pub enum DescriptorKey { PukKey(bitcoin::PublicKey), ...
Rust
0
jIQb-vg0U-h\ Ul-h-dO6KuJqB-U-tde2L-P3gHUY-vnl5c-RyO-H-gK1-zDPu-VF1oeh8W-kGzzvBbW-yuAJZ", "LwDux", "Zl-072", "Ri-Ar", "vocMSwo-cJnr-288", "kUWq-gWfQ-794", "YyzqKL-273", ...
Rust
0
tleformat{\section}[block]{\huge \bfseries\filright}{\thesection .}{1.5ex}{} \titlespacing{\section}{0pt}{0pt}{0pt} \titleformat{\subsection}[block]{\Large \bfseries\filright}{\thesubsection .}{1.5ex}{} \titlespacing{\subsection}{0pt}{0pt}{0pt} \setcounter{tocdepth}{1} \renewcommand\pagenumbering[1]{} ''', 'sphin...
Python
1
def get_dog_address(): ip = '10.0.0.143' # 查看上位机ip,进行修改 client_socket = socket.socket() client_socket.connect((ip, 40000)) msg = 'start' while True: client_socket.send(msg.encode()) data = client_socket.recv(1024).decode() result = parse_data(data) if result is not Fa...
Python
1
# SPDX-FileCopyrightText: 2019 Melissa LeBlanc-Williams for Adafruit Industries # # SPDX-License-Identifier: MIT """ `adafruit_rgb_display.st7789` ==================================================== A simple driver for the ST7789-based displays. * Author(s): Melissa LeBlanc-Williams """ try: import struct exce...
Python
1
* t * t * t + C[13] * t * t * t * t * t * t * t * t * t * t * t ...
Rust
0
# # SPDX-FileCopyrightText: Copyright (c) 1993-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # 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...
Python
1
fn random_shape_builder(builder: &mut BuilderChain) { let builder_roll = crate::rng::roll_dice(1, 16); match builder_roll { 1 => builder.start_with(CellularAutomataBuilder::new()), 2 => builder.start_with(DrunkardsWalkBuilder::open_area()), 3 => builder.start_with(DrunkardsWalkBuilder:...
Rust
0
pub model: Model, pub hash: u64, pub transform: Transform, } impl ModelComponent { pub unsafe fn draw(&self, shader: &Shader) { let matrix = self.transform.get_matrix(); shader.set_mat4(c_str!("model"), &matrix); self.model.Draw(&shader); } } <reponame>paolobarbolini/rsass //! ...
Rust
0
api).\n\nFor information about available fields see [flt](index.html) module"] pub struct FLT_SPEC; impl crate::RegisterSpec for FLT_SPEC { type Ux = u8; } #[doc = "`read()` method returns [flt::R](R) reader structure"] impl crate::Readable for FLT_SPEC { type Reader = R; } #[doc = "`write(|w| ..)` method takes...
Rust
0
g_check.isChecked(): errors += _hou_usd.validate_material_binding(self.stage) if self.render_settings_check.isChecked(): errors += _hou_usd.validate_render_primitives(self.stage) if self.attribs_check.isChecked(): errors += _hou_usd.validate_attributes(self.stage) ...
Python
1
# Codigo para um Chat conversacional no proprio terminal ''' # app.py import streamlit as st from chatbot import agent from utils.arquivos import abrir_explorador_documentos, ler_documento from utils.embeddings import verificar_relevancia from utils.historico import salvar_historico from dotenv import load_dotenv loa...
Python
1
provider: None, environment_provider: None, profile_provider: Some(profile_provider), } } } // Basic internal function for returning the time ten minutes from now. fn in_ten_minutes() -> DateTime<UTC> { UTC::now() + Duration::seconds(600) } <reponame>elsanussi-s-mneina/phonetics...
Rust
0
if byte < 0xE0 { if byte >= 0x80 { // Two-byte let second = unsafe { *(bytes.get_unchecked(read + 1)) }; let point = ((u16::from(byte) & 0x1F) << 6) | (u16::from(second) & 0x3F); unsafe { *(dst.get_unchecked_mut...
Rust
0
import allure from locators.login import LocatorsLoginPage class LoginPage: def __init__(self, app): self.app = app @allure.step("Enter username") def enter_username(self, username: str or None = None): wd = self.app.wd if username is None: username = self.app.user_em...
Python
1
ght((i, j)) => write!(f, "Right({}, {})", i, j), } } } #[derive(Debug, Clone, PartialEq)] pub struct ElementsMismatch<T, Error> { pub comparator_description: String, pub mismatches: Vec<MatrixElementComparisonFailure<T, Error>>, } impl<T, Error> Display for ElementsMismatch<T, Error> where T: ...
Rust
0
if acc.ld > self.storage.get_decided_len() { self.storage.set_decided_len(acc.ld); } } } fn handle_decide(&mut self, dec: Decide) { if self.storage.get_promise() == dec.n && self.state.1 == Phase::Accept { self.storage.set_decided_len(dec.ld); ...
Rust
0
ection logic here return False # Ensure you don't redefine 'tools' anywhere in your code before this point creator.create("FitnessMin", base.Fitness, weights=(-1.0, -1.0)) creator.create("Individual", list, fitness=creator.FitnessMin) toolbox = base.Toolbox() toolbox.register("attr_float", random.uniform, 0.01, 5...
Python
1
ochs=10, workers=4, num_batch_negs=50, num_uniform_negs=50, loss_fn='softmax', lr=0.1, early_stopping=False, regularization_coef=0.0, wd=0.0, wd_interval=50, ...
Python
1
import random import numpy as np from flatland.envs.rail_env import RailEnv from flatland.envs.rail_generators import random_rail_generator from flatland.utils.rendertools import RenderTool random.seed(100) np.random.seed(100) # Relative weights of each cell type to be used by the random rail generators. transition...
Python
1
let ctx = CommonFieldContext { timestamp: 0 }; cgroup_dumper .dump_model(&ctx, &model, &mut cgroup_content, &mut round, false) .expect("Failed to dump cgroup model"); // verify json correctness assert!(!cgroup_content.is_empty()); let mut jval: Value = serde_json::from_slice(&...
Rust
0
class Solution: def longestSpecialPath(self, edges: List[List[int]], nums: List[int]) -> List[int]: graph: list[dict[int, int]] = [{} for _ in range(len(nums))] for u, v, w in edges: graph[u][v] = w graph[v][u] = w path: list[tuple[int, int]] = [] last_occu...
Python
1
#!/usr/bin/env python3 """ turtlegraphics-example-suite: tdemo_forest.py Displays a 'forest' of 3 breadth-first-trees similar to the one in tree. For further remarks see tree.py This example is a 'breadth-first'-rewrite of a Logo program written by Erich Neuwirth. See http://homepage.univie.ac.at/er...
Python
1
expected).abs() < 0.0000006, "Wanted {name}({orig}) to be {expected} but got {actual}", name = name, orig = orig, expected = expected, actual = actual ); }; check("acos", actual_acoses, orig.acos()); } } } // FIXME: remove cfg requirement onc...
Rust
0
th PersistentDict("headers") as db: del db["headers"] Script.notify("You\'ve been logged out", "") def getHeaders(): with PersistentDict("headers") as db: return db.get("headers", False) def getTokenParams(): def magic(x): return base64.b64encode(hashlib.md5(x.encode()).digest()).decode(...
Python
1
icy, CacheableResponse}; pub use value::{CacheState, CachedValue}; #[cfg(feature = "derive")] #[doc(hidden)] pub use serde_qs as hitbox_serializer; /// The `hitbox` prelude. pub mod prelude { #[cfg(feature = "derive")] pub use crate::hitbox_serializer; pub use crate::{CacheError, Cacheable, CacheableRespo...
Rust
0
69 => voice::zh_hk::TRACY_APOLLO, 70 => voice::zh_hk::TRACY_RUS, 71 => voice::zh_hk::DANNY_APOLLO, 72 => voice::zh_tw::YATING_APOLLO, 73 => voice::zh_tw::HANHAN_RUS, 74 => voice::zh_tw::ZHIWEI_APOLLO, _ => voice::en_us::JESSA_RUS, } } #[no_mangle] pub static MODE_INT...
Rust
0
; regex_eq!(r"(ab|ab)c", "\"abc\""); regex_eq!(r"ab(cab|cat)", "\"abc\" \"bca\" (\"cab\"|\"cat\")"); regex_eq!(r"(z*(abc|def)z*)(z*(abc|def)z*)", "(\"abc\"|\"def\")"); regex_eq!(r"(z*abcz*defz*)|(z*abcz*defz*)", "\"abc\" \"def\""); regex_eq!(r"(z*abcz*defz*(ghi|jkl)z*)|(z*abcz*defz*(mno|prs)z*)", ...
Rust
0
from typing import Optional, List from .credential import CreateAuthModel from .query import QueryModel from pydantic import ( BaseModel, RootModel, ConfigDict, Field, field_serializer, StrictStr, ) from uuid import UUID from datetime import date, datetime class CreateReaderModel(CreateAuthMod...
Python
1
import os from pyhpcc.models.auth import Auth from pyhpcc.models.hpcc import HPCC # Example on uploading a file to dropzone # Configurations environment = ( "university.us-hpccsystems-dev.azure.lnrsg.io" # Eg: myuniversity.hpccsystems.io ) port = "8010" # Eg: 8010 user_name = "user_name" # HPCC username passw...
Python
1
specified timeout surpasses the user /// headroom zone (and enters the hard headroom zone). fn saturating_duration_before_timeout_exhausting_user_headroom<Traits: KernelTraits>( timeout: &Timeout<Traits>, current_time: Time32, prop_token: TimeoutPropTokenRef<'_>, ) -> Time32 { let critical_point = criti...
Rust
0
#!/usr/bin/env python # Exercise 25: Even More Practice def break_words(stuff): """This function will break up words for us.""" words = stuff.split(' ') return words def sort_words(words): """Sorts the words.""" return sorted(words) def print_first_word(words): """Prints the first word after...
Python
1
tr { debug!("listxattr {:?}", path); Err(libc::ENOSYS) } /// Remove an extended attribute for a file. /// /// * `path`: path to the file. /// * `name`: name of the attribute to remove. fn removexattr(&self, _req: RequestInfo, path: &Path, name: &OsStr) -> ResultEmpty { d...
Rust
0
_surrogate_pair( first, code, ) .map_err(|_| ())?; i.push_unescaped_char(ch); } // if we didn't have a surrogate pair, ...
Rust
0
config file. /// /// This file is packaged with the binary /// This method retrieves this included version pub fn included_continuous() -> ArmControlSettings { let json = str::from_utf8(include_bytes!("../config/motor_settings_continuous.json")).unwrap(); ArmControlSettings::...
Rust
0
ULT_MSG_TMPL_RSLV_HTML.to_string()), tmpl_cstm.5.unwrap_or(DEFAULT_MSG_TMPL_RSLV_PLAIN.to_string()) ) }, JobSMStates::Normative => unreachable!(), } } fn build( &self, args: &ZuseArgs, notifier_id: &usize, ) -> (Str...
Rust
0
"mplsXCTrapEnable": mplsXCTrapEnable, "mplsLsrNotifications": mplsLsrNotifications, "mplsLsrNotifyPrefix": mplsLsrNotifyPrefix, "mplsXCUp": mplsXCUp, "mplsXCDown": mplsXCDown, "mplsLsrConformance": mplsLsrConformance, "mplsLsrGroups": mplsLsrGroups, "mplsInterfaceGroup"...
Python
1
name: args.remove(0), status: KanbanStatus::Todo, scheduled: false, year: 0, month: 0, day: 0, hour: 0, }; vars.alert_v("🟡 Creating kanban object file...".yellow()); match save_file( format!("projection/kanban/{}", kanban_obj.ref_id).as_str(), ...
Rust
0
Some(CConversionFlags::ALTERNATE_FORM), chars.as_str()), Some('0') => (Some(CConversionFlags::ZERO_PAD), chars.as_str()), Some('-') => (Some(CConversionFlags::LEFT_ADJUST), chars.as_str()), Some(' ') => (Some(CConversionFlags::BLANK_SIGN), chars.as_str()), Some('+') => (Some(CConversionF...
Rust
0
" 'cd gui_scan/Spring/SpringBootExploit-1.3-SNAPSHOT-all && ' + java8_path + ' -jar ' + 'SpringBootExploit-1.3-SNAPSHOT-all.jar' ", 'Log4j': " 'cd gui_scan/Log4j/ && ' + java8_path + ' -jar ' + 'woodpecker-framework.1.3.3.jar' ", 'OracleShellv1.0': " ' cd gui_scan && ' + java8_pat...
Python
1
import numpy as np import matplotlib.pyplot as plt t = np.arange(0, 10.01, 0.01) x = np.sin(0.5 * np.pi * t) y = np.sin(0.5 * np.pi * t) z = x + y plt.figure() plt.subplot(2, 3, 1) plt.plot(x) plt.subplot(2, 3, 2) plt.plot(y) plt.subplot(2, 3, 3) plt.plot(z) plt.show()
Python
1
{ let bit_no = (irq_no % 32) as u32; let off = base + (((irq_no as isize) / 32) * 16); let reg = unsafe { self.base.offset(off >> 2).read_volatile() }; (reg & (1 << bit_no)) != 0 } pub fn read_irr(&self, irq_no: u8) -> bool { self.read_irq_b...
Rust
0
ttps://www.ugrasu.ru/timetable/auditory/2341", "323": "https://www.ugrasu.ru/timetable/auditory/1751", "325": "https://www.ugrasu.ru/timetable/auditory/1750", "329": "https://www.ugrasu.ru/timetable/auditory/1748", "331": "https://www.ugrasu.ru/timetable/auditory/1749", }, "2 кор...
Python
1
st every variant //! in the enum. //! //! Any earlier field or [import](#arguments) can be referenced by expressions //! in the directive. //! //! ## Examples //! //! ### Formatted error //! //! ```rust //! # use binrw::{prelude::*, io::Cursor}; //! #[derive(Debug, PartialEq)] //! struct NotSmallerError(u32, u32); //! ...
Rust
0
SYNC_CANCEL, IORING_OP_LINK_TIMEOUT, IORING_OP_CONNECT, IORING_OP_FALLOCATE, IORING_OP_OPENAT, IORING_OP_CLOSE, IORING_OP_FILES_UPDATE, IORING_OP_STATX, IORING_OP_READ, IORING_OP_WRITE, IORING_OP_FADVISE, IORING_OP_MADVISE, IORING_OP_SEND, IORING_OP_RECV, IORING_O...
Rust
0
lude::v1::*; // Access to Bencher, etc. #[cfg(test)] extern crate test; #[allow(unused_imports)] // macros from `alloc` are not used on all platforms #[macro_use] extern crate alloc as alloc_crate; #[doc(masked)] #[allow(unused_extern_crates)] extern crate libc; // We always need an unwinder currently for backtraces...
Rust
0
""" File rangetest.py: function decorator that performs range-test validation for arguments passed to any function or method. Keyword specifies arguments to the decorator. In the actual call, arguments may be passed by position or keyword, and defaults may be omitted. See rangetest_test.py, for example, use cases. """...
Python
1
from bs4 import BeautifulSoup from app.scrapers import Bing def test_parse_response(): html_text = """<li class="b_algo"> <h2><a href="mock_url">mock_title</h2> <div class="b_caption"><p>mock_desc</p> </div><li>""" dummy_soup = BeautifulSoup(html_text, 'html.parser') resp = Bing()...
Python
1
, time 4+ fn op_and_abx(&mut self, mem : &mut Mem) { let val = self.fetch_val_mode_abx(mem); self.and(mem, val); } // 0x3e, time 7 fn op_rol_abx(&mut self, mem : &mut Mem) { let addr = self.fetch_addr_mode_abx(mem); self.rol_mem(mem, addr); } // 0x3f, time 7, un...
Rust
0
""" Display Tracks ====================== """ from matplotlib import pyplot as plt import py_eddy_tracker_sample from py_eddy_tracker.observations.tracking import TrackEddiesObservations # %% # Load experimental atlas a = TrackEddiesObservations.load_file( py_eddy_tracker_sample.get_demo_path( "eddies_m...
Python
1
} } tests(); ``` */ pub async fn hset(&mut self, key: &str, values: Vec<&str>) -> Vec<String> { let result = redis::cmd("HSET") .arg(key) .arg(values) .query_async::<redis::aio::Connection, Vec<String>>(&mut self.con) .await; match result { Ok(value) => value, E...
Rust
0
extureAspect { fn default() -> Self { Self::All } } /// How edges should be handled in texture addressing. #[repr(C)] #[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)] #[cfg_attr(feature = "trace", derive(Serialize))] #[cfg_attr(feature = "replay", derive(Deserialize))] pub enum AddressMode { /// ...
Rust
0
d::fs; use petgraph::graph::{DiGraph, NodeIndex}; use petgraph::visit::EdgeRef; use std::collections::HashMap; fn main() { let lines = read_lines("input.txt"); let adapters = lines_to_numbers(&lines); let chain = get_adapter_chain(&adapters); let (diffs_1_jolt, diffs_3_jolt) = get_joltage_differences(&...
Rust
0
itive should be /// ignored; the primitive only serves to delineate a volume of space for /// participating media. This method is also used to check if two rays have /// intersected the same object by comparing their Material pointers. /// /// *NOTE*: This should never be called. Calling code should...
Rust
0
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipaySocialGamecenterGamerightsTriggerResponse(AlipayResponse): def __init__(self): super(AlipaySocialGamecenterGamerightsTriggerResponse, self).__init__() self._can...
Python
1
# Copyright (C) British Crown (Met Office) & Contributors. # This file is part of Rose, a framework for meteorological suites. # # Rose 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 L...
Python
1
await.context("QueueClient.pop")?; Ok(message.map(Message::LocalQueueMessage)) } QueueClient::Channel(queue_client) => { let message = queue_client.pop().await.context("QueueClient.pop")?; Ok(message.map(Message::LocalQueueMessage)) } ...
Rust
0
g_args assert "rtp" in ffmpeg_args assert f"udp://{camera_obj.host}:12345?bitrate=22050" in ffmpeg_args @pytest.mark.asyncio @patch("uiprotect.stream.create_subprocess_exec", new_callable=AsyncMock) async def test_ffmpeg_call_with_unknown_codec(mock_subprocess_exec, camera_obj: Camera): camera_obj.feature...
Python
1
pub fn get_headers_incorrect_hash() { let setup = setup::client::default(); let fake_hash: Hash = TestGen::hash(); assert_eq!( MockClientError::InvalidRequest(format!( "not found (block {} is not known to this node)", fake_hash )), setup.client.headers(&[fake...
Rust
0
# ***************************************************************************** # Copyright (c) 2019-2020, Intel Corporation All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions o...
Python
1
config.max_idle = 20; config.max_opened = 45; assert_rush(false, config).await; } #[tokio::test(flavor = "multi_thread")] #[serial] async fn test_close() { let cm = ConnectionManager::new(1, &Environment::Emulator("localhost:9010".to_string())) .await .un...
Rust
0
Size(_) => crate::Error::ApiNotAllowlisted("window > setMinSize".to_string()), Self::SetMaxSize(_) => crate::Error::ApiNotAllowlisted("window > setMaxSize".to_string()), Self::SetPosition(_) => crate::Error::ApiNotAllowlisted("window > setPosition".to_string()), Self::SetFullscreen(_) => { cra...
Rust
0
= thread::spawn(move || consumer_task(receiver)); /// /// let producer_overflow = producer.join().unwrap(); /// consumer.join(); /// assert!(!producer_overflow, "ring simple has overflowed"); /// } /// /// fn producer_task(sender: Sender<i32, i32>) -> bool { /// for run in 0..100000 { /// for m...
Rust
0
pecify whether `__delitem__` supports slice objects. """ if PY2: def __setslice__(i, j, other): """``x.__setslice__(i, j, other) <==> x[i:j] = other`` Use of negative indices is not supported. Deprecated since Python 2.0 but still a part of `UserList`. ...
Python
1
nlp.meta["performance"][metric] = info["other_scores"].get(metric, 0.0) for pipe_name in nlp.pipe_names: if pipe_name in info["losses"]: nlp.meta["performance"][f"{pipe_name}_loss"] = info["losses"][pipe_name] def create_before_to_disk_callback( callback: Optional[Callable[["Language"...
Python
1
use bytes::Bytes; use futures::Future; use futures::{Sink, Stream}; use protocol::{Dialer, Listener, ListenerToDialerMessage, MultistreamSelectError}; #[test] fn wrong_proto_name() { let listener = TcpListener::bind(&"127.0.0.1:0".parse().unwrap()).unwrap(); let listener_addr = list...
Rust
0
USTOM4, CUSTOM5 = bindgen::filament_VertexAttribute_CUSTOM5, CUSTOM6 = bindgen::filament_VertexAttribute_CUSTOM6, CUSTOM7 = bindgen::filament_VertexAttribute_CUSTOM7, #[num_enum(default)] UNKNOWN = u8::MAX, } impl VertexAttribute { pub fn MORPH_POSITION_0() -> Self { Self::from(bindgen:...
Rust
0
lectingEvent").get_field_strict( "locality" ), datamodel.get_table_strict("Locality").get_field_strict( "localityId" ), ), "table": datamodel.get_table_strict("Locality"), ...
Python
1
d_8e53_2bf6u64, ]), Fp([ 0x6ddd_93e2_f436_26b7u64, 0xa548_2c9a_a1cc_d7bdu64, 0x1432_4563_1883_f4bdu64, 0x2e0a_94cc_f77e_c0dbu64, 0xb028_2d48_0e56_489fu64, 0x18f4_bfcb_b436_8929u64, ]), Fp([ 0x23c5_f0c9_53...
Rust
0
r.info("未找到指纹文件,将执行初始化") return "init" # 检查指纹文件是否有效 try: with open(fingerprints_file, 'r', encoding='utf-8') as f: data = json.load(f) if "files" in data and isinstance(data["files"], dict): self.logger.info(f"发现有效指纹文件,包含{len(d...
Python
1
"""Google Places API Toolkit.""" from langchain_community.tools.google_places.tool import GooglePlacesTool __all__ = ["GooglePlacesTool"]
Python
1
ONST, LOAD_NAME, BUILD_TUPLE, BUILD_LIST, BUILD_SET, BUILD_MAP, LOAD_ATTR, COMPARE_OP, IMPORT_NAME, IMPORT_FROM, JUMP_FORWARD, JUMP_IF_FALSE_OR_POP, JUMP_IF_TRUE_OR_POP, JUMP_ABSOLUTE, POP_JUMP_IF_FALSE, POP_JUMP_IF_TRUE, LOAD_GLOBAL, CONTINUE_LOOP, ...
Rust
0
Clone, PartialEq, Eq, Hash)] pub struct Stmt<'ctx> { pub kind: StmtKind<'ctx>, pub loc: Location, } impl<'ctx> Stmt<'ctx> { pub const fn location(&self) -> Location { self.loc } pub fn span(&self) -> Span { self.loc.span() } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub ...
Rust
0
from faker import Faker from faker_file.base import DynamicTemplate from faker_file.contrib.pdf_file.pil_snippets import ( add_page_break, add_paragraph, add_picture, add_table, ) from faker_file.providers.pdf_file import PdfFileProvider from faker_file.providers.pdf_file.generators.pil_generator import...
Python
1
} } } } (y_max, valid_solutions) } fn step(pos: &mut (i32, i32), vel: &mut (i32, i32)) { pos.0 += vel.0; pos.1 += vel.1; vel.1 -= 1; match vel.0 { 1..=i32::MAX => vel.0 -= 1, i32::MIN..=-1 => vel.0 += 1, 0 => (), } } fn in_target(pos: (i32, i32...
Rust
0
import enum class TransactionType(str, enum.Enum): purchase = "purchase" renewal = "renewal" class TransactionStatus(str, enum.Enum): success = "success" failed = "failed" pending = "pending"
Python
1
write_end_tag(writer, "a:blip"); } } use crusto::aes::AES; use std::env; fn main() { let args: Vec<String>=env::args().collect(); }<gh_stars>1-10 use openvr_sys; use openvr_sys::Enum_ETrackedPropertyError::*; use subsystems::*; #[derive(Debug, Copy, Clone)] pub struct TrackedDevicePose { pub ind...
Rust
0
uting the inherent. This check is often stricter than the /// Preliminary check, because it can use more data. /// If the pallet that implements this trait depends on an inherent, that inherent **must** /// be included before this one. type FinalCanAuthor: CanAuthor<Self::AccountId>; } decl_error! { pub enum Erro...
Rust
0
"""The netdata component."""
Python
1
s(true); builder = builder.prefer_socket(false).ssl_opts(ssl_opts); } if test_compression() { builder = builder.compression(crate::Compression::default()); } builder } pub fn test_compression() -> bool { ["true", "1"].contains(&&*env::var("COMPRES...
Rust
0
from utils import load_and_append_json '''class name must be LMM''' class LMM: def load_model(self): """Initialize the model before starting inference.""" pass def query(self, loaded_model, qids, images, text_prompts, prediction_file, sample_num, temperature, top_p=0.95, top_k=20, max_new_tok...
Python
1
l_customers_in_system.append(customers_in_system) return np.mean(results), all_customers_in_system def Simulate_Part_A(): # Parameters lambdas = [1, 5] mu1s = [2, 4] mu2s = [3, 4] Ts = [10, 50, 100, 1000] q1_initial_length = 0 # According to the lab requirements, q = 0 initially Number...
Python
1
# single-scale training and multi-scale testing setting proposed in mip-splatting import os import GPUtil from concurrent.futures import ThreadPoolExecutor import queue import time scenes = ["ship", "drums", "ficus", "hotdog", "lego", "materials", "mic", "chair"] factors = [1] * len(scenes) output_dir = "benchmark_n...
Python
1
# -*- coding: utf-8 -*- """ Created on Mon Mar 6 20:34:32 2023 # Add 3D information from text file into SD file. @author: Dell-User """ from scipy.io import savemat, loadmat import numpy as np # SD file path sd_2D = r'C:\Users\Dell-User\Dropbox\MOANA\Homer3\new_moana3_probe\MOANA3_RIGIDFLEX_4BY4_SOMATOSENSORY.SD' ...
Python
1
''' Array loop with numpy has many possibilities for solving and calculating in a list especially for integer list''' import numpy as np my_array = np.array([2, 3, 4, 55, 690, 77, 88, 90, 909]) my_second_array = np.array([59, 40, 59, 6, 71, 92, 12, 90, 80]) result = my_array + my_second_array # plural tow list in inde...
Python
1
import numpy as np def GetAreas(index, x, y, z=np.array([])): """GetAreas - compute areas or volumes of elements compute areas of triangular elements or volumes of pentahedrons Usage: areas = GetAreas(index, x, y) volumes = GetAreas(index, x, y, z) Examples: areas = GetAreas...
Python
1
r common shapes such as rectangles and circles. Let's have a look at how //! to obtain the fill tessellation a rectangle with rounded corners: //! //! ``` //! use lyon::math::{rect, Point}; //! use lyon::tessellation::{VertexBuffers, FillOptions}; //! use lyon::tessellation::basic_shapes::*; //! use lyon::tessellation:...
Rust
0
deserializing)] pub queue: Vec<(String, PipelineFn)>, } impl Serialize for Pipeline { fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer, { let mut seq = serializer.serialize_seq(Some(self.queue.len()))?; for &(ref name, _) in &self.queue { ...
Rust
0
E = 8; } } pub const GTK_APPLICATION_INHIBIT_LOGOUT: GtkApplicationInhibitFlags = GtkApplicationInhibitFlags::LOGOUT; pub const GTK_APPLICATION_INHIBIT_SWITCH: GtkApplicationInhibitFlags = GtkApplicationInhibitFlags::SWITCH; pub const GTK_APPLICATION_INHIBIT_SUSPEND: GtkApplicationInhibitFlags = GtkApplicationInhib...
Rust
0
get_stream_id(&self) -> Option<GString>; #[cfg(any(feature = "v1_12", feature = "dox"))] fn get_task_state(&self) -> TaskState; fn has_current_caps(&self) -> bool; fn is_active(&self) -> bool; fn is_blocked(&self) -> bool; fn is_blocking(&self) -> bool; fn is_linked(&self) -> bool; ...
Rust
0
gPlatform\"`*"] pub const FWP_FILTER_ENUM_FLAG_INCLUDE_BOOTTIME: u32 = 8u32; #[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFilteringPlatform\"`*"] pub const FWP_FILTER_ENUM_FLAG_INCLUDE_DISABLED: u32 = 16u32; #[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFilteringPlatform\"`*"] pub con...
Rust
0
] = [0; 1024]; let mut n: [u8; 24] = [0; 24]; let mut mr = [0; 1024]; let mut c = [0; 1024]; *index_fixed!(&mut m; ..32) = [0u8; 32]; rng.fill_bytes(&mut m[32..]); rng.fill_bytes(&mut k[..]); rng.fill_bytes(&mut n[..]); so...
Rust
0
lab_coord_iter.map(|coord| { let n = n.clone(); let dataset = dataset.clone(); let slab_img_buff = slab_img_buff.clone(); let data_attrs = data_attrs.clone(); let elide_fill_value = elide_fill_value.clone(); async move { let slab_r...
Rust
0
Qt.Orientation.Horizontal) self.interval_slider.setRange(10, 3600) self.interval_slider.setValue(180) self.interval_slider.valueChanged.connect(self.interval_spin.setValue) self.interval_spin.valueChanged.connect(self.interval_slider.setValue) interval_layout.addRow("快速调节:", self...
Python
1
# Copyright 2022 Flower Labs GmbH. 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 la...
Python
1