text string | label_name string | labels int64 |
|---|---|---|
def abc(level):
global cnt
cnt += 1
if level==l:
return
for i in range(branch):
abc(level+1)
branch,l=map(int,input().split())
cnt=0
abc(0)
print(cnt) | Python | 1 |
cimal64 {
unsafe {
decnumber_sys::decDoubleNextToward(&mut x.inner, &x.inner, &y.inner, &mut self.inner);
}
x
}
/// Determines the ordering of `lhs` relative to `rhs`, using a partial
/// order.
///
/// If either `lhs` or `rhs` is a NaN, returns `None`. To force ... | Rust | 0 |
// CHECK-LABEL: reg_ptr_i16:
// CHECK: ;APP
// CHECK: movw r{{[0-9]+}}, r{{[0-9]+}}
// CHECK: ;NO_APP
checkw!(reg_ptr_i16 i16 reg_ptr);
// CHECK-LABEL: r2_i8:
// CHECK: ;APP
// CHECK: mov r2, r2
// CHECK: ;NO_APP
check_reg!(r2_i8 i8 "r2");
// CHECK-LABEL: xl_i8:
// CHECK: ;APP
// CHECK: mov r26, r26
// CHECK: ;NO_AP... | Rust | 0 |
def forward(self, data_batch, mixed_batch=None):
if mixed_batch is None:
feats = self.net_3d(data_batch['x'])
else:
feats = self.net_3d(mixed_batch)
x = self.linear(feats)
preds = {'feats': feats, 'seg_logit': x}
if self.dual_head:
preds['seg_logit2'] = self.linear2(feats)
... | Python | 1 |
# Databricks notebook source
# MAGIC %pip install -r requirements.in
# COMMAND ----------
dbutils.library.restartPython()
# COMMAND ----------
import yaml
from databricks import feature_engineering
from pyspark.sql import SparkSession
from databricks.sdk import WorkspaceClient
workspace = WorkspaceClient()
fe = fea... | Python | 1 |
#!/usr/bin/env python3
#
# Copyright (C) 2021 Amlogic, Inc. All rights reserved.
#
# This source code is subject to the terms and conditions defined in the
# file 'LICENSE' which is part of this source code package.
TARGET_NAME = 'pek'
PEK_SIZE = 16
MAX_IDX = 100000000
def get_args():
from argparse import ArgumentPa... | Python | 1 |
"""
这个文件做一些操作数据的东西
定义数据点类
定义数据存储类
定义数据过滤类
"""
from copy import copy
from ctypes import windll
from dataclasses import dataclass
from hashlib import md5
from os import listdir, remove, mkdir
from os.path import join, basename, isfile
from random import randbytes
from threading import Lock, Thread, current_thread
from l... | Python | 1 |
lt_json)?;
Ok(())
}
}
#[cfg(test)]
// Tests become unstable if not serial. The cause is not known.
mod tests {
use super::*;
use crate::utils::create_temp_dir;
#[test]
fn test_spec_json() -> Result<()> {
let mut spec = Default::default();
spec = set_for_rootless(&spec)?;
... | Rust | 0 |
spawn(r.echo(stream)).detach();
}
}
}
struct Router<B> {
server: Server,
routes: Routes<B>,
}
impl<B: Clone> Router<B> {
fn new(server: Server, inner: B) -> Router<B>
where
B: Clone,
{
Router {
server: server,
routes: Routes::new(inner)
... | Rust | 0 |
# Code generated by Lark OpenAPI.
from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.model import BaseRequest
from lark_oapi.core.enum import HttpMethod, AccessTokenType
from .update_title_space_node_request_body import UpdateTitleSpaceNodeRequestBody
class UpdateTitleSp... | Python | 1 |
"""
# Filename: Benchmark.py
# Author: suxunbin
# Last Modified: 2024/9/18 10:09
# Description: a simple example of multi-thread query
"""
import threading
import sys
sys.path.append('../src')
import GstoreConnector
# before you run this example, make sure that you have started up ghttp service (using bin/ghttp db_nam... | Python | 1 |
use thiserror::Error;
pub(crate) type Result<T> = std::result::Result<T, GraphError>;
#[derive(Debug, Error)]
pub enum GraphError {
#[error("Invalid index")]
InvalidIndex,
}
use std::io::{self, Write};
const INPUT: &str = include_str!("./inputs/01.txt");
pub fn solve() -> crate::util::Result<()> {
let mu... | Rust | 0 |
import qiime2.plugin.model as model
from qiime2.plugin import ValidationError
class SinkSourceMapFormat(model.TextFileFormat):
def _validate(self, n_records=None):
with self.open() as fh:
# check the header column names
header = fh.readline()
comp_columns = list(header.... | Python | 1 |
),
}
}
}
pub fn get_pix_fmt_name(&self) -> Option<String> {
unsafe {
if (*(*self.stream).codec).pix_fmt == AVPixelFormat::AV_PIX_FMT_NONE {
return None;
}
let input_fmt_str = av_get_pix_fmt_name((*(*self.stream).codec).pix_fmt);
Some(tools::to_string(input_fmt_str))
... | Rust | 0 |
bedCode|ec)=)(?P<id>.+?)(&|$)'
_TESTS = [
{
# From http://it.slashdot.org/story/13/04/25/178216/recovering-data-from-broken-hard-drives-and-ssds-video
'url': 'http://player.ooyala.com/player.js?embedCode=pxczE2YjpfHfn1f3M-ykG_AmJRRn0PD8',
'info_dict': {
'... | Python | 1 |
# Copyright (C) PyZMQ Developers
# Distributed under the terms of the Modified BSD License.
import zmq
import zmq.asyncio
from zmq.tests import require_zmq_4
from zmq.utils.monitor import recv_monitor_message
pytestmark = require_zmq_4
import pytest
@pytest.fixture(params=["zmq", "asyncio"])
def Context(request, ev... | Python | 1 |
()?));
},
8 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.range_end)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
... | Rust | 0 |
ype ManageMarketingRiskValue: :class:`tencentcloud.captcha.v20190722.models.OutputManageMarketingRiskValue`
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
:type RequestId: str
"""
self._CaptchaCode = None
self._CaptchaMsg... | Python | 1 |
= b"foobar";
let output = Span {
offset: 2,
line : 1,
column: 3,
slice : &input[range.clone()]
};
assert_eq!(Span::new(input).slice(range.clone()), output);
}
#[test]
fn case_span_slice_with_range_to() {
let range = 2..;
... | Rust | 0 |
FUSE_WRITE => Some(Op::Write),
fuse_kernel::FUSE_RELEASE => Some(Op::Release),
fuse_kernel::FUSE_FSYNC => Some(Op::Fsync),
fuse_kernel::FUSE_FLUSH => Some(Op::Flush),
fuse_kernel::FUSE_DESTROY => Some(Op::Destroy),
fuse_kernel::FUSE_IOCTL => Some(Op::Ioctl),
fuse_kernel::FUSE_POLL => Some(O... | Rust | 0 |
# Generated by Django 3.1.2 on 2020-12-27 18:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('setup', '0017_dropletspec_timestamp'),
]
operations = [
migrations.AlterField(
model_name='dropletspec',
name='disk'... | Python | 1 |
alue: Num(1.0)
│ ├─operator: Add
│ ╰─right: ExprKind::Binary
│ ├─left: Literal
│ │ ╰─value: Bool(true)
│ ├─operator: Mul
│ ╰─right: Literal
│ ╰─value: Str("a string")
├─ExprKind::Maybe
│ ╰─value: Nothing
├─ExprKind::Maybe
│ ╰─value: Literal
│ ╰─value: Null
├─ExprKind::SomeIterabl... | Rust | 0 |
Status::INVALID_PARAMETER.into())?;
// Opening protocol with GET_PROTOCOL does not require
// use to close protocol but if we do we will remove all
// open protocol information from handle database (even
// with different attributes, even with BY_DRIVER).
let mut pci = boot_services()
.open_... | Rust | 0 |
{} and 1 = _this.b.z"
);
assert_query_done!(q);
Ok(())
}
#[test]
fn test_partial_unification_1() -> TestResult {
let p = Polar::new();
p.load_str(
r#"f(x, y) if x = y;
f(x, y) if x = y and 1 = x;
f(x, y) if 2 = y and x = y an... | Rust | 0 |
h_Space {
id Int @id @default(autoincrement())
age Int
Post Post?
@@unique([id, age], name: "sqlite_autoindex_User with Space_1")
@@map("User with Space")
}
"#]];
expected.assert_eq(&api.introspect_dml().await?);
Ok(())
}
use anyhow::{Error, ... | Rust | 0 |
o_send is not None:
await ctx.send_msgs([{"cmd": "LocationChecks", "locations": list(locs_to_send)}])
# Send game clear if we're in either any ending cutscene or the credits state.
if not ctx.finished_game and locations[18] & (1 << 5) != 0:
await ctx.send_msg... | Python | 1 |
::Ready(Err(io::Error::new(
io::ErrorKind::WriteZero,
"AsyncWrite::poll_closed has been called",
)))
}
}
ArmorIsProj::Disabled { inner } => inner.poll_write(cx, buf),
}
}
fn poll_flush(mut self: ... | Rust | 0 |
urns:
o: Rotation matrices as tensor of shape (..., 3, 3).
"""
r, i, j, k = torch.unbind(quaternions, -1)
q2 = quaternions**2
rr, ii, jj, kk = torch.unbind(q2, -1)
two_s = 2.0 / q2.sum(-1)
ij = i * j
ik = i * k
ir = i * r
jk = j * k
jr = j * r
kr = k * r
o1 = 1 -... | Python | 1 |
reader = EventReaderState::init(world, system_meta, (None, ()));
let console_line = EventWriterState::init(world, system_meta, ((),));
ConsoleCommandState {
event_reader,
console_line,
marker: PhantomData::default(),
}
}
fn default_config() {}
}
imp... | Rust | 0 |
rror")]
UnknownError,
}
#[derive(Debug, Clone, Serialize)]
pub struct Diagnostic {
pub open_files_limit: Option<u64>,
pub cpu_usage_limit: Option<u64>,
}
impl Diagnostic {
pub fn new() -> Result<Self, DiagnosticError> {
#[cfg(all(unix, not(target_os = "android")))]
{
Ok(Sel... | Rust | 0 |
'''
Fuel gauges indicate, often with fractions, just how much fuel is in a tank. For instance 1/4 indicates that a tank is 25% full, 1/2 indicates that a tank is 50% full, and 3/4 indicates that a tank is 75% full.
In a file called fuel.py, implement a program that prompts the user for a fraction, formatted as X/Y, wh... | Python | 1 |
queue.pop_front() {
unsafe {
(garbage.dropper)(garbage.pointer);
}
}
}
}
impl Drop for GarbageQueue {
fn drop(&mut self) {
while PAUSE_COUNT.load(Ordering::Acquire) != 0 {}
self.delete();
}
}
pub fn add_garbage(garbage: Garbage) {
GARBAGE_... | Rust | 0 |
fill: None,
fill: srgba(100, 100, 150, 255),
stroke_color: gray(240, 255),
stroke_width: 1.5,
rect_outline: Some(LineStyle::new(1.0, WHITE)),
corner_radius: 2.0,
},
inactive: WidgetStyle {
bg_fill: No... | Rust | 0 |
# Numeros cercanos
"""
Escribe un programa en el que dados 5 números enteros solicitado al usuario, determine cuál de los 4
números enteros Está más cerca del primero.
"""
primero = int(input("Ingrese el primer numero: "))
numeros,restados = [],[]
for i in range(0,4):
numero = int(input(f"{i+2}° Numero: "))
... | Python | 1 |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | Python | 1 |
ng(self):
"""Start scraping every hour"""
if self.is_scheduled:
print("Hourly social media scheduling is already running")
return
def run_scheduler():
schedule.every(1).hour.do(self.hourly_update_job)
self.hourly_update_job()
while se... | Python | 1 |
先写入数据确保一致性
f.seek(0)
json.dump(data, f, indent=2)
f.truncate()
# 更新哈希链文件
with open(HASH_CHAIN_PATH, "w") as chain_file:
json.dump(_hash_chain.chain, chain_file)
... | Python | 1 |
IK_COURSES = [
#Semester 0, Empty
[],
#Semester 1
["UIGE600004", "CSGE601012", "UIGE600003", "CSGE601010", "CSGE601020", "CSCM601150"],
#Semester 2
["UIGE600006", "CSGE601021", "CSGE601011", "CSCM601252", "CSCM601213"],
#Semester 3
["CSGE602022", "CSGE602040", "CSCM602055", "CSGE602012", "CSGE602013"],
#Semester 4
... | Python | 1 |
{reputation_change:.2f} reputation due to high score.")
elif reputation_change < 0:
print(f"{self.name} has lost {abs(reputation_change):.2f} reputation due to low score.")
else:
print(f"{self.name}'s reputation remains the same.")
self.reputation = max(0, min(20... | Python | 1 |
p = pyaudio.PyAudio()
stream = p.open(format=audio_format,
channels=channels,
rate=rate,
input=True,
frames_per_buffer=chunk)
print("Recording...")
audio_data = bytearray()
try:
for _ in range(0, int(rate / chunk * ... | Python | 1 |
let Some(var_86) = &input.data_set_id {
object.key("DataSetId").string(var_86.as_str());
}
if let Some(var_87) = &input.revision_id {
object.key("RevisionId").string(var_87.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_model_import_asset_from_api_gateway_api_request_details(
... | Rust | 0 |
BearSslWriteErr(i32),
BearSslReadErr(i32),
}
// LetsEncrypt trust anchor ISRG Root X1 exp. 04 Jun 2035
static mut TA0_DN: [u8; 81] = [
0x30, 0x4F, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31,
0x29, 0x30, 0x27, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x20, 0x49, 0x6E, 0... | Rust | 0 |
let base_key = match load_inner(&locations)? {
Some(key) => key,
None => {
return Err(crate::implementation::err_invalid_parameter(
"base_id",
"key not found",
))
}
};
let expected_derived_key =... | Rust | 0 |
])
sample_weight = compute_sample_weight("balanced", y, indices=range(4))
assert_array_almost_equal(sample_weight, [2.0 / 3, 2.0 / 3, 2.0 / 3, 2.0, 2.0, 2.0])
# Test with a bootstrap subsample
y = np.asarray([1, 1, 1, 2, 2, 2])
sample_weight = compute_sample_weight("balanced", y, indices=[0, 1, 1, ... | Python | 1 |
'''
Python script for: Anatomy of a simple class
Date: 05JAN2024
By: Shahanawaz Shaikh
'''
# Defining a class 'Person'
class Person:
# Using the Constructor method to initialize the attributes, called whenever an instance of class is created
def __init__(self, name, age):
self.name = name
self.... | Python | 1 |
from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.contrib.operators.spark_submit_operator import SparkSubmitOperator
from datetime import datetime, timedelta
###############################################
# Parameters
###############################################
spark_... | Python | 1 |
ond);
assert_eq!(abstract_gte(&first, &second), true);
})
}
#[test]
fn test_lt_values_are_not_gte() {
lt_values().iter().for_each(|(first, second)| {
println!("{:?}-{:?}", &first, &second);
assert_eq!(abstract_gte(&first, &second), false);
})
... | Rust | 0 |
IfIntEq(CodeOffset),
IfIntNe(CodeOffset),
IfIntLt(CodeOffset),
IfIntGe(CodeOffset),
IfIntGt(CodeOffset),
IfIntLe(CodeOffset),
IfRefEq(CodeOffset),
IfRefNe(CodeOffset),
Goto(CodeOffset),
JumpSub(CodeOffset),
RetSub(VarIndex),
LookupSwitch {
default_offset: W... | Rust | 0 |
ps://substrate.dev/docs/en/knowledgebase/runtime/events
decl_event!(
pub enum Event<T> where AccountId = <T as frame_system::Trait>::AccountId, Hash = <T as frame_system::Trait>::Hash, {
/// Event documentation should end with an array that provides descriptive names for event
/// parameters. [project_hash, who]
... | Rust | 0 |
}
_ => {
print_uop(w, u.0)?;
print_expr(ctx, w, env, &u.1)
}
},
E_::ObjGet(og) => {
print_expr(ctx, w, env, &og.0)?;
w.write_all(match og.2 {
ast::OgNullFlavor::OGNullthrows => b"->",
as... | Rust | 0 |
rint("5. Interpolação")
print("6. Diferenciação Automática")
print("7. Sistemas Dinâmicos")
print("8. Executar todos os exercícios")
print("0. Sair")
print("="*80)
def main():
"""
Função principal que executa todos os exercícios
"""
print("MÉTODOS NUMÉRICOS - LISTA 1 GERAL")
pri... | Python | 1 |
}
}
#[cfg(feature = "dev-pegviz")]
mod pegviz {
pub fn marker_start(source: &str) {
println!("[PEG_INPUT_START]\n{}\n[PEG_TRACE_START]", source);
}
pub fn marker_stop() {
println!("[PEG_TRACE_STOP]");
}
}
#[cfg(not(feature = "dev-pegviz"))]
mod pegviz {
pub fn marker_start(_: ... | Rust | 0 |
;
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
bindings
.write_to_file(out_path.join("c_runtime_api.rs"))
.expect("Unable to write bindings.");
}
<reponame>ruyi-rs/ur<gh_stars>0
use std::cmp;
use std::io::Result;
use std::mem::{self, MaybeUninit};
use std::rc::Rc;
use bitflags::bitflags;
u... | Rust | 0 |
NUM,
STR,
IDENT,
VARDEF,
LVAR, // Local variable reference
GVAR, // Global variable reference
DEREF, // pointer dereference ("*")
ADDR,
SIZEOF,
CALL,
FUNC,
FOR,
OPE(char),
IF,
LOGOR,
... | Rust | 0 |
# Copyright 2013 Google, Inc. All Rights Reserved.
#
# Google Author(s): Behdad Esfahbod, Roozbeh Pournader
from fontTools.ttLib.tables.DefaultTable import DefaultTable
import logging
log = logging.getLogger("fontTools.merge")
def add_method(*clazzes, **kwargs):
"""Returns a decorator function that adds a new ... | Python | 1 |
.filter(missingfood__lte=missing)
self._queryset = self._queryset.distinct().filter(id__in=makenow_recipes.values('id'))
@staticmethod
def __children_substitute_filter(shopping_users=None):
children_onhand_subquery = Food.objects.filter(path__startswith=OuterRef('path'), depth__gt=OuterRef('dep... | Python | 1 |
# The Leginon software is Copyright under
# Apache License, Version 2.0
# For terms of the license agreement
# see http://leginon.org
#
# $Source: /ami/sw/cvsroot/pyleginon/leginon.gui.wx/Node.py,v $
# $Revision: 1.30 $
# $Name: not supported by cvs2svn $
# $Date: 2005-04-21 00:39:19 $
# $Author: suloway $
# $State: Ex... | Python | 1 |
. Note that serialize_reports is not the inverse of ReportParser.parse
/// for scaled Values.
pub fn serialize_reports(reports: &Vec<Report>, mut buffer: &mut [u8]) -> usize {
let field_types = reports[0].values.iter().map(|v| get_scalar_type(v)).collect();
// Make sure the buffer has enough sp... | Rust | 0 |
from]` is a valid index.
fn decode_utf8<const ALLOW_SURROGATES: bool>(
src: &[u8],
from: &mut usize,
ch: u8,
) -> Result<u32, UTFError> {
if !is_utf8(ch) {
*from += 1;
Ok(ch as u32)
} else {
decode_utf8_slow_path::<ALLOW_SURROGATES>(src, from, ch as u32)
}
}
/// @param c... | Rust | 0 |
lambda ep: ep % 25 == 0))
agent = DQNAgent(env=env, copy_period=copy_period, lr=lr)
history = agent.play(episodes=401)
plt.plot(range(len(history)), history)
plt.plot([0, 400], [195, 195], "--", color="darkred")
plt.xlabel("episodes")
plt.ylabel("Total Reward")
plt.savefig(monitor_dir / "d... | Python | 1 |
ased on the seccomp_action value
pub fn get_seccomp_filter(
seccomp_action: &SeccompAction,
thread_type: Thread,
) -> Result<BpfProgram, Error> {
match seccomp_action {
SeccompAction::Allow => Ok(vec![]),
SeccompAction::Log => SeccompFilter::new(
get_seccomp_rules(thread_type).in... | Rust | 0 |
ll fails.
"""
if not self._initialized or not self.client:
raise RuntimeError("OpenAIService is not initialized.")
model = kwargs.get("model", self.default_model)
logger.debug(f"Sending messages to OpenAI model {model}...")
# Filter kwargs to pass only valid param... | Python | 1 |
d");
return Err(ProgramError::IncorrectProgramId);
}
let mut batch_data = Batch::try_from_slice(&batch_account.data.borrow())?;
let mut farm_data = Farm::try_from_slice(&farm_account.data.borrow())?;
let mut distributor_data = Distributor::try_from_slice(&distributor_account.data.borrow())?;
let mut selle... | Rust | 0 |
def _forward():
with amp_autocast():
output = model(input)
loss = loss_fn(output, target)
if model_kd is not None:
if not args.use_kd_loss_only:
loss += args.alpha_kd * compute_kd_loss(input, output,
model, model_kd)
else:
... | Python | 1 |
from json import load
from os.path import abspath
from pathlib import Path
from typing import Any, List
import click
import pandas
from pandas import DataFrame
from progress.bar import Bar
def loadJSONData(filepath: Path) -> List[dict[str, Any]]:
data: List[dict[str, Any]] = []
with open(file=filepath, mode... | Python | 1 |
osestPoints::Disjoint
}
}
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the M... | Rust | 0 |
import json
import hashlib
from os import listdir
from os.path import isfile, join
path = join('..','data') #folder containing files
def getHash(fname):
hash = hashlib.sha256()
with open(fname, "rb") as f:
for chunk in iter(lambda: f.read(4096), b""):
hash.update(chunk)
f.close()
... | Python | 1 |
ACTION_FROM_JS = None;
}
result
}
#[cfg(target_arch = "wasm32")]
#[js_export]
fn toggle_help() {
unsafe { ACTION_FROM_JS = Some(AppAction::ToggleHelp); }
}
#[cfg(target_arch = "wasm32")]
#[js_export]
fn init_config(config_int: i32) -> bool {
let config = match config_int {
1 => LorenzConfi... | Rust | 0 |
ne>,
}
/// ProverSRS is the specialized SRS version for the prover for a specific number of proofs to
/// aggregate. It contains as well the commitment keys for this specific size.
/// Note the size must be a power of two for the moment - if it is not, padding must be
/// applied.
#[derive(Clone, Debug)]
pub struct Pr... | Rust | 0 |
cupied.init();
let mut step_cmds = Vec::new();
for &pos in positions.iter() {
occupied[pos] = true;
}
// eprintln!("{:?}", positions);
for (pos, mut cmds) in positions.iter_mut().zip(cmdss.iter_mut()) {
let cmd = cmds.pop_front().unwrap_or(Command::Wait... | Rust | 0 |
);
let boundary = Shape::build_boundary(&squares, &mask);
let mut squares = squares.clone();
squares.sort();
Shape { width: w, height: h, squares: squares, mask: mask, boundary: boundary, }
}
// finds (width, height) of the square coordinate list
fn extents(squares: &Vec<Vec... | Rust | 0 |
mizer_config,
cfg.checkpoint_config,
cfg.log_config,
cfg.get('momentum_config', None),
custom_hooks_config=cfg.get('custom_hooks', None))
if distributed:
runner.register_hook(DistSamplerSeedHook())
# register eval hooks
if validate:
val_datasets = [v for k, ... | Python | 1 |
- 5));
p = _mm_or_si128(_mm_slli_epi32(p, 14), _mm_srli_epi32(p, 32 - 14));
e = _mm_xor_si128(e, p);
a = _mm_xor_si128(a, e);
b = _mm_xor_si128(b, e);
c = _mm_xor_si128(c, e);
b = _mm_shuffle_epi32(b, 0x93);
... | Rust | 0 |
ylist, MediaPlaylistType, MediaSegment};
//!
//! fn main() {
//! let playlist = MediaPlaylist {
//! version: 6,
//! target_duration: 3.0,
//! media_sequence: 338559,
//! discontinuity_sequence: 1234,
//! end_list: true,
//! playlist_type: Some(MediaPlaylistType::Vod)... | Rust | 0 |