text
string
label_name
string
labels
int64
applied. N(RRt callHandlers(RiR((s&D:\Python27_64\lib\logging\__init__.pyRscCs<tz&||jkr,|jj|nWdtXdS(s; Add the specified handler to this logger. N(R1RRR2(Rit...
Python
1
d::mock("boz")), ) .done() .run_with_handle(); let subscriber = subscriber.with(filter); with_default(subscriber, || { tracing::trace_span!("foo", bar = 1); tracing::trace_span!("baz", boz = 1); }); finished.assert_finished(); } use crate::{ analyzer::{units:...
Rust
0
nalg.det(jac) xjac=np.linalg.inv(jac) if self.jacdet<1.0e-16: sys.exit('error: you have one singular 1d mesh !!!') if flag==True: for i in range(self.nNodes): temp1=self.shape_grad[i,1-1]*xjac[0,0]+self.shape_grad[i,2-1]*xjac[0,1] temp2=sel...
Python
1
# # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # from dataclasses import InitVar, dataclass from typing import Any, List, Mapping, Optional import dpath.exceptions import dpath.util from airbyte_cdk.sources.declarative.transformations import RecordTransformation from airbyte_cdk.sources.declarative.types ...
Python
1
02,是事先找到的,没什么特别技巧,下次ID号一变,程序就玩蛋 # 非原书原代码,原书原代码是:record() 它不能这样用 r1.record_2("1202500002", "高数", 80) r1.record_2("1202500002", "线代", 80) r1.record_2("1202500002", "拓扑", 70) r1.record_2("1202500002", "数论", 70) print("选课后:\n\t",r_us1.department(), r_us1.en_year(), r_us1.scores(),r_us1.get_cla...
Python
1
""" Write a function to return two words from a list of words starting with letter 'p'. assert start_withp(["Python PHP", "Java JavaScript", "c c++"])==('Python', 'PHP') """ def start_withp(words): p_words = [word for word in words if word.startswith('p')] return p_words[0], p_words[1] assert start_withp(["Pyt...
Python
1
'I', b'7', b'J', b'7', b'K', b'7', b'L', b'7', b'M', b'7', b'N', b'7', b'O', b'7', b'P', b'7', b'Q', b'7', b'R', b'7', b'S', b'7', b'T', b'7', b'U', b'7', b'V', b'7', b'W', b'8', b'0', b'8', b'1', b'8', b'2', b'8', b'3', b'8', b'4', b'8', b'5', b'8', b'6', b'8', b'7', b'8', b'8', b'8', b'9', b'8', b'A', b'8...
Rust
0
from django.urls import path from . import views urlpatterns = [ path('', views.index), path('editPage/', views.editPage), path('addStudent/', views.addStudent), path('editStudent/<int:id>/', views.editStudent), path('editStudent/<int:id>/updateStudent/', views.updateStudent), path('deleteStude...
Python
1
from fastapi import FastAPI from fastapi.middleware import Middleware from fastapi.middleware.cors import CORSMiddleware import uvicorn import os import multiprocessing from routers import general from routers import filer from routers import stocks from routers.utils import ( log_config, initialize, ) APP...
Python
1
=0) dlogits_fwd_a = jnp.einsum('mc,nm->nc', yx2, dlogits_bwd_a) / temp dlogits_fwd_b = jnp.einsum('mc,nm->nc', xy2, dlogits_bwd_b) / temp dx2_norm = l2_norm_grad(x2, dlogits_fwd_a) dy2_norm = l2_norm_grad(y2, dlogits_fwd_b) dloss_x = jnp.einsum( 'npgc,gcd,nd->npg', dx_avg, w_, dx2_norm) + j...
Python
1
# MIT License # # Copyright (c) 2024 DALabNOVA # # 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 the rights # to use, copy, modify, merge, pu...
Python
1
!(imm8 >= 0 && imm8 <= 255); let shf: i32x8 = vpshldvd256( a.as_i32x8(), b.as_i32x8(), _mm256_set1_epi32(imm8).as_i32x8(), ); let zero = _mm256_setzero_si256().as_i32x8(); transmute(simd_select_bitmask(k, shf, zero)) } /// Concatenate packed 32-bit integers in a and b producing ...
Rust
0
None).await; assert!(r.is_err()); let p = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("js/main.ts"); let specifier = ModuleSpecifier::resolve_url_or_path(p.to_str().unwrap()).unwrap(); let r = fetcher.fetch_source_file(&specifier, None).await; assert!(r.is_ok()); } #...
Rust
0
========== // Canvas score - Test 1: 542 - Test 2: 368 // WebGL score - Test 1: 1390 - Test 2: 1342 // Total score: 3642 <reponame>jeremywiebe/xi-editor // Copyright 2018 The xi-editor Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with t...
Rust
0
import os import socket from backend.configs import API_SERVER from backend.configs import LLM_MODEL import subprocess from backend.server.chat.models import model_list def get_local_ip(): try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(("8.8.8.8", 80)) # Connect to a known ext...
Python
1
16 data in"] pub struct CRC16DI_W<'a> { w: &'a mut W, } impl<'a> CRC16DI_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { self.w.bits = (self.w.bits & !0xffff) | (value as u16 & 0xffff); self.w } } impl R { #[d...
Rust
0
x00], [0x00, 0x00, 0x00], ], ] }; impl PaletteLut { // NOTE: this expects the color emphasis bits to be in the low 3 bits of 'emphasis' pub fn get(&self, mut color_byte: u8, greyscale: bool, emphasis: u8) -> u32 { if greyscale { color_byte &= 0x30; } else { c...
Rust
0
#!/usr/bin/env python3 from setuptools import setup version = "0.3.1" setup( name="icalevents", packages=["icalevents"], install_requires=[ "urllib3", "icalendar", "pytz", "datetime", ], version=version, description="iCal downloader and parser", author="Mart...
Python
1
id: u32, value: f32) -> bool { unsafe { DisplayServicesSetBrightness(display_id, value) }; get_brightness(display_id) .map(|brightness| brightness == value) .unwrap_or(false) } #[link(name = "DisplayServices", kind = "framework")] extern "C" { fn DisplayServicesGetBrightness(dispaly_id: u32...
Rust
0
ePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_9.addItem(spacerItem23) self.horizontalLayout_9.addLayout(self.verticalLayout_9) self.gridLayout.addWidget(self.NormalIconButton_5, 4, 0, 1, 1) self.verticalLayout_2.addLayout(self.gridLayout) self.SmoothScroll...
Python
1
#!/usr/bin/env python from __future__ import absolute_import from distutils.core import setup import sys from .__init__ import __version__ setup(name='pyfiscalprinter', version=__version__, description='Drivers for fiscal printers (Epson & Hasar) Argentina', author='Guillermo Narvaja', a...
Python
1
self)?; self.skip(4) // qtype(2) + qclass(2) } #[inline] pub fn skip_rr(&mut self) -> Result<()> { skip_domain_name(self)?; self.skip(8)?; // Type(2) + Class(2) + TTL(4) let rd_len = self.u16_be()?; self.skip(rd_len as usize) } } use super::{FunctionId, Parameter...
Rust
0
from bs4 import BeautifulSoup from search_engines.engine import SearchEngine from search_engines.config import PROXY, TIMEOUT, FAKE_USER_AGENT class Metager(SearchEngine): '''Searches metager.org''' def __init__(self, proxy=PROXY, timeout=TIMEOUT): super(Metager, self).__init__(proxy, timeout) ...
Python
1
yet. # tests: # cequantile(0., a, b, p)==quantiles(a, b, p) # cequantile(t, a, 1., p)==cequantile(0., a, 1., p) # conditional excess quantile # t+s : Pr(Y<t+s|y>t)=p print('not tested') L = np.power((t + .0) / a, b) quantile = a * np.power(-np.log...
Python
1
} await log_message(f"Canais carregados: {channel_dict}", debug=debug) return channel_dict except Exception as e: await log_message(f"Erro ao carregar canais do JSON: {e}", debug=debug) return {} # ===========================================================...
Python
1
fn _test_fetch_script_hash_not_enough_space(data: Vec<u8>) { let mut machine = DefaultCoreMachine::<u64, SparseMemory>::default(); let size_addr = 0; let addr = 100; machine.registers_mut()[A0] = addr; // addr machine.registers_mut()[A1] = size_addr; // size_addr m...
Rust
0
import os import shutil import glob def copy_files_from_actors_folders(root_dir, target_dir): # 创建目标目录,如果不存在的话 if not os.path.exists(target_dir): os.makedirs(target_dir) # 使用glob模块来查找所有名为 .actors 的文件夹 actors_folders = glob.glob(os.path.join(root_dir, '**', '.actors'), recursive=True) ...
Python
1
assert_eq!( csp_vault.gen_key_pair(algorithm_id).unwrap_err(), CspBasicSignatureKeygenError::UnsupportedAlgorithm { algorithm: algorithm_id, } ); } } } pub fn should_sign_and_verify_with_generated_ed25519_key_pair(...
Rust
0
# main keyboards DOWNLOAD_KEY: str = "Download 📥" UPLOAD_KEY: str = "Upload 📤" LOGIN_KEY: str = "Login To Instagram 🔐" INSIGHT_KEY: str = "Insights 📈" PRIVACY_KEY: str = "Privacy 🔒" LOTTERY_KEY: str = "Lottery 🎲" BACK_KEY: str = "Back ◀️" # upload the media type keys UPLOAD_REELS_KEY: str = "Upload Reels 📤" UPL...
Python
1
) class DescribePersonTraceDetailRequest(AbstractModel): """DescribePersonTraceDetail请求参数结构体 """ def __init__(self): r""" :param _MallId: 卖场编码 :type MallId: str :param _PersonId: 客户编码 :type PersonId: str :param _TraceId: 轨迹编码 :type TraceId: str ...
Python
1
0 from AUX TImer2"] AUX_TIMER2_EV0 = 1, #[doc = "0: Edge detect IO event from the DIO(s) which have enabled contribution to IOEV_MCU_WU in \\[MCU_IOC:IOCFGx.IOEV_MCU_WU_EN\\]"] IOEV_MCU_WU = 0, } impl From<WU3_EV_A> for u8 { #[inline(always)] fn from(variant: WU3_EV_A) -> Self { variant as ...
Rust
0
# coding: utf-8 import os import sys from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError from onadata.libs.utils.backup_tools import restore_backup_from_zip class Command(BaseCommand): args = 'username input_file' help = ("Restore a zip backup of a f...
Python
1
[0] = B0_BYTE_MARKER; self.p.getx().to_int().to_bin(x); self.p.gety().to_int().to_bin(y); representation } // Encodes the key according to CBOR Object Signing and Encryption, defined in RFC 8152. pub fn to_cose_key(&self) -> Option<Vec<u8>> { const EC2_KEY_TYPE: i64 = 2; ...
Rust
0
a=input("Enter a number\n") b=a c=input("Enter a number\n") if b==c: print("value of a is {0}".format(a)) str1="hello" str2=input("Enter your name\n") print("your name is " + str2) print(f"{str2} is your name") print("{} is your name {}".format(str2,str1))
Python
1
from ultralytics import YOLO model = YOLO('runs/detect/train/weights/best.pt') metrics = model.val( data='kitti.yaml', split='val' ) print(f"mAP50-95: {metrics.box.map}") print(f"mAP50: {metrics.box.map50}")
Python
1
def __init__(self, dim, hidden_dim, dropout=0.1): super().__init__() self.net = nn.Sequential( nn.LayerNorm(dim), # 层归一化 nn.Linear(dim, hidden_dim), # 线性层 nn.GELU(), # GELU 激活函数 nn.Dropout(dropout), # Dropout 层 nn.Linear(hidden_dim, dim...
Python
1
`block_len`. #[derive(Debug, Copy, Clone)] pub struct SignatureOptions { /// Format of the signature, identified by its magic number. pub magic: SignatureFormat, /// Length of a block in bytes. /// /// Smaller blocks produce larger signatures because there are more blocks, but allow matching /...
Rust
0
dCaptureError::NoCapturedImage); }; Ok(image::ImageBuffer::from_raw(width, height, buffer).unwrap()) } } impl Drop for D3dCapturer { fn drop(&mut self) { self.session.Close().unwrap(); self.frame_pool.Close().unwrap(); } } <gh_stars>0 use aoc_runner_derive::aoc; #[aoc(day5...
Rust
0
Self::name().to_string()).with_type_from(req)) } } } } <reponame>matago/smithy-rs<filename>aws/sdk/integration-tests/qldbsession/tests/integration.rs /* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ use aws_http::user_agent::Aw...
Rust
0
correlation mechanism that enables Party V to correlate /// `message_2` and `message_3`. type = 3 is used when there is an /// external correlation mechanism that enables the parties to correlate /// all the messages. pub fn generate_message_1( self, r#type: isize, ) -> Result...
Rust
0
oxerArray; use boxer::string::BoxerString; use boxer::{ValueBox, ValueBoxPointer, ValueBoxPointerReference}; use skia_safe::font::Edging; use skia_safe::{ scalar, Font, FontHinting, FontMetrics, GlyphId, Paint, Rect, TextEncoding, Typeface, }; #[no_mangle] pub fn skia_font_default() -> *mut ValueBox<Font> { Va...
Rust
0
prime_field::fmul( prime_field::fmul( batch_inverse_vec[56+1].clone(), ctx[958 + 44].clone() ), column_val.clone() + prime_field::get_k_modulus() - ctx[708 + 44].clone() ); // Mask items for column #7. // Read the next element. column_val = prime_field::fmul( ctx[trace_query_response + 7].cl...
Rust
0
queue = Queue([GridCell(row, col, watershed_id)]) watersheds[row, col] = watershed_id while queue: cell = queue.pop() r = cell.row c = cell.col watershed_id = cell.value if (r + row_offset, c + col_offset...
Python
1
lf.total_bytes) self.ui.worker_done(self, self.really_delete) yield False def run_deep_scan(self): """Run deep scans""" logger.debug(' deepscans=%s' % self.deepscans) # TRANSLATORS: The "deep scan" feature searches over broad # areas of the file system such as the u...
Python
1
ts = len(obj_pts_per_cam[best_cam_idx]) print('Number of object points', max_pts) # filter object points to have reasonable depth MAX_DEPTH = 6. obj_pts = [] for pt in obj_pts_per_cam[best_cam_idx]: if pt[2] < MAX_DEPTH: obj_pts.append(pt) obj_pts = np.array(obj_pts).reshape...
Python
1
} } } struct NuXMVPredicate<'a>(&'a Predicate); impl fmt::Display for NuXMVPredicate<'_> { fn fmt<'a>(&'a self, fmtr: &mut fmt::Formatter<'_>) -> fmt::Result { let s: String = match &self.0 { Predicate::AND(x) => { let children: Vec<_> = x .iter() ...
Rust
0
import os import argparse from datetime import datetime import gym from agent import SacAgent def run(): parser = argparse.ArgumentParser() parser.add_argument('--env_id', type=str, default='HalfCheetah-v2') parser.add_argument('--cuda', action='store_true') parser.add_argument('--seed', type=int, de...
Python
1
ToFValue(that_); castToValue(&[ this[0] + that[0], this[1] + that[1], this[2] + that[2], this[3] + that[3], ]) } fn SubF32(this_: &Value, that_: &Value) -> Value { let this = castToFValue(this_); let that = castToFValue(that_); castToValue(&[ this[0] - that[0...
Rust
0
from generator import generator as gen from generator import make_z_normal import tensorflow as tf from absl import app, flags import cv2 import numpy as np import matplotlib.pyplot as plt import os from categories import indx2category flags.DEFINE_integer('bs', 8, 'Batch size for image generation.') flags.DEFINE_str...
Python
1
'training', os.path.join(BASE_DIR, output_prefix+'val.pickle'), viz=False, perturb_box2d=False, augmentX=1, type_whitelist=type_whitelist, with_image=args.with_image) get_box3d_dim_statistics(imagesets_file, type_whitelist,'val') if args.gen_val_...
Python
1
"""Memory Store Configuration for K2Edit Uses ChromaDB as the primary memory store. """ import os from typing import Optional from dataclasses import dataclass @dataclass class MemoryStoreConfig: """Configuration for ChromaDB memory store""" chroma_host: Optional[str] = None chroma_port: Optional[int] = ...
Python
1
SFixed32(Vec<u8>), /// Represents `sfixed32` format of wire type `5` for packed repeated fields. SFixed32Vec(Vec<u8>), /// Represents `sfixed64` format of wire type `1`. SFixed64(Vec<u8>), /// Represents `sfixed64` format of wire type `1` for packed repeated /// fields. SFixed64Vec(Vec...
Rust
0
ok=True) # 1. 加载原始数据 print("📂 第一步: 加载GSM8K原始数据") if not input_file.exists(): print(f"❌ 错误: 输入文件不存在: {input_file}") return 1 raw_samples = load_gsm8k_data(input_file) if not raw_samples: print("❌ 错误: 未找到任何GSM8K样本") return 1 # 2. 合成样本 print("\n🔧 第二步: 合成act...
Python
1
state\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum EST_A { #[doc = "0: No access violation has been detected."] EST_0, #[doc = "1: No access violation has been detected."] EST_1, #[doc = "2: A single access violation has been detected."] EST_2, #[doc = "3: Multiple access viol...
Rust
0
class Employee: """A class to represent an employee.""" def __init__(self, f_name, l_name, salary): """Initialize the employee.""" self.first = f_name.title() self.last = l_name.title() self.salary = salary def give_raise(self, amount=5000): """Give the employee a r...
Python
1
f'Backend manager of `{name}` has already been registered.' ) self._module_dict[name] = cls cls.backend_name = name return cls return wrap_manager def find(self, name: str) -> BaseBackendManager: """Find the backend manager wit...
Python
1
pub struct VertexToVertexIterFam<C: Config>(!, PhantomData<C>); impl<'a, C: Config> HandleIterFamily<'a, VertexHandle> for VertexToVertexIterFam<C> { type Iter = VertexToVertexIter<'a, C>; } /// Iterator over all neighbor vertices of a vertex. Is returned by /// `vertices_around_vertex`. #[derive(Debug)] pub stru...
Rust
0
0..4]; println!("{} 0-4 byte is {}", hello, s); println!("for each char in [नमस्ते]"); for c in "नमस्ते".chars() { println!("{}", c); } println!("for each byte in [नमस्ते]"); for b in "नमस्ते".bytes() { println!("{}", b); } } //! Macros for borrowed custom slice types. ///...
Rust
0
"""Layer normalization utilities. prxteinmpnn.utils.normalize """ from __future__ import annotations from functools import partial from typing import TYPE_CHECKING import jax from jax import numpy as jnp from jaxtyping import Array, Float if TYPE_CHECKING: from collections.abc import Sequence from prxteinmpnn...
Python
1
}, dtype=np.float16, grad_check=False, ) create_test_class( 'gelu_add_fp16' + suffix, gelu_add_func, { 'functor_list': ["gelu", "elementwise_add"], 'save_interme...
Python
1
from typing import List class Solution: def minimumTotal(self, triangle: List[List[int]]) -> int: # If the triangle is empty, return 0 if not triangle: return 0 # Initialize n as the number of rows in the triangle n = len(triangle) # Start from ...
Python
1
ref().and_then(|o| o.locale.as_ref()))?; let url = cgi_url.join("nutrients.pl")?; self.get(url, None) } /// Get all products for the given facet or category. /// /// # OFF API request /// ```ignore /// GET https://{locale}.openfoodfacts.org/{facet}/{value}.json /// ``` /...
Rust
0
from enum import Enum CTRL_SEQ = "\033[" RESET = "\033[0m" class IntensityCode(Enum): bold = 1 faint = 2 italic = 3 underline = 4 class ColorCode(Enum): black = 30 red = 31 green = 32 yellow = 33 blue ...
Python
1
#!/usr/bin/env python3 """Debug the BoundedSet LRU behavior.""" import sys sys.path.insert(0, '/root/hypothesis-llm/envs/praw_env/lib/python3.13/site-packages') from praw.models.util import BoundedSet # Reproduce the failing test case max_size = 4 initial_items = [0, 1, 2, 3, 4] bounded_set = BoundedSet(max_size) ...
Python
1
prev_block_hash: BlockHash, payload: Vec<Tx<'a>>) -> Self { let mut b = Block { index, timestamp, prev_block_hash, nonce: 0, hash: [0; 16], payload, }; b.hash(); b } pub fn calc_hash (&self) -> BlockHash ...
Rust
0
return Ok(()); } let root = args.path .unwrap_or_else(|| std::env::current_dir().unwrap()); let skin = make_skin(); info!("root: {:?}", &root); skin.print_text("\n# Phase 1) Analysis"); mad_print_inline!(skin, "Analyzing directory *$0*...\n", root.to_string_lossy()); let dup_...
Rust
0
ructure with neurons distributed randomly within a given volume. Arguments: `boundary` - a subclass of :class:`Shape`. `origin` - the coordinates (x,y,z) of the centre of the volume. """ parameter_names = ('boundary', 'origin', 'rng') def __init__(self, boundary, origin=(0.0, 0.0, ...
Python
1
# from pathway.xpacks.llm.vector_store import VectorStoreClient from .vectorClient import VectorStoreClientModified from loguru import logger from typing import List, Dict class VectorStoreRetriever(object): def __init__( self, host: str, port: int = 8765 ) -> None: self.host =...
Python
1
Best Value: {best_value}") print(f"Bitstring: {best_bitstring}") print(f"Weight: {weight}") print(f"Nb of optimal solution: {len(list_best_bitstring)}") #%% # Store results in dict results['copula'][func_name] = { 'ratio_optim': best_value / bruteforce_value, 'rank_solution': bitstrings_ranked.index(be...
Python
1
} }).fold(acc, |((x, y), max): ((isize, isize), isize), (x1, y1): (isize, isize)| { ( (x + x1, y + y1), cmp::max(max.abs(), cmp::max((x + x1).abs(), (y + y1).abs())), ) }); ( cmp::max((x1 - x0).abs(), (y1 - y0).abs()), max_dist...
Rust
0
# -*- coding: utf-8 -*- # Copyright (C) 2018 Freetech Solutions # This file is part of OMniLeads # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3, as published by # the Free Software Foundation. # This program is distribute...
Python
1
import csv import re def pulisci_parole(categorie): parole_pulite = [] for categoria in categorie: parole = re.findall(r'\b([a-zA-Z]+)\b', categoria) parole_pulite.extend(parole) return parole_pulite # Leggi il file CSV e crea una lista di dizionari per memorizzare i dati del libro libri =...
Python
1
rieDB::<T>::new(&mut memdb, &root).unwrap(); assert_eq!( input.iter().map(|(i, j)| (i.to_vec(), j.to_vec())).collect::<Vec<_>>(), t.iter().unwrap() .map(|x| x.map(|y| (y.0, y.1.to_vec())).unwrap()) .collect::<Vec<_>>() ); } } #[test] fn default_trie_root() { let mut db = MemoryDB::defaul...
Rust
0
string(), pool_named_data_pointer = named_data_pointer.to_string(), pool_named_logged_pointer = named_logged_pointer.to_string(), root_name = root_name.to_string(), ); entry.contents = contents; // if let Ok(mut file) = std::fs::File::create(format!("inc/{}.hpp", name_str)) { // let _=file....
Rust
0
wrap( _slf: *mut ::pyo3::ffi::PyObject, _: *mut ::std::os::raw::c_void) -> *mut ::pyo3::ffi::PyObject { const _LOCATION: &'static str = concat!(stringify!(#cls),".",stringify!(#name),"()"); let _pool = ::pyo3::GILPool::new(); let _py = ::pyo3::Python::assume_gil_...
Rust
0
job_type = 'test' resume = False with wandb.init(project='rl_whisker', id=f"train_{run_id}", group=f"session_{run_id}", job_type=job_type, resume='allow'): if train == 'new' and not test: agent = Agent(env_id = env_name, ...
Python
1
𖬡', '꓂', '𝃫', '𑑠', '\u{1dd4}', '𞲥', 'ᢋ', '𒋒', '𑤉', '𖣨', '𓍡', '𑇯', '𝆓', '𘰁', '炙', 'ᬝ', '\u{73f}', '𑜆', '𞺷', '\u{e01ca}', '᾽', 'ٯ', '🫢', '𑶊', '⥺', 'ප', '𒅫', 'ï', '𞠤', 'Ʒ', '🐵', '⻏', 'ꗏ', '瑇', '𘨈', '૰', '𐲉', '\u{738}', 'ﳇ', '\u{e0036}', '\u{20d8}', '𛰋', '𖭯', '🎍', '𐄇', '⋿', 'ཟ', ...
Rust
0
[], }, EdgeType.LINE_THIN_DASHED: { "color": "grey", "linewidth": 1.0, "linestyle": "dashed", "dashes": [10, 10], }, EdgeType.LINE_THICK: { "color": "grey", "linewidth": 2.0, "linestyle": "solid", "dashes": [], }, EdgeType.LINE_THIC...
Python
1
output = bg_module(samp_vecs, torch.log(roughness)) # viewdotnorm = torch.ones_like(theta).reshape(-1, 1) # roughness = 0.01*torch.ones_like(theta).reshape(-1, 1) # output = bg_module(pts=torch.zeros_like(vecs), viewdirs=None, features=None, refdirs=samp_vecs, roughness=roughness, viewdotnorm=viewdotnorm...
Python
1
import os from smsapi.client import SmsApiPlClient access_token = os.getenv('SMSAPI_ACCESS_TOKEN') client = SmsApiPlClient(access_token=access_token) def create_short_url(): r = client.shorturl.create_short_url(url='http://smsapi.pl/', name='smsapi') print( r.id, r.name, r.url, r.short_url, r.f...
Python
1
ficate>> { certs(&mut BufReader::new(File::open(path)?)) .map_err(|_| io::Error::new(io::ErrorKind::InvalidInput, "invalid cert")) .map(|mut certs| certs.drain(..).map(Certificate).collect()) } fn load_keys(path: &Path) -> io::Result<Vec<PrivateKey>> { rsa_private_keys(&mut BufReader::new(File:...
Rust
0
rSrSrS\SS4SjrS\S\RR4Sjr Sr g) rrr%NcXlg)Nr)r0rs r2r+$_OpOverloadPacketPickleData.__init__rr5rQcURUR5n...
Python
1
clap::Arg::with_name("INPUT") .help("A directory full of images to use") .required(true), ) .arg( clap::Arg::with_name("OUTPUT") .help("A directory to output the images to") .required(true), ) .get_matches()...
Rust
0
nput, 0.5) } pub fn elastic_out_hard(input: f64) -> f64 { inverse(input, elastic_in_hard) } pub fn elastic_out(input: f64) -> f64 { inverse(input, elastic_in) } pub fn elastic_out_soft(input: f64) -> f64 { inverse(input, elastic_in_soft) } pub fn elastic_in_out_hard(input: f64) -> f64 { elastic_in_o...
Rust
0
():") satellites = [iss] city = Topos('44.0247 N', '88.5426 W') for geo1 in positions_for(satellites, city, times): print(geo1.xyz.km) # print("Compare to EarthSatellite at():") difference = iss - city geo2 = difference.at(times) #geo2 = iss.at(times) print(geo2.xyz.km) #...
Python
1
[4::8,4::8,:] mask = mask[4::8,4::8].astype(np.float16) lbl = lbl[4::8,4::8].astype(np.float16) if self.dataset=='7S': lbl_1 = (lbl - 1) // 25 else: lbl_1 = (lbl - 1)//25 + 25*self.scene_data[scene][1] lbl_2 = ((lbl - 1) % 25) if...
Python
1
: self._map_user(history.get("author")), "created": history["created"], "value_from_string": item["fromString"], "value_from": item["from"], "value_to_string": item["toString"], "value_to": item["to"]...
Python
1
// 6 attacks in 2.85 seconds data.na_idx.to_na(6, state.na_carryover(0.475)) } else { CharacterAction::StandStill } } // generate energy and modify acceleration states according to the event fn accelerate(&mut self, field_energy: &mut Vec<FieldEnergy>, event:...
Rust
0
roll after pref flip control = False timeout = time.time() + 60 while not control and time.time() < timeout: control = telemetry_event_check(experiment_slug, "unenrollment") if control: raise AssertionError("Experiment unenrolled when it shouldn't have") # unenroll summa...
Python
1
if 'CreateTable' in content and 'DropTable' in content: print("✓ Migration system structure validated") else: raise ValueError("Migration system incomplete") print("✓ Migration system working correctly") return True except ...
Python
1
19, 839, 863, 887, 983, 1019, 1187, 1283, 1307, 1319, 1367, 1439, 1487, 1523, 1619, 1823, 1907, ]; for p in SMALL_PRIMES { let p = p as u16; if p > 1500 { break; } assert_eq!( is_safe_prime(&p).probably(), ...
Rust
0
((first, second)).or_default() += 1; } } for _ in 0..iterations { doubles = step(&mut doubles, &map); } let counts = get_counts(&doubles, input.chars().last().unwrap()); let mut high = 0; let mut low = usize::MAX; for &v in counts.values() { if v > high { ...
Rust
0
"""Tests for houdini_core_tools.ui.opmenu module.""" # Third Party import pytest # Houdini Core Tools import houdini_core_tools.ui.opmenu pytestmark = pytest.mark.usefixtures("load_module_test_hip_file") # Tests def test_create_absolute_reference_copy(obj_test_node): """Test houdini_core_tools.ui.opmenu.crea...
Python
1
pub fn new( id: u32, kernel_path: String, vm_start: usize, ioapic: Arc<Mutex<IoApic>>, dbg: Option<Arc<Mutex<DebugManager>>>, ) -> UhyveCPU { UhyveCPU { id, kernel_path, vcpu: vCPU::new().unwrap(), vm_start, apic_base: APIC_DEFAULT_BASE, ioapic, dbg, } } fn setup_system_gdt(&mut...
Rust
0
import copy from django.db import models from django.urls import reverse from django.utils.text import slugify from simple_history.models import HistoricalRecords from matorral.models import ModelWithProgress class Sprint(ModelWithProgress): """ """ STATE_UNSTARTED = 0 STATE_STARTED = 1 STATE_DONE...
Python
1
y(delta)?; let expected: Bar<u16> = Bar(100u8, 300u16); assert_eq!(val1, expected, "{:#?} != {:#?}", val1, expected); Ok(()) } #[test] pub fn unit_struct__delta() -> DeltaResult<()> { let val0 = Baz; let val1 = Baz; let delta: BazDelta = val0.delta(&val1)?; let expected = BazDelta; a...
Rust
0
f (data.status !== 'success') { alert('Command failed: ' + (data.message || 'Unknown error')); } }) .catch(error => { console.error('Command error:', error); alert('Command failed: ' + error.message); }); } ...
Python
1
ette.YELLOW) client.delete_library(library_id) kv("Delete library", library_id, color_on, key_color=Palette.YELLOW) section("Summary", "✅", color_on) print(" - Created library, document, chunks; updated library/document/chunk") print(" - Searched without index (fallback linear) and with m...
Python
1
from typing import Tuple import torch from torch import Tensor, nn from fusion_bench.utils.parameters import state_dict_to_vector from fusion_bench.utils.state_dict_arithmetic import state_dict_sub def _svd(w: Tensor, full_matrices=True) -> Tuple[Tensor, Tensor, Tensor]: """ Perform Singular Value Decomposi...
Python
1
""" 33. get_or_create() ``get_or_create()`` does what it says: it tries to look up an object with the given parameters. If an object isn't found, it creates one with the given parameters. """ from django.db import models, IntegrityError class Person(models.Model): first_name = models.CharField(max_length=100) ...
Python
1