text string | label_name string | labels int64 |
|---|---|---|
import random as r
def bestK(cost, neighbors, k, p):
if p < 0.2:
a = 0
b = 0.2
elif p < 0.4:
a = 0.2
b = 0.4
elif p < 0.6:
a = 0.4
b = 0.6
elif p < 0.8:
a = 0.6
b = 0.8
else:
a = 0.8
b = 1
a *= sum(cost) / len(cost)... | Python | 1 |
"""task_queue base_result not null and check lowercase
Revision ID: 88182596f844
Revises: 79604526d271
Create Date: 2021-05-05 09:30:04.702155
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import func, column
# revision identifiers, used by Alembic.
revision = "88182596f844"
down_revision ... | Python | 1 |
import yaml
slerp_yaml_config = """
slices:
- sources:
- model: /nas-wulanchabu/shitianyuan.sty/alignment-handbook/outputs_self_improving/1001/1001-dpo-iter-2-temp-0.8-sampling-5-lr-7.0e-7-bs-128-beta-0.01-FsfairX-save_datasets_with_len_control_for_chosen_by_avg_rm_score-2w/FsfairX-iter-1/last_checkpoint
... | Python | 1 |
Output = Double;
/// Negates this `Double`, producing a new `Double`.
///
/// This implements the unary `-` operator for `Double`s.
///
/// # Examples
/// ```
/// # use qd::{dd, Double};
/// let x = -Double::PI;
/// let expected = dd!("-3.1415926535897932384626433832795");
///
... | Rust | 0 |
# Examples
```
let mgrs = Mgrs::from("31U DQ 448251 11932");
let utm = mgrs.as_utm();
assert_eq!(&*utm.as_string(6), "31 N 448251 541193");
```
*/
// get easting specified by e100k
let e100k_num = mgrs.gsid_100k.col.as_meters_from_zone(mgrs.gzd.zon... | Rust | 0 |
use syntax::rowan::{TextRange, TextSize};
use syntax::{token::Token, SyntaxKind as SK};
/// A lexed input.
#[derive(Debug)]
pub struct Lex<'input> {
/// The tokens of the input.
///
/// Concatenated in sequence, they form the original input.
pub tokens: Vec<Token<'input, SK>>,
/// The errors encountered.
... | Rust | 0 |