text
string
label_name
string
labels
int64
from_glib(ffi::gst_discoverer_info_get_seekable(self.to_glib_none().0)) } } fn get_stream_info(&self) -> Option<DiscovererStreamInfo> { unsafe { from_glib_full(ffi::gst_discoverer_info_get_stream_info(self.to_glib_none().0)) } } fn get_stream_list(&self)...
Rust
0
; //reduced } /// Hash `idA` and `idB` identities. pub(crate) fn hash_ab( password_vec: &[u8], id_a: &[u8], id_b: &[u8], first_msg: &[u8], second_msg: &[u8], key_bytes: &[u8], ) -> Vec<u8> { assert_eq!(first_msg.len(), 32); assert_eq!(second_msg.len(), 32); // the transcript is ...
Rust
0
"""Constants for the Verisure integration.""" from datetime import timedelta import logging from homeassistant.const import ( STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED, STATE_ALARM_PENDING, ) DOMAIN = "verisure" LOGGER = logging.getLogger(__package__) CONF_GIID = "giid" CO...
Python
1
\ ORDER BY `?a` ASC"); assert_eq!(args, vec![]); // ORDER BY duplicated in outer causetq if there is a LIMIT. let causetq = r#"[:find (max ?x) :with ?e :where [?e ?a ?t] [?t :foo/bar ?x] ...
Rust
0
>>, pub main_el_vdom: RefCell<Option<El<Ms>>>, pub popstate_closure: StoredPopstate, pub hashchange_closure: StoredPopstate, pub routes: RefCell<Option<RoutesFn<Ms>>>, pub window_listeners: RefCell<Vec<Listener<Ms>>>, pub msg_listeners: RefCell<MsgListeners<Ms>>, pub scheduled_render_handle:...
Rust
0
_http() { let config = Config::default(); let (logger, _async_log_guard) = new_replica_logger_from_config(&config.logger); let canister_http = setup_grpc_server_with_https_client(logger.clone()); let channel = setup_loop_channel_unix(canister_http).await; let mut client = HttpAdapterClient::new(cha...
Rust
0
mut(lru.node).as_mut().unwrap().chunks[lru.chunk] .as_mut() .unwrap() .surface = None; } let node_is_odd = sim.graph.length(node) & 1 != 0; ...
Rust
0
expected_output = { "TenGigabitEthernet1/0/2":{ "port_channel":{ "port_channel_member": False }, "enabled": True, "is_deleted": False, "line_protocol":"up", "oper_status":"up", "connected": True, "suspended": False, "err_disabled": False, "type":"T...
Python
1
# coding=UTF-8 # ex:ts=4:sw=4:et=on # Copyright (c) 2013, Mathijs Dumon # All rights reserved. # Complete license can be found in the LICENSE file. from contextlib import contextmanager, ExitStack class EventContextManager(object): """ Event context manager class, to be used as follows: ...
Python
1
from fastapi import status from .base import ErrorCodeBase class ErrorCode(ErrorCodeBase): WRONG_CREDENTIALS = "Wrong credentials", status.HTTP_401_UNAUTHORIZED INVALID_AUTH_SCHEME = "Invalid authentication scheme.", status.HTTP_401_UNAUTHORIZED INVALID_TOKEN = "Invalid token or expired token.", status.H...
Python
1
o Super-Resolution Toolbox', # long_description=readme(), long_description_content_type='text/markdown', author='Xintao Wang', author_email='xintao.wang@outlook.com', keywords='computer vision, restoration, super resolution', url='https://github.com/xinntao/BasicSR', ...
Python
1
#!/usr/bin/env python3 # -*-coding:utf-8 -*- """ @File : indexing.py @Date : 2024-06-07 @Author : linkesheng.lks @Version : 1.0.0 @License : Copyright(C) 1999-2024, All rights Reserved, Designed By Alibaba Group Inc. @Desc : Scheme definition of indexing """ from typing import Optional, Union fro...
Python
1
aw_angle: u16, pub angle: Angle, } impl Ma702State { pub fn new() -> Ma702State { Ma702State { raw_angle: 0, angle: Angle::Radians(0.), } } } pub struct Ma702<S> { // TODO(blakely): Make generic via a trait or enum. spi: device::SPI1, tim3: device::TIM3,...
Rust
0
calculator.lamports_per_signature, 12345); } #[test] fn test_is_delta_with_no_committables() { let (genesis_config, mint_keypair) = create_genesis_config(8000); let bank = Bank::new_for_tests(&genesis_config); bank.is_delta.store(false, Relaxed); let keypair1 = Keypair::new...
Rust
0
&str) -> Option<&FunctionDefinition> { self.0.get(name) } /// Get a collection of all included functions pub fn all(&self) -> Vec<&FunctionDefinition> { self.0.values().collect() } /// Call a function /// /// # Arguments /// * `name` - Function name /...
Rust
0
+ dz * dz; let mag = TIME_STEP / (d.sqrt() * d); let mass_j = body_j.mass * mag; body_i.vx -= dx * mass_j; body_i.vy -= dy * mass_j; body_i.vz -= dz * mass_j; let mass_i = body_i.mass * mag; body_j.vx += dx * mass_i; body_j.vy += dy * mass_i; body_j.vz += dz * mass_i; } #[inline(...
Rust
0
ady have the correct header from the packet message, we dont need to look up // for it again.. let header_kind = MessageHeaders::header_from_emsg(linked_emsg).unwrap(); let header = msg.header(); match header_kind { MessageHeaders::Standard => Self { emsg: lin...
Rust
0
"2019/08/23 18:09:52.387 +08:00", LogLevel::Trace, "[foo.rs:100] [some message] [key=val]", ), ]; for (input, time, level, content) in cs.into_iter() { let result = parse(input); assert!(result.is_ok(), "expected OK, but got: {...
Rust
0
0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; let round_keys = cipher.key_schedule(35, &key); let plaintext = 0x0123456789abcdef; let ciphertext = cipher.encrypt(plaintext, &round_keys); assert_eq!(plaintext, cipher.decrypt(ciphertext, &round_keys)); let key = [0xff, 0xff, 0xff...
Rust
0
import numba @numba.jit(nopython=True) def partitions(cards, subtotal): m = 0 # Hit for i in range(0, 10): if (cards[i]>0): cards[i] = cards[i]-1 total = subtotal+i+1 if (total < 21): # Stand ...
Python
1
_mul_acc::with_accel::<Accel>(&mut result.tiles[trow*result.stride .. trow*result.stride+tcols], Tile::IDENTITY * &s0, &matrix.tiles[row_yes*matrix.stride .. row_yes*matrix.stride+tcols]); row_yes += offset_yes/EBITS; if offset_yes > EBITS { row_mul_acc::w...
Rust
0
ificity <-> recall for neg. class # ROC curve # AUC from ROC # Precision-Recall Curve # Log Loss # Mattheus Correlation # Cohen Kappa score # --> REGRESSION METRICS def roc_curve(y_true, y_preds, plot_graph=True, calculate_AUC=True, threshold_step=0.01): TPR, FPR = [], [] for threshold in np.arange(np.min(y_...
Python
1
CAPED_STRING, nullable=True, unquote=True, unescape=True), ), "categorylinks": ( WikipediaSqlColumn("cl_from", DIGITS), WikipediaSqlColumn("cl_to", ESCAPED_STRING, unquote=True, unescape=True), WikipediaSqlColumn("cl_sortkey", SINGLE_QUOTED_ANYTHING), WikipediaSqlColumn("cl_times...
Python
1
# make_spmm_inputs.py — robust input generator for D = A * B * A^T import numpy as np, os, json, argparse, scipy.sparse as sp def write_bin(path, arr): # Always overwrite (truncate) with open(path, "wb") as f: arr.tofile(f) def csr_sorted_unique(csr: sp.csr_matrix): """Ensure CSR has sorted, uniqu...
Python
1
import os import re filename = "day24.txt" txt = open(os.path.join(os.path.dirname(__file__), filename)).read() initial_values, operations = txt.split("\n\n") curr_values = {wire: int(val) for wire, val in [l.split(": ") for l in initial_values.split("\n")]} operations = re.findall(r"([a-z0-9]{3}) (XOR|AND|OR) ([a-...
Python
1
::Named(_named_fields) => todo!("Enums with named fields not yet supported by tree-buf decode"), Fields::Unnamed(FieldsUnnamed { unnamed, .. }) => { match unnamed.len() { // TODO: Check if this is really unreachable. It might be `Variant {}` 0 => unrea...
Rust
0
static class StandardCertificateStoreNames} impl RtActivatable<IStandardCertificateStoreNamesStatics> for StandardCertificateStoreNames {} impl StandardCertificateStoreNames { #[inline] pub fn get_personal() -> Result<HString> { <Self as RtActivatable<IStandardCertificateStoreNamesStatics>>::get_activation_...
Rust
0
""" Token Sniping example for AxiomTradingBot Focuses specifically on token sniping with aggressive settings """ import asyncio import logging from bot.core.trading_bot import AxiomTradingBot from bot.strategies.token_sniper import TokenSniper async def main(): """Run an aggressive token sniping bot""" l...
Python
1
from django.urls import path from django.conf import settings from . import views urlpatterns = [ path('', views.MlbbApiEndpoints.as_view(), name='root_redirect'), ] # Add other API endpoints only if available if settings.IS_AVAILABLE: urlpatterns.extend([ path('docs/', views.MlbbApiEndpoints.as_vie...
Python
1
string()), )), Ok(statements) if statements.len() > 1 => Ok(ValidationResult::Invalid( Some(" 🤔 You entered more than one statement".to_string()), )), Ok(_statements) => Ok(ValidationResult::Valid(None)), Err(err) => O...
Rust
0
( migrations.Migration(name="0001_initial", app_label="contenttypes"), False, ) ] with self.subTest( "Test task called when first migration in plan is for ContentTypes" ): app.post_migrate_receiver(plan=plan) m...
Python
1
# # SPDX-License-Identifier: MIT # # Copyright (c) 2025 Carsten Igel. # # This file is part of simplepycons # (see https://github.com/carstencodes/simplepycons). # # This file is published using the MIT license. # Refer to LICENSE for more information # """""" # pylint: disable=C0302 # Justification: Code is generated ...
Python
1
ey agreement not finished"), ErrorKind::SessionTransportError => write!(f, "transport layer error"), ErrorKind::SessionGetPublicKeyForIdError => { write!(f, "failed to get public key for ID") } ErrorKind::CompareSendOutputToPeer => write!(f, "send compari...
Rust
0
ht, i_tree_data_chunk_count, i_size, i_address) = idx_tw.finish(&mut sink)?; index_tree = Some(itemset::HTreeMetadata { height: serde_bare::Uint(i_tree_height as u64), data_chunk_count: serde_bare::Uint(i_tree_data_chunk_count), address: i_add...
Rust
0
te::{base, proto, Warnable}; use crate::base::{ArrayProperties, DataType, IndexKey, NodeProperties, SensitivitySpace, Value, ValueProperties}; use crate::components::{Component, Expandable, Mechanism, Sensitivity}; use crate::errors::*; use crate::utilities::{get_literal, prepend}; use crate::utilities::inference::infe...
Rust
0
/* https://github.com/otsaloma/catapult/blob/master/data/themes/dark.css */""" path.parent.mkdir(parents=True, exist_ok=True) path.write_text(text.strip() + "\n", "utf-8") for name, path in list_themes(): # Change import references to URIs. uri = path_to_uri(path) css = css....
Python
1
::NoCanData), &s.destination_node_id, &uavcan_id.source_node_id, ); match res { None => {} ...
Rust
0
# Eliminar elemento """ Crear un programa que elimine un elemento contenido en una lista """ country = ["Peru","Brasil","Argentina","Ecuador", "Uruguay", "Chile", "Bolivia", "Colombia", "Venezuela"] print(country) # Metodo DEL del(country[4]) print(country) # Metodo REMOVE country.remove("Chile") print(co...
Python
1
.map_err(|e| format!("failed to load environment from {:?}, {}", env_path, e))? } // if `dotenv` wasn't initialized by the above we make sure to do it here match ( dotenv::var("SQLX_OFFLINE").is_ok(), dotenv::var("DATABASE_URL"), ) { (false, Ok(db_url)) => expand_fr...
Rust
0
(); // Trying to add a word not found in any filter let word = "xyz".to_string(); log_filters.update_hash(&word, 0); assert_eq!(log_filters.words_hash.get(&word).is_some(), false); // Trying to add already existing word should change nothing let word = "aaa".to_string(); ...
Rust
0
= gamma_trans(_blur_mask, 0.15) (crop_x, crop_y, crop_width, crop_height) = mask_area(_gamma_mask) crop_box = (crop_x, crop_y, crop_x + crop_width, crop_y + crop_height) _blur_mask = _blur_mask.crop(crop_box) _blur_mask = _blur_mask.resize((width, height), Image.BILINEAR)...
Python
1
et job data"); return Err(e); } { let mut w = self.0.write().map_err(|_| JobSchedulerError::JobTick)?; w.set_next_tick(next_tick); w.set_last_tick(last_tick); w.set_ran(ran || must_run); let count = if must_run { if...
Rust
0
campaign_response = { "actions": [ { "type": "list", "title": "Here are some of the people:", "values": [ { "name": "John Doe", "email": "johndoe@example.com", "phone_number": "1234567890", ...
Python
1
import sys import argparse from process import * def main(args): if (2 ** 32) < sys.maxsize: print('Use a 32 bits version of Python') sys.exit(1) proc, = GetProcesses(args.proc) scanner = ProcessScanner(proc) frame_create_addr = scanner.find(b'\x33\xd2\x89\x45\x08\xb9\xac\x01\x00\x00'...
Python
1
otations"], data) if type_type_9 != "annotations": raise ValueError(f"type_type_9 must match const 'annotations', got '{type_type_9}'") return type_type_9 type_type_10 = cast(Literal["evaluations"], data) if type_type_10 != "evaluations": r...
Python
1
self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { self.0.fmt(f) } } impl ::core::fmt::Debug for Moder { fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { try!(write!(f, "[0x{:08x}", self.0)); if self.moder(0) != 0 { try!(write!(f, " moder[0]=0x{:x}", s...
Rust
0
': 'Kroatien', 'sw': 'Croatia', 'syr': 'ܩܪܘܐܛܝܐ', 'ta': 'குரோஷியா', 'te': 'క్రొయేషియా', 'teo': 'Korasia', 'tg': 'Хорватия', 'th': 'โครเอเชีย', 'ti': 'ክሮኤሽያ', 'tk': 'Horwatiýa', 'to': 'Kuloisia', 'tr': 'Hırvatistan', 'tt': 'Хорватия', 'twq': 'Krwaasi', 'tzm': 'Krwatya', 'ug': 'كىرودىيە', 'uk': 'Хорватія', 'ur': 'کروشیا'...
Python
1
Brief. /// /// Compute the rotation around the `z` axis(in cartesian coordinates) /// /// Description /// /// * `angle` - Angle of rotation in degrees /// pub fn rotz<SF:Scalar + Float>(angle: SF) -> Array2<SF> { let one = SF::one(); let zero = SF::zero(); let c = angle.to_radians().cos(); let s = angl...
Rust
0
# Ingest documents into the vector store import os from langchain_ollama import OllamaEmbeddings from langchain_openai import OpenAIEmbeddings import os from dotenv import load_dotenv load_dotenv() from .vector_store import get_chroma_client def ingest_documents(folder_path=None, collection_name="default"): if fol...
Python
1
t = Instant::now(); } } } } fn evict_old_counters(&mut self) { self.counters .retain(|_k, v| v.updated_at.elapsed() < EVICTION_PERIOD) } fn fold(&self) -> HashMap<ExtraTags, QueuesCounter> { self.counters .iter() ....
Rust
0
""" Image Text Retrieval evaluation helper """ import torch @torch.no_grad() def itm_eval(score_matrix, txt_ids, img_ids, txt2img, img2txts): # image retrieval img2j = {i: j for j, i in enumerate(img_ids)} _, rank_txt = score_matrix.topk(10, dim=1) gt_img_j = torch.LongTensor([img2j[txt2img[txt_id]] ...
Python
1
import whisper import os def load_whisper_model(): """Load Whisper model.""" return whisper.load_model("tiny") # Options: tiny, base, small, medium, large def format_timestamp_srt(seconds: float) -> str: """Convert seconds to SRT timestamp format: HH:MM:SS,mmm""" milliseconds = int(round(seconds * 10...
Python
1
<$acct>(&mut figure, beautify(stringify!($acct)), $xs, $ys, $ds, $cs);)* draw_figure(figure); } } fn parallel_dot_<Acc>( figure: &mut Figure, name: &'static str, xs: &[Vec<F>], ys: &[Vec<F>], ds: &[F], cs: &[F], ) where Acc: ParallelDotAccumulator<F>, { print!("Testing paral...
Rust
0
st RX_ERRORS: Field = 16..20; const TX_ERRORS: Field = 20..24; const RX_DROPPED: Field = 24..28; const TX_DROPPED: Field = 28..32; const MULTICAST: Field = 32..36; const COLLISIONS: Field = 36..40; const RX_LENGTH_ERRORS: Field = 40..44; const RX_OVER_ERRORS: Field = 44..48; const RX_CRC_ERRORS: Field = 48..52; const R...
Rust
0
, title.as_bytes(), )?; conn.change_property32( PropMode::REPLACE, window, atoms.WM_PROTOCOLS, AtomEnum::ATOM, &[atoms.WM_DELETE_WINDOW], )?; conn.change_property8( PropMode::REPLACE, window, AtomEnum::WM_CLASS, AtomEnum::ST...
Rust
0
fields = { "input": [ "hint", "field" ], "title": [ "content" ], "text": [ "content" ], "oauth-link": [ "link" ], "autocomplete": [ "word" ] } class BadForm(Exception): def __init__(self, message): super().__init__(mess...
Python
1
best_val_mae = float('inf') best_models = [] best_scores = [] max_models = 5 # 定义损失函数 def criterion(pred, target): # 基础L1损失 l1_loss = F.l1_loss(pred, target, reduction='none') # 计算预测点和目标点之间的角度 pred_angle = torch.atan2(pred[:, 1], pred[:, 0]) ta...
Python
1
Map { table_blocks: 0, occupied: 0, flagged_blocks: 0, max_occupied: 0, block_kv_count: count, block_v_offset: v_start, table: ptr::null_mut(), hasher: OneFieldHasherBuilder::new(), _marker: marker::PhantomData, ...
Rust
0
013'), b'\x97': ('mdash', '2014'), b'\x98': ('tilde', '2DC'), b'\x99': ('trade', '2122'), b'\x9a': ('scaron', '161'), b'\x9b': ('rsaquo', '203A'), b'\x9c': ('oelig', '153'), b'\x9d': '?', b'\x...
Python
1
DIS, } } #[doc = "Checks if the value of the field is `EN`"] #[inline(always)] pub fn is_en(&self) -> bool { *self == IO_MASTER5_A::EN } #[doc = "Checks if the value of the field is `DIS`"] #[inline(always)] pub fn is_dis(&self) -> bool { *self == IO_MASTER5_A::DI...
Rust
0
from sklearn import cluster from config.model_config import ModelConfig from website_finder.model.bertclf import BERTClassifier from website_finder.training.trainer import Trainer from website_finder.dataloader.dataset import CustomDataLoader from website_finder.model.clustering import ClusterClassifier from utility.pr...
Python
1
: impl IntoIterator<Item = T>, succs: impl Fn(T) -> Ts, equiv: impl Fn(T, T) -> bool, ) -> bool { // stack of the depth first search. // Each node is labeled with its depth to allow maintaining the path from the root let mut stack = Vec::with_capacity(32); for x in roots.into_iter() { st...
Rust
0
.is_array, true); /// assert_eq!(field.value, 1); /// ``` #[derive(Debug, PartialEq)] pub struct Schema { pub defs: Vec<Def>, /// Maps the `name` member of each [Def](struct.Def.html) in the `defs` array /// to its index in that array. This is helpful when decoding and encoding a /// field to be able to quickl...
Rust
0
2018-01-01".to_owned(); let task = ::todo_txt::Task { subject: "Email SoAndSo at <EMAIL>".to_owned(), threshold_date: Some(::todo_txt::Date::from_ymd(2018, 1, 1)), .. Default::default() }; assert_eq!(::todo_txt::parser::task(&line), Ok(task)); } <gh_stars>10-100 /* MIT License Cop...
Rust
0
pub fn is_running(&self) -> bool { self.is_running } pub fn close_game(&mut self) { self.is_running = false; } pub(in crate::core) fn start(&mut self) { self.is_running = true; } /* pub(in crate::core) fn poll_events(&mut self) { match self.window { ...
Rust
0
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 required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CON...
Rust
0
# -*- coding: utf-8 -*- ############################################################################## # Copyright (c) wxmall.janedao.cn # Author:QQ173782910 #QQ group:528289471 ############################################################################## """admin/vi/mselect.py""" from basic.publicw import cTag, CHt...
Python
1
# Copyright (c) 2018 PaddlePaddle Authors. 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 required by appli...
Python
1
Color { r: 0.0, g: 1.0, b: 0.0, a: 1.0, } } else if context { Color { r: 1.0, g: 0.0, b: 0.0, a: 1.0, ...
Rust
0
<Loader /> </BounceRoot> } } fn main() { console_log::init_with_level(Level::Trace).expect("Failed to initialise Log!"); yew::start_app::<App>(); } <filename>src/parser/span/image.rs use parser::Span; use parser::Span::Image; use regex::Regex; pub fn parse_image(text: &str) -> Option<(...
Rust
0
unix_milli: 3, values: Vec::new(), }, EntityRow { entity_key: "7".into(), unix_milli: 1, values: Vec::new(), }, EntityRow { entity_key: "7".into(), unix_milli: 0, values: Vec::new(),...
Rust
0
== 1 for each model :return: boxes: boxes coordinates (Order of boxes: x1, y1, x2, y2). :return: scores: confidence scores :return: labels: boxes labels """ # If weights are specified if weights is not None: if len(boxes) != len(weights): print('Incorrect number of weight...
Python
1
import numpy as np import pytest import pandas as pd import pandas._testing as tm from pandas.core.arrays.sparse import SparseArray class TestSparseArrayConcat: @pytest.mark.parametrize("kind", ["integer", "block"]) def test_basic(self, kind): a = SparseArray([1, 0, 0, 2], kind=kind) b = Spar...
Python
1
rt_symbol), quarterLength=quarter_length_duration) stream.append(m21_event) # reset the step counter step_counter = 1 start_symbol = symbol # handle case in which we have a prolongation sign "_" else: ...
Python
1
enemy_drone_position = self.radar_range - ( (self.drone_speed / 60) * self.time ) our_drone_position = max( 0, (self.drone_speed / 60) * (self.time - self.reaction_time) ) else: enemy_drone_position = self.radar_range + ( ...
Python
1
filter(|edge| edge.number > 0) .map(|edge| Segment::new( edge.a.as_point3035(), edge.b.as_point3035(), edge.osm_ids(), edge.number as f64, )) .collect(); let tree = RTree::bulk_load(segments); tree } pub fn geojson_to_rtree<P: AsRef<Path>...
Rust
0
last bit. # Parameters - `this: *mut *const BitSlice<LittleEndian, u8>`: Pointer to a mutable `BitSlice` handle of mutable bits. # Returns A `Tristate` boolean of whether the split succeeded and what the last bit in the slice was. If `*this` is empty, then this returns `Tristate::Error`. # Modifies If the spli...
Rust
0
""" cell_cycle_classification base module. This is the principal module of the cell_cycle_classification project. here you put your main classes and objects. Be creative! do whatever you want! If you want to replace this with a Flask application run: $ make init and then choose `flask` as template. """ # exam...
Python
1
用代理需要手动配置。搜索引擎的代理如何处置还需考虑。 ''' import httpx import os httpx._config.DEFAULT_TIMEOUT_CONFIG.connect = timeout httpx._config.DEFAULT_TIMEOUT_CONFIG.read = timeout httpx._config.DEFAULT_TIMEOUT_CONFIG.write = timeout # 在进程范围内设置系统级代理 proxies = {} if isinstance(proxy, str): for...
Python
1
.billing_address = self.create_address(contact, 'billing') contact.save() create_fc = FieldsConfig.objects.create create_fc( content_type=Contact, descriptions=[('email', {FieldsConfig.HIDDEN: True})], ) create_fc( content_type=Address, ...
Python
1
""" ll 2025.3.30 爬取静态页面中多个子页面的信息 """ import requests from bs4 import BeautifulSoup import time # 基础URL(用于拼接相对链接) base_url = "https://www.xyyuedu.com" # 1. 获取章节列表页 list_url = "https://www.xyyuedu.com/gudaiyishu/huangdinajingbaihuawen/" # 替换为实际URL headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64...
Python
1
} _ => {}, } } rate_limiter.delay(); } } <reponame>doxxx/raytracer use matrix::Matrix44f; use object::Transformation; use system::{Intersectable, Intersection, Ray}; mod bounding_box; mod composite; mod csg; mod cube; mod cylinder; mod homogenous_medium; mod mesh; ...
Rust
0
-68.5167007446)), (41, ("YZS", "CYZS", 64.1932983398, -83.3593978882)), (42, ("YDA", "CYDA", 64.04309844970703, -139.1280059814453)), (43, ("YDB", "CYDB", 61.37110137939453, -139.04100036621094)), (44, ("UNKNOWN", "CYDC", 49.4681015015, -120.511001587)), (45, ("YDF", "CYDF", 49.21080017089844, -57....
Rust
0
) { Entry::Occupied(e) => Some(e.remove_entry().1), Entry::Vacant(_) => None, } } <gh_stars>10-100 use crate::pac::{Interrupt, NVIC}; use core::arch::asm; use core::sync::atomic::{compiler_fence, AtomicBool, Ordering}; #[cfg(any(feature = "nrf52810", feature = "nrf52811"))] const RESERVED_IRQS: u32...
Rust
0
"""Configuration file for the Sphinx documentation builder.""" import os import sys # Add the parent directory to the path so we can import fewlab sys.path.insert(0, os.path.abspath("..")) # Project information project = "fewlab" copyright = "2024, Gaurav Sood" author = "Gaurav Sood" release = "0.1.0" # Extensions ...
Python
1
# md5: 4083100042bacaf700e862abb15c318c # Auto-Generated file - DO NOT EDIT! # Source module: sandbox.test.service_with_imported_io_pb2 # Generated at: 2022-06-26T12:07:56.454629 from __future__ import annotations __all__ = [ 'ServiceWithImportedInputAndOutput', ] import datetime import typing from protoplasm impor...
Python
1
if xsave_features & 0x01 != 0 { ret += "x87 "; } if xsave_features & 0x02 != 0 { ret += "SSE "; } if xsave_features & 0x04 != 0 { ret += "AVX "; } if xsave_features & 0x08 != 0 { ret += "MPX-BNDREGS "; } if xsave_features & 0x10 != 0 { ret += "M...
Rust
0
} } } }}); test_lookup_eq!("data.country[country].city[city]['rust-developers']", data, json!(1)); } #[test] fn square_bracket_nested_indirect() { let data = json!({ "name": "czech", "country": { "czech": "Czech Republic" }, "data": { "country": { ...
Rust
0
# Copyright 2023 The KerasCV 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
155983513, '\u{30DC}'), (53717155983514, '\u{30DD}'), (53803055329433, '\u{30F7}'), (53807350296729, '\u{30F8}'), (53811645264025, '\u{30F9}'), (53815940231321, '\u{30FA}'), (53863184871577, '\u{30FE}'), (276290951185857, '\u{FB2C}'), (276290951185858, '\u{FB2D}'), (299724292821178, ...
Rust
0
er a 'Certificate Expiring' warning.") ) issuing_ca_expiry_warning_days = models.PositiveIntegerField( default=30, help_text=_("Number of days before an issuing CA's certificate expiration to trigger a warning.") ) rsa_minimum_key_size = models.PositiveIntegerField( default=204...
Python
1
ed: [u8; 32] = *b"NEVER USE THIS FOR ANYTHING REAL"; rand::rngs::StdRng::from_seed(seed) } fn channel_id(rng: &mut impl Rng) -> ChannelId { let cid_m = MerchantRandomness::new(rng); let cid_c = CustomerRandomness::new(rng); let pk = KeyPair::new(rng).public_key().clone(); ...
Rust
0
# '17_2_files/text.txt' f = open(input(), encoding='utf-8') print(f.read()) f.close()
Python
1
} } #[doc = "The bus clock clocks the SCT and prescalers."] #[inline] pub fn the_bus_clock_clocks(self) -> &'a mut W { self.variant(CLKMODEW::THE_BUS_CLOCK_CLOCKS) } #[doc = "The SCT clock is the bus clock, but the prescalers are enabled to count only when sampling of the input selec...
Rust
0
#========================================================================= # XcelMsg_test #========================================================================= # Test suite for accelerator request and response messages. from pymtl import * from XcelMsg import XcelReqMsg, XcelRespMsg #--------------------------...
Python
1
or. If the estimator does not belong to module `_doc_link_module`, the empty string (i.e. `""`) is returned. """ if self.__class__.__module__.split(".")[0] != self._doc_link_module: return "" if self._doc_link_url_param_generator is None: estimato...
Python
1
ChatInviteLinkMembers { #[doc(hidden)] #[serde(rename(serialize = "@type", deserialize = "@type"))] td_name: String, #[doc(hidden)] #[serde(rename(serialize = "@extra", deserialize = "@extra"))] extra: Option<String>, /// Approximate total count of chat members found total_count: i64, /// List of cha...
Rust
0
from network_tools._types import ALL_VISION_MODELS from network_tools import NetworkToolsAPI, GptModels api_key = "API_KEY" # замените на ваш API ключ client = NetworkToolsAPI(api_key) print("Модели со зрением:", ALL_VISION_MODELS) chat_history = [ {'content': 'Что это?', 'role': 'user'}, {'content': 'Ваш в...
Python
1
# Generated by Django 5.0.3 on 2024-07-01 15:23 import django.db.models.deletion import uuid from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("decks", "0021_alter_card_name_alter_card_name_de_and_more"), ] operations = [ migrations.Create...
Python
1
| ':' | '<' | '=' | '>' | '?' | '@' | '\\' | '^' | '_' | '`' | '|' | '~' => true, _ => false, } } fn is_reserved_extra(c: char) -> bool { match c { ',' | ';' | '[' | ']' | '{' | '}' => true, _ => fal...
Rust
0