text string | label_name string | labels int64 |
|---|---|---|
{
let chars = "-a123".chars().peekable();
let mut pos = Loc::default();
let (tok, _) = lex_head(chars, &mut pos);
assert_eq!(tok.tok_type, TokenType::Op);
}
#[test]
fn lex_num_and_newline_linux() {
let chars = "\n12".chars().peekable();
let mut pos = Loc::de... | Rust | 0 |
field=models.CharField(max_length=256, verbose_name='Описание типа путешествия'),
),
migrations.AlterField(
model_name='typejourney',
name='j_type_name',
field=models.CharField(max_length=32, verbose_name='Тип путешествия'),
),
migrations.AddFiel... | Python | 1 |
が、再生時に若干CPUの処理を必要とします。
//!
//! 基本的に、**再生時間が長いBGMは圧縮したまま、音が短くたくさん鳴らすSEは事前に解凍**して読み込みます。
//!
//! ### ループ再生
//! - [`Sound::set_is_looping_mode`](../../core/struct.Sound.html#method.set_is_looping_mode)
//!
//! を利用します。
//!
//! ### ループ範囲を指定する
//! - [`Sound::set_loop_starting_point`](../../core/struct.Sound.html#method.set_l... | Rust | 0 |
"""
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2010 Nathanael C. Fritz
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
from sleekxmpp.xmlstream import ElementBase, ET
class Version(ElementBase):
"""
XMPP allows for an agent to advertise the name and ver... | Python | 1 |
(_x: *mut f32, _n: ::std::os::raw::c_uint, _y: *mut f32);
}
extern "C" {
pub fn liquid_vectorcf_init(
_c: liquid_float_complex,
_x: *mut liquid_float_complex,
_n: ::std::os::raw::c_uint,
);
}
extern "C" {
pub fn liquid_vectorcf_add(
_x: *mut liquid_float_complex,
_y: ... | Rust | 0 |
# ill out the get_name() function to return your name as a string! We've written a main() function for you which calls your function to retrieve your name and then prints it in a greeting with icons.
def get_name():
return "Syeda Farheen Zehra"
def main():
name = get_name()
print("Hello", name, "👋👋👋")
if __n... | Python | 1 |
r: {}", e),
WrongUniqueIdLength => write!(f, "Wrong unique-ID length"),
NonDecryptableCookie(_) => write!(f, "Non-decryptable cookie"),
WrongNonceLength => write!(f, "Wrong nonce length"),
NonDecryptableCiphertext(_) => write!(f, "Non-decryptable ciphertext"),
... | Rust | 0 |
_BYTES: types::GLenum = 0x0CF0;
#[allow(dead_code, non_upper_case_globals)] pub const UNSIGNALED: types::GLenum = 0x9118;
#[allow(dead_code, non_upper_case_globals)] pub const UNSIGNED_BYTE: types::GLenum = 0x1401;
#[allow(dead_code, non_upper_case_globals)] pub const UNSIGNED_BYTE_2_3_3_REV: types::GLenum = 0x8362;
#[... | Rust | 0 |
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# 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 applica... | Python | 1 |
merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K4), broadcast: None }, &[98, 241, 254, 204, 111, 226], OperandSize::Dword)
}
#[test]
fn vmovdqu64_22() {
run_test(&Instruction { mnemonic: Mnemonic::VMOVDQU64, operand1: Some(IndirectScaledDisplaced(EAX, Two, 1355826966, Some(OperandSize::Zmmword... | Rust | 0 |
Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: <code>arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint/EXAMPLE</code>.</p>
/// </li>
/// <li>
/// <p>Lambda provisioned concurrency - The resource ty... | Rust | 0 |
import numpy as np
import matplotlib.pyplot as plt
import scipy.signal as signal
# Constants
N = 100
d = 1e-9 #Spacing between tape and head
g = 2e-6 #Head gap width
delta = 35e-6 #Tape thickness
v = 7.5 * 0.0254
#f = np.linspace (0, 24000, N/2)
f = np.linspace (0, 48000, N)
n = np.linspace (0, N, N)
#n = np.linspace... | Python | 1 |
return
self.counters_all = state
self.window.core.config.set("ctx.counters.all", state)
self.window.core.config.save()
self.window.controller.calendar.update_ctx_counters()
def append_text(self, text: str):
"""
Append text to note
:param text: text to ... | Python | 1 |
import time
import random
from selenium import webdriver
from selenium.webdriver import Keys
from selenium.webdriver.common.by import By
flag = True
while flag:
request = input("Введите запрос для Википедии: ")
browser = webdriver.Chrome()
browser.get("https://ru.wikipedia.org/wiki/%D0%97%D0%B0%D0%B3%D... | Python | 1 |
:
def __init__(self, type_, step, input_, output, net, net_id, frames):
assert type_ in [
"forward",
"backward",
], f"type can only be one of ['forward', 'backward'], but{type_}"
self.type = type_ # fwd or bwd
self.step = step # report order
self.inp... | Python | 1 |
_record_range_8_t,
pub errors: xcb_record_range_8_t,
pub client_started: u8,
pub client_died: u8,
}
impl Default for xcb_record_range_t {
fn default() -> Self {
unsafe { std::mem::MaybeUninit::zeroed().assume_init() }
}
}
/// An iterator over `Record::Range` objects.
#[derive(Copy, Clone, ... | Rust | 0 |
lender_scenes_label_list:
middle = gridspec.GridSpecFromSubplotSpec(1, 2,
subplot_spec=outer[type_of_blender_scenes_label_list.index(type_of_blender_scene)], wspace=0.2, hspace=0.2, width_ratios=[5/8, 3/8])
for i in range(2):
inner = gridspec.GridSpecFromSubplotSpec(len(material_... | Python | 1 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
データベース統合リファクタリングスクリプト v4.0
- スキーマ統一(places vs place_masters)
- メソッド整合性確保
- SQLAlchemyモデルと実際のDBの統一
"""
import sqlite3
import sys
import os
from datetime import datetime
from typing import Dict, List, Any
class DatabaseRefactoring:
"""データベースリファクタリング管理"""
d... | Python | 1 |
import FWCore.ParameterSet.Config as cms
process = cms.Process("Ana")
process.load("FWCore.MessageService.MessageLogger_cfi")
############# Set the number of events #############
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(1000)
)
############# Define the source file ###############
pro... | Python | 1 |
r()
.add_source(
"Foo",
r#"
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.10;
contract Demo {
event log_string(string);
function run() external {
emit log_string("script ran");
}
}
"#,
)
.unwrap();
cmd.arg("script").arg(script);
... | Rust | 0 |
nd the slider.
prefix
When currentvalue.visible is true, this sets the prefix
of the label.
suffix
When currentvalue.visible is true, this sets the suffix
of the label.
visible
Shows the currently-selected value above the slider.
... | Python | 1 |
import re
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from itertools import chain
import scipy.spatial.distance as ssd
from collections import defaultdict
import scipy.cluster.hierarchy as hc
AA_INDEX_FEATURES = ['ANDN920101', 'ARGP820101', 'ARGP820102', 'BEGF750103', 'BIGC670101', 'BIOV8... | Python | 1 |
sparse = df.to_sparse()
assert repr(sparse) == repr(df)
with option_context("display.max_rows", 3):
assert repr(sparse) == repr(df)
def test_sparse_repr_after_set(self):
# GH 15488
sdf = pd.SparseDataFrame([[np.nan, 1], [2, np.nan]])
res = sdf.copy()
... | Python | 1 |
"""
Link : https://www.geeksforgeeks.org/batch/gfg-160-problems/track/two-pointer-technique-gfg-160/problem/count-distinct-elements-in-every-window
Given an integer array arr[] and a number k. Find the count of distinct elements in every window of size k in the array.
Examples:
Input: arr[] = [1, 2, 1, 3, 4, 2, 3], ... | Python | 1 |
_array(&self, _: &JSONSchema, _: &Value, _: &[Value]) -> bool {
false
}
#[inline]
fn is_valid_boolean(&self, _: &JSONSchema, _: &Value, _: bool) -> bool {
false
}
#[inline]
fn is_valid_null(&self, _: &JSONSchema, _: &Value, _: ()) -> bool {
true
}
#[inline]
fn... | Rust | 0 |
r(BlazeSplitAdjustedEstimatesLoader, self).__init__(
expr,
columns,
**kwargs
)
def load_adjusted_array(self, domain, columns, dates, sids, mask):
# Only load requested columns.
requested_column_names = [self._columns[column.name]
... | Python | 1 |
import unittest, os
from time import sleep
from stravaupload import ProgressDialog, StravaUpload
class StravaUploadTest(unittest.TestCase):
""" nose-compatible test to drive the class that wraps up
zenity. Ensures the zenity process is closed correctly.
Not part of the larger test cases ... | Python | 1 |
cDim]
}
/// Draws a high-resolution gradient using upper blocks and synced backgrounds.
///
/// Returns the number of cells filled on success,
/// or [`NcIntResult::ERR`][NcIntResult#associatedconstant.ERR] on error.
///
/// This doubles the number of vertical gradations, but restricts you ... | Rust | 0 |
]
addr: [sockaddr_in {
sin_len: 0,
sin_family: AF_INET as u8,
sin_port: hton(port),
sin_addr: in_addr {
s_addr: hton(INADDR_LOOPBACK),
},
sin_zero: [0; 8],
}],
}
}
... | Rust | 0 |
1, "stage_session": "Automne", "stage_year": 2025, "group_name": "0020"},
{"program": "Intelligence artificielle en informatique", "stage_number": 1, "stage_session": "Automne", "stage_year": 2025, "group_name": "0120"},
{"program": "Intelligence artificielle en informatique", "stage_number": 1... | Python | 1 |
byte_slice()))
.build();
assert_eq!(expected_string_data, arr.column(0).data());
// TODO: implement equality for ArrayData
assert_eq!(expected_int_data.len(), arr.column(1).data().len());
assert_eq!(
expected_int_data.null_count(),
arr.column(1).data... | Rust | 0 |
continue
if color not in COLOR_MAP:
print(f"Неизвестный цвет: {color}")
time.sleep(0.5)
continue
hwnd = find_cs2_window()
if hwnd:
print("Окно CS2 найдено, отправляю ESC...")
send_esc_to_window(hwnd)
time.sleep(0.2)
... | Python | 1 |
completion handler to allow user to
# check if a group of circuits has been completed and report on results.
# Return when there are no more active circuits.
# This is used as a way to complete all groups of circuits and report results.
def finalize_execution(completion_handler=metrics.finalize_group, report_end=True... | Python | 1 |
assert_eq!(block_store.len(), 4);
println!("{:?}", block_store);
// The body of $add_one.
let expected_block = CodeBlock::from(vec![
OperatorSymbol::LocalGet,
OperatorSymbol::I32Const,
OperatorSymbol::I32Add,
]);
let block = block_stor... | Rust | 0 |
# Databricks notebook source
# MAGIC %run /awoygeekcoder/utility
# COMMAND ----------
df=spark.readStream.format("cloudFiles")\
.option("cloudFiles.format","csv")\
.option("cloudFiles.schemalocation","/dbfs/mnt/FileStore/tables/schema/plane")\
.load('/mnt/raw_datalake/PLANE/')
# COMMAND ----------
# db... | Python | 1 |
input == "".to_string() {
let res = TestOpaResponse {
status: "parse input failed".as_bytes().to_vec()
};
return Ok(Response::new(res))
}
let msg = opa::opa_engine::make_decision_ext(
&policyname,
&policycontent,
... | Rust | 0 |
rate) type Exact<T> = exact::Exact<T>;
#[derive(Debug)]
pub(crate) enum RangeBound<T> {
None,
Open(T),
Closed(T),
}
impl<T: fmt::Display + fmt::Debug + 'static> RangeBound<T> {
fn into_dyn(self) -> RangeBound<Box<dyn crate::format::DisplayDebug>> {
match self {
Self::None => RangeB... | Rust | 0 |
) = stmt {
labels.insert(label.clone(), ip);
}
debug!("loc: {} {:?}", ip, stmt);
ip += stmt.num_ops();
}
labels
}
pub fn extract_constants(stmts: &Vec<Stmt>, c: &mut Vec<i64>) {
for stmt in stmts {
match stmt {
Stmt::PushInline(v) if *v > 0xFFFFFF => ... | Rust | 0 |
"hex": "BFBAAF",
"rgb": [191, 186, 175],
"hsl": [29, 28, 183],
"shade": "Yellow"
},
{
"name": "<NAME>",
"hex": "1B4B35",
"rgb": [27, 75, 53],
"hsl": [108, 120, 51],
"shade": "Green"
},
{
"name": "Cowboy",
"hex": "443736",
"rgb": [68, 55, 54],
"hsl": [3, 29, 6... | Rust | 0 |
param _RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
:type RequestId: str
"""
self._RDBAsset = None
self._TopAsset = None
self._RDBDetail = None
self._RequestId = None
@property
def RDBAsset(self):
return self._RDBAsset
@RDBAsset.setter
d... | Python | 1 |
ors
///
/// Returns an `EncodingError` if any of the keys are not strings.
pub fn encode_map<V: Serialize>(input: &BTreeMap<String, V>) -> Result<String, EncodingError> {
encode_key_value(input, &[], "=", " ", true)
}
/// Serialize the input value into a logfmt string. If the value is not an object,
/// it is trea... | Rust | 0 |