text
string
label_name
string
labels
int64
(p, d) = tmpw.split2(m, n).unwrap(); let f0 = F::zero(); let f1 = F::one(); let finf = F::infinity(); let work_one = &mut [f0]; // Calc undoundness and infeasibility criteria L::copy(x_s, p); self.op_k.a().op(f1, x_x, f1, p); ...
Rust
0
# Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ ( master_doc, '%s.tex' % repo, u'%s Documentation' % repo, author, 'howto'), ] # -- Options f...
Python
1
tile_addr, (t.0 % 8) as u32, (t.1 % 8) as u32, PixelFormat::BPP8, ) as u32; let color = self.get_palette_color(pixel_index, 0, 0); self.bg_line[bg][screen_x as usize] = color; } } } bitfield! { struct TileM...
Rust
0
} fn try_fix(commands: &Vec<Command>) -> Result<i64, SimpleError> { for line_to_try in 0..commands.len() { let mut test_data: Vec<Command> = commands.clone(); match test_data[line_to_try] { Command::Nop(value) => { test_data[line_to_try] = Command::Jmp(value); ...
Rust
0
el="u") myplot(ax2, xz0, xz1, yproj(u, tslice[1])) myplot(ax3, xz0, xz1, yproj(u, tslice[2])) myplot(ax4, xz0, xz1, yproj(v, tslice[0]), ylabel="v") myplot(ax5, xz0, xz1, yproj(v, tslice[1])) myplot(ax6, xz0, xz1, yproj(v, tslice[2])) myplot(ax7, xz0, xz1, yproj(w, tslice[0]), ylabel="w", xlabel="t = " + str(times[0]))...
Python
1
BuilderResult, JsError> { let mut required_wits = RequiredWitnessSet::default(); input_required_wits(&self.utxo_info,&mut required_wits); let mut required_wits_left = required_wits.clone(); let keyhash = &bootstrap.vkey().public_key().hash(); // the user may have provided more ...
Rust
0
fig, { fn drop(&mut self) { test_println!("drop OwnedEntry: try clearing data"); let should_clear = unsafe { // Safety: calling `slot::Guard::release` is unsafe, since the // `Guard` value contains a pointer to the slot that may outlive the // slab containing that...
Rust
0
H17", 14: "H20", 15: "H18", 16: "G20", 17: "J22", 18: "M21", 19: "H22", 20: "L21", 21: "H13", 22: "L19", 23: "G13", 24: "L20", 25: "K21", 26: "N22", 27: "K22", 28: "M22", 29: "L16", 30: "N20", 31: "K16", 32: "M20", # ...
Python
1
# 7) Dada uma lista contendo 10 elementos numéricos, elabore um programa que verifique se um # outro valor dado pertence ou não à lista. from random import randint def find(item: int, lista: list[int]) -> bool: if type(item) != int or type(lista) != list: return Exception found: bool = False for ...
Python
1
dered an outlier. verbose: Whether to log individual spline errors. Note that if bkspaces contains many values (particularly small ones) then this may cause logging pollution if calling this function for many light curves. Returns: spline: List of numpy arrays; values of the best-fit spline corre...
Python
1
, |d| { d.clock(NVMLClock::Graphics, NVMLClockId::Current) }) .await } pub async fn gfx_max_freq(id: u64) -> Result<u32> { read_device(id, "gfx_max_freq", |d| { d.max_clock_info(NVMLClock::Graphics) }) .await } pub async fn mem_freq(id: u64) -> Result<u32> { read_device(id, "me...
Rust
0
c.clone(), &mut c).unwrap(); // assert_eq!(refval, &format!("{:?}", out)); // // thunk = r#"all(. == "a")"#.parse().unwrap(); // let doc: Json = r#"{"x": "a", "y": "b"}"#.parse().unwrap(); // let refval = r#"[false]"#; // let out = thunk(doc.clone(), &mut c).unwrap(); // assert...
Rust
0
get_config function. """ mock_get_config.return_value.deploy_url = "https://example.com" def mock_component(): return rx.text("Test") pages = [ UnevaluatedPage( component=mock_component, route="external", title=None, description=None, ...
Python
1
0, 70, 80, 50, 80, 0.5], [100, 120, 130, 120, 120, 150, 100, 150, 1]] }, { 'boundary_result': [] }] output = dataset.evaluate( results, metrics, min_score_thr=0, max_score_thr=1, step=0.5) assert output['hmean-iou:hmean'] == 1 assert output['hmean-ic13:hme...
Python
1
'[Time: %s] [Iteration: %d] [D loss: %f] [G loss: %f]' % ( datetime.datetime.now() - start_time, iteration, D_loss, G_loss, ) ) # Save training samples if iteration % 100 == 0: # At l...
Python
1
from __future__ import division, print_function, absolute_import import re import glob import os.path as osp import warnings from ..dataset import ImageDataset class Market1501(ImageDataset): """Market1501. Reference: Zheng et al. Scalable Person Re-identification: A Benchmark. ICCV 2015. URL: ...
Python
1
because its content length is different."), Error::ShareNonceDifferent => String::from("Share could not be added to the set, because its nonce is different."), Error::ShareRequiredShardsDifferent => String::from("Share could not be added to the set, because it has different number of required s...
Rust
0
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
1
#[allow(unused_must_use)] fn send_notification(app_handle: tauri::AppHandle, title: String, body: String) { let config = app_handle.config(); let path = tauri::api::path::app_dir(&config).clone(); let path_cl = path.unwrap().as_path().to_str().unwrap_or("").to_string(); println!("{}", path_cl); No...
Rust
0
"""Provides code for saving and loading the history.""" from __future__ import annotations from json import JSONEncoder, dumps, loads from pathlib import Path from typing import Any from httpx import URL from ..utility import is_likely_url from .data_directory import data_directory def history_file() -> Path: ...
Python
1
fy_name_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _) } } fn connect_property_parameter_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f)); connect(self.to_glib_none...
Rust
0
_raw_progress_bar = False callback(pending.decode("utf-8", "ignore")) pending = b"" else: if c in b"-.\n" or pending.endswith(progress_bar_dash): callback(pending.decode("utf-8", "ignore")) pending = b"" # Process remaining text ...
Python
1
C" { pub fn DAQmxGetBufInputOnbrdBufSize(taskHandle: TaskHandle, data: *mut uInt32) -> int32; } extern "C" { pub fn DAQmxGetBufOutputBufSize(taskHandle: TaskHandle, data: *mut uInt32) -> int32; } extern "C" { pub fn DAQmxSetBufOutputBufSize(taskHandle: TaskHandle, data: uInt32) -> int32; } extern "C" { ...
Rust
0
uct proc_rlimit_control_wakeupmon { pub wm_flags: u32, pub wm_rate: i32, } #[test] fn bindgen_test_layout_proc_rlimit_control_wakeupmon() { assert_eq!( ::std::mem::size_of::<proc_rlimit_control_wakeupmon>(), 8usize, concat!("Size of: ", stringify!(proc_rlimit_control_wakeupmon)) ...
Rust
0
import logging import aiohttp import base64 from typing import List, Dict, Optional from markdown import Markdown from model import RecognitionTaskModel from model.recognition_task_model import AnalysisModel from settings import DBSettings class BaseAPIHandler: async def send_message( self, pro...
Python
1
vels_explored': len(state.levels), 'steps_taken': state.steps_taken, 'encounters_faced': state.encounters_faced, 'treasures_found': state.treasures_found, 'traps_triggered': state.traps_triggered } def get_current_dungeon(self) -> Optional[DungeonState]: ...
Python
1
et(_candidates) == {_W4A8, _FP16} """ Test 6: AMP not enabled """ mocks = run_auto_quant_optimize(param_bw=4, output_bw=8, amp_candidates=[]) # Adaround should have been called only once with W4 assert mocks.apply_adaround.call_count == 1 assert mocks.GreedyMixe...
Python
1
title_demos_list, title_slider_vel_iter, title_slider_pos_iter, title_slider_ccd_substeps, title_warmstart_coeff, title_frequency, backends_list, demos_list, button_pause, button_single_step, button_restart, button_quit, bu...
Rust
0
pub struct GenerateFile; impl SourceGenerator for GenerateFile { fn generate_file( &self, _args: syn::AttributeArgs, _file: &syn::File, ) -> Result<Option<TokenStream>, anyhow::Error> { Ok(Some(quote! { #[doc = r" Some generated comment here"] struct Hell...
Rust
0
ent dynamite exe path persepolisexetray = '"{}" --tray'#.format(parent.exec_dictionary['exec_file_path']) # add dynamite to startup winreg.SetValueEx(key, 'main', 0, winreg.REG_SZ, persepolisexetray) # Close connection winreg.CloseKey(key) # remove s...
Python
1
import re pat = "br{2,}[aeiouy]" s = input() if re.match(pat, s): print("Jebb") else: print("Neibb")
Python
1
from rich.panel import Panel from rich.syntax import Syntax from rich.markdown import Markdown from rich.text import Text from typing import Any, Dict, Iterator, AsyncIterator, Union, Generator from rich.console import Console from rich.live import Live from enums import ROLE_TYPE import time class MessageRenderer: ...
Python
1
) = fstatat( resolved.dirfd().as_raw_fd(), resolved.path(), AtFlags::AT_SYMLINK_NOFOLLOW, ) { if SFlag::from_bits_truncate(stat.st_mode).contains(SFlag::S_IFSOCK) { return Err(...
Rust
0
reach_div_(avg, -lr) torch._foreach_addcdiv_(grouped_params, grouped_grads, avg) else: torch._foreach_addcdiv_(grouped_params, grouped_grads, avg, value=-lr) @_disable_dynamo_if_unsupported(single_tensor_fn=_single_tensor_rmsprop) def rmsprop( params: List[Tensor], ...
Python
1
rn self.zopeFileUpload(resourceType, currentFolder, count) return self.sendUploadResults( 0 ) class FCKeditorRequest(object): "A wrapper around the request object" def __init__(self, context=None): r = context.REQUEST self.request = r def has_key(self, key): return self.request.has_key(key) def get(self,...
Python
1
ATIN LETTER SMALL CAPITAL L "ᴌ", // U+1D0C: LATIN LETTER SMALL CAPITAL L WITH STROKE "Ḷ", // U+1E36: LATIN CAPITAL LETTER L WITH DOT BELOW "Ḹ", // U+1E38: LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON "Ḻ", // U+1E3A: LATIN CAPITAL LETTER...
Rust
0
""" Update brainzplayer preferences for the user. A user token (found on https://listenbrainz.org/settings/) must be provided in the Authorization header! :reqheader Authorization: Token <user token> :statuscode 200: brainzplayer preferences updated. :statuscode 400: Bad request. See error messa...
Python
1
0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ]; pub const CURVE_COF: [Chunk; NLEN] = [ 0x11FF7F,0x80010,0x0,0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ]; pub const CRU: [Chunk; NLEN] = [ 0xDD794A9, 0x1DE138A3, 0x2BCCE90, 0xC746127, 0x15223DDC, 0x1D...
Rust
0
sync16_tol3<u16>, Single16Detector, TwosComplement16Comparator::<SW, 3> ); impl_sync!( sync16_tol4<u16>, Single16Detector, TwosComplement16Comparator::<SW, 4> ); impl_sync!(sync32_tol0<u32>, Single32Detector, Exact32Comparator::<SW>); impl_sync!( sync32_tol1<u32>, Single32Detector, ...
Rust
0
# Copyright (C) 2017-2025 Pier Carlo Chiodi # # 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. # # This program is distri...
Python
1
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2021, Cisco Systems # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = r""" --- module: organizations_snmp_info short_description: Information module for organizations _snmp description: - Get all organ...
Python
1
Default)] pub struct TrackTable { pub tracks: Vec<FullTrack>, pub selected_index: usize, pub context: Option<TrackTableContext>, } #[derive(Clone)] pub struct SelectedShow { pub show: SimplifiedShow, } #[derive(Clone)] pub struct SelectedFullShow { pub show: FullShow, } #[derive(Clone)] pub struct Selected...
Rust
0
ent for all subjects in Semester {semester}.") for i, att in enumerate(result, start=1): if att < min_attendance: st.write(f"Subject {i}: {att}% (Below {min_attendance}%)") else: st.warning(f"No attendance record found for SRN {srn} in Semester {semester}.") ...
Python
1
pub fn to_owned(&self) -> NewIndex<'static> { NewIndex(::std::borrow::Cow::Owned(match self.0 { ::std::borrow::Cow::Owned(ref value) => value.clone(), ::std::borrow::Cow::Borrowed(value) => value.to_owned(), })) } } impl<'a> ::std::fmt::Display for...
Rust
0
the unoptimized version instead. // TODO tune threshold. return self._simple_ftt(values, offset, stride, roots_of_unity, root_stride, out); } let half = out.len() >> 1; // left self._fft(values, offset, stride << 1, roots_of_unity, root_stride << 1, &mut out[..half]); ...
Rust
0
name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ self.additional_properties_type is None: # discard varia...
Python
1
u32 = 11990; pub const DAQmx_DI_Tristate: u32 = 6288; pub const DAQmx_DI_LogicFamily: u32 = 10605; pub const DAQmx_DI_DataXferMech: u32 = 8803; pub const DAQmx_DI_DataXferReqCond: u32 = 8804; pub const DAQmx_DI_UsbXferReqSize: u32 = 10896; pub const DAQmx_DI_UsbXferReqCount: u32 = 12290; pub const DAQmx_DI_MemMapEnabl...
Rust
0
.unwrap_or(0f32) ); } fn fetch(runtime: &mut Runtime, client: &Client<HttpsConnector<HttpConnector>, Body>, path: &str) { let file_path = Path::new("assets").join(path); if !file_path.exists() { println!("Downloading `{}`..", path); let mut file = File::create(file_path).unwrap(); ...
Rust
0
# Exercise 1.1 node_feats = torch.arange(8, dtype=torch.float32).view(1, 4, 2) adj_matrix = torch.Tensor([[[1, 1, 0, 0], [1, 1, 1, 1], [0, 1, 1, 1], [0, 1, 1, 1]]]) gcn_layer = GCNLayer(c_in=2, c_out=2) gcn_layer.projection.weight.data...
Python
1
name: "John".to_string() } } }); // Salesperson Derefs to Person and Employee let msg = format!("{} made {} sales.", s.name, s.sales); assert_eq!(msg, "John made 4 sales."); assert_eq!(s.income(), 21.5 * 15.25); // implicit downcast to Person let p:&Person = &s;...
Rust
0
import random print("hello, welcome to rock paper scissors!") print("just so you know, I will win!") print("enter rock, paper, or scissor") user=input() win="tie" while win = "tie" print("choose rock, paper, or scissor") user=input() computer=random.randint(1, 3) if computer="1" computer_attack="rock" els...
Python
1
ig.policy.kind, config.policy.config)?; let path = substitute_string(config.path.as_str(), &env_vars); let appender = builder.build(path, policy)?; Ok(Box::new(appender)) } } /// Replace a string containing property placeholder with given key-value dictionary. /// Placeholder follows synta...
Rust
0
if __name__ == '__main__': from src.dlmpc import Dataset from src.dlmpc import WindowGenerator from src.dlmpc import DataLoader from src.dlmpc import BPNet from src.dlmpc import TrainModel from src.dlmpc import Calculate_Regression_metrics from src.dlmpc import plot_line from src.dlmpc ...
Python
1
from sympy import Matrix, Symbol import numpy as np def stiffness6DOF(DOFs, frame, label='K', bDOFs=None, IKeep=None): """ Return stiffness loads (force and moment) - DOFS: list of degrees of freedom, e.g. DOFs=[x, y, z, phi_x, phi_y, phi_z] - frame: frame to use for force and moment components ...
Python
1
assert!(((expect - result) / result).abs() < 0.0000001) } // test northings for (expect, result) in osgb36_n_vec.iter().zip(retval2.iter()) { assert!(((expect - result) / result).abs() < 0.0000001) } } // #[test] // // This specifically tests test point 31, ...
Rust
0
# Generated from ptml.g4 by ANTLR 4.13.1 from antlr4 import * if "." in __name__: from .ptmlParser import ptmlParser else: from ptmlParser import ptmlParser # This class defines a complete listener for a parse tree produced by ptmlParser. class ptmlListener(ParseTreeListener): # Enter a parse tree produce...
Python
1
clause_name, max ); } Some(Ok(( ScalarExpr::Column(ColumnRef { level: 0, column: n - 1, }), None, ))) } _ => None, } .unw...
Rust
0
import pandas as pd from tqdm import tqdm from examples.speech_to_text.data_utils import save_df_to_tsv import argparse if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--manifest', type=str, help='input wave directory for information enhancement') parser.add_argument('--...
Python
1
import sys # manually generated list # colors=[ # "#ff0000", # "#00ff00", # "#0000ff", # "#ffff00", # "#ff00ff", # "#00ffff", # "#ff9900", # "#ff0099", # "#00ff99", # "#99ff00", # "#9900ff", # "#0099ff", # "#ff9933", # "#ff3399", # "#99ff33", # "#9933ff", # "#33ff99", # "#3399ff" # ] # from: http://en.wikipedia.org/w...
Python
1
import pygame, sys, fun def main(screen, width, height): wybor = 500 while True: screen.fill('darkblue') font = pygame.font.Font(None, 30) text = font.render('STRZAŁKI: zmiana lokalizacji wskaźnika', 1, 'steelblue') screen.blit(text, (196,180)) text = font.render(...
Python
1
# app.py from flask import Flask from models import db from auth import jwt, authenticate_user from routes import tasks_bp from flask_jwt_extended import JWTManager app = Flask(__name__) # Congifurations app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///tasks.db' app.config['JWT_SECRET_KEY'] = 'super-secret' db.ini...
Python
1
T: Into<*mut bindings::futhark_context>, { let ctx = ctx.into(); let shape_ptr: *const i64 = futhark_u64_1d::shape(ctx, ptr); let shape = std::slice::from_raw_parts(shape_ptr, 1); Vec::from(shape) } pub fn from_vec<T>(ctx: T, arr: &[u64], dim: &[i64]) -> Result<Self...
Rust
0
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
Python
1
from django.contrib import admin from django.urls import path, include from rest_framework.routers import DefaultRouter from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView from apps.users.views import StaffViewSet from apps.attendance.views import AttendanceLogViewSet, ShiftViewSet from app...
Python
1
# String Analyzer Program # Counts uppercase, lowercase, digits, and special characters def analyze_string(input_string): uppercase_count = 0 lowercase_count = 0 digit_count = 0 special_count = 0 for char in input_string: if char.isupper(): uppercase_count += 1 elif cha...
Python
1
columns)} train_features = torch.tensor(train_features.values.astype(np.float32), device=self.device) train_labels = torch.tensor(train_labels.values.astype(np.int64), device=self.device) train_protected = torch.tensor(protected_train.astype(np.bool), device=self.device) self.X_train, ...
Python
1
path = "/sys/bus/i2c/devices/14-006f/hwmon/hwmon*/in1_input" else: path = "/sys/bus/i2c/devices/15-006f/hwmon/hwmon*/in1_input" self.assertTrue( os.path.exists(self.get_ltc_hwmon_path(path)), "psumuxmon LTC sensor path accessible", ...
Python
1
_bits) } } #[doc = "Possible values of the field `enable_set_slash_reset_plane`"] #[derive(Debug, Clone, Copy, PartialEq)] pub enum ENABLE_SET_SLASH_RESET_PLANE_R { _Reserved(u8), } impl ENABLE_SET_SLASH_RESET_PLANE_R { const _MASK: u8 ...
Rust
0
ile = file_ref .as_socket_file() .ok_or_else(|| errno!(EINVAL, "not a socket"))?; let addr_and_addr_len = get_slice_from_sock_addr_ptr_mut(addr, addr_len)?; let (src_addr, src_addr_len) = socket_file.addr()?.to_c_storage(); if let Some((addr_mut, addr_len_mut)) = addr_and_addr_len { ...
Rust
0
fn register (config: &mut Config<bool>, device: DeviceID, adress: Self::Adress){ config.device_to_adress.insert(device, adress).expect("Could not register device"); } fn get_adress(config: &Config<bool>, device: DeviceID) -> Self::Adress { *config.device_to_adress.get(&device).expect("Could not...
Rust
0
if choice in secret_word: print('Correct!') # iterate through string, and update correct guesses list with the # correct indexed character for index, char in enumerate(secret_word): if choice == char: correct_guesses[index] = choic...
Python
1
::new(false, Some(Box::new(|| now_ms()))); let inv = j8t::Invocation { filename: String::from("input.js"), input: Vec::from(code), fmt: false, rename: j8t::Rename::Off, }; let mut output = Vec::<u8>::new(); let result = match j8t::run(&mut trace, &inv, &mut output) { ...
Rust
0
# Step 8: Move the processed file to the "Processed" folder #processed_folder = makeProcessedFolder(table_name) #processed_subfolder = os.path.join(processed_folder, os.path.relpath(dirpath, source_folder)) #if not os.path.exists(processed_...
Python
1
#[global_allocator] static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; } } #[wasm_bindgen] extern "C" { fn setInterval(closure: &Closure<dyn FnMut()>, time: u32) -> i32; fn clearInterval(id: i32); #[wasm_bindgen(js_namespace = console)] fn log(s: &str); } const W: u32 = 600; co...
Rust
0
crate::serial_port_com::HOST .lock() .write_fmt(args) .expect("Printing to host serial failed"); }); } /// Prints to the host through the serial interface. #[macro_export] macro_rules! serial_print { ($($arg:tt)*) => { $crate::_print_to_serial_port(format_arg...
Rust
0
lf::Error>; fn fetch_messages( &self, filter: &MessagesFilter, ) -> Result<Vec<message::MessageFrontend>, Self::Error>; fn fetch_message(&self, id: u64) -> Result<Option<message::MessageDetails>, Self::Error>; fn fetch_log(&self, filter: &LogsFilter) -> Result<Vec<node_log::Item>, Sel...
Rust
0
wdown_writes_trigger: 20, l_naught0_stop_writes_trigger: 36, max_jet_bundle_bytes: ReadableSize::gb(2), jet_bundle_pri: CompactionPriority::MinOverlappingRatio, dynamic_l_naught_bytes: true, num_l_naughts: 7, max_bytes_for_l_naught_multiplier: 10, ...
Rust
0
_argument(format!( "compresion level may not exceed {} (was {})", MAX_COMPRESSION_LEVEL, comp_level, ))); } let n = nums.len(); if n > MAX_ENTRIES { return Err(QCompressError::invalid_argument(format!( "count may not exceed {} per chunk (was {})", MAX_ENTRIES, n, ))...
Rust
0
{}, ) else: # Changed the rival here, kill the old one, add the new one self.data.local.user.destroy_link( self.game, self.version, userid, f"friend_{i}", ...
Python
1
#!/usr/bin/env python # -*-coding:utf-8-*- """ Copyright (c) 2012 Qijiang Fan <fqj1994@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation...
Python
1
mun0330', '난다맨이야', '268501024|163840', 'gajooq', '멘탈붕괴', '589824|33718272', 'asdfrr200', '천양다이노스', '536952864|32768', 'kimmin000214', '해즈빈호텔', '589824|163840', 'heo338(2)', 'heo338', '65536|163840', 'rage815', '숲의아이', '589856|163840', 'pys0906', '도칼', '65536|163840', 'jamondang(2)', '네에줄기', '536952832|32768', 'ngurrl64...
Python
1
> DynamicUniformBuffer<T> where T: Pod, { pub fn new<'b>(device: &'b wgpu::Device) -> DynamicUniformBuffer<T> { // TODO: is this something we can enforce at compile time? assert!(align_of::<T>() % DYNAMIC_UNIFORM_BUFFER_ALIGNMENT == 0); let inner = device.create_buffer(&wgpu::BufferDesc...
Rust
0
e!(self, query, query.joins.push(join::Join::left_outer_join(from.upcast_from(), on))) } pub fn full_join(&self, from: &from::From, on: predicate::SharedPredicate) -> SelectQuery<T, L, M> { with_clone!(self, query, query.joins.push(join::Join::full_join(from.upcast_from(), on))) } pub fn left_...
Rust
0
args.len() { 3 => run(&args[1], &args[2], "package"), 4 => run(&args[1], &args[2], &args[3]), _ => { println!( "{} v{} {} {} USAGE: \t{} <COMMAND> <source> [destination] EXAMPLE: \t{} pack assets/ COMMANDS: \tpack\tPack a source directory into a vgpack \tunpack \...
Rust
0
::Serialize; #[derive(Derivative, Debug, Clone, Serialize)] #[derivative(PartialEq, Eq, Hash)] pub enum Mod<'a> { Module { body: &'a [Stmt], type_ignores: &'a [TypeIgnore], }, Interactive { body: &'a [Stmt], }, Expression { body: &'a Expr<'a>, }, FunctionT...
Rust
0
= 0; let mut mid = 0; let mut sid = 0; let mut op_err = 0 as *mut mbuf; let mut msg = [0; 128]; let mut ppid = 0; let mut chk_flags = 0; let mut ordered = 0; let mut clen = 0; if chk_type as libc::c_int == 0x40i32 { let mut chunk = 0 as *mut sctp_idata_chunk; let mut...
Rust
0
ut, stderr) = p.communicate() if p.returncode: raise IOError('Error opening file') libraries = [] for line in stdout.split('\n'): tokens = line.split() if len(tokens)>2 and tokens[1] == '(NEEDED)': match = re.match('^Shared library: \[(.*)\]$', ' '.join(tokens[2:])) ...
Python
1
32) -> HAL_Bool; } extern "C" { #[doc = " Clears all faults on a module."] #[doc = ""] #[doc = " @param module the module to clear"] pub fn HAL_ClearAllPCMStickyFaults(module: i32, status: *mut i32); } extern "C" { #[doc = " Sets the one shot duration on a solenoid channel."] #[doc = ""] #[d...
Rust
0
from .crestereo import CREStereo as Model
Python
1
esel::prelude::*; use std::io; use std::{thread, time}; #[derive(Clone)] pub struct Database { uri: String, } impl Database { pub fn new(uri: &str) -> Database { Database { uri: String::from(uri), } } pub fn get_conn(&self) -> Result<PgConnection, diesel::ConnectionError> ...
Rust
0
ng feature Args: feature: encoder feature [B,H,W,C] dynamic_map: dynamic_map feature [B,H,W] n_clusters: number of clusters Returns: normalized_map: normalized cluster map [B,H,W] cluster_labels: reshaped cluster labels [B,H,W] """ # data preprocessi...
Python
1
#!/usr/bin/env python3 """ Minimal reproduction test for the C API memory corruption crash. This test isolates the exact crash to help debug the memory management issue. """ import os import sys import signal import traceback from cffi import FFI def setup_crash_handler(): """Set up signal handler to catch crash...
Python
1
# coding: utf-8 # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
Python
1
est.raises(ValueError): SecurityValidator.validate_url("vbscript:foo()", "URL") with pytest.raises(ValueError): SecurityValidator.validate_url("about:blank", "URL") with pytest.raises(ValueError): SecurityValidator.validate_url("chrome://settings", "URL") with pytest.raises(ValueErro...
Python
1
pub connected_since: Option<String>, #[serde(rename = "clientVersion", skip_serializing_if = "Option::is_none")] pub client_version: Option<String>, #[serde(rename = "producerName", skip_serializing_if = "Option::is_none")] pub producer_name: Option<String>, #[serde(rename = "address", skip_seri...
Rust
0
ts_and_response,empty_aggregate_registry}; pub use connection::wait_for_server as wait_for_server; pub use handler_registry::empty_handler_registry as empty_handler_registry; pub use handler_registry::{HandlerRegistry,TheHandlerRegistry}; pub use event_processor::{TokenStore,event_processor}; pub use event_query::query...
Rust
0
const SDHCI_DATA_AVAILABLE = 0x0000_0800; const SDHCI_CARD_PRESENT = 0x0001_0000; const SDHCI_WRITE_PROTECT = 0x0008_0000; const SDHCI_DATA_LVL_MASK = 0x00F0_0000; const SDHCI_DATA_LVL_SHIFT = 20; const SDHCI_DATA_0_LVL_MASK = 0x0010_0000; const SDHCI_CMD_LVL = 0x...
Rust
0
"""Load a meadow dataset and create a garden dataset.""" from owid.catalog import Table from owid.catalog import processing as pr from etl.helpers import PathFinder, create_dataset # Get paths and naming conventions for current step. paths = PathFinder(__file__) CONTRIBUTORS = [ "domestic_resources", "g7_c...
Python
1
import base64 import os from src.settings import settings os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = "https://cloud.langfuse.com/api/public/otel" LANGFUSE_AUTH = base64.b64encode( f"{settings.LANGFUSE_PUBLIC_KEY}:{settings.LANGFUSE_SECRET_KEY}".encode() ).decode() os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = set...
Python
1
import torch import torchvision.datasets import torchvision.transforms as transforms from torch.utils.data import DataLoader from advGAN import AdvGAN_Attack from models import MNIST_target_net use_cuda=True image_nc=1 epochs = 60 batch_size = 128 BOX_MIN = 0 BOX_MAX = 1 # Define what device we are using print("CUDA ...
Python
1