text
string
label_name
string
labels
int64
import os from dotenv import load_dotenv from notifications.services import bot from scrape.instascraper import InstaScraper from models import Post from database import db from scrape.tags_settings import * load_dotenv() INSTA_USERNAME = os.getenv("INSTA_USERNAME") INSTA_PASSWORD = os.getenv("INSTA_PASSWORD") ...
Python
1
if ENCRYPTION_ENABLED { Some(KeyId::Master) } else { None } } fn collection_name() -> Result<CollectionName, InvalidNameError> { CollectionName::new("khonsulabs", "tls-certificates") } fn define_views(schema: &mut Schematic) -> Result<(), bonsaidb_cor...
Rust
0
.\n\nFor information about available fields see [stat0](stat0) module"] pub type STAT0 = crate::Reg<u32, _STAT0>; #[allow(missing_docs)] #[doc(hidden)] pub struct _STAT0; #[doc = "`read()` method returns [stat0::R](stat0::R) reader structure"] impl crate::Readable for STAT0 {} #[doc = "`write(|w| ..)` method takes [sta...
Rust
0
from django.contrib import admin from django.utils.html import format_html from .models import Clinic, ClinicService, ClinicServiceImage from users.models import UserProfile class ClinicServiceImageInline(admin.TabularInline): model = ClinicServiceImage extra = 1 readonly_fields = ("preview",) def p...
Python
1
## BRAINROT TRANSLATOR ## Version 1.0 ## August 31, 2024 ## A program by Logan Hanson ## lwhanson04@gmail.com ## If any of this is useful to you at all, feel free to go ahead and use it ## I just ask that you give me a bit of credit if you do ## Have fun! import re import random random.seed() regex = r"\b((G|...
Python
1
class Solution: def singleNumber(self, nums: List[int]) -> int: single_num = 0 for i in nums: single_num ^= i return single_num
Python
1
o_info.iterrows(): vpath, vlen = row if vlen-self.num_seq*self.seq_len*self.downsample <= 0: drop_idx.append(idx) self.video_info = video_info.drop(drop_idx, axis=0) if mode == 'val': self.video_info = self.video_info.sample(frac=0.3) def idx_sa...
Python
1
set_reg_a: false, mode_arg_b: OpArgMode::U, mode_arg_c: OpArgMode::N, typ: OpType::ABC }, OpProp { name: "SETTABLE", is_test: false, set_reg_a: false, mode_arg_b: OpArgMode::K, mode_arg_c: OpArgMode::K, typ: OpType::ABC }, OpProp { name: "SETTABLEKS", is_test: false, set_reg_a: false, mode_arg_b: OpArgMode::K, ...
Rust
0
_ipred_cfl_left_8bpc_neon, PredictionVariant::TOP => rav1e_ipred_cfl_top_8bpc_neon, PredictionVariant::BOTH => rav1e_ipred_cfl_8bpc_neon, })(dst_ptr, stride, edge_ptr, w, h, ac_ptr, angle); } _ => call_rust(dst), }, PixelType::U16 if bit_depth > 8 => match m...
Rust
0
lap[1] - lap[0]) laplist.append(tmp) tmp = minidom.parseString(ET.tostring(rut)).toprettyxml(indent=" ") file.write(tmp.encode('utf-8')) return laps_path, tag def saveLaps(path, laps_data, tag): if not tag: tag = 'l' for i, lap in enumerate(laps_data): lap.to_c...
Python
1
_default] pub(crate) current: bool, #[prop_or_default] pub(crate) onselect: Callback<()>, } #[derive(Clone, Copy, Debug)] pub enum TabRouterItemMsg { Clicked, } pub struct TabRouterItem<R> where R: Switch + PartialEq, { _marker: PhantomData<R>, } impl<R> Component for TabRouterItem<R> where ...
Rust
0
Eq)] pub enum IC3FR { #[doc = "No filter, sampling is done at fDTS"] NOFILTER, #[doc = "fSAMPLING = fCK_INT, N = 2"] FCK_INT_N2, #[doc = "fSAMPLING = fCK_INT, N = 4"] FCK_INT_N4, #[doc = "fSAMPLING = fCK_INT, N = 8"] FCK_INT_N8, #[doc = "fSAMPLING = fDTS / 2, N = 6"] FDTSDIV2_N6, #[doc = "fSAMPL...
Rust
0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, fields, _ from odoo.exceptions import UserError from odoo.tools import html_escape class ResConfigSettings(models.TransientModel): _inherit = "res.config.settings" l10n_in_edi_ewaybill...
Python
1
ed">${{newText}}</span>`; }} // 否則嘗試單詞級別差異 return generateWordLevelDiff(oldText, newText); }} // 計算文字相似度 function calculateSimilarity(str1, str2) {{ const longer = str1.length > str2.length ? str1 : str2; const shorter = s...
Python
1
om google.cloud in pandas_execution_engine.py", ) @pytest.mark.big def test_get_batch_data_with_gcs_batch_spec_no_credentials(gcs_batch_spec, monkeypatch): # If PandasExecutionEngine contains no credentials for GCS, we will still instantiate _gcs engine, # noqa: E501 # FIXME CoP # but will raise Exception when...
Python
1
pub type DefaultSpawner = NativeSpawner; /// The default task spawner used by Retrace if the parameter is omitted. /// /// This is currently [`NativeSpawner`] if `feature = "std"` is enabled, or /// [`DropSpawner`] if not. #[cfg(not(feature = "std"))] pub type DefaultSpawner = DropSpawner; /// Trait for any spawner ...
Rust
0
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayTradeScenepaySharecodetestCreateResponse(AlipayResponse): def __init__(self): super(AlipayTradeScenepaySharecodetestCreateResponse, self).__init__() self._biz_t...
Python
1
, max: Option<Bound<'a, (IK, PK)>>, order: Order, ) -> Box<dyn Iterator<Item = Vec<u8>> + 'c> { self.no_prefix_raw().keys_raw(store, min, max, order) } /// While `range_raw` over a `prefix` fixes the prefix to one element and iterates over the /// remaining, `prefix_range_raw` a...
Rust
0
lass MissingHashes(Hashes): """A workalike for Hashes used when we're missing a hash for a requirement It computes the actual hash of the requirement and raises a HashMissing exception showing it to the user. """ def __init__(self): # type: () -> None """Don't offer the ``hashes``...
Python
1
pub fn new(pos: Vec3d, obj: T) -> Self { return Self { position: pos, subobj: obj, tag: (), }; } } impl<'de, T> Raymarchable for Translate<T> where T: Raymarchable + Sized + Serialize + Deserialize<'de>, { fn normal_at(&self, point: Vec3d, dir: Vec3d) -...
Rust
0
input. fn calculate_score(_desired: &str, key: &str) -> usize { for truncate in 0.._desired.len() { let snip_size = _desired.len() - truncate; let truncated = &_desired[0..snip_size]; if let Some(pos) = key.find(truncated) { return (47 - pos) + (snip_size * 48); } } 0 } pub(super) fn generate_key<C: Cry...
Rust
0
: i32) -> i32; pub fn dx_FileRead_open(FilePath: *const i8, ASync: i32) -> i32; pub fn dx_FileRead_open_WithStrLen( FilePath: *const i8, FilePathLength: usize, ASync: i32, ) -> i32; pub fn dx_FileRead_open_mem(FileImage: *const libc::c_void, FileImageSize: usize) -> i32; pub ...
Rust
0
import requests def test_error_invalid_term(): x = requests.get('http://127.0.0.1:8000/followups/getFollowups/COMP1511/&&') assert x.status_code == 400 def test_error_not_comp_course(): x = requests.get('http://127.0.0.1:8000/followups/getFollowups/MATH1081/T2') assert x.status_code == 400 def t...
Python
1
# File generated from our OpenAPI spec by Stainless. from typing import List, Optional from ..._models import BaseModel __all__ = ["ChatCompletionTokenLogprob", "TopLogprob"] class TopLogprob(BaseModel): token: str """The token.""" bytes: Optional[List[int]] = None """A list of integers representi...
Python
1
import numpy as np from pythonosc.dispatcher import Dispatcher from pythonosc import osc_server import serial import time striker_controller = serial.Serial('/dev/tty.usbmodemFFFFFFFEFFFF1', baudrate=115200, timeout=0.1) def handle_strike(addr, id, velocity): id_code = 1 << id msg = f"s{chr(id_code - 1)}{chr...
Python
1
status_code=401, detail="Invalid credentials or unable to authenticate", ) finally: return return_schema # ------------------------------------------------- async def export_rcg01_uejp_from_db( self, ejercicio: int = None ) -> StreamingRespon...
Python
1
.get_value(), offset=-1)) background.set_value(self._settings.read_setting("background") or 0) background.subscribe(self._settings.write_setting, "background") background.subscribe(lambda v: self._application.hold() if v else self._application.release()) startup.subscribe(self._handle_...
Python
1
from talipp.indicator_util import composite_to_lists from talipp.indicators import EMA, SMA, Stoch from talipp.ohlcv import OHLCVFactory # EMA indicator ([float] -> [float]) ema = EMA(period = 3, input_values = [1, 3, 5, 7, 9, 2, 4, 6, 8, 10]) # treat indicators as any other list print(f'EMA(3): {ema}') # [3.0, 5.0, ...
Python
1
frames = a.frames b.root.rotation = np.zeros(shape=(b.frames, 3)) bvhsdk.WriteBVH(b, path=savepath, name=f.replace('.bvh', ''), frametime=b.frametime) if __name__ == '__main__': parser = ArgumentParser() parser.add_argument('--data_dir', type=str, default='./dataset/BRG-Unicam...
Python
1
import asyncio PROXY_PORT = 8022 IP_FILE = '/opt/Virtuno/current_vm_ip.txt' async def handle_connection(reader, writer): try: with open(IP_FILE, 'r') as f: dest_ip = f.read().strip() print(f'🔁 Redirecionando ligação para {dest_ip}:{PROXY_PORT}') # Liga ao destino ...
Python
1
scale((FinishedJiejie.x_offset, FinishedJiejie.y_offset), constants.WINDOW_ATTRIBUTES) finished_x = self.region[0] + finished_x finished_y = self.region[1] + finished_y self.finished = pyautogui.pixelMatchesColor(finished_x, finished_y, FinishedJiejie.color, tolerance=15) if self.finishe...
Python
1
yExit, ) -> Result<BeaconState<MainnetEthSpec>, BlockProcessingError> { self::voluntary_exit::process_voluntary_exit(beaconstate, exit, unsafe { DEBUG }) } <gh_stars>0 use crate::de::{deserialize_homogeneous_composite, Deserialize, DeserializeError}; use crate::merkleization::{ merkleize, mix_in_length, pack, M...
Rust
0
] right = \"KosuzuTachie1\" left = \"NitoriTachieSunGlass\" [scenario-group.default-text-attribute] fpc = 2.0 font_scale = 32.0 color = 0x000000ff [[scenario-group.text]] text_src_path = \"./resources/scenario/7_23/1.txt\" [[scenario-group]] type = \"scenario\" id = 202 next-id = 203 background = \...
Rust
0
.. } => {} err => panic!("Unexpected error: {:?}", err), } } #[test] fn ok() { let mut serial = Serial::builder() .expect_write(b"a0\r#") .respond(b"a3\r ") .build(); let status = status(&mut serial, 0).unwrap(); assert_eq!(...
Rust
0
{ let expected_events = vec![ EventMatcher::new() .expect_type::<CapabilityRouted>() .expect_moniker("./session:session:*") .expect_capability_id("elf"), EventMatcher::new() .expect_type::<CapabilityRouted>() ...
Rust
0
str(capname.as_ptr()) as *mut i8).as_mut().map(|ptr| FromCStr::from_c_str(ptr)) } } /// <https://invisible-island.net/ncurses/man/curs_inopts.3x.html> pub fn timeout(delay: i32) { assert!(delay >= -1, "{}timeout() : delay = {}", MODULE_PATH, delay); unsafe { bindings::timeout(delay) } } /// # Safety /// /// ...
Rust
0
#!/usr/bin/env python # Copyright (c) 2023-2025 Arista Networks, Inc. # Use of this source code is governed by the Apache License 2.0 # that can be found in the LICENSE file. # coding: utf-8 -*- # # Copyright 2022 Arista Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this...
Python
1
# Python For Offensive PenTest: A Complete Practical Course By Hussam Khrais - All rights reserved # Follow me on LinkedIn https://jo.linkedin.com/in/python2 import os # needed for getting working directory import shutil # needed for file copying import subprocess # needed for getting user p...
Python
1
, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}", self) } } #[derive(Serialize, Deserialize, Error, Debug, Clone)] pub enum QPError { #[error("{algorithm} exceded maximum number of iterations. Last known solution had function value {fval} and first order condition {first_order_cond}")] ...
Rust
0
def bellman_ford(graph, nodes, src): dist = [float("Inf")] * nodes dist[src] = 0 for _ in range(nodes - 1): for a, b, c in graph: if dist[a] != float("Inf") and dist[a] + c < dist[b]: dist[b] = dist[a] + c for a, b, c in graph: if dist[a] != float("Inf") and d...
Python
1
quarternote", u"♩"), ("\\measangleldtosw", u"⦫"), ("\\RightVectorBar", u"⥓"), ("\\vysmblksquare", u"⬝"), ("\\bscrz", u"𝔃"), ("\\frakJ", u"𝔍"), ("\\lgwhtsquare", u"⬜"), ("\\sansf", u"𝖿"), ("\\bsansvarepsilon", u"𝞊"), ("\\bfnine", u"𝟗"), ("\\upharpoonleft", u"↿"), ("\\sansl", u"𝗅"), ("\\wedg...
Python
1
crate) kind: RuntimeKind, } #[derive(Clone, Debug, Copy)] pub(crate) enum RuntimeKind { Smol, #[cfg(feature = "tokio-support")] Tokio, } impl Default for RuntimeKind { fn default() -> Self { RuntimeKind::Smol } } impl Default for SharedHeader { fn default() -> Self { let wheel_...
Rust
0
#!/usr/bin/env python3 """ Smart File Organizer - GUI Launcher This script launches the GUI interface directly when the executable is double-clicked. """ import sys import os import tkinter as tk from tkinter import messagebox # Add the project root to the Python path project_root = os.path.dirname(os.path.abspath(__...
Python
1
# 1) შექმენით ხუთი ცვლადი და გამოიყენეთ ეს ცვლადები რომ შეადგინოთ წინადადება # 2) დაარქვით ამ ცვლადებს snake_case სინტაქსით first_name = "Gvanca" surname = "Mazanishvili" hobby = "Music" favorite_colour = "Navy blue" print (F" Hello, my name is {first_name} and my surname is {surname} my hobby is {hobby} and my fav...
Python
1
ill immutable. //Unlike Rc<T>, the RefCell<T> type represents single ownership over the data it holds. //With references and Box<T>, the borrowing rules’ invariants are enforced at compile time. //With RefCell<T>, these invariants are enforced at runtime. //With references, if you break these rules, you’ll get a compi...
Rust
0
"""distutils.command.clean Implements the Distutils 'clean' command.""" # contributed by Bastian Kleineidam <calvin@cs.uni-sb.de>, added 2000-03-18 import os from distutils.core import Command from distutils.dir_util import remove_tree from distutils import log class clean(Command): description = "clean up te...
Python
1
ror: log.error("❌ 錯誤: 找不到 tree_demo_server.py。請確保它在專案根目錄下。") except Exception as e: log.error(f"❌ 啟動 NanoOwl 伺服器失敗: {e}") # ========================================================== # --- 核心組件裝配 --- # 【v4.3.2 修改】 更新變數名,並傳入 state sim, observation_manager, terrain_manager, floating_c...
Python
1
from mmdet.core.bbox import AssignResult, BaseAssigner, MaxIoUAssigner from .hungarian_assigner import HungarianAssigner3D, HeuristicAssigner3D __all__ = ["BaseAssigner", "MaxIoUAssigner", "AssignResult", "HungarianAssigner3D", "HeuristicAssigner3D"]
Python
1
simulator.get_dosage_at(&random_point)); write_random_samples( get_first_arg().unwrap_or(String::from("data.csv")), get_random_samples(point_source_simulator, NUMBER_OF_SAMPLES)); */ // Line source simulation // Simulator for point source let mut line_source_simulator = Simulator::new(space, 1...
Rust
0
Jungle = 78, LowerKurast = 79, KurastBazaar = 80, UpperKurast = 81, KurastCauseway = 82, Travincal = 83, SpiderCave = 84, SpiderCavern = 85, SwampyPitLevel1 = 86, SwampyPitLevel2 = 87, FlayerDungeonLevel1 = 88, ...
Rust
0
db.put("abz".as_bytes(), "xyz".as_bytes()).unwrap(); assert_eq!(4, db.mem.len()); let mut imm = MemTable::new(db.opt.cmp.clone()); mem::swap(&mut imm, &mut db.mem); db.imm = Some(imm); db.compact_memtable().unwrap(); eprintln!( "children after: {:?}", ...
Rust
0
rom(high) << 32) | u64::from(low)) as i64) } crate::TypeInner::Scalar { kind: crate::ScalarKind::Float, width } => { let low = self.next()?; let extended = match width { 32 => f64::from(f32::from_bits(low)), 64 => { ...
Rust
0
from typing import List, NamedTuple, Any import numpy as np import cv2 import torch from safetensors.torch import load_file from diffusers import UNet2DConditionModel from diffusers.models.unet_2d_condition import UNet2DConditionOutput import library.model_util as model_util class ControlNetInfo(NamedTuple): unet...
Python
1
, receiver) = oneshot::channel(); ap_iface_container.config = Some(config.clone()); match ap_iface_container.ap_state_machine.start(config, sender) { Ok(()) => self.aps.push(ap_iface_container), Err(e) => { let mut phy_manager = self.phy_manager.lock().await; ...
Rust
0
1,2]"); let b = Number::new("[[3,4],5]"); let c = a.add_no_reduce(b); assert_eq!(c, Number::new("[[1,2],[[3,4],5]]")); } #[test] fn test_add() { let num0 = Number::new("[[[[4,3],4],4],[7,[[8,4],9]]]"); let num1 = Number::new("[1,1]"); let result = num0.add(...
Rust
0
usually that is your base domain name) #[structopt(long = "zone", short = "z", required_unless = "config")] zone: Option<String>, /// The domain for which you want to report the current IP address #[structopt(long = "domain", short = "d", required_unless = "config")] domain: Option<String>, //...
Rust
0
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program 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 2 # of the License, or (at your option) any later version. # # This program is distrib...
Python
1
r i, (x_min, y_min, x_max, y_max) in enumerate(crop_coordinates): print(f"Box {i+1}: RGB - ({x_min}, {y_min}) to ({x_max}, {y_max})") # # Visualize the cropped regions on both RGB and depth images # for i, (rgb_crop, depth_crop) in enumerate(zip(cropped_rgb_images, cropped_depth_images)): # plt.figure(figsize=...
Python
1
class Solution(object): def strStr(self, haystack, needle): """ :type haystack: str :type needle: str :rtype: int """ #Metoda Simpla #return haystack.find(needle) #a doua netida sunoka # return haystack.index(needle) if needle in haystack e...
Python
1
deltaA = exp(mul_delta_A(delta.unsqueeze(-1), A)) # (B, L, ED, N) deltaB = mul_delta_B(delta.unsqueeze(-1), B.unsqueeze(2)) # (B, L, ED, N) BX = mul_deltaB_x(deltaB, (x.unsqueeze(-1))) # (B, L, ED, N) hs = pscan(deltaA,BX) # h = torch.zeros(x.size(0), self.config.d_inner, self.conf...
Python
1
annotator = klass(self.precedence) self.ranking_annotators.append(annotator) @property def _qs_tiebreak_field(self): return self.QUERYSET_TIEBREAK_FIELDS.get(self.options["tiebreak"]) @property def _tiebreak_func(self): return self.TIEBREAK_FUNCTIONS[self.options["tiebreak...
Python
1
return self._LevelId @LevelId.setter def LevelId(self, LevelId): self._LevelId = LevelId def _deserialize(self, params): self._RuleId = params.get("RuleId") self._LevelId = params.get("LevelId") memeber_set = set(params.keys()) for name, value in vars(self).it...
Python
1
""" """ from lumo import Params params = Params() params.from_args() print(params) params.epoch = 400 params.batch_size = 25 print(params) from lumo import Params class MyParams(Params): def __init__(self): super().__init__() self.batch_size = 50 self.topk = (1,2,3,4) self.optim...
Python
1
// "quantize.cu" .whitelist_function("anode_gpu_dequantize_u8_packed_f32") // "softmax.cu" .whitelist_function("anode_gpu_softmax_packed_block_f32") .whitelist_function("anode_gpu_softmax_packed_deterministic_f32") .whitelist_function("anode_gpu_softmax_cat_nll_packed_f32") .w...
Rust
0
detail::open(c_path.as_ptr(), flags); } if fd == -1 { Err(io::Error::last_os_error()) } else { Ok(fd) } } /// A convenience wrapper around v4l2_close. /// /// In case of errors, the last OS error will be reported, aka errno on Linux. /// /// # Arguments /// /// * `fd` - File descripto...
Rust
0
"), YearBegin(1, month=11), "America/Chicago", ), ], ) def test_nontick_offset_with_ambiguous_time_error(original_dt, target_dt, offset, tz): # .apply for non-Tick offsets throws AmbiguousTimeError when the target dt # is dst-ambiguous localized_dt = original_dt.tz_locali...
Python
1
nnected"); } else { warn!("other channel error: {:?}", err); } } } } } <gh_stars>10-100 // Copyright 2020 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENS...
Rust
0
. When an object is moved, the person may observe its new location if they saw it move. To see where an object ends up, they must be able to see the location that it moves to and not be too distracted by what they are doing. If they do not observe the object moving, then they will still believe it to be in the last lo...
Python
1
_labels); println!("{} {:.2}%", epoch_idx, 100. * f64::from(test_accuracy)); } Ok(()) } <reponame>jacobmarble/influxdb_iox<gh_stars>0 //! This module contains the main IOx Database object which has the //! instances of the mutable buffer, read buffer, and object store use std::any::Any; use std::{ ...
Rust
0
ove(self.update, self.element); dispmanx::element_remove(self.update, self.bg_element); dispmanx::update_submit_sync(self.update); // "Update" cannot be deleted? if !dispmanx::display_close(self.dispman_display) { println!("Display shutdown successful."); } else { ...
Rust
0
TestResultType::Pass), ("dEQP-VK.fragment_shader_interlock.basic.discard.ssbo.shading_rate_unordered.4xaa.sample_shading.512x512", TestResultType::NotSupported), ("dEQP-VK.fragment_shader_interlock.basic.discard.ssbo.shading_rate_unordered.4xaa.sample_shading.1024x1024", TestResultType::NotSupp...
Rust
0
import FWCore.ParameterSet.Config as cms from CalibPPS.TimingCalibration.PPSDiamondSampicTimingCalibrationPCLWorker_cfi import PPSDiamondSampicTimingCalibrationPCLWorker from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer MEtoEDMConvertPPSDiamondSampicTimingCalib = cms.EDProducer('MEtoEDMConverter', Name = c...
Python
1
""" License: PyIIDES Copyright 2024 Carnegie Mellon University. NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING INSTITUTE MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED ...
Python
1
pub async fn test_read(server: &VaultServer<'_>, endpoint: &PKIEndpoint) { let res = role::read( &server.client, endpoint.path.as_str(), endpoint.role.as_str(), ) .await; assert!(res.is_ok()); assert!(res.unwrap().allow_any_name) } pu...
Rust
0
from __future__ import annotations import asyncio import atexit import warnings from unittest.mock import AsyncMock, MagicMock, patch import pytest # 忽略协程未等待的警告 warnings.filterwarnings("ignore", message="coroutine '.*' was never awaited") from uglychain.tools.core import Tool from uglychain.tools.core.tool_manager ...
Python
1
# Copyright (C) 2022-2025 Intel Corporation # LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE from subprocess import CalledProcessError, TimeoutExpired import pytest from checks.errors import CheckSkipped, LocalOSCheckWarning from checks.os import check_os_version from configuration_models.install_config import Installat...
Python
1
x * x * x * x * (1. - 3. * x * x * x).powf(1.5) / 4. - 1. * (1. - x).powf(1.5) / 4. }), roots: vec![0.55158615249704711724768527], guesses: vec![0.5], brackets: vec![Bounds::new(0.0, 0.69)], }, ] } /// ...
Rust
0
Token { supply: minted.balance(&minted_color), minted_by: ctx.caller(), owner: ctx.caller(), created: ctx.timestamp(), updated: ctx.timestamp(), description: f.params.description().value(), user_defined: f.params.user_defined().value(), }; if token.descri...
Rust
0
.take() { // Get waker from task. let waker = waker_ref(&task); // Poll the future. let context = &mut Context::from_waker(&*waker); if let Poll::Pending = future.as_mut().poll(context) { *future_slot = Some(future); } } ...
Rust
0
=False, activation=F.relu, dropout_probability=dropout_probability, use_batch_norm=use_batch_norm, ) elif base_transform_type == "rq-autoregressive": return transforms.MaskedPiecewiseRationalQuadraticAutoregressiveTransform( features=features, ...
Python
1
from Classes.bd_pop import Banco_projeto banco = Banco_projeto("projeto.sqlite") coluna = "nome, valor" nome_tabela = "Estoque" banco.criar_tabela(nome_tabela, "id INTEGER PRIMARY KEY AUTOINCREMENT, nome TEXT, valor FLOAT") decisao = 12 while decisao != 0: decisao = int(input(""" 1-Criar produto 2-Vende...
Python
1
def get_clip_embeddings(self, clip_txt_pooled, clip_txt=None, clip_img=None): if len(clip_txt_pooled.shape) == 2: clip_txt_pool = clip_txt_pooled.unsqueeze(1) clip_txt_pool = self.clip_txt_pooled_mapper(clip_txt_pooled).view( clip_txt_pooled.size(0), clip_txt_pooled.size(1) * self.config. ...
Python
1
l_signal, pub new_subsurface: wl_signal, pub destroy: wl_signal, } /* * This an unstable interface of wlroots. No guarantees are made regarding the * future consistency of this API. */ // enum wlr_surface_state_field // relative to previous position // clipped to bounds // wl_resource // in surface-local coo...
Rust
0
out.append(self.embedder(torch.Tensor([width]))) out.append(self.embedder(torch.Tensor([crop_h]))) out.append(self.embedder(torch.Tensor([crop_w]))) out.append(self.embedder(torch.Tensor([aesthetic_score]))) flat = torch.flatten(torch.cat(out)).unsqueeze(dim=0).repeat(clip_pooled...
Python
1
esults if __name__ == "__main__": paths = sys.argv[1:] override_cache = False if "--override-cache" in paths: override_cache = True paths.remove("--override-cache") items = [] for i, path in enumerate(paths): path = Path(path) items.extend( gather( ...
Python
1
ite-api).\n\nFor information about available fields see [rf_reg10](rf_reg10) module"] pub type RF_REG10 = crate::Reg<u32, _RF_REG10>; #[allow(missing_docs)] #[doc(hidden)] pub struct _RF_REG10; #[doc = "`read()` method returns [rf_reg10::R](rf_reg10::R) reader structure"] impl crate::Readable for RF_REG10 {} #[doc = "`...
Rust
0
AUXIO17 = 17, #[doc = "16: AUX_EVCTL:EVSTAT1.AUXIO16"] AUXIO16 = 16, #[doc = "15: AUX_EVCTL:EVSTAT0.AUXIO15"] AUXIO15 = 15, #[doc = "14: AUX_EVCTL:EVSTAT0.AUXIO14"] AUXIO14 = 14, #[doc = "13: AUX_EVCTL:EVSTAT0.AUXIO13"] AUXIO13 = 13, #[doc = "12: AUX_EVCTL:EVSTAT0.AUXIO12"] AU...
Rust
0
#!/usr/bin/python # -*- coding: UTF-8 -*- """ Search for decode string and call the right decoder function @author: Jens Herrmann @requires: none """ import logging # Global logger def decode(freq, decoded): """ Search for decode string and call the right decoder function @type freq: string @param freq: ...
Python
1
step(batch) losses += lvalue n_tokens += toks steps += 1 mx.eval(state, losses, n_tokens) train_time += time.perf_counter() - tic # Report training loss if needed if it % args.steps_per_report == 0 or it == args.iters: train_loss = mx.distributed.all_...
Python
1
frq8j if '' if cb4ip4jhsuu for iw01ahd8rzv in None if xnqsda4hdo9 if amvbc4q1ds5} def ffz7uht8935(fu9lcighbu7: rjks2bzsbp6='', a12d3ijdms7=None, fw7ikz8lc0i: t27ss4k4ogo=0, npig0c_pvg2=0j): None.c5_71wjczsl: False = ng7y4_jp9nq '# documentation_contrast_horizon -> wait_junctions_buzzer' b'' '# documenta...
Python
1
4 /// [Rust]: LLVMBuildSIToFP si_to_fp, LLVMBuildSIToFP /// Creates a [`ptrtoint <value> to <dest_ty>`][langref] instruction. /// /// Corresponds to `CreatePtrToInt` ([C++][C++]) and `LLVMBuildPtrToInt` ([C][C], [Rust][Rust]). /// /// [langref]: https://releases.llvm.org/8.0.1/docs/LangRef....
Rust
0
read set.") } Transaction::UserTransaction(txn) => match txn.payload() { TransactionPayload::ModuleBundle(_) | TransactionPayload::Script(_) | TransactionPayload::ScriptFunction(_) => { bail!("Write set should be a subset of read set.") } ...
Rust
0
# Single Function: Perform the CVM algorighm on a random source list. from random import randint, random # & Simple CVM Algo # Variables # source_list = debug_source_list = [1,2,3,4,5,6,7,8,9,10] source_list = debug_source_list = [1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10] memory_limit = 5 probability_factor = 1 prob...
Python
1
, ip_Addr_IR(-7i32 as u32, r10), w_r9), "450FBF4AF9", "movswl -7(%r10), %r9d", )); insns.push(( i_MovSX_M_R(ExtMode::WL, ip_Addr_IR(-7i32 as u32, r11), w_rdx), "410FBF53F9", "movswl -7(%r11), %edx", )); insns.push(( i_MovSX_M_R(ExtMode::WQ, ip_Addr_IR(-7...
Rust
0
* 2.0 * std::f64::consts::PI; pub const MINOR_RADIUS_IN_METER: f64 = -( FLATTENING - 1.0 ) * MAJOR_RADIUS_IN_METER; pub const LATITUDE_MAX_IN_METER: f64 = 9_968_431.031_9; }// WARNING: this file is auto-generated by xtask gen and may be overwritten use super::*; pub const NOT_SET : HResultError = HResultError::f...
Rust
0
coder-single-nq-base" model = DPRReader.from_pretrained(model_name) self.assertIsNotNone(model) @require_torch class DPRModelIntegrationTest(unittest.TestCase): @slow def test_inference_no_head(self): model = DPRQuestionEncoder.from_pretrained("facebook/dpr-question_encoder-single-nq-b...
Python
1
te, scaling_info, model = get_or_train_model(params) # --- Example Usage --- print("\n--- Running Example Prediction ---") # Get a callable prediction function predict = get_prediction_function(trained_state, scaling_info, model) # Create some sample inputs (eps, l_0) # Ensure they ar...
Python
1
bool: was figure taken */ Ongoing(Game, MoveStats), Stopped(StoppedReason, GameState), } #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub enum StoppedReason { KingInCheckAfterMove, InsufficientMaterial, ThreeTimesRepetition, NoChangeIn50Moves, } //------------------------------Tests-----...
Rust
0
from django.http import HttpResponse, JsonResponse from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render # Create your views here. @csrf_exempt def home(request): return HttpResponse("Welcome to the Dashboard!") @csrf_exempt def candlestick_data(request): data = { "...
Python
1
#[must_use = "format callback must be used for log to process correctly"] pub struct FormatCallback<'a>(InnerFormatCallback<'a>); struct InnerFormatCallback<'a>(&'a mut bool, &'a Dispatch, &'a log::Record<'a>); pub enum Output { Stdout(Stdout), Stderr(Stderr), File(File), Sender(Sender), #[cfg(fe...
Rust
0