text string | label_name string | labels int64 |
|---|---|---|
aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam ... | Rust | 0 |
{
JsBox::new(self, v)
}
#[cfg(all(feature = "napi-4", feature = "event-queue-api"))]
/// Creates an unbounded queue of events to be executed on a JavaScript thread
fn queue(&mut self) -> EventQueue {
EventQueue::new(self)
}
}
/// A view of the JS engine in the context of top-level... | Rust | 0 |
def getNfsCallStruct(procedure):
if procedure == "lookup":
callStruct = NfsDiropArgs
elif procedure == "getattr":
callStruct = NfsFhandle
elif procedure == "read":
callStruct = NfsFileopArgs
else:
raise RuntimeError("NFS call procedure {} not implemented".format(procedure))
return callStruct
... | Python | 1 |
).format(
data_json.get("user", {}).get("id"),
data_json.get("user", {}).get("nickname"),
)
)
return data_json
@classmethod
async def WebcastChatMessage(cls, data: bytes) -> dict:
"""
处理直播间聊天消息
Args:
data (bytes)... | Python | 1 |
*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub const VERTEX: u32 = 1u64 as u32;
#[cfg(web_sys_unstable_apis)]
#[doc = "The `GPUShaderSt... | Rust | 0 |
ror::CircularTypes(
alpha.extract(),
left.clone(),
right.clone(),
))
}
}
// <: instantiate R
// α^ /∈ FV(A) Γ[^α] ⊢ A =<: ^α ⊣ ∆
// Γ[^α] ⊢ A <: ^α ⊣ ∆
... | Rust | 0 |
cond component of the vector.
pub y: N,
/// Third component of the vector.
pub z: N,
/// Fourth component of the vector.
pub w: N,
/// Fifth of the vector.
pub a: N
}
double_dispatch_binop_decl_trait!(Vec5, Vec5MulRhs)
double_dispatch_binop_decl_trait!(Vec5, Vec5DivRhs)
double_dispatch_bino... | Rust | 0 |
mples) = self.samples {
unsafe {
(*samples[index_of(x, y, self.width, self.height)].get()).push(sample);
}
} else {
panic!("Using uninitialized SampleAcumulator!")
}
}
pub fn flush(&self, sink: &mut Box<RayTraceSink>, frame: usize) -> Result<(), IOError> {
if let Some(ref samples) = self.samples {... | Rust | 0 |
class Solution:
def repeatedSubstringPattern(self, s: str) -> bool:
'''
using divisors
string concatenation
'''
n = len(s)
for i in range(1, n // 2 + 1):
if n % i == 0:
pattern = s[:i] * (n // i)
if s == pattern:
... | Python | 1 |
u32, (), _>(&mut store, "__rustretro_plugin_free_emulator")
.unwrap();
Self {
emulator_pointer,
timeout_ms,
epoch_handle,
epoch_stop_sender,
store,
memory,
metadata,
wasm_controller_input,
... | Rust | 0 |
view.api.OpenReviewClient(
baseurl='https://api2.openreview.net',
username=os.environ.get('openreview_id'),
password=os.environ.get('openreview_pw'),
)
# for skp, fav, aggr
res_notes = [[], [], []]
#XXX kmkim: return pdfs with notes
pdfs = [[], [], []]
notes = client.sea... | Python | 1 |
275, 546.1933, 1.0000],
[273.3727, 545.5930, 1.0000]]]
)
res = draw_keypoints(person_int, prediction, connectivity=connect_skeleton, colors="blue", radius=4, width=3)
show(res)
# %%
# What happened there?
# The model, which predicted the new keypoints,
# can't detect the three points that are hidden on the uppe... | Python | 1 |
tch_index = int(callback_data.split("_")[1])
user_data["current_batch"] = batch_index
batches = user_data["batches"]
if 1 <= batch_index <= len(batches):
selected_batch = batches[batch_index - 1]
query.edit_message_text(
f"📁 دسته {ba... | Python | 1 |
import os
import torch
import imghdr
from glob import glob
import numpy as np
from PIL import Image
from transformers import AutoModelForCausalLM
import folder_paths
from nodes import node_helpers, ImageSequence, ImageOps
from .janus.models import VLChatProcessor
from .utils import mie_log
MY_CATEGORY = "🐑 JanusProC... | Python | 1 |
'files_with_faces': len([f for f in file_metadata.values() if f['faces_detected'] > 0]),
'cache_last_updated': cache_last_updated,
'face_encodings_count': len(face_encodings)
})
if __name__ == '__main__':
print("�� Starting Optimized DeepFace Photo Finder App...")
# Load existing c... | Python | 1 |
from flask import url_for, request
from ..models import db, Class
from ..decorators import json, paginate, etag
from . import api
@api.route('/classes/', methods=['GET'])
@etag
@paginate()
def get_classes():
return Class.query
@api.route('/classes/<int:id>', methods=['GET'])
@etag
@json
def get_class(id):
r... | Python | 1 |
ements the `TypeCheckerFamilyDependentExt` methods along with substitution.
crate mod type_checker;
/// Type family for "base inference" -- inferring just the base types.
#[derive(Copy, Clone, Debug, DebugWith, PartialEq, Eq, Hash)]
crate struct FullInference;
impl TypeFamily for FullInference {
type InternTables... | Rust | 0 |
ed PNG byte buffer.
pub async fn load_png(
file: File,
demultiply: bool,
) -> Result<ImageBuffer<Rgba<u8>, Vec<u8>>, JsValue> {
let array_buffer = JsFuture::from(file.array_buffer()).await?;
let uint8_array = Uint8Array::new(&array_buffer);
let png = decode_png(&uint8_array.to_vec()[..], demultiply)... | Rust | 0 |
casts::usize::usize;
<reponame>tasogare3710/filesystem_provider
//! 具象ファイルシステムを新たに作るためのファクトリに関するモジュール。
pub mod make;
<filename>crypto/multisig/src/lib.rs
// Copyright (c) 2018-2022 The MobileCoin Foundation
//! Multi-signature implementation: A multi-signature is a protocol that allows
//! a group of signers, each po... | Rust | 0 |
from plots_constants import *
from scipy.stats import spearmanr
with plt.rc_context(bundles.neurips2023()):
fig, (ax, ax2) = plt.subplots(ncols=2)
fig.set_figheight(2.4)
for x, y, color, marker, size in zip(res["best_eval_auroc_correct"].to_list(),
res["best_test_av... | Python | 1 |
def load_knowledge():
vecs = []
vecs.append([0] * 100)
with open('../../kg_embed/entity2vec.del', 'r') as fin:
for line in fin:
vec = line.strip().split('\t')
vec = [float(x) for x in vec]
vecs.append(vec)
embed_ent = torch.FloatTensor(vecs)
del vecs
v... | Python | 1 |
Id(state).into()),
}
}
}
/// Section of the replSetGetStatus member that we care about.
#[derive(Debug, Deserialize)]
pub struct ReplSetStatusMember {
#[serde(rename = "self", default = "ReplSetStatusMember::default_self")]
pub is_self: bool,
pub name: String,
pub optime: TimeStamp,
pub... | Rust | 0 |
from typing import Any, Dict, List, Optional
import requests
from langchain_core.embeddings import Embeddings
from langchain_core.pydantic_v1 import BaseModel, SecretStr, root_validator
from langchain_core.utils import convert_to_secret_str, get_from_dict_or_env
JINA_API_URL: str = "https://api.jina.ai/v1/embeddings"... | Python | 1 |
::opstats::gen_opstat_unguarded_register(ctx.builder, instruction);
for i in 0..8 {
ctx.builder
.const_i32(global_pointers::get_reg32_offset(i as u32) as i32);
ctx.builder.get_local(&ctx.register_locals[i]);
ctx.builder.store_aligned_i32(0);
}
}
pub fn gen_move_registers_fro... | Rust | 0 |
n!(
"{term:width$}",
term = Term::Ann(
Ignore::default(),
Rc::new(Term::Var(Ignore::default(), Var::Free(Name::user(&*name)))),
Rc::new(Term::from(&*inferred)),
).to_concrete(),
width = term_width... | Rust | 0 |
duration: start.elapsed(),
}),
Err(e) => Err(RequestFailure::General(format!("{:?}", e))),
}
}
}
use molecule_codegen::ast::{self, HasName};
use case::CaseExt;
pub(in super::super) trait GenBuilder {
fn gen_builder(&self) -> String;
}
impl GenBuilder for ast::Option_... | Rust | 0 |
globalstar_gateway: 5,
last_contact_time: 6,
last_attempt_time: 7,
call_attempts_since_reset: 8,
successful_connects_since_reset: 9,
average_connection_duration: 10,
connection_duration_... | Rust | 0 |
(state, hbox, |builder| builder.set_flex_grow(1.0));
// let row3 = HBox::new().build(state, panel, |builder| {
// builder.class("item")
// });
// Label::new("Checkbox").build(state, row3, |builder| builder.class("label"));
// Checkbox::new().build(state, row3, |builder| builder.set_align_self(A... | Rust | 0 |
).is_ok());
//! ```
//! **Note**: The above example generates a private key using a private function intended only for
//! testing purposes. Production code should find an alternate means for secure key generation.
use crate::{traits::*, HashValue};
use anyhow::{anyhow, Result};
use core::convert::TryFrom;
use libra_c... | Rust | 0 |
retval VX_ERROR_NOT_SUPPORTED If the \\a attribute is not a value supported on this implementation."]
#[doc = " \\retval VX_ERROR_INVALID_PARAMETERS If any of the other parameters are incorrect."]
#[doc = ""]
#[doc = " \\ingroup group_array"]
pub fn vxQueryArray(
arr: vx_array,
at... | Rust | 0 |
max_len = max(max_len, self._lens[index])
if max_len * (len(batch_indices) + 1) > self._max_tok:
if not batch_indices:
raise ValueError(
"max_tokens too small / max_seq_len too long")
batches.append(batch_in... | Python | 1 |
is_value1(&self) -> bool {
**self == PDIS12_A::VALUE1
}
#[doc = "Checks if the value of the field is `VALUE2`"]
#[inline(always)]
pub fn is_value2(&self) -> bool {
**self == PDIS12_A::VALUE2
}
}
impl core::ops::Deref for PDIS12_R {
type Target = crate::FieldReader<bool, PDIS12_A... | Rust | 0 |
f32 = 1.5;
pub const SCREEN_SIZE: f32 = 24.0;
pub const PLAYER_LIMIT: f32 = SCREEN_SIZE - PLAYER_SIZE;
pub const PLAYER_VLIMIT: f32 = SCREEN_SIZE * 2.0 - PLAYER_SIZE;
use std::f32::consts::{PI};
pub use self::point::{Point3D};
pub use self::vector::{Vector3D, AsVector};
pub use self::direction::{Direction3D};
pub use... | Rust | 0 |
ame, "babylon-request-id");
let attr = plugin_attributes!("TcpLog", api.plugins.remove(0), ApiPlugin::TcpLog);
assert_eq!(attr.enabled, true);
assert_plugin_removed!("Oauth2", api.plugins.remove(0), ApiPlugin::Oauth2);
assert_plugin_removed!("Oauth2Extension", api.plugins.remove(0), ApiPlugin::Oauth2E... | Rust | 0 |
_MODE_DESC> for ModeDesc<u32, u32, Rational, Format> {
fn from(src: DXGI_MODE_DESC) -> ModeDesc<u32, u32, Rational, Format> {
ModeDesc {
width: src.Width,
height: src.Height,
refresh_rate: src.RefreshRate.into(),
format: unsafe { std::mem::transmute(src.Format... | Rust | 0 |
::symlink;
use std::path::{Path, PathBuf};
use anyhow::{bail, Result};
use nix::errno::Errno;
use nix::fcntl::{open, OFlag};
use nix::mount::mount as nix_mount;
use nix::mount::MsFlags;
use nix::sys::stat::Mode;
use nix::sys::stat::{mknod, umask};
use nix::unistd::{chdir, chown, close, getcwd};
use nix::unistd::{Gid, ... | Rust | 0 |
0x21, 0xD1, 0xB9, 0xC9, 0xEA, 0x05, 0x12, 0x11, 0x10, 0x11, 0x21, 0x0C, 0x0C, 0x0A, 0x04, 0x15,
0xFC, 0x03, 0x00, 0xCC, 0xA1, 0x30, 0xA0, 0x21, 0xD1, 0x10, 0x11, 0x21, 0x0C, 0x18, 0xB9, 0xC9,
0xEA, 0x05, 0x12, 0x11, 0x0A, 0x04, 0x15, 0xFC, 0x03, 0x00, 0x08, 0x11, 0x22, 0x04, 0x00, 0x08,
0x60, 0x00, 0x3D... | Rust | 0 |
assert_eq!(lookup.to_string(), input);
}
#[test]
fn unquoted() {
let input = "start.after";
let lookup = Lookup::from_str(input).unwrap();
assert_eq!(lookup[0], Segment::from("start"));
assert_eq!(lookup[1], Segment::from("after"));
assert_eq!(lookup.to_string(), input);
}
#[test]
fn quoted() {... | Rust | 0 |
(2)]];
};
struct FragData {
float4 pos [[position]];
float2 uv;
float4 color;
};
vertex FragData vert(
Vertex v [[stage_in]],
constant uint2 *viewport_size [[buffer(1)]]
) {
FragData out;
out.pos = float4((v.pos / float2(*viewport_size)) * 2.0, 0.0, 1.0);
out.pos.x -= 1.0;
out.pos.y = 1.0 - o... | Rust | 0 |