text string | label_name string | labels int64 |
|---|---|---|
return {'_word_and_flag': self._word_and_flag, '_input_parameter': self._input_word_lower}
class TechnicalIndex:
def __init__(self):
pass
def index_word_preprocessing(self):
pass
def keyword_classification(self):
pass
def tf_idf(self):
pass
def generate_c... | Python | 1 |
::NewMultiPut | EntryFlag::TakeLock),
lock: &0,
locs: &[OrderIndex(5.into(), 0.into()), OrderIndex(6.into(), 0.into())],
deps: &[],
data: &[94, 49, 0xff],
});
stream.write_all(buffer.entry_slice()).unwrap();
stream.write_all(&[0; 6]).unwrap();
... | Rust | 0 |
number: *const OCINumber,
num_dec: i32,
result: *mut OCINumber
) -> i32;
// https://docs.oracle.com/en/database/oracle/oracle-database/19/lnoci/oci-NUMBER-functions.html#GUID-A535F6F1-0689-4FE1-9C07-C8D341582622
fn OCINumberSign(
err: *const OCIError,
numbe... | Rust | 0 |
END"]
pub type R = crate::R<u32, super::END>;
#[doc = "Reader of field `END`"]
pub type END_R = crate::R<u32, u32>;
impl R {
#[doc = "Bits 0:31 - Reserved for future use"]
#[inline(always)]
pub fn end(&self) -> END_R {
END_R::new((self.bits & 0xffff_ffff) as u32)
}
}
<filename>lib/collection/sr... | Rust | 0 |
= 99,
dexMultipler = 0.0,
agl = 10,
aglMultipler = 0.0,
evade = 0,
spd = 145,
spdMultipler = 0.0,
mov = 0,
movMultipler ... | Python | 1 |
ts,
))
}
}
#[cfg(test)]
mod test {
use super::*;
use crate::{net_address::MultiaddressesWithStats, peer_manager::NodeId, protocol, types::CommsPublicKey};
use serde_json::Value;
use tari_crypto::{
keys::PublicKey,
ristretto::RistrettoPublicKey,
tari_utilities::{hex::... | Rust | 0 |
-> bool {
if let Value::Number(ref n) = *self {
let n = f64::from(*n);
match n.classify() {
std::num::FpCategory::Nan
| std::num::FpCategory::Infinite
| std::num::FpCategory::Subnormal => false,
_ => {
le... | Rust | 0 |
orrat/unf
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate clap;
extern crate promptly;
extern crate regex;
extern crate deunicode;
#[macro_use]
#[cfg(test)]
extern crate maplit;
use promptly::prompt_default;
use regex::Regex;
use deunicode::deunicode;
use std::ffi::OsStr;
use std::fs::read_dir;
use s... | Rust | 0 |
from sympy import expand, simplify
from galgebra.printer import Format, xpdf
from galgebra.ga import Ga
g = '1 # #,' + \
'# 1 #,' + \
'# # 1'
Format()
ng3d = Ga('e1 e2 e3', g=g)
(e1, e2, e3) = ng3d.mv()
print('g_{ij} =', ng3d.g)
E = e1 ^ e2 ^ e3
Esq = (E * E).scalar()
print('E =', E)
print('%E^{2} =', Esq)
E... | Python | 1 |
th.join(args.contract, "*.sol")
contracts = glob.glob(path)
# If it's a single contract, analyze it
elif os.path.isfile(args.contract):
contracts = [args.contract]
else:
err('Non existent contract or directory: %s' % args.contract)
sys.exit(1)
patterns = args.p... | Python | 1 |
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader, Settings
from llama_index.llms.ollama import Ollama
from llama_index.embeddings.huggingface import HuggingFaceEmbedding
# Load PDFs
documents = SimpleDirectoryReader("Content", recursive=True).load_data()
# Use Ollama for both LLM and Embeddings
llm... | Python | 1 |
an unnamed item would have raised an exception above in `get_check()`
name = self.get("name")
raise ConfigurationError(
name,
entry_name=entry,
item_line=self._table_line,
message=f"i... | Python | 1 |
.
async fn connect_after_timeout(
peer_id: PeerId,
peers: Arc<Mutex<ConnectedPeers>>,
profile_svc: bredr::ProfileProxy,
channel_mode: bredr::ChannelMode,
) {
trace!("waiting {}s before connecting to peer {}.", INITIATOR_DELAY.into_seconds(), peer_id);
fuchsia_async::Timer::new(INITIATOR_DELAY.af... | Rust | 0 |
("2e"),
self.styled_piece("1e"),
self.styled_piece("0e"));
println!("| | | | | |");
println!("| | {}--{}--{} | |",
self.styled_piece("2sw"),
self.styled_piece("2s"),
self.styled_piece("2se"));
println!("| | | ... | Rust | 0 |
# -*- coding: utf-8 -*-
"""
https://leetcode.com/problems/spiral-matrix/
输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字。
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.
Example 1:
Input:
[
[ 1, 2, 3 ],
[ 4, 5, 6 ],
[ 7, 8, 9 ]
]
Output: [1,2,3,6,9,8,7,4,5]
Example 2:
In... | Python | 1 |
: Vec3) {
self.rayleigh_coefficient.x = coefficient.x.clone();
self.rayleigh_coefficient.y = coefficient.y.clone();
self.rayleigh_coefficient.z = coefficient.z.clone();
}
/// Sets the scale height (in meters) for Rayleigh scattering
pub fn set_rayleigh_scale_height(&mut self, scale:... | Rust | 0 |
) -> StatusCode {
match self {
Self::TooManyRequests => StatusCode::TOO_MANY_REQUESTS,
Self::InternalServerError => StatusCode::INTERNAL_SERVER_ERROR,
}
}
}
// Used for health checks
#[api_v2_operation]
async fn status() -> web::Json<()> {
Json(())
}
#[api_v2_operation]... | Rust | 0 |
),
],
)
def access_path(node: ast.AST) -> list[str]:
path = []
if isinstance(node, ast.NamedExpr):
node = node.target
while not isinstance(node, ast.Name):
if not isinstance(node, ast.Attribute):
return []
path.append(node.attr)
... | Python | 1 |
ayout for different screen sizes")
print("\n📈 Development Progress:")
progress_items = [
("Phase 1.1 NGS Integration GUI", "✅ Complete"),
("Phase 1.2 CRISPR Screening GUI", "✅ Complete"),
("Phase 1.3 Single-Cell GUI", "✅ Complete (50% of Phase 1.3)"),
("Core GUI Framework", "✅ ... | Python | 1 |
# setup.py
# This file is generated by Shroud nowrite-version. Do not edit.
# Copyright Shroud Project Developers. See LICENSE file for details.
#
# SPDX-License-Identifier: (BSD-3-Clause)
#
from setuptools import setup, Extension
import numpy
module = Extension(
'testnames',
sources=[
'pytestnames_ns... | Python | 1 |
rializer<R>(AsyncReaderImpl<R>);
impl<'r, R> AsyncDeserializer<R>
where
R: io::AsyncRead + std::marker::Unpin + 'r,
{
/// Create a new CSV reader given a builder and a source of underlying
/// bytes.
fn new(builder: &AsyncReaderBuilder, rdr: R) -> AsyncDeserializer<R> {
AsyncDeserializer(AsyncR... | Rust | 0 |
# materials/urls.py
from django.urls import path
from .views import MaterialCreateView, MaterialRetrieveView, MaterialSearchView, AdvancedMaterialPropertyView, HomeView
urlpatterns = [
path('material/', MaterialCreateView.as_view(), name='material-create'),
path('material/<int:id>/', MaterialRetrieveView.as_vi... | Python | 1 |
mber of messages at a time.
///
/// # Examples
///
/// ```
/// use std::thread;
/// use crossbeam_channel::unbounded;
///
/// let (s, r) = unbounded();
///
/// // Computes the n-th Fibonacci number.
/// fn fib(n: i32) -> i32 {
/// if n <= 1 {
/// n
/// } else {
/// fib(n - 1) + fib(n - 2)
/// ... | Rust | 0 |
# Generated by Django 3.2.12 on 2022-03-22 21:42
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name="StripeNotification",
fields=[
("id", models.BigA... | Python | 1 |
Status.CREATE_AND_WAIT,
proto=proto,
ext_port_start=ext_port_start,
ext_port_end=ext_port_end,
local_addr_type=local_addr_type,
local_addr=local_addr,
local_port_start=local_port_start,
local_port_end=local_port_end
)
n... | Python | 1 |
# -*- coding: utf-8 -*-
# Copyright (C) 2017 Nippon Telegraph and Telephone Corporation.
#
# 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
#
#... | Python | 1 |
nt_frequency_hz = INITIAL_FREQUENCY_HZ;
*current_bitmask = 0x01;
}
latch_pin.set_low().unwrap();
for i in 0..channel_brightness.len() / 8 {
let mut value = 0x00;
for j in 0..=7 {
let brightness = channel_brightness[channel_brightness.len() - (i * 8 + j) - 1];
... | Rust | 0 |
::c_int;
pub const TJ_ALPHAFIRST: libc::c_int = 64 as libc::c_int;
pub const TJ_YUV: libc::c_int = 512 as libc::c_int;
use ::libc;
#[c2rust::header_src = "/home/sjcrane/projects/c2rust/mozjpeg/mozjpeg-c2rust/mozjpeg-c/turbojpeg.h:43"]
pub mod turbojpeg_h {
/* *
* MCU block width (in pixels) for a given lev... | Rust | 0 |
import sys
from pathlib import Path
import csv
import logging
from datetime import datetime
script_dir = Path(__file__).resolve().parent # experiments/
project_root = script_dir.parent # parent of experiments/ and src/
sys.path.insert(0, str(project_root / "src"))
from camera_capture import find... | Python | 1 |
ontext(
ShardForMerge(text_path, meta_path if has_meta else None)
)
for text_path, meta_path in self.config.pairs
]
seen_hashes: tp.Set[int] = set()
# read the first line of each shard and remove the empty shards
# (theo... | Python | 1 |
# Problem: Valid Mountain Array - https://leetcode.com/problems/valid-mountain-array/description/
class Solution:
def validMountainArray(self, arr: List[int]) -> bool:
n = len(arr)
if n < 3: return False
i = 0
while i + 1 < n and arr[i] < arr[i + 1]:
i += 1
... | Python | 1 |
use napi::{Env, Error, Status, NapiValue, CallContext};
let mut argc = #arg_len_span as usize;
let mut raw_args: [napi::sys::napi_value; #arg_len_span] = [ptr::null_mut(); #arg_len_span];
let mut raw_this = ptr::null_mut();
unsafe {
let status = napi::sys::napi_get_cb_info(
... | Rust | 0 |
e workflow transition button 'schedule_sampling'
pass
else:
# Hiddes the button
state['hide_transitions'] = ['schedule_sampling', ]
new_states.append(state)
self.review_states = new_states
return items
def _sche... | Python | 1 |
.join(dir, "root-20231122193630")
snap = snap_holder.Snapshot(snap_destination)
snap.metadata.comment = "Comment"
snap.metadata.trigger = "S"
self.assertEqual(snap.as_json(), {"comment": "Comment", "trigger": "S"})
expiry = _NOW + datetime.timedelta(hours=1)
... | Python | 1 |
} else if symbol_to_int(ch) < symbol_to_int(*val) {
res += symbol_to_int(v.pop_front().unwrap()) - symbol_to_int(ch);
continue;
}
} else {
res += symbol_to_int(ch);
continue;
}
}
res
... | Rust | 0 |
().unwrap().is_ok()); // first time ok
assert!(stream.next().is_none()); // then it stops iterating
}
#[test]
fn test_price4() {
let p4: d128 = Price4(12340001).into();
assert_eq!(p4, d128::from_str("1234.0001").unwrap());
}
#[test]
fn test_price8() {
let p8: d1... | Rust | 0 |
from typing import Optional
from uuid import UUID
from ninja import Field, ModelSchema, Schema
from arkid.config import get_app_config
from arkid.core import actions
from arkid.core.extension import create_extension_schema
from arkid.core.schema import ResponseSchema
from arkid.core.translation import gettext_default a... | Python | 1 |
}
}
with open(self.output_file, 'w', encoding='utf-8') as f:
json.dump(final_data, f, indent=2, ensure_ascii=False)
print(f"💾 บันทึก DM จริงแล้ว: {self.output_file}")
return final_data
def display_real_dms(self, data):
"""แ... | Python | 1 |
#!/usr/bin/python
# coding=utf-8
#
# Simple demo of reading each analog input from the ADS1x15 and printing it to
# the screen.
# Author: Tony DiCola (Edited by Kyle Gabriel)
# License: Public Domain
import os
import sys
import time
import Adafruit_ADS1x15
import RPi.GPIO as GPIO
if not os.geteuid() == 0:
print("... | Python | 1 |
e, can_send_link_message: Optional[bool] = None,
can_send_forwarded_message: Optional[bool] = None, can_see_members: Optional[bool] = None,
can_add_story: Optional[bool] = None, can_be_edited: Optional[bool] = None
) -> None:
super().__init__()
self.status = status
se... | Python | 1 |
pytest.raises(ValueError) as e:
tab.remove_handlers(handler=request_handler)
assert str(e) == "if handler is provided, event_type should be provided as well"
async def test_wait_for_ready_state(browser: zd.Browser):
tab = await browser.get(sample_file("groceries.html"))
await tab.wait_for_rea... | Python | 1 |
32;
#[doc = "*Required features: `\"Win32_Networking_WindowsWebServices\"`*"]
pub const WS_UINT16_TYPE: WS_TYPE = 6i32;
#[doc = "*Required features: `\"Win32_Networking_WindowsWebServices\"`*"]
pub const WS_UINT32_TYPE: WS_TYPE = 7i32;
#[doc = "*Required features: `\"Win32_Networking_WindowsWebServices\"`*"]
pub const ... | Rust | 0 |
fun
}
Some(closure_fun) => closure_fun.clone(),
};
let exprs = vec_map(&closure_state.holes, |(_, _, e)| e.clone());
let app = Arc::new(ExprX::Apply(closure_fun, Arc::new(exprs)));
if state.closure_states.len() == 0 {
(typ, app, None)
} else {
// REVIEW: when we're ne... | Rust | 0 |
)):
points[j] = isog_point(points[j],kernel)
elif (strategy[i] < h) and (0 < strategy[i]):
S.append([h,P])
P = xTriplee(P,A24,strategy[i])
S.append([h-strategy[i],P])
i += 1
return [A24,points]
def get_PQb_and_shift(A,A1,Pa,Qa,Pa1,Qa1,tau,F... | Python | 1 |
red_mean) * b * b) / 256.0))
.sqrt()
}
#[cached]
fn color_distance_cielab(color1: rgb::RGBA8, color2: rgb::RGBA8) -> f64 {
let color1 = RGBColor::from((color1.r, color1.g, color1.b));
let color2 = RGBColor::from((color2.r, color2.g, color2.b));
color1.distance(&color2)
}
<reponame>Setheum-Labs/la... | Rust | 0 |
::RgbaImage; 6]; 8], // first four are LDUR, then come left-up and right-up
mine: image::RgbaImage,
},
MonoSnapLdur {
receptors: [image::RgbaImage; 4],
notes: [image::RgbaImage; 4],
mine: image::RgbaImage,
},
Pump {
receptors: [image::RgbaImage; 5],
notes: [[image::RgbaImage; 5]; 8],
mine: image::Rgba... | Rust | 0 |
= if mantissa >= MIN_19DIGIT_INT {
// big int
int_end.offset_from(&s)
} else {
// SAFETY: the next byte must be present and be '.'
// We know this is true because we had more than 19
// digits previously, so we overflowed a 64-bit integer,
... | Rust | 0 |
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | Python | 1 |
},
..
} => {
window_q.emit_owned(GlobalEvent::Click(cursor));
}
WinitEvent::WindowEvent { event: WindowEvent::CloseRequested, .. } => {
*control_flow = ControlFlow::Exit;
}
WinitEvent::WindowE... | Rust | 0 |
from django.shortcuts import render, get_object_or_404
from .models import Category ,Subcategory
def Categories(request):
catigories = Category.objects.all()
return render(request, "index.html", {'categories': catigories})
#ну я привык что в drf огромные views.как то не привычно
def Subcategorydetail(reques... | Python | 1 |
multi_output=True, use_ignore=True, ignore_label=255,
name="proposal_cls_loss")
# face keypoints projection
param3d_pred = mx.symbol.Convolution(
data=relu_feature_block, kernel=(3, 3), pad=(1, 1), num_filter=8, name="param3d_pred"
)
... | Python | 1 |
DampedSpringSetanchorA(self.to_constraint(), value) }
}
/// See [Chipmunk Pin Joint](http://chipmunk-physics.net/release/Chipmunk-7.x/Chipmunk-7.0.1-Docs/#ConstraintTypes-cpDampedSpring).
pub fn set_anchor_b(&self, value: CPVect) {
unsafe { cpDampedSpringSetanchorB(self.to_constraint(), value) }
... | Rust | 0 |
from typing import List
class Solution:
def minOperations(self, grid: List[List[int]], x: int) -> int:
D1_grid = [val for row in grid for val in row]
D1_grid.sort()
diffrence = []
for val in D1_grid:
diff = abs(val-D1_grid[0])%x
diffrence.append(diff)
... | Python | 1 |
/// Navigation system
pub source: NavigationSystem,
/// Mode 1: true = automatic, false = manual
pub mode1_automatic: Option<bool>,
/// Mode 2, fix type:
pub mode2_3d: Option<GsaFixMode>,
/// PRN numbers used (space for 12)
pub prn_numbers: Vec<u8>,
/// Position (3D) dilution of... | Rust | 0 |
, &rhs_slot.char_range)
};
let slot_sort_key = |slot: &InternalSlot| {
let tokens_count = tokenize(&slot.value, language).len();
let chars_count = slot.value.chars().count();
-((tokens_count + chars_count) as i32)
};
let mut deduped = deduplicate_overlapping_items(slots, slots_ov... | Rust | 0 |
answer" -- which is just a plain health check
Ok(health)
})
.await
.unwrap(); // unwrap will extract the Ok value, less work for us
// but if that didn't work, then it will all just crash, no error handling for us (right now)
// std::thread::sleep(Duration::from_secs(5)); // only... | Rust | 0 |
and(3, 4, 400, 100).astype('float64')
def test_static_api(self):
paddle.enable_static()
with paddle.static.program_guard(paddle.static.Program()):
x = paddle.static.data('x', self.x.shape, dtype=self.x.dtype)
y = paddle.static.data('y', self.y.shape, dtype=self.y.dtype)
... | Python | 1 |
lse,
'has_delete_permission': True,
'has_change_permission': True,
}
return render(request, 'admin/reabrir_chamado.html', context)
def chamados_relacionados_view(self, request, especialidade_id):
especialidade = get_object_or_404(Especialidade, id=especialidade_id)
... | Python | 1 |
r = node as *const TsTplLitType<'a> as *mut TsTplLitType<'a>;
(*node_ptr).parent.replace(parent.expect::<TsLitType>());
}
}
#[derive(Clone)]
pub struct TsTupleElement<'a> {
parent: Option<&'a TsTupleType<'a>>,
pub inner: &'a swc_ast::TsTupleElement,
/// `Ident` or `RestPat { arg: Ident }`
pub label: Opti... | Rust | 0 |
t)))).finish()
}
}
impl<'a, S: ?Sized, A: Copy, B: Copy> Display for Print<'a, S, (A, B)>
where Print<'a, S, A>: Display, Print<'a, S, B>: Display {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
f.debug_tuple("")
.field(&DisplayAsDebug(self.to(self.t.0)))
.field(&DisplayAsDebug(self.to(self... | Rust | 0 |
Error {
fn from(err: std::io::Error) -> RenderError {
RenderError::Io(err)
}
}
impl std::fmt::Display for RenderError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
RenderError::FileMissing => write!(f, "file missing"),
RenderErro... | Rust | 0 |
view).
# We can see that:
#
# - The coordinate ``(left, bottom)`` anchors the image which then fills the
# box going towards the ``(right, top)`` point in data space.
# - The first column is always closest to the 'left'.
# - *origin* controls if the first row is closest to 'top' or 'bottom'.
# - The image may be inve... | Python | 1 |
let mat_red = Material::lambertian_constant(Vec3::new(0.65,0.05,0.05));
let mat_green = Material::lambertian_constant(Vec3::new(0.12,0.45,0.15));
let mat_white = Material::lambertian_constant(Vec3::new(0.73,0.73,0.73));
// let mat_light = Material::diffuse_light_constant(Vec3::new(15.0,15.0,15.0));
... | Rust | 0 |
, 9]);
let b = VecDocSet::from(vec![3, 4, 9, 18]);
let c = VecDocSet::from(vec![1, 5, 9, 111]);
let mut intersection = Intersection::new(vec![a, b, c]);
assert!(intersection.advance());
assert_eq!(intersection.doc(), 9);
assert!(!intersection.advan... | Rust | 0 |
import logging
import aio_pika
import pika
from django_telethon.default_settings import (
QUEUE_CALLBACK_FN,
QUEUE_CHANNEL_NAME,
RABBITMQ_ACTIVE,
RABBITMQ_URL,
)
__all__ = [
"send_to_telegra_thread",
]
async def process_message(message: aio_pika.IncomingMessage):
try:
async with me... | Python | 1 |
&[u8] = &[1, 2, 3];
let cow1: Cow<'_, [u8]> = arr.into();
let cow2 = cow1.to_owned();
assert!(cow1.is_same(&arr));
assert!(arr.is_same(&cow1));
assert!(cow2.is_same(&arr));
assert!(arr.is_same(&cow2));
assert!(cow1.is_same(&cow2));
}
#[test]
fn check_tuples() {
let t1 = (1, 2, "baz");
... | Rust | 0 |
Approximately the 12.1% of the stars will be of this type. They will have up to 10 planets
/// orbiting them.
K,
/// This represents an M type of star. This stars are red stars. Their surface temperature is
/// usually between 2,400K and 3,700K and their mass between 0.08 and 0.45 solar masses.
///... | Rust | 0 |
///
/// ### Why is this bad?
/// A single leading underscore is usually used to indicate
/// that a binding will not be used. Using such a binding breaks this
/// expectation.
///
/// ### Known problems
/// The lint does not work properly with desugaring and
/// macro, it has been allo... | Rust | 0 |
anic!("invalid amount of operands")
}
}
pub fn lift_mov(operands: &[X86Operand], cs: &Capstone) -> ir::Block {
if let [dst, src] = operands {
let dst = &dst.op_type;
let src = &src.op_type;
ir::Block(vec![ir::Stmt::Set {
dst: lift_set_dst(dst, cs),
val: lift_read... | Rust | 0 |
"""SSTI (服务器端模板注入) 漏洞分析专用提示词
"""
from typing import Dict, Any
def get_analysis_prompt(context: Dict[str, Any]) -> str:
"""
构建针对SSTI漏洞分析的提示词
Args:
context: 包含HTTP请求/响应、参数等信息的上下文
Returns:
为LLM准备的提示词字符串
"""
request_url = context.get('url', 'N/A')
request_params = ... | Python | 1 |
import pandas as pd
import geopandas as gpd
import matplotlib.pyplot as plt
from pathlib import Path
from utils import *
models = ['mmnet', 'mlp', 'transformer']
root = Path(r"root/path/to/your/checkpoints")
AllSamples = pd.read_csv(r"path/to/your/SCAN_USCRN_HLSL30_0.1_ts_interpolated_timeseries.csv")
titles = dict(z... | Python | 1 |
from dotenv import load_dotenv
import os
load_dotenv()
import chainlit as cl
from openai import OpenAI
import langwatch
from opentelemetry import metrics
from opentelemetry.sdk.metrics import MeterProvider
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.metrics.export import PeriodicExporting... | Python | 1 |
_VK_SUBPASS_CONTENTS_INLINE: VkSubpassContents = 0;
pub const VkSubpassContents_VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS: VkSubpassContents = 1;
pub const VkSubpassContents_VK_SUBPASS_CONTENTS_MAX_ENUM: VkSubpassContents = 2147483647;
pub type VkSubpassContents = ::std::os::raw::c_uint;
pub const VkAccessFlagBits_... | Rust | 0 |
def motvos():
print("motivos")
| Python | 1 |
DepNodeColor::Green(_) => true,
}
}
}
struct DepGraphData {
/// The new encoding of the dependency graph, optimized for red/green
/// tracking. The `current` field is the dependency graph of only the
/// current compilation session: We don't merge the previous dep-graph into
/// curren... | Rust | 0 |
ColourVertex::new(vertices[2], colours[2]),
ColourVertex::new(vertices[3], colours[3]),
]).map(|vb| Quad{
vertex_buffer: vb
})
}
/// Returns an object used for drawing the quad onto the screen with a `Drawer`
pub fn drawer(&self) -> QuadDrawer{
Qu... | Rust | 0 |
"""Role management operations."""
from typing import List
from ...comm.remote_system_controller import RedfishError, Rsc
from ...models.role import Role, RoleCollection
def get_roles(rsc: Rsc) -> List[Role]:
"""Get all available roles from the system"""
role_collection = RoleCollection(
rsc.perform_re... | Python | 1 |
from(0.73695318));
ok.test_value(1);
let t = c.exp2();
print!("exp2(", c.reveal(), ") = ", t, "\n");
let ok = test_approx(t, ClearIEEE::from(1.457100108));
ok.test_value(1);
let t = mc.acos();
print!("acos(", mc.reveal(), ") = ", t, "\n");
let ok = test_approx(t, ClearIEEE::from(2.14492... | Rust | 0 |
== 0:
result.address = DeviceAddress(
can_id=proposed_can_id,
transport_device=result.transport_device)
elif result.uuid is not None:
# We have a UUID. Find the shortest unique prefix.
for prefix_len in [4, 8, 12, 16]:... | Python | 1 |
0E0E6"),
("بنفش", "#800080"),
("قرمز", "#FF0000"),
("بادمجانی", "#BC8F8F"),
("فیروزهای فسفری", "#4169E1"),
("کاکائویی", "#8B4513"),
("سالمحناییِ روشنوني", "#FA8072"),
("هلویی سیر", "#F4A460"),
("خزهای پررنگ", "#2E8B57"),
... | Python | 1 |
rallelism.
if chunk_secs:
examples |= beam.FlatMap(
_chunk_audio,
sample_rate=sample_rate,
chunk_secs=chunk_secs)
# Add features.
if frame_rate:
examples = (
examples
| beam.Map(_add_f0_estimate,
frame_rate=frame_rate,
... | Python | 1 |
el1995/dotfiles
use chrono::TimeZone;
use std::ffi::CStr;
use std::fs;
use std::io::Read;
use std::path::PathBuf;
use chrono::DateTime;
use chrono::Local;
use nom::combinator::map;
use serde::Serializer;
use structopt::StructOpt;
use nom::bytes::streaming::{tag, take};
use nom::combinator::map_opt;
use nom::number::... | Rust | 0 |
[ R
" U5 S.- n[
[ R " U5 5 eS =pSn [ U 5 o( d SS[ R " 5 ; d [ R " [ 5 ( a [ R
" [ 5 ... | Python | 1 |
eq!(
unsafe { &(*(::core::ptr::null::<cx_rsa_4096_private_key_s>())).size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(cx_rsa_4096_private_key_s),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ... | Rust | 0 |
:{submission::RawSubmission, user_stat::{StreakData, ProblemCountData, PointSumData}}};
const API_ENDPOINT: &str = "https://kenkoooo.com/atcoder";
fn create_client() -> Result<reqwest::Client, reqwest::Error> {
reqwest::Client::builder().gzip(true).build()
}
pub async fn get_user_submissions(user_name: &str) -> ... | Rust | 0 |
with col2:
clf_button = st.button("**Classify**", width="stretch")
# --- CLASSIFICATION BUTTON ---
if clf_button:
if not invoice_item.strip():
st.warning("Please enter an invoice item.")
else:
try:
result = classify_product(ensemble_model, invo... | Python | 1 |
e_transformation;
pub use crate::src::transupp::jtransform_request_workspace;
pub use crate::src::transupp::JCOPYOPT_ALL;
pub use crate::src::transupp::JCOPYOPT_ALL_EXCEPT_ICC;
pub use crate::src::transupp::JCOPYOPT_COMMENTS;
pub use crate::src::transupp::JCOPYOPT_NONE;
pub use crate::src::transupp::JCOPY_OPTION;
pub u... | Rust | 0 |
nType::None,
];
let weapon_type_count = self.weapon_purchase_type_count(false);
if weapon_type_count < 2 {
return;
}
let w = G::popup(8 + weapon_type_count as i32, 56);
self.wcon(w, G::A_TITLE());
self.mvwprintw_center(
w,
2... | Rust | 0 |
NAL = 0,
#[doc = "< Sort match AP in scan list by security mode"]
WIFI_CONNECT_AP_BY_SECURITY = 1,
}
#[doc = " @brief Structure describing parameters for a WiFi fast scan"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct wifi_scan_threshold_t {
#[doc = "< The minimum rssi to accept in the fast scan mode... | Rust | 0 |
tConfiguration must be decodable into AbridgedHostConfiguration");
assert_eq!(
abridged_config,
AbridgedHostConfiguration {
max_code_size: ground_truth.max_code_size,
max_head_data_size: ground_truth.max_head_data_size,
max_upward_queue_count: ground_truth.max_upward_queue_count,
max_upw... | Rust | 0 |
, Exists(Equals(f(v1), f(v2) + f(v3)), v2)), v1)
# v2 is changed with s2 in the Forall, while in the Exists only v3 is changed with s3
test_sub_exp1 = Forall(
And(f(s2) > f(v1), Exists(Equals(f(v1), f(v2) + f(s3)), v2)), v1
)
self.assertEqual(exp1.substitute(subs), test_sub_e... | Python | 1 |
UART0 IRQ [4]
*VIC_INT_ENABLE = 1 << UART0_IRQ as uint;
// enable RXIM interrupt
*io::UART0_IMSC = 1 << 4;
}
}
}
extern {
fn start();
}
#[no_mangle]
pub unsafe fn debug() {
asm!("movs pc, lr")
}
// TODO respect destructors
#[lang="begin_unwind"]
unsafe extern ... | Rust | 0 |
s_requestedPolicyVersion', 'options.requestedPolicyVersion')
encoding.AddCustomJsonFieldMapping(
AiplatformProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyRequest, 'options_requestedPolicyVersion', 'options.requestedPolicyVersion')
encoding.AddCustomJsonFieldMapping(
AiplatformProjectsLocationsFeatu... | Python | 1 |
onfirmed_frame;
}
/// Queue the local inputs to send over the network
pub fn queue_local_input(&mut self, inputs: &Vec<RMercuryInputWrapper<TGameInput>>) {
for input in inputs.iter() {
if input.frame >= self.last_confirmed_local_input_frame {
self.last_confirmed_local_in... | Rust | 0 |
U Kullanımı', 'RAM Kullanımı'], [cpu_usage, ram_usage], color=['blue', 'green'])
ax.set_ylim(0, 100)
ax.set_title('Sistem Performansı')
self.canvas.draw()
# Ekran görüntüsü almak
def capture_screenshot():
screenshot = ImageGrab.grab()
screenshot.save("screenshot.png")
messagebox.sho... | Python | 1 |
:?}\t{}\t{}\t{}", timer.elapsed(), time.time(), cnt, sum, max);
}
}
rank_stash.retain(|_key, val| !val.is_empty());
}
}
);
changes
.probe_with(&mut probe)
... | Rust | 0 |
#[rstest_parametrize(a, b, operator,
// case::wrong_operator_lt("1.2.3", "1.2.3", &CompOp::Lt),
// case::wrong_operator_ne("1.2", "1.2.0.0", &CompOp::Ne),
// case::dev_alone_is_not_eq("1.2.3.dev", "dev", &CompOp::Eq),
// // not an error, conda considers alpha lower... | Rust | 0 |
_windows()
.filter_map(|(previous, current, next)| {
if current.len() >= previous.len() {
if current.len() >= next.len() {
Some(current)
} else {
None
}
} else {
None
}
... | Rust | 0 |
rono::{NaiveDate, NaiveDateTime, UTC};
use chrono::duration::Duration;
use diesel::expression::dsl::*;
use diesel::expression::AsExpression;
use diesel::prelude::*;
use diesel::select;
use diesel::types::{Array, BigInt, Bool, Date, Double, Integer, Nullable, Text, Timestamp, VarChar};
use regex::Regex;
use DB_POOL;
us... | Rust | 0 |
import datetime
import pathway as pw
from pathway.tests.utils import run_all
def test_physical_compaction_in_multiworkers(monkeypatch):
monkeypatch.setenv("PATHWAY_THREADS", 4)
class InputSchema(pw.Schema):
device_id: str
datetime_utc: pw.DateTimeUtc
geofence_visit: bool
class S... | Python | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.