text string | label_name string | labels int64 |
|---|---|---|
ueSlot, id: ExprId) -> Result<Value, Error> {
let value = self.check_expr_inner(slot, id)?;
return Ok(value);
}
fn check_expr_inner(&mut self, slot: ValueSlot, id: ExprId) -> Result<Value, Error> {
use ExprKind::*;
let expr = &*id;
match *expr {
Procedure(... | Rust | 0 |
print(f"[DEBUG][Rank 0][Day {day}] Received home arrival status {status_from_rank} from rank {source_rank}")
all_statuses.append(status_from_rank)
# 모든 프로세스가 완료되었는지 확인
all_arrived = all(all_statuses)
... | Python | 1 |
t_user_logout_href
)
trans.handle_user_logout()
if success:
return {"redirect_uri": redirect_uri}
else:
return {"message": message}
@web.expose
def get_logout_url(self, trans, provider=None, **kwargs):
idp_provider = provider if provider else tran... | Python | 1 |
basic_sport_event_item['participant_away'] = participant_2
basic_sport_event_item['bet_1'] = bet_1
basic_sport_event_item['bet_0'] = bet_0
basic_sport_event_item['bet_2'] = bet_2
basic_sport_event_item['bet_10'] = bet_10
... | Python | 1 |
tensionOID.PRECERT_SIGNED_CERTIFICATE_TIMESTAMPS
)
assert isinstance(ext.value, x509.UnrecognizedExtension)
@pytest.mark.requires_backend_interface(interface=RSABackend)
@pytest.mark.requires_backend_interface(interface=X509Backend)
class TestInvalidExtension(object):
def test_invalid_certificate_... | Python | 1 |
}
}),
Operator::MultiAggregate(MultiAggregateOperator {
key_col_headers: vec!["foo".to_string(), "foo == 123".to_string()],
key_cols: vec![
Expr::column("foo"),
Expr::Binar... | Rust | 0 |
for i in range(0, 3):
if content[0] & (1 << (4 + i)):
size |= content[data_ptr] << (i * 8)
data_ptr += 1
# do something with offset and size
... | Python | 1 |
"""
API URL configuration for cases app.
"""
from django.urls import path
from . import api_views
app_name = 'cases_api'
urlpatterns = [
# Case CRUD endpoints
path('', api_views.CaseListCreateAPIView.as_view(), name='case_list_create'),
path('<int:pk>/', api_views.CaseRetrieveUpdateDestroyAPIView.as_view... | Python | 1 |
return Err(Error::FdtGuestMemoryWriteError);
}
Ok(fdt_data_size)
}
//! `start` subcommand - example of how to write a subcommand
use crate::{application::app_config, block::write_genesis};
/// App-local prelude includes `app_reader()`/`app_writer()`/`app_config()`
/// accessors along with logging macros. Cu... | Rust | 0 |
key):
if key in ['typing_intervals', 'active_hours', 'session_gaps',
'reply_response_times', 'anomaly_flags']:
# 列表类型追加数据
getattr(behavior, key).append(value) if isinstance(value, (int, float, str)) else getattr(behavior, key).extend(val... | Python | 1 |
'/'
else:
raise Exception("invalid options: [" + opts + ": " + arg + "]")
if not os.path.exists(self.proto_file):
raise Exception("Generate error, not exist protobuf file: " + self.proto_file)
if ".proto" not in self.proto_file:
raise Exception("Gen... | Python | 1 |
class Node:
def __init__(self, value, next=None):
self.value = value
self.next = next
def get_tail(head):
current = head
while current:
current = current.next
if current.next == None:
tail = current
return tail
# linked list: num1->num2->num3
num3 = Node(3)
num2 = ... | Python | 1 |
64 {}, %work_t* \
%cur.work, i32 0)",
bld_tmp,
bld_ty_str,
bld_prefix,
builder_size
));
self.gen_store_var(&bld_tmp, &llvm_symbol(output), &bld_ty_str, ctx);
}
... | Rust | 0 |
: '
else:
prefix = ''
s += '=' * 10 + f'[{prefix}hyper parameters]' + '=' * 10 + '\n'
s += json.dumps(self.hyperparas, indent=4) + '\n'
if hasattr(self, 'optimizer_config'):
s += '=' * 10 + f'[{prefix}optimizer config]' + '=' * 10 + '\n'
s += json.du... | Python | 1 |
from typing import Optional
from fastapi import APIRouter, Depends, HTTPException, Header
from app.controllers.itinerary_controller import ItineraryController
from app.schemas.itinerary_schema import ItineraryRequest
from app.core.database import get_async_db
from sqlalchemy.ext.asyncio import AsyncSession
router = ... | Python | 1 |
utex::new(
event_loop.create_proxy(),
)));
let mut painter = crate::Painter::new(&display);
let mut integration = egui_tao::epi::EpiIntegration::new(
"egui_glium",
painter.max_texture_side(),
display.gl_window().window(),
repaint_signal,
persistence,
... | Rust | 0 |
: [(2, int(*viettelpost_service))]
})
def viettelpost_get_default_custom_package_code(self):
raise (_('This feature is not available for Viettelpost carrier'))
def synchronize_viettelpost_resources(self):
try:
self.env['viettelpost.province'].sync_provinces()
se... | Python | 1 |
import matplotlib.pyplot as plt
import numpy as np
# Set the style
plt.style.use('seaborn')
plt.rcParams['font.family'] = 'sans-serif'
plt.rcParams['font.sans-serif'] = ['Arial']
# Create figure and axis with a larger size
fig, ax = plt.subplots(figsize=(12, 8))
# Sample data structure (you'll need to replace this w... | Python | 1 |
donlyObject::new() };
/// Kernel PD struct.
pub static KERNEL_PD: ExternReadonlyObject<PD> =
unsafe { ExternReadonlyObject::new() };
/// Guard page virtual address after switching to the new page table.
fn kernel_stack_guard_page_vaddr() -> VAddr {
unsafe { VAddr::from((&kernel_stack_guard_page as *const _) as... | Rust | 0 |
# 요격 시스템
def solution(targets):
answer = 0
bound = 0
for s, e in sorted(targets):
if bound > s:
bound = min(bound, e)
else:
bound = e
answer += 1
return answer | Python | 1 |
ang)
//
// Core/async-v3/buffer.rs
//! Asynchronous buffer handles
/*
/// Buffer providing a location for read data (incoming / mutable)
pub struct ReadBuffer<'a> {
}
/// Buffer providing a location for data to be written (outgoing / immutable)
pub struct WriteBuffer<'a> {
}
pub struct ReadBufferHandle<'a> {
// Need... | Rust | 0 |
mal(shape=[1, 2]))]
source_variables = [tf.Variable(tf.random_normal(shape=[1, 2]))]
self.assertRaises(ValueError, target_update_ops.update_target_variables,
target_variables, source_variables, -0.1)
self.assertRaises(ValueError, target_update_ops.update_target_variables,
... | Python | 1 |
import tensorflow as tf
import tensorflow.contrib.layers as layers
from datetime import datetime
# MNIST input data
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
def multilayer_perceptron(x):
fc1 = layers.fully_connected(x, 256, activation... | Python | 1 |