text string | label_name string | labels int64 |
|---|---|---|
self, output: &mut [u8], data: u32) {
let output = array_mut_ref![output, 0, Record::NO_REF_LEN + Reference::U32_LEN];
#[allow(clippy::ptr_offset_with_cast)]
let (counter_out, tag_out, name_out, reference_out) =
mut_array_refs![output, 2, 2, 64, Reference::U32_LEN];
*counter_... | Rust | 0 |
# Generated by Django 4.2.4 on 2024-02-16 04:57
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('User', '0003_userprofile_following_alter_userprofile_followers'),
]
operations = [
migrations.AddField(
... | Python | 1 |
"):
show_saldo(data)
with st.expander("Show Loans"):
show_loans(data)
with st.expander("Income Breakdown"):
show_breakdown(income=True)
with st.expander("Expense Breakdown"):
show_breakdown(expense=True)
# Use st.expander to hide sections
with st.expander("Change ... | Python | 1 |
{0x727e5360ad6509d6, "f9z56s5edn4x", 55.437646016, -57.541490887},
{0x8918ac9b2ac51b1d, "j4dbt6tbsnej", -75.8357548, 49.105972725},
{0x4a039b45f13e827c, "981tqjgj7u17", 0.955360555, -110.122670401},
{0x727f49edf574b4db, "f9znmvgpfkue", 55.975324948, -57.399341693},
{0x3d08eee88d... | Rust | 0 |
lf, node: &IdxNode) -> Result<u32> {
let node_offset = node.get_ref().downs_get(0);
let mut mx = if !node_offset.is_zero() {
let node1 = self.read_node(node_offset)?;
self.height(&node1)?
} else {
0
};
for i in 1..node.get_ref().downs_len() {
... | Rust | 0 |
import openai
import pandas as pd
import time
import logging
# Your API key
openai.api_key = "sk-"
openai.base_url = "https://api.gpt.ge/v1/"
openai.default_headers = {"x-foo": "true"}
#assign experts for target
target_role_map = {
"萝卜快跑": "自动驾驶与交通分析专家",
"预制菜": "食品科学家",
"iphone15": "科技分析师",
"不婚主义": ... | Python | 1 |
keyword in the PeriodArray constructor is deprecated"
with tm.assert_produces_warning(FutureWarning, match=msg):
res = PeriodArray(data, freq="M")
expected = PeriodArray(data, dtype="period[M]")
tm.assert_equal(res, expected)
def test_period_array_from_datetime64():
arr = np.array(
[... | Python | 1 |
# Copyright (C) 2022-2025 Intel Corporation
# LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE
import io
from iai_core.adapters.binary_interpreters import NumpyBinaryInterpreter, RAWBinaryInterpreter
class TestBinaryInterpreters:
def test_raw_binary_interpreter(self) -> None:
"""
<b>Description:</b>
... | Python | 1 |
{
/// The tag of the request
pub tag: ReqTag,
/// The rpc context carried in the request
pub context: kvrpcpb::Context,
/// The first range of the request
pub first_range: Option<coppb::KeyRange>,
/// The length of the range
pub ranges_len: usize,
/// The deadline of the request... | Rust | 0 |
# Copyright 2023 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | Python | 1 |
h
pub commit_author: String,
}
impl Git {
fn git2_time_to_datetime(time: git2::Time) -> DateTime<Local> {
Utc.timestamp(time.seconds(), 0).with_timezone(&Local)
}
fn get_commit_diff<'a>(repo: &'a Repository, c: &Commit) -> Option<git2::Diff<'a>> {
if c.parent_count() > 1 {
... | Rust | 0 |
domain=domain,
)
print(f"Generating manifests: {src_lang}-{tgt_lang}...")
aud_manifest_fn = os.path.join(
args.proc_epst_dir,
"aud_manifests",
f"{src_lang}-{tgt_lang}",
f"test_{domain}_{src_lang}_{tgt_lang}... | Python | 1 |
eakable Formation (RNA) 29
4 Legion's Landing (XLN) 22
1 Island
";
let total = 100000;
let input = Input {
code: code.to_string(),
runs: total,
on_the_play: true,
mulligan_down_to: 5,
mulligan_on_lands: vec![0, 1, 6, 7].... | Rust | 0 |
1: i32) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
// class.path == "javax/crypto/KeyAgreement", java.flags == PUBLIC | FINAL, .name == "generateSecret", .descriptor == "([BI)I"
unsafe {
let __jni_args = [__jni_bindgen::... | Rust | 0 |
TocEntryType = -1;
pub const GST_TOC_ENTRY_TYPE_INVALID: GstTocEntryType = 0;
pub const GST_TOC_ENTRY_TYPE_TITLE: GstTocEntryType = 1;
pub const GST_TOC_ENTRY_TYPE_TRACK: GstTocEntryType = 2;
pub const GST_TOC_ENTRY_TYPE_CHAPTER: GstTocEntryType = 3;
pub type GstTocLoopType = c_int;
pub const GST_TOC_LOOP_NONE: GstToc... | Rust | 0 |
f64 - dist_percent) + 1.0;
let circle1 = Circle::new(V2::new(x1, y1), r1).expect("Should succeed");
let circle2 = Circle::new(V2::new(x2, y2), r2).expect("Should succeed");
prop_assert!(circle_circle_test(&circle1, &circle2), "{:?} {:?}", circle1, circle2);
}
}
propt... | Rust | 0 |
-label")));
..set_margin_end(6);
};
let check = cascade! {
Button::with_label(&fl!("check-label"));
..style_context().add_class(&STYLE_CLASS_SUGGESTED_ACTION);
..set_sensitive(false);
};
let hash_label_clone = hash_label.clone();
... | Rust | 0 |
", ">=1.2.0 <3.5.0-0"],
single_sided_only_major => ["1", ">=1.0.0 <2.0.0-0"],
single_sided_lower_equals_bound => [">=1.0.0", ">=1.0.0"],
single_sided_lower_equals_bound_2 => [">=0.1.97", ">=0.1.97"],
single_sided_lower_bound => [">1.0.0", ">1.0.0"],
single_sided_upper_equals_bou... | Rust | 0 |
from langchain_core.tools import tool
import datetime as dt
import streamlit as st
import yfinance as yf
import tickers as ti
import pandas as pd
#Tool for langchain_core : had problems parsing the date
@tool
def tool_analyze_idb_rs_rating(tool_start_date : dt.date, tool_end_date : dt.date):
'''This tool allows... | Python | 1 |
-iNEqQZZ-sjKn-W-N1F-pzy\
c-xP5eWz-LmsCiCcZ",
"ih-DlPR-PE",
"Krf-362",
"WzaD",
"EPaOnB-gHHn",
"XYta",
"NZ-RgOO-tR",
"at-FE",
"Tpc-693",
"YFp",
"gRQrQULo",
"pVomZ-585",
"laSu-ZcAq-338",
"gCW",
"PydSwHRI-TYfF",
"zKmWDD",
"X-bCrL5RL",
"HK",
"YMKGcLY",
"GDJ-nHYa-bw-X-ke-rohH5GfS-LdJK... | Rust | 0 |
- Matrix is not positive definite.
// #[deprecated]
// pub fn cholesky(&self) -> Result<Matrix<T>, Error> {
// assert!(self.rows == self.cols,
// "Matrix must be square for Cholesky decomposition.");
// let mut new_data = Vec::<T>::with_capacity(self.rows() * self.cols());
// ... | Rust | 0 |
r::NulError(path.to_owned()))?;
let newpeer = ngm_mkpeer::from((nodetype, ourhook, peerhook));
let pnewpeer: *const ngm_mkpeer = &newpeer;
// send the makepeer command
unsafe { ng_send_msg(csock, &cpath, NGM_GENERIC_COOKIE as c_int, NGM_MKPEER as c_int, pnewpeer as *const c_void, size_of::<ngm_mkpeer>(... | Rust | 0 |
# aggressive_mix 전략 조합 configs 패키지
from .aggressive_mix_config import AGGRESSIVE_MIX_CONFIG, AggressiveMixConfig
| Python | 1 |
cancel: Arc<AtomicBool>,
}
impl Explorer {
pub fn new(config: ExplorerConfig, cancel: Arc<AtomicBool>) -> Self {
Self {
border_tiles: Vec::new(),
tile_pos_path: VecDeque::new(),
find_path_layer: None,
border_tiles_layer: None,
config,
... | Rust | 0 |
# coding: utf-8
"""
SendinBlue API
SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at h... | Python | 1 |
import cv2
import numpy as np
import pyautogui
import keyboard
import time
import socket
from tkinter import Tk, Canvas
# 设置超时时间和最大重试次数
timeout = 1000
max_retries = 3
# 热键
hotkey = 'F12'
# # TCP
# tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# tcp_socket.setsockopt(socket.SOL_SOCKET, socket.SO_SNDB... | Python | 1 |
e_distribution(transactions)
with cols[1 % len(cols)]:
# 交易時間分佈圖
TradingComponents._render_time_distribution(transactions)
@staticmethod
def _render_volume_distribution(transactions: List[Dict[str, Any]]) -> None:
"""渲染交易量分佈圖"""
# 提取交易量數據
volumes = [t.ge... | Python | 1 |
` reader - State of OUT Endpoint 2."]
pub struct OUT_EP2_STATE_R(crate::FieldReader<u8, u8>);
impl OUT_EP2_STATE_R {
#[inline(always)]
pub(crate) fn new(bits: u8) -> Self {
OUT_EP2_STATE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for OUT_EP2_STATE_R {
type Target = crate::FieldRe... | Rust | 0 |
# Copyright (c) 2024, Alibaba Group;
# 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 applicable law or agreed to in writing, ... | Python | 1 |
MAIN_KEY_SALT), &seed.0)?;
Ok(Self {
main: Main::from(&hkdf_extract[..32]),
})
}
/// Getter for Main
pub fn main(&self) -> &[u8] {
&self.main.0[..]
}
/// Derive a particular PrivateKey at a certain ChildNumber
///
/// Note that the function below adher... | Rust | 0 |
self, request_url=None, http_method=None, params=None):
"""
Process the authenticated query by summarizing the required attributes of the header and signature based on the
secret key
:param request_url: URL of the endpoint
:param http_method: HTTP method required
:param p... | Python | 1 |
("bookmarkBBBB", Bookmark)
}),
("toolbar_____", Folder[needs_merge = true, age = 5], {
("bookmarkDDDD", Bookmark),
("bookmarkEEEE", Bookmark),
("bookmarkFFFF", Bookmark),
("bookmarkGGGG", Bookmark[needs_merge = true]),
("bookmarkHHHH", Bookmark... | Rust | 0 |
if trainer.global_step % 100 == 0:
# for name, p in pl_module.named_parameters():
# if 'backbone' in name:
# self.writer.add_histogram(name, p.clone().detach().cpu().numpy(), trainer.global_step)
# if p.grad is None:
# ... | Python | 1 |
and do not output any other words. The following are some examples.\n\n{context}\n\n{input}",
"samsum": "Summarize the dialogue into a few short sentences. The following are some examples.\n\n{context}\n\n{input}",
"lsht": "请判断给定新闻的类别,下面是一些例子。\n\n{context}\n{input}",
"passage_count": "There are some paragra... | Python | 1 |
;
trace!(
"backend processed get, /{:.3}ms/",
sw.elapsed().as_secs_f64() * 1000.0
);
if result.is_err() {
counter!(CLIENT_GET_ERROR_COUNT_COUNTER, 1);
}
timing!(CLIENT_GET_TIMER, time.elapsed().as_nanos() as f64... | Rust | 0 |
from rest_framework import permissions
from rest_framework.request import Request
from rest_framework.views import View
class IsAccountExecutive(permissions.BasePermission):
def has_permission(self, request: Request, view: View) -> bool:
is_authenticated = request.user.is_authenticated
has_role_at... | Python | 1 |
nner="y",le="+Inf"} 3255
gitlab_runner_job_duration_seconds_sum{runner="y"} 381111.7498891335
gitlab_runner_job_duration_seconds_count{runner="y"} 3255
"##;
assert_eq!(
parse(exp),
Ok(vec![
Metric {
name: "gitlab_runner... | Rust | 0 |
/1000, linestyle='dashed', color='#56B4E9')
ax['b'].plot(pers, VoL_t2_invbs/1000, linestyle='dashed', color='#009E73')
ax['b'].set_ylabel("Additional cost of uncertainty\n(Trillions of \$)")
ax['b'].set_xlabel("Year information is revealed")
right = ['a', 'b']
for label in right:
# label physical distance in and ... | Python | 1 |
binding variables at 0x02XX
// these are used for both ZX_PROTOCOL_USB and ZX_PROTOCOL_USB_FUNCTION
keys.push(("BIND_USB_VID".to_string(), 0x0200));
keys.push(("BIND_USB_PID".to_string(), 0x0201));
keys.push(("BIND_USB_CLASS".to_string(), 0x0202));
keys.push(("BIND_USB_SUBCLASS".to_string(), 0x0203... | Rust | 0 |
CT!{struct NMDATETIMECHANGE {
nmhdr: NMHDR,
dwFlags: DWORD,
st: SYSTEMTIME,
}}
pub type LPNMDATETIMECHANGE = *mut NMDATETIMECHANGE;
pub const DTN_USERSTRINGA: UINT = DTN_FIRST2 - 5;
pub const DTN_USERSTRINGW: UINT = DTN_FIRST - 5;
STRUCT!{struct NMDATETIMESTRINGA {
nmhdr: NMHDR,
pszUserString: LPCST... | Rust | 0 |
# Copyright (C) 2006-2011 Canonical Ltd
# Written by Robert Collins <robert.collins@canonical.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at you... | Python | 1 |
import ray
from ray.rllib.utils.annotations import DeveloperAPI
@DeveloperAPI
class FilterManager:
"""Manages filters and coordination across remote evaluators that expose
`get_filters` and `sync_filters`.
"""
@staticmethod
@DeveloperAPI
def synchronize(local_filters, remotes, update_remo... | Python | 1 |
, n_temporal
def cross_KxK_heter(mem_shape, K):
"""
Parameters
----------
mem_shape
K
Returns
-------
cuboid_hw
shift_hw
strategy
n_temporal
"""
T_mem, H, W, _ = mem_shape
K = min(K, H, W)
cuboid_hw = [(K, K), (K, K), (K, K)]
shift_hw = [(0, 0), (0, 0)... | Python | 1 |
)]
impl ::core::marker::Copy for DebugStackFrameDescriptor64 {}
#[cfg(feature = "Win32_Foundation")]
impl ::core::clone::Clone for DebugStackFrameDescriptor64 {
fn clone(&self) -> Self {
*self
}
}
pub const DefaultDebugSessionProvider: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 22020... | Rust | 0 |
@param {&str} text
* @param {FancyRegex} regexp
* @param {Vec<Container>} containers
* @return {Vec<Match>}
*/
pub fn match_str (text: &str, regexp: FancyRegex, containers: Vec<Container>) -> Vec<Match> {
let mut matches: Vec<Match> = vec![];
if !regexp.is_match(text).unwrap() {
return matches;
... | Rust | 0 |
# Copyright (c) OpenMMLab. All rights reserved.
import torch.nn as nn
from mmcv.cnn.bricks import ConvModule
from mmcv.runner import BaseModule
from ..backbones.resnet import Bottleneck, ResLayer
from ..builder import NECKS
@NECKS.register_module()
class HRFuseScales(BaseModule):
"""Fuse feature map of multiple ... | Python | 1 |
import sys
from struct import unpack
from binascii import unhexlify, hexlify
def getLongLE(d, a):
return unpack('<L',(d)[a:a+4])[0]
#600d 1.0.1 0xff800000 base
offset = 0x10f7ac
offset3 = 0x1ed720
#60d 1.0.9 ? 0xff800000 base
#offset = 0x209c4
#offset3 = 0xa611c
#550d 1.0.8 0xff000000 base
offset = 0x6ca90c
of... | Python | 1 |
m mat4 model;
void main() {
gl_Position = camera*model*vec4(position,1.0);
o_normal = normal;
o_uv = uv;
}
"#,
fragment_shader: r#"#version 300 es
precision highp float;
out vec4 color;
in vec2 o_uv;
in vec3 o_normal;
... | Rust | 0 |
))(&binary[..])
.or_else(|_| bail!("could not parse private key"))?;
let (_, mut pubparts) = terminated(ssh_record, eof)(pubblob)
.or_else(|_| bail!("could not parse public part of private key"))?;
let mut secrets = enciphered.to_owned();
let blocksize = if cipher_params.is_some() { 16 } e... | Rust | 0 |
into() })
}
}
impl ops::Deref for Identifier {
type Target = str;
fn deref(&self) -> &str { &self.value }
}
impl PartialEq for Identifier {
fn eq(&self, other: &Identifier) -> bool {
identifier_eq(&self.value, &other.value)
}
}
impl fmt::Display for Identifier {
fn fmt(&self, fmt:... | Rust | 0 |
type="int", default=10)
(options, args) = parser.parse_args()
#
#
if (options.outfile is not None):
sys.stdout = open(options.outfile, 'w')
#
#global p_value
#global error_rate
#global least_cov
#global dynamicP
#
#
# ======================
glob... | Python | 1 |
let func_output = assets_data_dir();
assert!(func_output.is_ok());
assert_eq!(func_output.unwrap().into_os_string().is_empty(), false);
}
#[test]
fn logs_dir_macos_works() {
assert_eq!(logs_dir().into_os_string().is_empty(), false);
}
}
<gh_stars>0
//! Trait exposing functio... | Rust | 0 |