text
string
label_name
string
labels
int64
# Python code to get Kth column of matrix using list slicing list1 = [[4, 5, 6], [8, 1, 10], [7, 12, 5]] K = 2 res = [row[K] for row in list1] print('The Kth column of matrix is:', res)
Python
1
f.scheme } #[allow(missing_docs)] #[inline(always)] pub fn value(&self) -> &str { &self.value } #[inline(always)] pub(crate) fn parse(descriptor_bytes: &[u8], vendor_code: u8, url_descriptor_index: NonZeroU8) -> Result<Self, GetWebUrlError> { use GetWebUrlError::*; if unlikely!(descriptor_bytes.is...
Rust
0
render_func=lambda f: "%.2f A" % f, label="Current", ) yield from check_levels_v1( port.values.voltage, metric_name="voltage", levels_lower=_levels_lower("voltage"), levels_upper=_levels_upper("voltage"), render_func=lambda f: "%.2f V" % f, label="Voltag...
Python
1
", owner, repo, id ) } /// git config --get remote.origin.url pub fn git_origin() -> Result<String, String> { let output = Command::new("git") .arg("config") .arg("--get") .arg("remote.origin.url") .output() .map_err(|e| format!("could not determine the git orig...
Rust
0
let dst = b"CONCORDIUM-hashtoG2-with-BLS12381G2_XMD:SHA-256_SSWU_RO"; let msg: &[u8] = msg.as_bytes(); let q = CG2Affine::hash_to_group(msg); let p = g2_hash_to_curve_sswu( &ByteSeq::from_public_slice(msg), &ByteSeq::from_public_slice(dst), ); let t = [ p.0 .1.to_byte_seq...
Rust
0
redis_host.as_str()).expect("failed to make redis client"); let connection = Arc::new(redis_connection); let redis_cache = RedisCache::new(connection); let kafka_host = kafka_seed(); let ingest_consumer = IngestConsumer::new(kafka_host, topics, redis_cache.clone()) .expect("failed to make inges...
Rust
0
" { pub fn Fl_Glut_Window_mode(self_: *const Fl_Glut_Window) -> ::std::os::raw::c_int; } extern "C" { pub fn Fl_Glut_Window_set_mode(self_: *mut Fl_Glut_Window, mode: ::std::os::raw::c_int); } extern "C" { pub fn Fl_Glut_Window_get_proc_address( self_: *mut Fl_Glut_Window, s: *const ::std::o...
Rust
0
macro_derive(SizeOf)] pub fn derive_size_of(input: TokenStream) -> TokenStream { let input = parse_macro_input!(input as syn::DeriveInput); let name = input.ident; let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl(); let expanded = quote! { impl #impl_generics ::cap...
Rust
0
collection: iter.into_iter().collect(), ordering: PhantomData, } } } impl<T, O> Sorted<T, O> where T: Sortable, O: SortOrder<T::Item>, { pub fn by_sorting(mut collection: T) -> Self { collection.sort(O::cmp); Self { collection, ordering: Phant...
Rust
0
ment::TableCell { return Ok(cell); } } Err(_) => return Err(ReaderError::XMLReadError), _ => {} } } } } #[cfg(test)] mod tests { use super::*; use crate::types::*; #[cfg(test)] use prett...
Rust
0
import time import machine try: import utime except: pass from machine import Pin, ADC class App(): def __init__(self): super().__init__() self.echo_timeout_us = 500*2*30 self.trig = Pin(4, mode=Pin.OUT, pull=None) self.trig.value(0) self.echo = Pin(13, mode=Pin.IN,...
Python
1
from . import property from . import owner from . import tag from . import sale_order from . import client from . import res_partner
Python
1
gs::cfgr::PPRE_DIV_2, false, flash::flags::acr::LATENCY_5WS), ], [ ClockScale::new(16, 96, 2, 2, 0, flags::cfgr::HPRE_DIV_NONE, flags::cfgr::PPRE_DIV_4, flags::cfgr::PPRE_DIV_2, true, flash::flags::acr::LATENCY_3WS), ClockScale::new(16, 336, 4, 7, 0, flags::cfgr::HPRE_DIV_NONE, flags::cfgr::PPRE_DIV_2, fla...
Rust
0
reponame>tranzystorek-io/aocf use structopt::StructOpt; use std::path::PathBuf; #[derive(StructOpt, Debug)] #[structopt(about = "Advent of Code problem\n<https://github.com/nuxeh/aocf>")] pub struct AocOpts { /// File to read as input pub input: Option<PathBuf>, } <reponame>fdb-rs/fdb #[test] fn select_api_ve...
Rust
0
/* Apply the color space if needed */ if !(*p_jp2).color.jp2_cdef.is_null() { opj_jp2_apply_cdef(p_image, &mut (*p_jp2).color, p_manager); } if !(*p_jp2).color.icc_profile_buf.is_null() { (*p_image).icc_profile_buf = (*p_jp2).color.icc_profile_buf; (*p_image).icc_profile_len = (*p_jp2).color.icc_profi...
Rust
0
#!/usr/bin/env python3 import csv import sys # Packages we know need rotation. ROTATE_PACKAGES = { 'LQFP-48_7x7mm_P0.5mm': -90, 'SO-16_3.9x9.9mm_P1.27mm': -90, 'SSOP-24_5.3x8.2mm_P0.65mm': -90, 'TO-252-3_TabPin2': 180, 'TSSOP-14_4.4x5mm_P0.65mm': -90, 'TSSOP-16_4.4x3.6mm_P0.4mm': -90, 'TSSOP-16_4.4x5mm_...
Python
1
): # Note: Expressions are not in the signature for `n`, but they work. # We can still verify that n is scalar up-front. df.shift(pl.col("b"), fill_value=1) # type: ignore[arg-type] with pytest.raises( ComputeError, match="'n' must be scalar value", ): df.se...
Python
1
import numpy as np import pandas as pd import tensorflow as tf from sklearn.preprocessing import StandardScaler # Load new event data (replace with actual new LHE extracted data) df_new = pd.read_csv("/home/hamzeh-khanpour/new_lhe_events.csv") # Ensure new events are in the same format as training data # Load the tr...
Python
1
dim=1024, depth=24, num_heads=16, mlp_ratio=4, num_register_tokens=num_register_tokens, block_fn=partial(Block, attn_class=Attention if export else MemEffAttention), **kwargs, ) return model def _make_dinov2_model_name(arch_name: str, patch_size: int) -> str: ...
Python
1
ptor` pub type BoxAeadEncryptor = Box<dyn AeadEncryptor + Send + 'static>; /// Generate a specific AEAD cipher encryptor pub fn new_aead_encryptor(t: CipherType, key: &[u8], nonce: &[u8]) -> BoxAeadEncryptor { assert!(t.category() == CipherCategory::Aead); match t { #[cfg(feature = "ring-aead-ciphers"...
Rust
0
Quantizer": """Create a new fake per-channel quantizer with the same option (except for the `per_channel` value). The `step_size` and `zero_point` of the new fake per-channel quantizer is initialized with shape `(channel.size,)` filled with values in `self.step_size` and `self.zero_point`, resp...
Python
1
NULL; END; $$; "#, board, n, stmt ) }; let main_view = |is_main| { safe_create_view( if is_main { "_asagi" } else { "_deleted" }, format!( ...
Rust
0
rootClass is None: rootTag = 'Config' rootClass = Config rootObj = rootClass.factory() rootObj.build(rootNode) # Enable Python to collect the space used by the DOM. doc = None if not silence: sys.stdout.write('#from maja_xml_camera_admin_config import *\n\n') sys.stdo...
Python
1
import heapq from collections import defaultdict from re import search f = 'single.txt' # f = '17_test.in' D = open(f).read().split('\n\n') R = [] for line in D[0].splitlines(): rval = line.split(':')[1] R.append(int(rval)) P = [] for p in D[1].split(':')[1].split(','): P.append(int(p)) print(R) print(...
Python
1
def convert(num): res = '' while num: res += str(num%3) num //= 3 return res[::-1] ans = [] for n in range(1, 10000): r = convert(n) if sum(map(int, r))%2 == 0: r = '1' + r + '2' else: r = '2' + r + '0' r = int(r, 3) if r > 100: ans.append(r) pri...
Python
1
l = ['1'] def run(): print(l) l.append('2') print(l) print(l) run() print(l) # append可以更改全局变量 a = 1 def run(): # print(a) a = 2 print(a) print(a) run() # 修改全局变量需要先声明
Python
1
Eq, Eq, PartialOrd, Ord, Hash)] pub struct Header { /// SWF version pub swf_version: u8, // Frame size in twips pub frame_size: Rect, pub frame_rate: Ufixed8P8, pub frame_count: u16, } #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[derive(Clone, Debug, PartialEq, Eq)] pub struct Movie { ...
Rust
0
alue'], red_mark) else: sheet.merge_range(prod_row, prod_col + 8, prod_row, prod_col + 9, each['purchase_value'], font_size_8) if each['total_value'] < 0:...
Python
1
#!/usr/bin/env python3 # TIMIT_preparation # Mirco Ravanelli # Mila - University of Montreal # July 2018 # Description: # This code prepares TIMIT for the following speaker identification experiments. # It removes start and end silences according to the information reported in the *.wrd files and normalizes the...
Python
1
k-' + version # -- Options for LaTeX output ------------------------------------------------ latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', # Additional stuff for the ...
Python
1
doc(cfg(feature = "v1_8")))] //#[doc(alias = "nm_utils_parse_variant_attributes")] //pub fn utils_parse_variant_attributes(string: &str, attr_separator: glib::Char, key_value_separator: glib::Char, ignore_unknown: bool, spec: /*Ignored*/&VariantAttributeSpec) -> Result</*Unknown conversion*//*Unimplemented*/HashTable T...
Rust
0
#start message START_MSG = """<blockquote><b>I Aᴍ TᴇʀBᴏx Gᴇɴɪᴇ 🧞 Lɪɴᴋ Tᴏ Vɪᴅᴇᴏ Dᴏᴡɴʟᴏᴀᴅᴇʀ Bᴏᴛ..!</blockquote> Sᴇɴᴅ Mᴇ Aɴʏ TᴇʀᴀBᴏx Lɪɴᴋ </b>👇""" HELP_TEXT = """<b>⁉️ Hᴇʟʟᴏ {mention} ~ <blockquote expandable>➪ I ᴀᴍ ᴀ TᴇʀᴀBᴏx Dᴏᴡɴʟᴏᴀᴅ Bᴏᴛ, ᴄʀᴇᴀᴛᴇᴅ ᴛᴏ ʜᴇʟᴘ ʏᴏᴜ ᴅᴏᴡɴʟᴏᴀᴅ ғɪʟᴇs ғʀᴏᴍ TᴇʀᴀBᴏx ᴀɴᴅ ᴘʀᴏᴠɪᴅᴇ ᴀ ᴅɪʀᴇᴄᴛ ᴅᴏᴡɴʟᴏᴀᴅ ...
Python
1
ields { Unit, //~ ERROR may not be used on enums with zero fields Tuple(), Struct {}, } #[pin_project] union Union { //~^ ERROR may only be used on structs or enums f: (), } #[pin_project] impl Impl {} //~ ERROR may only be used on structs or enums } //...
Rust
0
'b1m', 'b2m', 'b2s', 'b3m', 'b4m', 'c'] In [4]: %reset_selective -f b[2-3]m In [5]: who_ls Out[5]: ['a', 'b', 'b1m', 'b2s', 'b4m', 'c'] In [6]: %reset_selective -f d In [7]: who_ls Out[7]: ['a', 'b', 'b1m', 'b2s', 'b4m', 'c'] In [8]: %reset_sele...
Python
1
= "Returns in \'outMessage\' a description of the engine status or of an"] #[doc = "error that occurred with the most recently called engine-level API"] #[doc = "function."] pub fn pico_getEngineStatusMessage( engine: pico_Engine, errCode: pico_Status, outMessage: *mut ::std::os::ra...
Rust
0
''' 홍준이는 주식에 푹 빠졌다. 그는 아래 세가지 중 한 행동을 한다. 1. 주식 하나를 산다 2. 원하는 만큼 가지고 있는 주식을 판다 3. 아무것도 안한다. 날 별로 주식의 가겨을 알려주었을 때, 최대 이익이 얼마나 되는지 계산해달라고 한다. 예를 들어 날수가 3일, 날 별로 주가 10, 7,6 일때, 주가감소로 인해 최대 이익은 0이다. 만약 주가 3, 5, 9일때 처음 두날에 주식을 하나씩 사고, 마지막 날에 다 팔아 버리면 이익이 10이 된다. -- 입력 테스트 케이스 T, 날의 수N, 날별 주가 N개의 자연수 -- 출력 각 테스트 케이스에 대해 최...
Python
1
use crate::json::webhooks::{FilterType, Hooks, WebhookAuth}; use crate::scrapers::scraper_resources::resources::ScrapeType; use crate::statistics::Incr; use crate::TOKEN_PATH; const DEFAULT_KEYWORDS: [&str; 30] = [ "devblog", "event", "maintenance", "major", "trailer", "teaser", "developers", "fix", "vehicles", "eco...
Rust
0
ons: list[WebSocket] = [] async def connect(self, websocket: WebSocket): await websocket.accept() self.active_connections.append(websocket) def disconnect(self, websocket: WebSocket): self.active_connections.remove(websocket) async def send_personal_message(self, message: str, web...
Python
1
# theta_d_mech = x[0] # omega_r_mech = x[1] KA = x[2] iD = x[3] iQ = x[4] # ACM.theta_d = x[0]*ACM.npp # ACM.omega_r = x[1]*ACM.npp if KA==0.0: ACM.omega_slip = 0.0 else: ACM.omega_slip = ACM.Rreq * iQ / KA ACM.omega_syn = x[1]*ACM.npp + ACM.omega_slip...
Python
1
result { Some(r) => Ok(r?), None => { // not found in the global cache, get from the DB and insert into local let db = &self.db.as_hash_db(); let db = self.factories.trie.readonly(db, &self.root)?; let from_rlp = |b: &[u8]| Account::from_rlp(b).expect("decoding db value failed"); let mut mayb...
Rust
0
from_millis(u64::from(peer_latency)), latency: Duration::from_millis(u64::from(latency)), }) } pub fn serialize<T: BufMut>(&self, into: &mut T) { into.put_u32_be(self.version.to_u32()); into.put_u32_be(self.flags.bits()); // upper 16 bits are peer latency int...
Rust
0
name = 'Anton' print(name) age = 24 print(age) age = (age + 6) print(age) is_student = True print(is_student)
Python
1
hashsum: {err}"); let hash_str = format!("{:x}", hex(&hash)); if !hash_str.starts_with(sha256) { return Err(format!("Hashsum mismatch: expected {} but was {}", sha256, hash_str)); } Ok(()) } pub fn force_symlink(target: &Path, linkpath: &Path) -> Result<(), io::Error> { let...
Rust
0
Operation::Link { value, object_id, key, .. } => key .as_element_id() .map(|eid| { DiffAction::InsertSequenceElement( object_id.clone(), sequence_type.clone(), ...
Rust
0
tacts_list, False, None)) elif command == "a": contacts_list.append(get_new_contact(False, None)) print("Контакт добавлен.") elif command == "d": remove_contact(contacts_list) elif command == "e": edit_contact(contacts_list) elif command ==...
Python
1
d: c = ( Liquid() .add( "lq", [0.3254], label_opts=opts.LabelOpts( font_size=50, formatter=JsCode( """function (param) { return (Math.floor(param.value * 10000) / 100) + '%'; ...
Python
1
recipient_btc_address_1)) .add_output(TransactionOutput::payment(100, &recipient_btc_address_2)) .build(); assert_err!( BTCRelay::extract_payment_value_and_op_return(transaction, recipient_btc_address_0), TestError::InvalidPayment ); }) } #[test] fn ...
Rust
0
(wd).setParseAction(' '.join).runTests(''' now is the winter of our discontent made glorious summer by this sun of york ''') prints:: 00 11 22 aa FF 0a 0d 1a [0, 17, 34, 170, 255, 10, 13, 26] my kingdom for a horse ['MY', 'KINGDOM', 'FOR', 'A', 'HORSE'] ...
Python
1
#User function Template for python3 ''' class Job: # Job class which stores profit and deadline. def __init__(self,profit=0,deadline=0): self.profit = profit self.deadline = deadline self.id = 0 ''' class Solution: #Function to find the maximum profit and the ...
Python
1
) } #[cfg(test)] mod test_search { use crate::{test_utility::*, text_engine::query::put}; use super::*; use actix_web::{dev::Service, http::StatusCode, test, web, App}; use anyhow::Result; use tempdir::TempDir; use urlencoding::encode; async fn test_search(index: Index, query_params: Opt...
Rust
0
quet")) .unwrap_or(false) && !all_known.contains(&path_parsed) { to_remove.push(path); } } } info!(n_files = to_remove.len(), "Found files to delete"); Ok(to_remove) } /// Delete all `files` from the store linked to the prese...
Rust
0
&[ 0, 4, 3, 97, 98, ], Failed); check(&parse_customsecs, &[ 0, 6, 3, b'a', b'b', b'c', 0xff, 0xee, ], OkWith(vec![ CustomSection { name: "abc".into(), bytes: vec![0xff, 0xee] }, ])); check(&parse_customsecs, &[ 0, 6, 3, b'a', b'b', b'c', 0xff, 0xee, 0, 8, 4...
Rust
0
_v1::unseal_range::<_, _, _, SectorShape16MiB>( config, cache_path, sealed_sector, unsealed_output, prover_id, sector_id, comm_d, ticket, offset, num_bytes, ), SECTOR_SIZE_512_MIB => f...
Rust
0
mint/kms/issues/183> #[derive(Default)] pub struct Registry(RwLock<BTreeMap<Id, Chain>>); impl Registry { /// Acquire a read-only (concurrent) lock to the internal chain registry pub fn get(&self) -> Guard { // TODO(tarcieri): better handle `PoisonError` here? self.0.read().unwrap().into() ...
Rust
0
[derive(Copy, Clone, Debug, Eq, PartialEq)] pub struct LayerDims { /// Dimension of the input to a layer: `(batch_size, channels, height, /// width)` pub input_dims: (usize, usize, usize, usize), /// Dimension of the output of a layer: `(batch_size, channels, height, /// width)` pub output_dims:...
Rust
0
help="Build all necessary artifacts.", aliases=["everything"], ), dict( name="c-ext", help="Build our internal C extension.", aliases=["ext"], ), ...
Python
1
import numpy as np import matplotlib.pyplot as plt from matplotlib import colors as mpl_colors import src from src.data.channel.get_steering_vec import get_steering_vec from src.config.config_plotting import generic_styling def plot_beampattern( satellite: 'src.data.satellite.Satellite', users: list[...
Python
1
; #[debug_ensures(match ret { Some(_) => { self.number_active_lineages() == old(self.number_active_lineages()) - 1 }, None => { self.number_active_lineages() == old(self.number_active_lineages()) }, }, "removes an active lineage if...
Rust
0
# Copyright 2011-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import difflib from portage.versions import catsplit def similar_name_search(dbs, atom): cp_lower = atom.cp.lower() cat, pkg = catsplit(cp_lower) if cat == "null": cat = None all_cp = ...
Python
1
>, pad: PadSize, indices_i: Vec<u16>, indices_j: Vec<u16>, indices_k: Vec<u16>, ) -> Array3<A> where S: Data<Elem = A>, A: Zero + Clone + Copy, { let width = data.dim().0 + 2 * pad.0; let height = data.dim().1 + 2 * pad.1; let depth = data.dim().2 + 2 * pad.2; let mut out = Array...
Rust
0
"""add_feedback_score""" import sqlalchemy as sa from alembic import op revision = "990a42024f17" down_revision = "0001_baseline" branch_labels = None depends_on = None def upgrade() -> None: op.add_column( "rag_questionhistory", sa.Column("feedback_score", sa.Integer(), nullable=False, server_...
Python
1
ist, slice_list, slice_tensor_id, indices_after_slice def write2slicedtxt(mpath, eq_original, eq_sliced, slice_list, newPath, stem_start, stem_length, tree_s, info): filename = mpath+'/sliced.txt' slice_time = tree_s.contraction_cost() file = open(filename,'w') input_subscripts = info.input_subscripts input_l...
Python
1
if let Some(description) = description { item.attribute(Value::new(description)) } else { item } }) .attribute(Name::new("description")), ) .child( Input::new() ...
Rust
0
"""Run the EasyInstall command""" if __name__ == '__main__': from setuptools.command.easy_install import main main()
Python
1
config.services.key_management.provider); std::process::exit(1); } // Create a new instance of the proxy request processor. let server = ExternalProcessorServer::new(ConfidentialRequestProcessor { // Initialize the context containing the shared service state. ...
Rust
0
| all_nodes.get(id)) .filter(|node| node.profile().address().is_some()) .filter(|v| { v.profile() .subscriptions() .common_subscriptions(&common_topics) .next() .is_some() }) ....
Rust
0
"""Minimal reproducible example script. This script is for you to use to reproduce a bug or demonstrate a feature. """ import asyncio from os import getenv from acapy_controller import Controller from acapy_controller.logging import logging_to_stdout from acapy_controller.protocols import didexchange, request_mediat...
Python
1
import os import threading import unittest import wave from concurrent.futures import ThreadPoolExecutor from audio_service.audio_manager import AudioManager from audio_service.vad import VAD class MyTestCase(unittest.TestCase): def test_mic(self): am = AudioManager() mic = am.get_mic_stream() ...
Python
1
ure = "serialize")] #[macro_use] extern crate serde; #[macro_use] extern crate log; extern crate failure; pub extern crate gfx_hal as hal; /// public re-exported traits pub mod traits { pub use hal::memory::Pod; } // public re-exports pub use hal::format; pub use hal::{Backend, Frame, Primitive}; pub use hal::q...
Rust
0
InitResponse defines the Msg/ChannelCloseInit response type. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgChannelCloseInitResponse {} /// MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B /// to acknowledge the change of channel state to CLOSED on Chain A. #[derive(Clone, PartialEq, ::pro...
Rust
0
"Offset of field: ", stringify!(uv_connect_s), "::", stringify!(type_) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<uv_connect_s>())).reserved as *const _ as usize }, 16usize, concat!( "Offset of field: ", stringify!...
Rust
0
URL', 'redis://localhost:6379/0') CELERY_RESULT_BACKEND = os.getenv('CELERY_RESULT_BACKEND', 'redis://localhost:6379/0') CELERY_ACCEPT_CONTENT = ['json'] CELERY_TASK_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json' CELERY_TIMEZONE = TIME_ZONE # Celery Beat Schedule from celery.schedules import crontab CELERY_BEAT...
Python
1
zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [flt_id1](index.html) module"] pub struct FLT_I...
Rust
0
text = texts[i] words = [self.vocab.get_itos()[idx] for idx in text.tolist()] # 随机选择要替换的词 replace_indices = random.sample( range(len(words)), int(len(words) * self.substitution_rate) ...
Python
1
cutor.available_task_slots -= 1; num_tasks += 1; } _ => { // Indicate there's no more tasks to be scheduled has_tasks = false; break; } } ...
Rust
0
# Copyright 2010 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
Python
1
sts", ); assert_eq!( response.to_string().as_str(), "[550] Can't create directory: File exists" ); } #[test] fn fmt_format_control() { assert_eq!(FormatControl::Asa.to_string().as_str(), "C"); assert_eq!(FormatControl::Telnet.to_string().as_st...
Rust
0
f'Failed to execute AdbRequest [{step_cmd.adb_request}].\n' f'Status: {response.status}\n' f'Error: {response.error_message}' ) return response case _: raise NotImplementedError(f'No step command of type [{step_type}].') def _check_success( self, ...
Python
1
from lixian_plugins.api import command from lixian_cli_parser import command_line_parser from lixian_cli_parser import with_parser from lixian_cli_parser import command_line_option, command_line_value from lixian_commands.util import parse_login, parse_colors, create_client from lixian_config import get_config from ...
Python
1
], nperseg=128) # plt.pcolormesh(t, fre, np.abs(zxx), shading='auto') # plt.axis('off') # plt.savefig(f'./images/{i}-{mods[mod_class]}-stft.jpg') # plt.tight_layout() # plt.close() def plot_allMods(data, mods): allMods = [11, 24, 3, 19, 21, 2, 6, 31, 7, ...
Python
1
poll_next wrapper such that // Stream::next polls the stderrs of all spawned frontends. let stderrs = StderrLines { stderrs: children .iter_mut() .map(|(_c, stderr)| async_std::io::BufReader::new(stderr).lines()) .collect(), frontends: opts.frontends.clone(),...
Rust
0
# # Copyright (C) 2009-2020 the sqlparse authors and contributors # <see AUTHORS file> # # This module is part of python-sqlparse and is released under # the BSD License: https://opensource.org/licenses/BSD-3-Clause from sqlparse.filters.others import SerializerUnicode from sqlparse.filters.others import StripComments...
Python
1
exit(exit_code); } // Exit gracefully with a generic error code. fn generic_error_exit(msg: &str) -> ExitCode { error!("{}", msg); vmm::FC_EXIT_CODE_GENERIC_ERROR } // Log a warning for any usage of deprecated parameters. #[allow(unused)] fn warn_deprecated_parameters() {} // Print supported snapshot data fo...
Rust
0
clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Devices_Bluetooth', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct BLUETOOTH_SELECT_DEVICE_PARAMS { pub dwSize: u32, pub cNumOfClasses: u32, pub prgClassOfDevices: *mut BLUETOOTH_COD_PAIRS, ...
Rust
0
strategy::term::is_not_number(arc_process.clone()), ), |(minuend, subtrahend)| { prop_assert_eq!( native(&arc_process, minuend, subtrahend), Err(badarith!().into()) ); ...
Rust
0
start_date = end_date - timedelta(days=180) # 기본 6개월 # 기술적 지표 가용성 확인 indicator_status = self.check_technical_indicators_availability(stock_code) if indicator_status['available']: # 저장된 기술적 지표가 있는 경우: JOIN 쿼리 사용 ...
Python
1
mount_get_root_path(mut_override( self.to_glib_none().0, ))) } } pub fn guess_can_eject(&self) -> bool { unsafe { from_glib(ffi::g_unix_mount_guess_can_eject(mut_override( self.to_glib_none().0, ))) } } pub fn ...
Rust
0
from .instance import Bima __all__ = ["Bima"]
Python
1
# 1 Write two distinct ways of reversing the list without mutating the original list. numbers = [1, 2, 3, 4, 5] # [5, 4, 3, 2, 1] reversed_numbers = numbers[::-1] reversed_numbers = list(reversed(numbers)) # 2 Given a number and a list, determine whether the number is included in the list. numbers = [1, 2, 3, 4,...
Python
1
} }; // Only adjust to the RTT when the request was successfully processed. let use_rtt = matches!(response_action, Ok(RetryAction::Successful)); self.adjust_to_response_inner(start, is_back_pressure, use_rtt) } } pub fn instant_now() -> std::time::Instant { tokio::time...
Rust
0
"""Unit tests for the job_offers_optimal_buckets module.""" import typing from typing import Iterable import unittest import pandas from bob_emploi.data_analysis.modeling import job_offers_optimal_buckets class _TestCase(typing.NamedTuple): name: str offers: Iterable[int] expected: Iterable[str] clas...
Python
1
inc_t, dt_on_output: blis_types::num_t_BLIS_DOUBLE, }; bli_dgemm_sandybridge_int_8x4(k as int64_t, alpha as *mut c_double, a as *mut c_double, b as *mut c_double, beta as *mut c_double, c as *mut c_double, rs_c as int64_t, cs_c as int64_t, &mut info as *mut auxi...
Rust
0
#!/usr/bin/env python # -*- coding: utf-8 -*- """ 범용 로그인 테스트 - 사이트 ID만으로 로그인 """ import asyncio from pathlib import Path import sys # 프로젝트 루트 추가 sys.path.insert(0, str(Path(__file__).parent)) from core.universal_login import UniversalLoginManager from playwright.async_api import async_playwright async def test_log...
Python
1
5458665621]; /// let lat_vec: Vec<f64> = vec![54.589097162646141, /// 51.560873800587828, /// 50.431429161121699, /// 54.535021436247419, /// 50.839059313135706, /// 55.412189...
Rust
0
from abc import ABC, abstractmethod from typing import Any, Dict class HandlerInterface(ABC): """ Abstract base class for workflow handlers """ @abstractmethod async def load(self, *args: Any, **kwargs: Any) -> None: """ Method to load the handler """ pass @ab...
Python
1
wo/hydra-cli.git master".to_string()), input_type: "git".to_string(), revision: None, uri: None, }; map.insert("src".to_string(), input); map }, r#type: 0, } } use interpretator::Interpretator; use std::io::{self, st...
Rust
0
OCSP_EXT_EXTENDED_REVOKE_HEX: [u8; 9] = [0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x01, 0x09]; /// ocsp extended revoke extension name dot notation pub const OCSP_EXT_EXTENDED_REVOKE_DOT: &str = "1.3.6.1.5.5.7.48.1.9"; /// ocsp extended revoke extension name asn1 notation pub const OCSP_EXT_EXTENDED_REVOKE_NAME: ...
Rust
0
+ Debug + FromF64 + AsPrimitive<usize>, { fn hash<H: Hasher>(&self, state: &mut H) { match self { Aggregate::Value => 0usize.hash(state), Aggregate::Count => 1usize.hash(state), Aggregate::Last => 2usize.hash(state), Aggregate::Min => 3usize.hash(state), ...
Rust
0
le, "{}", zz); } file.flush().unwrap(); } fn print_usage(exe_name: &str, opts: &Options) { let brief = format!("Usage: {} REPEAT [Options]", exe_name); print!("{}", opts.usage(&brief)); process::exit(0); } fn main() { let args: Vec<String> = env::args().collect(); let mut opts = Options::...
Rust
0
t available fields see [pcc_lpspi1](pcc_lpspi1) module"] pub type PCC_LPSPI1 = crate::Reg<u32, _PCC_LPSPI1>; #[allow(missing_docs)] #[doc(hidden)] pub struct _PCC_LPSPI1; #[doc = "`read()` method returns [pcc_lpspi1::R](pcc_lpspi1::R) reader structure"] impl crate::Readable for PCC_LPSPI1 {} #[doc = "`write(|w| ..)` me...
Rust
0