text
string
label_name
string
labels
int64
ot is currently in maintenance mode, while [user]<NAME>[/user] finishes tweaking the completely overhauled source.") .build(); output.send(msg) .expect("Failed to queue message."); }); command!(add_package(data, output, db) { let msg = ::fchat::message::MessageBuilder::new() .channel(d...
Rust
0
three are kept. If one doesn't want to keep those points, it is easy to iterate the answer and remove them. The first point is the one with the lowest y-coordinate and the lowest x-coordinate. Points are then given counter-clockwise, and the closest one is given first if needed. */ pub fn convex_hull_grah...
Rust
0
il::lalrpop_mod; use std::{cmp, iter::Iterator, str::FromStr}; #[cfg(windows)] lalrpop_mod!( #[allow(clippy::all)] #[allow(clippy::nursery)] #[allow(clippy::pedantic)] parser, "\\day10\\parser.rs" ); #[cfg(unix)] lalrpop_mod!( #[allow(clippy::all)] #[allow(clippy::nursery)] #[allow(clip...
Rust
0
")] lazy_static::lazy_static! { static ref CONFIG: Arc<ClientConfig> = { let mut config = ClientConfig::new(); config .root_store .add_server_trust_anchors(&TLS_SERVER_ROOTS); Arc::new(config) }; } type UnsecuredStream = BufReader<TcpStream>; #[cfg(feature = "htt...
Rust
0
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸流程引擎服务 (BlueKing Flow Engine Service) available. Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in complia...
Python
1
::<u8>(0), 15); assert_eq!(env.m_read::<u8>(3), 18); } #[test] fn test_together() { let mut env = Memory::init(1024, 5); env.s_push(&13_u8); env.r_write(&'e', &1342_i16); assert_eq!(env.s_pop_8(), Some(13)); assert_eq!(env.r_read::<i16>(&'e'), 1342); } ...
Rust
0
(always)] pub fn dma_infifo_pop_ch0(&mut self) -> DMA_INFIFO_POP_CH0_W { DMA_INFIFO_POP_CH0_W { w: self } } } //data types fn main(){ // since rust is a statically typed language, the compiler needs to // know the types of all variables at compile time, it can usually infer // what type we...
Rust
0
fn default() -> Self { TimeInForce::Day } } #[derive(Serialize, Deserialize, Clone, Copy, Debug, PartialEq)] pub enum ExecInstValue { /// Stay on offerside #[serde(rename = "0")] StayOnOfferside, /// Not held #[serde(rename = "1")] NotHeld, /// Work #[serde(rename = "2")] Work, /// Go along #[serde(ren...
Rust
0
8_BIT_TRANSFERS_ARE => 0, WIDTHR::_16_BIT_TRANSFERS_ARE => 1, WIDTHR::_32_BIT_TRANSFERS_ARE => 2, WIDTHR::RESERVED_SETTING => 3, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: u8) -> WIDTHR { match value { 0 => ...
Rust
0
= #path(idx, dim, params).into_u8(); }); }); Ok(()) } else if let Some(data) = data_mut.as_f32_nd_array_mut() { ctx.thread_pool.install(|| { par_azip!((index idx, o in dat...
Rust
0
"""Different methods for rendering Tools to be passed to LLMs. Depending on the LLM you are using and the prompting strategy you are using, you may want Tools to be rendered in a different way. This module contains various ways to render tools. """ from typing import List from langchain.tools.base import BaseTool fro...
Python
1
except Exception as e: logger.exception(e) send_message("专精任务失败" + str(e), level="ERROR") def plan_run_order(self, room): plan = self.op_data.plan if self.find_next_task(meta_data=room, task_type=TaskTypes.RUN_ORDER): return in_out_plan = {room: ["Curren...
Python
1
_messages.chain(self.announcements.iter().filter_map(|&(ref s, ref t)| { if *t + Duration::seconds(8) > Local::now() { Some(GraphicMessage { category: Category::Announcement, text: s.clone(), }) } els...
Rust
0
= 0x30A0; #[link(name = "EGL")] extern "C" { fn eglGetDisplay(a: EGLNativeDisplayType) -> EGLDisplay; fn eglInitialize(a: EGLDisplay, b: *mut EGLint, c: *mut EGLint) -> EGLBoolean; fn eglChooseConfig( a: EGLDisplay, b: *const EGLint, c: *mut EGLConfig, d: EGLint, e:...
Rust
0
let pin = fired.trailing_zeros() as usize; if pin < self.pins.len() { fired &= !(1 << pin); self.pins[pin].handle_interrupt(); } else { break; } } } } /// Port A pub static mut PA: Port = Port { registers: u...
Rust
0
program options /// `btype`: the block type, must be `Fixed` or `Dynamic` /// `final`: whether to set the "final" bit on this block, must be the last block /// `litlens`: literal/length array of the LZ77 data, in the same format as in /// `Lz77Store`. /// `dists`: distance array of the LZ77 data, in the same forma...
Rust
0
import pandas as pd import matplotlib.pyplot as plt import plotly.express as px df = pd.read_csv("flights_data.csv") # to run this program you require flights_data.csv (Link to flights_data.csv: https://www.kaggle.com/datasets/divyansh22/flight-delay-prediction) df_filtered = df[df["Year"].isin([2019, 2020])] avera...
Python
1
# LDT Base (Upper 32 bits) _write_field(0, 4) # IDT Base (Upper 32 bits) _write_field(0, 12) # Reserved _write_field(0, 8) # IO_RIP _write_field(0, 80) # Reserved _write_field(ql.reg.cr4, 4) _write_field(0, 72) # Reserved _write_field(0, 4) ...
Python
1
= cms.untracked.InputTag("csctfDigis:"), trackProducer = cms.untracked.InputTag("csctfDigis:"), statusProducer = cms.untracked.InputTag("csctfDigis:") # lctProducer = cms.untracked.InputTag("null:"), # trackProducer = cms.untracked.InputTag("null:"), # statusProducer =...
Python
1
#!/usr/bin/env python3 # https://github.com/hiisi13/audio-offset-finder/raw/main/audio_offset_finder.py import argparse import librosa import numpy as np from scipy import signal import matplotlib.pyplot as plt def find_offset(within_file, find_file, window): y_within, sr_within = librosa.load(within_file, sr=...
Python
1
copies }); html! { <div class="NodeDisplay group collapsed" key={group.id.as_u128()}> <div class="summary"> {self.drag_handle(ctx)} <GroupName name={group.name.clone()} {rename} /> {self.view_balance(ctx, false)} ...
Rust
0
UriHeader { name: hname_str, value: "", }, )); } let (input, _) = take(1usize)(input)?; // skip = let (input, hvalue) = take_while_with_escaped(input, is_hnv_char)?; let (_, hname_str) = from_utf8_nom(hname)?; ...
Rust
0
as system::Trait>::AccountId, { Called(AccountId), } ); decl_module! { // The `Module` struct also takes the instance parameter. pub struct Module<T: Trait<I>, I: Instance = DefaultInstance> for enum Call where origin: T::Origin { fn deposit_event() = default; // The only disp...
Rust
0
import os import sys from pathlib import Path from local_llm_v2 import LocalLLM def get_available_models(): """获取已下载的模型列表""" models_dir = Path("./models") if not models_dir.exists(): return [] models = [] for item in models_dir.iterdir(): if item.is_dir(): # 检查是否包含必...
Python
1
import numpy as np from mayavi import mlab from vgn.utils import grid_to_map_cloud cm = lambda s: tuple([float(1 - s), float(s), float(0)]) def clear(): mlab.clf() def scene_cloud(voxel_size, points): mlab.points3d( points[:, 0], points[:, 1], points[:, 2], scale_factor=0.8...
Python
1
static bool test_sampler_getters() { bool failed = false; _RS_ASSERT(rsSamplerGetMagnification(minification) == RS_SAMPLER_NEAREST); _RS_ASSERT(rsSamplerGetMinification(minification) == RS_SAMPLER_LINEAR_MIP_LINEAR); _RS_ASSERT(rsSamplerGetWrapS(minification) == RS_SAMPLER_CLAMP); _RS_ASSERT(rsSamp...
Rust
0
# Filter observed_property_values for ones related to this virtual observed property values = [ v for v in observed_property_values if v.property.identifier == self.baseObservedProperty.identifier ] return self.aggregate([v.value for v in values]) @cla...
Python
1
= "POST", uri = "/test", body = "test", header("Content-Type", "application/json"))] fn test(#[headers] headers: HashMap<String, String>) -> String; #[restcrab(method = "GET", uri = "/get", header("Content-Type", "application/json"))] fn get(#[headers] headers: HashMap<String, String>); } CrabClient::...
Rust
0
ura Interna", "do Almirante Gago Coutinho", "do Castelo do Queijo", "Futebol Clube do Porto", "Panorâmica", "Panorâmica Edgar Cardoso", "de Gonçalo Cristóvão", "do Cais das Pedras", "da Aldeia", "da Baleia", "da Bouça", "da Carvalho...
Python
1
hild_pid: Pid, timeout_ms: u64) -> JoinHandle<()> { task::spawn(async move { time::sleep(Duration::from_millis(timeout_ms)).await; let _ = send_signal(child_pid, Signal::SIGKILL); }) } pub fn send_signal(pid: Pid, signal: Signal) -> nix::Result<()> { let result = signal::kill(pid, signal); ...
Rust
0
" #print "###################" method = shift_cities for i in range(2): startorderfunc = lambda: bestorder iters, score, order = run_hillclimb(startorderfunc, method, fitnessfunc, 1, maxeval) if score > bestscore: #print "new best score:", score bestiters = iters bestscore = score bestorder = order...
Python
1
arr[row][col] = number if permutation_values: permutation_values = list(permutation_values) for perm_value in permutation_values: if perm_value in columns: # 判断字符是否在列索引顺序中 perm[row].append(columns.index(perm_value)) state['permutations...
Python
1
@4..4 StmtList@4..24 PreprocGlob@4..24 PPInclude@4..24 KwInclude@4..11 "include" Whitespace@11..12 " " LiteralExpr@12..24 StringLiteral@12..24 "\"still_here\"" ...
Rust
0
ags let (name, metric) = parser.next().unwrap(); assert_eq!(&name.name[..], &b"gorets2;t2=fuck;tag3=sh.t"[..]); assert_eq!(name.tag_pos, Some(7usize)); assert_eq!(&name.name[name.tag_pos.unwrap()..], &b";t2=fuck;tag3=sh.t"[..]); assert_eq!(metric, Metric::<f64>::new(1000f64, Metr...
Rust
0
/// Occurs when Opus sends an error value that is not documented. /// `0` is unrelated to Opus and just a mere marker by this crate to /// differentiate between Opus' errors (all of them are negative). Unknown = 0, } impl Display for ErrorCode { fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult { ...
Rust
0
class TaskFamily: @staticmethod def get_tasks() -> dict[str, dict]: return { "1": {"problem": "Solve the following quadratic equation for x and show all steps: 3x^2 - 12x + 9 = 0"}, "2": {"problem": "Evaluate the following definite integral and show all steps: ∫(2x^3 - 5x^2 + 4x ...
Python
1
[11, 12, 13])]) ## t = store(t, 's', 14) ## t #. ('branch', ['n', 'p', 'r'], [('leaf', ['a', 'm'], [8, 42]), ('leaf', ['n', 'o'], [1, 10]), ('leaf', ['p', 'q'], [11, 12]), ('leaf', ['r', 's'], [13, 14])]) ## t = store(t, 't', 15) ## t #. ('branch', ['n', 'p', 'r'], [('leaf', ['a', 'm'], [8, 42]), ('leaf', ['n', 'o'], [...
Python
1
let value = get_value(&s); let sub = get_value(&sub); let (start, end) = match get_slice(start, end, value.len()) { Ok((start, end)) => (start, end), Err(e) => return Err(vm.new_index_error(e)), }; let ind: i64 = match value[start..end + 1].rfind(&sub) { Some(num) => num as i6...
Rust
0
topics.is_match(&t)); println!("is_matches cost time: {:?}", start.elapsed()); } } use std::rc::Rc; use crate::types::{ BLispEnv, BLispEvalResult, BLispError, BLispCallStack, BLispFrame, }; pub type BLispExprResult = Result<BLispExpr, BLispError>; #[derive(Debug, PartialEq, Clone)] pu...
Rust
0
lizes into a %s instance' % name) with self.block('func (u *%s) UnmarshalJSON(body []byte) error' % name): with self.block('type wrap struct'): self.emit('dropbox.Tagged') for field in fields: if is_void_type(field.data_type) or ( ...
Python
1
mock_path_exists.side_effect = lambda x: True _load_user_appdir_config() # It will check that the default config path exists... mock_path_exists.assert_has_calls([call(os.path.expanduser("~/.config/sqlfluff"))]) # ...and assuming it does, it will try and load config files at that path. mock_load...
Python
1
f not selectedText: selectedText = config.mainWindow.studyView.currentWidget().selectedText().strip() if not selectedText and config.commandTextIfNoSelection: selectedText = config.mainWindow.textCommandLineEdit.text().strip() if not selectedText: text, ok = QInpu...
Python
1
fractivity())) logger.debug(weather_model) if makePlots: weather_model.plot('wh', True) weather_model.plot('pqt', True) plt.close('all') try: f = weather_model.write() containment = weather_model.checkContainment(ll_bounds) except Exception as e: logger...
Python
1
ed - disp_gt).mean() l1_loss = torch.abs(network_output - gt).mean() return l1_loss def anisotropic_loss(gaussians_scale, r=3): ''' Use to regularize gaussians size to be isotropic (avoid over-stretching gaussians) Reference from PhysGaussian (https://arxiv.org/pdf/2311.12198) ''' # ...
Python
1
_cluster_entry in start..end { self.hierarchical_clusterings[old_hierarchical_cluster_entry].is_final_cluster = false; } return final_cluster_id; } } trait OrderedClustering { fn sorted_cluster_items(&self) -> Vec<ClusterItem>; } impl OrderedClustering for Clustering { fn sort...
Rust
0
#========================================================================= # ProcAltRTL_branch_test.py #========================================================================= import pytest import random from program import collector from pymtl import * from tests.context import lizard from tests.core.runner import...
Python
1
(once(0)) .collect(); if LookupPrivilegeValueW( ptr::null(), security_name.as_ptr() as LPWSTR, &mut tkp.Privileges[0].Luid, ) == FALSE { return last_os_error!(); } tkp.PrivilegeCount = 1; tkp.Privileges[0].Attrib...
Rust
0
if len_a == 0 && len_b == 0 { return 0.0; } else if len_a == 0 || len_b == 0 { return 1.0; } let mut vec_a = vec![false; len_a]; let mut vec_b = vec![false; len_b]; let mut matches = 0; let mut transpositions = 0.0; let search_size: isize = ((max(len_a, len_b)...
Rust
0
reg_jplt2: 0, reg_jplt3: 0, reg_bkcol: 0, display_frame_eighth_clock_counter: 0, display_frame_eighth_counter: 0, drawing_block_counter: 0, drawing_sbout_counter: 0, fclk: 0, display_first_framebuffers: fal...
Rust
0
mut SegmentInfo<D, C>, ioctx: &IOContext, ) -> Result<StoredFieldsWriterEnum<DW::IndexOutput>> where D: Directory, DW: Directory, DW::IndexOutput: 'static, C: Codec; } pub trait StoredFieldsReader: Sized { // NOTE: we can't use generic for `StoredFieldVisitor` becaus...
Rust
0
)), vec![0x01]), ], "f0c=", ), vec![ 0x93, 0xa1, 0x62, 0x92, 0x92, 0xd7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0xd7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ...
Rust
0
# # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # from airbyte_cdk.models import SyncMode from airbyte_cdk.sources.streams import Stream def read_full_refresh(stream_instance: Stream): records = [] schema = stream_instance.get_json_schema() slices = stream_instance.stream_slices(sync_mode=Syn...
Python
1
# and it is not outside, need to propagate shapes.extend(propagate(prev_shape, end_frame, included_frames=included_frames)) shapes = [ shape for shape in shapes # if shape["frame"] not in deleted_frames # # After in...
Python
1
) if split in self.save_best_on and save_criterion: self.best_score = torch.ones(1) * value save_names.append(f"{split}-best.ckpt") if "test" in split or "dev" in split: hyp_ark = open(os.path.join(self.expdir, f"{split}-hyp.ark")...
Python
1
import torch import torch.nn as nn import torch.optim as optim # from torchtext.data.utils import get_tokenizer import pickle texts = [ "verify your account", "click the link", "update your password", "your account has been suspended", "hello how are you", "i love you", "i am a man", "...
Python
1
: for ic in range(inmaps): for dx in range(fsize): for x in range(hostGrad.shape[2]): hostWGrad[oc, ic, 0, dx] += hostData[b, ic, x * stride + dx * dilation] * hostGrad[b, oc, x] assert np.allclose(hostWGrad, conv.getVar("W").grad.get()) hostBGrad = np.empty(hostBias.shape, dtype=np.float32) for ...
Python
1
his register pub fn get_full(&self) -> &'static AArch64Register { get_register(self.bad64_full_reg).expect( "full register of a supported register should be supported as well, but it wasn't", ) } /// Returns an expression which evaluates to the value of the register. ...
Rust
0
tion<String>, /// Specifies the page to fetch. The number of the first page is 1 pub page: Option<i32>, /// Specifies the number of items returned per page. The default value is 25, the maximum value is 50 except otherwise specified in the documentation. pub per_page: Option<i32> } /// struct for passi...
Rust
0
import RPi.GPIO as GPIO import time # 设置GPIO模式为BCM编码方式 GPIO.setmode(GPIO.BCM) # 设置GPIO引脚 led_pin = 16 GPIO.setup(led_pin, GPIO.OUT) def led_on(): # 点亮LED try: # 点亮LED GPIO.output(led_pin, GPIO.HIGH) print("LED点亮了,按Ctrl+C可以停止程序") # 程序会一直运行,直到按下Ctrl+C while True: ...
Python
1
from typing import List, Dict from ..predictor import Predictor from ...targets.vqa.answer import VQAAnswer @Predictor.register("vqa_task_class") class PredictorVQA(Predictor): """ Predictor wrapper for visual question answering tasks. Perform metrics: ``['accuracy', 'confidence']`` """ def __init_...
Python
1
from spotifywebapipython import * from spotifywebapipython.models import * try: # this sample requires an authorization token, as it requires security scope to accesses user data. CLIENT_ID:str = 'your_client_id' SPOTIFY_SCOPES:list = ['user-read-email','user-library-read'] # create new spotify clie...
Python
1
ort in server_ports: raise ValueError(f"Duplicate server port: {server.port}") servers_config.append(server) server_ports.add(server.port) warmup = [] for warmup_config in config_data.get('warmup', []): warmup.append(WarmupConfig( ser...
Python
1
I> { fn new(iter: I, distance: f32, target: Point2) -> Self { Self { iter, distance, target, } } fn predicate<T: Distance + Copy>(&self) -> impl Fn(&T) -> bool { let distance = self.distance; let target = self.target; move |u| u.is_closer(distance, target) } } impl_simple_iterator!(Closer); ///...
Rust
0
from flask import Flask import os import json import re app = Flask(__name__) @app.route('/') def display_images(): image_data_dir = os.path.join(os.getcwd(), 'image_data') image_files = [f for f in os.listdir(image_data_dir) if f.endswith('.json')] # Sort by filename image_files.sort(key=lambda x: in...
Python
1
: "invalid-address".into(), }], cluster_updates_tx, listener_manager_args: ListenerManagerArgs::new( Registry::default(), FilterRegistry::default(), filter_chain_updates_tx, ), execution_result_tx, sh...
Rust
0
<u32, _AHBSPPPCEXP0>; #[allow(missing_docs)] #[doc(hidden)] pub struct _AHBSPPPCEXP0; #[doc = "`read()` method returns [ahbspppcexp0::R](ahbspppcexp0::R) reader structure"] impl crate::Readable for AHBSPPPCEXP0 {} #[doc = "`write(|w| ..)` method takes [ahbspppcexp0::W](ahbspppcexp0::W) writer structure"] impl crate::Wr...
Rust
0
anges| ranges.0.contains(&i) || ranges.1.contains(&i)) }) }) .collect(); valid.push(&input.own_ticket); let mut res = vec![]; for (s, ranges) in input.fields.iter() { let mut possibilities = vec![]; for idx in 0..input.fields.len() { if valid ...
Rust
0
t.SOCK_DGRAM, 0, stuple, dtuple, _timeout(expiration) ) async with s: try: async for _ in _inbound_xfr( # pyright: ignore txn_manager, s, query, serial, timeout, ...
Python
1
', MvGvspPixelType), # < \~chinese 目标像素格式 \~english Destination pixel format ('pDstBuffer', POINTER(c_ubyte)), # < \~chinese 输出数据缓存 \~english Output data buffer ('nDstLen', c_uint), # < \~chinese 输出数据大小 \~english Output data size ('nDstBufferSize', c...
Python
1
_NetworkManagement_Ndis'*"] pub const NDIS_GFT_OFFLOAD_CAPS_IGNORE_ACTION_SUPPORTED: u32 = 8u32; #[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"] pub const NDIS_GFT_OFFLOAD_CAPS_INGRESS_AGGREGATE_COUNTERS: u32 = 32u32; #[doc = "*Required features: 'Win32_NetworkManagement_Ndis'*"] pub const NDIS_GFT_OFFLO...
Rust
0
which_bucket = math_ops.to_int32(which_bucket) if shapes is not None: shapes = [tensor_shape.scalar()] + shapes _, dequeued = bucket( tensors=[input_length] + tensor_list, which_bucket=which_bucket, batch_size=batch_size, num_buckets=len(bucket_boundaries) + 1, n...
Python
1
4, 5, 6, 7, 8]); <reponame>beevans/integrated-manager-for-lustre // Copyright (c) 2020 DDN. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. use crate::{agent_error::ImlAgentError, env, fidlist, http_comms::mailbox_client}; use futures::{ ...
Rust
0
game if play_again { deck = Sequence::multi_deck(config.n_decks, config.n_jokers, &mut rng); hands = vec![Sequence::new(); config.n_players as usize]; table = Table::new(); for i in 0..config.n_players { for _ in 0..config.n_cards_to_start { ...
Rust
0
#------------------------------------------------------------------------------- # # Spherical Harmonic Expansion - Geomagnetic Model - test dataset # # External Spherical Harmonic Coefficients - SWARM MMA # #------------------------------------------------------------------------------- # Copyright (C) 2018 EOX IT S...
Python
1
tail_or: Vec<P<Pat>>) { match target { // On an existing or-pattern in the target, append to it. Pat { kind: Or(ps), .. } => ps.append(&mut tail_or), // Otherwise convert the target to an or-pattern. target => { let mut init_or = vec![P(take_pat(t...
Rust
0
e>, } impl Builder { /// Specifies the number of parallel threads for scheduling. pub fn parallelism(&mut self, n: usize) -> &mut Self { assert!(n > 0, "parallelism must not be zero"); self.parallelism = Some(n); self } /// Constructs an [Runtime] to spawn and schedule tasks. ...
Rust
0
.unwrap() }); shared.analog_inputs.lock(|a| *a = *buffer); *local.buffer = Some(buffer); } // Periodic status update to Computer (every millisecond) #[task(shared = [usb_class])] fn usb_report(mut cx: usb_report::Context) { // schedule itself to keep the loop running ...
Rust
0
{ assert_eq!(join_path(&[&home, "foo"]).unwrap(), format!("{}/foo", home)) } #[cfg(target_os = "windows")] { assert_eq!( join_path(&[&home, "foo"]).unwrap(), format!(r"{}\foo", home) ) } } #[test] fn test_...
Rust
0
try_coth(self) -> Option<Self> { unimplemented!() } #[inline] fn try_csch(self) -> Option<Self> { unimplemented!() } forward! { fn sin(self) -> Self; fn cos(se...
Rust
0
() + f', step_mode={self.step_mode}' def forward(self, x: Tensor): if self.step_mode == 's': x = super().forward(x) elif self.step_mode == 'm': if x.dim() != 6: raise ValueError(f'expected x with shape [T, N, C, D, H, W], but got x with shape {x.shape}!') ...
Python
1
, MachInstLabelUse, TextSectionBuilder, VCodeConstant, VCodeConstants, VCodeInst, }; use crate::timing; use cranelift_entity::{entity_impl, SecondaryMap}; use log::trace; use smallvec::SmallVec; use std::convert::TryFrom; use std::mem; use std::string::String; use std::vec::Vec; /// A buffer of output to be produced, ...
Rust
0
out_vcf_file, genome): ''' Shuffle the SNPs within their overlapping DHS. ''' out_vcf_open = open(out_vcf_file, 'w') for line in open(in_vcf_file): a = line.split() # read SNP info snp_chrom = a[0] snp_pos = int(a[1]) snp_nt = a[3] # determine BED start ...
Python
1
from unimol_tools import MolTrain2, MolPredict2 import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from multiprocessing import freeze_support import joblib from rdkit import Chem def main(): # read from excel df = pd.read_excel('../data/candidate/TS.xlsx', sheet_name='...
Python
1
onst OPM_BUS_IMPLEMENTATION_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_SOCKET: OPM_BUS_TYPE = 196608i32; #[doc = "*Required features: 'Win32_Media_MediaFoundation'*"] pub const OPM_BUS_IMPLEMENTATION_MODIFIER_DAUGHTER_BOARD_CONNECTOR: OPM_BUS_TYPE = 262144i32; #[doc = "*Required features: 'Win32_Media_MediaFoundation'*"] pub c...
Rust
0
(); let tenant_domain = m .value_of("tenant-domain") .ok_or_else(|| anyhow!("missing: --tenant-domain <argument>"))? .to_string(); Ok(ConfigMS { client_id, client_secret, tenant_domain, }) } #[tokio::main] async fn main() -> anyhow::Result<()> { let con...
Rust
0
SSKrSSKrSSKrSSKJr SSKJr SSKJr SSKJ r J r J r J r J r SSKJr SSKrSSKJr SSKJrJrJrJrJrJrJr SSKJr SS KJrJ r \ "S 5r!\"S 5r"\ S \S \RFS\4Sj5r$\ S \S \RF...
Python
1
geCommit"]["oid"], "commits": pr_commits} if total_commits > len(pr_commits): oid = pr["mergeCommit"]["oid"] print( f"WARNING: PR {prnumber} (merge {oid}) has {total_commits} commits, but GitHub is only giving us {len(pr_commits)} of them" ) # Check we got all PRs assert len(pr...
Python
1
, "windows-1250", "windows-1251", "windows-1252", "windows-1253", "windows-1254", "windows-1255", "windows-1256", "windows-1257", "windows-1258", "iso-8859-6-e", "iso-8859-8-e", "iso-8859-6-i", "iso-8859-8-i", "sun_eu_greek", "csksc56011987", "ks_c_5601-19...
Rust
0
atch self { Self::Created(id) | Self::Deleted(id) | Self::Extended(id) | Self::Shortened(id) => id, } } } } /// World event /// /// Does not participate in `Event`, but useful for events warranties when modifying `wsv` #[derive( ...
Rust
0
def fun1(a,b): print("The value of first argument is :: ",a) print("The value of first argument is :: ",b)
Python
1
class Solution: def maximumSubsequenceCount(self, text: str, pattern: str) -> int: ans = 0 count0 = 0 count1 = 0 for i, c in enumerate(text): if c == pattern[1]: ans += count0 count1 += 1 if c == pattern[0]: count0 += 1 # Adding pattern[0] in the beginning or ...
Python
1
et = self.reg_set reg_set.add(r_num) if 'type' in captured_dict: c_type = captured_dict['type'] if c_type: if '64' in c_type: reg_set.add(r_num + 1) if '128' in c_type: ...
Python
1
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': "CRM enterprise", 'version': "1.0", 'category': "Sales/CRM", 'summary': "Advanced features for CRM", 'description': """ Contains advanced features for CRM such as new views and scanning busi...
Python
1
"""Use case for archiving a schedule stream.""" from jupiter.core.domain.concept.schedule.schedule_domain import ScheduleDomain from jupiter.core.domain.concept.schedule.schedule_source import ( ScheduleSource, ) from jupiter.core.domain.concept.schedule.schedule_stream import ScheduleStream from jupiter.core.doma...
Python
1
path).unwrap(); let (blobs, _) = make_slot_entries(2, 0, 1); // Write this blob to slot 2, should chain to slot 0, which we haven't received // any blobs for blocktree.write_blobs(&blobs).unwrap(); // Check that repair tries to patch the empty slot ...
Rust
0
ub FreeBalance get(free_balance): map T::AccountId => T::Balance; pub ReservedBalance get(reserved_balance): map T::AccountId => T::Balance; pub Locks get(locks): map T::AccountId => Vec<BalanceLock<T::Balance, T::BlockNumber>>; pub TotalLock get(total_lock): T::Balance; pub Vesting get(vesting) build(|conf...
Rust
0
] = video_info['id'] final_dict['url'] = f'https://www.youtube.com/watch?v={video_info["id"]}' final_dict['title'] = video_info.get('title', '') final_dict['description'] = video_info.get('description', '') final_dict['timestamp'] = date_string_utc final_dict['language'] = video_info.get('language',...
Python
1
import numpy as np import matplotlib.pyplot as plt def plot_fwi_result(vp_init, vp_inv, vs_init, vs_inv, xrange, yrange, nx, ny, name1="Initial $\mathregular{V_P}$", name2="Inverted $\mathregular{V_P}$", name3="Initial $\mathregular{V_S}$", ...
Python
1
(); state.ipv4_addr_sub.retain(|x| x.addr().get() != addr); let new_size = state.ipv4_addr_sub.len(); if new_size == original_size { return Err(AddressError::NotFound); } assert_eq!(original_size - new_size, 1); Ok(()) },...
Rust
0
AzureRequestError> { // Take either the Sequence number or the Message ID // Then add the lock token and finally join it into the targer let target = message .props .SequenceNumber .map(|seq| seq.to_string()) .or(message.props.MessageId.clone()) ...
Rust
0