text string | label_name string | labels int64 |
|---|---|---|
;
extern crate byteorder;
extern crate bytes;
extern crate chan_signal;
extern crate futures;
extern crate futures_cpupool;
extern crate hyper;
extern crate itertools;
extern crate positioned_io;
extern crate rayon;
extern crate rmp_serde as rmps;
extern crate serde;
extern crate simple_logger;
extern crate tokio_core;... | Rust | 0 |
wrap().ring_staking_lock.unbondings.len(), 2);
})
}
// #[deprecated]
// #[test]
// fn rebond_works() {}
// #[deprecated]
// #[test]
// fn rebond_is_fifo() {}
#[test]
fn reward_to_stake_works() {
ExtBuilder::default()
.nominate(false)
.fair(false)
.build()
.execute_with(|| {
// Confirm validator count is... | Rust | 0 |
} else {
key = None;
}
let server = TcpServer::new_with_key("0.0.0.0:40788", key.as_deref()).unwrap();
if key.is_none() {
let mut key_file = File::create(key_file).unwrap();
key_file.write_all(&server.key()).unwrap();
}
println!("ready");
loop {
match server.accep... | Rust | 0 |
s(
&self,
access: &str,
data: &mut dyn Read,
) -> Result<UnpaddedBytesAmount, SectorManagerErr> {
OpenOptions::new()
.read(true)
.write(true)
.open(access)
.map_err(|err| SectorManagerErr::CallerError(format!("{:?}", err)))
... | Rust | 0 |
*/
pub fn get_texture(&self, path: &str) -> Option<&Texture2D> {
self.resources.get_texture(path)
}
pub fn load_ogg(&mut self, name: &str, data: &[u8], looped: bool) {
self.resources.load_ogg(name, data, looped);
}
pub fn play_sound(&mut self, name: &st... | Rust | 0 |
as u32;
current_task.mm.write_object(UserRef::new(response_address), &response)
}
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_MAP_BUFFER_GPU => {
let (control, mut response): (
virtio_magma_map_buffer_gpu_ctrl_t,
virtio_magma_ma... | Rust | 0 |
# Koşullu ifadeler
"""
örn:
Eğer hava yağmurlu ise:
ceketimi giyeceğim
Eğer hava güneşli ise:
güneş gözlüğümü takacağım
bunların hiçbiri değilse:
normal bir şekilde dışarı çıkacağım
"""
yagmurlu = True;
gunuseli= True;
if yagmurlu and gunuseli==False:
print("Ceketini giy")
elif yagmurlu== False and ... | Python | 1 |
import numpy as np
from ..sequence.position_weight_matrix import PWM
def parse_jaspar_line(line):
letter, rest = line.split(maxsplit=1)
rest = rest.strip()[1:-1].split()
counts = [float(n) for n in rest]
return letter.strip(), counts
def read_jaspar_matrix(filename):
f = open(filename)
_ = f... | Python | 1 |
#!/usr/bin/python
# coding: utf-8
# -------------------------------------------------------------------
# aapanel
# -------------------------------------------------------------------
# Copyright (c) 2015-2099 宝塔软件(http://www.aapanel.com) All rights reserved.
# ----------------------------------------------------------... | Python | 1 |
# Write a Python program to solve quadratic equation.
import math
a = float(input("Enter the coefficient of x^2: "))
b = float(input("Enter the coefficient of x: "))
c = float(input("Enter the coefficient of x^0: "))
# Check the equation quadratic or not
if a == 0:
print("Coefficient of x^2 cannot be 0")
else:
... | Python | 1 |
7_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PTDPE7_A {
match self.bits {
false => PTDPE7_A::_0,
true => PTDPE7_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
... | Rust | 0 |
from dataclasses import dataclass, field
from typing import List, Optional
@dataclass
class Panel:
"""Represents a single comic panel with description, dialogue, and scene details."""
panel_number: int
scene_description: str
dialogue: List[str]
narration: Optional[str] = None
image_path: ... | Python | 1 |
rite_bytes(&**&self.rows))?;
if let Some(ref s) = self.next_start_primary_key { w.write_with_tag(26, |w| w.write_bytes(&**s))?; }
if let Some(ref s) = self.next_token { w.write_with_tag(34, |w| w.write_bytes(&**s))?; }
Ok(())
}
}
#[derive(Debug, Default, PartialEq, Clone)]
pub struct Comput... | Rust | 0 |
Arc;
use http::StatusCode;
use tokio::sync::RwLock;
use crate::db::DbPool;
use crate::error::{Result};
use crate::fetch;
use crate::model::song_like::SourceMetadataDetermination;
mod song_like_handler;
type Dissects = Arc<Vec<SourceMetadataDetermination>>;
type Spotify = Arc<RwLock<super::model::spotify::Spotify>>;... | Rust | 0 |
tains: #
# - key_type: hash, set, list, sorted_set, etc. #
# - key_tpl: Key generation rule. #
# - field_tpl: Field generation rule, if any. #
# - ttl: 10(unit:seconds). #
# - backend: "queue", "service", "log", etc. #
# - label: Desc... | Python | 1 |
import uuid
from django.db import models
from django.urls import reverse
from django.contrib.auth import get_user_model # new
class Book(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
title = models.CharField(max_length=200)
author = models.CharField(max_length... | Python | 1 |
expected = "<div>
<label for=\"username\">Username</label>
<input id=\"username\" value=\"Ada Lovelace\">
</input>
<button>Print Username</button>
<div data-testid=\"printed-username\">Ada Lovelace</div>
</div>";
assert_eq!(container_html, expected);
}
}
use std::fmt::{Debug, Formatter};
use ... | Rust | 0 |
ptr(ffi::NM_SETTING_CONNECTION_ZONE)
.to_str()
.unwrap()
});
#[doc(alias = "NM_SETTING_DCB_APP_FCOE_FLAGS")]
pub static SETTING_DCB_APP_FCOE_FLAGS: once_cell::sync::Lazy<&'static str> =
once_cell::sync::Lazy::new(|| unsafe {
CStr::from_ptr(ffi::NM_SETTING_DCB_APP_FCOE_FLAGS)
... | Rust | 0 |
class Config:
"""Contains all configuration parameters."""
def __init__(self, config_dict):
# general config
self.seed: int = config_dict.get('seed', 1)
self.max_epochs: int = config_dict.get('max_epochs', 100)
self.save_path: str = config_dict.get('save_path', None)
... | Python | 1 |
import numpy as np
from keras.preprocessing.text import one_hot
import pdb
def encode(X,seq_len, vocab_size):
x = np.zeros((len(X),seq_len, vocab_size), dtype=np.float32)
for ind,batch in enumerate(X):
for j, elem in enumerate(batch):
x[ind, j, elem] = 1
return x
def batch_gen(batch_... | Python | 1 |
im.Adam(params, **kwargs)
def loss(pred, tgt):
return -si_snr(pred, tgt).mean()
def metrics(mixed, output, gt):
""" Function to compute metrics """
metrics = {}
def metric_i(metric, src, pred, tgt):
_vals = []
for s, t, p in zip(src, tgt, pred):
_vals.append((metric(p, t) ... | Python | 1 |
#초병 상호작용 데이터 멀티 프로세스에 넘기기 위해 저장
Sentry_Communication.value = RF_R.S_Check
#초병 권한 요청할 때
if (RF_R.S_Check & 0x0002) == 0x0002:
#초병 권한 요청 변수에 저장
request_access.value = 1
... | Python | 1 |
_bindgen_wasmtime::BorrowChecker::new(mem);
let host = get(data);
let ptr0 = arg0;
let len0 = arg1;
let ptr1 = arg2;
let len1 = arg3;
let param0 = _bc.slice_str(ptr0, len0)?;
let param1 = ResourceParam{repr:_bc.slice(ptr1, len1)?, };
let result2 = host.init_resource(param... | Rust | 0 |
<TripEndpoint>) -> BuiltRoute {
RouteDetails::new_route(
ctx,
app,
waypoints,
Color::RED,
None,
app.session.routing_preferences,
)
}
pub fn alt_route(
ctx: &mut EventCtx,
app: &App,
waypoints: Vec<Tr... | Rust | 0 |
M3.5.0/3,M10.5.0/4"),
("Europe/Rome", "CET-1CEST,M3.5.0,M10.5.0/3"),
("Europe/Samara", "SAMT-3SAMST,M3.5.0,M10.5.0/3"),
("Europe/San Marino", "CET-1CEST,M3.5.0,M10.5.0/3"),
("Europe/Sarajevo", "CET-1CEST,M3.5.0,M10.5.0/3"),
("Europe/Saratov", "<+04>-4"),
("Europe/Simferop... | Python | 1 |
connected to the SPI1 bus via the pins PA5, PA6, PA7 and PE3
pub type L3gd20 = l3gd20::L3gd20<Spi<SPI1, (PA5<Alternate<AF5>>, PA6<Alternate<AF5>>, PA7<Alternate<AF5>>)>, OldOutputPin<PE3<Output<PushPull>>>>;
/// On board LSM303DLHC connected to the I2C1 bus via the PB6 and PB9 pins
pub type Lsm303dlhc = lsm303dlhc::Ls... | Rust | 0 |
concat!(
"Offset of field: ",
stringify!(rte_epoll_event),
"::",
stringify!(epdata)
)
);
}
impl Default for rte_epoll_event {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rte_i... | Rust | 0 |
# SPDX-FileCopyrightText: 2025 Christian Winger <https://github.com/wingechr> © Öko-Institut e.V.
# SPDX-FileCopyrightText: 2025 Martin Glauer <https://github.com/MGlauer> © Otto-von-Guericke-Universität Magdeburg
# SPDX-FileCopyrightText: 2025 Martin Glauer <https://github.com/MGlauer> © Otto-von-Guericke-Universität ... | Python | 1 |
<'a>(&'a self, _: &mut dyn FnMut(&'a dyn DeviceConsumable) -> Result<(), Error>)
-> Result<(), Error>
{
Ok(())
}
}
unsafe impl Deps for DeviceSingleQueue {
fn iter_deps<'a>(&'a self, _: &mut dyn FnMut(&'a dyn DeviceConsumable) -> Result<(), Error>)
-> Result<(), Error>
{
Ok(())
}
}
unsafe impl... | Rust | 0 |
= generate_amt(avg_txn_amts[tag])
txn_amt = "%.02f" % amount
merchant = random.choice(top_merchants[tag])
stmt.add_transaction(date=date, amount=txn_amt, payee=merchant, type=type)
return amount
stmt = ofx.Generator(fid="9789789", org="FAKEOFX", acctid=acctid, accttype=accttype,
... | Python | 1 |
await bot.send_message(message.chat_id, "⚠️ No query provided.")
else:
await interface_to_llm(bot.send_message, chat_id=message.chat_id, text="⚠️ No query provided.")
return
# Include interface in the query for the LLM
interface = prompt.get("inpu... | Python | 1 |
let dkg_id = config.dkg_id();
// Check if we have a transcript in the previous summary for this config, and
// if we do, move it to the new summary.
if let Some((id, transcript)) = previous_transcripts
.iter()
.find(|(id, _)| eq_sans_height(id, &dkg_id... | Rust | 0 |
### type error
x = input_int()
while x != 0:
x = x - 1
y = x
print(y)
| Python | 1 |
= 7,
U64 = 8,
F32 = 9,
F64 = 10,
Isize = 11,
Usize = 12,
StringU8 = 13,
}
impl From<u8> for DataType {
fn from(v: u8) -> Self {
match v {
0 => DataType::Unknown,
1 => DataType::I8,
2 => DataType::U8,
3 => DataType::I16,
4 ... | Rust | 0 |
ket_batch = r.recv_timeout(timer)?;
if let Some(stats) = stats {
packet_batch.packets.iter().for_each(|p| stats.record(p));
}
let packets = packet_batch.packets.iter().filter_map(|pkt| {
let addr = pkt.meta.addr();
socket_addr_space
.check(&addr)
.then(|| (&pk... | Rust | 0 |
self.user_id,
BlockUsageLocator(
course_key=self.split_course_key,
block_type=parent_category,
block_id=parent_name
),
category,
block_id=name,
... | Python | 1 |
#!/usr/bin/env python3
import os
import ast
import stat
import subprocess
fouts = {x.decode('utf-8') for x in subprocess.check_output(['git', 'ls-files']).strip().split()}
pyf = []
for d in ["cereal", "common", "scripts", "selfdrive", "tools"]:
for root, _, files in os.walk(d):
for f in files:
if f.endswi... | Python | 1 |
f) -> &Vec<LayerInfo> {
&self.layers
}
}
//! Map arbitrary nonvolatile reads and writes to page operations.
//!
//! This splits non-page-aligned reads and writes into a series of page level
//! reads and writes. While it is handling a read or write it returns `BUSY` to
//! all additional requests.
//!
//! T... | Rust | 0 |
ide a purpose for this instance of TrackingLock")
self._purpose = purpose
@property
def acquired_by(self):
return self._acquired_by
@property
def purpose(self):
return self._purpose
def locked(self):
return self._lock.locked()
async def acquire(self):
... | Python | 1 |
import os
import logging
import base64
import argparse
import asyncio
import sys
# Import server.anchor from the path relative to where the scripts are being executed.
sys.path.insert(1, './server')
from anchor import AnchorHandle
logging.getLogger().setLevel(logging.ERROR)
async def generate_did(seed):
TRUST_ANC... | Python | 1 |
pub field: String,
runner: Box<dyn Fn(&mut T) + 'static>,
}
impl<T> Modifier<T>
where
T: Clone + for<'de> Deserialize<'de>,
{
/// Construct the new custom modifier
pub fn new<F>(field_name: &str, runner: F) -> Self
where
F: Fn(&mut T) + 'static,
{
Modifier::<T> {
... | Rust | 0 |
from datetime import datetime, timezone
from typing import Optional, NewType, List
UnixTime = NewType("UnixTime", int)
ISO8601Time = NewType("ISO8601Time", str)
def get_publish_times(
amount: int, #Количество видео
interval: int,
start_time: Optional[UnixTime]= 0, #Время публикации первого в... | Python | 1 |
import argparse
parser = argparse.ArgumentParser(prog='PROG')
parser.add_argument('--foo', required=True, help='foo help')
subparsers = parser.add_subparsers(help='sub-command help')
# create the parser for the "bar" command
parser_a = subparsers.add_parser('bar', help='a help')
parser_a.add_argument('bar', type=int, ... | Python | 1 |
use acme_lib::persist::{Persist, PersistKey, PersistKind};
use futures_util::TryStreamExt;
use sqlx::{Pool, Postgres};
use sqlx::{Row, Transaction};
use std::sync::Arc;
use tokio::runtime::Runtime;
use tracing::Instrument;
use crate::util::{error, to_i64};
#[derive(Clone)]
pub struct DatabasePersist {
pool: Pool... | Rust | 0 |
depth(0));
}
if let Some(EntityTile { entity: _, tile }) = tile_layers.feature {
render_tile(tile, view_context.add_depth(1));
}
if let Some(EntityTile { entity: _, tile }) = tile_layers.item {
render_tile(tile, view_context.add_depth(2));
}
if let Some(EntityTile { entity: _, ti... | Rust | 0 |
.bit_ls_files(opts.into()),
BitSubCmd::Merge(opts) => opts.exec(repo),
BitSubCmd::MergeBase(opts) => opts.exec(repo),
BitSubCmd::Reflog(opts) => opts.exec(repo),
BitSubCmd::Remote(opts) => opts.exec(repo),
BitSubCmd::Reset(opts) => opts.exec(repo),
BitSubCmd::RevList(opts... | Rust | 0 |
rn R.from_quat(transform[3:]).apply(points) + transform[:3]
@wp.kernel
def transform_points_kernel(
points: wp.array(dtype=wp.vec3),
xform: wp.transform,
out_points: wp.array(dtype=wp.vec3),
):
tid = wp.tid()
out_points[tid] = wp.transform_point(xform, points[tid])
def transform_points_wp(wp_tra... | Python | 1 |
),
(
"API_THROTTLE_REPEATED_REQUEST_RATE_ORG",
"API: Repeated request throttle rate for organization api-keys",
),
(
"API_THROTTLE_REPEATED_REQUEST_ENABLED_ORG",
... | Python | 1 |
string()
}
})
.collect::<Vec<_>>(),
);
let parse_trait = crate::util::get_parse_trait();
// The original block of the function
let b = █
// Modify the block to parse arguments
*block = parse2(quote::quote! {{
let (#(#names),*) = {
... | Rust | 0 |
et my_vec = vec![("band".to_string(), "arctic monkeys".to_string()),
("band".to_string(), "temper trap".to_string()),
("color".to_string(),"green".to_string())];
let answer = combine_duplicates(my_vec);
let mut control = HashMap::new();
control.insert("band".to_st... | Rust | 0 |
nfo[:2] >= (3, 7):
self._executor = ProcessPoolExecutor(
mp_context=multiprocessing.get_context("spawn"),
max_workers=processpool_max_workers,
)
else:
raise MetaflowException(
msg="Cannot use ProcessP... | Python | 1 |
import matplotlib.pyplot as plt
from nova.design.inverse import Inverse
from nova.frame.coilgeom import ITERcoilset
build_coilset = True
source = "PCR_PF3PF4"
source = "PCR"
pmag = Inverse()
if build_coilset:
ITER = ITERcoilset(
coils="pf vv trs dir",
dCoil=-1,
n=1e4,
dPlasma=0.1,... | Python | 1 |
n
let mut input = PlayerInput::new();
let winit::dpi::PhysicalSize { width: win_w, height: win_h } = window.inner_size();
let win_center_x = win_w / 2;
let win_center_y = win_h / 2;
window.set_cursor_position(winit::dpi::LogicalPosition::new(
win_center_x, win_center_y,
)).expect("set c... | Rust | 0 |
verse;
///
pub mod from_offsets;
/// An item stored within the [`Tree`]
pub struct Item<T> {
/// The offset into the pack file at which the pack entry's data is located.
pub offset: u64,
/// If true, this object may have children but is not a child itself. It's thus the root of a tree.
is_root: bool,
... | Rust | 0 |
utils::*;
asn_to_rust!(
r"DENM-PDU-Descriptions {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) en (302637) denm (1) version (2)
}
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
ValidityDuration ::= INTEGER {
timeOfDetection(0),
oneSecondAfterDetection(1)
} (0..86400)
ManagementContainer :... | Rust | 0 |
}
#[test]
fn test_tokenize69() {
let comp = vec!["10", ".", "09", ".", "03"];
tokenize_assert("10.09.03", comp);
}
#[test]
fn test_tokenize70() {
let comp = vec!["2003", "/", "09", "/", "25"];
tokenize_assert("2003/09/25", comp);
}
#[test]
fn test_tokenize71() {
let comp = vec!["09", "/", "25", ... | Rust | 0 |
ing_player_completed(owl, captured);
if captured {
game_info.player_captured();
}
}
fn tractor_beam_closed(tractor_beam: &TractorBeam) -> bool {
tractor_beam.state == TractorBeamState::Closed
}
fn start_capturing(tractor_beam: &mut TractorBeam, player_entity: Entity) {
tractor_beam.capturing_p... | Rust | 0 |
0x1b, 0xc2, 0x85, 0xe0, 0xb9, 0x08, 0x40, 0x55, 0xae, 0x13, 0x6f, 0x6b, 0x63,
0x62, 0x4c, 0x87, 0x4f, 0x5a, 0x1e, 0x1d, 0x8b, 0xe7, 0xb0, 0xb7, 0x22, 0x7a,
0x17, 0x1d, 0x2d, 0x7e, 0xd5, 0x78, 0xd8, 0x8b, 0xfd, 0xcf, 0x18, 0x32, 0x31,
0x98, 0x96... | Rust | 0 |
_get_type()) }
}
}
impl glib::value::ValueType for _80211Mode {
type Type = Self;
}
unsafe impl<'a> FromValue<'a> for _80211Mode {
type Checker = glib::value::GenericValueTypeChecker<Self>;
unsafe fn from_value(value: &'a glib::Value) -> Self {
from_glib(glib::gobject_ffi::g_value_get_enum(va... | Rust | 0 |
.unwrap();
let signal = FeatureMap::nhwc(signal.view().insert_axis(Axis(0)));
let cl_output = convolution
.compute(signal, &filter)
.unwrap()
.index_axis_move(Axis(0), 0);
let diff = (cpu_output - cl_output).mapv(f32::abs);
let max_diff = diff.fold(0.0, |acc, &val| if val... | Rust | 0 |
, 'upwards', 'ridden', 'Firsy', 'PONDERS', 'calf', 'four-run', 'FAIR', 'stillborn', 'vessels', 'milligrams', 'volcano-hit', 'eighth-ranked', 'baseline', 'HUF', '+@-@-@-@', 'rainstorm', 'Profit-taking', 'Defiant', 'abetting', 'all-share', 'short-covering', 'CRR', 'hyperbole', 'nitrofuran', 'composite', 'big-capitalised'... | Python | 1 |
def strStr(haystack: str, needle: str) -> int:
l = len(haystack)
l1 = len(needle)
for i in range(l):
if haystack[i:i+l1] == needle:
return i
return -1
haystack = 'sadbutsad'
needle = ''
print(strStr(haystack, needle)) | Python | 1 |
) -> fmt::Result {
f.write_str(match self {
Error::Decode => "PKCS#1 decoding error",
Error::Encode => "PKCS#1 encoding error",
Error::Version => "PKCS#1 version error",
})
}
}
#[cfg(feature = "std")]
impl std::error::Error for Error {}
impl From<der::Error> for... | Rust | 0 |
class JaxLayer:
pass
| Python | 1 |
= unsafe { &mut *(image_handle as *mut ImageData) };
// Calculate progress 0..1000.
// We use this in the artisan render loop to
// report back to Ae.
image.finished_pixels += ((x_max_plus_one - x_min) * (y_max_plus_one - y_min)) as usize;
//eprintln!("[r-display] {}", (100 * image.finished_pixels)... | Rust | 0 |
# Sanity checks
assert set(tb_ucdp_countries["conflict_type"]) - set(tb_prio_countries["conflict_type"]) == {
"one-sided violence"
}, "Missmatch in conflict_type between UCDP and PRIO (country) not as expected!"
assert set(tb_prio_countries["conflict_type"]) - set(tb_ucdp_countries["conflict_type"])... | Python | 1 |
urce::Remote(RemoteResource::from_pretrained(
MobileBertVocabResources::MOBILEBERT_UNCASED,
));
let config_path = config_resource.get_local_path()?;
let vocab_path = vocab_resource.get_local_path()?;
// Set-up model
let device = Device::cuda_if_available();
let vs = nn::VarStore::new... | Rust | 0 |
evt.write(1).unwrap();
assert_eq!(net.interrupt_evt.read().unwrap(), count + 1);
}
#[cfg(test)]
pub(crate) fn inject_tap_tx_frame(net: &Net, len: usize) -> Vec<u8> {
assert!(len >= vnet_hdr_len());
let tap_traffic_simulator = TapTrafficSimulator::new(if_index(&net.tap));
let mut frame = utils::rand::ra... | Rust | 0 |
"""Ruckus DataUpdateCoordinator."""
from datetime import timedelta
import logging
from aioruckus import AjaxSession
from aioruckus.exceptions import AuthenticationError, SchemaError
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ... | Python | 1 |
fn img_to_depth_map(
img: &HtmlImageElement,
w: u32,
h: u32,
margin: u32,
inverted: bool,
) -> DepthMap {
let document = web_sys::window().unwrap().document().unwrap();
let canvas = document
.create_element("canvas")
.unwrap()
.dyn_into::<web_sys::HtmlCanvasElement>... | Rust | 0 |
name = 'anthracene'
category = 'fused 6+6+6 member rings'
atoms = [
("C", (-0.64423, -3.34712, 7.74723)),
("H", (0.296112, -3.89188, 7.74706)),
("C", (-1.85374, -4.04384, 7.74702)),
("H", (-1.83312, -5.1314, 7.74692)),
("C", (-3.07938, -3.3572, 7.74572)),
("C", (-4.30469, -4.04455, 7.74328)),
("H", (-4.30462, -5... | Python | 1 |
let mut grid = [0; BOARD_SIZE * BOARD_SIZE];
for (i, num) in group
.trim()
.split_whitespace()
.map(|x| x.parse::<i32>().unwrap())
.enumerate()
{
grid[i] = num;
}
boards.push(Board {
grid,
chosen... | Rust | 0 |
t GST_BASE_SRC_FLAG_LAST: GstBaseSrcFlags = 1048576;
pub type GstCollectPadsStateFlags = c_uint;
pub const GST_COLLECT_PADS_STATE_EOS: GstCollectPadsStateFlags = 1;
pub const GST_COLLECT_PADS_STATE_FLUSHING: GstCollectPadsStateFlags = 2;
pub const GST_COLLECT_PADS_STATE_NEW_SEGMENT: GstCollectPadsStateFlags = 4;
pub c... | Rust | 0 |
ize/float(maxSize)))
if nSplit==1:
files.append(filePath)
return files
(base, ext) = os.path.splitext(filePath)
#check if we have already done this splitting
for i in range(nSplit):
fiPath=base+'_'+str(i)+ext
splitReq=False
if not os.path.exists(fiPath):
splitReq=True
break
fps = []
for i in range... | Python | 1 |
from checkIn import checkIn
class checkInUI:
def addCheckIn():
TCIGid = int(input("\nenter the transaction id of the guest.."))
TCIname = input("\nenter the name of the guest...")
TCIaddres = input("\nenter the address of guest... ")
TCIcontact = input("\nenter the ... | Python | 1 |
user_id -> Int8,
index -> Text,
query -> Text,
created_at -> Timestamptz,
}
}
table! {
sessions (id) {
id -> Text,
data -> Bytea,
created_at -> Timestamptz,
updated_at -> Timestamptz,
}
}
table! {
users (id) {
id -> Int8,
name ... | Rust | 0 |
s r r zUserList.append r% c < |