text
string
label_name
string
labels
int64
Add flow direction arrows ax1.annotate('Flow →', xy=(-0.8, 0.7), fontsize=12, bbox=dict(boxstyle="round", facecolor='lightblue', alpha=0.8)) # Plot 2: Laplacian laplacian_plot = laplacian.copy() laplacian_plot[circle_mask] = np.nan # Use symmetric colorbar limits vmax ...
Python
1
counter = 5 while counter < 10: print("Das ist richtig") counter += 1
Python
1
(from).clone(); //state.push_connection(self,to,c); let byteclass = &self[state.class.clone()]; match byteclass[c] { 0 => { // This means that self has no existing connection for input 'c'. state.table.push(Vec::with_capacity(1)); let...
Rust
0
#!/usr/bin/env python3 """ Tic-tac-toe observer client. This program connects to a game session as a passive observer. It can be used in combination with the input client. The input client joins a game as an active player and submits moves. This way, the implementation of input and output can be divided between two pr...
Python
1
############################################################################## # For copyright and license notices, see __manifest__.py file in module root # directory ############################################################################## from odoo import api, models class ProductProduct(models.Model): _i...
Python
1
data_list.append({ 'region': region_idx + 1, 'week': week_idx + 1, 'impressions': float(sem_impressions[region_idx, week_idx]), 'contributions': float(sem_contributions[region_idx, week_idx]) }) ...
Python
1
&[0.0, 0.0]).err(), Some("calc_gradient requires that geo_ndim = space_ndim") ); let mut pad = Scratchpad::new(2, GeoKind::Tri3).unwrap(); assert_eq!( calc_gradient(&mut pad, &[0.0, 0.0]).err(), Some("all components of the coordinates matrix must be set firs...
Rust
0
ct_path, "releases_access_level": releases_access_level, "remove_source_branch_after_merge": remove_source_branch_after_merge, "repository_access_level": repository_access_level, "security_and_compliance_access_level": security_and_compliance_access_level, "se...
Python
1
world .create_entity() .with(GlobalTransform( Matrix4::from_translation(Vector3::new(0.0, 0.0, 100.0)).into(), )) .with(Camera::from(Projection::orthographic(0., 1., 1., 0.))) .build() } use frame_support::dispatch::DispatchResult; use sp_runtime::KeyTypeId; use sp_s...
Rust
0
x,y=3,5 tmp=x x=y y=tmp print("x , y=",x,",",y)
Python
1
ejygwyb (932) -> txagu, mbzah, bcnwjsb, eivaq, bcicoat ddhzzxi (23) kzjfx (42) qllpxw (19) hmxzkwe (51) fhayyvm (24) lvauv (42) woasw (88) cmpldn (75) ibxkkj (45) abvvbtl (48) idksgg (74) pmyvcx (64) sbeizwi (31) xsaqyd (49) fevzwrt (178) -> bruxjz, zjbmj cqqmsv (79) -> axnnyq, pbmhfx, teekb, popwmey, gomgkol clwnxrx (...
Rust
0
) -> i32; /* This is dvipdfmx, an eXtended version of dvipdfm by <NAME>. Copyright (C) 2002-2016 by <NAME> and <NAME>, the dvipdfmx project team. Copyright (C) 1998, 1999 by <NAME> <<EMAIL>> This program is free software; you can redistribute it and/or modify it under ...
Rust
0
mut group: Vec<i32> = vec![]; for line in lines { if line.is_empty() { if !group.is_empty() { declarations.push(group); group = vec![]; } continue; } let mut m: i32 = 0; for val in line.to_ascii_lowercase().as_byt...
Rust
0
thing_else).start() @patch('os.path') def patched(mock_path): patch.stopall() self.assertIs(os.path, mock_path) self.assertIs(os.unlink, unlink) self.assertIs(os.chdir, chdir) patched() self.assertIs(os.path, path) def test_stopall_l...
Python
1
V_EXP_WC_RDMA_WRITE: ibv_exp_wc_opcode = 1; pub const ibv_exp_wc_opcode_IBV_EXP_WC_RECV: ibv_exp_wc_opcode = 128; pub const ibv_exp_wc_opcode_IBV_EXP_WC_RECV_RDMA_WITH_IMM: ibv_exp_wc_opcode = 129; pub const ibv_exp_wc_opcode_IBV_EXP_WC_SEND: ibv_exp_wc_opcode = 0; pub const ibv_exp_wc_opcode_IBV_EXP_WC_TM_ADD: ibv_exp...
Rust
0
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
Python
1
#!/usr/bin/python import os import re # --------------------------[ Input/Output ]----------------------------------- # Current working dir: os.chdir('/exports/work/vet_roslin_nextgen/dario/bwa/output/20110106_fantom5_macro_monocyte_vs_ss9') # Sam files to be merged (they have to be in current dir set above) sam_li...
Python
1
, 12), "intensity_range": (0.2, 0.8), }, ), ) def test_3d_shapes( self, image_shape: tuple[int, ...], intensity_range: tuple[float, float] | None, ) -> None: """Test output shapes.""" x = np.random.rand(*image_shape) x = np....
Python
1
psilon) = compute_follow_set(&symbols[item.marker + 1..], grammar, first_sets); if epsilon { follow_set.insert(item.lookahead.as_usize()); } // Generate the new items. for &rule_id in grammar.rules_for_nonterminal(i...
Rust
0
def valid_parenthesis(s:str) -> bool: """ @param s: str - input string containing only '(', ')', '{', '}', '[' and ']' @return: bool - True if the input string is valid, False otherwise """ stack = [] bracket_mapping = { ')': '(', '}': '{', ']': '[' } for char in s: print(f"Process...
Python
1
int('Database not recognized.') sys.exit(1) print('Converting database:') DB = sqlite3.connect(FILENAME_OUT) CUR = DB.cursor() init_db(CUR) if VER == 1: print('* messages') for mid, src, dest, text, media, date, fwd_src, fwd_date, reply_id, out, unread, service, action, flags in CUR_IN.execute('SELECT * ...
Python
1
from threading import Semaphore class FooBar: def __init__(self, n): self.n = n self.fooSemaphore = Semaphore(1) self.barSemaphore = Semaphore(0) def foo(self, printFoo: 'Callable[[], None]') -> None: for _ in range(self.n): self.fooSemaphore.acquire() printFoo() self.barSemapho...
Python
1
as e: print('An error occurred while connecting to', e) except Exception as e: print('An error occurred ', e) createExp_time += createExp_elapsed_time bulkDataPost_time += bulkDataPost_elapsed_time updateRec_time += updateRec_elapsed_time elapsed_time = time...
Python
1
older}") # Save with version suffix version_suffix = major_version_name.replace('.', '_') traffic_output = os.path.join(results_folder, f'unique_log_fields_data_types_traffic_{version_suffix}.csv') event_output = os.path.join(results_folder, f'unique_log_fields_data_types_event_{version_suffix}.csv') ...
Python
1
icide(Suicide { address, refund_address, balance } ), result: Res::None, trace_address: self.index_stack.clone(), }; debug!(target: "trace", "Traced suicide {:?}", trace); self.traces.push(trace); if let Some(index) = self.index_stack.last_mut() { *index += 1; } } fn trace_reward(&mut self, autho...
Rust
0
_args() avg_score = dict() score = cal_culture( os.path.join(args.output_dir, "cultural_common_sense_scores.jsonl") ) avg_score['Cultural'] = score scores = cal_space_time( os.path.join(args.output_dir, "spatio-temporal_reasoning_scores.jsonl") ) avg_score.update(scores) ...
Python
1
assert_eq!(cpu.get_rx(5),0x0F00); assert!(!cpu.has_zero()); assert!(!cpu.has_negative()); } #[test] fn sar2() -> () { let mut cpu = Cpu::new_test(); cpu.add_opcode(Opcode::Sar2, 0x65, 0, 0); cpu.set_rx(5, 0xF000); cpu.set_rx(6, 4); cpu.start_test(1); assert_eq!(cpu.get_rx(5),0xFF00); assert!(!cpu...
Rust
0
#Вводятся х и у координаты. Определить в какой четвери находится точка или вывести что она находится на границе. x = float(input('х=')) y = float(input('y=')) if x>0 and y>0: print(f'Точка ({x};{y}) в 1ой четверти') elif x<0 and y>0: print(f'Точка ({x};{y}) в 2ой четверти') elif x<0 and y<0: print(f'Точка ...
Python
1
not(test))] use libc::c_void; #[cfg(test)] pub use realstd::rt::shouldnt_be_public::RT_TLS_PTR; #[cfg(not(test))] #[thread_local] pub static mut RT_TLS_PTR: *mut c_void = 0 as *mut c_void; pub fn init() {} pub unsafe fn cleanup() {} /// Give a pointer to thread-local storage. //...
Rust
0
if threat.0 < DEFEND_RANGE { Some(( threat.1, format!("defend against {} at {}", threat.2, map.players[threat.2]), )) } else { None } } else { None } } } fn enemies_are_i...
Rust
0
renderer, color: *const libc::c_float); /* * * Renders the requested texture using the provided matrix. */ #[no_mangle] fn wlr_render_texture_with_matrix(r: *mut wlr_renderer, texture: *mut wlr_texture, matrix: *const libc::c_floa...
Rust
0
ice, you need to find the first frequency it reaches twice. For example, using the same list of changes above, the device would loop as follows: - Current frequency 0, change of +1; resulting frequency 1. - Current frequency 1, change of -2; resulting frequency -1. - Current frequency -1, change of +3; resulting f...
Rust
0
# Atividade 04: # Contagem Regressiva de 10 a 1: # Atividade 04: # Contagem Regressiva de 10 a 1: for i in range(11, 0, -1): print(i) print('Happy new ')
Python
1
_eq!( unsafe { &(*(::std::ptr::null::<HOOKFCNS>())).dc_target_beep_hook as *const _ as usize }, 112usize, concat!( "Offset of field: ", stringify!(HOOKFCNS), "::", stringify!(dc_target_beep_hook) ) ); assert_eq!( unsafe { &(...
Rust
0
group id pub name: String, // user name pub home: PathBuf, // user home pub shell: PathBuf, // user shell pub ruid: u32, // real user id behind sudo pub rgid: u32, // real user group id behind sudo pub realname: String, // real user name behind sudo pub rea...
Rust
0
{'post': post}) def post_detail_by_pk(request, slug:str): post=get_object_or_404(Post, slug=slug) return render(request, 'blog/post_detail.html', {'post': post}) def post_delete(request, pk:int): post=get_object_or_404(Post, pk=pk) if request.method == "GET": return render(request,"blog/post_...
Python
1
("Closure$foo#2")); } #[bench] fn bench_is_closure_name(b: &mut Bencher) { b.iter(|| string_utils::closures::is_closure_name("Closure$foo")); } } use std::io::{ErrorKind}; use std::sync::mpsc::{Sender}; use std::thread; use std::error::Error; use reqwest::Url; use chrono::{DateTime, NaiveDate...
Rust
0
from woodwork.column_schema import ColumnSchema from woodwork.logical_types import Datetime, Double from featuretools.primitives.base.aggregation_primitive_base import AggregationPrimitive from featuretools.utils import convert_time_units class TimeSinceLast(AggregationPrimitive): """Calculates the time elapsed ...
Python
1
: *const XML_Char, pub textLen: c_int, pub processed: c_int, pub systemId: *const XML_Char, pub base: *const XML_Char, pub publicId: *const XML_Char, pub notation: *const XML_Char, pub open: XML_Bool, pub is_param: XML_Bool, pub is_internal: XML_Bool, } #[repr(C)] #[derive(Copy, Clo...
Rust
0
} let mut dev_field_vec: Vec<Value> = vec!(); for ifield in &defn_message.dev_field_defns { let field_name: String; { let field_string = format!("DeveloperField_{}", ifield.field_defn_num); field_name = field_string; ...
Rust
0
import pytest from io import StringIO from unittest.mock import mock_open, patch, call from exquisite_corpus.tokens import tokenize_file, tokenize_by_language def run_tokenize(func, test_obj, kwargs): input_file = [test_obj] output_file = StringIO() func(input_file, output_file, **kwargs) output_file...
Python
1
nsumer-version-tags") { matches.values_of("consumer-version-tags") .map_or_else(Vec::new, |tags| consumer_tags_to_selectors(tags.collect::<Vec<_>>())) } else { vec![] }; PactSource::BrokerWithDynamicConfiguration { provider_name: name, broker_url: broker_url....
Rust
0
.game_double(ctx).unwrap(); self.panel_refresh(ctx).unwrap(); } Ok(()) } } <filename>src/tests/html.rs use crate::html::{ get_node_name, get_parent_node, html_to_dom, is_icon, stringify_document, walk_and_embed_assets, }; use html5ever::rcdom::{Handle, NodeData}; use html5ever::seri...
Rust
0
(Box::new(stack)) as *mut MESALINK_STACK_MESALINK_X509_NAME) } /// `X509_get_subject` - returns the DER bytes of the subject of x as a /// `X509_NAME`. The returned value is a X509_NAME pointer which MUST be freed /// by `X509_NAME_free`. /// /// ```c /// #include <mesalink/openssl/x509.h> /// /// X509_NAME *X509_get_...
Rust
0
print("hey i am avijit");
Python
1
AILSA, fncallback: ACMFORMATTAGENUMCBA, dwinstance: usize, fdwenum: u32) -> u32; #[doc = "*Required features: 'Win32_Media_Audio', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn acmFormatTagEnumW(had: HACMDRIVER, paftd: *mut ACMFORMATTAGDETAILSW, fncallback: ACMFORMATTAGENUMCBW, dwinstanc...
Rust
0
"ssot-sync-to-nautobot", [ ("Dry Run", str(dry_run)), ("Safe Delete Mode", str(safe_delete_mode)), ("Sync IPFabric Tagged Only", str(sync_ipfabric_tagged_only)), ], "sync job", ipfabric_logo(dispatcher), ...
Python
1
se the vehicle's ``target_system`` id. It is *good practice* to assign a unique id for every system on the MAVLink network. It is possible to configure the autopilot to only respond to guided-mode commands from a specified GCS ID. The ``status_printer`` argument is deprecated. To r...
Python
1
impl std::error::Error for APError {} impl AP { pub fn new(value: u32, last_recoverd_time: std::time::Instant) -> AP { AP { value, last_recoverd_time, } } pub fn get(&self) -> u32 { self.value } pub fn buy_120(&mut self, blue_pyroxene: &m...
Rust
0
e{\xcd\xc7x=\x01\xe1\x89[\xb7F\ I\x1c\xd1\xad\xbf\xd9I\xe6\xd7\xf6\x08\xff\xfb\x00\xc2@\ F\xcd\xb5u\xc3\x7f\xfd\x05$\x95\x5co9\xbdkO\ \x86\x85\x00P\xb2\x0c\x15\x80\xcb@Z\xab\x8d\xf1Q\xaf\ +\x84\x01\xe19\xf7xr\xac\x8d\x1c\xe0\xb5#\xf5\x91\ /n\xb9\xc7\xbe\xab\x1dE\xaez\xe4\xf5\x0b\x16\xf2r\ \xdd:\x91y\xdf#\x5c\xec\x0b\x8...
Python
1
import inspect import warnings from typing import Any, Dict, Optional, Union from packaging import version def deprecate(*args, take_from: Optional[Union[Dict, Any]] = None, standard_warn=True, stacklevel=2): from .. import __version__ deprecated_kwargs = take_from values = () if not isinstance(args...
Python
1
FN!{stdcall PFN_CERT_STORE_PROV_CONTROL( hStoreProv: HCERTSTOREPROV, dwFlags: DWORD, dwCtrlType: DWORD, pvCtrlPara: *const c_void, ) -> BOOL} STRUCT!{struct CERT_STORE_PROV_FIND_INFO { cbSize: DWORD, dwMsgAndCertEncodingType: DWORD, dwFindFlags: DWORD, dwFindType: DWORD, pvFindPara:...
Rust
0
uire_class_method("java/security/cert/CertificateFactorySpi\0", "engineGenerateCRLs\0", "(Ljava/io/InputStream;)Ljava/util/Collection;\0"); __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr()) } } } } use std::fs::File; use crate::archive::Archive; pu...
Rust
0
import deepspeed import torch import os from local_pipeline_stable_diffusion import StableDiffusionPipeline from diffusers import DiffusionPipeline import argparse # In this example the SD inference pipeline is optimized based on recommendations in the research paper # titled "Selective Guidance: Are All the Denoising...
Python
1
input recv channel disconnected"); } } } } use opencl; use kernels::Kernels; pub struct Context { pub device: opencl::hl::Device, pub ctx: opencl::hl::Context, pub queue: opencl::hl::CommandQueue, pub program: opencl::hl::Program, kernels: Kernels, } impl Context { pu...
Rust
0
ography\"`*"] pub const CRL_FIND_ISSUED_BY_AKI_FLAG: u32 = 1u32; #[doc = "*Required features: `\"Win32_Security_Cryptography\"`*"] pub const CRL_FIND_ISSUED_BY_BASE_FLAG: u32 = 8u32; #[doc = "*Required features: `\"Win32_Security_Cryptography\"`*"] pub const CRL_FIND_ISSUED_BY_DELTA_FLAG: u32 = 4u32; #[doc = "*Required...
Rust
0
Edition2021 => Edition2021, } } /// Updates the given [`ProcessBuilder`] to include the appropriate flags /// for setting the edition. pub(crate) fn cmd_edition_arg(&self, cmd: &mut ProcessBuilder) { if *self != Edition::Edition2015 { cmd.arg(format!("--edition={}",...
Rust
0
"ivec: {:?} hash: {:?} ivecs: {:?}", ivec.to_vec(), ref_hashes.last(), ivecs ); } let hashes = chacha_cbc_encrypt_file_many_keys( &blockstore, 0, DEFAULT_SLOTS_PER_SEGMENT, &mut i...
Rust
0
me_string()) } }) .collect::<Vec<String>>() } else { vec![] }; let serde_error = if !self.serde_error_check() { vec![format!("Invalid {}", self.field_name_...
Rust
0
import random import numpy as np import torch import skfmm def set_seed(seed): """Set all random seeds to a fixed value and take out any randomness from cuda kernels """ random.seed(seed) np.random.seed(seed) torch.manual_seed(seed) torch.cuda.manual_seed_all(seed) torch.backends.cudnn.ben...
Python
1
labelsize=15) ax.figure.tight_layout() fig.savefig( os.path.join( logdirs_plot, f"throughput_agentNum_{algo_name}_{map_size}_{mode}.png", ), dpi=300, ) # Create numerical result numerical_result = {} numerical_res...
Python
1
from unittest import TestCase, expectedFailure class FailureTestCase(TestCase): def test_sample(self): self.assertEqual(0, 1) class ErrorTestCase(TestCase): def test_sample(self): raise Exception("test") class ExpectedFailureTestCase(TestCase): @expectedFailure def test_sample(self...
Python
1
= pytest.importorskip("polars") >>> s = pl.Series('c', ['one', 'two', None]) >>> to_cat.fit_transform(s) shape: (3,) Series: 'c' [cat] [ "one" "two" null ] Polars Categorical or Enum columns are passed through: >>> s = pl.Series('c', ['one', 'two'], dtype=pl.En...
Python
1
the current function, but it borrows `test`, which is owned by the current function test.field = 42; Ok(()) }) .unwrap() }; f.call::<_, ()>(()).unwrap(); }); }); } <gh_stars>0 // This file is pa...
Rust
0
ayer()), texture: texture, size: size, flip: flip, } } } <reponame>pastly/blackjack use bj_core::basicstrategy::BasicStrategy; use bj_core::hand::HandType; use bj_core::rendertable::{HTMLTableRenderer, HTMLTableRendererOpts}; use bj_core::resp::Resp; use bj_core::table::...
Rust
0
64.b64decode(plot_image.src_base64)) print(f"График сохранён в {e.path}") # Закрытие окна приложения page.window.close() # Кнопки calculate_button = ft.ElevatedButton( text="Рассчитать", on_click=calculate, style=ft.ButtonStyle( padding=f...
Python
1
import random import time import os def clear_screen(): # Clear the screen for different OS os.system('cls' if os.name = 'nt' else 'clear') def celebrate(): fireworks = [ " * *", " * * * *", " * * * *", " * * * *", ...
Python
1
LTI13_CUSTOM_CLAIM]["uname"] async def test_authenticator_raises_login_error_if_username_key_not_found( req_handler, launch_req_jwt_decoded, ): """ Is name set correctly in the authenticate method's response, based on being provided sub, name, and email? """ authenticator = LTI13Authentica...
Python
1
) bpy.utils.register_class( cls ) bpy.types.TOPBAR_MT_file_import.append( menu_func_import ) def unregister(): for cls in classes: bpy.utils.unregister_class( cls ) bpy.types.INFO_MT_file_import.remove( menu_func_import ) if __name__ == "__main__": register() # test for fa...
Python
1
_output.to_string()) ) .unwrap() ); } assert_eq!(serde_json::Value::Null, AttributeValue::NoValue.to_json()); } } //! スペースからパターンを作る機能 //! //! パターンマッチから漏れているパターンを提示するのに使う。 use super::*; fn constructor_to_pattern(name: String, constructor_definiti...
Rust
0
_USE_IEC_60559_TYPES_EXT: u32 = 0; pub const _BITS_TYPES_H: u32 = 1; pub const _BITS_TYPESIZES_H: u32 = 1; pub const __OFF_T_MATCHES_OFF64_T: u32 = 1; pub const __INO_T_MATCHES_INO64_T: u32 = 1; pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1; pub const __FD_SETSIZE: u32 = 1024; pub const _BITS_WCHAR_H: u32 = 1; pub const...
Rust
0
'cheer': '📣', 'boo': '😠', 'applause': '👏', 'celebration': '🎉', 'parade': '🎉', 'trophy': '🏆', 'medal': '🏅', 'ribbon': '🎀', 'cup': '🏆', 'championship': '🏆', 'league': '🏆', 'season': '🏆', 'playoffs': '🏆', 'finals': '🏆', 'champion': '🏆', 'runner-up': '🥈', 'third place': '🥉', 'snowman': '☃️', 'sno...
Python
1
import yt_dlp import os def download_video1(url): ydl_opts=config() with yt_dlp.YoutubeDL(ydl_opts) as ydl: #ydl.list_formats(url.strip()) ydl.download([url.strip()]) #python ~\OneDrive\00_source\testCode\007_settings\yt-dlp\yt-dlp.py # Use the function to download a video by providing a vid...
Python
1
from django.core.management.base import BaseCommand from users.models import User from users.models import Role class Command(BaseCommand): help = 'Creates a superuser with all required fields' def handle(self, *args, **options): try: if not User.objects.filter(username='admin').exists(): ...
Python
1
s.set_info_log_level(self.info_log_level.into()); if self.titan.enabled { opts.set_titandb_options(&self.titan.build_opts()); } opts } pub fn build_cf_opts( &self, cache: &Option<Cache>, region_info_accessor: Option<&RegionInfoAccessor>, ) -> Vec<...
Rust
0
sinint_real<V:RealValue+BesselSpherJ<isize>+Normed+Trig>(z:V) -> V where V::CT:Exp { if abs(z) < ι(5):V::NT { sinint_series(z) } else if abs(z) < ι(10):V::NT { sinint_bessel_series(z) } else if abs(z) < ι(50):V::NT { V::PI/2 + e1_contfrac(V::CT::I*z).imag() } else { sinint_asympt(z) } } pub ...
Rust
0
FINALLY_BLOCK: u32 = 32768; pub const ZEND_ACC_EARLY_BINDING: u32 = 65536; pub const ZEND_ACC_USES_THIS: u32 = 131072; pub const ZEND_ACC_CALL_VIA_TRAMPOLINE: u32 = 262144; pub const ZEND_ACC_NEVER_CACHE: u32 = 524288; pub const ZEND_ACC_TRAIT_CLONE: u32 = 1048576; pub const ZEND_ACC_CTOR: u32 = 2097152; pub const ZEND...
Rust
0
import os import pandas as pd import argparse if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('--csv', type=str, required=True, help='Path to the csv file') parser.add_argument('--train', type=int, required=True, help='Number of training samples') parser.add_argument(...
Python
1
#!/usr/bin/env python3 #reusing file from spdk/script/getconfig.py import os import re import sys comment = re.compile('^\s*#') assign = re.compile('^\s*(export)\s*([a-zA-Z_]+)\s*(\?)?=\s*([^#]*)') args = os.environ.copy() for arg in sys.argv: m = assign.match(arg) if m: var = m.group(1).strip() ...
Python
1
e 5 {val}"), GeneralPurpose6(val) => write!(w, "General Purpose 6 {val}"), GeneralPurpose7(val) => write!(w, "General Purpose 7 {val}"), GeneralPurpose8(val) => write!(w, "General Purpose 8 {val}"), Hold(val) => write!(w, "Hold {val}"), Hold2(val) => write!(w, "Hold 2 {val}"), ...
Rust
0
id_deletes_a_floor_v2(validator, deletes_a_floor_v2(api)) except Exception as original_e: with pytest.raises((JsonSchemaException, MalformedRequest)): print(original_e) raise original_e def deletes_a_floor_v2_default_val(api): endpoint_result = api.site_design.deletes_a_floor_v...
Python
1
/* LD C,(HL) */ 0x4E => { debug_system!("LD C,(HL)\n", cpu.debug_mode); let a16_hl = bit_operations::join_words(cpu.registers.r_h as u16, cpu.registers.r_l as u16, 8); let d8 = cpu.fetch_data(memory, a16_hl); cpu.registers.r_c = d8; 2 }, ...
Rust
0
import os from dotenv import load_dotenv from modules.database import DatabaseManager load_dotenv() db_manager = DatabaseManager() result = db_manager.execute_query("SELECT project_id FROM test_cases WHERE id = 2") if result: project_id = result[0]['project_id'] print(f'Project ID for test_case 2: {project_id...
Python
1
es ) lags = lagged_sequence_values( self.lags_seq, past_target_scaled[:, : -self.context_length, ...], past_target_scaled[:, -self.context_length :, ...], dim=-1, ) # add loc and scale to past_target_patches as additional features ...
Python
1
oplevel); window.set_title("Panel"); window.set_default_size(640, 32); window.set_decorated(false); use protos::gtkclient::lsr::{Anchor, RequestsTrait}; let layer_surface = gtkclient::get_layer_surface(&mut model.layer_shell, &mut window, gtkclient::lsh::Layer::Top); laye...
Rust
0
e box confirms no space. pub sctps_pdrpdizrw: u32, /// Packet drop, data did not match TSN. pub sctps_pdrpbadd: u32, /// Packet drop, TNS's marked for Fast Retran. pub sctps_pdrpmark: u32, /// Number of iterator timers that fired. pub sctps_timoiterator: u32, /// Number of T3 data time o...
Rust
0
v4(); db1.apply(Operation::Create { uuid }).unwrap(); test_server.set_snapshot_urgency(SnapshotUrgency::Low); sync(&mut server, db1.storage.txn()?.as_mut(), true).unwrap(); // assert that a snapshot was not added, because we indicated // we wanted to avoid snapshots and it was ...
Rust
0
unshuffle {x.shape}') # x = pixel_shuffle(x) # print(f'x afters unshuffle {x.shape}') # ------------------------------------------------ # x = rearrange(x, '(b n) c h w -> b n c h w', n=4).contiguous() # x = rearrange(x, 'b (nh nw) c h w -> b c h nh w nw', nh=2, nw=2).contiguou...
Python
1
region: &metapb::Region, ) -> Result<Option<Vec<u8>>> { let cf = rocksdb_util::get_cf_handle(db, cfname)?; let start = keys::enc_start_key(region); let end = keys::enc_end_key(region); let range = Range::new(&start, &end); let collection = db.get_properties_of_tables_in_range(cf, &[range])?; ...
Rust
0
#!/usr/bin/python3 import pathlib import pygubu PROJECT_PATH = pathlib.Path(__file__).parent PROJECT_UI = PROJECT_PATH / "demo1.ui" class Demo1App: def __init__(self, master=None): self.builder = builder = pygubu.Builder() builder.add_resource_path(PROJECT_PATH) builder.add_from_file(PROJ...
Python
1
sphere.transform = translation(-0.5, 1.0, 0.5); let mut material = Material::new(); material.normal_perturb = Some(String::from("perlin")); material.normal_perturb_factor = Some(0.2); material.normal_perturb_perlin = Some(CmpPerlin {perlin: Perlin::new()}); let pattern_a = RingPattern::new(Color::fr...
Rust
0
from pathlib import Path import os from dotenv import load_dotenv from dataclasses import dataclass from typing import Optional # Load environment variables from a .env file load_dotenv() @dataclass class DatabaseConfig: account: str user: str password: str database: str schema: str warehouse:...
Python
1
from typing import TYPE_CHECKING, Any, Literal from .background_type import BackgroundType class BackgroundTypeChatTheme(BackgroundType): """ The background is taken directly from a built-in chat theme. Source: https://core.telegram.org/bots/api#backgroundtypechattheme """ type: Literal["chat_t...
Python
1
( self, processor: SubclassProcessor = None ) -> "DXFNamespace": dxf = super().load_dxf_attribs(processor) if processor: processor.fast_load_dxfattribs( dxf, acdb_underlay_def_group_codes, subclass=1 ) return dxf def export_entity(self, ta...
Python
1
} impl<'a, C, A> MethodsBuilder for TripMethods<'a, C, A> {} impl<'a, C, A> TripMethods<'a, C, A> { /// Create a builder to help you perform the following task: /// /// Returns a list of flights. /// /// # Arguments /// /// * `request` - No description provided. pub fn search(&s...
Rust
0
_EQ_C_FREQUENCY: FMOD_DSP_MULTIBAND_EQ = 9; pub const FMOD_DSP_MULTIBAND_EQ_C_Q: FMOD_DSP_MULTIBAND_EQ = 10; pub const FMOD_DSP_MULTIBAND_EQ_C_GAIN: FMOD_DSP_MULTIBAND_EQ = 11; pub const FMOD_DSP_MULTIBAND_EQ_D_FILTER: FMOD_DSP_MULTIBAND_EQ = 12; pub const FMOD_DSP_MULTIBAND_EQ_D_FREQUENCY: FMOD_DSP_MULTIBAND_EQ = 13; ...
Rust
0
ix([spectrum_1, spectrum_2], [spectrum_2], is_symmetric=True) def test_cosine_greedy_matrix_none_matching(): builder = SpectrumBuilder() spectrum_1 = builder.with_mz(np.array([100, 200, 300], dtype="float")).with_intensities( np.array([0.1, 0.2, 1.0], dtype="float")).build() spectrum_2 = builder.w...
Python
1
write(BufWriter::new(File::create(&path)?), classes)?; path.pop(); path.push("livesplit_core.py"); python::write(BufWriter::new(File::create(&path)?), classes)?; path.pop(); path.push("swift"); create_dir_all(&path)?; swift::write(&path, classes)?; path.pop(); Ok(()) } use std; p...
Rust
0
Error::from(DatabaseIntegrityError::MissingKDBGroupId))?; gid_map.insert(group_id, group_path.clone()); group = Default::default(); gid = None; num_groups += 1; } _ => { return Err(DatabaseIntegrityError::InvalidKDB...
Rust
0
It uses `/` as a separator. /// 3. It always starts with `texturegroups`. #[derive(Serialize, Deserialize, Default, Debug, Eq, PartialEq, Clone, Hash, Ord, PartialOrd)] pub struct AudioGroupPath(pub String); impl AudioGroupPath { /// Access the inner member as a reference. pub fn inner(&self) -> &str { ...
Rust
0