text
string
label_name
string
labels
int64
: &str) -> ~str { // The version will get mangled to have a leading '_', but it makes more // sense to lead with a 'v' b/c this is a version... let vers = if vers.len() > 0 && !char::is_XID_start(vers.char_at(0)) { "v" + vers } else { vers.to_owned() }; mangle(sess, path, Some(h...
Rust
0
(icon.as_bytes()).as_ptr()); } } pub fn get_caption() -> (String, String) { let mut title_buf = ptr::null_mut(); let mut icon_buf = ptr::null_mut(); unsafe { ll::SDL_WM_GetCaption(&mut title_buf, &mut icon_buf); (str::from_utf8(ffi::c_str_to_bytes(mem::transmute_copy(&title_buf))).t...
Rust
0
common_feature_ids] for node_id in node_index: if leaf_id[sample_id] == node_id: continue cur_feature = feature[node_id] feature_name = data_columns[cur_feature] if feature_name not in features_touched: features_touched.append(feature_name) value_lis...
Python
1
#!/bin/env python #Copyright ReportLab Europe Ltd. 2000-2017 #see license.txt for license details #history https://hg.reportlab.com/hg-public/reportlab/log/tip/src/reportlab/lib/fonts.py __version__='3.3.0' __doc__='''Utilities to associate bold and italic versions of fonts into families Bold, italic and plain fonts a...
Python
1
pen(config_path)?; toml_file.read_to_string(&mut contents)?; let doc = contents.parse::<toml_edit::Document>()?; Ok((|| { let value = doc["docs"]["base-url"].as_value()?; let value = value.as_str()?; Some(value.to_string()) ...
Rust
0
} #[test_case( "class: 1-3 or 5-7", Field { name: "class".to_string(), range_1: 1..=3, range_2: 5..=7 } )] #[test_case( "field with whitespace: 999-9999 or 1-90007", Field { name: "field with whitespace".to_string()...
Rust
0
__all__ = ["EvictionBase"] from gptcache.utils.lazy_import import LazyImport eviction_manager = LazyImport( "eviction_manager", globals(), "gptcache.manager.eviction.manager" ) def EvictionBase(name: str, **kwargs): """Generate specific CacheStorage with the configuration. :param name: the name of the ...
Python
1
incarnation_id, source_device_tensor, dataset.element_spec) prototype_device_datasets.append(ds) # TODO(rohanj): Explore the possibility of the MultiDeviceIterator to # initialize the device side of the pipeline. This would allow the # MultiDeviceItera...
Python
1
n, m = map(int, input().split()) # 치킨집과 집간의 거를 계산하는 2차원 배열 만들기 # 치킨집과 집의 좌표를 저장하는 배열도 만들기 # 치킨즙 m 를 꺼내는 경우 계산 # 거낼때의 최소거리를 배열에서 꺼내서 더해보기 houses = [] stores = [] for i in range(n): l = list(map(int, input().split())) for j in range(n): if l[j] == 1: #집이면 houses.append((i, j)) elif...
Python
1
clause.len() as f64); r } /// compute a weighted model count of a CNF /// Note: not efficient! this is exponential in #variables /// mostly for internal testing purposes pub fn wmc(&self, weights: &HashMap<VarLabel, (usize, usize)>) -> usize { let mut total = 0; let mut wei...
Rust
0
print("\t\t\033[31mTest(13/16) : run the random beam placement module\033[0m") # random beam placement test case import samples.XML_constellation.beam_placement.random_placement as RANDOM_PLACEMENT_TEST RANDOM_PLACEMENT_TEST.random_placement() print("\t\t\033[31mTest(14/16) : calculate the shortest...
Python
1
) => lassoc1!(args, Int(0.into()), BitOr), CallKind::NAry(NAryCall::BitXor, args) => lassoc1!(args, Int(0.into()), BitXor), CallKind::NAry(NAryCall::BitNot, args) => lassoc1!(args, Int((-1).into()), BitOr, |e| { ast::ExprKind::Unop(Unop::BitNot(Size::Inf), Box::new(e)) }), CallKind::NAry...
Rust
0
Safety /// /// See [module level documentation](crate::extensions::wrappers). #[inline] #[must_use = "must use extracted reference"] pub unsafe fn get_inner(&mut self) -> &mut $return { &mut *self.0 } } unsafe impl ...
Rust
0
with open("happy.txt", "r") as F: # method 1 for i in F.read().split(): print(i, "*", end="") print("\n") # method 2 F.seek(0) for line in F.readlines(): for word in line.split(): print(word, "*", end="")
Python
1
"search_terms": ["second", "sec"], "examples": [ "SECOND(date_column)", "SECOND('2012-12-22 09:23:05')" ], "syntax": "SECOND(date)", "syntax_elements": [{ "element": "date", "description": "The date or date series to get the s...
Python
1
transition_channels * 2, 3, 1), # ) ##### 修改1:DCONV ##### self.stem = nn.Sequential( DConv(3, transition_channels, 3, 1), DConv(transition_channels, transition_channels * 2, 3, 2), DConv(transition_channels * 2, transition_channels * 2, 3, 1), ) ...
Python
1
# coding: utf-8 from django.db import models from django_th.models.services import Services from django_th.models import TriggerService """ https://dev.twitter.com/rest/public/timelines https://dev.twitter.com/rest/reference/get/statuses/user_timeline https://dev.twitter.com/rest/reference/get/search/tweet...
Python
1
class MOVEMENT: ENEMY_MOVEMENT_SPEED = 1 ENEMY_FIXED_HEIGHT = 0 ENEMY_MAX_TURN_SPEED_DEGREES = 360
Python
1
// - Decreasing piece length increases the proportion of disk seeks to disk // reads. This can be an issue for spinning disks. // - The BitTorrent v2 specification requires that piece sizes be larger than 16 // KiB. // // These constraints could probably be exactly defined and optimized // using an integer programm...
Rust
0
gs.rmgenes ) out_sep = infer_sep(args.out) or '\t' res.columns = [ 'ID' if col == 'Sample' else f"{col.replace('.', '_')}_quantiseq" for col in res.columns ] eps = 1e-8 num_cols = res.columns.drop('ID') res[num_cols] = res[num_cols].mask(res[num_cols].abs() < eps, 0)...
Python
1
psu_voltage, levels_lower=params[levels_type + "lower"], levels_upper=params[levels_type + "upper"], render_func=lambda x: f"{x:.2f} V", label=psu_type_readable, ) check_plugin_hp_msa_psu_sensor = CheckPlugin( name="hp_msa_psu_sensor", service_name=...
Python
1
xe9\ ^\x95/\x8a>\x22x\x0fF\x89\xae%\xd0\xfcp\xb6\ \xaaZh\xd5~\xcfu\xeeP\xe7kq\xf4\xfb\xb4t\ A<>\xbe\xe3\xba#\xd2\xfe\x03\xff\x00\xa5E\x7f\xaf\ kZ\x96\xad\xac\xed\xfd\xe3\x09\x0cp\xaez\xa2\xa8\xed\ ]\x17\xfc+\xe5\xb5\xf2\x9bM\xbc\x96\xd5\x97\xe5\xdb\xf7\ \xd5\xbe\xb95\xe6\xfa7\xed\xff\x00\xf0\xe7^\xf1\xed\xc7\ \x87\xef\...
Python
1
quence, ack_mask, } }, 0x31 => { let channel_id = buf.read::<u64>()?; let channel_sequence = buf.read::<u64>()?; let fragment_index = buf.read::<u8>()?; let fragment_count = buf.read::<u8>()?; ...
Rust
0
oc + self.ut_velocities * self.slot_duration # Set topology in channel model self.channel_model.set_topology( self.ut_loc, self.bs_loc, self.ut_orientations, self.bs_orientations, self.ut_velocities, self.in_state, self.los, self.bs_virtual_loc) ...
Python
1
ter_doc, 'deepvo', 'DeepVO Documentation', [author], 1) ] # -- Options for Texinfo output ---------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents =...
Python
1
# -*- coding: utf-8 -*- # # Copyright (C) 2015 by Ihor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License # as published by the Free Software Foundation, either version 3 # of the License, or (at your option) any later v...
Python
1
torage version {:?}", maybe_storage_version, ); match maybe_storage_version { Some(storage_version) if storage_version <= PalletVersion::new(2, 0, 0) => { migrate_voters_to_recorded_deposit::<T>(old_voter_bond); migrate_candidates_to_recorded_deposit::<T>(old_candidacy_bond); migrate_runners_up_to_record...
Rust
0
import numpy as np def plug_in(symbol_values): s = np.array(symbol_values['S']) c = symbol_values['C'] g1 = 15. / (8. * s[:3, :3].trace() - 4. * np.triu(s[:3, :3]).sum() + 3. * s[3:, 3:].trace()) g2 = 1 / 15 * (c[0][0] + c[1][1] + c[2][2]) - 1 / 15 * (c[0][1] + c[1][2...
Python
1
32 as HRESULT; pub const TPMAPI_E_INVALID_PCR_DATA: HRESULT = 0x80290117u32 as HRESULT; pub const TPMAPI_E_INVALID_OWNER_AUTH: HRESULT = 0x80290118u32 as HRESULT; pub const TPMAPI_E_FIPS_RNG_CHECK_FAILED: HRESULT = 0x80290119u32 as HRESULT; pub const TPMAPI_E_EMPTY_TCG_LOG: HRESULT = 0x8029011Au32 as HRESULT; pub const...
Rust
0
0 * 5 + pos.1; visited | (1 << bit) } type Visited = u32; type Pos = (usize, usize); type Board = [[dictionary::Letter; 5]; 5]; type AnyBoard = Vec<Vec<dictionary::Letter>>; fn boggled(raw: &str) -> Result<Board, WSError> { let mut res = [[dictionary::Letter::empty(); 5]; 5]; for (i, line) in raw.lines()....
Rust
0
ponents n_components = min(n_samples, n_components) inds = rnd.permutation(n_samples) basis_inds = inds[:n_components] basis = X[basis_inds] basis_kernel = pairwise_kernels( basis, metric=self.kernel, filter_params=True, n_jobs=sel...
Python
1
d for a discriminant, which for the `", stringify!($feature), "`feature is `", $free_bits, "`"; pub const DISCRIMINANT_BITS: u64 = $free_bits; } } )* }; } generate_discriminants! { [tagged_box_reserve_63bits, u8, 1, 63, 1 ], [tagged_box_reserve_6...
Rust
0
v) for k, v in token2feature.items()] sorted_tuple = sorted(token2feature_tuple, key=lambda item: item[1], reverse=True) with open(os.path.join(output_path, "token_features.txt"), "w") as f: for token_id, feature in sorted_tuple: f.write(f"{token_id}\t{feature}\n") token2rank = {token_id...
Python
1
ch interrupt bit slice configuration register"] pub pmcfg: PMCFG, } #[doc = "Pin Interrupt Mode register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](c...
Rust
0
); i += 4; } else { v.push(bytes[i]); i += 1; } } Cow::Owned(OsString::from_vec(v)) } fn parse_hex(v: &[u8]) -> Result<u8, ParseRowError> { Ok((hex_to_digit(v[0])? << 4) | hex_to_digit(v[1])?) } fn hex_to_digit(v: u8) -> Result<u8, ParseRowError> { O...
Rust
0
""" Feedback Models This module exports all feedback-related models. """ from app.models.feedback.base import Feedback from app.models.feedback.tools import ( FeedbackUserTool ) __all__ = [ # Base models 'Feedback', # Tool models 'FeedbackUserTool' ]
Python
1
d27d4eb4e, 0xffffffffffffffff, 0x61c8864e7a143578, ]; let mut hash_vals_mid = [0u64; 4]; let hash_vals_end: [u64; 4] = [ 0x3c6ef3630bd7950e, 0x1bbcd8c2f5e54380, 0x779b185ebca87000, 0xe6c617af2a1c0000 ]; let hash_vals_end_shift: [u64; 4] = [ 0x...
Rust
0
::std::os::raw::c_int, ) -> ncnn_mat_t, >, } #[test] fn bindgen_test_layout___ncnn_modelbin_t() { assert_eq!( ::std::mem::size_of::<__ncnn_modelbin_t>(), 32usize, concat!("Size of: ", stringify!(__ncnn_modelbin_t)) ); assert_eq!( ::std::mem::align_of::<__ncnn_mod...
Rust
0
onvert.input"; pub const CONVERT_FROM: &str = "convert.from"; pub const ATTRIBUTE_ALIAS: &str = "attribute.alias"; <reponame>wrl/iced_baseview<gh_stars>0 use baseview::Event as BaseEvent; use iced_native::keyboard::Event as IcedKeyEvent; use iced_native::keyboard::ModifiersState as IcedModifiersState; use iced_native:...
Rust
0
# mako/__init__.py # Copyright 2006-2024 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php __version__ = "1.3.2"
Python
1
print("This is first python code.") x=2022 print(x)
Python
1
Shift(Insert), "\x1b[2;3" => Partial, "\x1b[2;3~" => Alt(Insert), "\x1b[2;4" => Partial, "\x1b[2;4~" => ShiftAlt(Insert), "\x1b[2;5" => Partial, "\x1b[2;5~" => Ctrl(Insert), "\x1b[2;6" => Partial, "\x1b[2;6~" => CtrlShift(Insert), "\x1b[2;7" => Partial, "\x1b[2;7~" => CtrlAlt(In...
Rust
0
prefix(0); assert_eq!(h.read_prefix(), &[1, 2, 3, 4, 5, 6, 7, 8]); assert_eq!(h.prefix_size(), 8); h.ltrim_prefix(3); assert_eq!(h.read_prefix(), &[4, 5, 6, 7, 8]); assert_eq!(h.prefix_size(), 5); h.ltrim_prefix(1); assert_eq!(h.read_prefix(), &[5, 6, 7, 8]); assert_eq!(h.prefix_size()...
Rust
0
ories.append( SearchHistory(query=f"rerank: {question}", contexts=ctxs) ) # refine for refiner in self.refiner: ctxs = refiner.refine(ctxs) search_histories.append( SearchHistory(query=f"refine: {question}", contexts=ctxs) ...
Python
1
#!/usr/bin/env python ''' Leetcode: Search for a Range Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found in the array, return [-1, -1]. For example, Given [5, 7, 7, 8, 8, ...
Python
1
eads=16, mlp_ratio=4, norm_layer=partial(nn.LayerNorm, eps=1e-6), **kwargs) return model def moca_vit_base_patch16_dec512d2b(**kwargs): model = MOCA( patch_size=16, embed_dim=768, depth=12, num_heads=12, decoder_embed_dim=512, decoder_depth=2, decoder_num_heads=16, mlp_ratio=4,...
Python
1
{ /// Maximum possible value for an LSN pub const MAX: Lsn = Lsn(u64::MAX); /// Subtract a number, returning None on overflow. pub fn checked_sub<T: Into<u64>>(self, other: T) -> Option<Lsn> { let other: u64 = other.into(); self.0.checked_sub(other).map(Lsn) } /// Subtract a n...
Rust
0
"Dombovar", 46.3833333, 18.1166668, 131.0), City::new(4618, "Hungary", "Paks", 46.6333333, 18.8666668, 71.0), City::new(4619, "Hungary", "Oroszlany", 47.4833333, 18.3166676, 203.0), City::new(4620, "Hungary", "Komarom", 47.7333333, 18.1166668, 115.0), City::new(4621, "Hungary", "Vecses", 47.4000000, 19.2833328, 10...
Rust
0
tegory) t['objectClass'] = vn(self.objectClass) t['objectGUID'] = vn(self.objectGUID) t['objectSid'] = vn(self.objectSid) t['primaryGroupID'] = vn(self.primaryGroupID) t['sAMAccountName'] = vn(self.sAMAccountName) t['accountExpires'] = vn(self.accountExpires) t['badPasswordTime'] = vn(self.badPasswordTime...
Python
1
ding="utf-8").strip() subprocess.check_output(preload_command, encoding="utf-8").strip() result = subprocess.check_output(wallpaper_command, encoding="utf-8").strip() time.sleep(0.1) except Exception: retry_counter += 1 def change_wallpaper(i...
Python
1
query. fn from(inner: BlockNumber) -> Self { Self { query: inner.to_string(), } } } impl From<Fr> for BlockSearchQuery { /// Converts the state root hash of the block into the search query. fn from(inner: Fr) -> Self { Self { query: inner.to_hex(), ...
Rust
0
struct SubmitPageBuilder<'a> { contest_id: &'a ContestId, session: &'a SessionConfig, } impl<'a> SubmitPageBuilder<'a> { pub fn new(contest_id: &'a ContestId, session: &'a SessionConfig) -> Self { Self { contest_id, session, } } pub fn build(self, client: &...
Rust
0
# Author: 邵世昌 # CreatTime: 2024/11/14 # FileName: 面积图 import os from pyecharts.charts import Line from pyecharts import options as opts from pyecharts.faker import Faker #%%普通面积图 line =( Line() .add_xaxis(Faker.choose()) .add_yaxis( "图例", Faker.values(), areastyle_opts=opts.AreaStyle...
Python
1
from woningwaardering.vera.bvg.generated import Referentiedata from woningwaardering.vera.referentiedatasoort import Referentiedatasoort class RuimtesoortReferentiedata(Referentiedata): pass class Ruimtesoort(Referentiedatasoort): buitenruimte = RuimtesoortReferentiedata( code="BTR", naam="B...
Python
1
_duplicates.rs use alloc::{string::String, vec::Vec}; /// Remove duplicates from sentence /// /// # Arguments /// /// * `text` - The text to be processed /// /// # Returns /// /// Returns the text without duplicates pub fn remove_duplicates(text: &str) -> String { text.split_whitespace() .into_iter() ...
Rust
0
_video: for i in range(seq_lens): eval_data = eval_datas[i] print('\n{} sequences'.format(eval_data['sequences'][0])) scores = {} valid_sequence = torch.tensor(eval_data['valid_sequence'], dtype=torch.bool) # ******************************** Succes...
Python
1
set1 = {"apple", "banana", "cherry"} set2 = {"google", "microsoft", "apple"} set1.symmetric_difference_update(set2) print(set1)
Python
1
"""empty message Revision ID: ab68bb28a1db Revises: Create Date: 2024-09-04 16:04:10.512734 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'ab68bb28a1db' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto gene...
Python
1
f_model", "") config.set("ADVANCED_SPOOFING", "spoof_android_version", "13") config.set("ADVANCED_SPOOFING", "spoof_android_id_magisk", "true") config.set("ADVANCED_SPOOFING", "spoof_build_fingerprint", "true") config.set("ADVANCED_SPOOFING", "spoof_serial_number", "true") config...
Python
1
fn finalize(&self) { FLAGS.with(|f| { let mut of = f.get(); of.1 += 1; f.set(of); }); } } #[test] fn drop_triggers_finalize() { FLAGS.with(|f| assert_eq!(f.get(), Flags(0, 0))); { let _x = A { b: B }; FLAGS.with(|f| assert_eq!(f.get()...
Rust
0
#----------------------------------------------------------------------------- # Copyright (c) 2013-2023, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License (version 2 # or later) with exception for distributing the bootloader. # # The full license is in the file COPYING.txt...
Python
1
'rsv10', 'rsv20', 'rsv30', 'rsv60', 'imax5', 'imax10', 'imax20', 'imax30', 'imax60', 'imin5', 'imin10', 'imin20', 'imin30', 'imin60', 'imxd5', 'imxd10', 'imxd20', 'imxd30', 'imxd60', 'corr5', 'corr10', 'corr20', 'corr30', 'corr60', 'cord5', 'cord10', 'cord20', 'cord30', ...
Python
1
for CEndSessionMessage { fn as_rust(&self) -> Fallible<hermes::EndSessionMessage> { Ok(hermes::EndSessionMessage { session_id: create_rust_string_from!(self.session_id), text: create_optional_rust_string_from!(self.text), }) } } impl Drop for CEndSessionMessage { fn ...
Rust
0
"""测试配置文件""" import os import pytest import tempfile import shutil from pathlib import Path os.environ["ENV"] = "test" @pytest.fixture(scope="session") def test_env(): """确保测试运行在test环境中""" original_env = os.environ.get("ENV") os.environ["ENV"] = "test" yield if original_env: os.environ["...
Python
1
except: sleep(i+0.5) print(COLOR.DISPLAY, ' go ' + str(v_num) + ':', COLOR.END, file=self._out_fp) #log_fp.write(' go ' + str(v_num) + ':\n') # 拖动滚动条 #self.driver.execute_script("window.scrollTo(0,arguments[0])", 400 + 700 * (v_num - 1)) ...
Python
1
ct("RGBPoints must be an array"); let rgb_points: Vec<_> = rgb_data.chunks(4).map(|x| { let val = x[0].as_f64().unwrap() as f32; let r = x[1].as_f64().unwrap() as f32; let g = x[2].as_f64().unwrap() as f32; let b = x[3].as_f64().unwrap() as f32; (val, ...
Rust
0
t match_first(i.id, PATTERN_SANCTI_CLASS_3_LOCAL)] if third_and_fourth_class_sancti: return third_class_local_sancti, third_and_fourth_class_sancti, [] def rule_4th_class_feria_are_removed_from_celebration( calendar: Calendar, date_: date, tempora: List[Observance], observances: List[Observanc...
Python
1
wav,基本你随意指定,不支持会重新返回wav(本程序只提供wav文件格式)", ) # sample_rate 设置,滑块 sample_rate_input = gr.Slider( label="采样率(sample_rate)", minimum=8000, maximum=48000, step=1000, ...
Python
1
::<()>::NAME => self.h_encapsulate(Tag::APP_4), ApplicationTag5::<()>::NAME => self.h_encapsulate(Tag::APP_5), ApplicationTag6::<()>::NAME => self.h_encapsulate(Tag::APP_6), ApplicationTag7::<()>::NAME => self.h_encapsulate(Tag::APP_7), ApplicationTag8::<()>::NAME => self...
Rust
0
from langchain_core.tools import tool from langchain_openai import ChatOpenAI from langgraph.prebuilt import create_react_agent from utils.state import StateSuporteSimples # --- Base de Conhecimento da Empresa --- INFO_EMPRESA = { "horario_funcionamento": "Nosso horário de funcionamento é de Segunda a Sexta, das ...
Python
1
windows() { counts.add(&pair, 1); } counts } fn possible_elements(rules: &HashMap<Pair, char>) -> HashSet<char> { let mut out: HashSet<char> = HashSet::new(); for ((i1, i2), o) in rules { out.insert(*i1); out.insert(*i2); out.inser...
Rust
0
c, self.blocks[indexes[0]:indexes[-1] + 1], deform_inputs1, deform_inputs2, H, W) if self.version == 'old': outs.append(x.transpose(1, 2).view(bs, dim, H, W).contiguous()) # Split & Reshape c2 = c[:, 0:c2.size(1), :] c3 = c[:, c2.size(1):c2....
Python
1
) => curr_time - response_time, None => return NodeStatus::Bad, }; // Check if node has recently responded to us let max_last_response = Duration::minutes(MAX_LAST_SEEN_MINS); if since_response < max_last_response { NodeStatus::Good } else { NodeStatus::Questionable } } ...
Rust
0
""" Write a function to extract the nth element from a given list of tuples. assert extract_nth_element([('Greyson Fulton', 98, 99), ('Brady Kent', 97, 96), ('Wyatt Knott', 91, 94), ('Beau Turnbull', 94, 98)],0)==['Greyson Fulton', 'Brady Kent', 'Wyatt Knott', 'Beau Turnbull'] """ def extract_nth_element(list_of_tuple...
Python
1
oordMode.KittiCamera, origin=(0.5, 1, 0.5), rot_axis=1) confidences = results[:, 13] ret.confidences = confidences ret.bboxes_2d = bboxes_2d ret.bboxes_3d = bboxes_3d ret.labels = clas return ret @property de...
Python
1
""" Schemas Pydantic para Feedback """ from pydantic import BaseModel, Field from typing import Optional, Dict from datetime import datetime class FeedbackHumano(BaseModel): """Schema para feedback humano sobre uma correção""" correcao_id: str = Field(..., description="ID da correção sendo avaliada") usu...
Python
1
import FWCore.ParameterSet.Config as cms #from RecoMET.METProducers.PFMET_cfi import pfMet from JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff import * from JetMETCorrections.Configuration.DefaultJEC_cff import * from RecoMET.METPUSubtraction.mvaPFMET_leptons_cfi ...
Python
1
) if ip_str: ips = ip_str.split(',') for ip in ips: ip_num = appear_times.get(ip) isvalid, reason = is_valid_subdomain(ip=ip, ip_num=ip_num) if not isvalid: return False, reason cname_str = info.get('cname') if cname_str: cnames = c...
Python
1
# Copyright 2023 The Pigweed 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
Python
1
== 1 { handles.push(drive_source(sources.remove(0), output_tx, timestamp_range).await); return handles; } let mut source_rxs: Vec<Receiver<Box<Row>>> = Vec::new(); let mut source_drivers: Vec<SourceDriver> = Vec::new(); while !sources.is_empty() { let source = sources.remove(0...
Rust
0
stdout("info", format!("Pulling {}...", target).as_str()); util::call_with_stdout( pull(target), format!("{} pulled", target).as_str(), format!("{} pull failed. :(", target).as_str(), ); } else { util::stdout("info", format!("Cloning {}...", target).as_str...
Rust
0
такого проекта ' 'должен быть ключ `detail` с описанием ошибки.' ) def test_delete_charity_project_already_closed(superuser_client, closed_charity_project): response = superuser_client.delete( PROJECT_DETAILS_URL.format(project_id=closed_charity_p...
Python
1
ui.QApplication.UnicodeUTF8)) self.label_3.setText(QtGui.QApplication.translate("MainWindow", "System:", None, QtGui.QApplication.UnicodeUTF8)) self.pushButton_avoid_add.setText(QtGui.QApplication.translate("MainWindow", "+", None, QtGui.QApplication.UnicodeUTF8)) self.pushButton_avoid_delete.se...
Python
1
[..0] < [..~]); } #[test] fn integer_bound_partial_eq() { test_bound_cmp!(i32, [=0..] == [=0..]); test_bound_cmp!(i32, [=1..] == [0..]); test_bound_cmp!(i32, [=0..] == [..=0]); test_bound_cmp!(i32, [=0..] == [..1]); test_bound_cmp!(i32, [0..] == [=1..]); test_bound_cmp!(i32, [0..] == [0..]); test_bo...
Rust
0
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-top-read', ] ...
Python
1
for (str_num, f, n_width, f_min, f_max) in izip!(astr.iter(), af.iter(), an_width.iter(), af_min.iter(), af_max.iter()) { use termcolor::*; let mut stdout = StandardStream::stdout(if atty::is(atty::Stream::Stdout) { ColorChoice::Auto ...
Rust
0
op'] = 2 # dont use a=b=zeros((2,3)) because a and b will point to the same array! # b = A[:,1] does NOT create a new matrix. It is simply a pointer to that row! so if you change b you change A # DO NOT USE A = B = array() unless you know what you are doing. They will point to the same object! # Todo: # Replace vstack ...
Python
1
ize = size * 2; } barrier_all(); finalize(); exit(0); } use envelope_editor::EnvelopePoint; use graphics::vecmath::Scalar; /// General use 2D spatial point. pub type Point = [Scalar; 2]; impl EnvelopePoint for Point { type X = Scalar; type Y = Scalar; /// Return the X value. fn get...
Rust
0
s\m\misc_dwrv_coin00.dds", 0x5171_3228, 0x3D89_505E), (r"icons\m\misc_de_goblet_09.dds", 0x5171_3228, 0xA627_6076), (r"icons\m\misc_de_goblet_08.dds", 0x5171_3228, 0xA627_7076), (r"icons\m\misc_de_goblet_07.dds", 0x5171_3228, 0xA627_8076), (r"icons\m\misc_de_goblet_06.dds", 0x5171_3228, 0xA627_9076)...
Rust
0
Q_API_KEY에 key를 입력해주세요.") except Exception as e: error_message = f"setup_groq 오류 발생: {e}" logger.error(error_message) def setup_lm_studio(self, app): try: models = self.get_lm_studio_models() if models: ...
Python
1
e!( "Unable to get active power plan. Error code: {}", success )) } } } fn switch_power_plan(plan_guid: &GUID) -> Result<()> { unsafe { let success = PowerSetActiveScheme(None, plan_guid); if success != 0 { Err(eyre!( ...
Rust
0
let path = p.step_n(m.distance, m.dir); for pos in &path { dist_b = dist_b + 1; if let Some(dist_a) = trace.get(pos) { min_distance = std::cmp::min(min_distance, dist_a + dist_b); } } } min_distance.to_st...
Rust
0
# pylint: disable=no-self-use,invalid-name from duplicate_questions.data.data_indexer import DataIndexer from duplicate_questions.data.instances.instance import TextInstance from duplicate_questions.data.tokenizers.word_tokenizers import NLTKWordTokenizer from duplicate_questions.data.instances.instance import IndexedI...
Python
1
fn map<F: Fn(&Scope, Data) -> Result<Data, ParseError> + 'static>(self, f: F) -> Pattern { Pattern::Map(Box::new(self), Box::new(f)) } pub fn mapval<D: Into<Data>>(self, d: D) -> Pattern { let d = d.into(); self.map(move |_, _| Ok(d.clone())) } pub fn store<K: Into<i64>>(self, k...
Rust
0
# # The Python Imaging Library # # load a GIMP brush file # # History: # 96-03-14 fl Created # 16-01-08 es Version 2 # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1996. # Copyright (c) Eric Soroos 2016. # # See the README file for information on usage and redistribution. # # #...
Python
1
pub const SS_DISABLE: ::std::os::raw::c_uint = 2; pub type _bindgen_ty_19 = ::std::os::raw::c_uint; extern "C" { pub fn sigaltstack(__ss: *const stack_t, __oss: *mut stack_t) -> ::std::os::raw::c_int; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sigstack { pub ss_sp: *mut ::std::os::raw::c_void, p...
Rust
0
al_skills", []) preferred_skills = requirements.get("preferred_skills", []) all_user_skills = [] for category, skills in user_skills.items(): all_user_skills.extend([s.lower() for s in skills]) gaps = [] # Essential skill gaps essent...
Python
1
""" Convert a list of 11-bit numbers to a bytearray. Args: nums (int[]): list of 11-bit numbers Returns: bytes: bytearray """ buffer = 0 num_of_bits = 0 output = [] for i in range(len(nums)): buffer |= nums[i] << num_of_bits num_of_bits += 11 ...
Python
1
const IBMPC_GRADIENT: &[u8; 16] = b"..-:;=+<*xoXO@MW"; impl Buf { pub fn new(w: usize, h: usize) -> Buf { Buf(vec![0; w * h], w, h) } pub fn put<V: Copy>(&mut self, frag: Fragment<V>, val: f32) { self.0[(frag.coord.1 as usize) * self.1 + (frag.coord.0 as usize)...
Rust
0
0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, 0x1e, 0...
Rust
0