text string | label_name string | labels int64 |
|---|---|---|
# BSD 2-Clause License
#
# Apprise - Push Notification Library.
# Copyright (c) 2025, Chris Caron <lead2gold@gmail.com>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain t... | Python | 1 |
(!sbc_codec_blocks_4.supports(&sbc_codec_blocks_8));
assert!(!sbc_codec_blocks_8.supports(&sbc_codec_blocks_4));
let sbc_codec_bands_4 = SbcCodecInfo::new(
SbcSamplingFrequency::all(),
SbcChannelMode::all(),
SbcBlockCount::FOUR,
SbcSubBands::FOUR,
... | Rust | 0 |
#
# MUSIC𝄞NTWRK
#
# A python library for pitch class set and rhythmic sequences classification and manipulation,
# the generation of networks in generalized music and sound spaces, and the sonification of arbitrary data
#
# Copyright (C) 2018 Marco Buongiorno Nardelli
# http://www.materialssoundmusic.com, mbn@unt.edu
... | Python | 1 |
# -*- coding: utf-8 -*-
"""
Use a while loop to print multiples of 3 from 3 to 30.
"""
#step 1
counter_numbers = 3
stop = 30
num_evens = 0
while counter_numbers <= stop:
if counter_numbers % 3 == 0:
print(f"{counter_numbers}")
counter_numbers = counter_numbers + 1
| Python | 1 |
ss, target_image = sess.run([train_op, cost, target])
print("iter:%d, loss:%.9f" % (i, loss))
if (i + 1) % 100 == 0:
# save target image every 100 iterations
image = np.clip(target_image + 128.0, 0, 255).astype(np.uint8)
Image.fromarray(image).save... | Python | 1 |
[get("/_ah/stop")]
fn stop() -> String {
"OK!".to_string()
}
#[get("/_ah/health")]
fn health() -> String {
"OK!".to_string()
}
#[get("/action")]
fn get_action_handler() -> String {
debug!("get action");
"get action".to_string()
}
#[options("/action")]
fn options_action_handler() -> Response<'static> ... | Rust | 0 |
from decouple import config
OPEN_AI_KEY=config("OPENAI_API_KEY") | Python | 1 |
class Solution:
def minDeletions(self, s: str) -> int:
frequency = [0] * 26
for char in s:
frequency[ord(char) - ord('a')] += 1
delete_count = 0
# Use a set to store the frequencies we have already seen
seen_frequencies = set()
for i in range(26):
... | Python | 1 |
word pride squirrel upgrade then income fatal apart sustain crack supply proud access",
account_index: 1,
view_hex: "4e190e25dd12f0c6ba3319f1ad7fa868622b4ba5cf7785dc98cc09a7ca5dfafc5f3d27f5b56b2dbf688354cf6aa8b4a615e2e953ace6278d14dc59ee27caefc0",
spend_hex: "ac0d884be61c54b76e9c49d... | Rust | 0 |
n_labels = K.shape(embeddings)[0]
n_samples = K.shape(embeddings)[1]
# Shape == (n_labels, embedded_dim)
centroids_incl = K.mean(embeddings, axis = 1)
# Shape == (n_labels, n_samples, embedded_dim) == embeddings.shape
centroids_excl = K.sum(embeddings, axis = 1, keep... | Python | 1 |
ce from middle to end (end segment index on top of final vertex)
{
let slice = PlineViewData::from_slice_points(
&pline,
Vector2::new(0.5, -0.5),
0,
Vector2::new(1.0, 0.0),
1,
POS_EQ_EPS,
)
.unwrap();
let pline_... | Rust | 0 |
nonce = sodiumoxide::crypto::aead::chacha20poly1305_ietf::Nonce::from_slice(&encrypted_part[32..44])
.ok_or(Crypt4GHError::NoNonce)?;
let packet_data = &encrypted_part[44..];
log::debug!(" peer pubkey: {:02x?}", peer_pubkey.iter().format(""));
log::debug!(" nonce: {:02x?}", nonce.0.iter().format(""));
log... | Rust | 0 |
import config
from Backtest_Algo import FundingArbitrageBacktest
import os
# Rutas a los CSVs
binance_file = "../data/binance_btcusdt_funding.csv"
bybit_file = "../data/bybit_btcusdt_funding.csv"
# --- Paso 1: Correr backtests individualmente ---
def run_backtest_for(file_path):
config.funding_file = file_path
... | Python | 1 |
tate == GAME_STATE_ACHIEVEMENTS:
if back_button_rect and back_button_rect.collidepoint(mouse_pos):
game_state = GAME_STATE_MENU
screen.fill(SKY_BLUE)
if game_state == GAME_STATE_PLAYING:
if mario.alive:
mario.update(platforms)
camera.update(mario)... | Python | 1 |
ait session.call_tool("get_relationships", {})
print_result(rel_result)
elif choice == "6":
# Show schema
print("\n=== Schema ===")
schema_result = await session.call_tool("get_schema", {})
print_result(... | Python | 1 |
closest = p;
distance_sq_closest = p_distance_sq;
}
}
closest
}
}
#[pyproto]
impl PyObjectProtocol for PointCollection {
fn __repr__(&self) -> PyResult<String> {
Ok(format!("PointCollection({:?})", self.points))
}
fn __str__(&self) ->... | Rust | 0 |
if you want to capture what a command writes
/// to `stdout` you can do that using [`StdoutUntrimmed`]:
///
/// ```
/// use cradle::prelude::*;
///
/// let StdoutUntrimmed(output) = run_output!(%"echo foo");
/// assert_eq!(output, "foo\n");
/// ```
///
/// But if instead you want to capture the command's [`ExitStatus`... | Rust | 0 |
new colors
if plotting.classes:
simplex_colors = classes
else:
simplex_colors = np.argmax(classes, axis=1)
# not actually clustered, just for viz
clustered_faces = [MeshFaceCluster(face_indices=np.argwhere(simplex_colors==i).flatten().astype(np.uint32)) for i in ... | Python | 1 |
in range(N):
z=getImage(opt.texturePath + files[n % nTex])
out[n:n+1] = randomTile(flow,z)
if vis:
vutils.save_image(out[:8].float(),path+'templates.jpg', normalize=True,nrow=4,padding=10)##limit to 25 the shown templates
return torch.cat([x,flow.permute(0,3,1,2)],1),out
##@param target... | Python | 1 |
"PASSWORD_RESET_CONFIRM_URL"),
"EMAIL_FRONTEND_PROTOCOL" : os.getenv("EMAIL_FRONTEND_PROTOCOL"),
"EMAIL_FRONTEND_DOMAIN" : os.getenv("EMAIL_FRONTEND_DOMAIN"),
"EMAIL_FRONTEND_SITE_NAME" : "Intervuo",
'SERIALIZERS' : {
'user_create' : 'djoser.serializers.UserCreateSerializer',
'current_us... | Python | 1 |
flour_per_kg_price = float(input())
flour_kg = float(input())
sugar_kg = float(input())
egg_cartons = int(input())
maya_packages = int(input())
sugar_kg_price = flour_per_kg_price * 0.75
egg_cartons_price = flour_per_kg_price * 1.10
maya_packages_price = sugar_kg_price * 0.20
flour_total = flour_kg * flour_per_kg_pri... | Python | 1 |
level.increase();
}
}
}//!
//! # Produce CLI
//!
//! CLI command for Profile operation
//!
use std::sync::Arc;
use structopt::StructOpt;
mod sync;
mod current;
mod switch;
mod rename;
mod delete_profile;
mod delete_cluster;
mod view;
use crate::Result;
use crate::common::output::Terminal;
use crate::prof... | Rust | 0 |
yms.uniquepairs"]
)
def test_entries(self):
self.assertEqual(
mwa_ppdb.entries()[:10],
[
("10/17/01", "17/10/2001"),
("102,70", "102.70"),
("13,53", "13.53"),
("3.2.5.3.2.1", "3.2.5.3.2.1."),
("5... | Python | 1 |
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution(object):
def deleteMiddle(self, head):
if head == None:
return None
dummy = ListNode(0)
dummy.next = head
... | Python | 1 |
"""Test simple execution"""
def test_can_pass(testdir):
testdir.makepyfile(
"""
def describe_something():
def passes():
assert True
def describe_nested():
def passes_too():
assert True
""")
result = testdir.ru... | Python | 1 |
}
<reponame>Freaky/annoirc
use anyhow::{anyhow, Result};
use serde::Deserialize;
use crate::irc_string::IrcString;
#[derive(Debug, Deserialize, PartialEq)]
struct Response {
queryresult: QueryResult,
}
#[derive(Debug, Deserialize, PartialEq)]
struct QueryResult {
success: bool,
error: bool,
pods: Vec... | Rust | 0 |
3,
D3DMULTISAMPLE_4_SAMPLES = 4,
D3DMULTISAMPLE_5_SAMPLES = 5,
D3DMULTISAMPLE_6_SAMPLES = 6,
D3DMULTISAMPLE_7_SAMPLES = 7,
D3DMULTISAMPLE_8_SAMPLES = 8,
D3DMULTISAMPLE_9_SAMPLES = 9,
D3DMULTISAMPLE_10_SAMPLES = 10,
D3DMULTISAMPLE_11_SAMPLES = 11,
D3DMULTISAMPLE_12_SAMPLES = 12,
D... | Rust | 0 |
) {
assert!(SVID::<X509>::from_pem(GOOD_CERTIFICATE.as_bytes(), None, None).is_ok());
}
#[test]
fn uri_from_pem() {
let svid = SVID::<X509>::from_pem(GOOD_CERTIFICATE.as_bytes(), None, None).unwrap();
assert_eq!(svid.uri().to_string(), GOOD_CERTIFICATE_URI);
}
#[test]
fn trust_domain_from_pem() {
let ... | Rust | 0 |
Percentile::MAX).unwrap();
(*v).into()
}
#[cfg(test)]
pub fn try_get<P>(&self, p: P) -> Result<T, P::Error>
where
P: std::convert::TryInto<Percentile>,
{
let p = p.try_into()?;
Ok(self.get(p))
}
pub fn get(&self, Percentile(percentile): Percentile) -> T {
... | Rust | 0 |
= i
meta['exposure_idx'] = exposure_idx
meta['unique_shutters'] = unique_shutters
# Rescale to use relative shutter speeds, where 1. is the brightest.
# This way the NeRF output with exposure=1 will always be reasonable.
meta['exposure_values'] = shutter_speeds / unique_shutters[0]
# Rescale raw sensor mea... | Python | 1 |
% 4:
target_text_list.extend([""] * (len(now_text_list) % 4))
target_text_judge = True
if target_change.sex_experience:
now_list = [
f"{game_config.config_organ[i].name}" + _("经验:") + text_handle.number_to_symbo... | Python | 1 |
# -*- coding:utf-8 -*-
import os
import random
from collections import defaultdict
def split_train(train_file, dev_ratio=0.2, to_folder=None):
# split train into train & dev
with open(train_file, "r", encoding="utf-8") as f:
dict_label_name2sents = defaultdict(list)
for i, line in enumerate(f... | Python | 1 |
import caffe
import lmdb
import argparse
import subprocess
parser = argparse.ArgumentParser(description='Convert dataset key')
parser.add_argument('--target', default=None, action='store',
help='target directory')
parser.add_argument('--source', default=None, action='store',
help='target directory')
ar... | Python | 1 |
C[i, j] += a * b
def make_matmul_acc_i8_v2(p=matmul_acc_i8):
p = rename(p, "matmul_acc_i8_v2")
p = write_config(p, p.body().before(), ConfigMatmul, "done", "True")
# p = p.configwrite_after('pass', ConfigMatmul, 'done', 'True')
p = replace(p, "for i in _:_", do_matmul_acc_i8)
p = replace(p, "... | Python | 1 |
from nifgen.base_struct import BaseStruct
from nifgen.formats.manis.imports import name_type_map
class Vector4H(BaseStruct):
__name__ = 'Vector4H'
def __init__(self, context, arg=0, template=None, set_default=True):
super().__init__(context, arg, template, set_default=False)
self.x = name_type_map['Normshort... | Python | 1 |
uper::{GlCtx, GlError, Result};
#[allow(unused)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum BufferKind {
Array = WebGl2RenderingContext::ARRAY_BUFFER as isize,
ElementArray = WebGl2RenderingContext::ELEMENT_ARRAY_BUFFER as isize,
}
#[allow(unused)]
#[derive(Debug, Copy, Clone... | Rust | 0 |
input.parse()?;
let mut end = e.base10_parse::<usize>()?;
if inclusive { end += 1}
let c;
braced!(c in input);
let content : TokenStream = c.parse()?;
// TODO: check range is valid
Ok(Seq{ident, start, end, content})
}
}
#[proc_macro]
pub fn seq(input: proc_... | Rust | 0 |
# Script aggiornato: aggiunta di un "muro" ciclando sull'asse Z
def write_goxel_voxel_file(filename, voxels):
"""
Scrive un file per Goxel 0.15.1 con lista di voxel.
"""
header = "# Goxel 0.15.1\n# One line per voxel\n# X Y Z RRGGBB\n"
with open(filename, 'w') as f:
f.write(header)
... | Python | 1 |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: opencensus/proto/agent/common/v1/common.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf impo... | Python | 1 |
from rest_framework.serializers import ModelSerializer, SerializerMethodField, PrimaryKeyRelatedField
from .models import Document, DocumentPassFail
from students.models import Student
class DocumentUploadSerializer(ModelSerializer):
class Meta:
model = Document
fields = ('file',)
class DocumentPa... | Python | 1 |
#!/usr/bin/env python3
"""Simple CLI for running duplicate detection pipeline.
Usage example:
python dupcheck_cli.py --db_dir ./images_db --input_dir ./images_new --out_dir ./reports
"""
import argparse
from pathlib import Path
def parse_args():
p = argparse.ArgumentParser()
p.add_argument("--db_dir", requ... | Python | 1 |
ed<'static>,
systick: cortexm7::systick::SysTick,
}
impl SyscallDriverLookup for Teensy40 {
fn with_driver<F, R>(&self, driver_num: usize, f: F) -> R
where
F: FnOnce(Option<&dyn kernel::syscall::SyscallDriver>) -> R,
{
match driver_num {
capsules::led::DRIVER_NUM => f(Some(s... | Rust | 0 |
def solve(grid):
h, w = len(grid), len(grid[0])
centers = [(i, j) for i in range(h) for j in range(w) if grid[i][j] == 5]
(r1, c1), (r2, c2) = centers if centers[0][0] < centers[1][0] else centers[::-1]
dr = 1 if r2 > r1 else -1
dc = 1 if c2 > c1 else -1
exit1 = (r1 + dr, c1)
exit2 = (r2, c1... | Python | 1 |
self.len = 0;
*self.head = SkipNode::head(self.level_generator.total());
}
/// Returns the number of elements in the skiplist.
///
/// # Examples
///
/// ```
/// use skiplist::SkipList;
///
/// let mut skiplist = SkipList::new();
/// skiplist.extend(0..10);
/// a... | Rust | 0 |
let mut availability: AvailabilityData = Default::default();
let cache = if let Some(cache_path) = config.cache {
Either::Left(
FsCache::new(cache_path)
.map_err(|e| failure::format_err!("Can't initialize cache: {}", e))?,
)
} else {
Either::Right(NoopC... | Rust | 0 |
&format!("{}\nExpected number, found `NaN`",
rt.stack_trace()), rt))
} else {
let mut sec = (**sec).clone();
sec.reverse();
sec
}
}
&Variable::F64(_, None) => {
return Err(module.error(call.arg... | Rust | 0 |
from TapLang.parser import parse_instruction, tokenize_code
import json
test_input = 'TYPE[```Hello World```]'
print(f"Testing input: {test_input}")
print("="*50)
# Test tokenization
print("\n1. Tokenization:")
try:
tokens = tokenize_code(test_input)
print(f"Tokens: {tokens}")
except Exception as e:
prin... | Python | 1 |
{
let path = self.buffer.borrow_mut().filepath.clone().unwrap(); // We know the filepath is set
let status = format!("Saved \"{}\" ({} bytes)", path, bytes);
self.status = Some(status);
}
}
Action::YankLine => {
... | Rust | 0 |
tr;
use std::fmt;
use termion::color::{Bg, AnsiValue};
use termion::style::Reset;
use error::{Result, Error};
/// System colors.
pub const SYSTEM: [u32; 16] = [
0x000000, 0x800000, 0x008000, 0x808000,
0x000080, 0x800080, 0x008080, 0xc0c0c0,
0x808080, 0xff0000, 0x00ff00, 0xffff00,
0x0000ff, 0xff00ff,... | Rust | 0 |
from models.gwcnet import GwcNet_G, GwcNet_GC
from models.loss import model_loss
__models__ = {
"gwcnet-g": GwcNet_G,
"gwcnet-gc": GwcNet_GC
}
| Python | 1 |
sion 1.12.2.8 2008/07/31 18:22:59 customdesigned
# Wait until tcp response at least starts coming in.
#
# Revision 1.12.2.7 2008/07/28 01:27:00 customdesigned
# Check configured port.
#
# Revision 1.12.2.6 2008/07/28 00:17:10 customdesigned
# Randomize source ports.
#
# Revision 1.12.2.5 2008/07/24 20:10:55 cus... | Python | 1 |
RINGER : &'static str = "apply_ramping_ringer";
/// public static final [AUTO_TIME](https://developer.android.com/reference/android/provider/Settings.Global.html#AUTO_TIME)
pub const AUTO_TIME : &'static str = "auto_time";
/// public static final [AUTO_TIME_ZONE](https://developer.android.com/... | Rust | 0 |
start_ind = alt_string.rfind(subseq[0], None, end_ind - 1)
ind_list.append((start_ind, end_ind))
max_start_ind = -1
for start_ind, end_ind in ind_list[:-1]:
if start_ind != -1 and end_ind != -1:
max_start_ind = max(max_start_ind, start_ind)
appended... | Python | 1 |
val_loss"]:
plt.plot(hist.history[label],label=label)
plt.ylabel("loss")
plt.xlabel("epoch")
plt.title("The final validation loss: {}".format(hist.history["val_loss"][-1]))
plt.legend()
plt.show()
# Use the trained neural network to predict the remaining data points
X_pred = X_tot[dim:]
X_pred = X_pred.reshape((l... | Python | 1 |
al != val:
return False
else:
if val not in field_val:
return False
i += 1
continue
i += 1
return True
# run this line to test the quesries below: python3 -c "import utils; utils.test_queries()"
def test_querie... | Python | 1 |
og_ratio_width_loss(out_seg, segment_t1t2_to_cw(tgt_seg))
# F.smooth_l1_loss
# Compute the iou cost betwen segments
out_seg = torch.stack([
out_seg[..., 0], out_seg[..., 1].exp()
], dim=-1)
if self.diou:
cost_iou = -pairwise_segment_diou(segment_cw_to_t1... | Python | 1 |
# -*- coding: utf-8 -*-
# Copyright 2025 Google LLC
#
# 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 applicable law or... | Python | 1 |
66193274,
15426671498718617736,
9230857178223113223,
11731938389074297274,
16450973680014766981,
431917267220694852,
94637508603012
]));
/// AFFINE_GENERATOR_COEFFS = (G2_GENERATOR_X, G2_GENERATOR_Y)
const AFFINE_GENERATOR_COEFFS: (Sel... | Rust | 0 |
from abc import ABC, abstractmethod
from typing import Tuple
from utils.layout_model import Layout
import numpy as np
from enum import Enum
class RenderMode(Enum):
SIDE_BY_SIDE = 1
TRANSLATION_ONLY = 2
INTERLEAVE = 3
@staticmethod
def get_mode(mode: str):
if mode.lower() == "side_by_side":
... | Python | 1 |
te_operation.data.len();
self.operations.insert(write_operation);
self.is_full()
}
fn is_full(&self) -> bool {
self.size >= BUFFER_SIZE
}
pub fn flush(&mut self) -> Vec<WriteOperation> {
let mut result = Vec::new();
let mut old_operations = BTreeSet::new();
... | Rust | 0 |
raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8);
self.w
}
}
#[doc = "RX Data Inverted\nNote 1: Before setting this bit, TXRXDIS (UART_FUNCSEL\\[3\\]) should be set then waited for... | Rust | 0 |
tocolType;
// pub use request::AddressingFormatType;
// pub use request::UploadImagesDataType;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
#[test]
fn first_header_auth() {
let res = match basicauth::get_initial_www_auth(basicauth::IN... | Rust | 0 |
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
from typing import Any
from ...config_v2 import RaggedInferenceEngineConfig
from ..inference_policy_base import ContainerMap, InferenceV2Policy
from .container import FalconNonTransformerContainer, FalconTransformerContaine... | Python | 1 |
dependencies is empty
if v.dependencies.is_some() {
vcpkg_ports.extend_from_slice(&v.dependencies.as_ref().unwrap().as_slice());
}
if is_root_crate && v.dev_dependencies.is_some() {
vcpkg_ports
... | Rust | 0 |
// get user input
builtin("input", &mut env, |stack: &mut Vec<Val>, _| {
let _ = io::stdout().flush();
let mut input = String::new();
io::stdin().read_line(&mut input).expect("Reading input failed.");
let _ = input.pop();
stack.push(ast::create_string(input));
});
//print a value
builtin("print", &... | Rust | 0 |
,d:{a:FFB,b:0,c:0,d:2,e:0,f:0},e:{}}}", ],
["{j:{a:0}}", "{i:{a:7,b:1,f:2255100,c:{a:0,b:0,c:0,d:44},d:{a:FFB,b:0,c:0,d:2,e:0,f:0},e:{}}}", ],
["{j:{a:0}}", "{i:{a:8,b:1,f:2255100,c:{a:0,b:0,c:0,d:44},d:{a:FFB,b:0,c:0,d:2,e:0,f:0},e:{}}}", ],
["{j:{a:0}}", "{i:{a:9,b:1,f:2255100,c:{a... | Rust | 0 |
<T>(v: &[T], threads: usize) -> usize
{
if threads >= v.len() {
v.len()
} else {
v.len() / threads
}
}
pub fn parallel_all<
G: Group,
F: Fn(&[G], &[G]) -> bool + Sync
>
(v1: &[G], v2: &[G], f: F, threads: usize) -> bool
{
assert_eq!(v1.len(), v2.len());
let f = &f;
cros... | Rust | 0 |
me(it) = &node.lifetimes {
v.visit_bound_lifetimes(it);
};
v.visit_type(&node.bounded_ty);
tokens_helper(v, &node.colon_token.spans);
for el in Punctuated::pairs(&node.bounds) {
let (it, p) = el.into_tuple();
v.visit_type_param_bound(it);
if let Some(p) = p {
... | Rust | 0 |
}
impl ::std::cmp::PartialOrd for $name {
#[inline]
fn partial_cmp(&self, other: &Self) -> Option<::std::cmp::Ordering> {
Some(self.cmp(other))
}
}
});
}
/// Fetch a path from a configuration or raise an error.
#[macro_export]
macro_rules... | Rust | 0 |
= t2;
let mut t11 = t6;
let mut t12 = t7;
for _ in 0..idl1 {
let fresh18 = t11;
t11 = t11 + 1;
let fresh19 = t4;
t4 = t4 + 1;
cc[fresh19 as usize] += ar2 * ch[fresh18 as usize];
let fres... | Rust | 0 |
/// This panics if the string is not null-terminated and requires more than
/// 256 bytes of stack space.
fn as_cstr<F: FnOnce(&[u8]) -> R, R>(&self, f: F) -> R {
let slice = self.as_ref();
// If the string is empty call `f` with just a null-terminator.
if slice.is_empty() {
... | Rust | 0 |
Add with carry
ADC_IMM, ADC, Immediate, 0x69, 2, 2, [A], [C Z V N],
ADC_ZPG, ADC, ZeroPage, 0x65, 2, 3, [A], [C Z V N],
ADC_ZPX, ADC, ZeroPageX, 0x75, 2, 4, [A], [C Z V N],
ADC_ABS, ADC, Absolute, 0x6d, ... | Rust | 0 |
const AL_INVALID_OPERATION: i32 = 0xA004;
pub const AL_OUT_OF_MEMORY : i32 = 0xA005;
/// Source states
pub const AL_SOURCE_STATE: i32 = 0x1010;
pub const AL_INITIAL: i32 = 0x1011;
pub const AL_PLAYING: i32 = 0x1012;
p... | Rust | 0 |
Ok(_) => false,
Err((_, errs)) => {
eprintln!("baked_fluent: parse errors in `{}`", path.display());
for err in errs {
error::log_error(path, &source, &err);
}
true
}
}
}
fn gen_actix(name: Ident) -> proc_macro2::TokenStream {
quo... | Rust | 0 |
from pygame_utils import * # pyright:ignore[reportWildcardImportFromLibrary]
from pathlib import Path
from pygame.transform import scale
pg.mixer.init()
pg.init()
def scale1_2(image: pg.Surface) -> pg.Surface:
"""Scale a pygame Surface by 1.2x in both width and height."""
return scale(image, (image.get_width()... | Python | 1 |
er | Description |
/// | ------------------------------------------------------------------ |
/// | 0 | ✅ | ❌ | The user account to close |
/// | 1 | ❌ | ✅ | The owner of the user account to close |
/// | 2 | ✅ | ❌ |... | Rust | 0 |
'''
This is a test file for diagonal matrix constraint-satisfaction
'''
def printMatrix(matrix):
for row in matrix:
for elem in row:
print(elem, end='\t')
print()
def printMatrixAtInd(matrix, row, col):
print("at mat position [",row," ",col,"] we have: ", matrix[row][col])
def ... | Python | 1 |
from setuptools import find_packages, setup
setup(
name='Invoice_Extraction_app',
version='0.0.1',
author='coker richard',
author_email='richardaypdeji91@gmail.com',
install_requires=['openai','langchain','streamlt','python-dotenv','PyPDF2'],
packages=find_packages()
) | Python | 1 |
_of: IdPMap<MuType>,
built_uptr_of: IdPMap<MuType>,
built_strong_variant: IdPMap<MuType>,
built_constint_of: HashMap<u64, P<Value>>,
current_sig: Option<P<MuFuncSig>>,
current_entry: MuID
}
fn load_bundle(b: &mut MuIRBuilder) {
let vm = b.get_vm();
let new_id_name_map = b.id_name_map.drai... | Rust | 0 |
lass:`google.cloud.iam_v2.types.ListPoliciesResponse` object, and
provides an ``__aiter__`` method to iterate through its
``policies`` field.
If there are more pages, the ``__aiter__`` method will make additional
``ListPolicies`` requests and continue to iterate
through the ``policies`` field on th... | Python | 1 |
CO20W {
_PTCO20W { w: self }
}
#[doc = "Bit 21 - Port Clear Output"]
#[inline]
pub fn ptco21(&mut self) -> _PTCO21W {
_PTCO21W { w: self }
}
#[doc = "Bit 22 - Port Clear Output"]
#[inline]
pub fn ptco22(&mut self) -> _PTCO22W {
_PTCO22W { w: self }
}
#[doc... | Rust | 0 |
else:
return False
# leaves with B, P(indent), V(indent), BL(indent) or DL(indent)
return True
def parse_BI_helper(self, indent):
x = self.lookahead
if not x.isa(BH, indent): return False
indent = x.inner_indent
self.lookahead = PL()
self.... | Python | 1 |
abbr
for t in self.kRdanta[(mode, voice)]:
tagset.add(SanskritImmutableString(t, sanscript.SLP1))
return (SanskritImmutableString(stem.name, sanscript.SLP1), tagset)
def map_verb(self, obj):
tagset = set()
newobj = self.refresh(obj)
tagset.add(SanskritImm... | Python | 1 |
match parsed_cert.key {
PublicKey::RSA(rsa_n, rsa_e) => {
// Perform RSA signature operation
let signature_int = BigUint::from_bytes_be(&signature);
let sig_op = rsa_encrypt(&signature_int, &rsa_e, &rsa_n);
// Fix up PKCS1.5 blob
let mut raw_pkc... | Rust | 0 |
#######################################################
## ##
## BatchCompressPDF ver. 1.0.0.0 ##
## ##
## Programma per la compressione dei PDF in batch. ##
## ... | Python | 1 |
import uvicorn
from fastapi import APIRouter, FastAPI
from src.auth.login_router import login_router
from src.auth.router import auth_router
from src.config import APP_PORT, DEBUG
def create_app():
app = FastAPI(
debug=DEBUG,
docs_url="/api/docs/",
title="Banking App"
)
return ap... | Python | 1 |
# -*- coding: utf-8 -*-
# TencentBlueKing is pleased to support the open source community by making
# 蓝鲸智云 - PaaS 平台 (BlueKing - PaaS System) available.
# Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
# Licensed under the MIT License (the "License"); you may not use this file except
# in c... | Python | 1 |
type Item = <Self as Iterator>::Item;
#[inline]
fn into_par_stream(self) -> Self::ParStream
where
Self: Sized,
{
IterParStream(self)
}
}
impl<Idx> IntoParallelStream for RangeFrom<Idx>
where
Self: Iterator,
<Self as Iterator>::Item: Send + 'static,
{
type ParStream = IterParStream<Self>;
... | Rust | 0 |
+ body_short_atk_unit.len())
< screeps::constants::MAX_CREEP_SIZE as usize)
{
count += 1;
if count % 3 == 0 {
if sum_energy >= body_cost {
body.extend(body_unit.iter().cloned());
... | Rust | 0 |
_type = "application/pdf"
# 创建响应
file_stream = io.BytesIO(file_data)
logger.info(f"用户 {user_id} 下载报告: {report_id}, 文件: {report.file_path}")
return StreamingResponse(
file_stream,
media_type=content_typ... | Python | 1 |
status.success() {
panic!("Building xed failed");
}
}
#[cfg(feature = "raspberry_pi")]
pub use leaffront_input_pi::PiInput as InputImpl;
#[cfg(feature = "raspberry_pi")]
pub use leaffront_render_pi::drawer::PiDrawer as DrawerImpl;
#[cfg(feature = "glutin")]
pub use leaffront_input_glutin::GlutinInput as In... | Rust | 0 |
Eq)]
pub enum ScriptStatus {
/// The script has successfully completed and the migration data was flushed.
Ok,
/// The script was aborted as per abort policy used.
Aborted,
}
/// Helper for migration testing.
///
/// The helper implements the following workflow:
///
/// 1. Prepare test data to be migra... | Rust | 0 |
# -*- coding: utf-8 -*-
from asyncio import run
import ccxt.pro as ccxt
from pprint import pprint
# This example will run silent and will return your balance only when the balance is updated.
# 1. launch the example with your keys and keep it running
# 2. go to the margin trading on the website
# 3. place a margin ... | Python | 1 |
e ${prosody|volume=+6db|rate=x-fast|pitch=+4%} coffee ${/prosody}
Now lets go to a sentence. ${s} some words. ${/s}
Now lets go to say-as: ${say-as|interpret-as=spell-out} abc ${/say-as}.
What about a Sub? ${sub|alias=mercury} hg ${/sub}
What aboue a word role? ${w|role=amazon:VB} test ${/w}
What about whisper? ${amazo... | Rust | 0 |
n('_matfuncs_sqrtm_triu',
sources=[('_matfuncs_sqrtm_triu.c')],
include_dirs=[get_numpy_include_dirs()])
config.add_data_dir('tests')
# Cython BLAS/LAPACK
config.add_data_files('cython_blas.pxd')
config.add_data_files('cython_lapack.pxd')
... | Python | 1 |
class Solution:
def rotate(self, nums: List[int], k: int) -> None:
"""
Do not return anything, modify nums in-place instead.
"""
n = len(nums)
k = k % n
rotated = [0] * n
for i in range(n):
rotated[(i + k) % n] = nums[i]
for i in ... | Python | 1 |
ed of
/// 4194304 Hz.
pub struct Gpu {
/// If true, a Game Boy Color GPU will be emulated.
cgb_mode: bool,
/// CGB-specific data, needed in CGB mode.
cgb_data: Option<cgb::GpuData>,
/// The current mode.
mode: GpuMode,
/// The number of cycles spent in the current mode.
mode_clock: Cycle... | Rust | 0 |
.float64:
assert self.threshold_height >= 0.0
gripper_moving_side = plant.GetBodyByName("thumb")
cube = plant.get_body(self.cube_body_index)
# Get the position of the cube and the distance between the end effector and the cube
cube_pos = cube.EvalPoseInWorld(plant_context).tran... | Python | 1 |
mst.edges(data=True))}
print(f"Arbre couvrant minimum : {mst_result}")
output_path = os.path.join(output_directory, f"minimum_spanning_tree_{base_filename}.json")
save_json(mst_result, output_path)
print(f"Résultats de l'arbre couvrant minimum sauvegardés ... | Python | 1 |
# AUTO GENERATED FILE - DO NOT EDIT
import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
ComponentType = typing.Union[
str,
int,
float,
Component,
None,
typing.Sequence[ty... | Python | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.