text string | label_name string | labels int64 |
|---|---|---|
ating between measured"]
#[doc = " frames."]
#[doc = ""]
#[doc = " Caller is responsible for allocating a buffer large enough to hold the data of the frame."]
#[doc = " Use LeapGetFrameSize() to calculate the minimum size of this buffer."]
#[doc = ""]
#[doc = " Use LeapCreateClockRebaser()... | Rust | 0 |
8c5391"),
path: "a/e".into()
},
Addition {
entry_mode: EntryMode::Blob,
oid: hex_to_id("e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"),
path: "a/f".into()
},
... | Rust | 0 |
from robot_api import RobotAPI
from vision import get_point_clouds
from scenes import get_config_table
from motions import move_to_look, grasp_motion
from grasping import contact_graspnet_inference
ON_REAL = True
camera_frames = ["l_cameraWrist", "r_cameraWrist"]
robot_api = RobotAPI(verbose=2, use_foundation_stereo=F... | Python | 1 |
import os
import cv2
import numpy as np
HEADS_DIR = "/home/src3453/.local/share/multimc/instances/1.20.1/.minecraft/resourcepacks/src3453s_foxgirl/assets/minecraft/textures/entity/wolf"
SLEEP_DIR = "/home/src3453/.local/share/multimc/instances/1.20.1/.minecraft/resourcepacks/src3453s_foxgirl/assets/minecraft/textures/... | Python | 1 |
# Generated by Django 5.2.3 on 2025-07-10 09:31
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('drugs', '0001_initial'),
migrations.swappable_dependency(settin... | Python | 1 |
a.select(b).wait().ok().unwrap();
let item2 = next.wait().unwrap();
assert!(item1 != item2);
assert!((item1 == 1 && item2 == 2) || (item1 == 2 && item2 == 1));
}
#[test]
fn threads_go_away() {
static CNT: AtomicUsize = ATOMIC_USIZE_INIT;
struct A;
impl Drop for A {
fn drop(&mut self... | Rust | 0 |
rate::Readable for SCGCI2C {}
#[doc = "`write(|w| ..)` method takes [scgci2c::W](scgci2c::W) writer structure"]
impl crate::Writable for SCGCI2C {}
#[doc = "Inter-Integrated Circuit Sleep Mode Clock Gating Control"]
pub mod scgci2c;
#[doc = "Universal Serial Bus Sleep Mode Clock Gating Control\n\nThis register you can ... | Rust | 0 |
from django.db import models
class AmbassadorStatus(models.TextChoices):
"""Статусы Амбассадора."""
ACTIVE = "active", "Активный"
PAUSED = "paused", "На паузе"
NOT_AMBASSADOR = "not_ambassador", "Не амбассадор"
PENDING = "pending", "Уточняется"
class Sex(models.TextChoices):
"""Пол."""
... | Python | 1 |
__all__ = (
"_count_automorphisms_vf2",
"_get_automorphisms_vf2",
)
def _count_automorphisms_vf2(
graph, color=None, edge_color=None, node_compat_fn=None, edge_compat_fn=None
):
"""Returns the number of automorphisms of the graph.
This function simply calls C{count_isomorphisms_vf2} with the grap... | Python | 1 |
one:
global_time = current.cpu_stats.global_time - previous.cpu_stats.global_time
cpu_sysload_gauge.set_value(global_time / frequency_seconds)
global_wait = current.cpu_stats.global_wait_io - previous.cpu_stats.global_wait_io
cpu_syswait_gauge.set_value(global_wait / fre... | Python | 1 |
_limits_max_wall_clock(),
accruing = slurmrest_python.models.v0_0_42_qos_limits_max_jobs_active_jobs.v0_0_42_qos_limits_max_jobs_active_jobs(), ),
factor = slurmrest_python.models.v0/0/42_float64_no_val_struct.v0.0.42_float64_no_val_struct(
... | Python | 1 |
// same panicking *behavior* as `panic-probe` but doesn't print a panic message
// this prevents the panic message being printed *twice* when `defmt::panic` is invoked
#[defmt::panic_handler]
fn panic() -> ! {
cortex_m::asm::udf()
}
/// Terminates the application and makes `probe-run` exit with exit-code = 0
pub ... | Rust | 0 |
memory scene representation.
/// Returns an in memory representation of the scene file.
fn process_file(&self) -> BoxResult<Region>;
}
// macros to perform common validations in interaction handlers
use crate::server::ChatServer;
use actix::prelude::*;
use actix::Handler;
#[derive(Message)]
#[rtype(result = "... | Rust | 0 |
continue
elif processed_response.get("correct_answer") == "ب" or processed_response.get("correct_answer") =="ك" or processed_response.get("correct_answer") == "ل":
#incorrect correct_answer, generated only single_prep_letters
#elif detect_s_and_r_sentences(sexual... | Python | 1 |
# -*- coding: utf-8 -*-
from odoo import models
from odoo.http import request
class IrHttp(models.AbstractModel):
_inherit = 'ir.http'
def session_info(self):
info = super().session_info()
# because frontend session_info uses this key and is embedded in
# the view source
info["... | Python | 1 |
click.echo("Unable to guess service CIDR")
return (cluster_dns_suffix, [], "")
def detectEncap(iface: str, timeout: int, verbose: bool):
"""Sniff network traffic for encapsulated packets and return the encapsulation protocol."""
detector = DetectorSniffer(iface, timeout, verbose)
protocol =... | Python | 1 |
FontData_Free: unsafe extern fn(*mut GGD_FontData),
pub FontData_SetGlyph:
extern fn(image: *mut GGD_FontData, codepoint: u32, img: *mut GGD_ImageData, basex: f32, basey: f32),
pub MeshGroup_Alloc: unsafe extern fn(cacheBuffer: *mut GGD_BufferInfo) -> *mut GGD_MeshGroup,
pub MeshGroup_Free: unsafe extern fn(*mut... | Rust | 0 |
class Solution:
def maximumCount(self, nums: List[int]) -> int:
return max(sum(num > 0 for num in nums), sum(num < 0 for num in nums))
| Python | 1 |
/ # }
/// #
/// # #[cfg(not(feature = "ipnetwork"))]
/// # fn run_test() -> QueryResult<()> {
/// # Ok(())
/// # }
/// ```
#[allow(clippy::clippy::wrong_self_convention)] // This is named after the sql operator
fn is_contained_by<T>(self, other: T) -> dsl::IsContainedByNet<Self, T>
... | Rust | 0 |
## Contagem Regressiva
# Faça um programa para escrever a contagem regressiva do lançamento de um foguete.
# O programa deve imprimir 10, 9, 8, …, 1, 0 e disparar um “beep”.
#### MINHA SOLUÇÃO ####
# Lançamento Contagem regressiva
import time
import winsound
frequency = 4000
duration = 1500
cont = 11
while (cont != ... | Python | 1 |
f"Status: {sensor.sensor_status()} | "
f"Comfort: {sensor.comfort_level()}"
)
def temp_alert():
"""Alert when temperature exceeds threshold."""
if sensor.temperature() > 28:
print(f"⚠️ HIGH TEMPERATURE ALERT: {sensor.temperature():.1f}°C!")
def moni... | Python | 1 |
timestamp: 1000
trusted_packet_sequence_id: 2
}
packet {
sys_stats {
disk_stat {
device_name: "sda"
read_sectors: 150
write_sectors: 250
discard_sectors: 15
flush_count: 8
read_time_ms:... | Python | 1 |
ld: ",
stringify!(_FPDF_SYSFONTINFO),
"::",
stringify!(GetFontCharset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_FPDF_SYSFONTINFO>())).DeleteFont as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
str... | Rust | 0 |
handle(|this| {
this.total_used = this.total_used.saturating_sub(storage);
this.self_used = this.self_used.saturating_sub(storage);
Ok(())
})
}
pub fn refund(&mut self, storage: u32) -> DispatchResult {
debug::trace!(
target: "evm",
"S... | Rust | 0 |
x_groups_to_span_groups(box_groups, doc, center=False)
overlap_at_token_center_span_groups = box_groups_to_span_groups(box_groups, doc, center=True)
overlap_at_token_center_span_groups_x_padded = box_groups_to_span_groups(box_groups, doc, center=True, pad_x=True)
assert (len(box_groups) == len(overlap_span... | Python | 1 |
from flask import Flask, jsonify, render_template
import requests
from apscheduler.schedulers.background import BackgroundScheduler
from datetime import datetime, timedelta
import logging
import yagmail
app = Flask(__name__)
scheduler = BackgroundScheduler()
scheduler.start()
# Configuration
WEBSITES = [
{"url": ... | Python | 1 |
(self) -> List[Collection]:
r = requests.get(
URL,
headers={
"Cookie": f"MyArea.Data={quote(json.dumps(self._address_payload))}"
},
)
r.raise_for_status()
return self.__get_data(r)
def __get_data(self, r: requests.Response) -> List... | Python | 1 |
w.0);
TestResult::from_bool(num_diff == ramp_diff)
}
fn check_mul(a: usize, b: usize) -> TestResult {
let num_prod = b!(a) * b!(b);
let (hw, lw) = limb::mul(l!(a), l!(b));
let ramp_prod = b!(hw.0, lw.0);
TestResult::from_bool(ramp_prod == num_prod)
}
fn check... | Rust | 0 |
import atexit
import multiprocessing
import unittest
import dragon.infrastructure.standalone_conn as disc
def write_actor(writer):
writer.send("hyenas")
SUCCESS = 0
FAILURE = 1
def read_actor(reader, expected):
msg = reader.recv()
if msg == expected:
exit(SUCCESS)
else:
exit(FAIL... | Python | 1 |
from dotenv import load_dotenv
from typing import Union, Type
import os
# Local
from src.settings.descriptor import SettingsDescriptor
class Authentication:
jwt_secret_key: Union[str, SettingsDescriptor, int] = SettingsDescriptor()
jwt_secret_refresh_key: Union[str, SettingsDescriptor, int] = (
Sett... | Python | 1 |
pace())
.count() + base_indent;
if next_line.trim().is_empty() || next_line_indent > detected_enumerator_indent {
return true
} else if next_line_indent == detected_enumerator_indent {
if let Some(next_captures) = ENUMERATOR_AUTOMATON.captures(nex... | Rust | 0 |
buffer = buffer_box.as_mut_ptr();
let r = ttstub_input_read(handle.0.as_ptr(), buffer as *mut i8, length);
if r < 0 || r as size_t != length {
return length;
}
let mut p = buffer;
let endptr = buffer.offset(length as isize);
while p < buffer.offset(length as isize) && *p == 0 {
... | Rust | 0 |
u32;
#[doc = "*Required features: 'Win32_Graphics_Direct2D'*"]
pub const D2D1_SVG_ATTRIBUTE_POD_TYPE_FORCE_DWORD: D2D1_SVG_ATTRIBUTE_POD_TYPE = 4294967295u32;
#[doc = "*Required features: 'Win32_Graphics_Direct2D'*"]
pub type D2D1_SVG_ATTRIBUTE_STRING_TYPE = u32;
#[doc = "*Required features: 'Win32_Graphics_Direct2D'*"... | Rust | 0 |
self.graph.vertices_mut()
}
/// Get an `AnnotatedEdge` by its head and tail block indices.
pub fn edge(&self, head: usize, tail: usize) -> Result<&AnnotatedEdge> {
Ok(self.graph.edge(head, tail)?)
}
/// Get a mutable reference to an `AnnotatedEdge` by its head and tail block indic... | Rust | 0 |
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Dhanya Babu (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU... | Python | 1 |
# Copyright 2004-2008 Nanorex, Inc. See LICENSE file for details.
"""
debug_flags.py -- provide the atom_debug developer debugging flag,
and other debugging flags which might be changed at runtime.
TODO: rename atom_debug, and perhaps change some of its uses
into more specific debugging flags.
@author: Bruce
@versio... | Python | 1 |
from enum import Enum
from django.shortcuts import get_list_or_404, get_object_or_404, render
from django.http import Http404, HttpResponse, HttpResponseNotAllowed
from django.views.decorators.csrf import ensure_csrf_cookie, csrf_exempt
from CaseManagement.services.casefile import CaseFileService
from CaseManagement.se... | Python | 1 |
for s in printed {
write!(fmtr, "{}", s)?
}
Ok(())
}
}
/// Find the name of `c`, or `None` if `c` has no name.
///
/// The return value is an iterator that yields `&str` components of
/// the name successively (including spaces and hyphens). It
/// implements `Show`, and thus can ... | Rust | 0 |
text,
"a baby girl wearing glasses is reading a book on the bed 1080p",
)
def test_expansion_in_processing(self):
processor = InstructBlipVideoProcessor.from_pretrained("Salesforce/instructblip-vicuna-7b")
model = InstructBlipVideoForConditionalGeneration.from_pretrained(
... | Python | 1 |
e) struct RawQP {
pub(crate) hess: DMatrix<f64>, // problem.hess.symmetric()
pub(crate) c: DVector<f64>,
pub(crate) a: DMatrix<f64>, // extended ineq matrix [-A; I; -I]
pub(crate) b: DVector<f64>, // extended ineq rhs [-b; lb; -ub]
pub(crate) a_eq: DMatrix<f64>, // A_eq, full rank, no full zer... | Rust | 0 |
# -*- coding: utf-8 -*-
"""
deliverator.py
The deliverator holds the channels that will be used to deliver
the replies that come over a resilient connection
"""
import logging
from gevent.queue import Queue
from gevent.coros import RLock
class Deliverator(object):
"""
The deliverator holds the channels that... | Python | 1 |
_wall_muscle(pre)) or not is_body_wall_muscle(post):
# Don't add connections unless pre=neuron and post=body_wall_muscle
continue
if is_neuron(pre):
pre = remove_leading_index_zero(pre)
else:
pre = get_old_muscle_name(pre)
... | Python | 1 |
#!/usr/bin/python3
"""This script is the base model"""
import uuid
import datetime
from models import storage
class BaseModel():
''''Class from which all other classes will inherit'''
def __init__(self, *args, **kwargs):
'''Initializes instance attributes'''
if len(kwargs) == 0:
... | Python | 1 |
GS.exception(er)
return await event.answer(str(er))
await event.edit(get_string("userlogs_5").format(name))
@callback("do_nothing")
async def _(event):
await event.answer()
async def parse_buttons(event):
y, x = event.chat, event.sender
where_n, who_n = get_display_name(y), get_display_name(... | Python | 1 |
# SPDX-FileCopyrightText: Copyright DB InfraGO AG
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
import typing as t
from svgwrite import container, gradients, path
# compatibility re-export
from capellambse.diagram._icons import _make_lgradient # noqa: F401
from . import decorations
Gra... | Python | 1 |
"""LangGraph single-node graph template.
Returns a predefined response. Replace logic and configuration as needed.
"""
from deepagents import create_deep_agent
import dotenv
from src.tools.tool import internet_search
from src.prompts.prompt import research_instructions, analysis_agent_prompt
dotenv.load_dotenv()
... | Python | 1 |
/// The `v` bit indicates when the position has been mirrored vertically.
pub const V_BIT: u64 = 0x0020_0000_0000_0000u64;
/// The `d` bit indicates when the position has been mirrored diagonally.
pub const D_BIT: u64 = 0x0010_0000_0000_0000u64;
/// Bitmask for the transformer bits.
pub const TR... | Rust | 0 |
# Copyright (C) 2023-2025 Cognizant Digital Business, Evolutionary AI.
# All Rights Reserved.
# Issued under the Academic Public License.
#
# You can be released from the terms, and requirements of the Academic Public
# License by purchasing a commercial license.
# Purchase of a commercial license is mandatory for any... | Python | 1 |
"l0"]
assert abs(actual_l0 - expected_l0) < TEST_TOLERANCE
def test_feature_metrics():
"""Test the feature-wise metrics computation"""
test_config = eval_config.CoreEvalConfig(
model_name="pythia-70m-deduped",
batch_size_prompts=4,
n_eval_reconstruction_batches=5,
n_eva... | Python | 1 |
utAlpha + (x*8);
uchar4 block [16];
// R, G, B. Byte (3 * (x + 4 * y) is the R value of pixel (x, y)
//rsDebug("pInA", pInA);
etc1_uint32 amask = pullBlockAndMask_from_Raster(pixelSize, x, pInA, height, width, block, containMipmaps);
//rsDebug("mask",amask);
//for (int i = 0; i < 48; i++) {
... | Rust | 0 |
as.get_unsized_arena_and_react_function_pointer(reactor_compressed_type_identifier);
react_function_pointer(self, unsized_arena, event_poll_token, event_flags, unsafe { NonNull::new_unchecked(terminate as *const _ as *mut _) })
}
#[inline(always)]
pub(crate) fn react_function_pointer<A: Arena<R>, R: Reactor, T: T... | Rust | 0 |
ed_discovery_handlers: Vec<Details> = Vec::new();
if query.get_env_var(ENABLE_DEBUG_ECHO_LABEL).is_ok() {
let shared: bool = query
.get_env_var(akri_debug_echo::DEBUG_ECHO_INSTANCES_SHARED_LABEL)
.unwrap()
.parse()
.unwrap();
embedded_discovery_handler... | Rust | 0 |
from django.db import models
from django.contrib.auth.models import AbstractUser
class User(AbstractUser):
username = None
email = models.EmailField(unique=True, verbose_name="Email")
token = models.CharField(
max_length=100,
verbose_name="Token",
blank=True,
null=True,
... | Python | 1 |
0x01) != 0)
}
#[doc = "Bit 8 - BURST_SIZE_4BEATS"]
#[inline(always)]
pub fn burst_size_4beats(&self) -> BURST_SIZE_4BEATS_R {
BURST_SIZE_4BEATS_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bits 9:10 - FORMAT"]
#[inline(always)]
pub fn format(&self) -> FORMAT_R {
FOR... | Rust | 0 |
/// Create an arbitrary `Argument`
pub fn argument_with_def(&mut self, input_val_def: &InputValueDef) -> Result<Argument> {
let name = input_val_def.name.clone();
let value = self.input_value_for_type(&input_val_def.ty)?;
Ok(Argument { name, value })
}
/// Create an arbitrary ... | Rust | 0 |
tps://ergsc.isee.nagoya-u.ac.jp/mw/index.php/ErgSat/Mepi')
print('')
print('Contact: erg_mep_info at isee.nagoya-u.ac.jp')
print(
'**************************************************************************')
except:
print('printing PI info and rule... | Python | 1 |
import sys
from ui.main_window import main
if __name__ == "__main__":
main()
| Python | 1 |
# Copyright(C) 2012-2021 Romain Bignon
#
# This file is part of woob.
#
# woob 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 of the License, or
# (at your option) any later version.
#... | Python | 1 |
from fastapi import FastAPI, Depends, HTTPException
from sqlalchemy import create_engine, Column, Integer, String, Enum, ForeignKey, Text
from sqlalchemy.orm import sessionmaker, relationship
from sqlalchemy.ext.declarative import declarative_base
from databases import Database
from enum import Enum as PyEnum
DATABASE... | Python | 1 |
Next,
Break,
Return,
Branch,
CondBranch,
Call,
Throw,
Meta,
}
#[derive(Debug, Eq, PartialEq, Copy, Clone)]
pub struct Opcode {
pub name: &'static str,
pub stack_behavior_pop: StackBehaviorPop,
pub stack_behavior_push: StackBehaviorPush,
pub operand_params: OperandParams,... | Rust | 0 |
import numpy as np
from numpy.testing import assert_, assert_equal, assert_array_equal
class TestView:
def test_type(self):
x = np.array([1, 2, 3])
assert_(isinstance(x.view(np.matrix), np.matrix))
def test_keywords(self):
x = np.array([(1, 2)], dtype=[('a', np.int8), ('b', np.int8)])
... | Python | 1 |
u32 = 32u32;
#[doc = "*Required features: 'Win32_System_SystemServices'*"]
pub const _NT_D3DPS_TEMPREG_MAX_V3_0: u32 = 32u32;
#[doc = "*Required features: 'Win32_System_SystemServices'*"]
pub const _NT_D3DPS_TEXTUREREG_MAX_DX8: u32 = 8u32;
#[doc = "*Required features: 'Win32_System_SystemServices'*"]
pub const _NT_D3D... | Rust | 0 |
import pytest
from .conftest import run_equality_correctness_test
# main model
MAIN_MODEL = "JackFram/llama-68m"
# speculative model
SPEC_MODEL = "JackFram/llama-160m"
@pytest.mark.parametrize(
"common_llm_kwargs",
[{
"model_name": "JackFram/llama-68m",
# Skip cuda graph recording for fast... | Python | 1 |
Price"] = '1'
#最新价
defineDict["SECURITY_FTDC_MPT_SettlementPrice"] = '2'
#成交均价
defineDict["SECURITY_FTDC_MPT_AveragePrice"] = '3'
#开仓价
defineDict["SECURITY_FTDC_MPT_OpenPrice"] = '4'
typedefDict["TSecurityFtdcMarginPriceTypeType"] = "string"
#//////////////////////////////////////////////////////////////////////
#TFt... | Python | 1 |
KP_1 = SDL_SCANCODE_KP_1,
KP_2 = SDL_SCANCODE_KP_2,
KP_3 = SDL_SCANCODE_KP_3,
KP_4 = SDL_SCANCODE_KP_4,
KP_5 = SDL_SCANCODE_KP_5,
KP_6 = SDL_SCANCODE_KP_6,
KP_7 = SDL_SCANCODE_KP_7,
KP_8 = SDL_SCANCODE_KP_8,
KP_9 = SDL_SCANCODE_KP_9,
KP_A = SDL_SCANCODE_KP_A,
KP_Ampersand = SDL_SCANCODE_KP_AMPERSA... | Rust | 0 |
,
/// The Next Candidate function key.
NextCandidate,
/// The NonConvert ("Don’t Convert") key, to accept current input method sequence without conversion in IMEs.
NonConvert,
/// The Previous Candidate function key.
PreviousCandidate,
/// The Process key.
Process,
/// The Single Can... | Rust | 0 |
from datetime import datetime, timedelta
import re
def get_progress(start, end):
now = datetime.now()
total = (end - start).total_seconds()
elapsed = (now - start).total_seconds()
return round((elapsed / total) * 100)
def day_progress():
now = datetime.now()
start = datetime(now.year, now.mont... | Python | 1 |
en)))
(-10*x^3 + 105*x)/(x^4 - 45*x^2 + 105)
Sage example in ./polynomes.tex, line 1713::
sage: def mypade(pol, n, k):
....: x = ZpZx.gen();
....: n,d = ZpZx(pol).rational_reconstruction(x^n, k-1, n-k)
....: return Qx(list(map(lift_sym, n)))/Qx(list(map(lift_sym, d)))
Sage example in ./polynome... | Python | 1 |
*mut u32)
);
if offset % 4 == 3 || offset + 1 == len {
println!("");
}
}
}
}
//! Implements Invoker Worker.
//!
//! Worker is responsible for processing `InvokeRequest`s
mod compiler;
mod exec_test;
mod invoke_util;
mod os_util;
mod transform_judge_log;... | Rust | 0 |
encoded.avro";
let schema_file = "tests/schemas/map_schema.avsc";
let mut data_writer = test_writer(schema_file, codec);
let mut map = HashMap::new();
map.insert("A".to_owned(), Type::Double(234.455));
let _ = data_writer.write(Type::Map(map.clone()));
let datafile_buffer = data_writer.take_datafile().unwr... | Rust | 0 |
tion
# if not args.skip_reconstruction:
# print("colmap reconstruction w/o doppelgangers classifier")
# colmap_result_path = os.path.join(args.output_path, 'sparse')
# os.makedirs(colmap_result_path, exist_ok=True)
# command = [args.colmap_exe_command, 'mapper',
# '-... | Python | 1 |
Font", 20),textvar=PercentSalaryHike)
PercentSalaryHike.place(x=1150,y=200)
l14=tk.Label(root,text="PerformanceRating",background="#8B8989",font=('times', 20, ' bold '),width=20,fg="white")
l14.place(x=800,y=250)
PerformanceRating=tk.Entry(root,bd=2,width=5,font=("TkDefaultFont", 20),textvar=PerformanceRating)
P... | Python | 1 |
DING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTW... | Rust | 0 |
i16; 3] = [1, 2, 3];
let mut b = [0; 3];
let mut c = Array::new();
let d = tests.array6(&a, &mut b, &mut c)?;
assert!(a == b);
assert!(a == c[..]);
assert!(a == d[..]);
}
{
let a: [i32; 3] = [1, 2, 3];
let mut b = [0; 3];
let mut c = Array... | Rust | 0 |
/// How message retention is considered, `Limits` (default), `Interest` or `WorkQueue`
pub retention: RetentionPolicy,
/// How many Consumers can be defined for a given Stream, -1 for unlimited
pub max_consumers: i32,
/// Maximum age of any message in the stream, expressed in nanoseconds
pub max_age... | Rust | 0 |
f.quantity}"
def get_total_price(self):
return self.price * self.quantity
class Stock(models.Model):
product = models.CharField(max_length=100, unique=True)
brand = models.CharField(max_length=100)
units = models.CharField(max_length=50)
quantity = models.PositiveIntegerField(default=0)
... | Python | 1 |
neutron_scattering: None
},
Isotope {
mass_number: 266,
mass: UncertainFloat::new(266.121_93_f64, 0.000_31_f64),
abundance: UncertainFloat::new(0.0, 0.0),
xray_scattering: None,
neutron_scattering: None
... | Rust | 0 |
"""
Acceleration of reactor integration using a sparse preconditioned solver
========================================================================
Ideal gas, constant-pressure, adiabatic kinetics simulation that compares preconditioned
and non-preconditioned integration of n-hexane.
Requires: cantera >= 3.2.0, mat... | Python | 1 |
return """
SELECT
EXTRACT(YEAR FROM year) AS year,
toJSONString(map(
'individual', ROUND(SUM(individual_revenue), 2),
'collective', ROUND(SUM(collective_revenue), 2),
'total', ROUND(SUM(total_revenue), 2))
... | Python | 1 |
},
// Inst::SignExtendData { sz, dst, src } => todo!(),
Inst::MovzxRmR { dst, ref src, .. } |
Inst::MovsxRmR { dst, ref src, .. } => {
src.collect_operands(args);
args.push(Operand::reg_def(dst));
}
Inst::Load64 { dst, ref src } => {
src.collect_operands(args)... | Rust | 0 |
removed_len)]).unwrap();
let added = packed::OutPointVec::from_slice(&v[(4 + removed_len)..]).unwrap();
ACPCellList {
added: added.into_iter().collect(),
removed: removed.into_iter().collect(),
}
}
}
#[derive(Default, Clone, Debug)]
pub struct ACPMap(pub HashMap<H1... | Rust | 0 |
']
# plt.imshow(rendered_similarities.permute([1,2,0])[:,:,0].detach().cpu() > 0.6)
plt.imshow(rendered_similarities.permute([1,2,0])[:,:,0].detach().cpu() > 0.2)
plt.show()
#sam的2维mask投影分割
# uv_cam, _, _ = project_gs_idx(gaussians.get_xyz, idx, args.source_path)
uv_cam, _, _ = project_gs_name(gaussians.get_xyz, image... | Python | 1 |
_property(&client, label, prop_type);
let gtfs_id = create_prop("GTFS id", PropertyDataType::String)?;
let instance_of = create_prop("Instance of", PropertyDataType::Item)?;
let producer_class = get_or_create_item(&client, "Producer", &[])?;
let physical_mode = get_or_create_item(&client, "Physical mo... | Rust | 0 |
null_mut() } else {
ObjOps::heap_alloc(unsafe { &*ObjOps::untweak_ptr(self.inner) }.clone()) },
is_owned: true,
}
}
}
#[allow(unused)]
/// Used only if an object of this type is returned as a trait impl by a method
pub(crate) extern "C" fn PrivateRoute_clone_void(this_ptr: *const c_void) -> *mut c_void {
Box... | Rust | 0 |
from unittest import TestCase
import simplejson as json
from operator import itemgetter
class TestItemSortKey(TestCase):
def test_simple_first(self):
a = {'a': 1, 'c': 5, 'jack': 'jill', 'pick': 'axe', 'array': [1, 5, 6, 9], 'tuple': (83, 12, 3), 'crate': 'dog', 'zeak': 'oh'}
self.assertEqual(
... | Python | 1 |
#!/usr/bin/env python3
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
import sys
import pathlib3x as pathlib
def get_project_root() -> pathlib.Path:
"""Get the project root directory."""
return pathlib.Path(__... | Python | 1 |
f._norm(f, "forget")
o = self._norm(o, "output")
g = self._activation(j)
if (not isinstance(self._keep_prob, float)) or self._keep_prob < 1:
g = nn_ops.dropout(g, self._keep_prob, seed=self._seed)
new_c = (c * math_ops.sigmoid(f + self._forget_bias)
+ math_ops.sigmoid(... | Python | 1 |
(unreachable_pub)]
#![warn(unused_crate_dependencies)]
#![warn(unused_import_braces)]
#![warn(unused_lifetimes)]
#![warn(unused_qualifications)]
// #![warn(missing_docs)] may be enabled later when more is documented
#![deny(macro_use_extern_crate)]
#![deny(missing_abi)]
#![deny(future_incompatible)]
#![forbid(unsafe_co... | Rust | 0 |
from datetime import datetime, timedelta, timezone
import jwt
import os
SECRET_KEY = os.environ.get('SECRET_KEY') or 'secretkey'
def encode_token(user_id):
payload = {
'exp': datetime.now(timezone.utc) + timedelta(hours=1),
'iat': datetime.now(timezone.utc),
'sub': user_id
}
token... | Python | 1 |
import urllib.request
import re
from urllib.error import URLError, HTTPError, ContentTooShortError
def download(url, num_retries=2, user_agent='wswp', charset='utf-8'):
print('Downloading:', url)
request = urllib.request.Request(url)
request.add_header('User-agent', user_agent)
try:
resp = ur... | Python | 1 |
c::<Builder<()>>();
}
impl<P: Clone> Builder<P>
{
pub(crate) fn new(
trial_dir: Option<&TrialDir>,
on_demand: Option<LammpsOnDemand>,
threading: &cfg::Threading,
lammps_cfg: &cfg::Lammps,
potential: P,
) -> FailResult<Self> {
let cfg::Lammps { update_style, proce... | Rust | 0 |
import os
DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data')
def load_best_rotamer(rotamer_loc="{}/rotamers.lib".format(DATA_DIR)):
_dunbrack = {}
with open(rotamer_loc) as fn:
for line in fn:
if line.startswith("#"):
continue
if not li... | Python | 1 |
# https://leetcode.com/problems/min-cost-climbing-stairs/
class Solution:
def minCostClimbingStairs(self, cost):
n = len(cost)
if n < 3: return min(cost)
for i in range(2, n):
cost[i] += min(cost[i-1], cost[i-2])
return min(cost[-1], cost[-2])
# Ti... | Python | 1 |
n = int(input())
x,y = 0,1
for _ in range(n):
x,y = y,x+y
print(y%10007)
| Python | 1 |
TaskHandle, data: *mut int32) -> int32;
}
extern "C" {
pub fn DAQmxSetDigEdgeRefTrigEdge(taskHandle: TaskHandle, data: int32) -> int32;
}
extern "C" {
pub fn DAQmxResetDigEdgeRefTrigEdge(taskHandle: TaskHandle) -> int32;
}
extern "C" {
pub fn DAQmxGetDigEdgeRefTrigDigFltrEnable(taskHandle: TaskHandle, data... | Rust | 0 |
from __future__ import absolute_import, division, print_function
import setuptools
__name__ = 'federatedscope'
__version__ = '0.3.0'
URL = 'https://github.com/alibaba/FederatedScope'
minimal_requires = [
'numpy<1.23.0', 'scikit-learn==1.0.2', 'scipy==1.7.3', 'pandas',
'grpcio>=1.45.0', 'grpcio-tools', 'pyyam... | Python | 1 |
from pydantic import BaseModel
from moose_lib import Key
class ProcessedAntHRPacket(BaseModel):
device_id: Key[int]
previous_beat_time: float
last_beat_time: float
calculated_heart_rate: float
heart_beat_count: int | Python | 1 |
"uint32_t" {
return self->GetHitCount();
})
}
// LLDB API does not provide automatic tracking of callback lifetimes; in order to prevent a memory leak,
// be sure to call clear_callback(). The easiest way to accomplish this is by watching for "breakpoint removed"
// events.
pub... | Rust | 0 |
Departamentos_peru = {"Norte" : "Ica" , "Norte2" : "Tumbes", "Centro" : "Lima" ,"Centro2" : "Anchash", "Sur" : "Arequipa", "Sur2" : "Tacna"}
print(Departamentos_peru)
#Borramos con del
del Departamentos_peru["Norte"]
print(Departamentos_peru)
#Con esto comprobamos que Ica ya no está presente
Departamentos_peru["Mi car... | Python | 1 |
let p = match pull {
Pull::PullOff => 0,
Pull::PullUp => 1,
Pull::PullDown => 2,
};
// This is verbatim C code from raspi-gpio.c
let pull_bits = gpio_mem[pull_reg];
let pull_bits = pull_bits & !(3 << shift);
let pull_bits = pull_bits | (p << shift);
gpio_mem[pull_reg] = ... | Rust | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.