text
string
label_name
string
labels
int64
import frappe def execute(): frappe.reload_doc("core", "doctype", "scheduled_job_type") if frappe.db.exists("Scheduled Job Type", "repost_item_valuation.repost_entries"): frappe.db.set_value("Scheduled Job Type", "repost_item_valuation.repost_entries", "stopped", 0)
Python
1
ection('bugs').document(bug_id).set(bug_data) return jsonify({"message": "Bug updated successfully"}), 200 @app.route('/deletebug', methods=['DELETE']) def delete_bug(): api_key = request.args.get('api_key') if not api_key: return jsonify({"error": "API key is required"}), 400 # Ver...
Python
1
import ctypes from rotypes import GUID, REFGUID, HRESULT import json from rotypes.inspectable import CoTaskMemFree HCN_NETWORK = ctypes.c_void_p HCN_ENDPOINT = ctypes.c_void_p computenetwork = ctypes.windll.computenetwork HcnEnumerateNetworks = computenetwork.HcnEnumerateNetworks HcnEnumerateNetworks.argtypes = (cty...
Python
1
}, .. } => { println!("Setting cursor to \"{:?}\"", CURSORS[cursor_idx]); window.set_cursor_icon(CURSORS[cursor_idx]); if cursor_idx < CURSORS.len() - 1 { cursor_idx += 1; } else { ...
Rust
0
= [ (Let, "let"), (Ident, "five"), (Assign, "="), (Int, "5"), (Semicolon, ";"), (Let, "let"), (Ident, "ten"), (Assign, "="), (Int, "10"), (Semicolon, ";"), (Let, "let"), (Ident, "add"), (Assign, "="), (Funct...
Rust
0
from ai_infra.graph.models import Edge, ConditionalEdge from ai_infra.graph.core import CoreGraph __all__ = [ "CoreGraph", "Edge", "ConditionalEdge", ]
Python
1
nt": string, - id of credential in the wallet /// "attrs": {"key1":"raw_value1", "key2":"raw_value2"}, - credential attributes /// "schema_id": string, - identifier of schema /// "cred_def_id": string, - identifier of credential definition /// "rev_reg_id": Optional<string>, - identifier...
Rust
0
"X$R 5Vs/sHn[U5PM nnU[R"X$R 5R5VVs/sH upxUSU3PM snn- nURS;a UROSn UR...
Python
1
&(0..100).map(|ix| (ix as f32, ix as f32)).collect::<Vec<(f32, f32)>>(), /// (2.0, 24.0), /// (200.0, 200.0), /// &(0..100) /// .map(|v| { /// ( /// if v & 1 == 0 { "#222" } else { "#ddd" }, /// 0.02 + (v as f32) / 4.0, /// ) /// }) /...
Rust
0
import curses from typing import Optional def table(stdscr, data_dict: list[dict]) -> Optional[int]: COLUMN_WIDTH = 15 # 初始化 curses curses.curs_set(0) # 隐藏光标 stdscr.nodelay(True) # 设置非阻塞模式 # 当前选中的用户索引 selected_index = 0 # 清屏 stdscr.erase() stdscr.refresh() # 列标题 headers...
Python
1
eplace('/buffer ', '') buffer = command.lstrip('*') keydict[buffer] = key w.infolist_free(keylist) return w.WEECHAT_RC_OK def chanact_cb(*args): ''' Callback ran on hotlist changes ''' global keydict hotlist = w.infolist_get('hotlist', '', '') activity = [] ...
Python
1
f32x4, m32x4, u16x8, i16x8, m16x8, u8x16, i8x16, m8x16 ); #[allow(improper_ctypes)] extern "C" { #[link_name = "llvm.aarch64.neon.smaxv.i8.v8i8"] fn vmaxv_s8_(a: int8x8_t) -> i8; #[link_name = "llvm.aarch64.neon.smaxv.i8.6i8"] fn vmaxvq_s8_(a: int8x16_t) -> i8; #[link_n...
Rust
0
} impl<T> Error for ConnectError<T> where T: Error + 'static, { fn source(&self) -> Option<&(dyn Error + 'static)> { match self.0 { ErrorKind::Http(ref e) => Some(e), ErrorKind::InvalidOrigin(ref e) => Some(e), } } } impl<T> From<tower_hyper::client::ConnectError<T>...
Rust
0
import requests from .brcode import BrCODE from .statics import BASEURL class Charge(): def __init__(self, link:str, amount:int, comment:str=".", username:str=None,) -> None: """ Args:x' link (str): Username da conta da twitch que IRÁ RECEBER comment (str): Mensagem que o us...
Python
1
A, B> FromLuaExt for (A, B) where A: FromLuaExt, B: FromLuaExt, { fn from_lua_ext<'lua>(value: Value<'lua>, lua: Context<'lua>) -> Result<Self> { let err_fn = || Error::FromLuaConversionError { from: "value", to: "Tuple", message: Some("tuple table must have...
Rust
0
debugging}") # --- Handle Jump and Vertical Movement --- if move == "f" and debugging: vol+=.5 if move == "w" and on_ground: vol = .5 # Apply gravity if vol > -2: vol -= .125 # Check for a collision on the next Y position if vol != 0: step_direction = -1 if vol > 0 else 1 ...
Python
1
} fn test_vlm_v(mem: &Vec<u8>, sew: usize, lmul: i64) { fill_all_regisert(); let vl = get_vl_by_lmul(sew, lmul); if vl == 0 { return; } let set_vl = vsetvl(vl as u64, sew as u64, lmul); if set_vl == 0 { return; } assert_eq!(set_vl, vl as u64); let vl = vl as usize; ...
Rust
0
) {}", expect![[r#"fn main(a: b, c: d) {}"#]], ); } #[test] fn format_fn_header_no_ws() { check( "fn main(a:b)->f32{}", expect![[r#"fn main(a: b) -> f32 {}"#]], ); } #[test] fn format_fn_newline() { check( "fn main...
Rust
0
, 0); let max_len = tokenized_input .iter() .map(|input| input.token_ids.len()) .max() .unwrap(); let tokenized_input = tokenized_input .iter() .map(|input| input.token_ids.clone()) .map(|mut input| { input.extend(vec![0; max_len - input.len()]...
Rust
0
import json def preprocess(data): length = len(data['examples']) training_length = int(length * 0.7) dev_length = int(length * 0.2) test_length = int(length * 0.1) processed_training = parse_data(data, training_length) processed_dev = parse_data(data, dev_length) processed_test = parse_dat...
Python
1
let d: Vec<GenericConstraintEmsmaster1> = mms_file.get_table()?; mmsdm_core::sql_server::batched_insert( client, file_key, mms_file.header(), &d, "exec mmsdm_proc.InsertGenericConstraintEmsmaster1 @P1, @P2", chun...
Rust
0
("O"): print(f"Player O ({ai1_strat}) wins!") console = f"Player O ({ai1_strat}) wins!" else: print("It's a draw!") console = "It's a draw!" state = "results" # Clear game board and return to title from blank state ...
Python
1
n gfab filename #[clap(short)] pub output_gfab: String, /// Uncompressed GFA file/pipe [omit or - for standard input] #[clap(default_value = "-")] pub input_gfa: String, /// Always store segment/path name text (don't attempt to parse integer ID) #[clap(long)] pub always_names: bool, ...
Rust
0
#Step 5 from hangman_words import word_list from hangman_art import stages,logo import random chosen_word = random.choice(word_list) word_length = len(chosen_word) end_of_game = False lives = 6 print(logo) #Testing code print(f'Pssst, the solution is {chosen_word}.') #Create blanks display = [] for _ in range(wor...
Python
1
#!/usr/bin/env python3 # Copyright (C) 2025 Checkmk GmbH - License: GNU General Public License v2 # This file is part of Checkmk (https://checkmk.com). It is subject to the terms and # conditions defined in the file COPYING, which is part of this source code package. from cmk.graphing.v1 import graphs, metrics, perfom...
Python
1
from typing import List from fastapi import APIRouter, Depends from sqlalchemy.ext.asyncio import AsyncSession from starlette import status from . import crud, schemas from ..database import get_db router = APIRouter(prefix="/employee", tags=["employee"]) @router.get( "/info/{employee_id}", summary="Получе...
Python
1
sync); super::reg_json_async(rt, "op_remove_async", op_remove_async); super::reg_json_sync(rt, "op_copy_file_sync", op_copy_file_sync); super::reg_json_async(rt, "op_copy_file_async", op_copy_file_async); super::reg_json_sync(rt, "op_stat_sync", op_stat_sync); super::reg_json_async(rt, "op_stat_async", op_s...
Rust
0
tpr, thresholds else: return 1 - auc, fpr, tpr, thresholds def compute_auc_llr(preds_in, preds_ood, preds0_in, preds0_ood): """Compute AUC for LLR.""" # check if samples are in the same order # assert np.array_equal(preds_in['labels'], preds0_in['labels']) # assert np.array_equal(preds_ood['labels'], pre...
Python
1
import moondream as md from PIL import Image model = md.vl(model='./moondream-2b-int4.mf.gz') picture = './img2.jpeg' image = Image.open(picture) encoded_image = model.encode_image(image) query = 'people' point_result = model.point(encoded_image, query) print("Points:", point_result["points"]) with open('moondream-...
Python
1
ns both pre-stimulus 100 ms and post-stimulus 1000 ms # N200 time window: 126-275 post-stimulus windowed_reference = reference_waveform_data[time_start+100:time_end+100] # Standardize windowed_reference_waveform_data = (windowed_reference - np.mean(windowed_reference)) / np.std(windowed_reference) # Plot the reference...
Python
1
import numpy as np import librosa import soundcard as sc from scipy.signal import correlate, butter, filtfilt from sklearn.preprocessing import scale class GameAudioListener: used_sr = 32000 # 采样率 used_channel = 2 chunk_size = 1600 # 语音块大小 device_index = 0 # 设备编号 sample_len = 0.2 # 每次采样长度0.2...
Python
1
#!/usr/bin/env python """ ar_tags_cog.py - Version 1.0 2013-11-10 Find the COG of AR tags that are detected in the field of view and publish the result as a PoseStamped message on the /target_pose topic Created for the Pi Robot Project: http://www.pirobot.org Copyright (c) 2013 Patrick Go...
Python
1
bool(target, |b| b.build_std, |t| t.build_std) } /// Returns the list of environment variables to pass through for `build` and `target` pub fn env_passthrough(&self, target: &Target) -> (Option<&[String]>, Option<&[String]>) { self.get_vec(target, |_| None, |t| t.env.passthrough.as_deref()) } ...
Rust
0
highlighting(); } } } Err(_) => (), } let with_minimum_repetitions_arg = config.get(&mut cx, "minimumRepetitions"); match with_minimum_repetitions_arg { Ok(value) => { if v...
Rust
0
y affect future launches of \\p hGraphExec. Already enqueued"] #[doc = " or running launches of \\p hGraphExec are not affected by this call. \\p node is also"] #[doc = " not modified by this call."] #[doc = ""] #[doc = " \\param hGraphExec - The executable graph in which to set the specified node"] ...
Rust
0
SQL behavior should be sqllogictest or testdrive //! scripts. The tests here are simply too complicated to be easily expressed //! in testdrive, e.g., because they depend on the current time. use std::error::Error; use std::fs::{self, File}; use std::io::{BufRead, Write}; use std::net::TcpListener; use std::path::Path...
Rust
0
'DUF_x3_16L_official-34ce53ec.pth': '1XN6aQj20esM7i0hxTbfiZr_SL8i4PZ76', 'DUF_x4_16L_official-bf8f0cfa.pth': '1V_h9U1CZgLSHTv1ky2M3lvuH-hK5hw_J', 'DUF_x4_28L_official-cbada450.pth': '1M8w0AMBJW65MYYD-_8_be0cSH_SHhDQ4', 'DUF_x4_52L_official-4...
Python
1
# this program finds maximum and minimum numbers in a list list=[1,3,2,5,6,7,8] max_value=max(list) min_value=min(list) print("The max is :",max_value) print("The min is:",min_value)
Python
1
Code from: https://github.com/pistonly/modwtpy filters: 'db1', 'db2', 'haar', ... return: see matlab """ # filter wavelet = pywt.Wavelet(filters) h = wavelet.dec_hi g = wavelet.dec_lo h_t = np.array(h) / np.sqrt(2) g_t = np.array(g) / np.sqrt(2) wavecoeff = [] v_j_1 = x ...
Python
1
#Embedded file name: /Users/versonator/Jenkins/live/output/mac_64_static/Release/python-bundle/MIDI Remote Scripts/APC40_MkII/TransportComponent.py import Live from _Framework.Control import ButtonControl from _Framework.SubjectSlot import subject_slot from _Framework.TransportComponent import TransportComponent as Tra...
Python
1
pkey: *const EVP_PKEY) -> c_int { EVP_PKEY_get_size(pkey) } cfg_if! { if #[cfg(ossl300)] { #[inline] pub unsafe fn EVP_PKEY_id(pkey: *const EVP_PKEY) -> c_int { EVP_PKEY_get_id(pkey) } #[inline] pub unsafe fn EVP_PKEY_bits(pkey: *const EVP_PKEY) -> c_int { ...
Rust
0
# for backwards compatibility from llama_index.core.schema import QueryBundle, QueryType __all__ = ["QueryBundle", "QueryType"]
Python
1
#!/usr/bin/env python # coding=utf-8 # Copyright 2023 Statistics and Machine Learning Research Group at HKUST. All rights reserved. """A one-line summary of the module or program, terminated by a period. Leave one blank line. The rest of this docstring should contain an overall description of the module or program. ...
Python
1
impl From<PAD7FNCSEL_A> for u8 { #[inline(always)] fn from(variant: PAD7FNCSEL_A) -> Self { variant as _ } } #[doc = "Reader of field `PAD7FNCSEL`"] pub type PAD7FNCSEL_R = crate::R<u8, PAD7FNCSEL_A>; impl PAD7FNCSEL_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn...
Rust
0
from flask import Flask app = Flask(__name__) @app.route("/") def sample_text(): return "<p>Sample Text for the Website</p>"
Python
1
LAYER_EXPIRY as u64), ) .await?; } IncomingEvent::Stats(data) => { set(conn, PLAYER_STATS_KEY, data).await?; } IncomingEvent::TrackStart(data) => match decode_track(data.track.clone()).await { Ok(track) => { PLAYED_TRACKS ...
Rust
0
import io import zipfile import pytest from pytest_httpx import HTTPXMock from downloader.repo_utils import ( DownloadResult, RepositoryDownloadError, RepositorySizeExceededError, download_repo, ) @pytest.mark.asyncio async def test_download_repo_success(httpx_mock: HTTPXMock): repo_url = "https...
Python
1
from typing import List, Optional class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next class SwapNodesInPairSolution: def __init__(self, head: Optional[ListNode]): self.head: Optional[ListNode] = head def solve(self) -> Optional[ListNode]: ...
Python
1
:class:`LinearTensorConstraint`. - ``right`` -- a :class:`LinearTensor` or ``None`` (default) - ``equality`` -- boolean; whether to construct an equation or a less-or-equal inequality OUTPUT: the :class:`LinearTensorConstraint` constructed from the input data ...
Python
1
encryption_mode: Option<&'a str>, pub encryption_algorithm: Option<&'a str>, pub out: Option<&'a str>, } #[derive(Debug, PartialEq)] pub struct UnpackArgs<'a> { pub sender_key: Option<&'a str>, pub receiver_key: Option<&'a str>, pub encrypted_message: Option<&'a str>, } #[derive(Debug, PartialEq)]...
Rust
0
I代码ID", "danger") return redirect(url_for("game.lobby")) if opponent_type not in ["smart", "basic", "idiot", "mixed"]: flash("无效的对手类型", "danger") return redirect(url_for("game.lobby")) try: pos = int(player_position) if pos < 1 or pos > 7: ...
Python
1
let mut aliases = Vec::new(); 'OUTER: for (_, stages) in challenges::Challenge::all() { for challenge in stages { if challenge.alias == x { flags.sim_flags.load = challenge.gameplay.map_path(); mode = Some(challenge.gameplay); ...
Rust
0
y::model::prelude::*; use serenity::framework::standard::{ CommandResult, macros::command, }; #[command] async fn ping(ctx: &Context, msg: &Message) -> CommandResult { msg.channel_id.say(&ctx.http, "Pong!").await?; Ok(()) } #[command] #[aliases ("about")] #[description("Gives you info about the bot....
Rust
0
) -> Vec<String> { let master_1_url = format!( "{}:{}", TestSparkCluster::MASTER_1_NODE_NAME, TestSparkCluster::MASTER_1_CONFIG_PORT, ); let master_2_url = format!( "{}:{}", TestSparkCluster::MASTER_2_NODE_NAME, TestSparkCluster::MASTER_2_PORT, ); le...
Rust
0
; } Ok(0) } /// write the symbol showing whether the path is staged fn write_line_stage_mark<'w, W: Write>( &self, cw: &mut CropWriter<'w, W>, style: &CompoundStyle, staged: bool, ) -> Result<usize, termimad::Error> { Ok(if staged { cw...
Rust
0
est directory, and add this to //! it: //! //! ```ignore //! extern crate protoc_rust_copra; //! //! fn main() { //! protoc_rust_copra::run(protoc_rust_copra::Args { //! out_dir: "src/protos", //! input: &["echo.proto"], //! includes: &[], //! rust_protobuf: true //! }).expect("F...
Rust
0
pub struct FieldMarker<T>(core::marker::PhantomPinned, core::marker::PhantomData<T>); impl<T> FieldMarker<T> { /// The only way to construct a `FieldMarker`. /// /// You typically should not use this directly, and should instead use one of the safe /// initialization methods provided by the underlying...
Rust
0
el]}") # g. mostrar todos los Pokémons de los siguientes tipo: Acero, Fuego, Electrifico, Hielo if len(table_tipo.get("Acero", [])) == 0: print("No se encontro ningun pokemon del tipo Acero") else: print(table_tipo.get("Acero", [])) if len(table_tipo.get("Fuego", [])) == 0: print("No se encontro n...
Python
1
var minimumScore = function (nums, edges) { const n = nums.length; const e = Array.from({ length: n }, () => []); for (const [u, v] of edges) { e[u].push(v); e[v].push(u); } let sum = 0; for (const x of nums) { sum ^= x; } let res = Infinity; function dfs2(x...
Python
1
_submit_button("Submit") st.markdown('</div>', unsafe_allow_html=True) if submit_button and query: with st.spinner("🧠 Thinking..."): result = qa_chain.invoke({"query": query}) st.markdown("### 🤖 Answer") st.write(...
Python
1
’Amon', 4: 'Troupes d’Amon', 5: 'Troupes spéciales d’Amon', 6: 'Troupes spéciales d’Amon', 7: 'Joueur 7', 8: 'Joueur\xa08', 9: 'Joueur 9', 10: 'Joueur 10' }, 'itIT': { 3: 'Forze di Amon', 4: 'Forz...
Python
1
from dataclasses import dataclass from typing import List from shapely import STRtree, LineString, Point from Topology_Generator.dataclasses import NavigationLineString @dataclass class StationStartingLinesContainer: starting_lines : List[NavigationLineString] building_year : int class NetworkParser: def...
Python
1
ider) elif len(operate) == 3 and operate[2].isdigit(): if spider := Spiders.get(operate[1]): self.view.show_spider_urls(spider, start=int(operate[2])) elif len(operate) == 4 and operate[2].isdigit() and operate[3].isdigit(): if spider := Spiders.get(operate[1]): ...
Python
1
from odoo import _, api, fields, models class ProjectTask(models.Model): _inherit = 'project.task' lead_id = fields.Many2one('crm.lead', string="Lead", store=True)
Python
1
, void*(void)) // DYNALIB_FN(1, system_module_part1, module_system_part1_init, void(void)) // DYNALIB_FN(0, system_module_part3, module_system_part3_pre_init, void*(void)) // DYNALIB_FN(1, system_module_part3, module_system_part3_init, void(void)) // DYNALIB_FN(0, user, module_user_pre_init, void*(void)) // DYNALIB_FN(...
Rust
0
(bytes)) } pub fn deserialize<'de, D>(deserializer: D) -> Result<Vec<u8>, D::Error> where D: Deserializer<'de>, { let string = Cow::<'de, str>::deserialize(deserializer)?; let bytes = hex::decode(&*string).map_err(D::Error::custom)?; Ok(bytes) } } pub mod emptynonea...
Rust
0
is +INF // 17. +INF ** (-anything except 0,NAN) is +0 // 18. -INF ** (+odd integer) is -INF // 19. -INF ** (anything) = -0 ** (-anything), (anything except odd integer) // 20. (anything) ** 1 is (anything) // 21. (anything) ** -1 is 1/(anything) // 22. (-anything) ** (integer) is (-1)**(i...
Rust
0
DockPoint::TopRight, "Top Right Dialog!", &show_overlay, ); let bottom_left = generic_dialog( top_right, DockPoint::BottomLeft, "Bottom Left Dialog!", &show_overlay, ); let bottom_center = generic_dialog( bottom_left, DockPoint::BottomCente...
Rust
0
_TARGET_DIR', 'target') default_root = (ROOT_DIR / cargo_target_dir / 'debug').resolve() return os.environ.get('NEAR_ROOT', str(default_root)) DEFAULT_CONFIG: Config = { 'local': True, 'near_root': get_near_root(), 'binary_name': 'neard', 'release': False, } CONFIG_ENV_VAR = 'NEAR_PYTEST_CONFI...
Python
1
if style == 'serif': cls = Fonts.serief if style == 'bold_cool': cls = Fonts.bold_cool if style == 'cool': cls = Fonts.cool if style == 'small_cap': cls = Fonts.smallcap if style == 'script': cls = Fonts.script if style == 'script_bolt': cls = Fon...
Python
1
9, 0x8B, 0x7E, 0x96, 0x88, 0x52, 0x1C, 0x95, 0x4B, 0x76, 0x8C, 0x59, 0xB9, 0xA6, 0x63, 0x96, 0x56, 0x26, 0x63, 0xC0, 0x8F, 0x17, 0x71, 0x2A, 0x6F, 0x9B, 0x4D, 0x82, 0x90, 0xA6, 0x2A, 0x62, 0xD3, 0xFE, 0x14, 0xC6, 0x55, 0x23, 0x86, 0x14, 0x1F, 0xC4, 0x30, 0x66, 0x75, 0xB8, 0xA8, 0x5C, 0x43, 0x03,...
Rust
0
as usize; } // hash += std::process::id() as usize; VALID_COLORS[hash % VALID_COLORS.len()] } pub fn color_name() -> std::string::String { super::super::NAME.with(|name| { let name = name.borrow(); let color = ansi_term::Colour::Fixed(log_color(&name)); format!("{}", color.paint...
Rust
0
up. if let Some(finished_ts) = finished_ts { follower .store .actions(cluster_id) .finish_history(action_id, finished_ts, span_context) .with_context(|_| ErrorKind::StoreWrite("history finish timestamp"))?; } Ok(()) } #![allow(non_snake_case)] #![allo...
Rust
0
# Copyright (c) OpenMMLab. All rights reserved. def wrap_non_distributed_model(model, device='cuda', dim=0, *args, **kwargs): """Wrap module in non-distributed environment by device type. - For CUDA, wrap as :obj:`mmcv.parallel.MMDataParallel`. - For MPS, wrap as :obj:`mmcv.device.mps.MPSDataParallel`. ...
Python
1
nd: prefix!(zetta); "Zs", "zettasecond", "zettaseconds"; @exasecond: prefix!(exa); "Es", "exasecond", "exaseconds"; @petasecond: prefix!(peta); "Ps", "petasecond", "petaseconds"; @terasecond: prefix!(tera); "Ts", "terasecond", "teraseconds"; @gigasecond: prefix!(giga); "Gs", "gigasecond"...
Rust
0
import orbitpy.grid from orbitpy.util import OrbitState, Spacecraft from instrupy import Instrument RE = 6378.137 # radius of Earth in kilometers instru1 = Instrument.from_json('{"@type": "Basic Sensor","fieldOfViewGeometry": {"shape": "Rectangular", "angleHeight": 10, "angleWidth": 20}}') instru2 = Instrument.from_j...
Python
1
make_grid(inv(depthgt).cpu().view(*resolution[:3]).detach().unsqueeze(1),normalize=True,nrow=nrow) wandb_out["ref/depthgt"]= depthgt if "fine_rgb" in model_output: wandb_out["est/fine_rgb_pred"] = make_grid(model_output["fine_rgb"].cpu().flatten(0,1).permute(0,2,1).unflatten(-1,imsl).detach(),nrow...
Python
1
it, and for MinGW targets we just pass a dummy include dir to // ensure it's detected (apparently it isn't otherwise?) match env::var_os("DEP_Z_INCLUDE") { Some(path) => { cfg.define("ZLIB_INCLUDE_DIR", path); } None if target.contains("windows-gnu") => { cfg.define("ZLIB_INCLUDE_DI...
Rust
0
} if let Some(label) = &item.issue_label { self.labels.push((RUSTC_REPO.clone(), label.as_str())); } if let Some(stabilized) = &item.stabilized { self.issues.push((RUSTC_REPO.clone(), stabilized.pr)); } if let Some(unresolved) = &item.unresolved { ...
Rust
0
id="10", reply_to="4", conversation_id="0", speaker=Speaker(id="alice"), timestamp=5, ), Utterance( id="11", reply_to="9", conversation_id="0", speaker=Speaker(id=...
Python
1
# # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # from airbyte_cdk.sources.declarative.yaml_declarative_source import YamlDeclarativeSource """ This file provides the necessary constructs to interpret a provided declarative YAML configuration file into source connector. WARNING: Do not modify this file. "...
Python
1
__projects__ = "https://github.com/explosion/projects" __projects_branch__ = "v3"
Python
1
fb209211565c1b, "dmxk14hjbtf1", 31.652629444, -68.505224601}, {0xac094348a22bfc3f, "ph4n6k525gy3", -66.379374081, 137.916009753}, {0x9b43d3f3de631f34, "me1x7wyyddgm", -26.812375602, 69.772564993}, {0xaf39a9a15599d3b2, "pwwum8bpm79v", -52.685045619, 167.234114485}, {0xe00088d4f9ffbe6c, "w...
Rust
0
} } impl GpioArrayHandle { /// Get GPIO values pub fn get(&self) -> io::Result<([u8; 64])> { let mut data = ioctl::gpiohandle_data { values: [0; 64] }; try!(from_nix_result(unsafe { ioctl::get_line_values(self.file.as_raw_fd(), &mut data) })); Ok(data.values) ...
Rust
0
JsSeries) -> napi::Result<JsDataFrame> { let df = (&self.df * &s.series).map_err(JsPolarsErr::from)?; Ok(df.into()) } #[napi] pub fn rem(&self, s: &JsSeries) -> napi::Result<JsDataFrame> { let df = (&self.df % &s.series).map_err(JsPolarsErr::from)?; Ok(df.into()) } ...
Rust
0
ls])) if uncalled and not is_final_step: reason = f"{NON_USER_MSG_PREFIX}ToolRuleViolated: You must call {', '.join(uncalled)} at least once to exit the loop." return True, reason, None # No required tools remaining → end turn return False, None, Letta...
Python
1
from torchtune.modules.transformer import TransformerDecoder from torchtune.models import llama3_2 def llama3_2_1B() -> TransformerDecoder: return llama3_2.llama3_2( vocab_size=128_256, num_layers=16, num_heads=32, num_kv_heads=8, embed_dim=2048, max_seq_len=2048, ...
Python
1
ry_deserialize::<TestFloatEnum>().unwrap(); } #[test] #[should_panic(expected = "invalid type: string \"true\", expected a boolean")] fn test_parse_off_bool() { // using a struct in an enum here to make serde use `deserialize_any` #[derive(Deserialize, Debug)] #[serde(tag = "tag")] enum TestBoolEnum { ...
Rust
0
s':'false', 'warn_vec_size':'false'}) self.assertEqual(params.prime_bits, [60, 20, 60, 60, 60, 60]) progc, params, signature = self.assert_compiles_and_matches_reference(prog, config={'rescaler':'always', 'balance_reductions':'true', 'warn_vec_size':'false'}) self.assertEqua...
Python
1
ancy"); if let Some(var_1515) = &input.tenancy { scope_1514.string(var_1515.as_str()); } Ok(()) } #[allow(unused_mut)] pub fn serialize_structure_crate_model_spot_market_options( mut writer: aws_smithy_query::QueryValueWriter, input: &crate::model::SpotMarketOptions, ) -> Result<(), aws_smi...
Rust
0
: &[f32], out_normalized: &mut [f32]) { let min_len = std::cmp::min(in_values.len(), out_normalized.len()); let input = &in_values[..min_len]; let output = &mut out_normalized[..min_len]; for i in 0..min_len { output[i] = self.normalize_generic_float(input[i]); } ...
Rust
0
, $offset)) }; (@inst STRINGZ $str:literal) => { Some(Stringz($str)) }; (@inst TRAP $vect:expr) => { Some(Trap($vect)) }; (@inst ZERO $dst:expr) => { Some(And2($dst, $dst, 0)) }; (@orig ORIG $orig:literal) => { Some($orig) }; (...
Rust
0
n_samples = x.shape[x.ax_sample] n_features = x.shape[x.ax_coord] shape = np.array(x.shape) n_input_features = self.n_features_in_ if n_features != n_input_features: raise ValueError("x shape does not match training shape") shape[-1] = self....
Python
1
""" Plugin for ResolveURL Copyright (C) 2018 gujal 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 3 of the License, or (at your option) any later version. ...
Python
1
= 8330; pub const WRIGGLING_MAGGOTS_SEED: u16 = 8331; pub const BED_BUGS: u16 = 8332; pub const BED_BUGS_SEED: u16 = 8333; pub const WORM: u16 = 8334; pub const WORM_SEED: u16 = 8335; pub const BRAIN_BLOCK: u16 = 8336; pub const BRAIN_BLOCK_SEED: u16 = 8337; pub const INSECT_GLUE_WALLPAPER: u16 = 8338; pub const INSEC...
Rust
0
sertIs(suggest_name.startswith("auto_"), True) def test_none_name_with_initial_true(self): class Migration(migrations.Migration): initial = True operations = [migrations.RunSQL("SELECT 1 FROM person;")] migration = Migration("0001_initial", "test_app") self.assertEq...
Python
1
import pandas as pd from napistu.constants import SBML_DFS from napistu.network import ng_utils, paths from napistu.network.constants import ( NAPISTU_GRAPH_EDGES, NET_POLARITY, ) def test_shortest_paths(sbml_dfs, napistu_graph, napistu_graph_undirected): species = sbml_dfs.species source_species = s...
Python
1
_callback( &self, _: std::rc::Rc<dyn Fn() -> rust_editor::ui::app::EditorMessages<Data>>, ) { } } /* /// Route handling for authenticated users. /// Expected form inputs are stored as Structs and defined above the corresponding route. /// /// users.rs /// ├── GET /// | └── /u/<username> /// |...
Rust
0
one, Copy, Debug, PartialEq)] pub enum PWM_2_CTL_DBCTLUPDR { #[doc = "Immediate"] PWM_2_CTL_DBCTLUPD_I, #[doc = "Locally Synchronized"] PWM_2_CTL_DBCTLUPD_LS, #[doc = "Globally Synchronized"] PWM_2_CTL_DBCTLUPD_GS, #[doc = r"Reserved"] _Reserved(u8), } impl PWM_2_CTL_DBCTLUPDR { #[do...
Rust
0
>) -> usize { buffer.push(*self as u8); buffer.push((self >> 8) as u8); 2 } fn size(&self) -> usize { 2 } } impl Codec for i16 { fn decode(buffer: &[u8]) -> Option<(usize,Self)> { Some((2, ( (buffer[0] as u16) | ((buff...
Rust
0