text string | label_name string | labels int64 |
|---|---|---|
all input graphs are instances of nx.Graph and are hopefully compatible. Backend '' does not implement `2'%s. This call will mutate an input, so automatic with these argumentsc 3 V # U H n[ U[ R 5 v M! g 7f)Nra r Graph)rC r s... | Python | 1 |
"""create tag_notification_sent table
Revision ID: f67fe4871771
Revises: 66147b81aad2
Create Date: 2024-05-13 14:50:11.171686
"""
# revision identifiers, used by Alembic.
revision = "f67fe4871771"
down_revision = "66147b81aad2"
import sqlalchemy as sa
def upgrade(op, tables, tester):
op.create_table(
... | Python | 1 |
lize, VppMessage)]
#[message_name_and_crc(one_enable_disable_xtr_mode_c264d7bf)]
pub struct OneEnableDisableXtrMode {
pub client_index : u32,
pub context : u32,
pub is_enable : bool,
}
#[derive(Debug, Clone, Serialize, Deserialize, VppMessage)]
#[message_name_and_crc(one_enable_disable_xtr_mode_reply_e8d4e80... | Rust | 0 |
new_column_value = os.path.splitext(file)[0] # 提取文件名的前缀
# merged_df.fillna(0, inplace=True)
# merged_df['date'] = pd.to_datetime(merged_df['date']).dt.strftime('%Y-%m-%d')
# merged_df.insert(0, 'location', new_column_value)
# merged_df.to_csv(output_csv, mode='a', index=False, header=with_header)
# ... | Python | 1 |
uttjiakqesuhdlkymvrjl"
+ "pvvhdiwdaxlwmsrqufzhnwilfphbhfsmeynyljkfxlud"
+ "bgkchhxojnwdrgiyytusxffdjbcyxtujppbtqivjealg"
+ "gvrkzfefodkfdddxjfwxalhtccozczukktoczzlyoexj"
+ "qycxswaiyxyvsflxxbitiwsinouhkxqlsgtuctflcayg"
+ "bcspwwpuefilrogmkcoyooslbmkpfzcenhpkqubkllif"
+ "p... | Python | 1 |
import heapq
def a_star():
# Define the initial state and the goal state of the problem
initial_state = (0, 0, 0, ())
goal_sum = 403
# Define the coins and their tax values
coins = [8, 8, 6, 36, 7, 36, 33, 3, 31, 17, 21, 28, 41, 17, 23, 16, 39, 2, 3, 40, 23, 20, 5, 30, 8, 28, 17, 34, 38, 26, 16, ... | Python | 1 |
#
# LinOTP - the open source solution for two factor authentication
# Copyright (C) 2010-2019 KeyIdentity GmbH
# Copyright (C) 2019- netgo software GmbH
#
# This file is part of LinOTP server.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU ... | Python | 1 |
metrics.append(value)
metrics = torch.stack(metrics, 0)
torch.distributed.reduce(metrics, dst=0)
if self.opt['rank'] == 0:
metrics_dict = {}
cnt = 0
for key, metric in zip(keys, metrics):
if key == 'cnt':
cnt = float(metric... | Python | 1 |
# backend/app.py
from flask import Flask, jsonify, request
import yfinance as yf
from datetime import datetime
from flask_cors import CORS # Import CORS
# Initialize the Flask app
app = Flask(__name__)
CORS(app) # Enable CORS for the entire app
# Route to get the current stock price and additional data
@app.route(... | Python | 1 |
) + 5
>>> horner(a*x**4 + b*x**3 + c*x**2 + d*x + e)
e + x*(d + x*(c + x*(a*x + b)))
>>> f = 4*x**2*y**2 + 2*x**2*y + 2*x*y**2 + x*y
>>> horner(f, wrt=x)
x*(x*y*(4*y + 2) + y*(2*y + 1))
>>> horner(f, wrt=y)
y*(x*y*(4*x + 2) + x*(2*x + 1))
References
==========
[1] - http://e... | Python | 1 |
cert(&mut self, cert: &str) -> CassError {unsafe{
CassError{err:cass_ssl_set_cert(
self,
CassValue::str_to_cass_string(cert))
}
}}
pub fn set_private_key(&mut self, key: &str, password: &str) -> CassError {unsafe{
CassError{err:cass_ssl_set_private_key(
self,CassValue::str_to_cass_str... | Rust | 0 |
filas_por_iteracion = len(resultado[2])-indice_inicial
print("ultima")
grupo_filas = resultado[2].iloc[indice_inicial:indice_inicial + filas_por_iteracion]
update_data(grupo_filas)
indice_inicial = indice_inicial + filas_por_iteracion
st.write(... | Python | 1 |
t as usize; // trapret
}
stack_pointer -= mem::size_of::<Context>();
let context_pointer: *mut Context = stack_pointer as *mut Context;
process_entry.replace(Process {
process_state: ProcessState::EMBRYO,
kernel_stack: kernel_stack,
id: unsafe { PROCESS_ID },
pa... | Rust | 0 |
ap::ArgMatches;
use std::thread;
use std::path::PathBuf;
use path_abs::PathAbs;
use std::sync::mpsc::*;
use std::time::*;
use indicatif::*;
use std::sync::*;
use std::ops::{Deref, DerefMut};
use copy::*;
use avgspeed::*;
pub type Result<T> = std::result::Result<T, Error>;
/// utility to track changes of variable
#[d... | Rust | 0 |
PE9_W { w: self }
}
#[doc = "Bits 20:21 - Wakeup pin enable for LLWU_Pn"]
#[inline(always)]
pub fn wupe10(&mut self) -> WUPE10_W {
WUPE10_W { w: self }
}
#[doc = "Bits 22:23 - Wakeup pin enable for LLWU_Pn"]
#[inline(always)]
pub fn wupe11(&mut self) -> WUPE11_W {
WUPE11_W { w: self }
}
#[do... | Rust | 0 |
assert_eq!(last_len, len);
}
}
RawBuf::new(ptr, len)
}
fn reset(&mut self) {
self.0 = None;
}
}
pub struct TcpStreamCompat {
stream: TcpStream,
read_dst: Dst,
write_dst: Dst,
read_fut: MaybeArmedBoxFuture<BufResult<usize, RawBuf>>,
write_fut... | Rust | 0 |
sert_near!(face0.vertices[0][1] as f64, face1.vertices[0][1] as f64);
assert_near!(face0.vertices[0][2] as f64, face1.vertices[0][2] as f64);
assert_near!(face0.vertices[1][0] as f64, face1.vertices[1][0] as f64);
assert_near!(face0.vertices[1][1] as f64, face1.vertices[1][1] as f64);
as... | Rust | 0 |
praj.first,
praj.last,
name_size(&praj)
);
}
pub fn name_size(person: &Person) -> i32 {
//let Person {first, last} = person;
//first.len() + last.len()
(person.first.len() + person.last.len()) as i32
}
#[cfg(test)]
mod test {
use super::add_one;
use super::add_three;
... | Rust | 0 |
, lsl #24",
// playbuf b's copy with the ninth-bits added
"add r1, r0, r9",
// as above for the second set of four samples:
// initializing the ninth-bit register with the 2nd sample first for shifty reasons
"ands r9, r5, #0x0080", // grab... | Rust | 0 |
ion")
.license("Apache-2.0")
.arg(
Arg::new("oci-registry")
.about("OCI registry namespace")
.index(1),
)
.arg(
Arg::new("noexec")
.short('n')
.long("noexec")
.takes_value(false)
... | Rust | 0 |
test_established_bad_ack() {
let mut s = socket_established();
// Already acknowledged data.
send!(
s,
TcpRepr {
seq_number: REMOTE_SEQ + 1,
ack_number: Some(TcpSeqNumber(LOCAL_SEQ.0 - 1)),
..SEND_TEMPL
},
... | Rust | 0 |
"""Provide summary details on damage filtering for MultiQC.
"""
import os
from bcbio import utils
from bcbio.distributed.transaction import file_transaction
from bcbio.pipeline import datadict as dd
from bcbio.pipeline import config_utils
from bcbio.provenance import do
from bcbio.variation import vcfutils
from bcbio.... | Python | 1 |
rubble::link::filter::WhitelistFilter<core::iter::Once<rubble::link::DeviceAddress>>,
> = ();
static mut SERIAL: Uarte<UARTE0> = ();
static mut LOG_SINK: Consumer = ();
#[init(resources = [BLE_TX_BUF, BLE_RX_BUF])]
fn init() {
{
// On reset the internal high frequency clock i... | Rust | 0 |
self.callback = kwargs.pop("callback", None)
def switch_controlnet_method(self, new_method: str):
self.controlnet_method = new_method
controlnet = ControlNetModel.from_pretrained(
new_method,
resume_download=True,
local_files_only=self.local_files_only,
... | Python | 1 |
None :
collapsible = GafferUI.Collapsible( name, _CollapsibleLayout( self.orientation() ), collapsed = True )
# Hack to add margins at the top and bottom but not at the sides.
## \todo This is exposed in the public API via the borderWidth
# parameter to the Collapsible. That parameter sucks because a)... | Python | 1 |
ubdoc": {
"a": "subkey",
"another": { "subdoc": dt }
},
"array": [1_i64, true, { "doc": 23_i64 }, ["another", "array"]],
};
append_test(expected, |doc| {
doc.append("a", true);
doc.append("second key", 123.4);
doc.append("third", 15_i64);
... | Rust | 0 |
harf = input("Bir harf giriniz: ")
if len(harf) != 1:
raise ValueError("Lütfen sadece bir harf giriniz!")
if not harf.isalpha():
raise ValueError("Sadece alfabetik karakter giriniz!")
"""
Ne Zaman raise Kullanılır?
Kendi Hata Durumlarını Tanımlamak İçin:
Programın belirli bir durumla karşılaşmasını istemiyors... | Python | 1 |
"""
Copyright: MAXON Computer GmbH
Author: Maxime Adam.
Description:
- Loops over all materials, shaders of the active document and display their previews in the Picture Viewer.
Class/method highlighted:
- BaseDocument.GetFirstMaterial()
- GeListNode.GetNext()
- GeListNode.GetDown()
- Material.Get... | Python | 1 |
)
);
assert_eq!(
::core::mem::align_of::<ble_gattc_evt_write_cmd_tx_complete_t>(),
1usize,
concat!(
"Alignment of ",
stringify!(ble_gattc_evt_write_cmd_tx_complete_t)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<bl... | Rust | 0 |
s: typing.Union[dict, frozendict.frozendict, ],
Node: typing.Union[MetaOapg.properties.Node, str, schemas.Unset] = schemas.unset,
Arch: typing.Union[MetaOapg.properties.Arch, str, schemas.Unset] = schemas.unset,
Platform: typing.Union[MetaOapg.properties.Platform, str, schemas.Unset] = schemas.u... | Python | 1 |
ts = results.into_iter().take(*n).collect();
}
DiceFilter::KeepHighest(n) => {
let len = results.len();
results = results.into_iter().skip(len - n).collect();
}
}
... | Rust | 0 |
)) = self.index.get(&source) {
for (i, candidate) in self.targets[start_index .. end_index]
.iter()
.enumerate() {
if self.inlines.contains(start_index + i) {
f(*candidate);
}
... | Rust | 0 |
raków (city center)",
("warsaw", "center") => "Warsaw (city center)",
_ => &name.map,
},
"sg" => match (name.city.city.as_ref(), name.map.as_ref()) {
("jurong", "center") => "Jurong",
_ => &name.map,
},
"tw" => match (name.city.city.as_ref(... | Rust | 0 |
import cv2
import numpy as np
import xml.etree.ElementTree as ET
import os
# import PIL.Image as P
CLASSES = ['background',
'aeroplane', 'bicycle', 'bird', 'boat',
'bottle', 'bus', 'car', 'cat', 'chair',
'cow', 'diningtable', 'dog', 'horse',
'motorbike', 'person', 'pottedpl... | Python | 1 |
ader {
pub Type: String,
pub Flags: Vec<String>,
pub VAddr: usize,
pub Align: usize,
pub Sections: Vec<ElfSectionRef>,
}
#[derive(Serialize, Deserialize)]
pub struct ElfFile {
pub FileHeader: ElfFileHeader,
pub Symbols: Vec<ElfSymbol>,
pub Sections: Vec<ElfSection>,
pub ProgramHeade... | Rust | 0 |
ld want to make sure that no such decoding takes place in this case.
signature_imposter = '48304502207fa7a6d1e0ee81132a269ad84e68d695483745cde8b541e3bf630749894e342a022100c1f7ab20e13e22fb95281a870f3dcf38d782e53023ee313d741ad0cfbc0c509001'
# OP_RETURN <data>
rpc_result = self.nodes[0].decodescrip... | Python | 1 |
;
const MASK: u64 = (1u64 << WINDOW_SIZE) - 1;
const NUM_BUCKETS: usize = 1 << WINDOW_SIZE;
assert!((WINDOW_SIZE as usize) * NUM_WINDOWS >= 254);
fn get_bits<Repr: PrimeFieldRepr>(el: Repr, start: usize) -> u64 {
const WINDOW_SIZE: u32 = 12;
const MASK: u64 = (1u64 << WINDOW_SIZE) - 1;... | Rust | 0 |
import os
import unittest
from pyats.topology import loader
from genie.libs.sdk.apis.iosxe.interface.configure import enable_ipv6_dhcp_server
class TestEnableIpv6DhcpServer(unittest.TestCase):
@classmethod
def setUpClass(self):
testbed = f"""
devices:
PE-B:
connections:
... | Python | 1 |