text string | label_name string | labels int64 |
|---|---|---|
A))), @"False");
assert_display_snapshot!(qe(forall(A, forall(B, subeq(B, A)))), @"False");
assert_display_snapshot!(qe(exists(B, and(subeq(A, B), subeq(B, C)))), @"'a ⊆ 'c");
assert_display_snapshot!(qe(forall(B, subeq(A, B))), @"'a ⊆ 'static");
assert_display_snapshot!(
qe(exists(A, and_([su... | Rust | 0 |
}")
if base_column not in df.columns:
raise ValueError(f"Base column '{base_column}' not found in DataFrame")
result_df = df.copy()
price_columns = ['open', 'high', 'low', 'close']
existing_price_columns = [col for col in price_columns if col in df.columns]
... | Python | 1 |
, &Duration) {
// If we're running with less than four wires, change the
// MOSI pin to an output if necessary
if pins.miso.is_none() && pins.mosi_is_input {
pins.mosi.set_mode(Output);
pins.mosi_is_input = false;
}
(&mut pins.mosi, &mut pins.clk, &... | Rust | 0 |
print(lplr.getJointAng(i))
# # print(k.fk(lplr.getJointAng(i)))
## =====================================================================
# ## 测试直线plr,用v1的正逆运动学
# k=finger_link(arg)
# # print(k.ik(px))
# # print(k.fk(k.ik(px)))
# lplr=testlineplaner(k,10)
# for i in range(12):
# print(lplr.getJointAng(i))
#... | Python | 1 |
struct MetricView<'a> {
dated_metrics: Vec<DatedMetric<'a>>,
default: Box<dyn Metric>,
span: Span,
}
impl<'a> MetricView<'a> {
pub(crate) fn new(dated_metrics: Vec<DatedMetric<'a>>, default: Box<dyn Metric>, span: Span) -> Self {
Self {
dated_metrics,
default,
... | Rust | 0 |
) {
let cert = concat!(
"ecdsa-sha2-nistp384-cert-v01@openssh.com AAAAKGVjZHNhLXNoYTItbmlzdHAzODQtY2VydC12MDFAb3BlbnNzaC5jb20AAAAgHWz37ZJkNhpEhC6pJkY",
"cbKvPMgazcFt1hlgweWQVV/YAAAAIbmlzdHAzODQAAABhBCEPn99p8iLo9pyPBW0MzsWdWtvlvGKfnFKc/pOF3sV2mCNYp06mgfXm3ZPKioIjYHjj9Y1E4W8x1uR",
"<KEY>qHmrTD... | Rust | 0 |
plus_one(self.navigation.get_coordinate())
if forward_pos == self.healing_station.coordinate:
self.heal_roster()
if forward_pos == self.pc.coordinates:
self.pc.use_pc(self.player.get_battle_info())
def enter_building(self, player: Player):
super().add_pc_interfac... | Python | 1 |
# logutil.py
import logging
from ctypes import WinDLL
from ctypes.wintypes import LPCSTR, LPCWSTR
_kernel32 = WinDLL("kernel32")
_OutputDebugStringA = _kernel32.OutputDebugStringA
_OutputDebugStringA.argtypes = [LPCSTR]
_OutputDebugStringA.restype = None
_OutputDebugStringW = _kernel32.OutputDebugStringW
_OutputDebu... | Python | 1 |
QtWidgets.QTextEdit(parent=Form)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.memScanExcludePath.sizePolicy().hasHe... | Python | 1 |
# This file includes code originally from the Pytorch Correlation repository:
# https://github.com/ClementPinard/Pytorch-Correlation-extension
# Licensed under the MIT License. See THIRD_PARTY_LICENSES.md for details.
from .spatial_correlation_sampler import SpatialCorrelationSampler, spatial_correlation_sample
| Python | 1 |
import json
import os
import requests
from decouple import config
def get_botcity_secret(label, key, access_token, organization):
url = f"https://figueiredo.botcity.dev/api/v2/credential/{label}/key/{key}"
headers = {
"accept": "*/*",
"organization": organization,
"token": access_toke... | Python | 1 |
wait collection.count_documents({})
# Get documents by category
category_pipeline = [
{"$group": {"_id": "$category", "count": {"$sum": 1}}}
]
category_results = await collection.aggregate(category_pipeline).to_list(None)
documents_by_category... | Python | 1 |
self.entryByMAC[packet.src] = macEntry
log.info("Learned %s", str(macEntry))
elif macEntry != (dpid, inport, packet.src):
# there is already an entry of host with that MAC, but host has moved
# should we raise a HostMoved event (at the end)?
log.info("Learned %s moved to %i %i", s... | Python | 1 |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
End-to-end testing for DialCrowd.
"""
import json
import os
import unittest
import pytest
from pytest_regressions.d... | Python | 1 |
# Ejercicio 737: Crear una función para validar si una matriz es un cuadrado mágico.
from itertools import chain
def elementos_diferentes(matriz):
numeros = list(chain(*matriz))
return len(set(numeros)) == len(numeros)
def es_cuadrado_magico(matriz):
if len(matriz) == len(matriz[0]):
if elemento... | Python | 1 |
import tkinter as tk
from tkinter import ttk, messagebox
import os
import sys
from types import NoneType
current_dir = os.path.dirname(os.path.abspath(__file__))
views_dir = os.path.join(current_dir, '../')
sys.path.append(views_dir)
import styles
import window
def show_dialog(controller, frame_parent, dict_cols, n... | Python | 1 |
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from typing import Any, Dict
from fairseq.distributed import utils
try:
from fairscale.optim import OSS
_has_fairscale = True
exce... | Python | 1 |
"""
Write a python function to find quotient of two numbers (rounded down to the nearest integer).
assert find(10,3) == 3
"""
def find(a,b):
return a//b
print(find(10,3))
/python/python_basics/01_hello_world.py
"""
Write a python program to print "Hello World"
"""
print("Hello World")
/python/python_basics/05_pr... | Python | 1 |
if i < 0 {
0
} else {
i as usize
}
}
ref i => return env.type_error1("Type error in t[i]: i is not an integer.", "i", i),
};
if i < self.v.len() {
Ok(self.v[i].clone())
} else {
... | Rust | 0 |
,
save_steps=10,
save_total_limit=2,
metric_for_best_model='loss',
greater_is_better=False,
report_to=['tensorboard'],
gradient_accumulation_steps=1,
logging_steps=5,
eval_steps=10,
... | Python | 1 |
"{} {} {}", self.target, self.target_obj, score)
}
}
/// `scoreboard players set <targets> <objective> <score>`
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ScoreSet {
pub target: Target,
pub target_obj: Objective,
pub score: i32,
}
impl ScoreSet {
pub fn holder_uses(&... | Rust | 0 |
t_ylabel("Message Sent")
plt.xticks(rotation='vertical')
st.pyplot(fig)
def activity_heatmap(df):
period = []
for hour in df[['day', 'hour']]['hour']:
if hour == 23:
period.append(str(hour) + "-" + str('00'))
elif hour == 0:
period.append(str('00') + "-" + str(ho... | Python | 1 |
(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10);
self.w
}
}
#[doc = "Field `lotpm_hfp_clk_en_lorx` reader - "]
pub struct LOTPM_HFP_CLK_EN_LORX_R(crate::FieldReader<bool, bool>);
impl LOTPM_HFP_CLK_EN_LORX_R {
... | Rust | 0 |
.use_text(footer, 10, Mm(5.0), Mm(5.0), &font);
}
/**
* Add the address section to the PDF at `pos`. Note that each page can fit only 2 wallets, so pos has to effectively be either 0 or 1.
*/
fn add_address_to_page(current_layer: &PdfLayerReference, font: &IndirectFontRef, font_bold: &IndirectFontRef, address: &str... | Rust | 0 |
next: *mut comp_list_t,
pub size: ::std::os::raw::c_ushort,
}
#[test]
fn bindgen_test_layout_comp_list_t() {
assert_eq!(
::std::mem::size_of::<comp_list_t>(),
24usize,
concat!("Size of: ", stringify!(comp_list_t))
);
assert_eq!(
::std::mem::align_of::<comp_list_t>(),
... | Rust | 0 |
src = srcs[0].to(device)
tgt = tgts[0].to(device)
output = model(src, tgt) # tgt[:-1] used as target input to predict tgt[1:]
args.log("Sample Input:", src[0:5])
args.log("Sample Target:", tgt[0:5])
args.log("Model Output:", output[0:5])
# Save to a midi fi... | Python | 1 |
#magic_read
#(#field_reads)*
let __deku_value = #initialize_struct;
let __deku_pad = 8 * ((__deku_rest.len() + 7) / 8) - __deku_rest.len();
let __deku_read_idx = __deku_input_bits.len() - (__deku_rest.len() + __deku_pad);
Ok... | Rust | 0 |
SELR::I2SBCLK => 6,
PAD21FNCSELR::UA1CTS => 7,
PAD21FNCSELR::_Reserved(bits) => bits,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> PAD21FNCSELR {
match value {
0 => PAD21FNCSELR::SWDIO,
1 => PAD21FNCSEL... | Rust | 0 |
if let Some(new_offset) = base_offset.checked_add(extra_offset) {
let base_addr = match self.base {
PointerBase::Addr(addr) => addr,
PointerBase::Stack(stack_slot) => {
fx.bcx.ins().stack_addr(fx.pointer_type, stack_slot, 0)
... | Rust | 0 |
NON = 0
NEW = 1
OLD = 2
LAST_PART_POINT_MAP = {
581: 7,
582: 8,
583: 5,
584: 5,
585: 4,
586: 6,
587: 5,
588: 5,
589: 3,
590: 3,
591: 4,
592: 6,
593: 4,
594: 3,
595: 4,
596: 2,
597: 1,
598: 2,
599: 3,
600: 1,
601: 5,
602: 3,
603... | Python | 1 |
finalPath = os.path.join(tmppath2,isoFaces)
# isoFacesPath.append(finalPath)
# print finalPath
# outputPath = meshType + resolution + ".png"
# print outputPath
# print os.path.join("S:/Verification/VoFLibary/release/Advection/deformationSphere/Figure" , outputPath)
#... | Python | 1 |
gure a mock runtime to test the pallet.
frame_support::construct_runtime!(
pub enum Test where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
AuthorInherent: author_inherent::{Pallet, Call, Storage, Inhere... | Rust | 0 |
def operaciones(a, b):
try:
resultado = a+b
resultado2 = a/b
except TypeError:
print("no se pude sumar dos tipos de datos diferentes")
except ZeroDivisionError:
print("no se pude dividir entre 0")
else:
print(resultado)
print(resultado2)
operaciones(4... | Python | 1 |
: *mut libc::c_void,
pub fd: libc::c_int,
pub u32_0: uint32_t,
pub u64_0: uint64_t,
}
pub type epoll_data_t = epoll_data;
#[derive ( Copy, Clone )]
#[repr(C, packed)]
pub struct epoll_event {
pub events: uint32_t,
pub data: epoll_data_t,
}
#[derive ( Copy, Clone )]
#[repr(C)]
pub struct timespec {
... | Rust | 0 |
ex=tokenizer_src.token_to_id('[PAD]'), label_smoothing=0.1).to(device)
for epoch in range(initial_epoch, config['num_epochs']):
torch.cuda.empty_cache()
model.train()
batch_iterator = tqdm(train_dataloader, desc=f"Processing Epoch {epoch:02d}")
for batch in batch_iterator:
... | Python | 1 |
# Good Example of a simple Code Injector
# Developed by -> Andrea Fortuna / https://github.com/andreafortuna
import sys
from ctypes import *
from win32com.client import GetObject
if len(sys.argv) < 2:
print "Python code injector: ./" + sys.argv[0] + " <process to inject>"
sys.exit(0)
proc = sys.argv[1]
WMI =... | Python | 1 |
"""Translate reconstructed object functions to refractive index"""
import numpy as np
def odt_to_ri(f, res, nm):
r"""Convert the ODT object function to refractive index
In :abbr:`ODT (Optical Diffraction Tomography)`, the object function
is defined by the Helmholtz equation
.. math::
f(\mat... | Python | 1 |
rotation),
Geo::GeoPoint(geo) => geo.set_rotation(rotation),
Geo::GeoMCircle(geo) => geo.set_rotation(rotation),
Geo::GeoConvexPolygon(geo) => geo.set_rotation(rotation),
Geo::GeoCubicBezier(geo) => geo.set_rotation(rotation),
Geo::GeoLogic(geo) => geo.set_rot... | Rust | 0 |
(|s| std::ffi::OsString::from(s))
.collect::<Vec<_>>();
let comp_type = clap_complete::dynamic::bash::CompType::default();
let trailing_space = true;
let current_dir = None;
let completions = clap_complete::dynamic::bash::complete(
&mut cmd,
args,
arg_index,
comp... | Rust | 0 |
from __future__ import annotations
from typing_extensions import Literal
from abqpy.decorators import abaqus_class_doc, abaqus_method_doc
from ...UtilityAndView.abaqusConstants import OFF, STRESS, Boolean
from ...UtilityAndView.abaqusConstants import abaqusConstants as C
@abaqus_class_doc
class GasketTransverseShe... | Python | 1 |
E_PIPELINE_ID");
let cpu_image = format!("persia-cpu-runtime:{}", buildkite_pipeline_id);
let cuda_image = format!("persia-cuda-runtime:{}", buildkite_pipeline_id);
PersiaJobSpec {
persiaEnv: PersiaEnvSpec {
PERSIA_GLOBAL_CONFIG: String::from(
"/home/PERSIA/examples/src... | Rust | 0 |
sns.heatmap(score_mat, xticklabels=False, yticklabels=False, vmin=0, vmax=1, cmap='Reds', cbar=False, ax=ax_score)
else:
ax_sad = plt.gca()
sns.heatmap(sad_matrix, xticklabels=target_labels, yticklabels=sad_labels[ii], vmin=0, vmax=vlim, ax=ax_sa... | Python | 1 |
# Copyright (c) 2014 OpenStack Foundation
#
# 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 ... | Python | 1 |
rency::transfer(&who, &owner, proxy_deposit, KeepAlive)?;
<pallet_proxy::Module<T>>::add_proxy_delegate(&owner, who, Default::default(), Zero::zero())?;
let data = ClassData { deposit, classtype, name, description};
orml_nft::Pallet::<T>::create_class(&owner, metadata, data)?;
Self::deposit_event(Event::C... | Rust | 0 |
0x00,
8,
0xFF,
0xFF,
0xFF,
0xFF,
0xFF,
0xFF,
0xFF,
0xFF,
][..]
);
}
}
<filename>src/test/ui/hygiene/generate-mod.rs
// This is an equivalent of i... | Rust | 0 |
0x06, 0x70, 0x6D, 0x61, 0x78, 0x73, 0x71,// pmaxsq
0x06, 0x70, 0x6D, 0x61, 0x78, 0x75, 0x71,// pmaxuq
0x06, 0x70, 0x6D, 0x69, 0x6E, 0x73, 0x71,// pminsq
0x06, 0x70, 0x6D, 0x69, 0x6E, 0x75, 0x71,// pminuq
0x07, 0x70, 0x6D, 0x6F, 0x76, 0x62, 0x32, 0x6D,// pmovb2m
0x07, 0x70, 0x6D, 0x6F, 0x76, 0x64, 0x32, 0x6D,// pm... | Rust | 0 |
(&self) -> &Vec<T> {
&self.lemma
}
}
<gh_stars>10-100
use crate::seq::ExpectedRecord;
use seq_io::Position;
pub const FASTQ: &[u8] = b"
@id desc
ATGC
+ id
IIII\r
@id2
CGAT\r
+
IHII\r
@id3 \r
+ id3
";
lazy_static! {
pub static ref FASTQ_EXPECTED: [ExpectedRecord; 3] = [
ExpectedRecord {
... | Rust | 0 |
date = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("data", None)
_v = data if data is not None else _v
if _v is not None:
self["data"] = _v
_v = arg.pop("layout", None)
_v = layo... | Python | 1 |
from nicegui import ui
import yaml
import netifaces
# Get a list of all the network interfaces
interfaces = netifaces.interfaces()
# Loop over all the interfaces and print their details
# for iface in interfaces:
# iface_details = netifaces.ifaddresses(iface)
# print(f"Interface {iface} has details: {iface_de... | Python | 1 |
(0.827037).unwrap()),
},
LineChartPoint {
x: Finite::new(1.0).unwrap(),
y: Some(Finite::new(0.83504676).unwrap()),
},
LineChartPoint {
x: Finite::new(2.0).unwrap(),
y: Some(Finite::new(0.80508476).unwrap()),
},
LineChartPoint {
x: Finite::new(3.0).unwrap(),
... | Rust | 0 |
odel(
input_ids=batch["input_ids"],
attention_mask=batch["attention_mask"],
labels=batch["label"],
)
loss = outputs.loss
loss.backward()
optimizer.step()
optimizer.zero_grad()
# Tqdm print loss
... | Python | 1 |
te)?;
let worker_port = 50051;
let node_id = DEFAULT_NODE_NAME;
let ip_address = DEFAULT_NODE_IP;
let data_dir = DATA_DIR;
let ephemeral = false;
let node = DatenLordNode::new(
node_id.to_owned(),
ip_address.to_owned(),
worker_port,
... | Rust | 0 |
y4)/(32*sqrt(pi))
out[:, 61] = (
-0.51891557872026028 * x * (13.0 * z2 - 1.0) * (-10.0 * x2 * y2 + x4 + 5.0 * y4)
) # -3*sqrt(385)*x*(13*z2 - 1)*(-10*x2*y2 + x4 + 5*y4)/(64*sqrt(pi))
out[:, 62] = (
2.6459606618019 * z * (15.0 * x2 * y4 - 15.0 * x4 * y2 + x6 - y6)
... | Python | 1 |
Eq, Clone, Hash, Debug)]
pub enum ExprData {
/// true, false
BooleanLiteral(bool),
/// `22i`, `22_222i`, etc
SignedIntegerLiteral(i64),
/// `22u`, `22_222u`, etc
UnsignedIntegerLiteral(u64),
/// `22`, `22_222`, etc
IntegerLiteral(u64),
/// `2.2`
FloatLiteral(eq_float::F64),
... | Rust | 0 |
let pte = self.find_pte_create(vpn).unwrap();
assert!(!pte.is_valid(), "vpn {:?} is mapped before mapping", vpn);
*pte = PageTableEntry::new(ppn, flags | PTEFlags::V);
}
pub fn unmap(&mut self, vpn: VirtPageNum) {
let pte = self.find_pte(vpn).unwrap();
assert!(pte.is_valid(), "v... | Rust | 0 |
ackend, params):
_skip_if_memory_limited(_MEM_LIMIT, params)
password = params["password"]
work_factor = int(params["n"])
block_size = int(params["r"])
parallelization_factor = int(params["p"])
length = int(params["length"])
salt = params["salt"]
derived_k... | Python | 1 |
Return:
None
Raises:
SubCommandFailure
"""
log.debug(f"configuring udld enable on device")
try:
device.configure('udld enable')
except SubCommandFailure as error:
raise SubCommandFailure(
f'Could not enable udld on device. Error: {erro... | Python | 1 |
import fortranformat as ff
import numpy as np
class OutgoingDistribution:
"""Class to hold outgoing energy or angle distributions
Parameters
----------
lines : list of strings
the lines from the GENDF file
Attributes
----------
mt : int
the MT number
number_groups : ... | Python | 1 |
:
// https://datatracker.ietf.org/api/v1/meeting/meeting/ - list of meetings
// https://datatracker.ietf.org/api/v1/meeting/meeting/747/ - information about meeting number 747
// https://datatracker.ietf.org/api/v1/meeting/session/ - lis... | Rust | 0 |
", line);",
" }",
" ",
" for (pos, line) in code.iter().enumerate() {",
" if pos == 0 || pos == 1 {",
" continue;",
" }",
" ",
" println!(\"{}\", line);",
" }",
"}",
"",
"/*... | Rust | 0 |
!("An existing file was found at: {}\n\
If you want to replace it, please delete it first", yaml_path.display()))
} else {
yaml_path.parent().map(std::fs::create_dir_all);
Ok(std::fs::write(yaml_path, include_str!("../res/default_config.yaml"))?)
}
}
}
//... | Rust | 0 |
> 0 {
let plus = (0..levels_up).map(|_| "+").collect::<String>();
format!(" {}level", plus).cyan().to_string()
} else {
"".to_string()
}
}
fn long_status(game: &Game) {
let player = &game.player;
let location = &game.location;
println!("{}@{}", format_character(player), lo... | Rust | 0 |
}
#[derive(Eq, PartialEq, Debug)]
struct Line {
x1: i64,
y1: i64,
x2: i64,
y2: i64,
}
impl Line {
fn points(&self) -> Vec<(i64, i64)> {
let mut result = vec![];
let x_direction_modifier = match self.x1.cmp(&self.x2) {
Ordering::Less => 1,
Ordering::Equal =>... | Rust | 0 |
self.blocks_total)
.finish()
}
}
fn bytes(e: &Entry) -> u64 {
match *e {
Entry::File { size, ..} => size,
_ => 0,
}
}
fn blocks(e: &Entry, block_size: u64) -> u64 {
match *e {
Entry::File { size, ..} => (size + block_size-1) / block_size,
_ => 0,
}
}
impl I... | Rust | 0 |
]
#[macro_use]
extern crate libfuzzer_sys;
extern crate metered_wasmi;
extern crate wasmparser;
use wasmparser::WasmDecoder;
fn run_wasmparser(data: &[u8]) -> bool {
let mut parser = wasmparser::ValidatingParser::new(data, None);
let result = loop {
match *parser.read() {
wasmparser::ParserState::Error(..) => ... | Rust | 0 |
data: *mut c_void ) -> ReasonCode {
unsafe {
let out: &mut Vec< usize > = transmute( data );
out.push( get_ip( context ) as usize );
}
0
}
lazy_static! {
static ref AS: RwLock< LocalAddressSpace > = {
let opts = LocalAddressSpaceOptions::new()
.should_load_symbols(... | Rust | 0 |
assert_eq!(breakdown_by_primary_channel.len(), 1);
assert_eq!(breakdown_by_primary_channel[0].event_codes, vec![157]);
assert_eq!(breakdown_by_primary_channel[0].payload, MetricEventPayload::Count(1));
let breakdown_by_channel_band = test_helper.get_logged_metrics(
metrics::DEVICE_C... | Rust | 0 |
put
# are valid ancestors. While this is not a requirement of the rollup function itself,
# we handle this edge case to ensure parity between tests and current functionality
# of the backend.
ancestor_keys = list(cell_type_ancestors_dict.keys())
for key in ancestor_keys:
... | Python | 1 |
ck_core::MemKey::with_length(1);
let mut vault =
pwduck_core::Vault::generate(password, Option::<String>::None, &mem_key, &path)
.unwrap();
let root = vault.get_root_uuid().unwrap();
let mut mgv = default_mgv_with_parent(root.clone());
mgv.submit(&mut vault)... | Rust | 0 |
_ulps_eq!(lhs * rhs, result);
lhs *= rhs;
assert_ulps_eq!(lhs, result);
}
#[test]
fn translation() {
let lhs = Vector3::new(0.0, 0.0, 0.0);
let rhs = Matrix4x4::from_translation(&Vector3::new(10.0, 0.0, 0.0));
assert_ulps_eq!(lhs * rhs, Vector3::new(10.0, 0.0, 0.0));... | Rust | 0 |
ap().clone()
}
#[cfg(test)]
mod test {
use super::*;
use crate::ir::term::dist::test::*;
use quickcheck_macros::quickcheck;
#[test]
fn with_or() {
let a = bv_lit(0, 1);
let b = bv_lit(0, 1);
let c = bv_lit(0, 1);
let t = term![BV_OR; term![BV_AND; a.clone(), b.clone... | Rust | 0 |
extend(layer.iter().enumerate().flat_map(|(x, line)| {
line.chars().enumerate().filter_map(move |(y, character)| {
if character == '#' {
Some(Point {
x: x as i64,
y: y as i64,
... | Rust | 0 |
jsz6389/bsoz-emu
/* SPDX-License-Identifier: MIT
*
* exec.rs
*
* Contains functions for executing instructions from memory
*
* Copyright (C) 2021 <NAME> <<EMAIL>>
*
*/
use cpu;
use mem;
use address;
use lda;
/*
* Reads the next instruction from the program counter and executes it
*
* @param cpu the cpu on... | Rust | 0 |
32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))]
pub struct OLEUIOBJECTPROPSW {
pub cbStruct: u32,
pub dwFlags: u32,
pub lpPS: *mut super::super::UI::Controls::PROPSHEETHEADERW_V2,
pub dwObject: u32,
pub lpObjInfo: IOleUIObjIn... | Rust | 0 |
populations of agents in virtual worlds.
The reward from this function goes to {reward_to}.
The function name is {eval_fn.__name__}. These are the arguments that the function takes {eval_fn_kwargs}.
The function source code is \n####\n{eval_src}#### .
This function calls these other fun... | Python | 1 |
also query for granular data, such as the number of daily write operations for Amazon DynamoDB database tables in your production environment. </p> <p>Service Endpoint</p> <p>The Cost Explorer API provides the following endpoint:</p> <ul> <li> <p> <code>https://ce.us-east-1.amazonaws.com</code> </p> </li> </ul> <p>For... | Rust | 0 |
"""Highlights executed code blocks based on rhv coverage information"""
import re
import idaapi # pylint: disable=import-error
import ida_kernwin # pylint: disable=import-error
import idc # pylint: disable=import-error
def highlight_basic_block(address: int):
"""Colors a block in the flowchart."""
color =... | Python | 1 |
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/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.
// xfail-android: F... | Rust | 0 |
BsonDocEncoder)) { }
fn emit_enum_variant(&mut self, _: &str, _: uint, _:uint, _:&fn(&mut BsonDocEncoder)) { }
fn emit_enum_variant_arg(&mut self, _:uint, _:&fn(&mut BsonDocEncoder)) { }
fn emit_enum_struct_variant(&mut self, _: &str, _: uint, _:uint, _:&fn(&mut BsonDocEncoder)) { }
fn emit_enum_struct... | Rust | 0 |
if let Some(line) = lines.next() {
if line.is_empty() {
break;
}
// parse line (note the space to help with parsing)
let field_and_val: Vec<&str> = line.split(": ").collect();
let field_name = field_and_val[0].to_owned();
//... | Rust | 0 |
Clone, Copy, PartialEq)]
pub enum SlaveAddr {
/// Default slave address
Default,
/// Alternative slave address providing bit value for A0
Alternative(bool),
}
impl Default for SlaveAddr {
/// Default slave address
fn default() -> Self {
SlaveAddr::Default
}
}
impl SlaveAddr {
... | Rust | 0 |
def build_prompt(tweet_text: str) -> str:
return f"""
You are an AI assistant that analyzes tweets to determine if they are related to a crypto airdrop.
Your task is to:
1. Determine whether the tweet is about an airdrop.
2. Extract:
- a list of relevant keywords,
- token name (if any), like $SOL, $TOKENNA... | Python | 1 |