text
string
label_name
string
labels
int64
ccessLevel.value return template @staticmethod def deserialize(data, graph): pinClass = findPinClassByType(data["dataType"]) varUid = uuid.UUID(data["uuid"]) var = graph.getApp().variablesWidget.createVariable( dataType=data["dataType"], accessLevel=Acce...
Python
1
TxtCtl.Enter, ), ) CloseMessageWindow() NpcTalk( 0x001E, '老人的声音', ( '#0340111639V#4P你们……\n', '这不是艾丝蒂尔和约修亚嘛!', TxtCtl.Enter, ), ) CloseMessageWindow() OP_62(0x0101, 0x00000000, 2000, 0x02, 0x07, 0x00000050, 0x01) ...
Python
1
, 'yrl': 'Yudãniya', 'yue': '約旦', 'yue-Hans': '约旦', 'yue-Hant': '約旦', 'zgh': 'ⵍⵓⵔⴷⵓⵏ', 'zh': '约旦', 'zh-Hans': '约旦', 'zh-Hant': '約旦', 'zu': 'i-Jordan'}, 'JP': {'af': 'Japan', 'agq': 'Dzàkpân', 'ak': 'Gyapan', 'am': 'ጃፓን', 'ar': 'اليابان', 'as': 'জাপান', 'asa': 'Japani', 'ast': 'Xapón', 'az': 'Yaponiya', 'az-Cyrl': '...
Python
1
import json from .oauth import OAuth2Test class SlackOAuth2Test(OAuth2Test): backend_path = 'social_core.backends.slack.SlackOAuth2' user_data_url = 'https://slack.com/api/users.identity' access_token_body = json.dumps({ 'access_token': 'foobar', 'token_type': 'bearer' }) user_dat...
Python
1
from itertools import permutations graph = 'AF AE ED EH FD FC DB HB CG GB HG'.split() matrix = '367 568 18 58 247 127 156 234'.split() print(*range(1, 9)) for i in permutations('ABCDEFGH'): if all(str(i.index(x) + 1) in matrix[i.index(y)] for x, y in graph): print(*i)
Python
1
or_insert(0) += count; } } pairs = next; } let mut counts = HashMap::new(); // first letter counts.insert(input.to_vec()[0], 1); for (s, value) in pairs.iter() { let c = s.to_vec()[1]; *counts.entry(c).or_insert(0) += value; } let mut x = counts....
Rust
0
t(args.return_delay_time)) with DxlIOPort(serial_port, timeout=args.timeout) as io: io.set_return_delay_time({args.id: args.return_delay_time}) time.sleep(.5) check(io.get_return_delay_time([args.id])[0] == args.return_delay_time, 'Could not set return dela...
Python
1
arg = {} elif isinstance(arg, self.__class__): arg = arg.to_plotly_json() elif isinstance(arg, dict): arg = _copy.copy(arg) else: raise ValueError("""\ The first argument to the plotly.graph_objs.choroplethmap.marker.Line constructor must be a dict or ...
Python
1
<$type>::$init($token) }; { @init binary_op_impl, $type:ty, $token:ident, $init:ident } => { (<$type>::$init($token), <$type>::$init($token)) }; { @init binary_scalar_op_impl, $type:ty, $token:ident, $init:ident } => { <$type>::$init($token) }; { ...
Rust
0
s.AVAILABLE) print(f"Driver {ride.get_driver().get_name()} completed ride {ride.get_id()} and is now available.") def cancel_ride(self, ride_id: str, cancelled_by: User) -> None: with self.processing_lock: self.ride_service.cancel_ride(ride_id, cancelled_by) ride = self....
Python
1
class Solution: def uncommonFromSentences(self, A: str, B: str) -> List[str]: count = collections.Counter((A + ' ' + B).split()) return [word for word, freq in count.items() if freq == 1]
Python
1
tion': self.distribution_manager.get_distribution_metrics(), 'parallel_reporting': self.reporting_manager.get_reporting_status(), 'isolation_status': self.get_status_report() } def _setup_cleanup_hooks(self): """Setup cleanup hooks for proper resource management.""" ...
Python
1
"""Creates local .streamlit/secrets.toml from secret in Google Secret Manager We can run this from our app code or standalone.""" import os import streamlit as st from utils import retrieve_secret from config import logger @st.cache_resource def create_secrets_toml(google_project_id: str): streamlit_dir = ".str...
Python
1
test_conic_section(self): """Export a conic section. This tests a more "exotic" geometry type.""" cone = Cone(8, 0, 16, align=None) section_plane = Plane.XZ.offset(4) conic_section = section_plane.to_local_coords(section(cone, section_plane)) ExportersTestCase.basic_comb...
Python
1
he RL algorithm if isinstance(env.unwrapped, DirectMARLEnv): env = multi_agent_to_single_agent(env) # wrap around environment for rsl-rl env = RslRlVecEnvWrapper(env) # create runner from rsl-rl runner = OnPolicyRunner(env, agent_cfg.to_dict(), log_dir=log_dir, device=agent_cfg.device) ...
Python
1
} } } if range[0] < 0 { 0 } else { range[1] - range[0] + 1 } } /// 剑指 Offer 53 - II. 0~n-1中缺失的数字 https://leetcode-cn.com/problems/que-shi-de-shu-zi-lcof/ /// 方法1:逐个遍历 pub fn missing_number(nums: Vec<i32>) -> i32 { for (idx, val) in nums.iter().enumerate() { ...
Rust
0
#!/usr/bin/python # -*- coding: utf-8 -*- # # Licensed under the GNU General Public License, version 3. # See the file http://www.gnu.org/licenses/gpl.txt from pisi.actionsapi import shelltools from pisi.actionsapi import autotools from pisi.actionsapi import pisitools from pisi.actionsapi import get major = ".".join...
Python
1
103a} ဂျပန\u{103a} သင\u{103a}\u{1039}ကေတ", ], }, #[cfg(feature = "nb")] crate::Annotation { lang: "nb", tts: Some("japansk tegn for nybegynner"), keywords: &[ "grønn og gul", "grønt og gult blad", "ja...
Rust
0
led), /// as to match behaviour with the [original implementation]. To prevent this, /// use with the `ignore_garbage` option. /// /// If the base65536 stream continues after a terminating padding character, /// [`Error::InvalidLength`] is returned. /// /// # Examples /// /// ```rust /// # fn test() -> Result<(), Box<s...
Rust
0
let mut transcript = Transcript::new(b"Share Circuit"); let mut verifier = Verifier::new(&mut transcript); //Verify expiry_ts range let var_ts = verifier.commit(coms_vec[0][0]); let quantity_ts = AllocatedQuantity{variable: var_ts, assignment: None}; let var_a = verifier.c...
Rust
0
dd_argument( "--weights", nargs="+", type=float, help="concat weights; one for each dataset" ) parser.add_argument( "--topk", type=int, default=100, help="top-k retrieval results will be saved in the output." ) parser.add_argument( "--pooling", type=str, default='...
Python
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Word list originally created by dabura667 and released under The MIT License (MIT) # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to dea...
Python
1
st_err, order_dependent_trait_objects, illegal_floating_point_literal_pattern, improper_ctypes, late_bound_lifetime_arguments, non_camel_case_types, non_shorthand_field_patterns, non_snake_case, non_upper_case_globals, no_mangle_generic_items, path_statements, private_in_publ...
Rust
0
import subprocess from join_method_test import JoinMethodTest from join_index_test import JoinIndexTest from join_like_test import JoinLikeTest from join_between_test import JoinBetweenTest EMPLOYEES_NUMBER_LIST = [1000, 10000, 100000] #EMPLOYEES_NUMBER_LIST = [10000] NUM_OF_DEPARTMENTS = 100 if __name__ == "__main_...
Python
1
=0.0, expected_volumetric_dice=0.0) def test_both_empty_masks(self): mask_gt = np.zeros((128, 128, 128), np.bool) mask_pred = np.zeros((128, 128, 128), np.bool) surface_distances = surface_distance.compute_surface_distances( mask_gt, mask_pred, spacing_mm=(3, 2, 1)) self._assert_metri...
Python
1
list.sort(); } CountTrips { departures_per_mode, } } fn count(&self, mode: TripMode, t1: Time, t2: Time) -> usize { // TODO Could binary search or even have a cursor to remember the position between queries. // Be careful with binary_search_by_key...
Rust
0
# Copyright (C) 2015 KillerInstinct # # 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 3 of the License, or # (at your option) any later version. # # This program is distributed in...
Python
1
offset = len(self) for i, module in enumerate(modules): self.add_module(str(offset + i), module) return self class ParameterList(Module): r"""Holds parameters in a list. ParameterList can be indexed like a regular Python list, but parameters it contains are properly registered...
Python
1
on a slice of bytes. pub fn from_bytes(bytes: &[u8]) -> Result<Self, Error> { if bytes.len() != 65 { return Err(Error::InvalidSignatureLength); } let r = Uint256::from_bytes_be(&bytes[0..32]).unwrap(); let s = Uint256::from_bytes_be(&bytes[32..64]).unwrap(); let...
Rust
0
if 'emotion' not in client_modules and 'facial' not in client_modules: return {"error": f"Emotion or facial module required for {display_name}"} # Process image frame result = server.process_image_frame(frame_data) # Log the result ...
Python
1
9 => (CodecMode::CELTOnly, Bandwidth::Full, FrameSizeMs::Five), 30 => (CodecMode::CELTOnly, Bandwidth::Full, FrameSizeMs::Ten), 31 => (CodecMode::CELTOnly, Bandwidth::Full, FrameSizeMs::Twenty), _ => return Err(Error::InvalidCodecConfig), }; Ok(CodecConfig { mode, ba...
Rust
0
64 support (see `std::num::flt2dec`, maybe?) /*! Compile-time size optimization for numeric primitives. Macros return smallest numeric type capable of fitting a static bounds. For unsigned integers, macro input is a maximum. For signed integers, macro input may be a maximum or a minimum. * Can save memory at zero run...
Rust
0
rprq)rrr __class__s rrPairingHeap._Node.__init__, G S (DIDIDIDKrrnrorqrp r%r&r'r(r)r*rr+ __classcell__)rus@r_Noderj 7   rr{c0>[TU]5 S...
Python
1
el.TRITON_CC]: if not is_fx_tracing() and kernel == HammerKernel.TRITON: torch._assert(delta_q.is_cuda, "q must be CUDA tensor") torch._assert(seq_offsets.is_cuda, "seq_offsets must be CUDA tensor") torch._assert( delta_x_offsets.is_cuda, "delta_x_offsets must...
Python
1
) { if unsafe { self.fst.is_final_unchecked(s) } { self.coaccess[s] = true; } if self.dfnumber[s] == self.lowlink[s] { let mut scc_coaccess = false; let mut i = self.scc_stack.len(); let mut t; loop { i -= 1; ...
Rust
0
np.frombuffer(ptr, dtype=np.uint8).reshape(self.screen_shape) self.config.display.update(buf, direct_update) # self.config.check_time("draw_display end") def show_popup(self, title, timeout=None): asyncio.create_task( self.msg_queue.put( { "t...
Python
1
pk) => Ok(PublicKey(pk)), None => Err(SchnorrError::SerError), } } /// Derive this public key from its corresponding `SecretKey`. pub fn from_secret(secret_key: &SecretKey) -> PublicKey { Self::from_secret_uncompressed(secret_key.as_scalar()) } /// Helper Function to co...
Rust
0
id == n_threads - 1 { end -= 1; } for i in beg..end { for j in 1..SIZE - 1 { new[i][j] = (old[i - 1][j] + old[i + 1][j] + old[i][j + 1] ...
Rust
0
f, cursor_mem: &mut HashMap<&str, usize>) -> SceneParams { cursor_mem.insert(MAP_CURSOR_ID, self.highlighted); cursor_mem.insert(VARIANT_CURSOR_ID, self.variant_highlighted); return SceneParams::AlgoSelection { map: self.maps[self.selected.unwrap()].clone(), variant: self...
Rust
0
and the secret access key for AWS S3 from respective environment variables. /// /// Required environment variables: /// /// * `AWS_ACCESS_KEY_ID` /// * `AWS_SECRET_ACCESS_KEY` /// /// Optional environment variables: /// /// * `AWS_TOKEN` /// /// Return an error if required environment variables are missing. pub fn ...
Rust
0
if role == "author": editable_fields.remove("voted") editable_fields.extend(['anonymous', 'raw_body', 'title', 'topic_id', 'type']) elif role == FORUM_ROLE_MODERATOR: editable_fields.extend(['close_reason_code', 'closed', 'edit_reason_code', 'pinned', ...
Python
1
# Generated by Django 4.2.7 on 2023-11-26 05:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('policia', '0004_especialidad_remove_policia_especialidad_and_more'), ] operations = [ migrations.AlterField( model_name='especia...
Python
1
rap_frame.a7, trap_frame.a6, params); // Return the return value to TrapFrame trap_frame.a0 = ans.error; trap_frame.a1 = ans.value; // Skip ecall instruction mepc::write(mepc::read().wrapping_add(4)); } Trap::Interrupt(Interrupt::MachineSoft) =...
Rust
0
import matplotlib.pyplot as plt import pandas as pd import numpy as np plt.rcParams["font.family"] = "Arial" fontsize=39 fig = plt.gcf() columns = ['cache', 'pytorch', 'minio', 'sff'] # ssd, 24 workers, 8 v100 df = pd.read_csv('data.csv', sep='\t', header=None, names=columns) num_subcategories = 3 pytorch_values ...
Python
1
"""Operadores aritmeticos en python""" """sumas en python""" resta_1 = 50 - 100 resta_2 = 1500 - 500 resta_3 = 20.9 - 500 - 1500 print("el tipo de datos de resta es: {}".format(type(resta_1))) print("el tipo de datos de resta es: {}".format(type(resta_2))) print("el tipo de datos de resta es: {}".format(type(resta_...
Python
1
::RGB(r, g,b) => println!("RGB的颜色 R:{}, G:{}, B:{}", r, g, b ), Color::HSV(h,s,v) => println!("HSV H:{:}, S:{:}, V:{:}", h, s, v), Color::CMY(c,m,y) => println!("CMY C:{:?}, M:{:?}, Y:{:?}",c, m, y) } match hsv { HSV::HSV(h,s,v) => println!("...
Rust
0
#!/usr/bin/env python3 # Copyright 2019 The Crashpad 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 applica...
Python
1
} pub fn select<R, F>(&self, rng: &mut R, id: SoundId, mut func: F) where R: Rng + ?Sized, F: FnMut(AudioId, EmitterParameters), { select_sounds(rng, &self.sounds[id.0], &mut func) } } fn select_sounds<R, F>(rng: &mut R, node: &AudioNode, func: &mut F) where R: Rng + ?Sized...
Rust
0
from logging import getLogger from traceback import print_exc from util.callbacks import callsback from util.xml_tag import tag, post_xml import urllib2 import httplib log = getLogger('yahoohttp') def y_webrequest(url, data, cookies): headers = {'Cookie': cookies['Y'] + '; ' + cookies['T'], 'User-A...
Python
1
; } ); ) fn easy0() -> Regex { regex!("ABCDEFGHIJKLMNOPQRSTUVWXYZ$") } fn easy1() -> Regex { regex!("A[AB]B[BC]C[CD]D[DE]E[EF]F[FG]G[GH]H[HI]I[IJ]J$") } fn medium() -> Regex { regex!("[XYZ]ABCDEFGHIJKLMNOPQRSTUVWXYZ$") } fn hard() -> Regex { regex!("[ -~]*ABCDEFGHIJKLMNOPQRSTUVWXYZ$") } fn gen_text(n: uin...
Rust
0
ch = np.apply_along_axis(rare, 1, x, size) return rich else: if len(size) != x.shape[0]: msg = 'length of size does not match number of rows' raise ValueError(msg) N = np.nansum(x, axis=1) ...
Python
1
eeds to be identical" assert (res2.T_D != res1.T_D), \ "T_D of the different processes are Identical. Needs to be different" assert (math.isclose(res2.tau_R, res5.tau_R, rel_tol=1e-02)), \ "tau_R of the same process differ. Needs to be identical" print("\tpassed") def test_optimization_Ru...
Python
1
LE_HOMING_SPEED { desired_velo } else { let desired_diff_norm = vec2_normalized(desired_diff); vec2_add( base.0.velo, vec2_s...
Rust
0
t `Vec` //~| ERROR: expected value, found builtin type `i32` //~| ERROR: attempted to take value of method `collect` on type `std::ops::Range<i32>` //let ramp = (0 .. n).collect::<Vec<i32>>(); // ok, using ::< ramp //~^ ERROR: mismatched types } } fn main() {} <filename>src...
Rust
0
import subprocess import csv import argparse # Create the parser parser = argparse.ArgumentParser() # Add an argument parser.add_argument('env', type=str, help="local or das6") parser.add_argument('node', type=int, help="How many node?") parser.add_argument('app', type=str, help="sor_source_data or ping pong") parser...
Python
1
def nms(dets, classes, hierarchy, thresh=0.8): scores = [findall(hierarchy, filter_=lambda node: node.LabelName.lower( ) == cls)[0].height for cls in classes] x1 = dets[:, 0] y1 = dets[:, 1] x2 = dets[:, 2] y2 = dets[:, 3] areas = (x2 - x1 + 1) * (y2 - y1 + 1) scores = np.array(score...
Python
1
n, ymin, xmax, ymax, new_width, new_height = useful_list ocr_result_list = [] for box_ocr_res in ocr_res: p1, p2, p3, p4 = box_ocr_res # average_angle_degrees = calculate_angle_degrees(box_ocr_res[0]) # if average_angle_degrees > 0.5: poly = [p1, p2, p3, p4] if (p3[0] -...
Python
1
VOTES_BOUND, VALIDATOR_REGISTRY_LIMIT, EPOCHS_PER_HISTORICAL_VECTOR, EPOCHS_PER_SLASHINGS_VECTOR, MAX_VALIDATORS_PER_COMMITTEE, PENDING_ATTESTATIONS_BOUND, >, context: &Context, ) { let current_epoch = get_current_epoch(state, context); let next_epoch = current_ep...
Rust
0
=> CollyParser::rule_error(&pair)?, } } Ok(Event::ParenthesisedEvent(ParenthesisedEvent { inner: groups, methods, })) } } // #[derive(Debug, Clone, PartialEq)] pub struct PatternAtom { pub value: PatternAtomValue, pub methods: Vec<EventMethod>, ...
Rust
0
% n; match RSA::mod_inv(&e, &et) { Err(_) => continue, Ok(d) => { return RSA { e: e.to_owned(), n: n.to_owned(), d: d.to_owned(), pubkey: (e.clone(), n.clone()...
Rust
0
#!/usr/bin/env python # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software...
Python
1
from socket import * import random import time serverPort = 12000 serverSocket = socket(AF_INET, SOCK_DGRAM) serverSocket.bind(('127.0.0.1', serverPort)) # List to store known router IDs known_router_ids = [] print("Receiver is ready to receive") while True: message, clientAddress = serverSocket.recvfrom(1024) ...
Python
1
rry, anger, happiness, and distress. The model was trained and validated entirely offline using PyTorch, HuggingFace Transformers, and local GPU/CPU. """) # Team information with st.sidebar.expander("👥 Team", expanded=False): st.write(""" ### Authors - Tyle...
Python
1
onse.strip() == "": st.warning("Please enter both student name and response.") else: assigned_role = random.choice(scenarios[selected_scenario]["roles"]) total_score, matched_keywords, feedback = score_response(student_response, assigned_role) st.subheader("Scoring Breakdown") ...
Python
1
ts_milliseconds, ts_milliseconds_option}, DateTime, Utc, }; use serde::Serialize; use serde_with::skip_serializing_none; use sqlx::Result; use tracing::instrument; use super::Database; type UtcTime = DateTime<Utc>; #[skip_serializing_none] #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct...
Rust
0
import os os.system('cls') import mysql.connector connection = mysql.connector.connect( host='localhost', user='root', password='', database='controlescolar' ) if connection.is_connected(): print("Conexión exitosa a la base de datos MySQL") #EJEMPLO CONSULTA SELECT cursor = connection.cursor() ...
Python
1
stream use crate::utils::nanotime; use serde_yaml::Value; use simd_json::json; use std::time::Duration; // Metrics imports use serde::{Deserialize, Serialize}; // MountInfo imports // SysInfo Imports // ProcInfo imports use libc; use proc_mounts::{self, MountIter}; use std::ffi::CString; use std::path::PathBuf; #[d...
Rust
0
theme for HTML and epub output is # usually not wise. This defaults to 'epub', a theme designed to save visual # space. #epub_theme = 'epub' # The language of the text. It defaults to the language option # or en if the language is not set. #epub_language = '' # The scheme of the identifier. Typical schemes are ISBN o...
Python
1
get_valid_units(from_parsed, target_parsed) if from_parsed is None or target_parsed is None: response.confidence = 0.0 else: from_value = self.unit_registry.Quantity(float(n), from_parsed) target_value = from_value.to(target_parsed) response.confidence = ...
Python
1
1(\x03R\talg\ orithm\"B\n\x0bFailureKind\x12\x0b\n\x07UNKNOWN\x10\0\x12\x14\n\x10REDZO\ NE_MODIFIED\x10\x01\x12\x10\n\x0cWRONG_RESULT\x10\x02B\x05\n\x03key\"\ \xcc\x02\n\rAutotuningLog\x12*\n\x05instr\x18\x01\x20\x01(\x0b2\x14.goog\ le.protobuf.AnyR\x05instr\x124\n\x07results\x18\x02\x20\x03(\x0b2\x1a.t...
Rust
0
[5]) >> 39) | (((!self.players)&MASKS[11]) << 13) ) // ); // check diago 2 ^> let d2 = (p) & ((p&MASKS[6]) >> 11) & (((!self.players)&MASKS[7]) >> 22) & (((!self.players)&MASKS[12]) << 11); // | ( // (p) // & ((p&MASKS[7]) >> 22) // & (((!self.players)&M...
Rust
0
ters): command = """INSERT INTO {} (""".format(self.tablename) for p in parameters: command = """{}{}, """.format(command, p) # remove the last comma and space command = command[:-2] command = """{}) VALUES(""".format(command) for p in parameters: ...
Python
1
"==" => Ok((ss, Symbol::Equal)), "!=" => Ok((ss, Symbol::NotEqual)), "+=" => Ok((ss, Symbol::AddAssign)), "-=" => Ok((ss, Symbol::SubAssign)), "*=" => Ok((ss, Symbol::MulAssign)), "/=" => Ok((ss, Symbol::DivAssign)), "%=" => Ok((ss, Symbol::ModAssign)), "*...
Rust
0
.at(SD1_DST.into()) .build() } fn systemd_sd1_call(method: &str) -> MarshalledMessage { message_builder::MessageBuilder::new() .call(method.into()) .with_interface("org.freedesktop.systemd1.Manager".into()) .on(SD1_PATH.into()) .at(SD1_DST.into()) .build() } fn s...
Rust
0
import numpy as np import cv2 import matplotlib.pyplot as plt # Compute Fourier transform and extract ratio of first-order to DC component def compute_rf_ratio(image, plot_first_order=False, image_index=1): # Ensure image is grayscale if len(image.shape) != 2: print("Error: Image is not grayscale.") ...
Python
1
t_into(versions::table) .values(&new_version) .get_result(conn) .expect("Error saving new post") } pub fn by_app_id(app_id: &i32, conn: &diesel::PgConnection) -> QueryResult<Vec<Self>> { versions::table .filter(versions::app_id.eq(app_id)) .order(versions::build.desc()) .loa...
Rust
0
)), .. }, ], ), .. }) => { let f_name = path_as_rust_name(&def_id_to_vir_path(bctx.ctxt.tcx, *fun_id)); if f_name != BUILTIN_INV_END { return malform...
Rust
0
tials( constants.RABBITMQ_QUEUE_USERNAME, constants.RABBITMQ_QUEUE_PASSWORD ) connection = pika.BlockingConnection( pika.ConnectionParameters( host=constants.RABBITMQ_HOST_SERVER, port=constants.RABBITMQ_HOST_PORT, virtual_host=constants.RABBITMQ_VIRTUAL_HOST,...
Python
1
ocks = runner.stock_manager.get_all_stocks() target_stock = None for stock in all_stocks: if stock['stock_code'] == args.stock_code: target_stock = stock break if target_stock: result = runner.analyz...
Python
1
("DocumentReadMode").string(var_403.as_str()); } if let Some(var_404) = &input.feature_types { let mut array_405 = object.key("FeatureTypes").start_array(); for item_406 in var_404 { { array_405.value().string(item_406.as_str()); } } array_...
Rust
0
lp='Disable or disable GLVis visualization') args = parser.parse_args() if myid == 0: parser.print_options(args) meshfile = expanduser( join(os.path.dirname(__file__), '..', 'data', args.mesh)) visualization = not args.no_visualization in_alpha = args.step run(meshfile=meshfil...
Python
1
let contents = read_datadir(src)?; for i in contents.iter() { let d = src.clone().push(i); if d.is_dir() { dir_r(&d, v)?; } else { v.push(d.as_str()); } } Ok(()) } pub fn read_dir_r(src: &Path) -> Vec<String> { let mut paths: Vec<Stri...
Rust
0
const MAP_INVALIDATE_RANGE_BIT: types::GLenum = 0x0004; #[allow(dead_code, non_upper_case_globals)] pub const MAP_READ_BIT: types::GLenum = 0x0001; #[allow(dead_code, non_upper_case_globals)] pub const MAP_UNSYNCHRONIZED_BIT: types::GLenum = 0x0020; #[allow(dead_code, non_upper_case_globals)] pub const MAP_WRITE_BIT: ...
Rust
0
format!("Idref {} not found in manifest.", idref)), }; match fragment { None => Ok(manifest_item.inside_path_from_opf.clone()), Some(fragment) => Ok(format!( "{}#{}", manifest_item.inside_path_from_opf, fragment )), } } //! Contains a set of types for construc...
Rust
0
inders| { if let &mut Ty::Bound(bound) = ty { if bound.debruijn >= binders { *ty = substs.0[bound.index].clone().shift_bound_vars(binders); } } }, depth, ); self } /// Shifts ...
Rust
0
rhs = rhs.strip_prefix("../").unwrap_or(""); } lhs.to_owned() + rhs } #[cfg(test)] mod join_paths { use super::*; #[test] fn basic() { assert_eq!(join_paths("a/b/c", "d"), "a/b/d"); assert_eq!(join_paths("a/b/", "d"), "a/b/d"); assert_eq!(join_paths("a/b/", "c/d"),...
Rust
0
on: self.original_props[prop_name] = deepcopy(prop) for attr, attr_randomization_params in prop_attrs.items(): smpl = None if self.actor_params_generator is not None: smpl, extern_...
Python
1
+--------+----+------------------+------------------+-----------|"); break; } println!("|-------------------+--------+----+------------------+------------------+-----------|"); for item in vec { let network_name = item .identity ...
Rust
0
ne_storage_strategy() es_available = check_elasticsearch() milvus_available = check_milvus() # 尝试导入settings获取配置 try: from app.config import settings return { "strategy": strat...
Python
1
from fastapi import APIRouter, Depends from sqlalchemy.exc import SQLAlchemyError from sqlalchemy import text from dependencies import get_db_MEDSTOCK router = APIRouter() @router.get("/MedStock_GetConsumiveis/") async def MedStock_GetConsumiveis(db=Depends(get_db_MEDSTOCK)): try: query = text("SELECT * F...
Python
1
32; #[doc = "*Required features: `\"Win32_UI_TabletPC\"`*"] pub const DISPID_DAPenTip: DISPID_InkDrawingAttributes = 9i32; #[doc = "*Required features: `\"Win32_UI_TabletPC\"`*"] pub const DISPID_DAClone: DISPID_InkDrawingAttributes = 10i32; #[doc = "*Required features: `\"Win32_UI_TabletPC\"`*"] pub const DISPID_DAExt...
Rust
0
from tabulate import tabulate # to print table form output # Custom functions from .utils import ( check_argument, check_now, search_assembly, json_to_dataframe, check_access_database, print_warning, mkdir_raw_output, save_metadata, download_genome, convert_chr_label_genome, ...
Python
1
""" EJERCICIO: - Muestra ejemplos de asignación de variables "por valor" y "por referencia", según su tipo de dato. - Muestra ejemplos de funciones con variables que se les pasan "por valor" y "por referencia", y cómo se comportan en cada caso en el momento de ser modificadas. (Entender estos conceptos es algo...
Python
1
meta_field="meta", granularity=Granularity.seconds, expire_after_seconds=config.stats.request_stats_ttl ) class OpenaiWebAskLogMeta(BaseModel): source: Literal['openai_web'] model: OpenaiWebChatModels class OpenaiApiAskLogMeta(BaseModel): source: Literal['openai_api'] ...
Python
1
'correlation_id': correlation_id, 'success': False, 'error_code': ErrorCode(error_code).name } timestamp = struct.unpack('>q', data[5:13])[0] topic = data[13:].decode('utf-8') return ...
Python
1
show.meta.title + \ ' ' + str(response.data.show.meta.year) ui_print("[orionoid] matched query: '" + query + "' to " + type + " '" + match + "' - found " + str( response.data.count.total) + " releases (total), retrieved " + str(response.data.count.retrieved), ui_settings.debug) e...
Python
1
class PolicyBasedPlayer(): def __init__(self, game, pnet, greedy=True): """ Args: game: OthelloGame instance Instance of the OthelloGame class above; pnet: Policy Network instance Instance of the Policy Network class above greedy: Boolean If true, implement greedy ap...
Python
1
format": format, "http_version": http_version, "ip_version": ip_version, "limit": limit, "location": location, "name": name, "os": os, "tls_version": tl...
Python
1
self, ev: &mut Evaluator<C, RNG, OtReceiver>, ) -> Result<(Vec<Wire>, Vec<Wire>, Vec<Wire>, Vec<Wire>, Vec<Wire>), Error> where C: AbstractChannel, RNG: CryptoRng + RngCore + SeedableRng<Seed = Block>, { let my_input_bits = encode_inputs(&self.opprf_ids); let my_opprf...
Rust
0
of removing it altogether /// # ! [allow(const_err)] /// const C: usize = 1/0; /// /// # use std::path::PathBuf; /// #use std::path::Path; /// let x = Path::new("y.rs"); /// let x = PathBuf::from("y.rs"); /// /// #[cfg(FALSE)] /// assert!(false); /// /// # [cfg(FALSE)] /// assert!(false); /// ``` fn main() { panic...
Rust
0