text string | label_name string | labels int64 |
|---|---|---|
import subprocess
from pathlib import Path
import sys
# Configuración
OUTPUT_DIR = Path('docs/build/pdoc')
SOURCE_DIR = Path('src')
def check_pdoc_installed():
try:
subprocess.run(['pdoc', '--version'], capture_output=True, check=True)
return True
except (subprocess.SubprocessError, FileNotFou... | Python | 1 |
::Str("features"),
Token::Seq { len: Some(1) },
Token::Str("a feature"),
Token::SeqEnd,
Token::StructEnd,
],
);
}
}
#![allow(unused_imports, dead_code)]
extern crate gtk;
#[macro_use]
extern crate relm;
#[macro_use]
extern crate re... | Rust | 0 |
wrap_err().kind() {
ErrorKind::InvalidAudience => (),
_ => unreachable!(),
};
}
#[test]
fn aud_missing_fails() {
let claims = Map::new();
let mut validation = Validation { validate_exp: false, ..Validation::default() };
validation.set_audience(&["None... | Rust | 0 |
11E1-B4B3-E89A8F7FC3A7".into(),
("MidnightBSD", "Unix File System (UFS) Partition"),
);
m.insert(
"85D5E45C-237C-11E1-B4B3-E89A8F7FC3A7".into(),
("MidnightBSD", "Vinium Volume Manager Partition"),
);
m.insert(
"85D5E45D-237C-11E1-B4B3-E89A8... | Rust | 0 |
value)
if order_size.is_zero():
ctx.log_rule("calculated order size is zero")
continue
order_value = abs(account.contract_value(asset, order_size, price))
if abs(order_value) > available:
ctx.log_rule(
... | Python | 1 |
of the YAML file!
let yaml = load_yaml!("cli_params.yaml");
let matches = App::from(yaml).get_matches();
let ip_addr = matches.value_of("ip").unwrap_or("127.0.0.1");
let port_str = matches
.value_of("port")
.expect("Port can't be none it is required");
let file_path = matches
... | Rust | 0 |
;
mod generic_path;
pub use generic_path::*;
mod path_segment;
pub use path_segment::PathSegment;
pub type Cost = usize;
// Reexport of a structure that derefs to a type with lang item impls having doc links in their
// comments. The doc link points to an associated item, so we check that traits in scope for that
//... | Rust | 0 |
# -*- coding: utf-8 -*-
""" Test for "find all references" in a codebase encoded in Cyrillic"""
import os
import GPS
import json
from gs_utils.internal.utils import hook, run_test_driver, gps_assert, wait_tasks
from workflows.promises import timeout
def to_str(m):
"""Make a string out of a message"""
return ... | Python | 1 |
er: ::vcell::VolatileCell<u32>,
}
#[doc = "Pre-programmed factory code present."]
pub mod ppfc;
#[doc = "Number of individualy controllable RAM blocks."]
pub struct NUMRAMBLOCK {
register: ::vcell::VolatileCell<u32>,
}
#[doc = "Number of individualy controllable RAM blocks."]
pub mod numramblock;
#[doc = "Size of R... | Rust | 0 |
# -*- coding: utf-8 -*-
# author: itimor
from workflows.models import *
from rest_framework import serializers
class WorkflowReadSerializer(serializers.ModelSerializer):
class Meta:
model = Workflow
fields = '__all__'
depth = 1
class WorkflowSerializer(serializers.ModelSerializer):
... | Python | 1 |
# Form implementation generated from reading ui file 'user_widget.ui'
#
# Created by: PyQt6 UI code generator 6.4.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt6 import QtCore, QtGui, QtWidgets
class U... | Python | 1 |
p = int(input("Введите любое число:"))
p1 = p
p2 = 0
while p != 0:
k = (p % 10)
p = p // 10
p2 = p2 * 10 + k
if p1 == p2:
print("True")
| Python | 1 |
re.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIA... | Rust | 0 |
nt is maxed out.
pub fn start_increment<'f, F: hil::flash::Flash<'f>>(
page: Page, current_value: u32, flash: &F, buffer: &'f mut [u32; 1])
-> (ReturnCode, Option<&'f mut [u32; 1]>)
{
use core::convert::TryInto;
const WRITE_PATTERNS: [u32; COUNTS_PER_WORD as usize] =
[0x3CFFFFFF, 0x00FFFFFF, 0x0... | Rust | 0 |
#
# This Python script makes a summary of a football game by cutting
# the video around the 10 % loudest moments, which generally
# include the goals and other important events.
# For more details, see this blog post:
# http://zulko.github.io/blog/2014/07/04/automatic-soccer-highlights-compilations-with-python/
#
# LI... | Python | 1 |
iolations = [
sector for sector, compliant in sector_compliance.items() if not compliant
]
# 計算行業集中度
weights = list(sector_weights.values())
sector_concentration = sum(w * w for w in weights) if weights else 0.0
return {
"sector_weights": sector_weights,... | Python | 1 |
g::from_std_str(&shortcuts.packed_file_decoder["move_left"])));
ui.get_mut_ptr_table_view_context_menu_move_rigth().set_shortcut(&QKeySequence::from_q_string(&QString::from_std_str(&shortcuts.packed_file_decoder["move_right"])));
ui.get_mut_ptr_table_view_context_menu_delete().set_shortcut(&QKeySequence::from_q... | Rust | 0 |
foo.html
<a href="/bar.html">bar</a>
</body>
</html>
"#;
let parsed = parse(url!("http://example.com/base.html"), &data, parse_url).unwrap();
assert_eq!(parsed, hashset! { url!("http://example.com/bar.html") })
}
}
use serde::{Deserialize, Deserializer... | Rust | 0 |
e_name is required
interface_name = None
# Using getopts to handle options
try:
options, args = getopt.getopt(sys.argv[1:],"hi:p:f:o:w:")
except getopt.GetoptError:
usage()
quit()
# If theres a switch, override default option
for key, value in options:
# Help
if (key == "-h"):
usage()
quit()
... | Python | 1 |
{}
impl<PIO: PinId> fc::SpiSckPin<PIO, flexcomm::Spi5> for Pin<PIO, Special<function::FC5_SCK>> {}
impl<PIO: PinId> fc::SpiSckPin<PIO, flexcomm::Spi6> for Pin<PIO, Special<function::FC6_SCK>> {}
impl<PIO: PinId> fc::SpiSckPin<PIO, flexcomm::Spi7> for Pin<PIO, Special<function::FC7_SCK>> {}
impl<PIO: PinId> fc::SpiSckPi... | Rust | 0 |
ple_transition_batch(self, rng, batch_size=None, indices=None):
"""Returns a batch of transitions with extra storage and the priorities."""
transition = super().sample_transition_batch(rng, batch_size, indices)
transition.append(self.get_priority(transition[-1]))
return transition
d... | Python | 1 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Cisco Systems
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
DOCUMENTATION = r"""
---
module: sg_mapping_group_deploy_status_info
short_description: Information module for SG Mapping Group Deploy Status
descr... | Python | 1 |
- - - - - |
// | - - - - - - - - |
// | - X - X - X - - |
// | - - - - - - - - |
// | - - - - - - - - |
// +-+-+-+-+-+-+-+-+-+
let board = BitBoard::empty()
.set_square(Square::from_coordinates(File::B, Rank::Three))
.set_square(Square::from_coordinates(File::B, Rank::Five))
... | Rust | 0 |
ion(model_plus.model.items())
logger.info(f"model parameters count : {model_params_count} ({gguf.model_weight_count_rounded_notation(model_params_count[0])})")
logger.info(f"Vocab info: {vocab}")
logger.info(f"Special vocab info: {special_vocab}")
model = model_plus.model
model = convert_model_... | Python | 1 |
v = v.item()
assert isinstance(v, (float, int))
self.meters[k].update(v)
def __getattr__(self, attr):
if attr in self.meters:
return self.meters[attr]
if attr in self.__dict__:
return self.__dict__[attr]
raise AttributeError("'{}' obje... | Python | 1 |
from sklearn.naive_bayes import GaussianNB
import random
import numpy as np
import math
from pylab import scatter,figure, clf, plot, xlabel, ylabel, xlim, ylim, title, grid, axes, show,semilogx, semilogy
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
# Generation of data to train t... | Python | 1 |
import streamlit as st
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
# Load the cleaned data
df = pd.read_csv('imdb_top_movies_cleaned.csv')
# Creating Decade column
df['Decade'] = (df['Year'] // 10) * 10 # Create a new 'Decade' column
# Sidebar options
st.sidebar.title("Filter Options")... | Python | 1 |
, sunt in culpa qui officia deserunt mollit anim id est laborum."
}
}
div.uk-modal-footer.uk-text-right {
button.uk-button.uk-button-default.uk-modal-close type="button" { "Cancel" }
button.uk-button.uk-button-primary type="button" { "Save" }
}
}
}
div... | Rust | 0 |
List[str] = None,
) -> Instance:
fields: Dict[str, Field] = {}
token_field = TextField([Token(t) for t in tokens], self._token_indexers)
fields["tokens"] = token_field
fields["metadata"] = MetadataField({"tokens": tokens})
if pos_tags is not None:
fields["pos_tag... | Python | 1 |
.error());
}
} else {
return Err(lookahead_bool_or_span.error());
}
} else if lookahead_int_or_ident.peek(Ident) {
let const_ident = input.parse::<Ident>()?;
// constant literal entry
entries.push(PhantomEntry::Const {
attributes,
nam... | Rust | 0 |
t_to_world.transform_point_abs_error(&pobj, &pobj_error, &mut it.p_error);
*pdf = 1.0 / self.area();
it
}
fn sample_interaction(&self, i: &InteractionData, u: &Point2f, pdf: &mut Float) -> InteractionData {
let pcenter = self.object_to_world.transform_point(&Point3f::new(0.0, 0.0, 0.0)... | Rust | 0 |
"""
Task Coach - Your friendly task manager
Copyright (C) 2004-2016 Task Coach developers <developers@taskcoach.org>
Task Coach 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 3 of the License, or
... | Python | 1 |
['tooltip'] = (
f"{timedelta_display(interval_start_time_ago)} ago" +
f"<br><strong>{incomplete_count}</strong> incomplete jobs"
)
context['incomplete_count_average'] = round(
sum([d['y'] for d in graph_data]) / len(graph_data))
context['incomplete_count_grap... | Python | 1 |
s and %s' % (read_written_count,read_read_count,fastq_r1_out,fastq_r2_out))
else:
while True:
r1_id_line = f1_in.readline().rstrip()
r1_seq_line = f1_in.readline().rstrip()
r1_plus_line = f1_in.readline().rstrip()
r1_qual_line = f1_in.readline().rstrip()
... | Python | 1 |
#User function Template for python3
class Solution:
def customSort(self, arr):
# code here
s=len(arr)//2
first=arr[:s]
second=arr[s:]
first.sort()
second.sort(reverse=True)
return first+second
| Python | 1 |
"""Mergers and Acquisitions (M&A) API endpoints."""
MA_RSS_FEED_ENDPOINT = "v4/mergers-acquisitions-rss-feed"
SEARCH_MA_ENDPOINT = "v4/mergers-acquisitions/search"
class MergersAndAcquisitions:
"""
A class to retrieve information about mergers and acquisitions (M&A) activities.
Explanation:
This clas... | Python | 1 |
Endpoint '{name}'"] + lines[1:]
endpoint = "\n".join(lines)
return endpoint
def _list_variables_used_by_fns(fns):
trainable_variables = []
non_trainable_variables = []
trainable_variables_ids = set()
non_trainable_variables_ids = set()
for fn in fns:
if hasattr(fn, "concrete_functi... | Python | 1 |
ip first node.
parents_cache.store_consumer(1);
let mut i = 1;
while i < num_nodes {
// Ensure next buffer is ready
let mut counted = false;
let mut producer_val = cur_producer.load(SeqCst);
while producer_val < i {
if !counted {
... | Rust | 0 |
_base_ = [
'../../../rtmpose/coco-wholebody/rtmpose-m_8xb64-270e_coco-wholebody-256x192.py' # noqa: E501
]
# model settings
find_unused_parameters = False
# config settings
fea = True
logit = True
# method details
model = dict(
_delete_=True,
type='DWPoseDistiller',
teacher_pretrained='https://downl... | Python | 1 |
_inode: &Inode, _path: &str) -> Option<BoundEndpoint> {
return None;
}
fn GetFile(&self, task: &Task, _dir: &Inode, _dirent: &Dirent, flags: FileFlags) -> Result<File> {
let i = self.lock();
if flags.Read && !flags.Write { // O_RDONLY
let r = i.p.Open(task, &flags);
... | Rust | 0 |
educed to a form that can be
shared with other processes.r )globalsgetr s r reducerzBaseContext.reducer s y}}[))r
c |t d< |