text
string
label_name
string
labels
int64
ect("could not run launcher"); // info!("launcher launched : {:?}", res); let outfile = self.cache_dir.clone() + "/fifo_repl/out_file"; let errfile = self.cache_dir.clone() + "/fifo_repl/err_file"; info!("outfile : {:?}", outfile); self.wait_out_file(outfile, errfile, self.curre...
Rust
0
= Tags::default(); tags2.insert("badge-info", TagValue::None); tags2.insert("badges", TagValue::String("staff/1")); tags2.insert( "color", TagValue::Color(u32::from_str_radix("0D4200", 16).unwrap()), ); tags2.insert("display-name", TagValue::String("ronni")); tags2.insert( ...
Rust
0
f.bits >> 18) & 1) != 0) } #[doc = "Gating Clock for CPU, DSP, RISC-V MSGBOX"] #[inline(always)] pub unsafe fn msgbox_gating(&self, n: usize) -> MSGBOX_GATING_R { MSGBOX_GATING_R::new(((self.bits >> n) & 1) != 0) } #[doc = "Bit 0 - Gating Clock for CPU, DSP, RISC-V MSGBOX"] #[inline(...
Rust
0
2] == stops[i+1] + 1 { if stops[i-1] + 1 < stops[i] { stops[i] -= 1; } else { println!("Unable to adjust: {}, {}, {}, {}, {}", i, stops[i-1], stops[i], stops[i+1], stops[i+2]); } ...
Rust
0
# Gmail MCP Service - Sylvie v3 # Logique métier principale from app.services.mcp_decorators import require_google_service from app.services.scopes import SCOPES @require_google_service("gmail", SCOPES["gmail"]) def list_messages(service, query=None, max_results=10): """ Liste les messages Gmail selon une re...
Python
1
) # update leaking rate self._reservoir.setLeakingRate( self._reservoir._leakingRate - learningRate * gradientLR ) # update input scaling self._reservoir.setInputScaling( self._reservoir._inputScaling - learningRate * g...
Python
1
> drop(columns: ["_start", "_stop"]) |> filter(fn: (r) => r.user == "user2") |> group(by: ["_measurement"]) join(tables: {left: left, right: right}, on: ["_time", "_measurement"])"#, ); } #[test] fn option_complete() { assert_unchanged( r#"option task = { name: "foo", every: 1h, de...
Rust
0
ache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/license/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. use std::ffi; use std::fmt; use std::str; u...
Rust
0
e avec succès!".format(database)) # Créez les tables nécessaires def create_tables(): connection = mysql.connector.connect( host=host, user=user, password=password, database=database ) cursor = connection.cursor() cursor.execute(""" CREATE TABLE IF NOT EXISTS user ( ...
Python
1
import pyautogui import mido import time pyautogui.PAUSE = 0 input_table = { 59: ['', '', 'c'], 61: ['', 'right', 'c'], 63: ['down', 'right', 'c'], 64: ['down', '', 'c'], 66: ['down', 'left', 'c'], 68: ['', 'left', 'c'], 70: ['up', 'left', 'c'], 71: ['', '', ''], 73: ['', 'right', '...
Python
1
e: impl AsRef<str>) { let guard = PROGRESS_BAR.write().unwrap(); if let Some(pb) = &*guard { pb.println(message.as_ref()); } else { println!("{}", message.as_ref()); } } <reponame>marc2332/ham use crate::primitive_values::primitive_base::PrimitiveValueBase; use serde::Serialize; use std:...
Rust
0
color.starts_with("rgba") { return parse_rgba(color.as_str()); } if color.starts_with("rgb") { return parse_rgb(color.as_str()); } // TODO: parse hsl & hsla return parse_color_name(color.as_str()); } #[test] fn test_parse_color() { assert_eq!( parse_color("#ffffff").un...
Rust
0
light depending on emissivity) pos, rot, scale = blender.to_photon_pos_rot_scale(b_mesh_object.matrix_world) if material.is_emissive(b_material): light_actor_name = naming.get_mangled_object_name(b_mesh_object, prefix="Emissive") emission_image_name = material.get_emission_image_res_name(b_mat...
Python
1
= &input.metric_name { scope_334.string(var_335); } #[allow(unused_mut)] let mut scope_336 = writer.prefix("Dimensions"); if let Some(var_337) = &input.dimensions { let mut list_339 = scope_336.start_list(false, None); for item_338 in var_337 { #[allow(unused_mut)] ...
Rust
0
source: None, entity: PatternNonValuePlace::Variable(x.clone()), attribute: solitonid("foo", "roz"), value: PatternValuePlace::Constant("idgoeshere".into()), tx: PatternNonValuePlace::Placeholder, }); cc.apply_parsed_parity_filter(known, Pattern...
Rust
0
, V>>, edges: Vec<Edge<T, K, V>>, specs: GraphSpecs, ) -> Result<Graph<T, K, V>, Error> where T: Hash + Eq + Copy + Ord, K: Hash + Eq + Copy, V: Copy, { let node_names = nodes.iter().map(|n| n.name).collect::<HashSet<T>>(); let edges_map = match get_e...
Rust
0
oject_id) if labels: resources_data = list(filter(lambda x: x['body']['label'] in labels, resources_data)) if labels and len(resources_data) < len(labels): fetched_labels = [r['body']['label'] for r in resources_data] not_found_labels = [l...
Python
1
# ****************************************************************************** # Copyright 2017-2018 Intel Corporation # # 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.apa...
Python
1
("{}", x.x()); let c = x.mix_up(Point{x: 'a', y: 'b'}); // this won't work because value was moved by the call above // println!("x: {}, y: {}", x.x, x.y); println!("x: {}, y: {}", c.x, c.y); } <gh_stars>1-10 /* * Asana * * This is the interface for interacting with the [Asana Platform](h...
Rust
0
time object date_obj = datetime.strptime(date, '%Y-%m-%d') # Get the day of the week day_of_week = date_obj.strftime('%A') condition = day['day']['condition']['text'] max_temp = day['day']['maxtemp_f'] min_temp = day['day']['mintemp_f'] ...
Python
1
path!("a"), )?; let ctx = runner.ctx.lock().unwrap(); let segment = ctx.segments().values().next().unwrap(); assert_eq!(segment.range_data(), vec![0xea, 0]); Ok(()) } #[test] fn failing_assertion_with_message() -> MosResult<()> { let mut runner = get_runner( ...
Rust
0
""" Test project disabling function """ url = reverse('email_disable', kwargs=dict(uid=self.owner.pk)) request = fake_request(url=url, data={}, user=self.owner) json_response = ajax.email_disable(request, uid=self.owner.pk) self.process_response(json_response) ...
Python
1
import numpy import algopy def O_tilde(u): """ this is the objective function""" M = numpy.shape(u)[0] h = 1./(M-1) return M**2*h**2 + numpy.sum(0.25*( (u[1:,1:] - u[0:-1,0:-1])**2 + (u[1:,0:-1] - u[0:-1, 1:])**2)) # INITIAL VALUES M = 30 h = 1./M u = numpy.zeros((M,M),dtype=float) u[0,:]= [numpy.s...
Python
1
expose shared state. /// /// For the most part, the only method you should be using regularly is `render`. /// /// ## Example /// /// ```ignore /// #[derive(Props)] /// struct ExampleProps { /// name: String /// } /// /// fn Example(cx: Scope<ExampleProps>) -> Element { /// cx.render(rsx!{ div {"Hello, {cx.pro...
Rust
0
token: String, #[serde(default)] github: bool, } #[derive(Deserialize, Debug)] struct Body { #[serde(default)] activity: String, #[serde(default)] content: String, #[serde(default = "Body::default_channel")] channelID: u64, } impl Body { fn default_channel() -> u64 { 544557...
Rust
0
import os import requests from xml.etree import ElementTree as ET from transformers import pipeline def fetch_pubmed_articles(query, max_results=5): # Step 1: Search for PubMed IDs search_url = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi" search_params = { "db": "pubmed", "t...
Python
1
def printinfo(name, age): "This prints a passed infor into this functions." print("Name: ", name) print("Age: ", age) # call by positional arguments printinfo("Hieu", 24) # call by keyword arguments printinfo(name="Hieu", age=24) printinfo("Hieu", age=24) #printinfo(name="Hieu", 24) #Positional argument ...
Python
1
sensitivity_model = train_sensitivity_model(training_documents) if sensitivity_model is None: return classified_documents, unclassified_documents = classify_documents_with_enhanced_techniques(documents, keyword_map, sensitivity_model, keyword_weight, model_weight) # Features extrahie...
Python
1
} } fn on_save(&self) { let mut database_data = vec![0u8; database::Database::BYTE_LEN]; self.database.write_bytes(&mut database_data[..]); let crc_a = crc::crc16_ninty(&database_data[0 .. 0xC81E]).to_be_bytes(); database_data[0xC81E .. 0xC820].copy_from_slice(&crc_a); ...
Rust
0
Id), /// This relation feeds the given input relation on the given node. Output(Node, RelId), /// A relation that outputs directly into a sink. Sink(Sink), } /// Configuration of input/output relationships for a single node. pub type NodeCfg = BTreeMap<RelId, BTreeSet<RelCfg>>; /// The configuration o...
Rust
0
s::get_metal_float(self.metal), METAL_SYMBOL, ) } else { write!(f, "{}", EMPTY_SYMBOL) } } } impl<'de> Deserialize<'de> for ListingCurrencies { fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de>, {...
Rust
0
* * This function performs a `GET` to the `/marketplace_listing/stubbed/plans` endpoint. * * As opposed to `list_plans_stubbed`, this function returns all the pages of the request at once. * * Lists all plans that are part of your GitHub Marketplace listing. * * GitHub Apps must ...
Rust
0
# SELECT A.FIRST_NAME, A.LAST_NAME, B.JOBS_TITLE, A.SALARY # FROM EMPLOYEES A ON A.JOBS_ID = B.JOBS_ID # WHERE A.SALARY > SELECT MAX(SALARY) WHERE EMPLOYESS GROUP BY JOB_ID; # ORDER BY A.SALARY DESC # SELECT A.FIRST_NAME, A.LASTNAME, B,JOB_TITLE # FROM EMPLOYEES A JOIN JOBS B ON A.JOB_ID = B.JOB_ID # WHERE A.SALAR...
Python
1
// input size ]; #[async_std::test] async fn gzip_compressed() { let mut app = tide::new(); app.with(tide_compress::CompressMiddleware::with_threshold(16)); app.at("/").get(|_| async move { let mut res = Response::new(StatusCode::Ok); res.set_body(TEXT.to_owned()); res.insert_heade...
Rust
0
from django.apps import AppConfig class AuthPaymentsConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'auth_payments'
Python
1
e": "下载器助手定时服务", "trigger": CronTrigger.from_crontab(cron), "func": self.__run, "kwargs": {} }] else: return [] except Exception as e: logger.error(f"注册插件公共服务异常: {str(e)}", exc_info=True) def...
Python
1
------- x_0 : torch.Tensor Output node features. x_1 : torch.Tensor Output hyperedge features. """ x_0 = self.linear(x_0) x_1 = self.vertex2edge(x_0, incidence_1.transpose(1, 0)) m_1_0 = self.edge2vertex(x_1, incidence_1) x_0 = x_0...
Python
1
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, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or i...
Rust
0
# coding=utf-8 import requests from Exploits import printModule # str( r = '\033[31m' g = '\033[32m' y = '\033[33m' b = '\033[34m' m = '\033[35m' c = '\033[36m' w = '\033[37m' Headers = {'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:28.0) Gecko/20100101 Firefox/28.0'} ShellPresta = 'files/up.php' Jce_Deface_...
Python
1
ge_max, 0) # We update the output range min and max when next node is clip or relu # With this technique we can remove these 2 ops and # reduce the output range which in turn helps to improve accuracy if next_node is not None: if next_node.op_type == "Clip": ...
Python
1
result = HashMap::new(); let mut stack = Vec::new(); for (i, c) in code.iter().enumerate() { match c { b'[' => { stack.push(i); } b']' => { let j = stack.pop().unwrap(); result.insert(i, j); result.inser...
Rust
0
# Copyright (c) 2019 Horizon Robotics. 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 applicab...
Python
1
t = gap["match_score"] st.markdown("**✅ Matched Skills:**", unsafe_allow_html=True) st.markdown("".join([format_badge(skill, "#4CAF50") for skill in matched]), unsafe_allow_html=True) st.markdown("**❌ Missing Skills:**", unsafe_allow_html=True) st.markdown("".join([form...
Python
1
import matplotlib.pyplot as plt from scipy.io import wavfile import os from pydub import AudioSegment # Calculate and plot spectrogram for a wav audio file def graph_spectrogram(wav_file): rate, data = get_wav_info(wav_file) nfft = 200 # Length of each window segment fs = 8000 # Sampling frequencies no...
Python
1
response: numErrors = len(response['error']) if numErrors: message = self.id + ' ' + body for i in range(0, len(response['error'])): error = response['error'][i] self.throw_ex...
Python
1
CAN Frame Data Word 0"] pub data0_cmb14: crate::Reg<data0_cmb14::DATA0_CMB14_SPEC>, #[doc = "0x1d8 - CAN Frame Identifier Word 0"] pub id0_cmb14: crate::Reg<id0_cmb14::ID0_CMB14_SPEC>, #[doc = "0x1dc - CAN Frame Identifier Word 1"] pub id1_cmb14: crate::Reg<id1_cmb14::ID1_CMB14_SPEC>, #[doc = "0...
Rust
0
/// The number of oracles pub fn num_oracles(&self) -> usize { self.row_poly.len() + self.col_poly.len() + self.val_poly.len() + self.read_ts_row.len() + self.write_ts_row.len() + self.audit_ts_row.len() + self.read_ts_col.len() ...
Rust
0
Vector2::new(512.0, 512.0), Vector4::new(0.0, 0.0, 0.0, 1.0), String::from("tah"), String::from("Arial")) ); draw_calls.push( DrawCall::draw_coloured(Vector2::new(width*0.5, height*0.5), ...
Rust
0
eline == True): mock_free_electricity_session_start = current.replace(minute=0, second=0, microsecond=0) target_free_electricity_session = FreeElectricitySession('1', mock_free_electricity_session_start, mock_free_electricity_session_start + timedelta(hours=1)) if (target_free_electricity_session...
Python
1
# Uses python3 def evalt(a, b, op): if op == '+': return a + b elif op == '-': return a - b elif op == '*': return a * b else: assert False def get_maximum_value(dataset): """ As described in the lectures, to get to the maximum value of the expression, we need t...
Python
1
on::to_string_pretty(&config) .expect("could not serialize resilio config to json"); contents = contents.replace(": null", ": undefined"); config_file .write_all(contents.as_bytes()) .expect("could not write resilio config to the temporary config file"); let...
Rust
0
print("\nNO MANA POINTS\n") elif player_arg.mp >= player_arg.combat_spell_slot.mana_cost: enemy_target_arg.hp = player_arg.use_combat_spell(enemy_target_arg) player_move = False elif player_arg.mp < player_arg.combat_spell_slot.mana_cost: ...
Python
1
[0] & (1 << 6) != 0 { // This is the point at infinity, which means that if we mask away // the first two bits, the entire representation should consist // of zeroes. copy[0] &= 0x3f; if copy.iter().all(|b| *b == 0) { Ok(G1Affine::zero()) ...
Rust
0
hwb("hwb(-240deg -100% -50.5%)")); } #[wasm_bindgen_test] fn hwb_alpha() { let expected = Some(Hwb { h: 240.0, w: 100.0, b: 50.5, a: 0.2, }); assert_eq!(expected, get_hwb("hwb(240, 100%, 50.5%, 0.2)")); assert_eq!(expected, get_hwb("hwb(240 100% 50.5% / 0.2)")); asse...
Rust
0
` of a `Write()` action, it indicates /// the initial offset for the `Write()` call. The value **must** be equal to /// the `committed_size` that a call to `QueryWriteStatus()` would return. /// /// On subsequent calls, this value **must** be set and **must** be equal to /// the sum of the first `wr...
Rust
0
8192, 2100); driver.checkpoint("fast pref"); } #[test] fn sparse() { let mut driver = TestDriver::setup("sparse", 1, 1024); let chunk_size = 128 * 1024; driver.checkpoint("empty tree"); driver.insert_random_at( b"foo", StoragePreference::FASTEST, chunk_size, 200, ...
Rust
0
# Usando HTTPx # Alternativa moderna ao requests # Suporte melhor a HTTP/2 # Requer: pip install httpx import httpx def consulta_httpx(prompt, modelo, host): """ Consulta usando HTTPx com suporte a async """ url = f"{host}/api/generate" payload = { "model": modelo, "prompt": prompt,...
Python
1
# start building dense connections dense_x = {} for layer_idx in range(len(self.in_channels)-1): for depth_idx in range(self.depth-layer_idx): if layer_idx == 0: output = self.blocks[f'x_{depth_idx}_{depth_idx}'](features[depth_idx], features[depth_...
Python
1
, derive(Serialize))] pub enum SignalExtendedValueType { SignedOrUnsignedInteger, IEEEfloat32Bit, IEEEdouble64bit, } #[derive(Clone, Debug, PartialEq, Getters)] #[cfg_attr(feature = "serde", derive(Serialize))] pub struct SignalExtendedValueTypeList { message_id: MessageId, signal_name: String, ...
Rust
0
able future, ready for execution. /// /// When a future is internally spawned using `task::spawn()` or `task::spawn_local()`, /// we get back two values: /// /// 1. an `task::Task<()>`, which we refer to as a `Runnable` /// 2. an `task::JoinHandle<T, ()>`, which is wrapped inside a `Task<T>` /// /// Once a `Runnable` i...
Rust
0
) = result?; /// assert_eq!(label, "celsius"); /// assert_eq!(value, 22.2222); /// /// Ok(()) /// } else { /// return Err(From::from("expected at least one record but got none")); /// } /// } /// ``` pub fn deserialize<'a, D>(&'a self) -> R...
Rust
0
onst VK_HUAWEI_subpass_shading: u32 = 1; pub const VK_HUAWEI_SUBPASS_SHADING_SPEC_VERSION: u32 = 2; pub const VK_HUAWEI_SUBPASS_SHADING_EXTENSION_NAME: &'static [u8; 26usize] = b"VK_HUAWEI_subpass_shading\0"; pub const VK_HUAWEI_invocation_mask: u32 = 1; pub const VK_HUAWEI_INVOCATION_MASK_SPEC_VERSION: u32 = 1; pu...
Rust
0
#http://stackoverflow.com/questions/7553726/blender-how-to-export-shape-keys-using-python #and three js blender exporter import bpy import json # monkeypatch the json encoder to truncate floats # http://stackoverflow.com/questions/1447287/format-floats-with-standard-json-module from json import encoder encoder.FLOAT_R...
Python
1
"-b" => { if let Some(bs) = iter.next() { build_string = Some(bs); } else { usage("Missing build_string after -b"); } } "-p" => { if let Some(prv) = iter.next() { pre_...
Rust
0
ETHODHANDLE: ClassId = ClassId(18); pub const JAVA_LANG_STRING: ClassId = ClassId(19); pub const JAVA_LANG_CLASS: ClassId = ClassId(20); pub const JAVA_LANG_REFLECT_FIELD: ClassId = ClassId(21); pub const JAVA_LANG_OBJECT_ARRAY: ClassId = ClassId(22); pub const JAVA_LANG_REFLECT_FIELD_ARRAY: ClassI...
Rust
0
# Generated by Django 3.1.7 on 2021-04-07 01:10 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Customers...
Python
1
m_schema())) return matched_schemas if __name__ == '__main__': import glob import json files = glob.glob('data/*/context.json') files.sort() for file in files: with open(file, 'r') as f: context = json.load(f) crd = extract_schema( [], context[...
Python
1
nd, Token::Tuple { len: 2 }, Token::F64(0.0), Token::F64(0.0), Token::TupleEnd, Token::Tuple { len: 2 }, Token::F64(0.0), Token::F64(0.0), Token::TupleEnd, Token::Tuple { len: 2 }, Token::F64(0.0), ...
Rust
0
ftpsh가 기획·개발·디자인·운영하는 프로젝트로, 이 저장소와는 solved.ac의 API를 문서화해둔 것 이외에는 아무런 관련이 없습니다. </sup> **주의**: account 하위 루트를 탐색할 경우, 현재 로그인된 solvedacToken이 노출·오용될 수 있으니 주의하십시오. [GitHub에서 보기](https://github.com/solvedac/unofficial-documentation) ![@solvedac/unofficial-documentation banner](./assets/solvedac-ud-compact.png) * *...
Rust
0
ger.info(f" 激光角度阈值: {config['laser_angle_threshold']}°") logger.info(f" 舵机波特率: {config['servo_baudrate']}") # 极性配置 x_polarity_desc = "正常" if config['x_polarity'] == 1 else "反向" y_polarity_desc = "正常" if config['y_polarity'] == 1 else "反向" logger.info(f" 极性配置: X轴={x_polarity_desc} ({config['x...
Python
1
# -*- coding: utf-8 -*- """ 数据库模型模块 """ from .user import User, UserSession, UserPreference, UserUsageStats from .order import Order, Payment, UserTier from .divination import DivinationSession, DailyCard from .admin import Admin, SystemConfig, UserFeedback from .base import Base __all__ = [ "Base", "User", ...
Python
1
computation"), &s_note_new, &pk_addr_new, &v_note_new, &t_delta, )?; // Expose public input cm_note_new.inputize(cs.namespace(|| "cm_note_new")) } } #[cfg(test)] mod test { use bellman::gadgets::test::TestConstraintSystem; use bellma...
Rust
0
2), (3, 2)), (3, 0)); } #[test] fn test_original() { assert_eq!(original((2, 1), (3, 2)), (2, 2)); assert_eq!(original((1, 0), (3, 2)), (1, 3)); assert_eq!(original((4, 2), (3, 2)), (3, 0)); } #[test] fn test_test_me_c() { assert_eq!(test_test_me_helper((2, 1), (3, 2)), (2, 2)); assert_eq!(test_t...
Rust
0
listener = Listener( [ ('new', {'source_addr': maybe_ip_addr('::1'), 'source_port': 12345}) ] ) stream = Stream(self) stream.listen(listener) stream.update("1234 NEW 0 127.0.0.1:80 SOURCE_ADDR=::1:12345 PURPOSE=USER".spli...
Python
1
nails_manager: Data<thumbnail::Manager>, _auth: Auth, path: web::Path<String>, options_input: web::Query<dto::ThumbnailOptions>, ) -> Result<MediaFile, APIError> { let options = thumbnail::Options::from(options_input.0); let thumbnail_path = block(move || { let vfs = vfs_manager.get_vfs()?; let path = percent...
Rust
0
/ assert_ok!(Evercity::bond_release(Origin::signed(MASTER), bondid, 0)); // assert!(Evercity::evercity_balance().is_ok()); // assert_ok!(Evercity::bond_unit_package_buy( // Origin::signed(INVESTOR1), // bondid, // 1, // 200 // )); // ...
Rust
0
&self, query: impl TryInto<Query, Error = impl Into<EvaluationError>>, ) -> Result<QueryResults, EvaluationError> { self.query_opt(query, QueryOptions::default()) } /// Executes a [SPARQL 1.1 query](https://www.w3.org/TR/sparql11-query/) with some options. pub fn query_opt( &s...
Rust
0
Width L = 12.5, # Length H = 35.1, # Height H1 = 8.0, # Height 1 A1 = 0.0, # Body above PCB pin = [['rect', 0.0, 0.0, 0.2, 1.0, 5.0], ['rect', 10.16, 0.0, 0.2, 1.0, 5.0]], ...
Python
1
></li>", self.id, self.name ) } } pub struct WarningList { pub total: i32, pub items: Vec<Warning>, } // #[juniper::graphql_object(Context = DataBackend)] // impl WarningList { // pub fn total(&self) -> i32 { // self.total // } // pub fn items(&self) -> &[Warning] ...
Rust
0
Path = './InputPicture/' pictureNum = 9 suffixPath = '.jpg' outputDir = './OutputPicture/' for picIndex in range(1, pictureNum): src = cv2.imread(prefixPath + str(picIndex) + suffixPath) afterPreProcess = preProcess(src) targets = filterContours(src, afterPreProcess) if ...
Python
1
import re from collections import defaultdict class IllegalElement(Exception): def __init__(self, message): super().__init__(message) recognized_elements = [ 'H', 'He', 'Li', 'Be', 'B', 'C', 'N', 'O', 'F', 'Ne', 'Na', 'Mg', 'Al', 'Si', 'P', 'S', 'Cl', 'Ar', 'K', 'Ca', 'Sc', 'Ti', 'V', 'Cr', '...
Python
1
# --------------------------------------------------------------------------------------------------------------------- # JsonManager.py # # Author : Peter Heijligers # Description : JavaScript plugin functions # # # Date Ini Description # ---------- --- ------------------------------------------------------...
Python
1
Box<dyn Hittable> { let mut world = bhv::SceneBuilder::new(); let ground_material = Lambertian::new(SolidColor::new(0.5, 0.5, 0.5)); world.add(Sphere::new(Point3::new(0.0, -1000.0, 0.0), 1000.0, ground_material)); for a in -11..11 { for b in -11..11 { let c...
Rust
0
ts to the end of `other`, spanning no bytes. /// /// # Example /// /// ``` /// use dangerous::Span; /// /// let bytes = &[1, 2, 3, 4][..]; /// let span = Span::from(bytes); /// /// assert!(span.end().is_end_of(span)); /// assert!(!span.is_end_of(span)); /// ``` #[must...
Rust
0
ty == Constraint.LESS_THAN_OR_EQUAL_TO_ZERO ) assert ommx_constraint_fourth_upper.function.terms == { (3,): 1.0, (): -17.0, } def test_builder_decision_variable(): gen = amplify.VariableGenerator() model = amplify.Model() x = gen.scalar("Binary") y = gen.scalar("Integer", n...
Python
1
fn from_mul(a: &Mat4, b: &Mat4) -> Mat4 { // this is probably stupid. Programmed JS for too long. let a = &a.v; let b = &b.v; fn d(i: &[f32; 16], x: usize, y: usize) -> f32 {return i[x + 4 * y]} Mat4 { v: [ d(a, 0, 0) * d(b, 0, 0) + d(a, 1, 0) * d(b, 0...
Rust
0
# Copyright 2024 Yan Yan # # 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, s...
Python
1
0x1008FF11; /* Volume control down */ pub const XKB_KEY_XF86AudioMute :u32 = 0x1008FF12; /* Mute sound from the system */ pub const XKB_KEY_XF86AudioRaiseVolume :u32 = 0x1008FF13; /* Volume control up */ pub const XKB_KEY_XF86AudioPlay :u32 = 0x1008FF14; /* Start playing of audio > */ pub cons...
Rust
0
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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 Licen...
Python
1
]*\xd0\ {\xe2\xc4\x09\x8c\xdd\xd0\xc5\xec\xa3\xceiO\xc7\x99\xd1\ 3SD\x02H\xa4\xe5%\x82\xb6\xa4e\xa1\xd5\xabW\ \xbb\x9d\xa2\xf3VAP\xef\xc9\xd9\x1d\xec^\x09\xd77\ c\x0c\x1e\xaf\x17\x81\x1c\x98\x0d\xf8\xfdh\x0a\x04\xe0\xf7\ \xfb!IRI\x10[\x0ck\x15UE&7\x08\xcd\ d2H\xa73\xd9\xf7\xe9\xac\xaf\xac\xaaV\x82\x8b\xe5\ \xc1\xec\x92...
Python
1
clippy::upper_case_acronyms)] #[derive(Debug, Deserialize, Serialize, PartialEq, Clone)] pub struct MLPConfig { in_dim: i64, out_dim: i64, } impl OutDim for MLPConfig { fn get_out_dim(&self) -> i64 { self.out_dim } fn set_out_dim(&mut self, v: i64) {...
Rust
0
let span = tracing::info_span!("get_error", msg); let _guard = span.enter(); let error = get_error(msg); panic!(error) } fn setup() { std::env::set_var("RUST_BACKTRACE", "1"); #[cfg(feature = "capture-spantrace")] { use tracing_subscriber::prelude::*; use tracing_subscribe...
Rust
0
-backend=<BACKEND> 'Sets the backend to use' --dereference 'Follow symlinks' --one-file-system 'Ignore things on other filesystems' <NAME> 'Unique name for this backup' <PATH> 'The path to backup'") .arg( Arg::with_name("exclude")...
Rust
0
) self.name = str(name) self.height = 0 def clone(self): r''' Clones an atomic proposition :returns: a clone of the current atomic proposition :rtype: PL.AtomicProposition ''' return self.__class__(str(self.name)) def subformula(self, i): r''' R...
Python
1
osed) is True @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_path_params_delete(self, async_client: AsyncGradient) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `api_key_uuid` but received ''"): await async_client.models...
Python
1
nments available in the Heroku platform. /// /// [For more information please refer to the Heroku documentation](https://devcenter.heroku.com/articles/platform-api-reference#stack) #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)] pub struct Stack { /// indicates this stack is the ...
Rust
0
error_text = await add_response.text() logger.error(f"Failed to add stream configuration {stream_key}: {error_text}") logger.error(f"MediaMTX API response body for add error: {error_text}") logger.error(f"Request...
Python
1
hob_header = addr as *const Header; } } #[cfg(not(test))] pub fn find_loader(hob: *const c_void) -> (*const c_void, usize) { let (image, size) = find_image_in_fv (hob); (image, size) } #[cfg(not(test))] pub fn initialize_variable() { let mut var_name: [Char16; 13] = [0x50, 0x6c, 0x61, 0x74, 0x66, 0x6F, 0x...
Rust
0
redentialInfo<AccountId>>, } #[derive(Encode, Decode, Clone, Default, RuntimeDebug, PartialEq, Eq)] pub struct UserCredentialInfo<AccountId> { user_id: AccountId, people_id: Vec<u8>, platform: Vec<u8>, } impl<Hash, AccountId> UserCredential<Hash, AccountId> { pub fn new( id: Hash, owner_id: Account...
Rust
0
// .append_int(123); // print(repr(one_elem)); // let python_string = _String::from_string(String::from("asd")); // print(python_string); // let list_from_integer = List::from(123); // // [1, 2, 3] // let list_from_string = List::from(String::from("abc")); // // ['a', 'b', 'c'] ...
Rust
0