text string | label_name string | labels int64 |
|---|---|---|
com, Streamlare.com, 1fichier.com, MEGA, DropMeFiles.com, TusFiles.com, MixDrop, FileMoon, FileLions, StreamWish, VOE.sx, TeraBox, Fembed, VidMoly, Uptobox, PornHub.com, XVIDEOS.COM, xHamster.com`
๐ **Supported URL Formats :** https://t.me/TechZBots/813
""",
disable_web_page_preview=True,
)
i... | Python | 1 |
ges to propagate.")
return web_acl_arn
def associate_web_acl_with_cloudfront(distribution_id, web_acl_arn):
"""
Associates the specified Web ACL with the CloudFront distribution.
This requires getting the distribution's current configuration,
updating the WebACLId, and then updating the distributio... | Python | 1 |
laxation and good music go hand in hand. These songs should complement your mood:"
],
'romantic': [
"Feeling the love? These romantic tracks might be perfect for your mood:",
"Romance and music are perfect partners. Here are some songs to match your feelings:",
"When love is in the air, ... | Python | 1 |
await alive.edit(output)
await asyncio.sleep(100)
await alive.delete()
@register(outgoing=True, pattern=r"^\.(?:xalive|xon)\s?(.)?")
async def amireallyalive(alive):
user = await bot.get_me()
await get_readable_time((time.time() - StartTime))
output = (
f" ๐ซ โก๐๐ถ๐ป๐ด-๐๏ฟฝ... | Python | 1 |
ect", order=None):
partition_perm = anp.argpartition(x, kth, axis, kind, order)
return g[partition_perm]
defjvp(anp.partition, fwd_grad_partition)
def atleast_jvpmaker(fun):
def jvp(g, ans, *arys):
if len(arys) > 1:
raise NotImplementedError("Can't handle multiple arguments yet.")
... | Python | 1 |
Broken pipe: write to pipe with no readers.
Pipe = 13,
/// Timer signal from C alarm function.
Alarm = 14,
/// Termination signal.
Term = 15,
/// Stack fault on coprocessor (unused).
Stklft = 16,
/// Child stopped or terminated.
Child = 17,
/// Continue if stopped.
Continue ... | Rust | 0 |
self.pos += 1;
// Return the reference to the element
Some(&self.vector[self.pos - 1])
}
}
// Implement mutable row iterator for matrix
// Currently we can't implement a safe mutable Iterator
// https://www.reddit.com/r/rust/comments/6ffrbs/implementing_a_safe_mutable_iterator/
// https://sta... | Rust | 0 |
vec![0.0f32; NUMBERS_LEN];
wyrand.fill(&mut rhs);
// initialize CUDA, this will pick the first available device and will
// make a CUDA context from it.
// We don't need the context for anything but it must be kept alive.
let _ctx = cust::quick_init()?;
// Make the CUDA module, modules just h... | Rust | 0 |
>
</div>
},
new: html! {
<div id="after">
<span> { {new1} {new2} } </span>
</div>
},
override_expected,
}
.test();
}
#[wasm_bindgen_test]
fn append_text_node() {
DiffPatchTest {
desc: "Append text node",
old: html! { <div> ... | Rust | 0 |
intln!("Invalid [[verbs]] entry in configuration");
eprintln!("Missing execution");
continue;
}
};
let from_shell = bool_field(verb_value, "from_shell");
let leave_broot = bool_field(verb_value, "leave_br... | Rust | 0 |
e),
"arrival location" => Ok(Rule::ArrivalLocation),
"arrival station" => Ok(Rule::ArrivalStation),
"arrival platform" => Ok(Rule::ArrivalPlatform),
"arrival track" => Ok(Rule::ArrivalTrack),
"class" => Ok(Rule::Class),
"duration" => Ok(Rule::Durat... | Rust | 0 |
<peripheral>
<name>FOO</name>
<baseAddress>5000</baseAddress>
</peripheral>
"##
.as_bytes(),
)
.unwrap();
let pi = Peripheral::parse(&el).unwrap();
let mut peripheral = PeripheralSpec::new(&pi).unwrap();
let changed = peripheral.propagate_default_register... | Rust | 0 |
{
return x("1.2.3.4");
}
function go() {
build((var0) => { return { type: "Ip", 0: var0 }; });
return { type: "Ip", 0: "5.6.7.8" };
}
function destructure(x) {
if (x.type !== "Ip") throw new Error("Bad match");
let raw = x[0];
return raw;
}
"#
);
assert_js!(
r#"
type TypeWithALongName... | Rust | 0 |
nning with a period
matches a domain and all its subdomains (e.g. ``.example.com`` matches
``example.com`` and any subdomain), ``*`` matches anything, and anything
else must match exactly.
Return ``True`` for a valid host, ``False`` otherwise.
"""
# All validation is case-insensitive
host ... | Python | 1 |
!usb_dev.poll(&mut [&mut serial]) {
continue;
}
let mut buf = [0u8; 64];
match serial.read(&mut buf) {
Ok(count) if count > 0 => {
// Echo back in upper case
for c in buf[0..count].iter_mut() {
if 0x61 <= *c && *c <= ... | 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 |
gine::{
Builder,
Engine,
Module,
},
graphics::Graphics,
math::*,
resources::Handle,
serde::{
Deserialize,
Serialize,
},
std::cell::UnsafeCell,
};
#[derive(Serialize, Deserialize, Clone, Copy, Debug)]
pub struct Transform {
pub location: Point3,
pub rotation: Quaternion,
pub scale: Vec3,
}
impl Tra... | Rust | 0 |
"""Generates random saliency scores for a baseline."""
import argparse
import json
import random
import numpy as np
import torch
from pypapi import events, papi_high as high
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--saliency_paths", help="Path to original saliency",
... | Python | 1 |
scene() => {
background -> list_view::selection;
list_view::background -> background;
}
}
let style_watch = StyleWatchFrp::new(&app.display.scene().style_sheet);
let width = style_watch.get_number(theme::width);
let height ... | Rust | 0 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class ZhimaDataMorseOperateSyncResponse(AlipayResponse):
def __init__(self):
super(ZhimaDataMorseOperateSyncResponse, self).__init__()
self._biz_id = None
self._res... | Python | 1 |
from pydash import py_
from directory_utilities import get_json_from_file, write_json_to_file
trades_file_directory = "../database/trades.json"
trades = get_json_from_file(trades_file_directory)
archived_trades_file_directory = "../database/archive/archived-trades.json"
archived_trades = get_json_from_file(archived_... | Python | 1 |
#!/usr/bin/python
# Copyright 2013 Google Inc. 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 a... | Python | 1 |
f::ParseError(e)
}
}
impl std::fmt::Display for BmsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
BmsError::LexError(lex) => {
write!(f, "lex error: {}", lex)
}
BmsError::ParseError(parse) => {
... | Rust | 0 |
# -*- encoding: utf-8 -*-
import sys
import time
import unittest
from PyQt4 import QtGui
import pilasengine
class TestEtiquetas(unittest.TestCase):
app = QtGui.QApplication(sys.argv)
def setUp(self):
self.pilas = pilasengine.iniciar(modo_test=True)
def testEtiquetasEnActores(self):
# S... | Python | 1 |
i = self.decode_sbas_integrity(msg, i)
elif mt == 7: # fast correction degradation factor
i = self.decode_sbas_fast_degradation(msg, i)
elif mt == 9: # ranging
i = self.decode_sbas_ranging(msg, i)
elif mt == 10: # degradation parameter
i = self.... | Python | 1 |
ng_codepoint_map = { pt: idx for idx, pt in enumerate(interesting_codepoints) }
# Assemble decomposition sequences
decomposition_sequences = [ 0 ]
decomposition_starts = {}
for codepoint, decomposition in decomposition_map.iteritems():
decomposition = [ interesting_codepoint_map[cp] for cp in decomposition ]
i... | Python | 1 |
doc = "0xc4 - no description available"]
pub endpoint1: ENDPOINT,
_reserved19: [u8; 3usize],
#[doc = "0xc8 - no description available"]
pub endpoint2: ENDPOINT,
_reserved20: [u8; 3usize],
#[doc = "0xcc - no description available"]
pub endpoint3: ENDPOINT,
_reserved21: [u8; 3usize],
#[doc = "0xd0 - no ... | Rust | 0 |
import os
import datetime
import time
#cipher_glitch
def change_file_datetime(file_path, new_datetime):
try:
os.utime(file_path, (time.mktime(new_datetime.timetuple()), time.mktime(new_datetime.timetuple())))
print(f"ะะฐัะฐ ะธ ะฒัะตะผั ัะฐะนะปะฐ '{file_path}' ััะฟะตัะฝะพ ะธะทะผะตะฝะตะฝั ะฝะฐ {new_datetime}")
except Fi... | Python | 1 |
][version::wasmer_version_pre].
///
/// # Example
///
/// ```rust
/// # use inline_c::assert_c;
/// # fn main() {
/// # (assert_c! {
/// # #include "tests/wasmer.h"
/// #
/// int main() {
/// // Get and print the version.
/// const char* version = wasmer_version();
/// printf("%s", version);
///
/// ... | Rust | 0 |
ile_text;
let mut file_text = Cow::Borrowed(file_text);
for sub_plugin_name in sub_plugin_names {
let initialized_plugin = pools.take_instance_for_plugin(parent_plugin_name, &sub_plugin_name);
match initialized_plugin {
Ok(mut initialized_plugin) => {
let format_result = initialized_plugin.for... | Rust | 0 |
atic>, interface: Interface<'static>, member: Member<'static>) {
description("Failed to call dbus method")
display("Failed to call dbus method for service: {:?}, path: {:?}, interface: {:?}, member: {:?}", bus, path, interface, member),
}
#[doc = "Dbus method call failed"]
... | Rust | 0 |
loat(start.as_millis() as f32))
}, 0)
},
}
}
extern crate quack;
use quack::*;
use std::cell::RefCell;
#[derive(Copy, Clone, Debug)]
pub struct Tire {pub winter: bool}
#[derive(Debug, Clone)]
pub struct Car {pub tires: [Tire; 4]}
pub struct LeftFrontTire(pub Tire);
pub struct RightFrontTire... | Rust | 0 |
s.
///
/// This does not encode the type descriptor nor the associated length.
/// Prefer [`TimestampBinaryEncoder::encode_timestamp_value`] for that.
fn encode_timestamp(&mut self, timestamp: &Timestamp) -> IonResult<usize>;
/// Encodes a [`Timestamp`] as an Ion value with the type descriptor and ... | Rust | 0 |
items(buffer: &[Self::Cell]) -> &[Self] {
buffer
}
fn slice_from_items_mut(buffer: &mut [Self::Cell]) -> &mut [Self] {
buffer
}
fn slice_to_items(buffer: &[Self]) -> &[Self::Cell] {
buffer
}
fn slice_to_items_mut(buffer: &mut [Self]) -> &mut [Self::Cell] {
buffer
... | Rust | 0 |
_version, ref mut future } => {
let (stream, version) = try_ready!(future.poll());
let version = match version {
Ok(version) => version,
Err(err) => return Ok((stream, Err(err.into())).into()),
};
if version.version() < self.min_version {
return Ok((stream, Err(Error::InvalidVersi... | Rust | 0 |
src/test/run-pass/syntax-extension-fmt.rs
#[cfg(test)]
mod test {
#[test]
fn fmt_slice() {
let s = "abc";
let _s = fmt!("%s", s);
}
}
<filename>src/lib.rs
mod error;
pub mod image;
mod utils;
use crate::image::{Bitdepth, DataType, Image, Metadata};
use error::Error;
use std::io::Cursor;
us... | Rust | 0 |
bitfield! {
#[derive(Clone, Copy, Eq, Hash, PartialEq)]
pub struct SYSTEM__THRESH_LOW(u16);
impl Debug;
u16;
pub get, set: 15, 0;
}
bitfield! {
#[derive(Clone, Copy, Eq, Hash, PartialEq)]
#[derive(Default)]
pub struct SYSTEM__THRESH_LOW_HI(u8);
impl Debug;
u8;
pub get, set... | Rust | 0 |
# Copyright (c) Lynxi Technologies Co., Ltd. All rights reserved.
# Copyright (c) China Nanhu Academy of Electronics and Information Technology. All rights reserved.
import lyngor as lyn
from torch import ops
from cann import CANN, CANN_apu
import cann
import os
root = os.getcwd()
for _ in range(3):
root = os.path... | Python | 1 |
ig))]
fn set_up_physics(mut rapier_config: ResMut<RapierConfiguration>) {
rapier_config.gravity = Vector::zeros();
rapier_config.scale = 36.;
info!(gravity = ?rapier_config.gravity, scale = ?rapier_config.scale, "configured rapier");
}
<reponame>ngirard/directwrite-rs
//! Safe bindings for DirectWrite in R... | Rust | 0 |
# richard -- video index system
# Copyright (C) 2012, 2013, 2014, 2015 richard contributors. See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the Licens... | Python | 1 |
pub mod transactions;
#![cfg_attr(docsrs, feature(doc_cfg))]
//! Ethereum types, cryptography and utilities.
//! _It is recommended to use the `utils`, `types` and `abi` re-exports instead of
//! the `core` module to simplify your imports._
//!
//! This library provides type definitions for Ethereum's main datatypes al... | Rust | 0 |
enchmarkId::new("compile", "lox"), &lox, |b, s| {
b.iter(|| compile_source(*s));
});
}
criterion_group!(benches, criterion_benchmark);
criterion_main!(benches);
<filename>src/config/mod.rs
pub mod client_api;
pub mod search;
pub mod attribute;
use std::vec;
use std::sync::Arc;
use egl_sys::ffi;
use platform::... | Rust | 0 |
schedule given enough time to run (controlled by `timeout`).
///
/// Because the scheduling problem is known to be NP-hard, it is believed that there is no
/// polynomial algorithm. Then it is not surprising that this implementation runs in `O(R^n)` where
/// `R` is the number of resources and `n` is again the number ... | Rust | 0 |
_W { w: self }
}
#[doc = "Bits 6:7 - SDCard/SDIO Bus Width"]
#[inline(always)]
pub fn sdcbus(&mut self) -> SDCBUS_W {
SDCBUS_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(b... | Rust | 0 |
entries of the inner policy dictionary apply for a given
instance of `.using(...)`, a runtime error is raised.
See `tests/example_strategies:generate_number` for another example.
"""
def _dict_ip_key_match(key: str, tags: Sequence[dp.Tag]) -> bool:
key_tags = key.split("&")
return set(key_tags).issubset(... | Python | 1 |
li(1.5, 8.0), 0.88522195804210983776635107858848816480298923071075222, 1e-13);
assert_almost_eq!(super::gamma_li(2.5, 1.0), 0.20053759629003473411039172879412733941722170263949, 1e-16);
assert_almost_eq!(super::gamma_li(2.5, 2.0), 0.59897957413602228465664030130712917348327070206302442, 1e-15);
... | Rust | 0 |
SPI_MODE_0);
try!(spi.configure(&options));
let o = Octasonic { spi: spi };
o.set_sensor_count(sensor_count as u8);
Ok(o)
}
pub fn get_protocol_version(&self) -> u8 {
self.send_receive(CMD_GET_PROTOCOL_VERSION, 0)
}
pub fn get_sensor_count(&self) -> u8 {
... | Rust | 0 |
_buf).map_err(|e| {
format!(
"failed to parse response from conductor as MessagePack: {}",
e
)
})
}
fn parse_holochain_response(response: ws::Message) -> Result<Vec<u8>, String> {
match parse_holochain_message(response)? {
Message::Response { data, .. } => Ok(dat... | Rust | 0 |
# Generated by Django 5.0.2 on 2024-03-14 13:04
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='ProjectDetails',
fields=[
... | Python | 1 |
# This file is part of Bertini 2.
#
# python/bertini/start_system/__init__.py 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.
#
# pyt... | Python | 1 |
return
exclude_group_options(parser, argv=self.argv, groups=['filestore', 'bluestore'])
self.args = parser.parse_args(self.argv)
# the unfortunate mix of one superset for both filestore and bluestore
# makes this validation cumbersome
if self.args.filestore:
if... | Python | 1 |
"""
Apply the delta weights on top of a base model.
code adapted from https://github.com/lm-sys/FastChat/blob/main/fastchat/model/apply_delta.py
Usage:
python3 apply_delta.py --base-model-path {your_base_model_path} --target-model-path {your_target_model_path} --delta-path {downloaded_delta_weights}
"""
import argpar... | Python | 1 |
import streamlit as st
st.set_page_config(page_title="Saurabh AI chartboat", page_icon="๐ฌ", layout="centered")
from aichart import webfun
st.markdown("""
<style>
.sidebar .sidebar-content {
padding-top: 10px;
}
.sidebar radio {
background-color: #4CAF50;
... | Python | 1 |
from script.view.aplicacion_vista import Aplicacion
class ControladorAplicacion :
def __init__(self) :
self.__vista_aplicacion = Aplicacion()
def controlador_iniciar(self):
self.__vista_aplicacion.iniciar() | Python | 1 |
#!/usr/bin/python
import sys
from optparse import OptionParser
def main():
parser = OptionParser(usage='usage: %prog [options]')
parser.description = "Solve AOC puzzle."
parser.add_option('-v', '--verbose', action='store_true',
dest='verbose', default=False,
h... | Python | 1 |
import datetime as dt
import yfinance as yf
import streamlit as st
import plotly.graph_objects as go
from langchain_core.tools import tool
@tool
def tool_mo(ticker:str, start_date: dt.time, end_date: dt.time):
''' This program allows you to visualize McClellan Oscillator(MO) for a selected ticker. '''
symbol... | Python | 1 |
oofs_contract(
web3: &Web3<Http>,
config: &MoonbeamConfig,
) -> Result<Contract<Http>> {
let addr = if config.contract.starts_with("0x") {
&config.contract[2..]
} else {
&config.contract
};
let hex_res =
hex::decode(addr).map_err(|e| Error::InvalidEthereumAddress(format!("{:}", e)))?;
if hex_res... | Rust | 0 |
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1-or-later
# pylint: disable=broad-except
import logging
import sys
import pexpect
def main():
# TODO: drop once https://bugs.debian.org/1075733 is fixed
with open("/usr/lib/os-release") as f:
for line in f:
if line.startswith("ID=... | Python | 1 |
CCESS
}
Ok(Err(e)) => {
logging::log_error(&e);
ffi::OPENVPN_PLUGIN_FUNC_ERROR
}
Err(e) => {
logging::log_panic("plugin open", &e);
ffi::OPENVPN_PLUGIN_FUNC_ERROR
}
}
}
/// Internal helper function. This function should never ... | Rust | 0 |
from celery import shared_task
from django.conf import settings
from django.core.mail import EmailMultiAlternatives, send_mail
@shared_task
def send_verification_email(email, token):
verification_url = f"{settings.FRONTEND_URL}/verify-email/{token}/"
subject = "Verify Your EdConnect Account"
from_email =... | Python | 1 |
self.speed,
};
*stat = stat.saturating_add(by);
}
}
/// The total count of stat values in a [StatSet].
pub fn total(&self) -> Stat {
self.hp
.saturating_add(self.atk)
.saturating_add(self.def)
.saturating_add(self.sp_atk)
... | Rust | 0 |
er = f.size();
logo_container.height = 6;
// logo_container.width = logo_container.width / 2;
let mut options_container = f.size();
options_container.height = 6;
options_container.width = options_container.width / 2 - h_padding;
options_container.x = logo_container.width + h_padding;
let mut main_c... | Rust | 0 |
_id_by_script_hash(&self.account_script_hash)?
.ok_or_else(|| anyhow!("[eoa mapping] eth register(tx builder) account not found"))?;
let registry_account_id = state
.get_account_id_by_script_hash(&self.registry_script_hash)?
.ok_or_else(|| anyhow!("[eoa mapping] eth registry... | Rust | 0 |
ut.squeeze(0)
item_embeddings_timeseries[j, :] = item_embedding_output.squeeze(0)
# CALCULATE LOSS TO MAINTAIN TEMPORAL SMOOTHNESS
loss += MSELoss(item_embedding_output, item_embedding_input.detach())
loss += MSELoss(user_embedding_output, user_embedding_input.detach())
# CALCU... | Python | 1 |
= 0:
p = 0
else:
p = np.max(prec[rec >= t])
ap = ap + p / 11.
else:
# correct AP calculation
# first append sentinel values at the end
mrec = np.concatenate(([0.], rec, [1.]))
mpre = np.concatenate(([0.], prec, [0.]))
#... | Python | 1 |