text
string
label_name
string
labels
int64
from typing import Final SENTINEL_FLOAT_FAILURE_VALUE: Final[float] = -1. SENTINEL_INT_FAILURE_VALUE: Final[int] = -1 SENTINEL_STRING_FAILURE_VALUE: Final[str] = "N/A" PRICING_DATA_PER_MILLION_TOKENS = { "gpt-4o": { "input": 2.50, "output": 10.00, }, "gpt-4o-2024-11-20": { "input":...
Python
1
Flags = NodeFlags(1); } impl NodeFlags { pub const Render: NodeFlags = NodeFlags(2); } impl NodeFlags { pub const Templated: NodeFlags = NodeFlags(4); } impl NodeFlags { pub const Locked: NodeFlags = NodeFlags(8); } impl NodeFlags { pub const Editable: NodeFlags = NodeFlags(16); } impl NodeFlags { p...
Rust
0
ter_with_clone)] pub struct ResponseOptions { pub body: Option<String>, } impl ResponseOptions { pub fn with_body(body: impl AsRef<str>) -> Self { Self { body: Some(body.as_ref().to_string()), } } } use num_bigint::BigInt; pub const OFFSET_BITS: u32 = 16; const N_FLAGS: u32 = 1...
Rust
0
for segment in diarization: speaker_segments.append( { "start": segment["start"], "end": segment["end"], "speaker": f"SPEAKER_{segment['speaker']}", } ) return speaker_segments def process...
Python
1
import requests import json import time def get_crypto_data(): url = 'https://api.coingecko.com/api/v3/coins/markets' params = { 'vs_currency': 'usd', 'order': 'market_cap_desc', 'per_page': 10, 'page': 1, 'sparkline': False, 'price_change_percentage': '1h,24h,7d...
Python
1
"""Focoos CLI Commands Module. This module contains all the command implementations for the Focoos Command Line Interface. Each command is implemented as a standalone function that can be used both programmatically and through the CLI interface. The module provides implementations for the core Focoos functionality: ...
Python
1
{ return None; } Some(Self { ptr: new_begin as *mut RawPage, size: (new_end - new_begin) / PAGE_SIZE, }) } pub fn into_raw(self) -> *mut RawPage { let ptr = self.ptr; mem::forget(self); ptr } pub fn clear(&mut self) ...
Rust
0
# Author: Aphane Jimmy from data import countries_and_capitals, countries, capitals, countries_capitals_dictionary import project import re def main(): project.write_countries_capitals_to_file("data.txt") project.save_capitals() if __name__ == "__main__": main()
Python
1
eld of message type `foo/Bar`, it can /// reference the field as `foo/Bar`, and would put in this variant. GlobalMessage(MessagePath), } /// All possible names for a signed 1 byte integer in ROS messages. #[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum I8Variant { /// Represen...
Rust
0
cted(start_lhs, 0, std::ops::Bound::Included(l)) .flat_map(move |t| { let it_aligned = self .tok_helper .get_gs_left_token() .get_ingoing_edges(t) .filter(move |n| ...
Rust
0
assert_eq!(text.local_value(), ""); } #[test] fn test_replace() { let mut text = Text::new(); let op1 = text.replace(0, 0, "Hěllo Ťhere").unwrap().unwrap(); let op2 = text.replace(7, 3, "").unwrap().unwrap(); let op3 = text.replace(9, 1, "stwhile").unwrap().unwrap(); assert_eq!(text.local_value(),...
Rust
0
d: ")?; Display::fmt(id, f) } Self::NoEmojiFound => f.write_str("no emoji id found"), Self::NoMatchingEmojis => f.write_str("no matching emojis in supplied text"), } } } impl Error for KatzeError {} #![feature(async_closure)] use std::{fs::File, io::Rea...
Rust
0
from time import sleep from huawei_lte_api.Connection import Connection from huawei_lte_api.Client import Client from huawei_lte_api.enums.net import NetworkModeEnum from dotenv import dotenv_values from utils import Config, send_discord_notification config = dotenv_values(".env") connection_string = f'http://{Config....
Python
1
#!/usr/bin/env python # coding: utf-8 # The goal of this script is to plot the total CMB temperature spectrum C_l^TT, # as well as its decomposition in different contributions: # - T + SW: intrinsic temperature plus Sachs-Wolfe correction # - early-ISW: early integrated Sachs-Wolfe # - late-ISW: late integrated Sachs-...
Python
1
CLIENT_HANDLES.with(|global_handles| { let _ = global_handles.lock().unwrap().insert(HashMap::new()); }); // Start listening for new clients. let rpc_queue = RPC_QUEUE.with(|queue| Arc::clone(queue)); let handles = CLIENT_HANDLES.with(|handles| Arc::clone(handles)); thread::spawn(|| rp...
Rust
0
let c = chars[i]; if let Some(n) = c.to_digit(10) { buffer.push_str(&captures[n as usize]); } else if c == '\\' { buffer.push('\\'); } else { panic!("Invalid REGEXP_REPLACE pattern"...
Rust
0
we can just terminate the request. let _ = responder.send(); } } } } #[fasync::run_singlethreaded] async fn main() -> Result<(), Error> { // Outgoing `svc` directory provides the `internal.a2dp.Controller` capability. let mut fs = ServiceFs::new(); fs.dir("svc").add_...
Rust
0
from mistralrs import ( Runner, Which, ChatCompletionRequest, Architecture, AnyMoeConfig, AnyMoeExpertType, ) runner = Runner( which=Which.Plain( model_id="mistralai/Mistral-7B-Instruct-v0.1", arch=Architecture.Mistral, ), anymoe_config=AnyMoeConfig( hidden_s...
Python
1
turn retval def getAbscissasFromPoints2d(points2d): retval= [] for p in points2d: retval.append(p[0]) return retval def getOrdinatesFromPoints2d(points2d): retval= [] for p in points2d: retval.append(p[1]) return retval def getPointsProfilAlongPline3d(points,spacement): x= getAbscissasFromPlin...
Python
1
import tkinter as tk import random with open("./task28/lodicky.txt", "r") as f: width, height = f.readline().strip().split(" ") l_map = [line.strip("\n").replace(" ","") for line in f.readlines()] root = tk.Tk() canvas = tk.Canvas(root,width=550,height=400) canvas.pack() def create_map(l_map: list)-> None: ...
Python
1
רים", Parsha::Vaeschanan => "ואתחנן", Parsha::Eikev => "עקב", Parsha::Reeh => "ראה", Parsha::Shoftim => "שופטים", Parsha::KiSeitzei => "כי תצא", Parsha::KiSavoh => "כי תבוא", Parsha::NitzavimVayelech => "ניצב...
Rust
0
pherKind::*; match *self { SS_TABLE | SS_RC4_MD5 | AES_128_CTR | AES_192_CTR | AES_256_CTR | AES_128_CFB1 | AES_128_CFB8 | AES_128_CFB128 | AES_192_CFB1 | AES_192_CFB8 | AES_192_CFB128 | AES_256_CFB1 | AES_256_CFB8 | AES_256_CFB128 | AES_128_OFB | AES_192_OFB | AES_256_OFB |...
Rust
0
of round-trip cycle') # plt.tight_layout() # plt.savefig('cycle_dist.png') # print('已保存周期分布图:cycle_dist.png') # # # 3.4 港口地图 # m = folium.Map(location=[ais.LAT.mean(), ais.LON.mean()], zoom_start=8) # folium.PolyLine(ais[['LAT','LON']].values, color='gray', weight=1.5, opacity=0.4).add_to(m...
Python
1
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog, QTableWidgetItem from main_ui0713 import Ui_MainWindow from input_correct import Ui_Dialog from myclass import CPoint3d, CMatrix, CRotMat, CPointPair from utils import compute_xy_estimate import math as m impo...
Python
1
noised_gt_box=None, noised_gt_onehot=None, attn_mask=None, targets=None, valid_bboxes_single = None, record_len=None, pairwise_t_matrix=None, pairwise_t_matrix_ref=None, score_mask=None): ''' 通信使用稀疏特征图,先做融合再走ConQueR的pipeline, 流程为: ⚡️方案一 需要额外建立第二次Encoder的损失 undo 1️⃣ 所有Feature一起经过Encoder 得...
Python
1
{ buf[0] } } impl Viewable for u16 { fn size() -> usize { 2 } fn view(buf: &[u8]) -> u16 { use std::convert::TryFrom; let bytes = <[u8; 2]>::try_from(&buf[0..2]).unwrap(); u16::from_le_bytes(bytes) } } impl Viewable for u32 { fn size() -> usize { 4 } fn view(buf: &[u8]) ->...
Rust
0
000000000001" negative_int1: "-5", "5", "-10" negative_int2: "-10", "5", "-15" negative_int3: "5", "-10", "15" negative_int4: "-555555", "999999", "-1555554" negative_int5: "-10", "-10", "0" negative_float1: "-0.1", "0.1", "-0.2" negati...
Rust
0
ld_hasher!(Hasher128, Hash64AtOnce); impl_build_hasher!(Hasher128, Hash128AtOnce); } /// /// t1ha1 = 64-bit, BASELINE FAST PORTABLE HASH: /// /// - Runs faster on 64-bit platforms in other cases may runs slowly. /// - Portable and stable, returns same 64-bit result /// on all architectures and CPUs. ///...
Rust
0
] fn test_takes_void() { let result = Spi::get_one::<()>("SELECT takes_void(NULL::void);"); assert_eq!(result, None) } #[pg_test] fn test_returns_void() { let result = Spi::get_one::<()>("SELECT returns_void();"); assert_eq!(result, None) } #[pg_test] fn tes...
Rust
0
from dotenv import load_dotenv from os import getenv from aiogram import Bot, Dispatcher, Router from aiogram.enums import ParseMode from aiogram.filters import CommandStart from aiogram.types import Message from . routers import default_router, film_router # Завантажимо дані середовища з файлу .env(За замовчування...
Python
1
rl = url::Url::from_file_path(env::current_dir().unwrap()).unwrap(); /// url = url.join("samples/hello-world-simple/context.toml").unwrap(); /// flowclib::loader::loader::load_process(&parent_route, &alias, &url, &dummy_provider).unwrap(); /// ``` // TODO Make this more ergonomic for clients and tests using some form o...
Rust
0
''' What: Advent of Code 2024 - Day 03 Who: Josh Geiser ''' from pathlib import Path import re #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ def read_input(infile): with open(infile, 'r') as f: data = f.readlines() data = [x.strip() for x in data] return...
Python
1
import pandas as pd import streamlit as st from datetime import datetime, timedelta # --- Setup --- st.set_page_config(page_title="Fleet Maintenance Dashboard", layout="wide") st.title("✈️ Fleet Maintenance Scheduler") # --- Load Data --- df = pd.read_csv("data/fleet_status.csv", parse_dates=["last_check"]) # --- Ca...
Python
1
import heapq def dijkstra(matrix, start, end): height = len(matrix) width = len(matrix[0]) directions = [(0, -1), (0, 1), (-1, 0), (1, 0)] # north, south, west, east visited = [[0 for _ in range(width)] for _ in range(height)] previous_node = [[None for _ in range(width)] for _ in range(height)] ...
Python
1
n, 'meta.pkl'), 'wb') as f: cPickle.dump(meta, f, protocol=2) with open(os.path.join(write_dir_val, 'meta.pkl'), 'wb') as f: cPickle.dump(meta, f, protocol=2) my_rng = np.random.RandomState(seed = 0) # create file groups gs = FILE_GROUP_SIZE groups = [ HDF5_FILE...
Python
1
import os from typing import Optional try: from pydantic import BaseSettings, Field except ImportError: # Fallback for older pydantic versions from pydantic.v1 import BaseSettings, Field class Settings(BaseSettings): """Application configuration settings loaded from environment variables.""" ...
Python
1
, 1), size: Some(4), ty: Float}, A2B10G10R10UintPack32 => {vk: A2B10G10R10_UINT_PACK32, bdim: (1, 1), size: Some(4), ty: Uint}, A2B10G10R10SintPack32 => {vk: A2B10G10R10_SINT_PACK32, bdim: (1, 1), size: Some(4), ty: Sint}, R16Unorm => {vk: R16_UNORM, bdim: (1, 1), size: Some(2), ty: Float}, R16Snorm => ...
Rust
0
"""Unit tests for currency exchange support""" import os import sys sys.path.append(os.path.abspath(os.path.dirname(__file__))) from test_api import InvenTreeTestCase # noqa: E402 from inventree.currency import CurrencyManager # noqa: E402 class CurrencyTest(InvenTreeTestCase): """Tests for currency suppor...
Python
1
sor(feats,1)) self.reset_param(self.scorer) self.k = k def reset_param(self,t): #Initialize based on the number of rows stdv = 1. / math.sqrt(t.size(0)) t.data.uniform_(-stdv,stdv) def forward(self,node_embs,mask): scores = node_embs.matmul(self.scorer)...
Python
1
import json input_jsonl_file = "input_data.jsonl" input_json_file = "input_data.json" with open(input_json_file, 'r') as json_file: data = json.load(json_file) # Write to a JSONL file with open(input_jsonl_file, 'w') as jsonl_file: for entry in data: jsonl_file.write(json.dumps(entry) + '\n') print("Conve...
Python
1
ag_resource_response(response) } } } <reponame>keroro520/testground-sdk-rust-public<gh_stars>0 use crate::runtime::test_utils::random_test_run_env; use crate::sync::client::Client; use crate::sync::types::{Payload, Topic}; use crossbeam_channel::Receiver; use redis::Commands; use std::thread::{sleep, spawn}...
Rust
0
import sys try: from unittest.mock import Mock except ImportError: from mock import Mock from django.test import TestCase from eraserhead.model_instance_wrapper import ModelInstanceWrapper class ModelInstanceWrapperTestCase(TestCase): def setUp(self): super(ModelInstanceWrapperTestCase, self).s...
Python
1
Point2<f64>; use gdnative::prelude::*; use nalgebra as na; fn point3_to_variant(p: &Point3) -> Vector3 { let x = p.coords[0] as f32; let y = p.coords[1] as f32; let z = p.coords[2] as f32; Vector3::new(x, y, z) } fn point2_to_variant(p: &Point2) -> Vector2 { let x = p.coords[0] as f32; let y ...
Rust
0
.shape[-2:] concat_points_uvd[..., 0] /= img_w concat_points_uvd[..., 1] /= img_h concat_points_uvd[..., :2] = (concat_points_uvd[..., :2] - 0.5) * 2 results['points_uv'] = concat_points_uvd else: points_uvd = self.project_points(points, r...
Python
1
())] ); } #[test] fn test_parse_block() { assert_eq!( parse("<template></template>").unwrap(), vec![Section::Block(Block { name: BlockName::try_from("template").unwrap(), attributes: vec![], content: Cow::default() ...
Rust
0
window.draw(|canvas| { canvas.clear_background(Color::RAYWHITE); canvas.draw_text("Color palette", 20, 30, 20, Color::DARKGRAY); items.iter_mut().for_each(|item| { canvas.draw_rectangle_rec( item.rectangle, item.color ...
Rust
0
/// Create a new verbosity object set to a specific level pub fn new(level: Level) -> Self { Self { level: level } } /// Get a string representation of the level pub fn get_level(&self) -> &str { match self.level { Level::Off => { "off" } ...
Rust
0
ady existing configuration."), "usage": "\n\n certbot enhance [options]\n\n" }), ("show_account", { "short": "Show account details from an ACME server", "opts": 'Options useful for the "show_account" subcommand:', "usage": "\n\n certbot show_account [options]\n\n" }), (...
Python
1
[cfg(test)] mod test { use crate::prelude::*; use std::io::Cursor; #[test] fn read_json() { let basic_json = r#"{"a":1, "b":2.0, "c":false, "d":"4"} {"a":-10, "b":-3.5, "c":true, "d":"4"} {"a":2, "b":0.6, "c":false, "d":"text"} {"a":1, "b":2.0, "c":false, "d":"4"} {"a":7, "b":-3.5, "c":true, "d...
Rust
0
received") for part in mime_msg.walk(): if part.get_content_type() == 'text/html': payload = part.get_payload(decode=True) return payload.decode('utf-8', errors='ignore') @keyword def get_mail_by_subjects(self, subject1, subject2): subj1 = su...
Python
1
number[1] * 10 + number[2]; if number_value <= 0x20 || number_value >= 0x7f { result.push(number_value); token = false; } else { return None; } } continue;...
Rust
0
_not_same_side(&self, piece_from: char, piece_to: char) -> bool { piece_from.is_ascii_lowercase() != piece_to.is_ascii_lowercase() } /// 棋子检测 /// /// 检测指定位置是否存在棋子。 /// /// * `position` - 指定位置。 fn is_empty(&self, position: usize) -> bool { self.positions[position].is_none() ...
Rust
0
((buffer[2] as i16) | ((buffer[3] as i16) << 8)) as f32; let temperature = ((temperature_raw * calibration_data.temp_slope + calibration_data.temp_intercept) * 100.0) as usize; buffer[0] = CTRL_REG1; // TODO(alevy): this is a worka...
Rust
0
# -*- coding: utf-8 -*- # # test_connect_after_simulate.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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...
Python
1
import streamlit as st from pytube import YouTube # Ya no es necesario el ssl (?) import ssl ssl._create_default_https_context = ssl._create_stdlib_context class Downloader(): def video_downloader_interface(self): url = st.text_input("Inserte la url") audio = st.checkbox("Descargar solo el a...
Python
1
.map_err(|err| AppError::Tera(err))?; Ok(Html(body)) } } }use std::sync::{Arc, Mutex}; use std::time::Instant; use std::fmt::{self, Debug}; use tracing::{debug, trace}; use anyhow::{Result, Error}; use wasmtime::{Memory, Store, Engine, Module, Func, Caller, Extern, Trap, Insta...
Rust
0
(&sql, |pairs| { for (i, (_, value)) in pairs.iter().enumerate() { assert_eq!(*value.as_ref().unwrap(), expects[i]); } true }).unwrap(); } #[test] fn iterate_2sets() { let conn = prepare(); let expects = ["Alice", "Bob", "Carol", "...
Rust
0
array) == row_index + 1: row = array[row_index] else: # This should never happen raise ValueError("There was an error unflattening the extension.") if len(row) == column_index: row.append(value) ...
Python
1
import os import re import uuid import zmq.green as zmq from cloudasr.models import UsersModel, RecordingsModel from cloudasr.messages.helpers import * def create_recordings_saver(address, model): def create_socket(): context = zmq.Context() socket = context.socket(zmq.PULL) socket.bind(add...
Python
1
.name); SpaceActionEnum::MovePlayer(10) } } pub fn initialize_game_board() -> Vec::<Box<dyn BoardSpace>> { let mut space_defs = Vec::<Box<dyn BoardSpace>>::with_capacity(40); space_defs.insert(0, Box::new(BasicSpace::new("Go".white().bold()))); space_defs.insert(1, Box::new(Ba...
Rust
0
FN_keywords = extract_keyword(FN_captions) # keywords_class_1 # calculate similarity print('Start calculating scores..') FN_similarity = calc_similarity(image_dir, df[FN]['img_filename'], FN_keywords) # similarity_wrong_class_1 TP_similarity = calc_similarity(image_dir, df[TP]['img_filename'], FN_k...
Python
1
ighbors } fn offset(&self, x: isize, y: isize) -> Loc { Loc { x: (self.x as isize + x) as usize, y: (self.y as isize + y) as usize, } } } #[cfg(test)] mod tests { use super::*; use line_reader::read_str_to_lines; #[test] fn key_for_door() { a...
Rust
0
import os import os.path as osp import numpy as np import cv2 from multiprocessing import Pool import glob import argparse import shutil import pathlib def main(): parser = argparse.ArgumentParser(description='A multi-thread tool to crop sub images') parser.add_argument('--src_path', type=str, default='/data/...
Python
1
from flask import Flask, render_template, request import pandas as pd import numpy as np import pickle app = Flask(__name__) # Load models safely with open('co2_random.pkl', 'rb') as f: random = pickle.load(f) with open('co2_decision.pkl', 'rb') as f: decision = pickle.load(f) @app.route('/') def index(): ...
Python
1
from dotenv import load_dotenv import itertools import time import backend import twitter load_dotenv() from dotenv import load_dotenv load_dotenv() def automated(): usernames = ["paulg","tylerdurdy", "tylerdurdy", "naval", "Jason","tylerdurdy", "nntaleb","caitoz","tylerdurdy"] usernames_cycle = iterto...
Python
1
tor2<f32>, settings: &Settings, ); fn update( &mut self, _editor_scene: &mut EditorScene, _camera: Handle<Node>, _engine: &mut GameEngine, ) { } fn activate(&mut self, _editor_scene: &EditorScene, _engine: &mut GameEngine) {} fn deactivate(&mut self, ed...
Rust
0
thods = [ (name, method) for name, method in sorted(vars(TarTest).items()) if name.startswith('test_') and callable(method) ] # Run all tests for i, (name, method) in enumerate(test_methods, 1): # Convert test_method_name to "Method Name" test_name = name[5:].replace('_'...
Python
1
return (obj and obj.rigid_body) def _add_constraint(self, context, object1, object2): if object1 == object2: return if self.pivot_type == 'ACTIVE': loc = object1.location elif self.pivot_type == 'SELECTED': loc = object2.location else: ...
Python
1
["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context": [ { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": ...
Rust
0
[RRnURU"SS55 URR U"SS55 UR R U"SS55 URRU"SS55...
Python
1
, K> where K: Ord + Clone + StepLite, V: Eq + Clone, { /// Makes a new empty `RangeInclusiveMap`. pub fn new() -> Self { Self::new_with_step_fns() } } impl<K, V, StepFnsT> RangeInclusiveMap<K, V, StepFnsT> where K: Ord + Clone, V: Eq + Clone, StepFnsT: StepFns<K>, { /// Make...
Rust
0
shares the same marker type. /// /// See also [crate documentation](index.html). /// /// [`TCellOwner`]: struct.TCellOwner.html pub struct TCell<Q, T> { // Use *const to disable Send and Sync, which are then re-enabled // below under certain conditions owner: PhantomData<*const Q>, value: UnsafeCell<T>...
Rust
0
_class[i]['时间'])): #插入到该天最后一节课之后 cla_week_class[i]['时间'].insert(j+1,change[1]["时间"]) cla_week_class[i]['地点'].insert(j+1,change[1]["地点"]) #有课程名要插入课程名 cla_week_class[i]['课程名'].insert(j+1,change[1]["课程名"]) elif(num>num...
Python
1
"$feature_flag_response": variant, feature_flag_property: variant, "$feature_flag": feature_flag.key, "$user_id": f"user_{variant}_{i}", }, timestamp=datetime(2023, 1, i + 1), ) ...
Python
1
reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gpt](gpt) module"] pub type GPT = c...
Rust
0
T: PartialOrd + Copy> Eq for Interval<T> { } #[cfg(feature = "serde")] impl<T: PartialOrd + Copy + Serialize> Serialize for Interval<T> { fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> { (self.start, self.end).serialize(serializer) } } #[cfg(feature = "serde")] impl<'de, ...
Rust
0
00<?xpacket beg\ in=\x22\xef\xbb\xbf\x22 id=\x22W5M\ 0MpCehiHzreSzNTc\ zkc9d\x22?> <x:xmpm\ eta xmlns:x=\x22ado\ be:ns:meta/\x22 x:x\ mptk=\x22Adobe XMP \ Core 5.6-c148 79\ .164036, 2019/08\ /13-01:06:57 \ \x22> <rdf:RDF \ xmlns:rdf=\x22http:\ //www.w3.org/199\ 9/02/22-rdf-synt\ ax-ns#\x22> <rdf:De\ scription rd...
Python
1
; for sf in self.sheets.iter() { let str = format!("<Relationship Id=\"rId{}\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet\" Target=\"worksheets/sheet{}.xml\"/>", sf.id + 2, sf.id); writer.write_all(str.as_bytes())?; rid = sf.id + 2; ...
Rust
0
rint 2 4 # include higher order corrections in decays (0 = LO, 1 = NLO, 2 = NNLO, 3 = N^3LO, 4 = N^4LO ) 3 1 # use Thomson alpha(0) instead of alpha(m) in decays to γγ and γZ 4 2 # off-shell decays into VV pair 5 1 6 1 7 1 8 0 ...
Python
1
: f.diff() # needs sympy Piecewise((0, (x > 0) & (x < 1)), (1, (x >= 1) & (x <= 2))) sage: ex = piecewise([((-100, -2), 1/x), ((1, +oo), cos(x))]) sage: g = ex._sympy_(); g ...
Python
1
rs"); let mut out = File::create(&dest_path).unwrap(); out.write_all( b"#[doc(hidden)] #[cfg_attr(feature = \"cargo-clippy\", allow(unreadable_literal, type_complexity))] pub const VENDORS: &[((EtherAddr, u64), (&str, &str))] = &[\n", ).unwrap(); for ((prefix, prefix_len), (name, desc)) in par...
Rust
0
artesian_product(0..self.w()) } } // Constructors impl Board { pub fn beginner() -> Result<Self, ()> { Self::new(Dim::Square(9), 10) } pub fn intermediate() -> Result<Self, ()> { Self::new(Dim::Square(16), 40) } pub fn advanced() -> Result<Self, ()> { Self::new(Dim::Re...
Rust
0
pagination """ self._given_oauth_and_profiles(http_mocker, self._config) http_mocker.get( SponsoredBrandsRequestBuilder.keywords_endpoint(self._config["client_id"], self._config["access_token"], self._config["profiles"][0], limit=100).build(), SponsoredBrandsResponseBuil...
Python
1
LD.is_raw()); assert!(PieceType::SILVER.is_raw()); assert!(PieceType::BISHOP.is_raw()); assert!(PieceType::ROOK.is_raw()); assert!(PieceType::PAWN.is_raw()); } #[test] fn get_piece_test() { assert!(PieceType::NO_PIECE_TYPE.get_piece(Color::WHITE) == Piece::NO_PIECE); // White assert!(Piece...
Rust
0
me = ann['video_name'].split('.')[0] if name != ann_name: save_name = name + "_" + save_name drag_folder = f"{save_folder}/{ann_name}/{save_name}" if not os.path.exists(drag_folder): os.makedirs(drag_folder, exist_ok=True) # Save tracks inf...
Python
1
Option<&Values> { Some(&self.series) } fn get_bounds(&self) -> Bounds { self.series.get_bounds() } } /// A set of arrows. pub struct Arrows { pub(super) origins: Values, pub(super) tips: Values, pub(super) color: Color32, pub(super) name: String, pub(super) highlight: ...
Rust
0
112, 97, 98, 105, 108, 105, 116, 121, 31, 114, 101, 115, 116, 111, 114, 101, 95, 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 95, 116, 111, 95, 112, 114, 105, 118, 105, 108, 101, 103, 101, 22, 117, 112, 100, 97, 116, 101, 95, 109, 105, 110, 116, 105, 110, 103, 95, 97, 98, ...
Rust
0
"""Qt module for VTK/Python. Example usage: import sys import PyQt5 from PyQt5.QtWidgets import QApplication from vtkmodules.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor app = QApplication(sys.argv) widget = QVTKRenderWindowInteractor() widget.Initialize() widget.S...
Python
1
// CHECK: %{{[0-9]+}} = call <4 x i32> @llvm.uadd.sat.v4i32(<4 x i32> %{{[0-9]+}}, <4 x i32> %{{[0-9]+}}) simd_saturating_add(x, y) } // CHECK-LABEL: @uadd_u32x8 #[no_mangle] pub unsafe fn uadd_u32x8(x: u32x8, y: u32x8) -> u32x8 { // CHECK: %{{[0-9]+}} = call <8 x i32> @llvm.uadd.sat.v8i32(<8 x i32> %{{[0-9...
Rust
0
upParams { sequence_id: SequenceId, controller_input: ControllerInput, mirrored: Mirrored, } #[derive(Debug)] struct ExpectedParams { sequence_id: SequenceId, mirrored: Mirrored, } } use clap::Parser; /// Removes a particular group #[derive(Parser)] pub struct ...
Rust
0
f'{REMOVING_FILE_PREFIX} "{path.join(GlobalVariables.PSEUDOCODE_PATH.value, "*.exe")}"', ] REMOVE_APKS: list = [ f'{REMOVING_FILE_PREFIX} "{path.join(GlobalVariables.APK_PATH.value, "*.apk")}"', f'{REMOVING_FILE_PREFIX} "{path.join(GlobalVariables.BASE_PATH.value, "*_decompiled.zip")}"', ] ...
Python
1
matrix_for_joint(joints, index)); } matrices } <gh_stars>1-10 use crate::{position::Rect, style::Style, Drawing, Shape, ShapeType}; use algebr::Vec2; #[derive(Debug, Clone)] pub struct EmbeddedDrawing { pub(crate) pos: Rect, pub(crate) style: Option<Style>, pub(crate) shapes: Vec<Shape>, } crate::i...
Rust
0
panic!("tried to multiply matrices with incompatible dimensions.") } Mat::new( self.rows, other.cols, get_box_iter(self.rows, other.cols) .map(|(r, c)| { self.get_row_iter(r) .zip(other.get_col_it...
Rust
0
o = self.get_assignment_targets_info( pool_ids, employee_ids) for k, res_cnt in assignments_map.items(): pool_id, employee_id = k pool = targets_info['pools'].get(pool_id) owner = targets_info['employees'].get(employee_id) meta = dict( ...
Python
1
لومات بالشكل التالي:\n" "<code>username مدة</code>\n" "مثال:\n<code>someusername 7d</code>\n" "أو <code>someusername lifetime</code>\n\n" "إذا أردت إدخال user_id مباشرة، اكتبه بدل username.\n" "ثم سيُنشئ البوت صلاحية حسب المدخل." ) await query.edit_message_text(text, pars...
Python
1
overflow, and does not support different rounding methods."] #[doc = ""] #[doc = " @see av_rescale(), av_rescale_q(), av_rescale_q_rnd()"] pub fn av_rescale_rnd(a: i64, b: i64, c: i64, rnd: AVRounding) -> i64; } extern "C" { #[doc = " Rescale a 64-bit integer by 2 rational numbers."] #[doc = ""] ...
Rust
0
let (u, fu) = find_first(G::BaseField::one(), |u| { let fu: G::BaseField = curve_eqn::<G>(u); if fu.is_zero() { None } else { Some((u, fu)) } }); let two = G::BaseField::one() + G::BaseField::one(); let three ...
Rust
0
city_fly_up = """ 🏙 🛫 _*Введите город вылета:*_ """ city_fly_down = """ 🏙 🪂 _*Введите город прилета:*_ """ date_fly_up = """ 📅 🗺️⁀જ✈ _*Введите дату вылета \(ГГГГ\-ММ\-ДД\):*_ """ date_fly_down = """ 📅 🗺️⁀જ✈ _*Введите дату обратного рейса \(или напишите 'нет'\):*_ """ quantity_peoples_for_fly = """ 👥 _*Вв...
Python
1
ath) elif ismath: parse = self._text2path.mathtext_parser.parse(s, 72, prop) return parse.width, parse.height, parse.depth elif mpl.rcParams[self._use_afm_rc_name]: font = self._get_font_afm(prop) l, b, w, h, d = font.get_str_bbox_and_descent(s) ...
Python
1
# WARNING: Please don't edit this file. It was generated by Python/WinRT v0.9.210202.1 import typing, winrt import enum _ns_module = winrt._import_ns_module("Windows.Foundation.Metadata") class AttributeTargets(enum.IntFlag): ALL = 0xffffffff DELEGATE = 0x1 ENUM = 0x2 EVENT = 0x4 FIELD = 0x8 ...
Python
1