text
string
label_name
string
labels
int64
as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `AUX_COMPB`"] pub enum AUX_COMPBW { #[doc = "Falling edge"] FALL, #[doc = "Rising edge"] RISE, } impl AUX_COMPBW { #[allow(missing_docs)] #[doc(h...
Rust
0
width: c_int, height: c_int, ) -> *mut gdk_pixbuf::GdkPixbuf; pub fn gdk_pixbuf_get_from_texture(texture: *mut GdkTexture) -> *mut gdk_pixbuf::GdkPixbuf; pub fn gdk_set_allowed_backends(backends: *const c_char); pub fn gdk_toplevel_size_get_type() -> GType; pub fn gdk_unicode_to_keyval(wc:...
Rust
0
ne = 0 body.append(add_to_each_line_before+line+add_to_each_line_after) if body[len(body)-1].strip() == "" : del body[len(body)-1] body = "\n".join(body) return pre+body+after def get_whitespace_from_line_begin(view, region) : line = view.line(region) whitespace = "" count = line.begin() sel_begi...
Python
1
toggled(clone!(@strong spec, @strong on_change => move |b| { { let mut spec = spec.borrow_mut(); let spec = spec.get_or_insert(DEFAULT_PROPS); spec.hexpand = b.get_active(); } on_change() })); let vexp = gtk::CheckButton...
Rust
0
cro_use)] extern crate build_cfg; #[cfg(test)] mod tests;#[macro_use] mod macros; pub mod nds; <filename>src/lib.rs //! The goal of this crate is to provide Rust bindings to the Web APIs and to allow //! a high degree of interoperability between Rust and JavaScript. //! //! ## Examples //! //! You can directly embed ...
Rust
0
fn is_android(&self) -> bool { match *self { Target::ArmLinuxAndroideabi | Target::Armv7LinuxAndroideabi | Target::Aarch64LinuxAndroid | Target::I686LinuxAndroid | Target::X86_64LinuxAndroid => true, _ => false, } } fn is_e...
Rust
0
axis='y', linestyle='--', alpha=0.7) plt.tight_layout(rect=[0, 0, 0.9, 1]) plt.show() if __name__ == "__main__": try: # Load the CSVs GRDR_df = pd.read_csv("../Processed Data/GRDR_interpolated.csv") WOOD_df = pd.read_csv("../Processed Data/WOOD_interpolated.csv") # Create d...
Python
1
), state_update_if_false_positive=StateUpdate( batch_labware_location=BatchLabwareLocationUpdate( new_locations_by_id={ "primary-id-1": ModuleLocation(moduleId=stacker_id), }, new_offset_ids_by_id={ "primary-id-1...
Python
1
// prepare line let end = line.end_index; let pos = pos_args.get_position(i); //dbg!(&text[start..end], start, end, line.width, pos); layer.use_text(&text[start..end], font_size, pos.x, pos.y, pdf_font); // the end is always at a whitespace // ...
Rust
0
#!/usr/bin/env python3 """A python script to perform watermark embedding/detection in the wavelet domain.""" # Copyright (C) 2020 by Akira TAMAMORI # 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 Foun...
Python
1
, input: [float64x2_t; 16]) -> [float64x2_t; 16] { // we're going to hardcode a step of split radix // step 1: copy and reorder the input into the scratch // and // step 2: column FFTs let evens = self.bf8.perform_fft_direct([ input[0], input[2], input[4], input[6],...
Rust
0
# Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Panama - Accounting', 'website': 'https://www.fothz.com/documentation/17.0/applications/finance/fiscal_localizations.html', 'icon': '/account/static/description/l10n.png', 'countries': ['pa'], 'description': """ Pa...
Python
1
import os MONGO_USER = os.environ.get("MONGO_DB_USER", "admin") MONGO_PASSWORD = os.environ.get("MONGO_DB_PASSWORD", "crapisecretpassword") MONGO_HOST = os.environ.get("MONGO_DB_HOST", "mongodb") MONGO_PORT = os.environ.get("MONGO_DB_PORT", "27017") MONGO_DB_NAME = os.environ.get("MONGO_DB_NAME", "crapi") MONGO_CONNE...
Python
1
# Proyecto creado por JuliaBujalanceRodriguez # Licencia: CC BY-ND 4.0 (https://creativecommons.org/licenses/by-nd/4.0/) # Prohibida la redistribución con modificaciones sin autorización. # Este es un ejemplo de navegación artificial (sin usar la propia incorporada en el navegador en el cual # se va a ejecutar este pr...
Python
1
-> u64 { (pseudo_normalize(self.rng.next_f64(), self.a) * std::u64::MAX as f64) as u64 } fn next_f32(&mut self) -> f32 { pseudo_normalize(self.rng.next_f64(), self.a) as f32 } fn next_f64(&mut self) -> f64 { pseudo_normalize(self.rng.next_f64(), self.a) } } impl SeedableRn...
Rust
0
<Vec<_>>() .join(" ") ); } <filename>crates/ruma-client-api/src/membership/invite_user.rs<gh_stars>0 //! `POST /_matrix/client/*/rooms/{roomId}/invite` pub mod v3 { //! `/v3/` ([spec (MXID)][spec-mxid], [spec (3PID)][spec-3pid]) //! //! This endpoint has two forms: one to invite a user ...
Rust
0
if dep_id in graph: max_dep_level = max(max_dep_level, graph[dep_id]["level"]) node["level"] = max_dep_level + 1 for task in tasks: task_id = task.get("id") or task.get("task_id") if task_id in graph: task["level"] = gra...
Python
1
_string() } fn rlc (&mut self, dst: Addr8) -> String { unary8 ("RLC", dst) } fn rl (&mut self, dst: Addr8) -> String { unary8 ("RL", dst) } fn rrc (&mut self, dst: Addr8) -> String { unary8 ("RRC", dst) } fn rr (&mut self, dst: Addr8) -> String { unary8 ("RR", dst) } fn...
Rust
0
class AttrDict(dict): """A dictionary subclass that allows attribute-style access.""" def __getattr__(self, key): try: return self[key] except KeyError: raise AttributeError(f"'AttrDict' object has no attribute '{key}'") def __setattr__(self, key, value): se...
Python
1
, 0x47, 0x37, 0x13, 0xD2, 0xD1, 0x82, 0x4E, 0x42, 0x34, 0x60, 0xF8, 0x21, 0x44, 0x73, 0x40, 0xB5, 0x8A, 0x32, 0x5A, 0x16, 0xDE, 0xAF, 0x74, 0x84, 0x57, 0xAD, 0x2D, 0x03, 0xC8, 0x25, 0x48, 0x33, 0x6B, 0xE1, 0x1A, 0x72, 0xB4, 0x43, 0x43, 0x3C, 0x44, 0x8A, 0xC3, 0x67, 0x0C, 0x09, 0x0D, 0x0C, 0xB1, ...
Rust
0
Texinfo output ---------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ (master_doc, 'fsfc', 'fsfc Documentation', author, 'fsfc', 'One line ...
Python
1
import pick import os import shutil import json # Get themes folder and the base theme themes_dir = os.path.abspath("../themes/") base_theme = themes_dir+"/baseTheme/" print("Creating a theme.") theme_name = input("What is the name of your theme: ") # Set possible options options = [ "py", "txt" ] option_fil...
Python
1
import proxsuite from util import generate_mixed_qp # load a qp object using qp problem dimensions n = 10 n_eq = 2 n_in = 2 qp = proxsuite.proxqp.sparse.QP(n, n_eq, n_in) # generate a random QP H, g, A, b, C, u, l = generate_mixed_qp(n, True) # initialize the model of the problem to solve qp.init(H, g, A, b, C, l, u)...
Python
1
import gzip import json import pytest from draftdiff.hero_builds import parse_match_heroes from draftdiff.models.opendota import MatchResponse @pytest.mark.asyncio async def test_parse_match_heroes(): with gzip.open('tests/opendota/match.json.gz', 'r') as rf: match_data: dict = json.load(rf) # type: ig...
Python
1
>GrandChaman/quaint use super::Function; use crate::ast::Table; #[derive(Debug, Clone, PartialEq)] #[cfg_attr(feature = "docs", doc(cfg(feature = "postgresql")))] #[cfg(all(feature = "json", feature = "postgresql"))] /// A representation of the `ROW_TO_JSON` function in the database. /// Only for `Postgresql` pub stru...
Rust
0
subparsers.add_parser("package", help="Examine a package") parser_binary.add_argument("-a", "--afl_dir", required=True, type=str, help="Afl dir, where the seeds should be collected from") parser_binary.add_argument("-d", "--database", required=True, help="Where should the databa...
Python
1
gboolean, *mut GtkTooltip) -> gboolean>, pub compute_expand: Option<unsafe extern "C" fn(*mut GtkWidget, *mut gboolean, *mut gboolean)>, pub adjust_size_request: Option<unsafe extern "C" fn(*mut GtkWidget, GtkOrientation, *mut c_int, *mut c_int)>, pub adjust_size_allocation: Option<unsafe extern "C" fn(*mut...
Rust
0
pub fn signatures(&self) -> Vec<(Ed25519Signature, u8)> { self.into() } /// Getter bitmap. pub fn bitmap(&self) -> &[u8; BITMAP_NUM_OF_BYTES] { self.signature.bitmap() } /// Serialize a MultiEd25519SignatureShard pub fn to_bytes(&self) -> Vec<u8> { let mut bytes: Ve...
Rust
0
import numpy as np import pandas as pd import plotly.graph_objects as go from plotly.subplots import make_subplots from IPython.display import display # Given resistor values resistor_values = [36.0, 50.0] # Create a range of values for Resistor 1 and Resistor 2 resistor1_range = np.linspace(1, 1000, 50) resistor2_ra...
Python
1
ghborsClassifier(n_neighbors=9) model2.fit(X_train, y_train) y_pred2 = model2.predict(X_test) print("Accuracy:", accuracy_score(y_test, y_pred2)) print(classification_report(y_test, y_pred2)) # Evaluating multiple k values to find the optimal neighbor count. accuracy_scores = [] for k in range(1, 20): model = KNei...
Python
1
lback manager to use for the chain. Returns: A chain to use for question answering. """ loader_mapping: Mapping[str, LoadingCallable] = { "stuff": _load_stuff_chain, "map_reduce": _load_map_reduce_chain, "refine": _load_refine_chain, "map_rerank": _load_map_rerank_ch...
Python
1
inactivity cleanup must be active")?; ensure!(assumed_vote_index == Self::vote_index(), "vote index not current"); ensure!(assumed_vote_index > last_active + Self::inactivity_grace_period(), "cannot reap during grace period"); let voters = Self::voters(); let reporter_index = reporter_index as usize; le...
Rust
0
ta_result .map(move |_| comment_id) .map_err(request::fail_reason_into_errors)) }) } <reponame>ccqpein/Arithmetic-Exercises use std::io::{Error, ErrorKind, Result}; use std::ops::{Add, AddAssign}; #[derive(Debug)] struct BIT<T> { inner: Vec<T>, } /// https://zh.wikipedia.org/wiki/树状数组 ...
Rust
0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.http import route from odoo.addons.sale.controllers.combo_configurator import ( SaleComboConfiguratorController, ) from odoo.addons.sale_renting.controllers.utils import _convert_rental_dates class SaleRentingComboConfiguratorC...
Python
1
nded_error(pi, Rational(0))) raises(ValueError, lambda: _evalf_with_bounded_error(pi, -pi)) raises(ValueError, lambda: _evalf_with_bounded_error(pi, I)) def test_issue_22849(): a = -8 + 3 * sqrt(3) x = AlgebraicNumber(a) assert evalf(a, 1, {}) == evalf(x, 1, {}) def test_evalf_real_alg_num(): ...
Python
1
ice_name.unwrap().as_bytes()); let _ = io::stdout().write_all("\t".as_bytes()); let _ = io::stdout().write_all(is_tablet.unwrap().as_bytes()); let _ = io::stdout().write_all("\t".as_bytes()); let _ = io::stdout().write_all(form_factor.unwrap().as_bytes()); let _ = io::stdout().wr...
Rust
0
} } } pub fn boot(&mut self) -> Result<()> { let current_state = self.get_state()?; let new_state = VmState::Running; current_state.valid_transition(new_state)?; let entry_addr = self.load_kernel()?; self.cpu_manager .lock() .unwrap() ...
Rust
0
""" Implement Service Patterns """ from pathlib import Path import pandas as pd from common_layer.database.models.model_transmodel import TransmodelServicePattern from geoalchemy2.shape import from_shape from shapely.wkt import loads as wkt_loads def load_service_patterns_from_csv( csv_path: Path | str, ) -> li...
Python
1
# ucx[direct-filesystem-access:+1:0:+1:34] The use of direct filesystem references is deprecated: s3://bucket/path spark.read.csv("s3://bucket/path") for i in range(10): ## Check a literal reference to a known table that is migrated. # ucx[table-migrated-to-uc-python:+1:4:+1:44] Table old.things is migrated to...
Python
1
akAuth { detailed_responses: true, keycloak_oid_public_key: DecodingKey::from_rsa_pem(KEYCLOAK_PK.as_bytes()).unwrap(), required_roles: vec![], }; let app = test::init_service( App::new() .service( web::scope("/private") .wrap(keycl...
Rust
0
from pandas import DataFrame from autogluon.core.utils.time import sample_df_for_time_func def test_sample_df_for_time_func(): df = DataFrame({"a": [1, 5, 3, 8, 12]}) df_out_1 = sample_df_for_time_func(df=df, sample_size=1, max_sample_size=10) df_out_2 = sample_df_for_time_func(df=df, sample_size=3, max...
Python
1
static str = "PlaybackControlsWidget"; type Type = super::PlaybackControlsWidget; type ParentType = gtk::Box; fn class_init(klass: &mut Self::Class) { Self::bind_template(klass); } fn instance_init(obj: &glib::subclass::InitializingObject<Self>) { obj.in...
Rust
0
lower_snake_case(&name)) } /// Heper function to get the name of the type of `self` fn self_type(ast_func: &ast::Fn) -> Option<ast::Type> { ast_func.syntax().ancestors().find_map(ast::Impl::cast).and_then(|i| i.self_ty()) } /// Output the real name of `Self` like `MyType<T>`, without the lifetimes. fn self_type_w...
Rust
0
into().unwrap_or_default(); // We are now ready to link the anchor locally. Self::register_new_resource_id(r_id, target_tree_id)?; // Next, we signal back to the other chain that the link process is done. let handle_link_anchor = Transact { origin_type: OriginKind::Native, require_weight_at_most: 1_...
Rust
0
let destino_num = conseguir_num_tipo(destino.tipo.as_str()); match checar_cubo_semantico(op_num as usize, valor_num as usize, destino_num as usize) { 3 => Err(("Asignacion incompatible", (valor.tipo, destino.tipo))), _ => { // Crea cuádruplo self.lista.push((op_num, valor.direccion...
Rust
0
def spytai_rozmir_yalynky () : r = int(input("Введи розмір ялинки")) return r; def maliu_bagato_probiliv (skik_probiliv): pr = ""; if skik_probiliv == 0 : return " "; pr = " " + maliu_bagato_probiliv(skik_probiliv - 1); return pr def malui_bagato_zirochok (skik_stars) : star = ...
Python
1
from Cnnproject.config.config_entity import * import tensorflow as tf from tensorflow import keras from tensorflow.keras.layers import Dense,Faltten from tensorflow.keras.preprocessing.image import ImageDataGenerator from Cnnproject.utility.common import create_folder from Cnnproject import logging class ModelTrai...
Python
1
me. new_message["content"] += newestResponsePart.content # After processing all chunks, the new_message dictionary, which now contains the complete response from the assistant, is appended to the chatHistory list. chatHistory.append(new_message) print("\nUser:") # Catches user’s next messa...
Python
1
: PyObjectRef, obj: Option<PyObjectRef>, _cls: Option<PyObjectRef>, vm: &VirtualMachine, ) -> PyResult { let (zelf, obj) = Self::_unwrap(zelf, obj, vm)?; if vm.is_none(&obj) { Ok(zelf.into()) } else if let Some(getter) = zelf.getter.read().as_ref() { ...
Rust
0
self, t: &texture::CheckerTexture) -> Result<(), Box<dyn Error>> { self.add_texture(t.even_texture.clone())?; self.add_texture(t.odd_texture.clone())?; self.object_map.borrow_mut().insert( t.id, RayTracingObject::CheckerTexture(CheckerTexture::from_texture(t)?), ...
Rust
0
import numpy as np import matplotlib.pyplot as plt import tkinter as tk from tkinter import simpledialog, messagebox # Boîte de dialogue pour les paramètres root = tk.Tk() root.withdraw() # Cacher la fenêtre principale # Valeurs par défaut pour l'inox (paramètres C3 dans l'article) default_delta_nm = 18 # nm defau...
Python
1
�</button> Clock = 59726, /// <button class='icomoon' id='\u{e94f}' onclick='navigator.clipboard.writeText(this.id)'></button> ClockR = 59727, /// <button class='icomoon' id='\u{e9c1}' onclick='navigator.clipboard.writeText(this.id)'></button> Cloud = 59841, /// <button class='icomoon' id='\u{e9c4}' onclick='navig...
Rust
0
""" A management command, designed to be run once by Open edX Operators, to obfuscate learner PII from the `Certificates_GeneratedCertificate` table that should have been purged during learner retirement. A fix has been included in the retirement pipeline to properly purge this data during learner retirement. This can...
Python
1
from typing import List import ase import pandas as pd import os from mof_benchmark.experiments.scripts.common.runner import TaskRunner from mof_benchmark.experiments.scripts.utils import logger from mof_benchmark import base_dir class EnergyRunner(TaskRunner): def __init__( self, calculator: st...
Python
1
able(&self, received_pressure: Pressure) -> f64 { if received_pressure.get::<psi>() > Self::MIN_PRESSURE_ALLOWED_TO_MOVE_ACTUATOR_PSI { (received_pressure.get::<psi>() / Self::PRESSURE_FOR_MAX_BRAKE_DEFLECTION_PSI) .min(1.) .max(0.) } else { 0. ...
Rust
0
operand: Arc<Expression<'a>>, }, Immediate(Immediate<'a>), } #[derive(Debug)] pub enum TernaryOperatorKind { Conditional, } #[derive(Debug)] pub enum BinaryOperatorKind { Add, // + Sub, // - Mul, // * Div, // / Mod, // % Do...
Rust
0
#[error("the request failed")] RequestFailed(#[from] reqwest::Error), #[error("unable to create the query string")] InvalidQueryString(#[from] serde_qs::Error), #[error("failed to serialize struct into json")] InvalidJson(#[from] serde_json::Error), } <reponame>alvra/rsass<gh_stars>0 //! Tests auto-converted fro...
Rust
0
video_fish_frame[video_file] = fish_count_frame # out.write(frame) cv2.destroyAllWindows() cap.release() # out.release() # Release the video writer # Display frame fish_count[video_file] = {'in_count': line_counter.in_count + bias, 'out_count': line_counter.out_...
Python
1
from typing import Sequence from fastapi import APIRouter, Depends, status from services.user import UserService from schemas.user import CreateUserSchema, GetUserSchema, UpdateUserSchema from db.models.user import User from db.filters.user import UserFilter from fastapi_filter import FilterDepends router = APIRouter(...
Python
1
32 = 36311; pub const GL_QUERY_WAIT: u32 = 36371; pub const GL_QUERY_NO_WAIT: u32 = 36372; pub const GL_QUERY_BY_REGION_WAIT: u32 = 36373; pub const GL_QUERY_BY_REGION_NO_WAIT: u32 = 36374; pub const GL_BUFFER_ACCESS_FLAGS: u32 = 37151; pub const GL_BUFFER_MAP_LENGTH: u32 = 37152; pub const GL_BUFFER_MAP_OFFSET: u32 = ...
Rust
0
state; pub mod creator; pub mod deps; pub mod ext_traits; pub mod id; pub mod name; pub mod package; pub mod run; pub mod worker_init; pub mod prelude { pub use async_trait::async_trait; pub use super::{ super::comms::Comms, context::Package as ContextPackage, init::Package as InitPackage, o...
Rust
0
class Solution: def lemonadeChange(self, bills: List[int]) -> bool: five = 0 ten = 0 for bill in bills: if bill == 5: five += 1 if bill == 10: if five > 0: five -= 1 ten += 1 ...
Python
1
OLUTION_A::NONE) } #[doc = "Dithering is done every 16 PWM frames"] #[inline(always)] pub fn dith4(self) -> &'a mut W { self.variant(RESOLUTION_A::DITH4) } #[doc = "Dithering is done every 32 PWM frames"] #[inline(always)] pub fn dith5(self) -> &'a mut W { self.variant(RE...
Rust
0
from typing import Any, Dict, Union import boto3 # type: ignore from chainlit import make_async from chainlit.data.storage_clients.base import EXPIRY_TIME, BaseStorageClient from chainlit.logger import logger class S3StorageClient(BaseStorageClient): """ Class to enable Amazon S3 storage provider """ ...
Python
1
"Auto Repeat"] # Ignore links to specified DocTypes when deleting documents # ----------------------------------------------------------- # ignore_links_on_delete = ["Communication", "ToDo"] # Request Events # ---------------- # before_request = ["library_management.utils.before_request"] # after_request = ["library...
Python
1
import warnings from pathlib import Path import argbind import numpy as np import torch from audiotools import AudioSignal from tqdm import tqdm from dac import DACFile from dac.utils import load_model warnings.filterwarnings("ignore", category=UserWarning) @argbind.bind(group="decode", positional=True, without_pr...
Python
1
specific form of one of the list terms. For example, the query term "Type 2 Diabetes" would be a narrow synonym of "Diabetes" because it is not an exact synonym, but a more specific form. The synonym is broad if the query term is a more general form of the list term. For instance, the query term "brain injur...
Python
1
# Copyright 2015-2018 Therp BV <https://therp.nl> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Document Page Tag", "version": "17.0.1.0.0", "author": "Therp BV,Odoo Community Association (OCA)", "website": "https://github.com/OCA/knowledge", "license": "AGPL-3", ...
Python
1
:clone::Clone for IMAGE_ROM_OPTIONAL_HEADER { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`*"] pub struct IMAGE_RUNTIME_FUNCTION_ENTRY { pub BeginAddress: u32, pub EndAddress: u32, pub Anonymous: IMAGE_RUNTIME_FUNCTION_ENTRY_...
Rust
0
] R:G:B 5:6:5 little endian */ pub const DRM_FORMAT_BGR565 :u32 = __fourcc_code!('B', 'G', '1', '6'); /* [15:0] B:G:R 5:6:5 little endian */ /* 24 bpp RGB */ pub const DRM_FORMAT_RGB888 :u32 = __fourcc_code!('R', 'G', '2', '4'); /* [23:0] R:G:B little endian */ pub const DRM_FORMAT_BGR888 :u32 = __fourcc_code!('B', 'G...
Rust
0
enumerate(templates): placeHolder = np.zeros(embedSize) if template == 'this_is_an_empty_event': # exist: event is '' templateVocab[template] = placeHolder elif template not in templateVocab: tokens = pure_template_tokens[template] wor...
Python
1
EXT_POINTERS_u1 { Xmm0: PM128A, Xmm1: PM128A, Xmm2: PM128A, Xmm3: PM128A, Xmm4: PM128A, Xmm5: PM128A, Xmm6: PM128A, Xmm7: PM128A, Xmm8: PM128A, Xmm9: PM128A, Xmm10: PM128A, Xmm11: PM128A, Xmm12: PM128A, Xmm14: PM128A, Xmm15: PM128A, }} STRUCT!{struct KNONVOLAT...
Rust
0
import requests from bs4 import BeautifulSoup print("是否为内网环境?(输入“y”或“n”):") webvpn = input() y_url = "http://10.132.246.246/" n_url = "https://10-132-246-246.webvpn.wzu.edu.cn/" y_cookie_hint = "csrftoken=xxxx; sessionid=xxxx" n_cookie_hint = "csrftoken=xxxx; sessionid=xxxx; _webvpn_key=xxxx; webvpn_username=xxxx" i...
Python
1
TCH_STACK_TOP_SHIFT_UP: hb_ot_math_constant_t = 28; pub const HB_OT_MATH_CONSTANT_STRETCH_STACK_BOTTOM_SHIFT_DOWN: hb_ot_math_constant_t = 29; pub const HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_ABOVE_MIN: hb_ot_math_constant_t = 30; pub const HB_OT_MATH_CONSTANT_STRETCH_STACK_GAP_BELOW_MIN: hb_ot_math_constant_t = 31; pub...
Rust
0
import os, xbmc, xbmcgui def write_igr_file(): try: if not os.path.isdir('E:\\CACHE'): makedirs('E:\\CACHE') with open("E:\\CACHE\\LocalCache20.bin","w") as tmp: for xbe in sorted(os.listdir(xbmc.translatePath("Special://root/"))): if xbe.endswith('.xbe'): tmp.write(xbmc.translatePath("Special://root/"+xbe)...
Python
1
# -*- coding: utf-8 -*- import unittest from securetea.lib.ids.r2l_rules.syn_flood import SynFlood import scapy.all as scapy from securetea.logger import SecureTeaLogger try: # if python 3.x.x from unittest.mock import patch except ImportError: # python 2.x.x from mock import patch class TestSynFlood(un...
Python
1
, description=f"Save the {task_type.value} dataset settings", deprecated=True, response_model_exclude_none=True, response_model=TokenClassificationSettings, )(save_settings) @deprecate_endpoint( path=base_endpoint, new_path=new_base_endpoint, router_metho...
Python
1
"""Tests for method_signature.""" from inspect import signature import unittest from vertexai.generative_models import GenerativeModel as VertexAIGenerativeModel from google.generativeai import GenerativeModel as GoogleAIGenerativeModel from sdk_schema_tests import common_contract _VERTEX_AI_SDK_NAME = "Vertex AI S...
Python
1
= *self.watermark(); let window_in_flow_dispatch = self .panes_mut() .panes_to_dispatch(rowtime) .map(|pane| pane.dispatch(expr_resolver, &tuple, arg.clone())) .fold(WindowInFlowByWindowTask::zero(), |acc, window_in_flow| { ...
Rust
0
base: get!(clouds, "base")?, density: get!(clouds, "density")?, thickness: get!(clouds, "thickness")?, iprecptns: get!(clouds, "iprecptns")?, }) } }; // Note: `weather.visibility` is always the ...
Rust
0
LinkCmd { source_id: String, target_id: String, predicate: String, source_uri: String, target_uri: String } impl SetSemanticTypeCmd { pub fn deserialize(val: &Value) -> SetSemanticTypeCmd { SetSemanticTypeCmd { node_id: "".to_owned(), source_uri: "".to_owned(), predicate: "".to_owned(...
Rust
0
0m "#]]; expectation.assert_eq(&error) } #[test] fn mapping_unique_with_a_name_that_is_too_long_should_error() { let dml = indoc! {r#" datasource test { provider = "mysql" url = "mysql://root:prisma@127.0.0.1:3309/ReproIndexNames?connection_limit=1" } model Use...
Rust
0
let num_formal_args = arg_tys.len(); for (i, arg_expr) in arg_exprs.iter().enumerate() { if i == 0 && ignore_self { continue; } let arg_ty = if i >= num_formal_args { assert!(variadic); common:...
Rust
0
()) .stdout(Stdio::piped()) .spawn() .context("Couldn't start watchman watch")?; let output = watchman .wait_with_output() .context("Failed to wait on `watchman watch`")?; ensure!(output.status.success(), "`watchman watch` failed"); Ok(()) } //! **mazes** is a maze ...
Rust
0
continue assert name in REGISTERED_METRIC_TABLES, ( f"Metric table name {name} is not registered" ) enabled.add(name) return enabled def is_metric_table_enabled(name: str) -> bool: return name in enabled_metric_tables() def get_metric_table(name: str) -> MetricTable: ...
Python
1
.get() } /// Current heart rate (bpm) /// /// # Examples /// ``` /// let value = person.health.heart_rate(); /// ``` pub fn heart_rate(&self) -> f32 { self.heart_rate.get() } /// Current top blood pressure (mmHg) /// /// # Examples /// ``` /// let value = person.healt...
Rust
0
list of model variables to build SGD variables on. """ super().build(var_list) if hasattr(self, "_built") and self._built: return self.momentums = [] for var in var_list: self.momentums.append( self.add_variable_from_reference( ...
Python
1
e, opt.num_joints, 3).to(device) for idx in range(0, num_seqs, opt.batchSize): batch_data = data[idx:idx + opt.batchSize] keypoints_3d[:len(batch_data)] = torch.Tensor(batch_data).to(device) # Set initial pose and shape if idx == 0: pred_betas[:len(batch_data)] = init_...
Python
1
m dado para exibir no gráfico dos tipos de trabalho.") with col_graf4: if not df_filtrado.empty: df_ds = df_filtrado[df_filtrado['cargo'] == 'Data Scientist'] media_ds_pais = df_ds.groupby('residencia_iso3')['usd'].mean().reset_index() grafico_paises = px.choropleth(media_ds_pais, ...
Python
1
import tkinter as tk from tkinter import * import pygame win = tk.Tk() win.title("IBM") win.geometry("600x500+10+20") pygame.mixer.init() def play(): pygame.mixer.music.load("C:\Training\PycharmProjects\IBMBatch03\Day10\music.wav") pygame.mixer.music.play(loops=0) lbl= Label(win, text="MUSIC PLAYER", bd=9, ...
Python
1
val => val, }; lsn = Some( val.into_integral() .ok_or_else(|| anyhow!("\"lsn\" is not an integer"))?, ); } _ => { field.decode_field...
Rust
0
), (_, Value::Image(_)) => tf1x_image_metadata(), (_, Value::Audio(_)) => tf1x_audio_metadata(), (Some(mut md), _) => { // Use given metadata, but first set data class based on plugin name, if known. match md.plugin_data.as_ref().map(|pd| pd.plugin_nam...
Rust
0
rt_pcd[j].unsqueeze(0) metrics = EMD_CD(_points.expand(n, -1, -1), part_pcd, 32, reduced=False) close_percent_s = (metrics['MMD-CD'] < 0.02).sum() close_percent_m = (metrics['MMD-CD'] < 0.03).sum() close_percent_l = (metrics['MMD-CD'] < 0.04).sum() print(close_percent_s, close_pe...
Python
1
# 環境変数からURLリストを読み込み、データを取得 _, version_summary = fetch_multiple_plugins() # 過去1時間以内に更新されたプラグインのみをフィルタリング recent_updates = filter_recent_updates(version_summary, hours=1) # 更新がない場合は明示的にログに出力 if not recent_updates: ...
Python
1
j. pub fn unwrap_result(val: StdResult<Robj, impl Display>) -> Robj { match val { Ok(obj) => obj, Err(err) => { let msg = format!("{}", err); unsafe { Rf_error(msg.as_ptr() as *const raw::c_char); } unreachable!("Code should be unreachable after call R error"); }, } } <reponame>Sora1248/realsens...
Rust
0
import django.utils.timezone import model_utils.fields from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): # lint-amnesty, pylint: disable=missing-class-docstring dependencies = [ ('course_overviews', '0014_courseoverview_certificate_available...
Python
1
#!/usr/bin/env python3 import sys import os from aws_calls.aws_pdf_to_text import transcribe_pdf_to_text def main(): AWS_REGION = os.getenv('AWS_REGION') BUCKET_NAME = os.getenv('BUCKET_NAME') print("DEBUG: AWS_REGION=", AWS_REGION, "BUCKET_NAME=", BUCKET_NAME) if len(sys.argv) < 2: print("usa...
Python
1
esult::Success(previous) } } }); let res = runtime.block_on(future); assert_eq!(res, Ok(3)); assert_eq!(counter, 4); } } <reponame>ImmemorConsultrixContrarie/vim-clap<filename>crates/fulf/src/interface/mod.rs use { crate::{ bytelines::{ByteLine...
Rust
0
me::client::ClientGame; pub use crate::game::host::HostGame; pub const GAME_CANVAS_WIDTH: f32 = 2.0 * PLAYER_DIAMETER + PITCH_WIDTH + 2.0 * PLAYER_DIAMETER; pub const GAME_CANVAS_HEIGHT: f32 = 2.0 * PLAYER_DIAMETER + PITCH_HEIGHT; pub trait Game { fn init(&mut self); fn tick(&mut self); fn ended(&self) ->...
Rust
0
first_asset_reserve, second_asset_reserve, liquidity_asset_id, liquidity_asset_amount, )?; log!( info, "get_burn_amount: ({}, {}, {}) -> ({}, {})", first_asset_id, second_asset_id, liquidity_asset_amount, first_asset_amount, second_asset_amount ); Ok((first_asset_amount, second_...
Rust
0