text
string
label_name
string
labels
int64
import setuptools import pathlib HERE = pathlib.Path(__file__).parent VERSION = "1.0.14" PACKAGE_NAME = "bevigil-cli" AUTHOR = "Bevigil" AUTHOR_EMAIL = "bevigil@cloudsek.com" URL = "https://osint.bevigil.com/" LICENSE = "Apache License 2.0" DESCRIPTION = "BeVigil OSINT CLI" LONG_DESCRIPTION = (HERE / "README.md").rea...
Python
1
estId: str """ self._RequestId = None @property def RequestId(self): """唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 :rtype: str """ return self._RequestId @RequestId.setter def RequestId(self, RequestId): ...
Python
1
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # Copyright (C) Zing contributors. # # This file is a part of the Zing project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import pyte...
Python
1
, event 1 = bit 1,..., event 15 = bit 15."] #[inline] pub fn clr9(&self) -> CLR9R { let bits = { const MASK: bool = true; const OFFSET: u8 = 9; ((self.bits >> OFFSET) & MASK as u32) != 0 }; CLR9R { bits } } #[doc = "Bit 10 - A 1 in bit m select...
Rust
0
8_t, ) as *mut sctp_chunkhdr } if system_base_info.sctpsysctl.sctp_blackhole == 0u32 || system_base_info.sctpsysctl.sctp_blackhole == 1u32 && contains_init_chunk == 0i32 { sctp_send_abort(m, iphlen, src, dst, sh, 0u32, cause, vrf_id, port); }; } /* * check the inbound datagram t...
Rust
0
opencv::imgproc::FONT_HERSHEY_SIMPLEX, 0.6, core::Scalar::new(0.0, 255.0, 0.0, 0.0), 1, opencv::imgproc::LINE_8, false )?; highgui::imshow(window, &mut frame)?; let key = highgui::wait_key(10)?; if key > 0 && key ...
Rust
0
*= -1.; pos += 1 } /* To avoid the problem with Mac OS X 10.4 Quartz, * change the presion of the real numbers * on June 27, 2007 for musix20.pfb */ sprintf( buffer.as_mut_ptr() as *mut i8, b"%.13g\x00" as *const u8 as *const i8, value, ); let mut i = 0; ...
Rust
0
time = time_mode for time in range(3): eq.vacuum_toroidal_field.b0 = [time + 3.0, time + 3.5] # eq.time is the time coordinate for b0 in heterogeneous mode as well eq.time = [time * 0.1, (time + 0.5) * 0.1] dbentry.put_slice(eq) eq = dbentry.get("equilibrium") assert np.ar...
Python
1
flags! { pub struct NSWindowStyleMask: NSUInteger { const NSBorderlessWindowMask = 0; const NSTitledWindowMask = 1 << 0; const NSClosableWindowMask = 1 << 1; const NSMiniaturizableWindowMask = 1 << 2; const NSResizableWindowMask = 1 << 3; ...
Rust
0
lect(); new_tup.swap(0, 1); // so it's in the right order new_tup.insert(1, vm.ctx.new_str(sub)); } else { new_tup.push(vm.ctx.new_str(value)); new_tup.push(vm.ctx.new_str("".to_string())); new_tup.push(vm.ctx.new_str("".to_string())); } Ok(vm.ctx.new_tuple(new_tup)) ...
Rust
0
s): client = AsyncClient(llama_7b_url, hf_headers) responses = [ response async for response in client.generate_stream("test", max_new_tokens=1) ] assert len(responses) == 1 response = responses[0] assert response.generated_text == "_" assert response.details.finish_reason == Finis...
Python
1
"] ENABLED, } impl From<REGION125_A> for bool { #[inline(always)] fn from(variant: REGION125_A) -> Self { match variant { REGION125_A::DISABLED => false, REGION125_A::ENABLED => true, } } } #[doc = "Reader of field `REGION125`"] pub type REGION125_R = crate::R<boo...
Rust
0
lf.windows = Window::all_in_session(self.name.as_str()); self.find_window(window_name.as_str()) } else { None } } } #[derive(Debug)] pub struct Layout { // I wouldn't need two things here if I could just parse the tmux layout checksum pub window_count: i32, pub l...
Rust
0
saw) else: # We never detected the after_sequence raise ValueError("Could not lock sequences (%s)" % saw) def check_for_right_shift_internal_compiler_error(cmd): """ On our arm CI, this fails with an internal compilation error The failure looks like the following, and can be reproduc...
Python
1
import json from pathlib import Path from ska_utils import AppConfig from sk_agents.configs import TA_PLUGIN_CATALOG_FILE from sk_agents.exceptions import PluginCatalogDefinitionException, PluginFileReadException from sk_agents.plugin_catalog.models import Plugin, PluginCatalogDefinition, PluginTool from sk_agents.pl...
Python
1
tem_overview']['active_tasks']}") print(f" • Modelos Disponibles: {intelligence_report['system_overview']['total_models_available']}") print(f" • Tiempo de Actividad: {intelligence_report['system_overview']['uptime']}") print(f"\n🎯 Capacidades de IA:") capabilities = intell...
Python
1
iterator = arr[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step \ = _iterator.next()).done); _iteratorNormalCompletion = true) { i = _step.value; }" ); identical!( regression_06, " var _tmp; const { [( _tmp = {}, d = _extends({}, _tmp), _tmp)]: c } =...
Rust
0
required_att = None drop_attn = self.dropout(attn) if (self.use_final_linear): context = unshape(torch.matmul(drop_attn, value)) output = self.final_linear(context) return output, required_att else: context = torch.matmul(drop_attn, value) ...
Python
1
# -*- coding: utf-8 -*- # # Copyright 2023 Google LLC. All Rights Reserved. # # 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 requir...
Python
1
tParent) return self._engagement_object @property def findingForm(self): return self.findingClass.formClass( engagementParent=self.engagementParent, scoringType=self.scoringType ) def __iter__(self): for finding in self.findings: yie...
Python
1
tart file, name, description, authors, manual section). man_pages = [ (master_doc, 'realisticprogressiononerp-1', u'Realistic Progression One (RP-1) Documentation', [author], 1) ] # -- Options for Texinfo output ---------------------------------------------- # Grouping the document tree into Texinfo files. ...
Python
1
_mut(|item| { sum += **item; }); sum }); } #[bench] #[cfg(not(miri))] fn bench_cowvec_fast_for_each_owned_case(b: &mut Bencher) { let mut thevec2 = Vec::new(); for _ in 0..ITERATIONS { thevec2.push(32i128); } let...
Rust
0
factory.create_link("Google".to_string(), "http://www.google.com/".to_string()); let mut tray_news = factory.create_tray("新聞".to_string()); tray_news.add(asahi); tray_news.add(yomiuri); let mut tray_yahoo = factory.create_tray("Yahoo!".to_string()); tray_yahoo.add(us_yahoo); tray_yahoo.add(jp...
Rust
0
sk( type=TaskType.Regression, level=TaskLevel.Contact, num_labels=3 ) assert dataset.tasks["contact_regression"] == Task( type=TaskType.Regression, level=TaskLevel.Contact, num_labels=1 ) class TestHuggingFaceDataset: root = "multimolecule/" def test_bprna_spo...
Python
1
let circuit_2 = build_fp_elem_var_circuit(p2, m, fp_elem_var.two_power_m)?; test_variable_independence_for_circuit::<F>(circuit_1, circuit_2)?; Ok(()) } fn build_fp_elem_var_circuit<F: PrimeField>( p: F, m: usize, two_power_m: F, ) -> Result<PlonkCircuit<F>, PlonkEr...
Rust
0
mock.call( job_doc, [commands.BlenderRender( blender_cmd='/path/to/blender --enable-new-depsgraph', filepath='/agent327/scenes/someshot/somefile.flamenco.blend', format='OPEN_EXR', render_output='/render/o...
Python
1
sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().map(|response| { let result = ::std::mem::drop(response); result })) } else { Box::new(response...
Rust
0
setting. Exceptions are 1) The last value in the table is the upper limit, so a"] #[doc = " value larger than this will be overridden to the largest entry in the table. 2) The exposure time cannot be"] #[doc = " larger than the equivelent FPS. So expect 100ms exposure time to be reduced to 30ms or 33.33ms when...
Rust
0
nd(in_channels * expand_ratio)) layers = [] if expand_ratio != 1: layers.append(ConvNormAct(in_channels, hidden_dim, kernel_size = 1, activation_layer = None)) # Depth-wise convolution layers.append( ConvNormAct(hidden_dim, hidden_dim, kernel_size = 3, stride = ...
Python
1
ait_interface_use> { #( type #impld_traits_a=Implemented<trait_marker::#impld_traits_b>; )* #( type #unimpld_traits_a=Unimplemented<trait_marker::#unimpld_traits_b>; )* type #priv_assocty=(); } }; ) .to_tokens(mod_); } /// Outputs...
Rust
0
import pygame import sys # Initialize Pygame pygame.init() # Set up the screen screen = pygame.display.set_mode((400, 300)) pygame.display.set_caption("Change Hotkey") # Set up the clock clock = pygame.time.Clock() # Define colors WHITE = (255, 255, 255) BLACK = (0, 0, 0) # Define square properties square_size = 5...
Python
1
''' MetadataDefaults is a registry of functions used to compute default metadata values for new bundles created using the command-line client. The logic being done here combines information about the bundle subclass and information from command-line arguments, so it doesn't belong in the core bundle subclass code. '''...
Python
1
:from(self.src_reg_arg(0)), typ: self.atom_arg(1) }, REC_INIT => RecInit { lvrec: SrcReg::from(self.src_reg_arg(0)), index: From::from(self.atom_arg(1)), value: self.atom_arg(2) }, REC_...
Rust
0
n) = b.dim(); unsafe { A::Element::trmm()(a.layout() as CBLAS_ORDER, side as CBLAS_SIDE, b.uplo() as CBLAS_UPLO, a.transpose() as CBLAS_TRANSPOSE, a.diag() as CBLAS_DIAG, m, n, alpha.as_weird(), a.as_ptr() as *const _, a.major_stride(), b.as_mut_ptr() as *mut _, b.major_stride()) } } /// Solve the matrix equatio...
Rust
0
igger gc self.assertEqual(len(ouch), 1) # else __del__ wasn't invoked for x in ouch: # If __del__ resurrected c2, the instance would be damaged, with an # empty __dict__. self.assertEqual(x, None) class PythonFinalizationTests(unittest.TestCase): def test_ast_...
Python
1
_payload_v1_request() { Tester::new() .assert_request_equals( |client| async move { let _ = client.get_payload_v1::<MainnetEthSpec>([42; 8]).await; }, json!({ "id": STATIC_ID, "jsonrpc": JSONR...
Rust
0
from app import db from app.models import TipoActividad class TipoActividadRepository: @staticmethod def add_tipo_actividad(data): nuevo_tipo_actividad = TipoActividad( tipo=data.get('tipo') ) db.session.add(nuevo_tipo_actividad) db.session.commit() return n...
Python
1
st::DIGEST_LEN, 32); assert_eq!(<Sha384 as Hasher>::Digest::DIGEST_LEN, 48); assert_eq!(<Sha512 as Hasher>::Digest::DIGEST_LEN, 64); #[cfg(feature = "insecure")] { #[allow(deprecated)] let len = <InsecureSha1 as Hasher>::Digest::DIGEST_LEN; assert_eq!...
Rust
0
"key_1")), Bytes::from("val_1")); sm.insert(Hash::digest(Bytes::from("key_2")), Bytes::from("val_2")); { let mut it = sm.iter(); assert_eq!( it.next().unwrap(), (&Hash::digest(Bytes::from("key_1")), Bytes::from("val_1")) ); assert_eq!( it.next...
Rust
0
# Generated by Django 4.2.20 on 2025-08-26 18:59 import modelcluster.contrib.taggit from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("base", "0003_pagetopic_topic_remove_taggedpage_content_object_and_more"), ("core", "0043_sitewidedonatebannerpage"), ...
Python
1
operator def __read_version(self, attrs): castxml_format = attrs.get(XML_AN_CASTXML_FORMAT) gccxml_cvs_revision = None if castxml_format is None: gccxml_cvs_revision = attrs.get(XML_AN_CVS_REVISION) xml_generator = utils.xml_generators( utils.loggers.cxx_pars...
Python
1
data(self_: &mut Mods) -> Result<()> { let resolved_mod_list = self_.resolved_mod_list.as_ref().ok_or_else(|| { format_err!("Call `Mods:resolve_versions() before calling `Mods:scan_metadata()`") })?; let mut mods = HashMap::new(); for mod_id in &resolved_mod_list.sorted_mods { let versi...
Rust
0
= log_monitor.get_new_events() if new_log_events: event_processor.process_events(new_log_events) if not paused: event_processor.update_cars(dt * sim_speed) draw_road(screen) for car_id in event_processor.active_cars: is_tracked = (car_id ==...
Python
1
0SSASET register"] pub ssaset: crate::Reg<ssaset::SSASET_SPEC>, #[doc = "0x3c - DCH0SSAINV register"] pub ssainv: crate::Reg<ssainv::SSAINV_SPEC>, #[doc = "0x40 - DCH0DSA register"] pub dsa: crate::Reg<dsa::DSA_SPEC>, #[doc = "0x44 - DCH0DSACLR register"] pub dsaclr: crate::Reg<dsaclr::DSACL...
Rust
0
field: ", stringify!(in6_addr__bindgen_ty_1), "::", stringify!(__u6_addr32) ) ); } #[test] fn bindgen_test_layout_in6_addr() { assert_eq!( ::std::mem::size_of::<in6_addr>(), 16usize, concat!("Size of: ", stringify!(in6_addr)) ); assert...
Rust
0
c_uchar, ) -> c_int; pub fn CfdGetBaseTapLeaf( handle: *const c_void, tree_handle: *const c_void, leaf_version: *mut c_uchar, tapscript: *mut *mut i8, tap_leaf_hash: *mut *mut i8, ) -> c_int; pub fn CfdGetTapBranchCount( handle: *const c_void, tree_handle: *const c_void, branch_...
Rust
0
::caller()` in a macro should behave similarly to `file!` and `line!`, // i.e. point to where the macro was invoked, instead of the macro itself. let loc2 = caller_location_from_macro!(); assert_eq!(loc2.file(), file!()); assert_eq!(loc2.line(), 23); assert_eq!(loc2.column(), 16); } //! Trait used t...
Rust
0
root, path_globs, digest_hint, ) .await?; nodes::Snapshot::store_snapshot(&core, &snapshot) } }) .collect::<Vec<_>>(); py.allow_threads(|| { core.executor.block_on( future03::try_join_all(snapshot_futures) ...
Rust
0
# -*- coding: utf-8 -*- from odoo import models, fields, _ from odoo.exceptions import UserError class IrAttachment(models.Model): _inherit = 'ir.attachment' def unlink(self): # OVERRIDE linked_edi_documents = self.env['account.edi.document'].search([('attachment_id', 'in', self.ids)]) ...
Python
1
crate::errors::*; use crate::types::*; use uuid::Uuid; /// Informs TDLib that the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats) #[derive(Debug, Clone, Default, Serialize, Deserialize)] pub...
Rust
0
= RequestId def _deserialize(self, params): self._SearchAfter = params.get("SearchAfter") self._Data = params.get("Data") self._RequestId = params.get("RequestId") class DescribeTasksOverviewRequest(AbstractModel): """DescribeTasksOverview请求参数结构体 """ def __init__(self): ...
Python
1
f(); println!("-----------------"); println!("Arrays and Slices"); println!("-----------------"); arrays_and_slices(); println!("------------"); println!("More slicing"); println!("------------"); slicing_and_dicing(); println!("---------------"); ...
Rust
0
# -*- coding: utf-8 -*- # Copyright © 2021 Patrick Levin # SPDX-Identifier: MIT u"""EXIF utilities for extracting focal length for distance calculation. The module contains the function `get_focal_length` to extract focal length data from image EXIF data. Missing 35mm focal length data (usually provided by smartphone...
Python
1
); } guard_access_fn!(pub get_console(CONSOLE: Console)); pub struct Console { x_pos: isize, y_pos: isize, frontground: Rgb888, background: Rgb888, } impl Console { pub fn new() -> Self { Self { x_pos: 0, y_pos: 0, frontground: colors::FRONTGROUND, ...
Rust
0
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import sys import numpy as np from Bio.Seq import Seq from wub.simulate import seq as sim_seq from wub.util import parse as parse_util from wub.util import seq as seq_util # Parse command line arguments: parser = argparse.ArgumentParser( description=...
Python
1
_wait(j: *mut SdJournal, timeout_usec: u64) -> c_int; fn sd_journal_seek_tail(j: *mut SdJournal) -> c_int; fn sd_journal_seek_head(j: *mut SdJournal) -> c_int; fn sd_journal_previous_skip(j: *mut SdJournal, skip: u64) -> c_int; fn sd_journal_sendv(iovs: *const libc::iovec, n: c_int) -> c_int; fn s...
Rust
0
wn]) for i in blocks_with_transformer[updown]} # eg {"down": {"block_1": 1}} to {"down": {"block_1": [1, 1]}} for i in blocks_with_transformer[updown]: block = f"block_{i}" # set not assigned blocks to default scale if block not in scales[updown]: sca...
Python
1
from dataclasses import dataclass from pydantic_ai import Agent, RunContext from utils.llm import chat_model from utils.mcp import filesystem_mcp from utils.video import generate_video # from .novel_agent import novel_agent, NovelAgentDeps from utils.novel import read_novel_content from .scene_agent import scene_agent,...
Python
1
""" ======================== Pie chart visualizations ======================== """ # sphinx_gallery_thumbnail_number = 3 ############################### # Read in tutorial data and show a summary # **************************************** # # This gallery uses the scenario data from the first-steps tutorial. # # If ...
Python
1
fier_consumption()), Power::new::<watt>(0.) ); } #[test] fn when_powered_without_demand_has_no_consumption() { let mut test_bed = TransformerRectifierTestBed::with_powered_transformer_rectifier(); test_bed.command(|a| a.power_demand(Power::new::<watt>(0.))); tes...
Rust
0
d_int_prefix(s); try!(handle_truncate(ctx, s.len() > vs.len())); bytes_to_int_without_context(vs.as_bytes()) } fn bytes_to_f64_without_context(bytes: &[u8]) -> Result<f64> { let f = match std::str::from_utf8(bytes) { Ok(s) => { match s.trim().parse::<f64>() { Ok(f) => f...
Rust
0
c = "0x450 - USB DMA Select"] pub dmasel: DMASEL, _reserved180: [u8; 2924usize], #[doc = "0xfc0 - USB Peripheral Properties"] pub pp: PP, } #[doc = "USB Device Functional Address\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic...
Rust
0
ures_path = f'models/definitivo_{self.timeframe}_{symbol.lower()}/feature_columns.pkl' with open(features_path, 'wb') as f: pickle.dump(feature_columns, f) print(f"💾 Feature columns guardados: {features_path}") # ✅ NUEVO: Guardar configuración del modelo ...
Python
1
TexParameteri(t->type, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); glTexParameteri(t->type, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(t->type, GL_TEXTURE_MAX_ANISOTROPY_EXT, max); }*/ pub fn texture_set_filtering_anisotropic(t: &Texture) { let mut max: f32 = 0.0; unsafe { gl::GetFloatv(GLExt...
Rust
0
""" Set up grid of (w0-wa) values to perform likelihood routine. """ import os import configparser import sys angular_binning_path = os.environ['ANGULAR_BINNING_PATH'] gaussian_cl_likelihood_path = os.environ['GAUSSIAN_CL_LIKELIHOOD_PATH'] pipeline_dir = os.environ['PIPELINE_DIR'] sys.path.insert(1, angular_binning_...
Python
1
Some(event) => event, None => panic!("event signaled but no pending event - this is a bug."), }; // If we have more than one event pending, write the remainder back into the event so it // keeps signalling. if cpt > 1 { self.event.write(cpt - 1)?; ...
Rust
0
] = fields.index(matching_string) # There is a default value for the reference frequency that we also need to save if itemname == "referencefrequency": try: _, default_reference_frequency = matching_string.split("=") default_reference_freq...
Python
1
irst listbox item chosen (returned as a list) func = fig_dict[choice] # get function to call from the dictionary window['-MULTILINE-'].update(inspect.getsource(func)) # show source code to function in multiline try: fig = func() # call func...
Python
1
"TypeError:", ] return any((pattern in result_text for pattern in error_patterns)) def _append_result_line_raw(self, text): end_iter = self.results_buffer.get_end_iter() self.results_buffer.insert(end_iter, text) def _append_error_line_raw(self, text): end_iter ...
Python
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ 演示baseline和agentic方法在数值提取时面对的上下文差异 """ import json def load_problem_data(): """加载课程选择问题的数据""" # 从agentic结果中获取问题数据 with open('eval_results/deepseek_agentic_test.json', 'r', encoding='utf-8') as f: agentic_results = json.load(f) # 找到索引10的问题...
Python
1
well in profound respect I really wanna fuck her again and again caz I am indebted to her asshole you know why let me tell you why well I only did fucked her pussy not asshole that's why One-day your sis we're going to her collage and I and some ma friend were waiting for her caz as much as we were concerned about her...
Python
1
e)), mut meta) => match value.parse() { Ok(value) => Annotated(Some(value), meta), Err(err) => { meta.add_error(Error::invalid(err)); meta.set_original_value(Some(value)); Annotated(None, ...
Rust
0
ord_value(2, d2)?; debug_assert_eq!(instruction.op_count(), 0); Ok(instruction) } /// Creates a `dd`/`.int` asm directive /// /// # Arguments /// /// * `d0`: Dword 0 /// * `d1`: Dword 1 /// * `d2`: Dword 2 #[allow(clippy::unwrap_used)] #[must_use] #[inline] #[rustfmt::skip] pub fn with_declare_dword_...
Rust
0
mut(&mut self) -> &mut Vec<Friend> { &mut self.friends } } impl Settings { fn default() -> Self { Settings { last_run_version: defaults::last_run_version(), api_keys: defaults::api_keys(), check_updates: defaults::check_updates(), short_names: def...
Rust
0
connaissance{Style.RESET_ALL}") print(f" {Fore.CYAN}• Monitor ASN changes for infrastructure tracking{Style.RESET_ALL}") print(f" {Fore.CYAN}• Cross-reference with BGP routing information{Style.RESET_ALL}") print(f" {Fore.CYAN}• Check for related ASNs owned by same organization{Style.RESET_ALL}") ...
Python
1
( &nm, &err.to_string(), ))), }, //Err(err) => Err(From::from(err)), Err(_) => Ok(0), } } fn value_to_u64(nm: &str, val: Result<String, ArgsError>) -> anyhow::Result<u64> { match val { Ok(x) => match x.parse::<u64>() { Ok(d...
Rust
0
unsafe extern "C" fn(&mut dyn IHandlerRegistrar) -> Result<()>, > = library .get("register_handler".as_bytes()) .context("unable to load `register_handler` function from event hook")?; register_fn(self).context("unable to register event handler")?; } ...
Rust
0
LISTING_FEE_NEAR } else { 0 }; let res = user.function_call( self.skyward.contract.sale_create(SaleInput { title: TITLE.to_string(), url: None, permissions_contract_id, out_tokens: tokens ...
Rust
0
TREE as &crate::Emoji), _ => None, }, b'w' => match rest { "e" => Some(&crate::flat::EWE as &crate::Emoji), _ => None, }, b'x' => match rest { "clamation" => Some(&crate::flat::RED_EXCLAMATION_MARK as &crate::Emoji), "clamation_question_mark" => Some(&crate::flat::EXCLAMATION_QU...
Rust
0
self.set("theme_mode", mode) def get_window_settings(self) -> Dict[str, int]: """Get window size settings""" return { "width": self.get("window_width", 1000), "height": self.get("window_height", 800) } def set_window_settings(self, width: int, hei...
Python
1
32", async_trait(?Send))] #[cfg_attr(not(target_arch = "wasm32"), async_trait)] impl Signer for LedgerEthereum { type Error = LedgerError; /// Signs the hash of the provided message after prefixing it async fn sign_message<S: Send + Sync + AsRef<[u8]>>( &self, message: S, ) -> Result<Si...
Rust
0
__copyright__ = "Copyright 2017 Birkbeck, University of London" __author__ = "Martin Paul Eve & Andy Byers" __license__ = "AGPL v3" __maintainer__ = "Birkbeck Centre for Technology and Publishing" from django.contrib import admin from utils import admin_utils from copyediting import models class CopyeditAdmin(admin...
Python
1
nodeRegistrationProto_NamenodeRoleProto { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) } } #[derive(PartialEq,Clone,Default)] pub struct CheckpointSignatureProto { // message fields blockPoolId: ::protobuf::SingularFi...
Rust
0
Ok(isolate) => isolate, Err(_) => return Err(runtime!("`isolate` must be a string.")), }; // 🤔 let code = code.trim_matches('"'); let isolate = isolate.trim_matches('"'); let result = internal::execute_js(code, isolate); Ok(ByondValue::from_string(result).unwrap()) } #[hook("...
Rust
0
_namespace(std::string& s); void stats(); bool get_line(); bool skip_comment(size_t& pos); bool is(const char *s); bool br(size_t pos, const char *s = NULL); bool as(size_t& pos, const char *s); bool ws(size_t& pos); bool eq(size_t& pos); bool ...
Rust
0
_string(indent) for child in self.children] result = result + "".join([s for s in children_strings if s]) return result def property_string(self) -> str: properties = [] for node_property in self.properties: try: if node_property["name"] in _IGNORED_A...
Python
1
message1 = self.test_handler.messages[0] self.assert_(isinstance(message1, messages.TabList)) self.assertEquals(message1.type, 'feed') self.check_info_list(message1.toplevels, [self.feed1, self.feed_folder]) self.check_info_list(message1...
Python
1
age, event:: ResumedEvent, gateway::Ready}, prelude::{TypeMapKey, Context, EventHandler, Client}, }; use tokio::sync::Mutex; use tracing::{error, info}; use tracing_subscriber::{ FmtSubscriber, EnvFilter, }; use commands::{ meta::*, dev::*, config::*, tags::*, }; struct CommandCou...
Rust
0
mmand(Command::DefineFun), (0, 9))], ); assert_input( "define-fun-rec", vec![(TokenKind::Command(Command::DefineFunRec), (0, 13))], ); assert_input( "define-funs-rec", vec![(TokenKind::Command(Command::DefineFunsRec), (0, 14))], ); ...
Rust
0
# Copyright (c) 2010-2022 openpyxl from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( Typed, Sequence, Alias ) from openpyxl.descriptors.excel import ExtensionList from openpyxl.descriptors.nested import ( NestedNoneSet, NestedBool, ) from ._chart import ...
Python
1
import django_filters from django_filters import ChoiceFilter from .models import Property class PropertyFilter(django_filters.FilterSet): district = django_filters.NumberFilter(field_name="district__id", lookup_expr="exact") municipality = django_filters.NumberFilter(field_name="municipality__id", lookup_expr...
Python
1
"""Fix function attribute names (f.func_x -> f.__x__).""" # Author: Collin Winter # Local imports from .. import fixer_base from ..fixer_util import Name class FixFuncattrs(fixer_base.BaseFix): BM_compatible = True PATTERN = """ power< any+ trailer< '.' attr=('func_closure' | 'func_doc' | 'func_globals'...
Python
1
import re from modules.patterns import isIncludePattern_regex, regexify, withoutSurroundingSlashes COMMENT_PREFIX: str = "#" PORT_PREFIX: str = ":" PIPE: str = "|" REGEX_COMMENT: re.Pattern = re.compile(r"\#.*$") def rulesIn(text: str) -> list[str]: return list(filter( lambda s: s != "", map(with...
Python
1
_base_ = [ '../../_base_/models/semfpn_semask_swin.py', '../../_base_/datasets/semask/ade20k_640x640.py', '../../_base_/default_runtime.py', '../../_base_/schedules/schedule_80k.py' ] model = dict( backbone=dict( embed_dim=192, depths=[2, 2, 18, 2], num_heads=[6, 12, 24, 48], ...
Python
1
import numpy as np from scipy.fft import fft, ifft def bp_filter_1D(d, dt, f1, f2, f3, f4): """ BP_Filter: Apply a band-pass filter to a group of traces. input: ---------- d : numpy.ndarray Input data array where each column represents a trace. dt : float Sampling interval in s...
Python
1
rent - entry_price) * quantity else: # SELL estimated_current = entry_price * 0.999 # -0.1% unrealized_pnl = (entry_price - estimated_current) * quantity pnl_pct = (unrealized_pnl / (entry_price * quantity)) * 100 if (entry_price * quantity) > 0 els...
Python
1
ept FileNotFoundError as e: logging.error(f"File not found: {e}") raise except Exception as e: logging.error(f"Transcription error: {e}") raise finally: cleanup_gpu() if __name__ == "__main__": audio_file_path = Path(paths["audio_dir"]) / paths["audio_file"] subs...
Python
1
.append(body_pret) .nest(1) .group() .parens() } Expr::If(c, ift, iff) => { let c_pret = c.pretty(allocator); let ift_pret = ift.pretty(allocator); let iff_pret = iff.pretty(...
Rust
0
) in names { let md5sum = hashes .get(&MessagePath::new(&package, &name).chain_err(|| "Invalid message path")?) .expect("Internal implementation contains mismatch in map keys") .clone(); let msg_type = format!("{}/{}", package, name); p...
Rust
0
import hashlib from typing import List import numpy as np from langchain_core.embeddings import Embeddings from pydantic import BaseModel class FakeEmbeddings(Embeddings, BaseModel): """Fake embedding model.""" size: int """The size of the embedding vector.""" def _get_embedding(self) -> List[float...
Python
1