I hereby claim:
- I am qnbhd on github.
- I am qnbhd (https://keybase.io/qnbhd) on keybase.
- I have a public key ASA43BDNrbD0QphwAcxyP40LkZkyc6jNgY73sOFTpjmxmwo
To claim this, I am signing this object:
import abc | |
import math | |
import random | |
from abc import ABCMeta | |
from typing import Type | |
import pandas | |
def int_float_mapping(n: int, x_min: float, x_max: float, max_value: int) -> float: | |
return x_min + n * (x_max - x_min) / max_value |
# author: qnbhd | |
def strlen(__s): | |
from unittest.mock import patch | |
import optparse | |
from io import StringIO | |
import sys | |
import os | |
import contextlib |
func __InBoxMathFunc(w Executor, curNode Node, argCount, line int, functor func(x float64) float64) { | |
opNode, _ := w.Stack.Pop() | |
var target float64 | |
switch op := opNode.(type) { | |
case *IntNumber: | |
target = float64(op.Value) | |
case *FloatNumber: | |
target = op.Value |
// math package | |
declare sin(x float) -> float { | |
return __builtin__sin(x) | |
} | |
declare cos(x float) -> float { | |
return __builtin__cos(x) | |
} |
require @builtins.math | |
declare sin2x(x float) -> float { | |
return sin(2*x) | |
} | |
println(sin2x(0.5)) |
var x := 6 | |
var y := 6.89 | |
// if-else and logical expressions | |
if (x > 3) && (y > 6) { | |
println("true") | |
} else { | |
println("false") | |
} |
declare pow(a, n) { | |
var result := 1 | |
for it in [0; n) { | |
result = result * a | |
} | |
return result | |
} | |
var u := pow(10, 5) |
I hereby claim:
To claim this, I am signing this object: