text string | label_name string | labels int64 |
|---|---|---|
de(with = "serde_str::emp")]
//! ip: Option<IpAddr>,
//! }
//!
//! use serde_json::{
//! from_str,
//! to_string,
//! };
//! # fn main() -> serde_json::Result<()> {
//! let with_ip: WithIp = from_str(r#"{"ip": "127.0.0.1"}"#)?;
//! assert_eq!(with_ip, WithIp { ip: Some([127, 0, 0, 1].into()) });
//! assert_eq!(to_st... | Rust | 0 |
quence-level tasks
/// - `position_ids` preset position ids tensor used in case they are not provided by the user
pub struct MobileBertModel {
embeddings: MobileBertEmbeddings,
encoder: MobileBertEncoder,
pooler: Option<MobileBertPooler>,
position_ids: Tensor,
}
impl MobileBertModel {
/// Build a n... | Rust | 0 |
plemented_function::native_implemented_function;
use lumen_rt_full::binary::to_term::Options;
use lumen_rt_full::distribution::external_term_format::{term, version};
macro_rules! maybe_aligned_maybe_binary_try_into_term {
($process:expr, $options:expr, $binary:expr, $ident:expr) => {
if $ident.is_binary()... | Rust | 0 |
_euclid
//! i128::wrapping_div_euclid
//! i128::overflowing_div_euclid
//! isize::rem_euclid
//! isize::checked_rem_euclid
//! isize::wrapping_rem_euclid
//! isize::overflowing_rem_euclid
//! isize::div_euclid
//! isize::checked_div_euclid
//! isize::wrapping_div_euclid
//! isize::overflowing_div_euclid
//! u8::rem_euc... | Rust | 0 |
from __future__ import absolute_import, division, print_function
from libtbx.utils import Sorry
import sys, os.path, traceback
def run(args=""):
try:
"""
utility function for passing keyword arguments more directly to hklview_frame.HKLViewFrame()
"""
from crys3d.hklviewer import hklview_frame
fr... | Python | 1 |
return "⏹️ 已停止"
def __repr__(self) -> str:
return (
f"GridCoordinator("
f"status={self.get_status_text()}, "
f"position={self.tracker.get_current_position()}, "
f"errors={self._error_count})"
)
# ==================== 价格移动网格专用... | Python | 1 |
always)]
pub fn tx(self) -> &'a mut W {
self.variant(MODE_A::TX)
}
#[doc = "Frequency synthesis RX"]
#[inline(always)]
pub fn fsrx(self) -> &'a mut W {
self.variant(MODE_A::FSRX)
}
#[doc = "Receive continuous"]
#[inline(always)]
pub fn rxcontinous(self) -> &'a mut W {... | Rust | 0 |
/// use linfa_trees::DecisionTree;
///
/// // Load dataset
/// let dataset = linfa_datasets::iris();
/// // Fit the tree
/// let tree = DecisionTree::params().fit(&dataset).unwrap();
/// // Export to tikz
/// let tikz = tree.export_to_tikz().with_legend();
/// let latex_tree = tikz.to_string();
/// // Now you can write... | Rust | 0 |
"192.168.1.3".to_owned(), "common".to_owned());
let entries = http_service.redirect_entries();
entries.add("core".to_owned(), "192.168.1.3".to_owned(), "general".to_owned());
// Shutdown task
let http_shutdown = http_service.control();
let mut shutdown = tokio::spawn(async move {
let _ = s... | Rust | 0 |
ized() {
gtk::init().unwrap();
}
let ctx = Context::new();
let s = String::from("blah");
let m: std::collections::HashMap<&str, &dyn AsJsValue> =
[("foo", &42 as _), ("bar", &s as _)]
.iter()
.cloned()
.collect();
... | Rust | 0 |
def main():
time = input("What time is it? ")
time= convert(time)
if(7<= time <=8):
print("breakfast time")
if(12<= time <=13):
print("lunch time")
if(18<= time <=19):
print("dinner time")
def convert(time):
hour, minutes = time.split(":")
hour = float(hour)
mi... | Python | 1 |
S: SortKey<T>,
<S as SortKey<T>>::Key: 'a + Clone + Ord + DeserializeOwned,
{
fn new(
reader: &'a ShardReaderSingle<T, S>,
range: Range<<S as SortKey<T>>::Key>,
) -> Result<RangeIter<'a, T, S>, Error> {
let shards: Vec<&ShardRecord<_>> = reader
.index
.ite... | Rust | 0 |
Param: WPARAM, lParam: LPARAM) -> BOOL;
pub fn PostMessageW(hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM) -> BOOL;
pub fn PostQuitMessage(nExitCode: c_int);
pub fn PostThreadMessageA(
idThread: DWORD, msg: UINT, wParam: WPARAM, lParam: LPARAM,
) -> BOOL;
pub fn PostThreadMessageW(
... | Rust | 0 |
Service<Request<ReqBody>, Response = Response<ResBody>> + Clone + Send + 'static,
S::Future: Send + 'static,
ReqBody: Send + 'static,
ResBody: Send + 'static,
{
type Response = S::Response;
type Error = S::Error;
type Future = BoxFuture<'static, Result<Self::Response, Self::Error>>;
fn pol... | Rust | 0 |
crate log;
#[macro_use]
extern crate serde_derive;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate lalrpop_util;
#[cfg(feature = "c-api")]
extern crate simplelog;
// Make sure the allocator is always the one from the system, otherwise we can't make sure our memory estimations work
use std::alloc:... | Rust | 0 |
{
'name': "TOTPortal",
'category': 'Hidden',
'depends': ['portal', 'auth_totp'],
'auto_install': True,
'data': [
'security/security.xml',
'views/templates.xml',
],
'assets': {
'web.assets_frontend': [
'auth_totp_portal/static/src/**/*',
],
... | Python | 1 |
g or partial blits).
///
/// A subregion of the input can be specified with the `begy`×`begx` and
/// `leny`×`lenx` fields from `vopts`.
///
/// Returns the number of pixels blitted on success.
///
/// *C style function: [ncblit_rgba()][c_api::ncblit_rgba].*
fn blit_rgba(data: &[u8], lin... | Rust | 0 |
let mut list: Vec<Center> = iterative_clustering(
max_allowed,
&sampled_points,
Center::new,
distance,
parallel_enabled,
);
list.sort_by(|o1, o2| o2.weight().partial_cmp(&o1.weight()).unwrap()); // decreasing order
let mut summary_point... | Rust | 0 |
print("we are working on kali to host you can use termux")
| Python | 1 |
"""
安全掃描器
此模組提供全面的安全掃描功能,包括漏洞檢測、安全標頭檢查等。
"""
import re
import json
import time
from typing import Dict, List, Any, Optional, Tuple
from dataclasses import dataclass, field
from datetime import datetime
import requests
from fastapi.testclient import TestClient
@dataclass
class SecurityIssue:
"""安全問題資料類"""
s... | Python | 1 |
"""
#195
Google
Let A be an N by M matrix in which every row and every column is sorted.
Given i1, j1, i2, and j2, compute the number of elements of M smaller than M[i1, j1] and larger than M[i2, j2].
For example, given the following matrix:
[[1, 3, 7, 10, 15, 20],
[2, 6, 9, 14, 22, 25],
[3, 8, 10, 15, 25, 30],
... | Python | 1 |
g:
TestProprietaryReferences._debug("test_parse_property_reference")
# create an application
app = Application()
# test without vendor reference
with pytest.raises(ValueError):
property_reference = await app.parse_property_reference(
"proprietary... | Python | 1 |
from fastapi import APIRouter, Depends, status
from fastapi.responses import JSONResponse
from gradient_descent.controller.request_form.predict_request_form import PredictRequestForm
from gradient_descent.service.gradient_descent_service_impl import GradientDescentServiceImpl
gradientDescentRouter = APIRouter()
asy... | Python | 1 |
;
// First resolve should block per the handler we use.
let pkg1_resolve_fut = env.resolve_package(&pkg1_url);
// Get the BlockedResponse to make sure we're blocking the above resolve
// before we try to resolve the second package.
let blocked_response = chan.next().await.unwrap();
// Now await... | Rust | 0 |