text
string
label_name
string
labels
int64
_BANK0, c.device.PADS_BANK0, sio.gpio_bank0, &mut resets, ); let gpio27 = pins.gpio27; let gpio26 = pins.gpio26; let gpio22 = pins.gpio22; let gpio20 = pins.gpio20; let gpio23 = pins.gpio23; let gpio21 = pins.gpio21; l...
Rust
0
NB somehow, Rust's IpAddr accepts "127.0.0" and adds the extra 0.. ]; for u in &invalid_urls { if let Ok(b) = Builder::new().url(*u) { let tp = b.build(); panic!("expected error for url {}, got {:?}", u, tp); } } } #[test] fn c...
Rust
0
odel_path_a, framework="pt", device="cpu") as f: for k in f.keys(): model_a_weight[k] = f.get_tensor(k) model_b_weight = {} with safe_open(model_path_b, framework="pt", device="cpu") as f: for k in f.keys(): model_b_weight[k] = f.get_tensor(k) merged_model_weight = ...
Python
1
from django.db import models from django.contrib.auth.models import User class Customer(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) phone_number = models.CharField(max_length=15, blank=True) access_token = models.TextField(null=True, blank=True) refresh_token = models.Te...
Python
1
import torch import pickle import numpy as np import scipy.sparse as sp device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') # # Load homophily and heterophily graph datasets def load_data(dataset): adj = pickle.load(open(f'../data/graphs/{dataset}_adj.pkl', 'rb')) features = pickle.load(op...
Python
1
# -*- coding: utf-8 -*- import numpy as np import matplotlib.pyplot as plt from sklearn.cluster import KMeans def computeKmeans(totalOfClusters): X = np.loadtxt('canal_youtube.txt', delimiter=',') model = KMeans(init='random', n_clusters=totalOfClusters, n_init = 10) model.fit(X) #x represen...
Python
1
spile(&self, scope: &Scope) -> anyhow::Result<Self::Output> { match self { RefOr::InterfaceRef(r) => Ok(RefOr::Ref(r.transpile(scope)?)), RefOr::Ref(r) => Ok(RefOr::Ref(r.transpile(scope)?)), RefOr::Value(val) => Ok(RefOr::Value(val.transpile(scope)?)), } } } ///...
Rust
0
r { // Preset IDs PresetPart1, PresetPart2, PresetPart3, PresetPart4, // MIDI channels ChannelPart1, ChannelPart2, ChannelPart3, ChannelPart4, // Volumes VolumePart1, VolumePart2, VolumePart3, VolumePart4, // Balances BalancePart1, BalancePart2,...
Rust
0
` twice.", rust, ); } if let Some(id) = *WithSizedTypeIds::<T>::VEC_ID { let rust = core::any::type_name::<T>().to_string(); assert_eq!( map.insert(RustSqlMapping { sql: set_sql.clone(), rust: ru...
Rust
0
) pretty = pretty_vcproj argv = [ '', project_path, '$(SolutionDir)=%s\\' % os.path.dirname(sys.argv[1]), ] argv.extend(sys.argv[3:]) pretty.main(argv) def main(): # check if we have exactly 1 parameter. if len(sys.argv) < 2: print 'Usage: %s "c:\\path\\to\...
Python
1
import random mid_names_f = [ '玉', '星', '兰', '芳', '华', '美', '红', '英', '秀', '萍', '梅', '莲', '菊', '桂', '珍', '珠', '琼', '瑶', '洁', '静', '淑', '惠', '慧', '敏', '玲', '娜', '倩', '娟', '艳', '霞', '娥', '仙', '凤', '春', '秋', '冬', '夏', '香', '云', '月', '虹', '彩', '梦', '思', '诗', '琴', '书', '画', '歌', '舞', '竹', '松', '柏', ...
Python
1
in range(len(conditions[0])): if conditions[0][i] == '': continue sentence3 += f'{conditions[0][i]}, ' sentence3 = sentence3[:-2] + '\n' sentence4 = 'Procedures: ' for i in range(len(procedures[0])): ...
Python
1
nch`. Each point is a new series containing 10 tag keys, which results in // ten columns in IOx. There is a single field column and a timestamp column. // // - tag0, cardinality 2. // - tag1, cardinality 10. // - tag2, cardinality 10. // - tag3, cardinality 50. // - tag4, cardinality 100. // // In total there...
Rust
0
json=json.loads(json.dumps(restart_ns_message)), ) return "Restaring the NS", 200 elif failing_ns_action == "stop_slice": # Scenario 3 r_url = f"http://katana-nbi:8000/api/slice/{slice_id}" r = re...
Python
1
now(), } } pub fn to_like_db(&self, tweet_id: Uuid) -> LikeDB { LikeDB { id: Uuid::from_str(self.id.as_str()).unwrap(), created_at: self.created_at.naive_utc(), tweet_id, } } } #[table_name = "likes"] #[derive(Queryable, Insertable)] pub struct L...
Rust
0
Backend, ExecutorProvider}; use sc_consensus_aura::{ImportQueueParams, SlotProportion, StartAuraParams}; pub use sc_executor::NativeElseWasmExecutor; use sc_executor::NativeExecutionDispatch; use sc_finality_grandpa::SharedVoterState; use sc_keystore::LocalKeystore; use sc_network::Event; use sc_rpc::SubscriptionTaskEx...
Rust
0
job => { if let Ok(creep) = self.creep() { creep.say("wut job??", false); } bail!("OokCreepWorker::do_task unknown job {:?}", job); } }, } Ok(DoJobResult::None) } } impl RoomBound<...
Rust
0
\x00Holmeses, success in the province of detective work must always sherlock\x00be, to a very large extent, the result of luck. <NAME> sherlock\x00can extract a clew from a wisp of straw or a flake of cigar ash; "; assert_eq!(lines, expected); }); // See: https://github.com/BurntSushi/ripgrep/issues/109 clean!(fea...
Rust
0
} /// Appends an item to `media_streams`. /// /// To override the contents of this collection use [`set_media_streams`](Self::set_media_streams). /// /// The media streams that you added to the flow. pub fn media_streams(mut self, input: impl Into<crate::model::Medi...
Rust
0
ec<Stock>; impl Stock { pub fn new(symbol: String, stype: StockType, date: LocalDate, quantity: u32, base_price: Price) -> Stock { Stock { symbol, stype, date, quantity, base_price, ...
Rust
0
self.script_info = script_generation(self.script_info,template_name,key_replacement) info_alert("mat",msg_info) @staticmethod # 通过科学计数法表示数据 def format_data(data): if isinstance(data, list): if isinstance(data[0], list): return [[f'{x:.2e}' for x in sublist] f...
Python
1
compatible with --detach or --detach-pem" ) return # everything else doesn't apply if use_pades_lta: use_pades = with_validation_info = True if not timestamp_url: raise click.ClickException( "--timestamp-url is required for --use-pades-lta" ...
Python
1
the /// provided writer function. /// /// Returns the result of the invoked body. pub fn with_writer<T, F, W>(&mut self, writer: W, body: F) -> T where F: FnOnce(&mut ActiveBlueNRG) -> T, W: Fn(&[u8], &[u8]) -> nb::Result<(), Error>, // Writer type alias { let mut active...
Rust
0
.chars() { event_sink.push_window_event(WindowEvent::ReceivedCharacter(ch), window_id); } } } KeyboardEvent::Modifiers { modifiers } => { let modifiers = ModifiersState::from(modifiers); if let Some(window_id) = inner.target_window_...
Rust
0
# 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
is_palindrome_range(s, 4, 16) -> "ccbebaeeabebc" -> c==c -> True # is_palindrome_range(s, 5, 15) -> "cbebaeeabeb" -> c==b -> False # Let's try a simpler long case: "aguokepatgbnvfqmgmlcupuufxoohdfpgjdmysgvhmvffcnqxjjxqncffvmhvgsymdjgpfdhooxfuupuculmgmqfvnbgta" # This should be tr...
Python
1
from pathlib import Path from langchain_core.output_parsers.base import BaseOutputParser from langchain_core.output_parsers.string import StrOutputParser from langchain_core.prompts import ( BasePromptTemplate, ChatPromptTemplate, SystemMessagePromptTemplate, ) from langchain_graphrag.types.prompts import...
Python
1
4usize], u32> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = Default::default(); __bindgen_bitfield_unit.set(0usize, 31u8, { let max: u32 = unsafe { ::std::mem::transmute(max) }; max as u64 }); __bindgen_bitfield_unit.se...
Rust
0
/// Copy the specified region of light data. pub fn update(&mut self, space: &Space, region: Grid) -> Result<(), TextureError> { let mut data = Vec::with_capacity(region.volume()); // TODO: Enable circular operation and eliminate the need for the offset of the // coordinates (texture_gr...
Rust
0
#!/usr/bin/env python """ Pega os dados brutos da IMU xacc: [mG] yacc: [mG] zacc: [mG] xgyro: [mrad/s] ygyro: [mrad/s] zgyro: [mrad/s] xmag: [mgauss] ymag: [mgauss] zmag: [mgauss] """ from pymavlink import mavutil master = mavutil.mavlink_connection('127.0.0.1:14550') while True: msg = master.recv_match() ...
Python
1
let mut past_target = false; for chunk in &manifest.chunks { if past_target { break; } let lis = self.read_chunk(&chunk.ledger_infos).await?; ensure!( chunk.first_epoch + lis.len() as u64 == chunk.last_epoch + 1, ...
Rust
0
// If a thread panics while holding this lock, the writer within should still be usable. // (we might get an incomplete log line or something like that). Err(poisoned) => poisoned.into_inner(), } } pub fn update_metric_with_elapsed_time(metric: &SharedMetric, start_time_us: u64) -> u64 { let de...
Rust
0
# coding=utf-8 """ Test unit, using more complex graph made in bpmn.io editor for import/export operation """ import os import unittest import bpmn_python.bpmn_diagram_visualizer as visualizer import bpmn_python.bpmn_diagram_rep as diagram class CamundaComplexTests(unittest.TestCase): """ This class contains...
Python
1
_value(true) ) .arg(Arg::with_name("mqtt_filter_val") .long("mqtt_filter_val") .value_name("MQTT_FILTER_VAL") .help("If provided under daemon command, along with 'mqtt_filter_key' requires certain value of JSON payload property") .takes_value(true) ...
Rust
0
m> { if let Some(lambda_ctx) = self.ctx_stack.lambda_ctx() { if lambda_ctx.is_fn { Ok(HirReturnFrom::Fn) } else if self.ctx_stack.method_ctx().is_some() { Err(error::program_error( "`return' in a block is not supported (#266)", ...
Rust
0
""" ** deeplean-ai.com ** ** dl-lab ** created by :: GauravBh1010tt """ import sys sys.path.append("..\_deeplearn_utils") import model import wiki_utils as wk from dl_text.metrics import eval_metric from dl_text import dl glove_fname = 'K:/workspace/neural network/Trec_QA-master/glove.6B.50d.txt' ##################...
Python
1
""" 문제 설명 XX게임에는 피로도 시스템(0 이상의 정수로 표현합니다)이 있으며, 일정 피로도를 사용해서 던전을 탐험할 수 있습니다. 이때, 각 던전마다 탐험을 시작하기 위해 필요한 "최소 필요 피로도"와 던전 탐험을 마쳤을 때 소모되는 "소모 피로도"가 있습니다. "최소 필요 피로도"는 해당 던전을 탐험하기 위해 가지고 있어야 하는 최소한의 피로도를 나타내며, "소모 피로도"는 던전을 탐험한 후 소모되는 피로도를 나타냅니다. 예를 들어 "최소 필요 피로도"가 80, "소모 피로도"가 20인 던전을 탐험하기 위해서는 유저의 현재 남은 피로도는 80 이상 이어야 ...
Python
1
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
Python
1
_string().into(), self.nepisodes.to_string().into(), ] } } #[derive(Debug, Clone)] pub struct MovieCollection { pub config: Config, pub pool: PgPool, pub stdout: StdoutChannel<StackString>, } impl Default for MovieCollection { fn default() -> Self { Self::new( ...
Rust
0
T `isDel`=1 WHERE id=%s" resp_success['message'] = '提测已被删除!' else: resp_failed.message = '状态标记错误' return resp_failed cursor.execute(sql, reqbody['id']) connection.commit() return resp_success @test_manager.route("/api/report/upload",methods=['POST']) de...
Python
1
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-ITSM 蓝鲸流程服务 available. Copyright (C) 2025 Tencent. All rights reserved. BK-ITSM 蓝鲸流程服务 is licensed under the MIT License. License for BK-ITSM 蓝鲸流程服务: -------------------------------------------------------------------- ...
Python
1
t row = g.push_row(); row.push("AAA"); row.push("BBB"); row.push("CCC"); } g.set_column_separators(vec![true, true]); println!("{:?}", vec![true, true]); println!("{}", g); g.set_column_separators(vec![false, true]); println!("{:?}", vec![false, true]); println!("{}"...
Rust
0
#!/usr/bin/env python # -*- coding: utf-8 -*- """ 전국 17개 시도 장기요양기관 다운로드 - Headless 버전 백그라운드에서 빠르게 실행 (실무용, 자동화용) """ import asyncio import sys import os sys.path.append(os.path.dirname(os.path.abspath(__file__))) from download_all_regions_final_working import FinalRegionDownloader async def main(): """Headless 모...
Python
1
# ============================================================================ # Logging Configuration Section # ============================================================================ # Sets up different loggers for various aspects of the application: # - Main application logger: Tracks overall application flow a...
Python
1
hs_llty); if lhs_sz < rhs_sz { trunc(rhs, lhs_llty) } else if lhs_sz > rhs_sz { // FIXME (See discussion at #1570): If shifting by negative // values becomes not undefined then this is wrong. zext(rhs, lhs_llty) } else { rhs } ...
Rust
0
from __future__ import annotations from random import randint from .constants import LOST_MSG, NUM_ATTACKS, WIN_MSG from .models.superhero import SuperHeroModel from .models.villain import VillainModel from .schemas.game_state import GameState from .schemas.life import Life from .schemas.player import Player from .sc...
Python
1
text("NOT") .append(doc.space().append(inner.describe(doc)).nest(2)) .group(), ), }, }, Predicate::Predicate(pred, desc) => { if pred(t) { None } else {...
Rust
0
e byteorder; extern crate enclave_runner; extern crate libc; extern crate sgxs_loaders; use self::aesm_client::AesmClient; use self::enclave_runner::usercalls::{SyncListener, SyncStream, UsercallExtension}; use self::enclave_runner::EnclaveBuilder; use self::sgxs_loaders::isgx::Device as IsgxDevice; use self::byteorde...
Rust
0
.clicks}") .. output:: https://doc-fragment-rerun.streamlit.app/ height: 400px """ return _fragment(func, run_every=run_every) @overload def experimental_fragment( func: F, *, run_every: int | float | timedelta | str | None = None, ) -> F: ... # Support being able to pass p...
Python
1
raction(1)]) p = poly.Polynomial(coefs) assert_equal(self.as_latex(p), '$x \\mapsto 1/2 + 1\\,x$') SWITCH_TO_EXP = ( '1.0 + (1.0e-01) x + (1.0e-02) x**2', '1.2 + (1.2e-01) x + (1.2e-02) x**2', '1.23 + 0.12 x + (1.23e-02) x**2 + (1.23e-03) x**3', '1.235 + 0.123 x + (1.235e-02) x**2 + (1....
Python
1
RVER, &IID_IWbemLocator, &mut wbem_locator_c_void ) { S_OK => (), error_code => { Win32_CoUninitialize(); return Err(WinfetchError(format!("failed to initialize com library; error code: {}", error_...
Rust
0
to_winresult( unsafe { gdi32::MoveToEx( self.ptr, x, y, pt.map_or(std::ptr::null_mut(), |lp| lp as *mut _ as _), ) }, ) } /// [`PatBlt`](https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-patblt) /// method. pub fn PatBlt(self, top_left: POINT, sz: SI...
Rust
0
""" Configurazione globale per MarketMover Radar. """ import os from dotenv import load_dotenv # Carica variabili d'ambiente dal file .env load_dotenv() # Configurazione API COINGECKO_API_KEY = os.getenv("COINGECKO_API_KEY", "") BINANCE_API_KEY = os.getenv("BINANCE_API_KEY", "") BINANCE_API_SECRET = os.getenv("BINANC...
Python
1
import os, fnmatch, random, datetime, numpy as np, pandas as pd, pylab as plt import datashader as das, dask.array as da from glob import glob from zipfile import ZipFile from satpy.scene import Scene root = '/share/data/2pals/jim/data/' met0_central = 0 india_central = 45.5 him_central = 140.7 goes17_central ...
Python
1
VX", "WX", "rDI", "MRBX", "ES", "CS", "SS", "DS", "FS", "GS", "AL", "CL", "AX", "DX", "EAX", "RAX", "ST", "STi", "r8_rb", "r16_rw", "r32_rd", "r64_ro", ]; impl fmt::Debug for LegacyOpKind { #[inline] fn fmt<'a>(&self, f: &mut fmt::Formatter<'a>) -> fmt::Result { write!(f, "{}", GEN_DEBUG_LEGACY...
Rust
0
# Copyright (C) 2018 Collin Capano, Josh Willis # # 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 3 of the License, or (at your # option) any later version. # # This program is di...
Python
1
Async(0x0101, 0x0001, lambda_21C4) ChrSetSubChip(0x0101, 3) ChrSetChipByIndex(0x0101, 1) WaitForThreadExit(0x0101, 0x0002) Sleep(1000) ChrSetSubChip(0x0101, 2) Sleep(100) ChrTalk( 0x0101, ( '#0010330493V#1007F呜呜……\n', '手麻掉了~……', TxtCtl.E...
Python
1
", 0.000000000000000000000000000000007609999999))); } pub fn float_literal<'a, E: ParseError<&'a str>>(input: &'a str) -> IResult<&'a str, f64, E> where E: FromExternalError<&'a str, std::num::ParseFloatError>, { let (input, _) = crate::comments::space_or_comment0(input)?; let (input, f) = fz_float(input)?...
Rust
0
g['ram'] os_type = self.vm_cfg['os_type'] variant = self.vm_cfg['os_variant'] mac = vm.get_mac_for_serviceinstance(vm_name) self.__mutable_virt_install(os_type, variant, vm_name, cpus, ram, local_disk_path, mac) def _destroy_existing(self): try: cur_vm = self.vmm...
Python
1
import re from functools import lru_cache from .._compat.typing import Callable __all__ = ['get_glob_matcher'] GLOB_RE = re.compile(r"""(?x)( \* | \? | \[ .*? \] )""") @lru_cache() def get_glob_matcher(pattern: str) -> Callable[[str], bool]: if pattern.startswith('/'): pattern = pattern[1:...
Python
1
(1, connection.as_ptr(), bus.as_ptr(), callback); /// assert!(!slave.is_null()); /// spi_close(&mut slave as *mut *mut SPIHandle); /// ``` pub fn spi_init_slave( cs: u8, connection: *const c_char, bus: *const c_char, callback: extern "C" fn(SPIDirection, *mut u8, usize) -> usize, ) -> *mut SPIHandle { ...
Rust
0
# # MLDB-1142-sparse-mutable-failing-with-underflow.py # mldb.ai inc, 2015 # This file is part of MLDB. Copyright 2015 mldb.ai inc. All rights reserved. # import datetime import random from mldb import mldb def load_kmeans_dataset(): """A dataset with two 'time slices' - a slice with two clear clusters along...
Python
1
#{ # Driver Code Starts #Initial Template for Python 3 # } Driver Code Ends class Solution: def totalCount(self, k, arr): total_chunks = 0 for num in arr: # Calculate the number of chunks for each num total_chunks += (num + k - 1) // k return total_chunks #{ ...
Python
1
[pred_synced_frame] = evaluator.inference([X], profile_export=None) pred_synced_frame = np.argmax(pred_synced_frame) if drive_number not in metrics: metrics[drive_number] = { 'true': 0, 'false': 0, ...
Python
1
"台灣積體製造股份有限公司", "TW0002330000", "1994/09/05", "上市", "半導體業", "ESVUFR") ] with patch('tw_stock_agent.tools.stock_code.fetch_data', return_value=mock_data): to_csv(TWSE_EQUITIES_URL, str(test_file)) with open(test_file, encoding='utf-8') as f: content = f.read() assert "台灣積體製...
Python
1
"floortile_no_white1": floortile_no_white1, "floortile_no_white1a": floortile_no_white1a, "floortile_disconnected_tile1": floortile_disconnected_tile1, "floortile_disconnected_tile1a": floortile_disconnected_tile1a, "floortile_one_color_one_robot1": floortile_one_col...
Python
1
"), Some(1)); assert_eq!(map.remove(&"d"), Some(3)); assert_eq!(map.remove(&"c"), Some(1)); assert_eq!(map.remove(&"z"), None); assert_eq!( map, BTreeMapWithTimestamps::from([("b", 1), ("e", 5), ("f", 9)]) ); } #[test] fn extend_with_timestam...
Rust
0
"""Guardian agent that performs a basic integrity check.""" from __future__ import annotations from pathlib import Path class Guardian: """Verifies that the memory directory exists and is readable.""" def __init__(self, memory_dir: str | Path) -> None: self.memory_path = Path(memory_dir) def ve...
Python
1
from langchain_openai import ChatOpenAI from langchain_openai import OpenAI from langchain.base_language import BaseLanguageModel import google.generativeai as genai import os import streamlit as st class Models: @staticmethod def get_model(model_name: str, **kwargs) -> BaseLanguageModel: # Get API key...
Python
1
nce(m, nn.Conv2d): nn.init.kaiming_normal_(m.weight, mode = 'fan_out', nonlinearity = 'relu') if m.bias is not None: nn.init.constant_(m.bias, 0) elif isinstance(m, nn.BatchNorm2d): nn.init.constant_(m.weight, 1) nn.init.con...
Python
1
");\n```\n\nRequires `allow-plugin` permission.\n\nThe plugin system is not stable and will change in the future, hence the\nlack of docs. For now take a look at the example\nhttps://github.com/denoland/deno/tree/main/test_plugin" ], "range":{ "start":{ "line":0, "character":17 ...
Rust
0
Num_1 = int(input("Enter first number")) Num_2 = int(input("Enter second number")) Oper = str(input("Enter operation")) if Oper == "+": print(Num_1 + Num_2) elif Oper == "-": print(Num_1 - Num_2) elif Oper == "*": print(Num_1 * Num_2) elif Oper == "/": if Num_2 == 0: print("cannot be divided by...
Python
1
5.66,9.5,5.25,9.5H3.56L9.5,3.56V5.25z"/></g></svg> </svg> } } } <reponame>junha1/baselink-rs<filename>remote-trait-object-tests/benches/bench1.rs use criterion::{black_box, criterion_group, criterion_main, Criterion}; use remote_trait_object_tests::{massive_no_export, massive_with_export}; pu...
Rust
0
from collections import deque armor_values = deque([int(x) for x in input().split(",")]) striking_impact = [int(x) for x in input().split(",")] monsters_killed = 0 while len(armor_values) > 0 and len(striking_impact) > 0: first_armour_value = armor_values.popleft() last_striking_value = striking_impact.pop() ...
Python
1
ps[1]); in_points2d.push(in_tri2d.ps[1]); in_uvs.push(in_tri.uvs[1]); in_ns.push(in_tri.ns[1]); } else { out_points.push(in_tri.ps[1]); out_points2d.push(in_tri2d.ps[1]); out_uvs.push(in_tri.uvs[1]); out_ns.push(in_tri.ns[1]); } if d2 >= 0.0 { ...
Rust
0
NTE", "DLRpB", "EZH", "VSNTD", "EPE", "RMX", "TEKCC", "APK", "EASYE", "EQRpB.CL", "FMXIE", "HPB", "LERA", "PROSE", "SWAT", "SWATW", "BBC", "COFw", "HOSTE", "MGU", "OLA", "OLGRE", "TGM", "BJSw", "NFSpA.CL", "PXSL", "FBFpK.CL", "LTYKV", "SNQ", "GJN", "IFCpO.CL",...
Rust
0
-------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ( master_doc, "PyCLibrary", "PyCLibrary Documentation", author, "PyCLibrary", ...
Python
1
onships where both tables are selected if referred_table in table_names: relationship = { 'from_table': table_name, 'to_table': referred_table, 'from_columns': fk['constrained_columns'], ...
Python
1
std::task; use async_std::prelude::*; use std::thread; use tokio; use async_std::net::TcpStream; use bincode::*; use byteorder::*; use lazy_static::lazy_static; use std::sync::Mutex; const CREATE_NO_WINDOW: u32 = 0x08000000; const DETACHED_PROCESS: u32 = 0x00000008; lazy_static! { pub static ref AGENT: Mutex<Age...
Rust
0
rust /// let item1 = 2; /// let item2 = 3; /// let mut vec: Vec<u8> = vec![item1; 20]; /// vec.resize(20 + 30, item2); /// ``` pub SAME_ITEM_PUSH, style, "the same item is pushed inside of a for loop" } declare_clippy_lint! { /// **What it does:** Checks whether a for loop has a sin...
Rust
0
wo; } // Step 2 | let n_sqrt = n.clone().sqrt_rem().unwrap().0; for mut i in three..n_sqrt { while n.is_multiple_of(&i) { n = n / &i; } i = i + &two; } // Step 3 if n > two { return Some(n); ...
Rust
0
"""Index factories for efficient search (clustering)""" import numpy as np import faiss class FaissL2Index: """Faiss factory for indexes on cpu""" @staticmethod def _faiss_index_flat(dim): """Return initialized faiss.IndexFlatL2""" return faiss.IndexFlatL2(dim) def cluster(self, poi...
Python
1
af: leaf, childs: childs, persistent_ref: None, }; match self.hash_index.reserve(&hash_entry) { hash::ReserveResult::HashKnown(id) => { debug!( "Reuse hash {}, {}/{:?}: {}", id, leaf as u64, ...
Rust
0
(sender: &broadcast::Sender<Event>, e: Event) -> () { match sender.send(e) { Ok(_) => (), Err(broadcast::error::SendError(_)) => { event!(Level::ERROR, "EventChannel is full out of cache!"); std::process::exit(101); } } } extern crate reqwest; #[macro_use] extern...
Rust
0
&[buf[i]])); } } RGB(8) => try!(self.w.write_all(buf)), RGB(16) => try!(self.w.write_all(buf)), RGBA(8) => { for x in buf.chunks(4) { let _ = try!(self.w.write_all(&[x[0]])); let _ = try!(self.w.w...
Rust
0
- - - - - - - - - - - - - - - 6 - - - 5 - - - 7 - - - - - - - - - - - - - - - - - - - - - - 4 - - - - - - - - - - - - - - - - - 1 - - - - "#; let board = Board::from_str(str); let digits = board.get(RowIndex(3)).cells.map(|c| c.digit); assert_eq!( [ Some(Digit::Six), None, ...
Rust
0
] #[rustc_legacy_const_generics(3)] #[stable(feature = "neon_intrinsics", since = "1.59.0")] pub unsafe fn vfmsd_laneq_f64<const LANE: i32>(a: f64, b: f64, c: float64x2_t) -> f64 { vfmad_laneq_f64::<LANE>(a, -b, c) } /// Divide #[inline] #[target_feature(enable = "neon")] #[cfg_attr(test, assert_instr(fdiv))] #[st...
Rust
0
#!/usr/bin/python3 -u # # Copyright (C) 2013 Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright notice, # this lis...
Python
1
); } None } pub fn find_www_path() -> &'static str { let fallback_www_path = "/opt/blueos/mavlink-camera-manager/www"; let source_code_www_path = "./src/html"; let www_paths = vec![ CURRENT_EXECUTION_WWW_PATH.as_str(), source_code_www_path, fallback_www_path, ];...
Rust
0
let mut state_lock = room_state.lock().await; *state_lock = state; } }); self.progress_recv = Some(recv); Ok(()) } /// ユーザーが入力したデータに基づいてサーバーとデータベースに登録する。<br /> /// Register player to the database and server using inputted information. pub async fn ...
Rust
0
nnect() .sense().disabled() }); } else { pac.P1.pin_cnf[(i & 0x1f) as usize].write(|w| { w.dir().input() .drive().s0s1() .pull().disabled() .input().disconnect() .sense().disabled() }); } } } } 120 => { debug!("System OFF"); power.lock(|power| ...
Rust
0
, gamma_test) # check quantization levels size quantlevels_size_test = int(len(quantization_levels)) self.assertEqual(quantlevels_size_test, 49) # check negatives of each element contained # in quantization levels quantlevels_test_list = quantization_levels.tolist() ...
Python
1
(cert_file), ProbeResult { cert_dir, .. } if cert_dir.is_some() => Ok(cert_dir), _ => Err(KafkaConfigError::TlsTrustStore), }?; ClientConfig::new() .set("metadata.broker.list", &config.0.join(",")) .set("group.id", &consumer_group_name) .set("compression.type", "gzip") ...
Rust
0
e: String::from("man_old"), gun: Rect::new(216.0, 0.0, 49.0, 43.0), hold: Rect::new(422.0, 88.0, 35.0, 43.0), machine: Rect::new(213.0, 132.0, 49.0, 43.0), reload: Rect::new(307.0, 44.0, 39.0, 43.0), silencer: Rect::new(55.0, 132.0, 54.0, 43.0), st...
Rust
0
DLE = 11, MPV_EVENT_PAUSE = 12, MPV_EVENT_UNPAUSE = 13, MPV_EVENT_TICK = 14, MPV_EVENT_SCRIPT_INPUT_DISPATCH = 15, MPV_EVENT_CLIENT_MESSAGE = 16, MPV_EVENT_VIDEO_RECONFIG = 17, MPV_EVENT_AUDIO_RECONFIG = 18, MPV_EVENT_METADATA_UPDATE = 19, MPV_EVENT_SEEK = 20, MPV_EVENT_PLAYBACK_...
Rust
0
st, port).parse().unwrap(); let transport = RpcTransport::new(Box::new(node_rpc_addr)); let server = StoreServer::start(id, peers, transport).unwrap(); let server = Arc::new(server); let (server_kill_sender, server_kill_receiver) = oneshot::channel::<()>(); let (message_handle, leader_handle) = { ...
Rust
0
from odoo import models, fields class HMSPatientLog(models.Model): _name = 'hms.patient.log' _description = 'Patient Log History' patient_id = fields.Many2one('hms.patient', required=True) description = fields.Text(required=True) created_by = fields.Many2one('res.users', string="Created By", defau...
Python
1
write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [publish_resultdone](publish_resultdone) module"] pub type PUBLISH_RESULTDONE = crate::Reg<u32, _PUBLISH...
Rust
0
, 2): setattr(NSA, 'elpetro_mag_{0}_{1}'.format(colour_a, colour_b), HybridMethodToProperty('elpetro_colour', colour_a, colour_b)) # Expands elpetro_absmag into independent bands. # TODO: see issue #211 about allowing direct queries on array. If we implement # that we don't need to expand the bands. fo...
Python
1
_hoc_event(pp_info_idx, weight); } } impl Profiler { fn drop_inner(&mut self, memory_output: Option<&mut String>) { let ignore_allocs = IgnoreAllocs::new(); std::assert!(!ignore_allocs.was_already_ignoring_allocs); let phase: &mut Phase<Globals> = &mut TRI_GLOBALS.lock(); match...
Rust
0