text
string
label_name
string
labels
int64
A_NEWDST, #[cfg(target_env = "gnu")] Pref = libc::RTA_PREF, #[cfg(target_env = "gnu")] EncapType = libc::RTA_ENCAP_TYPE, #[cfg(target_env = "gnu")] Encap = libc::RTA_ENCAP, #[cfg(target_env = "gnu")] Expires = libc::RTA_EXPIRES, #[cfg(target_env = "gnu")] Pad = libc::RTA_PAD, ...
Rust
0
g are required to // link to libclang-cpp.so instead of individual libraries. let use_libclang = if cfg!(target_os = "macos") { false } else { // target_os = "linux" let mut libclang_path = PathBuf::new(); libclang_path.push(llvm_lib_dir); libclang_path.push("libclang-cpp.so...
Rust
0
.get_name(), access_time.elapsed().unwrap().as_secs_f64(), utils::time_to_timestamp_string(&access_time), creation_time.elapsed().unwrap().as_secs_f64(), utils::time_to_timestamp_string(&creation_time)); } } } } use crate::config; use crate::errors::Error; use crate::jwt::encode; use chrono::Utc...
Rust
0
x="9" cy="13" r="1"/><circle cx="15" cy="13" r="1"/><path d="M18,11.03C17.52,8.18,15.04,6,12.05,6c-3.03,0-6.29,2.51-6.03,6.45c2.47-1.01,4.33-3.21,4.86-5.89 C12.19,9.19,14.88,11,18,11.03z"/><path d="M20.99,12C20.88,6.63,16.68,3,12,3c-4.61,0-8.85,3.53-8.99,9H2v6h3v-5.81c0-3.83,2.95-7.18,6.78-7.29 c3.96-0.12,7.22,3.06,7.2...
Rust
0
memoryOffset: VkDeviceSize, ) -> VkResult; } extern "C" { pub fn vkGetBufferMemoryRequirements( device: VkDevice, buffer: VkBuffer, pMemoryRequirements: *mut VkMemoryRequirements, ); } extern "C" { pub fn vkGetImageMemoryRequirements( device: VkDevice, image: ...
Rust
0
, [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 = [ (master_doc, 'Astrobase', 'Astroba...
Python
1
_, LincolnChar::Unprintable(n), ) => { write!( f, "cannot convert code {:#o} from Lincoln Writer character set to Unicode, because it has no printable representation", n ) } LincolnToUnicode...
Rust
0
import numpy as np def create_blend_mask(patch_w, patch_h, left_margin, right_margin, top_margin, bottom_margin): """ Creates a blending mask for a patch of dimensions (patch_w, patch_h). The mask is calculated so that: - In the horizontal dimension, the weight ramps linearly from 0 at the left edge up t...
Python
1
str: return f"<{self.__class__.__name__} id={self.id} owner={self.owner!r} flags={self.flags!r}>" @property def time_remaining(self) -> timedelta | None: """The amount of time that this license can be used for.""" if self.flags & LicenseFlag.Expired > 0: return if s...
Python
1
.ones([1], device=mean.device, dtype=mean.dtype)], dim=0 ) vec = AllReduce.apply(vec * B) total_batch = vec[-1].detach() momentum = total_batch.clamp(max=1) * self.momentum # no update if total_batch is 0 total_batch = torch.max(total_batch, torch.ones_l...
Python
1
.host = "google.com"; // assert_eq!(s, u); // } #[test] fn host_subcomponent() { let mut u = Url::new(); let s = Url::from("http://192.168.0.1/").unwrap(); u.scheme = Some("http"); u.host = "192.168.0.1"; u.path = Some("/"); assert_eq!(s, u); } ...
Rust
0
AdvancedBruteForceBot() # Ask if user wants to calibrate first print("\nDo you want to run calibration mode first? (y/n): ", end="") if input().lower().startswith('y'): bot.calibrate_detection() return bot.run() except ImportErr...
Python
1
e_path = os.path.join(output_directory, csv_file_name) pdf_text = extract_text_from_pdf(pdf_path) chinese_text = filter_chinese_characters(pdf_text) if not os.path.exists(output_directory): os.makedirs(output_directory) with open(csv_file_path, mode='w', newline='\n', encoding='utf-8-sig') as...
Python
1
import factory from django.contrib.auth import get_user_model from ralph.tests.models import TestManufacturer class UserFactory(factory.Factory): """ User *password* is 'ralph'. """ class Meta: model = get_user_model() username = factory.Sequence(lambda n: "user_{}".format(n)) @fac...
Python
1
}" for x in sum( ( generate_fast( model, tok, lang_prefix_dict[i_lang], n_gen_per_prompt=n_gen // 5, ...
Python
1
_map.append(cb_res_map); } return FieldError(name, Some(serde_json::json!(base_map))); } else { return FieldError(name, Some(cb_res)); } } FieldError(name, Some(cb(&self))) } } impl ErrorExtensions for FieldError { fn exte...
Rust
0
置文件中缺少 {sim_name} 的 SIM 信息: SIM_1_OPERATOR={sim_operator}, SIM_1_NUMBER={sim_number}") # print("请检查配置文件是否正确更新或重新运行 SIM 卡信息读取操作。") return sim_info = { sim_name: { "Operator": sim_operator, "Number": sim_number } } # print(sim_info) # print(f"{sim_na...
Python
1
# El programa elige una palabra secreta (por ejemplo, "programar"). # El usuario tiene 5 intentos para adivinar la palabra. # En cada intento, el programa compara la palabra introducida por el usuario con la palabra secreta. # Si son iguales, muestra un mensaje de felicitación y termina. # Si no son iguales, indica cuá...
Python
1
#!/usr/bin/env python3 """ API密钥设置脚本 帮助用户配置必要的API密钥 """ import os import sys def setup_serpapi_key(): """设置SerpAPI密钥""" print("🔑 设置SerpAPI密钥") print("-" * 30) print("SerpAPI用于搜索AI Agent活动") print("获取免费API密钥: https://serpapi.com/") print("免费账户每月提供100次搜索") current_key = os.getenv("SERP...
Python
1
ntactState::pk).expand_width(); let del_btn = Button::new("Delete").on_click(ContactsController::click_remove_contact); Flex::row() .with_flex_child(alias, 1.0) .with_flex_child(pk, 1.0) .with_child(del_btn) } use packed_struct::prelude::*; #[test] #[cfg(test)] fn test_packed_compact_b...
Rust
0
k_assign( v::Expr::new_ref(name), v::Expr::new_ulit_dec(*width as u32, &value), )); } }); module.add_process(initial); // cell instances comp.cells .iter() .filter_map(|cell| cell_instance(&cell.borrow())) .for_each(|instance| ...
Rust
0
l, supports_detection_of_input_fx_in_set_fx_change: bool, } impl ControlSurfaceAdapter { pub fn new( delegate: Box<dyn ControlSurface>, reaper_version: &ReaperVersion, ) -> ControlSurfaceAdapter { let reaper_version_5_95: ReaperVersion = ReaperVersion::new("5.95"); ControlSu...
Rust
0
Styled<Rectangle, PrimitiveStyle<Rgb565>> = egrectangle!(top_left = Point::new(10, 20), size = Size::new(20, 20),); let _r: Styled<Rectangle, PrimitiveStyle<Rgb565>> = egrectangle!(top_left = (10, 20), size = (20, 20),); let _r: Styled<Rectangle, PrimitiveStyle<Rgb565>> = egrect...
Rust
0
)) , Effect::ReturnPoint(lbl, body, new_offset) => EFPEffect::ReturnPoint(lbl, exp(body, frame_offset + new_offset), new_offset) , Effect::If(test, conseq, alt) => EFPEffect::If( pred(test, frame_offset) , mk_box!(effect(*conseq, frame_offset)) ...
Rust
0
=> { // Return the value from the script evaluation Ok(val) } Err(err) => { // Load the script into Redis if the script hash wasn't there already if err.kind() == ErrorKind::NoScriptError { load_cmd.query_async(...
Rust
0
30 0123723 off //! ``` //! //! You can run start processing those commands with //! `$ cat fritz-commands.txt | fritzctrl schedule` //! //! The program will wait until the next command should run and then toggle the device state. Once all commands are done the app will exit. //! //! ## Why??? //! //! Useful for schedul...
Rust
0
malized = empty_metrics() if isinstance(metrics, dict): merge_usage_metrics(normalized, metrics) service_bucket[channel] = normalized history_usage[service] = service_bucket except (json.JSOND...
Python
1
-code pub fn part_1(input: &Vec<String>) -> usize { // Get the number of bits, remove empty strings at beginning and end let bitcount = input[0].split("").collect::<Vec<&str>>().len() - 2; let mut accumulator = vec![0; bitcount]; for number in input { for (i, bit) in number.split("").enumerate() { ma...
Rust
0
. #[inline] pub fn iter(&self) -> RowIterator<'_> { RowIterator::new(self) } #[braneg(test)] pub fn decode( buf: &mut EinsteinDB_util::codec::BytesSlice<'_>, field_types: &[FieldType], ) -> Result<Chunk> { let mut chunk = Chunk { columns: Vec::with_ca...
Rust
0
enderingContext2d as Context2d, HtmlCanvasElement, Window}; use yew::NodeRef; const SCALE: f64 = 2.0; const RETAIN: f64 = 6_000.0; const LINE_WIDTH: f64 = 1.0; /// Pixels per second const PPS: f64 = 50.0; pub struct Point { pub value: f64, pub timestamp: f64, } pub struct LiveChart { last_timestamp: f...
Rust
0
rate::Reg<u32, _SLP_REJECT_CAUSE>; #[allow(missing_docs)] #[doc(hidden)] pub struct _SLP_REJECT_CAUSE; #[doc = "`read()` method returns [slp_reject_cause::R](slp_reject_cause::R) reader structure"] impl crate::Readable for SLP_REJECT_CAUSE {} #[doc = "RTC_CNTL_SLP_REJECT_CAUSE"] pub mod slp_reject_cause; #[doc = "RTC_C...
Rust
0
nOutChannels # Final batch norm self.features.add_module('last_norm%d' % (i + 1), nn.BatchNorm2d(num_features)) # Linear layer self.fc = nn.Linear(6156, 1024) self.dist_reg = nn.Linear(1024, self.cfg.model.num_lights) self.rgb_ratio_reg = nn.Linear(1024, 3) ...
Python
1
# tests/test_settings.py import pytest from fastapi import status def test_list_models(client, user_token): """Test listing available LM Studio models.""" response = client.get("/api/settings/models", headers=user_token) assert response.status_code == status.HTTP_200_OK models = response.json() ass...
Python
1
b`. #[allow(clippy::missing_const_for_fn)] pub fn thumb(mut self, thumb: Thumb) -> Self { self.thumb = Some(thumb); self } } impl Serialize for VideoNote { fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer, { let mut map = seria...
Rust
0
import cv2 import numpy as np import tensorflow as tf from tensorflow import keras def get_landmark_model(saved_model="models/pose_model"): model = keras.models.load_model(saved_model) return model def get_square_box(box): left_x = box[0] top_y = box[1] right_x = box[2] bottom_y = box[3] ...
Python
1
''' This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de). PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any late...
Python
1
ps!(i64x2[i64; 2] | shr_u[i64x2_uhr_u_test]: ([0, -1], 1) => [0, i64::max_value()]); #[wasm_bindgen_test] fn v128_bitwise_logical_ops() { unsafe { let a: [u32; 4] = [u32::max_value(), 0, u32::max_value(), 0]; let b: [u32; 4] = [u32::max_value(); 4]; le...
Rust
0
\x1bx\ \xff\xebsb\xde\xe1}\x18\xce\x8f\xc2|S>\x81h\ \xf3\xbd!\xdap:s\xb5\xaf\x98\xce\xcf\x0c\xe7\x8dU\ \xb7y\x7f\x12\xae]\xf4\xc6\xdc\xe7\xe0p\xf3.u\xf3\ b~\x8ae*\xdaw\x16QJpp\x89W@T\ tk\x1a\x11l2{i\x1bm=\x98_.P\x5c\ \xa0|0oLj\xcd8@\x11M\xec\x02\x08\x98\xcd\ \xdaj\xc5\x00.\xd9<Y;\xb3F\xf7&#\xe2\xbd\ \xdc\xef\xd6\x1e\x9...
Python
1
um", path=Path("anomaly/visa/visa_pipe_fryum_medium"), group="medium", ), ] BENCHMARK_CRITERIA = [ Criterion(name="training:epoch", summary="max", compare="<", margin=0.1), Criterion(name="training:e2e_time", summary="max", compare="<", margin=0.1), Criterion(name="training:gpu_mem", su...
Python
1
@microtesla: prefix!(micro); "µT", "microtesla", "microteslas"; @nanotesla: prefix!(nano); "nT", "nanotesla", "nanoteslas"; @picotesla: prefix!(pico); "pT", "picotesla", "picoteslas"; @femtotesla: prefix!(femto); "fT", "femtotesla", "femtoteslas"; @attotesla: prefix!(atto); "aT",...
Rust
0
(inline)] pub use crate::grouped::people_and_body::hand_fingers_open::HAND_WITH_FINGERS_SPLAYED; // RAISED_BACK_OF_HAND 🤚 #[doc(inline)] pub use crate::grouped::people_and_body::hand_fingers_open::RAISED_BACK_OF_HAND; // RAISED_HAND ✋ #[doc(inline)] pub use crate::grouped::people_and_body::hand_fin...
Rust
0
version(ctx: *mut SSL_CTX) -> c_int { SSL_CTX_ctrl(ctx, SSL_CTRL_GET_MIN_PROTO_VERSION, 0, ptr::null_mut()) as c_int } pub unsafe fn SSL_CTX_get_max_proto_version(ctx: *mut SSL_CTX) -> c_int { SSL_CTX_ctrl(ctx, SSL_CTRL_GET_MAX_PROTO_VERSION, 0, ptr::null_mut()) as c_int ...
Rust
0
ments used to construct each field object. :param converter: A converter to generate the fields based on the model properties. If not set, ``ModelConverter`` is used. """ # Extract the fields from the model. field_dict = model_fields(model, only, exclude, field_args, converter) ...
Python
1
as("ones") @overload def zeros( n: int | Expr, dtype: PolarsDataType = ..., *, eager: Literal[False] = ..., ) -> Expr: ... @overload def zeros( n: int | Expr, dtype: PolarsDataType = ..., *, eager: Literal[True], ) -> Series: ... @overload def zeros( n: int | Expr, ...
Python
1
lass(concat!(stringify!($name), '\0')) { Some(cls) => cls, None => panic!("Class with name {} could not be found", stringify!($name)), } }) } #[doc(hidden)] #[macro_export] macro_rules! sel_impl { // Declare a function to hide unsafety, otherwise we can trigger the // unused...
Rust
0
ytes = fs::read(format!("{}/8.txt", DATA_ROOT)).unwrap(); let hex_strs = String::from_utf8(hex_bytes).unwrap(); let hex_str_vec: Vec<&str> = hex_strs.split('\n').collect(); for hs in hex_str_vec { let mut map = HashMap::<[u8; 16], u64>::new(); let ct = hex::decode(hs).unwrap(); let ...
Rust
0
"lineno": span.begin.lineno, "colno": span.begin.colno, }, "end": { "lineno": span.end.lineno, "colno": span.end.colno, }, }, "execution_count": output....
Python
1
import os import re import pytest import sh from binaryornot.check import is_binary PATTERN = r"{{(\s?cookiecutter)[.](.*?)}}" RE_OBJ = re.compile(PATTERN) @pytest.fixture def context(): return { "project_name": "my_click_project", "package_name": "click_project", "cli_name": "click_proj...
Python
1
'de': 'Pahlavi', 'el': 'Μπουκ Παχλαβί', 'el-polyton': 'Μπουκ Παχλαβί', 'en': 'Book Pahlavi', 'en-Dsrt': '𐐒𐐳𐐿 𐐑𐐪𐑊𐐲𐑂𐐨', 'et': 'pahlavi raamatukiri', 'fa': 'پهلوی کتابی', 'fi': 'kirjapahlavilainen', 'fr': 'pehlevi des livres', 'fy': 'Boek Pahlavi', 'gsw': 'Pahlavi', 'gu': 'બુક પહલવી', 'hi': 'बुक पाहलवी', 'hi-Lat...
Python
1
vec![0x01, 0x02, 0x03] }; assert!(session_channel .receive_user_data(FlowControlledData { user_data: user_data.clone(), credits: None }) .is_ok()); // Data should be relayed to the client. match exec.run_until_stalled(&mut data_received_by_client) { Poll::Re...
Rust
0
d) db.commit() return {"success": True, "message": "읽음 처리 완료"} except HTTPException: raise except Exception as e: print(f"Error in mark_system_announcement_as_read: {str(e)}") raise HTTPException(status_code=500, detail=f"Internal server error: {str(e)}"...
Python
1
# Problem: Search a 2D Matrix - https://leetcode.com/problems/search-a-2d-matrix/ class Solution: def searchMatrix(self, matrix: List[List[int]], target: int) -> bool: col_1 = [] for i in matrix: col_1.append(i[0]) a = bisect_left(col_1,target) if a < len(col_1) and col_...
Python
1
the field is `PUSHPULL`"] #[inline(always)] pub fn is_pushpull(&self) -> bool { *self == GPIO28OUTCFG_A::PUSHPULL } #[doc = "Checks if the value of the field is `OD`"] #[inline(always)] pub fn is_od(&self) -> bool { *self == GPIO28OUTCFG_A::OD } #[doc = "Checks if the va...
Rust
0
cortex_m; extern crate cortex_m_rt; extern crate panic_halt; extern crate stm32f4xx_hal as mcu; extern crate embedded_hal as hal; use cortex_m_rt::entry; use defmt_rtt as _; use mcu::prelude::*; use mcu::stm32; use mcu::gpio; use mcu::gpio::gpiod::{PD13}; use mcu::delay::Delay; use cortex_m::peripheral::Peripheral...
Rust
0
= Screen::default()?; screen.clear()?; screen.write(&[special_char::ALPHA])?; screen.write(&[special_char::BETA])?; screen.write(&[special_char::EPSILON])?; screen.write(&[special_char::MU])?; screen.write(&[special_char::SIGMA])?; screen.write(&[special_char::RO])?; screen.write(&[spe...
Rust
0
sy||_d|_g|_g|_g|_d|_g|_d|_d|_ d|_ d|_ d|_ d|_ dS(Nii(RRRt align_stackt font_stackt margin_stackRt style_stacktnospacet softspacetpara_endtparskipt hard_breakt have_label(...
Python
1
gencode = { 'ATA':'I', 'ATC':'I', 'ATT':'I', 'ATG':'M', 'ACA':'T', 'ACC':'T', 'ACG':'T', 'ACT':'T', 'AAC':'N', 'AAT':'N', 'AAA':'K', 'AAG':'K', 'AGC':'S', 'AGT':'S', 'AGA':'R', 'AGG':'R', 'CTA':'L', 'CTC':'L', 'CTG':'L', 'CTT':'L', 'CCA':'P', 'CCC':'P', 'CCG':'P', 'CCT':'P', 'CAC':'H', 'CAT'...
Python
1
# Copyright (c) 2021 Emanuele Bellocchia # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish,...
Python
1
because the output generation is happening in the subprocess, we // also don't have any way to know when (or if!) the subprocess will // decide to send its output, so sleeping is the best we can do. async_std::task::sleep(std::time::Duration::from_secs(1)).await; let mut buf = [0u8; 10...
Rust
0
, upper_left: Complex<f64>, pixels: &mut [i16], max_iterations: i32, dw: f64, dh: f64) { let bands: Vec<(usize, &mut [i16])> = pixels.chunks_mut(width).enumerate().collect(); bands.into_par_iter().for_each(|(i, band)| { let a: f64 = upper_left.im - dh * i as f64; for col in 0..width { ...
Rust
0
_stack_graph_get_or_create_nodes(graph, nodes.len(), nodes.as_ptr(), handles.as_mut_ptr()); assert!(handles[0] == 0); sg_stack_graph_free(graph); } #[test] fn push_symbol_cannot_have_scope() { let graph = sg_stack_graph_new(); let file = add_file(graph, "test.py"); let symbol = add_symbol(graph, "a...
Rust
0
""" ingestion/nfo_instruments.py Fetch Zerodha instruments for NFO (FUT/OPT), persist to Postgres + CSV. Tables auto-created: instruments_nfo(instrument_token, tradingsymbol, name, segment, exchange, instrument_type, strike, expiry, lot_size, tick_size) ENV: POSTGRES_*, KITE_API_KEY, ZERODHA_TOKEN...
Python
1
_follows.contains_key(&follow).not(); requested_follows .entry(follow) .or_insert_with(HashSet::new) .insert(addr); } requires_restart = requires_restart || (twitter_stream.i...
Rust
0
import inspect import re from pathlib import Path from telethon import events from VIP_INNOCENT import telethn def register(**args): """Registers a new message.""" pattern = args.get("pattern", None) r_pattern = r"^[/!.]" if pattern is not None and not pattern.startswith("(?i)"): args["patte...
Python
1
length, slice_offset, hidden_size, add_inputs=True, ) else: # The current _bgmv_expand_slice_kernel does not require the # libentry decoration. The purpose of adding this patch is to test # the correctness of libentr...
Python
1
# import necessary packages from keras.models import Sequential from keras.layers import BatchNormalization, Input from keras.layers import SeparableConv2D from keras.layers import MaxPooling2D from keras.layers import Activation from keras.layers import Flatten from keras.layers import Dropout from keras.layers import...
Python
1
v)), false); assert_eq2!(nd2di(3.0, 4.0, D::Def).strict_precedes(DI::NAI), false); assert_eq2!(DI::NAI.strict_precedes(DI::EMPTY), false); assert_eq2!(DI::NAI.strict_precedes(DI::NAI), false); assert!(DI::EMPTY.strict_precedes(nd2di(3.0, 4.0, D::Trv))); assert!(nd2di(3.0, 4.0, D::Def).strict_precede...
Rust
0
import numpy as np from .utils_em import * from .hhem import hybrid_em_matrices from .pdvmatrix_libs import diag_matrix, wall_matrix, pdv2_operation_matrix from .pdvmatrix_pml import pml_operation_matrices # parameters for Engquist-Majda one-way wave equation sq2 = np.sqrt(2) corner_case = 0 const_pdv1 = 1/2 const_...
Python
1
import requests import allure from endpoints.endpoint import Endpoint class GettingMemes(Endpoint): @allure.step('Вызов get запроса со всеми объектами') def get_all_memes(self, authorize=None): if authorize is None: self.response = requests.get(self.url) else: self.res...
Python
1
meKey { Constant(Handle<crate::Constant>), GlobalVariable(Handle<crate::GlobalVariable>), Type(Handle<crate::Type>), StructMember(Handle<crate::Type>, u32), Function(Handle<crate::Function>), FunctionArgument(Handle<crate::Function>, u32), FunctionLocal(Handle<crate::Function>, Handle<crate:...
Rust
0
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing import Optional from typing_extensions import Literal, TypedDict from ..shared_params.metadata import Metadata __all__ = ["CompletionListParams"] class CompletionListParams(TypedDic...
Python
1
_app().get_matches(); let config = matches.value_of("config").unwrap_or("~/.taskrc"); let report = matches.value_of("report").unwrap_or("next"); let r = task::block_on(tui_main(config, report)); if let Err(err) = r { eprintln!("\x1b[0;31m[taskwarrior-tui error]\x1b[0m: {}\n\nIf you need additio...
Rust
0
let mut inner = vec![]; while let Some(s) = seq.next_element::<&str>()? { inner.push( T::from_str(s) .map_err(|_| de::Error::custom(ScopeFromStrError::Unknown(s.to_owned())))?, ); } Ok(inner.into()) } } // impl<T> From<&ScopeParame...
Rust
0
80], [210, 60, 60], [250, 170, 30], [250, 170, 30], [250, 170, 30], [250, 170, 30], [250, 170, 30], [250, 170, 30], [192, 192, 192], [192, 192, 192], [192, 192, 192], [220, 220, 0], [220, 220, 0], [0, 0, 196], ...
Python
1
import streamlit as st import csv import ai import os from tkinter import * import tkinter.filedialog import tkinter as tk import pandas as pd import shutil csv_file_path = os.path.dirname(os.getcwd()) + "\\" + "images/processedimages/data.csv" with st.sidebar: st.write('Choose a folder:') browse_button = st....
Python
1
) .unwrap(); let config = Config::new(&[ OsString::from("duckdns-ip-updater"), OsString::from("--config"), OsString::from(config_file_path), ]) .unwrap(); assert_eq!(config.get_domains(), &["my_domain1", "my_domain2"]); ...
Rust
0
#!/usr/bin/python3 from os import mkdir, getenv, system, get_terminal_size from subprocess import check_output from os.path import isdir, isfile from sys import argv, exit from json import loads def download_image(id: int): ''' download_image(id) -> downloads the image of the comic corresponding to the id ente...
Python
1
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.http import HttpResponseForbidden from .forms import BankForm, BranchForm from .models import Bank, Branch def home(request): return render(request, 'bank/home.html') def add_ba...
Python
1
timizer.max_grad_norm) optimizer.step() scheduler.step() optimizer.zero_grad() loss_meter.update(loss.item()) # tracks loss in each batch, no accumulation if accelerator.sync_gradients: progress_bar.set_descripti...
Python
1
name, snap_name): self._request("/create/snapshots", snap_name, volumes=volume_name) def delete_snapshot(self, snap_name): self._request("/delete/snapshot", ["cleanup", snap_name]) def vdisk_exists(self, vdisk): try: self._request("/show/vdisks", vdisk) return T...
Python
1
"""SCons.Tool.Subversion.py Tool-specific initialization for Subversion. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons...
Python
1
key: Option<&PublicKey>, ) -> Result<Npk<BufReader<fs::File>>, Error> { fs::File::open(npk) .map_err(|error| Error::Io { context: format!("Open file {}", npk.display()), error, }) .map(BufReader::new) .and_then(|r| Npk::from_...
Rust
0
checked_mul_u8, u8, 2, -1); gen_checked_mul_integer_tests!(test_checked_mul_i8, i8, 0, 123); gen_checked_mul_integer_tests!(test_checked_mul_u16, u16, 4, 11); gen_checked_mul_integer_tests!(test_checked_mul_i16, i16, 4, 1234567); gen_checked_mul_integer_tests!(test_checked_mul_u32, u32, 1, 0); gen_c...
Rust
0
ok()); assert!(CiRunner { github_token: "<PASSWORD>".to_string(), git_repo: "test/test".to_string(), git_sha: "662623e66b20784bb7abf05feab4c30f309f679d".to_string(), git_ref: "refs/heads/test".to_string(), config: Config { runner: vec![], repos: None,...
Rust
0
# SPDX-License-Identifier: Apache-2.0 import onnx as onnx_proto from ....common._registration import register_converter def convert_convolution(scope, operator, container): from coremltools.proto.NeuralNetwork_pb2 import SamePadding params = operator.raw_operator.convolution op_type = "ConvTranspose" if...
Python
1
import datetime rows = [ [ 1, "XYZ Corporation", 15, "John Doe", "Jane Smith", datetime.datetime(2022, 11, 3, 14, 20, 51, 563000), datetime.datetime(2022, 11, 3, 14, 20, 51, 563000), ], [ 2, "ABC Industries", 28, "Alice...
Python
1
#!/usr/bin/env python3 """ Debug Logger สำหรับ Instagram Brute Force แสดงรายละเอียดของแต่ละ attempt ว่าเกิดอะไรขึ้น """ from bruteforce_ig_clean import AdvancedInstagramBruteForcer import sys sys.path.append('/workspaces/sugarglitch-realops/scripts') class DebugInstagramBruteForcer(AdvancedInstagramBruteForcer): ...
Python
1
aw(&mut context, DrawMode::Triangles, 3, &mut trans, Attribute::Array(triangle.as_attrib_array())); println!("{:?}", ::std::time::Instant::now()-start); // ::std::thread::sleep(::std::time::Duration::from_millis(300)); } } //! Match Parameters //! //! Contains the definition for the `MatchPara...
Rust
0
000_000_000 / duration_to_ns(last_send - first_send), dropped, never_sent, percentile(50.0), percentile(90.0), percentile(99.0), percentile(99.9), percentile(99.99), start_unix.duration_since(UNIX_EPOCH).unwrap().as_secs() ); if let OutputMode::Tr...
Rust
0
(bin) => { path.push(bin); if cfg.target_arch == "wasm32" { path.set_extension("wasm"); } else if cfg .target_family .as_ref() .map(|f| f == "windows") .unwrap_or(false) ...
Rust
0
e0b4e9835df5f91adab64cbd5762c3353dfacf715a45172b504d0b92d")), // AccountId::from(hex_literal::hex!("8e44264e770d9d51baf6839f143aeea7f1584898346761890df00968806ad526")), // AccountId::from(hex_literal::hex!("<KEY>")), // AccountId::from(hex_literal::hex!("<KEY>")), // AccountId::from(hex_literal::hex!("<KEY>...
Rust
0
import sys from PyQt6.QtCore import Qt from PyQt6.QtWidgets import ( QApplication, QCheckBox, QComboBox, QDateEdit, QDateTimeEdit, QDial, QDoubleSpinBox, QFontComboBox, QLabel, QLCDNumber, QLineEdit, QMainWindow, QProgressBar, QPushButton, QRadioButton, Q...
Python
1
")] FabricEServiceTypeTemplateNotFound, #[serde(rename = "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND")] FabricEConfigurationSectionNotFound, #[serde(rename = "FABRIC_E_PARTITION_NOT_FOUND")] FabricEPartitionNotFound, #[serde(rename = "FABRIC_E_REPLICA_DOES_NOT_EXIST")] FabricEReplicaDoesNotExi...
Rust
0
if componentID < 0 as libc::c_int || componentID >= nc { crate::stdlib::snprintf( errStr.as_mut_ptr(), crate::jpeglib_h::JMSG_LENGTH_MAX as libc::c_ulong, b"%s\x00" as *const u8 as *const libc::c_char, b"tjPlaneWidth(): Invalid argument...
Rust
0
Self::Constant(f) => AllocatedNonNativeFieldVar::new_constant(cs.clone(), f)?, Self::Var(v) => v.clone(), }; let false_value = match false_value { Self::Constant(f) => AllocatedNonNativeFieldVar::new_constant(cs, f)?, ...
Rust
0
not None: for i in range(raw_hand_bboxes.shape[0]): bbox = raw_hand_bboxes[i] x0, y0, x1, y1 = bbox raw_hand_bboxes[i] = np.array([x0, y0, x1-x0, y1-y0]) # convert hand_bbox_list from (x0, y0, x1, y1) to (x0, y0, w, h) for hand_bbox in...
Python
1
*source_byte; } for (result_byte, source_byte) in (&mut signature[32..64]).iter_mut().zip(public_key.iter()) { *result_byte = *source_byte; } { let mut hasher = Sha512::new(); hasher.input(signature.as_ref()); hasher.input(message); let mut hram: [u8; 64] = [0; ...
Rust
0
State::Prompt } } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] pub struct UnaryPermission<T: Eq + Hash> { pub global_state: PermissionState, pub granted_list: HashSet<T>, pub denied_list: HashSet<T>, } #[derive(Clone, Debug, Default, PartialEq)] pub struct Permissions { pub read: UnaryPermission...
Rust
0
}) # Add some missing values df.loc[np.random.choice(df.index, 50), 'revenue'] = np.nan df.loc[np.random.choice(df.index, 30), 'quantity'] = np.nan # Add some outliers outlier_idx = np.random.choice(df.index, 20) df....
Python
1
pub tiles: HashMap<Position, Tile>, size: Size, } impl Maze { /// Returns a ``Maze`` with the given width and height /// /// # Example /// ``` /// use maze_tiles_rust::maze::Maze; /// /// let maze = Maze::new(20, 10); /// assert!(maze.tiles.capacity() >= 200); /// ``` pub fn...
Rust
0