text
string
label_name
string
labels
int64
anachronisms = { "интернет": "радиосводка", "email": "письмо", "телефон": "полевой телефон", "смартфон": "рация", "видео": "кинохроника", "чат": "разговор", "соцсети": "газетные сводки", "гаджет": "полевой прибор", "ноутбук": "печатная машинка", "принтер": "ротапринт", "веб-с...
Python
1
import json from openai import OpenAI from coordinator import * with open('OpenAI_API.json', 'r') as f: chat_completion_api = json.load(f)['chat_completion_api'] api_key = chat_completion_api['api_key'] base_url = chat_completion_api['base_url'] client = OpenAI( api_key = api_key, base_url = base_url ) ...
Python
1
}); Ok(()) } #[test] fn test_api_add_subscriptions() -> anyhow::Result<()> { Lazy::force(&crate::tracing::TEST_TRACING); const SPAN_NAME: &'static str = "test_api_add_subscriptions"; let main_span = tracing::info_span!(SPAN_NAME); let _main_span_guard = main_span.en...
Rust
0
m ) } impl_expr_unary_func!(sparsemax, dynetApplySparsemax, "Computes sparsemax"); /// Computes sparsemax loss pub fn sparsemax_loss<E: AsRef<Expression>>(x: E, target_support: &[u32]) -> Expression { expr_func_body!( dynetApplySparsemaxLoss, x.as_ref().as_ptr(), target_support...
Rust
0
PROMPT = """ System role: You are a Jury Agent in a Judge/Jury framework that screens product features for geo-specific legal compliance needs. All necessary information — including the feature name, description, target region, and relevant legislative text — is provided directly in the user query which you will be a...
Python
1
se): if self.subparses is None: raise Exception("A renpy_block can only be parsed inside a creator-defined statement.") if self.line < 0: self.advance() block = [ ] while not self.eob: try: stmt = renpy.parser.parse_statement(self)...
Python
1
# Exercises the micro:bit - NOT EXHAUSTIVE! from microbit import * import music import random # Press A to start. while True: if button_a.was_pressed(): break else: display.show(Image.ARROW_W) sleep(200) display.clear() sleep(200) # Asyncronously play a jolly little t...
Python
1
import click from energy_extractor.energy_extraction import extract_energy_from_buildings from utils.logging import get_client_logger logger = get_client_logger() @click.command() @click.argument("buildings_file", type=click.Path(exists=True)) @click.argument( "cropped_images_folder", type=click.Path(exists=Tru...
Python
1
# __init__.py - functions for performing the ISO 7064 algorithms # # Copyright (C) 2010, 2012 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the ...
Python
1
ra> { let process_info: Vec<ProcInfo> = Arbitrary::arbitrary(gen); InitGeneric { beam_1_id: Arbitrary::arbitrary(gen), beam_2_id: Arbitrary::arbitrary(gen), beam_1_energy: Arbitrary::arbitrary(gen), beam_2_energy: Arbitrary::arbitrary(gen), bea...
Rust
0
fid: xcb_font_t, name_len: u16, name: *const c_char, ) -> xcb_void_cookie_t { sym!(self, xcb_open_font_checked)(c, fid, name_len, name) } /// Returns `true` iff the symbol `xcb_open_font_checked` could be loaded. #[cfg(feature = "has_symbol")] pub fn has_xcb_open_font_checke...
Rust
0
i += 1 } pdf_dev_lineto(tp.points[i].x, tp.points[i].y); showpath(f_vp, f_fs); pdf_dev_grestore(); } tpic__clear(tp); error } unsafe fn tpic__arc( tp: &mut spc_tpic_, c: &Point, mut f_vp: bool, da: f64, v: *mut f64, ) -> Result<()> /* 6 numbers */ { ...
Rust
0
"parcoords", "d3.min.js") ) css_blob_path = resource_filename( "hulearn", os.path.join("static", "parcoords", "d3.parcoords.css") ) js_blob_path = resource_filename( "hulearn", os.path.join("static", "parcoords", "d3.parcoords.js") ) json_data = dataf.rename(columns={label: "la...
Python
1
{ let matches = App::new("Advent of Code 2019, Day 19") .arg(Arg::with_name("FILE") .help("Input file to process") .index(1)) .get_matches(); let fname = String::from(matches.value_of("FILE").unwrap_or("19.in")); let ic = Intcode::load(&fname); let mut chart = ...
Rust
0
), line, column)) } } fn primary(&mut self) -> ParseResult<Expr> { let line = self.current.line; let column = self.current.column; let obj = match self.current.token.clone() { // literals Tkt::Num(n) => { self.next()?; Exp...
Rust
0
# Thus the heuristic reports a lower estimate on the cost to reach goal state and is admissible # The heuristic is consistent because the cost of moving to a city is always 1, which is exactly the decrease in the number of unvisited cities, if the city is unvisited, otherwise the estimated cost of the successor ...
Python
1
") .arg("-out") .arg(&csr) .arg("-subj") .arg(format!( "/C=US/ST=Utah/L=Provo/O=ACME Service/CN={}", domain )) .arg("-config") .arg(&conf_path) .stderr(Stdio::inherit()) .output() .unwrap() .status .s...
Rust
0
import torch device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') # sets device for model and PyTorch tensors im_size = 512 unknown_code = 128 epsilon = 1e-6 epsilon_sqr = epsilon ** 2 num_samples = 43100 num_train = 34480 # num_samples - num_train_samples num_valid = 8620 # Training parameters nu...
Python
1
_data = match ReflectDeriveData::from_input(&ast) { Ok(data) => data, Err(err) => return err.into_compile_error().into(), }; match derive_data.derive_type() { DeriveType::Struct | DeriveType::UnitStruct => from_reflect::impl_struct(&derive_data), DeriveType::TupleStruct => from_...
Rust
0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class AccountInvoiceLine(models.Model): _inherit = ['account.move.line'] def get_digital_purchases(self): partner = self.env.user.partner_id # Get paid invoices ...
Python
1
n"), (token::FALSE, "false"), (token::SEMICOLON, ";"), (token::RBRACE, "}"), (token::INT, "1"), (token::EQ, "=="), (token::INT, "1"), (token::EOF, "\0"), ]; let mut l = lexer::Lexer::new(input); for exp in expe...
Rust
0
# -*- coding: utf-8 -*- # SPDX-License-Identifier: Apache-2.0 # Portions copyright 2023 FMR LLC # Portions copyright 2023 Amazon Web Services, Inc. from copy import deepcopy import pytest from boolxai import Literal, One, Operator, Wildcard, Zero from boolxai.classifiers.postprocessing import remove_nested_and, remo...
Python
1
io::spawn(async move { /// // do some time consuming task /// t_wg.done(); /// }); /// } /// ``` pub fn done(&self) { let _ = self .inner .count .fetch_update(Ordering::SeqCst, Ordering::SeqCst, |val| { // We are the...
Rust
0
from pyemvue.pyemvue import PyEmVue vue = PyEmVue() logged_in = vue.login(token_storage_file='keys.json') print('Logged in?', logged_in) print() if not logged_in: raise Exception('Login failed') devices = vue.get_devices() outlets, chargers = vue.get_devices_status() for device in devices: print(device.devic...
Python
1
ukio`.* FROM `naukio` WHERE `word` NOT LIKE ?", vec!["%meow"]); let query = Select::from_table("naukio").so_that("word".not_ends_into("meow")); let (sql, params) = Sqlite::build(query); assert_eq!(expected.0, sql); assert_eq!(default_params(expected.1), params); } #[test] ...
Rust
0
/// DateInterval::new((2020, 4, 15), (2020, 5, 15)).unwrap(), /// ); /// let water_bill = SharedBill::new(water_bill, Money::of_minor(USD, 30_00)).unwrap(); /// assert_eq!(water_bill.amount_due(), Money::of_minor(USD, 83_22)); /// ``` pub fn amount_due(&self) -> Money { self.bill.amou...
Rust
0
import logging import pytest import sys # Include the root of the project sys.path.append("..") import censors.censor_driver import library import common def get_censors(): """ Retrieves a list of all available censors for testing. """ tests = [] docker_censors = censors.censor_driver.get_censors...
Python
1
e" { Attribute::Code(CodeAttribute::parse(version, constant_pool, buf)?) } else if str == "Signature" && version.major >= MajorVersion::JAVA_5 { Attribute::Signature(SignatureAttribute::parse(constant_pool, buf)?) } else if str == "Exceptions" { Attribute::Exceptions(ExceptionsAttribute::parse(co...
Rust
0
from types import SimpleNamespace from unittest.mock import AsyncMock import pytest from voiceover_mage.core.models import NPCProfile from voiceover_mage.extraction.voice.elevenlabs import ElevenLabsVoicePromptGenerator @pytest.mark.asyncio async def test_elevenlabs_prompt_generation(monkeypatch): # Arrange ...
Python
1
from bs4 import BeautifulSoup getNamePagesMapping = __import__('00-GetChapterNamesAndPages') import os shamelaId = "29120" arr = os.listdir('/home/alfi/Projects/hadith-supplementary/hadith/grad/{}/'.format(shamelaId)) arr.sort(key=lambda f: int(''.join(filter(str.isdigit, f)))) chapterFolderPath = "{}/Chapters".forma...
Python
1
if factors: print(f" Domain score: {factors.get('domain_score', 0):.3f}") print(f" Content type: {factors.get('content_type_score', 0):.3f}") async def demo_learning_feedback(self): """Demonstrate learning and feedback mechanisms.""" print("\n�...
Python
1
sent through the ABMODE (None/1/2/4 lines) // * The alternate bytes number (1/2/3/4) through the ABSIZE bits // * The presence or not of dummy bytes through the DBMODE bit // * The number of dummy bytes through the DCYC bits // * The way the data have to be sent/received (None/1/2/4 lin...
Rust
0
hable!("message event, received Unknown: {:?}", event.data()); } } // copied verbatim from https://github.com/rustwasm/wasm-bindgen/issues/2551 async fn blob_into_bytes(blob: Blob) -> Vec<u8> { let array_buffer_promise: JsFuture = blob.array_buffer().into(); let array_buffer: JsValue = array_buffer_promis...
Rust
0
-m.fd[i,j] + m.f[j] + m.a[j]/2 + big_M*(1-m.e4t[i,j]) >= m.d['E4t',(i,j)]) # m.c.add( m.fd[i,j] - m.f[j] - 3*m.a[j]/2 + big_M*m.e5[i,j] >= m.d['E5',(i,j)]) # m.c.add( -m.fd[i,j] + m.f[j] + 3*m.a[j]/2 + big_M*(1-m.e5[i,j]) >= m.d['E5',(i,j)]) m.c.add( m.f[j] + m.a[j] <= m.fd[i,j]) ...
Python
1
g and insertion of articles for all sources. Raises: HTTPException: If sources cannot be retrieved or if posting content fails. """ logger.info("Received scrape/all request") date_base = format_date_str(scrape_request.date_base, "%d-%m-%Y") date_cutoff = format_date_str(scrape_request.date_...
Python
1
index(name=row_index_token) .filter( pln.col(row_index_token) >= offset, # type: ignore[operator] (pln.col(row_index_token) - offset) % n == 0, # type: ignore[arg-type] ) .drop([row_index_token], strict=False) ) def unpivot( self...
Python
1
def test_stable_unclip_pipeline_with_sequential_cpu_offloading(self): torch.cuda.empty_cache() torch.cuda.reset_max_memory_allocated() torch.cuda.reset_peak_memory_stats() pipe = StableUnCLIPPipeline.from_pretrained('fusing/stable-unclip-2-1-l', torch_dtype=torch.float16) pipe = pipe.to(torc...
Python
1
) ); } #[test] fn __bindgen_test_layout_std__Is_character_open0_signed_char_close0_instantiation() { assert_eq!( ::std::mem::size_of::<std__Is_character>(), 1usize, concat!( "Size of template specialization: ", stringify!(std__Is_character) ) ); ...
Rust
0
/// [`Hash`] and [`Ord`] on the borrowed form *must* match those for /// the value type. /// /// [`Ord`]: std::cmp::Ord /// [`Hash`]: std::hash::Hash /// /// # Examples /// /// ``` /// use flurry::HashSet; /// /// let set: HashSet<_> = [1, 2, 3].iter().cloned().collect();...
Rust
0
figuration. """ if self.rope_scaling is None: return if not isinstance(self.rope_scaling, dict) or len(self.rope_scaling) != 3: raise ValueError( "`rope_scaling` must be a dictionary with three fields, `type`, `short_factor` and `long_factor`, " ...
Python
1
"] #[doc = "```"] fn sum<I: Iterator<Item = $type>>(iter: I) -> $type { iter.fold($type::from($zero), |a, b| a + b) } } } }; } pub(in crate::scalar) use gen_binop; pub(in crate::scalar) use gen_binopassign; pub(in crate::scalar...
Rust
0
D8_INT_ENA_W { SLV_CMD8_INT_ENA_W { w: self } } #[doc = "Bit 4"] #[inline(always)] pub fn slv_cmd7_int_ena(&mut self) -> SLV_CMD7_INT_ENA_W { SLV_CMD7_INT_ENA_W { w: self } } #[doc = "Bit 3"] #[inline(always)] pub fn slv_en_qpi_int_ena(&mut self) -> SLV_EN_QPI_INT_ENA_W {...
Rust
0
from django.urls import path from .views import CreatePaymentView, YookassaWebhookView urlpatterns = [ path('create-payment/', CreatePaymentView.as_view(), name='create-payment'), path('yookassa-webhook/', YookassaWebhookView.as_view(), name='yookassa-webhook'), ]
Python
1
sender=chatList.children()[-1].descendants(control_type='Button')[0].window_text() return content,sender return None,None def find_current_wxid()->str: ''' 该函数通过内存映射文件来检测当前登录的wxid,使用时必须登录微信,否则返回空字符串 ''' wechat_process=None for process in psutil.process_iter(['pid'...
Python
1
# -*- encoding: utf-8 -*- # @Author: Jocker1212 # @Contact: xinyijianggo@gmail.com import sys from typing import List, Union from pathlib import Path from get_pypi_latest_version import GetPyPiLatestVersion import setuptools def read_txt(txt_path: Union[Path, str]) -> List[str]: with open(txt_path, "r", encoding...
Python
1
el[best_detect][yind, xind, best_anchor, 5:] = smooth_onehot bbox_ind = int( bbox_count[best_detect] % self.max_bbox_per_scale ) bboxes_xywh[best_detect][bbox_ind, :4] = bbox_xywh bbox_count[best_detect] += 1 label_sbbox, label...
Python
1
(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("SetObjectTypeBuilder") .field("inner", &self.inner) .finish() } } #[derive(Clone, Debug)] pub(super) struct ModifyObjectStatus<'a> { entry: Entry<'a>, disabled: bool, } impl ModifyObjectStatus<'_> { pu...
Rust
0
e, license=license, submission_time=row["datetime"].strftime("%Y-%m-%dT%H:%M:%S") if pd.notna(row["datetime"]) else None, ) return record ### Collect the records that are now in the desired format hitchhiking_records = [] for _, row in tqdm(lift.iterrows(), total=len(lift)):...
Python
1
from woningwaardering.vera.bvg.generated import Referentiedata from woningwaardering.vera.referentiedatasoort import Referentiedatasoort class AdressoortReferentiedata(Referentiedata): pass class Adressoort(Referentiedatasoort): buitenlands_adres = AdressoortReferentiedata( code="BUI", naam=...
Python
1
let strict = self.strict.load(Ordering::Relaxed); if !strict.is_null() { f.field("strict", unsafe { &*strict }); } else if !self.args.is_null() { f.field("args", unsafe { &*self.args }); }; f.finish() } } unsafe impl<'r, A: Immutable, T: Immutable> Immu...
Rust
0
from environs import Env # environs kutubxonasidan foydalanish env = Env() env.read_env() # .env fayl ichidan quyidagilarni o'qiymiz BOT_TOKEN = env.str("BOT_TOKEN") # Bot toekn ADMINS = env.list("ADMINS") # adminlar ro'yxati IP = env.str("ip") # Xosting ip manzili CHANNELS = ["-1002042435442"]
Python
1
match handlers.0.binary_search_by(|probe| probe.0.cmp(&priority)) { Ok(pos) => pos, Err(pos) => pos, }; handlers.0.insert(pos, (priority, Box::new(handler))); } else { warn!("Cannot subscribe on invalid bus: '{}'", bus); } } fn get_event_id<T: Event>() -> usize...
Rust
0
import os from cryptography.hazmat.primitives.ciphers import Cipher, modes from cryptography.hazmat.primitives.ciphers.algorithms import AES, SM4 pt_banner = b"I don't trust governments, thankfully I've found smart a way to keep my data secure." ct_banner = b"\xd5\xae\x14\x9de\x86\x15\x88\xe0\xdc\xc7\x88{\xcfy\x81\x9...
Python
1
lf.help_visible = True # 顶部布局(按钮和滑块) top_layout = QHBoxLayout() # 按钮样式 button_style = """ QPushButton { background-color: #495CDA; /* 背景颜色 */ color: white; /* 文字颜色 */ border-radius: 10px; /* 圆角 */ ...
Python
1
#!/usr/bin/env python # # SPDX-License-Identifier: BSD-2-Clause # # imgp_v3.py # Part of NetDEF CI System # # Copyright (c) 2025 by # Network Device Education Foundation, Inc. ("NetDEF") # import argparse from scapy.all import ByteField, ShortField, IPField from scapy.contrib.igmpv3 import IGMPv3gr from scapy.fie...
Python
1
NUM_HSCH6_R { type Target = crate::FieldReader<u16, u16>; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `DUTY_NUM_HSCH6` writer - This register is used to control the num of increased or decreased times for high speed channel6."] pub struct DUTY_NUM_HSCH6_W<'a> ...
Rust
0
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2020 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # T...
Python
1
n le_u8_range() { assert_eq!(LittleEndian::at::<u8>(BitIdx(0)), BitPos(0)); assert_eq!(LittleEndian::at::<u8>(BitIdx(1)), BitPos(1)); assert_eq!(LittleEndian::at::<u8>(BitIdx(2)), BitPos(2)); assert_eq!(LittleEndian::at::<u8>(BitIdx(3)), BitPos(3)); assert_eq!(LittleEndian::at::<u8>(BitIdx(4)), BitPos(4)); ...
Rust
0
pub type GLubyte = u8; pub type GLuint = u32; pub type GLuint64 = u64; pub type GLushort = u16; pub type Int32List = Vec<i32>; pub type Uint32List = Vec<u32>; pub type Float32List = Vec<f32>; #[derive(Debug, Copy, Clone, PartialEq, Eq)] pub struct GLContext{ pub reference: Reference } #[derive(Debug, Copy, Clone, Par...
Rust
0
s(\x0de\xd5\ \xd5\xf3\x0e,*\x10;%8W\x22+\x15j\xc9\xfe\ \xd5E\xa1\xa5\xd4\x88\xa8\xde(\xc5\xe8F\x1fO\x9e,\ \xe3\x99\xa7u\xb4\xfb\xcew\x12!\xe4\x1d\x9b\x00\x8eL\ \xae\xaeui\x9e\x14\xa5+\xb7\xe9\xda\xf8\xba\xb6\x13\x99\ 3N{-\xb5\x8c4\xce\x05\xfb,_U]\xe4\x00\ \xaf'\x90\xde\xe3\x84\x07\x0cR:,=j\x89dv\ \xf73\xbc\xef\xc3\xef\...
Python
1
a version of write with the callback and one without it. /// Writes data to the terminal. /// /// Takes: /// - `data`: The data to write to the terminal. The actual API allows for /// this to be either raw bytes given as `Uint8Array` from the /// pty or a string (raw ...
Rust
0
/// /// # Errors /// /// An [`InternalError`] is returned if the underlying implementation encounters an error /// while processing the received message. fn recv(from_process: &P, message: M) -> Result<(), InternalError>; } use crate::format::*; use nom::{ bytes::streaming::tag, combinator::...
Rust
0
(): pass label('loc_3034') If( ( (Expr.TestScenaFlags, ScenaFlag(0x00A1, 6, 0x50E)), Expr.Return, ), 'loc_3153', ) If( ( (Expr.TestScenaFlags, ScenaFlag(0x0000, 3, 0x3)), Expr.Return, ), 'loc_30A5', ) ...
Python
1
# # This file is part of the Chemical Data Processing Toolkit # # Copyright (C) Thomas Seidel <thomas.seidel@univie.ac.at> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # versi...
Python
1
l_set = None print("Generate output labels...") bar = ProgressBar() bar.start(len(eval_dataset) // input_cfg.batch_size + 1) for example in iter(eval_dataloader): example = example_convert_to_torch(example, float_dtype) example_tuple = list(example.values()) batch_image_shape = ...
Python
1
import logging from cvpods.layers import ShapeSpec from cvpods.modeling.anchor_generator import DefaultAnchorGenerator from cvpods.modeling.backbone import Backbone, build_efficientnet_bifpn_backbone from cvpods.modeling.meta_arch import EfficientDet from cvpods.modeling.nn_utils.parameter_count import parameter_count...
Python
1
. tokio::run(futures::future::poll_fn({ let random_id = random_id.clone(); let query = query.clone(); move || { match try_ready!(Ok(query.lock().unwrap().poll())) { QueryStatePollOut::SendRpc { peer_id, .. } if peer_id == &random_id => { ...
Rust
0
inates after the trajectory cost is less than cost_threshold or max_iterations is reached. """ start_time = time.time() x_trj = np.array(self.x_trj_0) u_trj = np.array(self.u_trj_0) while True: ( cost_Qu, cost_Qu_final, ...
Python
1
{ first: 165, n_left: 3, }, Range { first: 170, n_left: 58, }, Range { first: 237, n_left: 1, }, Range { first: 391, n_left: 0, }, Range { first: 393, n_left: 0, }, Range { first: 300, n_left: 0, }, Range { first: 392, n_left: 0, }, Ra...
Rust
0
db.collection("stats"); let coll_sentences = db.collection("sentences"); let coll_users = db.collection("users"); let stats = fetch_stats(&coll_total, &coll_sentences, &coll_users).await?; Ok(Self { coll_total, coll_sentences, coll_users, ...
Rust
0
1, 4, 0, 0, 0, 0, // Pad6 127, 6, 0, 0, 0, 0, 0, 0, // Unrecognized option type w/ action = discard ]; let error = Records::<&[u8], Ipv6ExtensionHeaderImpl>::parse_with_context(&buffer[..], context) .expect_err("Parsed successfully with an unre...
Rust
0
lasts += 1 res1.occs.data = _np.concatenate((res1.occs.data, res2.occs.data), axis=0) res1.occs.write(basedir + '/restart/gs/occs') res1.wfns.data = _np.concatenate((res1.wfns.data, res2.wfns.data), axis=0) res1.wfns.filenames += res2.wfns.filenames res1.wfns.write(basedir + '/restart/gs/wf...
Python
1
# Drakkar-Software OctoBot-Interfaces # Copyright (c) Drakkar-Software, All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 3.0 of the License, o...
Python
1
# -*- coding: utf-8 -*- """ Created on Tue Mar 17 14:17:00 2020 @author: vetur """ # decision tree # Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importing the dataset dataset = pd.read_csv('Social_Network_Ads.csv') X = dataset.iloc[:, [2, 3]].values y = dataset.i...
Python
1
import pysolr import os import json import requests ##### Cette fonction permet de récupèrer les 1000 premiers documents pour chaque requête import requests def executer_requete_pour_trec_eval(solr_url, collection_name, schema, requete, query_id, type_requete:str): #schema = "text_tfidf_no_preprocessing" ...
Python
1
""" Core pretraining components. """
Python
1
_base_ = [ '_base_/models/denseclip_r50.py', '_base_/datasets/potsdam.py', '_base_/default_runtime.py', '_base_/schedules/schedule_80k.py' ] model = dict( type='DenseCLIP', pretrained='pretrained/RN50.pt', context_length=8, text_head=False, tsne=False, backbone=dict( type='CLIP...
Python
1
# Copyright 2019 Canonical Ldt. # # 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 applicable law or agreed to in writin...
Python
1
from hera.shared import global_config from hera.workflows import Input, Output, Workflow global_config.experimental_features["script_annotations"] = True global_config.experimental_features["script_pydantic_io"] = True global_config.experimental_features["decorator_syntax"] = True w = Workflow(generate_name="my-work...
Python
1
4_TSIZ {} #[doc = "Device OUT Endpoint x+1 Transfer Size Register"] pub mod doep4_tsiz; #[doc = "Device OUT Endpoint x+1 DMA Address Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Re...
Rust
0
name) polydatawriter.SetInputData(surf) polydatawriter.Write() print("Eroding...") post_process.ErodeLabel(surf, real_labels, -1, ignore_label=0) print("Writing:", args.out) polydatawriter.SetFileName(args.out) polydatawriter.SetInputData(surf) polydatawriter.Write() teeth_surf = post_process.Threshold(surf, real_la...
Python
1
"""ResNet models for Keras. # Reference paper - [Deep Residual Learning for Image Recognition] (https://arxiv.org/abs/1512.03385) (CVPR 2016 Best Paper Award) # Reference implementations - [TensorNets] (https://github.com/taehoonlee/tensornets/blob/master/tensornets/resnets.py) - [Caffe ResNet] (https://githu...
Python
1
build().fuse(); /// let logger = slog::Logger::root(drain, slog_o!("version" => env!("CARGO_PKG_VERSION"))); /// /// let _scope_guard = slog_scope::set_global_logger(logger); /// let _log_guard = slog_stdlog::init().unwrap(); /// // Note: this `info!(...)` macro comes from `log` crate /// info!("sta...
Rust
0
from typing import Optional import torch from torch.types import Device as _device_t def _get_device_index(device: _device_t, optional: bool = False) -> int: if isinstance(device, int): return device if isinstance(device, str): device = torch.device(device) device_index: Optional[int] = N...
Python
1
__all__ = [ "router", ] from typing import Annotated, List, Optional from uuid import UUID from fastapi import APIRouter, Depends, File, Form, UploadFile from nolabs.application.ligands.api_models import ( LigandContentResponse, LigandMetadataResponse, LigandSearchContentQuery, LigandSearchMetada...
Python
1
_key_store_with_key(&private_key, &self_cert); let csp = Csp::of(dummy_csprng(), sks); let acceptor_no_auth = csp.tls_acceptor(self_cert, None).unwrap(); assert_eq!( acceptor_no_auth.context().verify_mode(), SslVerifyMode::NONE ); } #[tokio::test] async fn should_return_create_accepto...
Rust
0
# -*- coding: utf-8 -*- # Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS P...
Python
1
otated log files formatter = logging.Formatter('%(asctime)s| %(message)s', datefmt='%m/%d %I:%M:%S') rootLogger = logging.getLogger() rootLogger.setLevel(level=logLevel) logFilename = vintelLogDirectory + "/output.log" fileHandler = RotatingFileHandler(maxBytes=(1048576*5), back...
Python
1
Self { pitch, bank } } pub fn pitch_rotation_transform(&self) -> Rotation3<f64> { Rotation3::from_axis_angle(&Vector3::x_axis(), self.pitch.get::<radian>()) } pub fn bank_rotation_transform(&self) -> Rotation3<f64> { Rotation3::from_axis_angle(&Vector3::z_axis(), -self.bank.get::<r...
Rust
0
).last_index; let region = cluster.get_region(b"k1"); let (tx, rx) = mpsc::sync_channel(1); cluster.split_region( &region, b"k1", Callback::write(Box::new(move |resp| tx.send(resp.response).unwrap())), ); assert_disk_full(&rx.recv_timeout(Duration::from_secs(2)).unwrap()); ...
Rust
0
# coding=utf-8 # Copyright 2023 Authors: Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, # Kaitao Song, Ding Liang, Tong Lu, Ping Luo, Ling Shao and The HuggingFace Inc. team. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with...
Python
1
(0x1D37, "M", "k"), (0x1D38, "M", "l"), (0x1D39, "M", "m"), (0x1D3A, "M", "n"), (0x1D3B, "V"), (0x1D3C, "M", "o"), (0x1D3D, "M", "ȣ"), (0x1D3E, "M", "p"), (0x1D3F, "M", "r"), (0x1D40, "M", "t"), (0x1D41, "M", "u"), (0x1D42, "M", "w"...
Python
1
nums[j] = num; j += 1; } } } } //leetcode submit region end(Prohibit modification and deletion) #[cfg(test)] mod tests { use super::*; #[test] fn test() { let mut nums = vec![0, 1, 0, 3, 12]; Solution::move_zeroes(&mut nums); assert...
Rust
0
let (acc_sender, acc_receiver): (Sender<KeyEvent>, Receiver<KeyEvent>) = mpsc::channel(); let (event_sender, event_receiver): (Sender<KeyEvent>, Receiver<KeyEvent>) = mpsc::channel(); let acc_thread_running = thread_running.clone(); let pressed_event_sender = event_sender.clone(); let...
Rust
0
// tinySizeClass = _TinySizeClass // maxSmallSize = _MaxSmallSize // // pageShift = _PageShift // pageSize = _PageSize // pageMask = _PageMask // // By construction, single page spans of the smallest object class // // have the most objects per span. // maxObjsPerSpan = pageSize / 8 // // mSpanInUse = _MSp...
Rust
0
str ) -> IResult<&'a str, Range<T>, E> { range(integer::<T, E>)(i) } fn natural_range<'a, T: std::str::FromStr, E: ParseError<&'a str>>( i: &'a str ) -> IResult<&'a str, Range<T>, E> { range(natual::<T, E>)(i) } fn float_range<'a, E: ParseError<&'a str>>(i: &'a str) -> IResult<&'a str, Range<f32>, E> { range(floa...
Rust
0
pty()"); *empty_res.l().unwrap() } } } ); ffi_export!( fn Java_com_horizen_commitmenttree_CommitmentTree_nativeAddCsw( _env: JNIEnv, _commitment_tree: JObject, _sc_id: jbyteArray, _amount: jlong, _nullifier: jbyteArray, _mc_pk...
Rust
0
# -*- coding: utf-8 -*- """ Created on Wed Jun 14 20:02:18 2023 @author: Admin """ # -*- coding: utf-8 -*- """ Created on Mon Oct 31 13:42:07 2022 @author: Admin """ import numpy as np import matplotlib.pyplot as plt #---------------initial parameters-------------------------------------------- ROC=600 ...
Python
1
x03\x22\xabQ\xb9\xbe\xeb\xfei\x85\xe5\x9f\ 9\xd8\xe1\xfa$\x81\x7f\xf0\xe4\x02q\xb7\xd5\xb1\xee\xdd\ [N\x0f\x06\x97`\xc5\xc1\xe3@\x17v\xac0\xc6\xac\ \xba\xac\x06YNn\xd6Z\x974\xb5\x0c\xcb\xd5.\xd7\ q\xb6~\x8f\xbd\xc4\x0aK\xfd 5\x85\x02OH\x88\ \xe7\x1dK\xdf\xac1\xd7t-#\xb1Q\xc3a\xf4)\ \x90\x15\xa0\xd3\x1b\x85h\xcfq\xb2\x0...
Python
1
+btw|" r"factuur\s+bedrag\s+\(EUR\)\s?|totaal\s+verschuldigd|totaalbedrag\s+in\s+euro|" r"prijs\s+incl\.\s+btw|totaal\s+bedrag\s+incl\.\sbtw|te\s+betalen|factuurbedrag|" r"factuur\s+bedrag|totaalbedrag\s+in\s+euro's|totaal\s+\(incl\.\s+BTW\)\s+€)\b[:\s]*" r"([€,$]?\s*(?:E...
Python
1