code stringlengths 114 1.05M | path stringlengths 3 312 | quality_prob float64 0.5 0.99 | learning_prob float64 0.2 1 | filename stringlengths 3 168 | kind stringclasses 1 value |
|---|---|---|---|---|---|
package server
type L2MeasCellUeInfo struct {
AssociateId *AssociateId `json:"associateId,omitempty"`
// It indicates the data volume of the downlink GBR traffic of a UE, as defined in ETSI TS 136 314 [i.11].
DlGbrDataVolumeUe int32 `json:"dl_gbr_data_volume_ue,omitempty"`
// It indicates the packet delay of the downlink GBR traffic of a UE, as defined in ETSI TS 136 314 [i.11].
DlGbrDelayUe int32 `json:"dl_gbr_delay_ue,omitempty"`
// It indicates the packet discard rate in percentage of the downlink GBR traffic of a UE, as defined in ETSI TS 136 314 [i.11].
DlGbrPdrUe int32 `json:"dl_gbr_pdr_ue,omitempty"`
// It indicates the scheduled throughput of the downlink GBR traffic of a UE, as defined in ETSI TS 136 314 [i.11].
DlGbrThroughputUe int32 `json:"dl_gbr_throughput_ue,omitempty"`
// It indicates the data volume of the downlink non-GBR traffic of a UE, as defined in ETSI TS 136 314 [i.11].
DlNongbrDataVolumeUe int32 `json:"dl_nongbr_data_volume_ue,omitempty"`
// It indicates the packet delay of the downlink non-GBR traffic of a UE, as defined in ETSI TS 136 314 [i.11].
DlNongbrDelayUe int32 `json:"dl_nongbr_delay_ue,omitempty"`
// It indicates the packet discard rate in percentage of the downlink nonGBR traffic of a UE, as defined in ETSI TS 136 314 [i.11].
DlNongbrPdrUe int32 `json:"dl_nongbr_pdr_ue,omitempty"`
// It indicates the scheduled throughput of the downlink nonGBR traffic of a UE, as defined in ETSI TS 136 314 [i.11].
DlNongbrThroughputUe int32 `json:"dl_nongbr_throughput_ue,omitempty"`
Ecgi *Ecgi `json:"ecgi,omitempty"`
// It indicates the data volume of the uplink GBR traffic of a UE, as defined in ETSI TS 136 314 [i.11].
UlGbrDataVolumeUe int32 `json:"ul_gbr_data_volume_ue,omitempty"`
// It indicates the packet delay of the uplink GBR traffic of a UE, as defined in ETSI TS 136 314 [i.11].
UlGbrDelayUe int32 `json:"ul_gbr_delay_ue,omitempty"`
// It indicates the packet discard rate in percentage of the uplink GBR traffic of a UE, as defined in ETSI TS 136 314 [i.11].
UlGbrPdrUe int32 `json:"ul_gbr_pdr_ue,omitempty"`
// It indicates the scheduled throughput of the uplink GBR traffic of a UE, as defined in ETSI TS 136 314 [i.11].
UlGbrThroughputUe int32 `json:"ul_gbr_throughput_ue,omitempty"`
// It indicates the data volume of the uplink non-GBR traffic of a UE, as defined in ETSI TS 136 314 [i.11].
UlNongbrDataVolumeUe int32 `json:"ul_nongbr_data_volume_ue,omitempty"`
// It indicates the packet delay of the uplink non-GBR traffic of a UE, as defined in ETSI TS 136 314 [i.11].
UlNongbrDelayUe int32 `json:"ul_nongbr_delay_ue,omitempty"`
// It indicates the packet discard rate in percentage of the uplink nonGBR traffic of a UE, as defined in ETSI TS 136 314 [i.11].
UlNongbrPdrUe int32 `json:"ul_nongbr_pdr_ue,omitempty"`
// It indicates the scheduled throughput of the uplink non-GBR traffic of a UE, as defined in ETSI TS 136 314 [i.11].
UlNongbrThroughputUe int32 `json:"ul_nongbr_throughput_ue,omitempty"`
} | go-apps/meep-rnis/server/model_l2_meas_cell_ue_info.go | 0.537041 | 0.486454 | model_l2_meas_cell_ue_info.go | starcoder |
package main
import (
"fmt"
"reflect"
"strings"
)
type TypeClass func(a reflect.Kind) bool
func isParameterized(a reflect.Kind) bool {
for _, v := range parameterizedKinds {
if v == a {
return true
}
}
return false
}
func isNotParameterized(a reflect.Kind) bool { return !isParameterized(a) }
func isRangeable(a reflect.Kind) bool {
for _, v := range rangeable {
if v == a {
return true
}
}
return false
}
func isSpecialized(a reflect.Kind) bool {
for _, v := range specialized {
if v == a {
return true
}
}
return false
}
func isNumber(a reflect.Kind) bool {
for _, v := range number {
if v == a {
return true
}
}
return false
}
func isSignedNumber(a reflect.Kind) bool {
for _, v := range signedNumber {
if v == a {
return true
}
}
return false
}
func isNonComplexNumber(a reflect.Kind) bool {
for _, v := range nonComplexNumber {
if v == a {
return true
}
}
return false
}
func isAddable(a reflect.Kind) bool {
if a == reflect.String {
return true
}
return isNumber(a)
}
func isComplex(a reflect.Kind) bool {
if a == reflect.Complex128 || a == reflect.Complex64 {
return true
}
return false
}
func panicsDiv0(a reflect.Kind) bool {
for _, v := range div0panics {
if v == a {
return true
}
}
return false
}
func isEq(a reflect.Kind) bool {
for _, v := range elEq {
if v == a {
return true
}
}
return false
}
func isOrd(a reflect.Kind) bool {
for _, v := range elOrd {
if v == a {
return true
}
}
return false
}
func isBoolRepr(a reflect.Kind) bool {
for _, v := range boolRepr {
if v == a {
return true
}
}
return false
}
func mathPkg(a reflect.Kind) string {
if a == reflect.Float64 {
return "math."
}
if a == reflect.Float32 {
return "math32."
}
if a == reflect.Complex64 || a == reflect.Complex128 {
return "cmplx."
}
return ""
}
func vecPkg(a reflect.Kind) string {
if a == reflect.Float64 {
return "vecf64."
}
if a == reflect.Float32 {
return "vecf32."
}
return ""
}
func getalias(name string) string {
if nice, ok := nameMaps[name]; ok {
return nice
}
return name
}
func interfaceName(name string) string {
switch name {
case "Square":
return "Squarer"
case "Cube":
return "Cuber"
case "Eq", "ElEq":
return "ElEqer"
case "Ne", "ElNe":
return "ElEqer"
default:
return name + "er"
}
}
func bitSizeOf(a reflect.Kind) string {
switch a {
case reflect.Int, reflect.Uint:
return "0"
case reflect.Int8, reflect.Uint8:
return "8"
case reflect.Int16, reflect.Uint16:
return "16"
case reflect.Int32, reflect.Uint32, reflect.Float32:
return "32"
case reflect.Int64, reflect.Uint64, reflect.Float64:
return "64"
}
return "UNKNOWN BIT SIZE"
}
func trueValue(a reflect.Kind) string {
switch a {
case reflect.String:
return `"true"`
case reflect.Bool:
return "true"
default:
return "1"
}
}
func falseValue(a reflect.Kind) string {
switch a {
case reflect.String:
return `"false"`
case reflect.Bool:
return "false"
default:
return "0"
}
}
func isFloat(a reflect.Kind) bool {
if a == reflect.Float32 || a == reflect.Float64 {
return true
}
return false
}
func isFloatCmplx(a reflect.Kind) bool {
if a == reflect.Float32 || a == reflect.Float64 || a == reflect.Complex64 || a == reflect.Complex128 {
return true
}
return false
}
func isntFloat(a reflect.Kind) bool { return !isFloat(a) }
func isntComplex(a reflect.Kind) bool { return !isComplex(a) }
func short(a reflect.Kind) string {
return shortNames[a]
}
func clean(a string) string {
if a == "unsafe.pointer" {
return "unsafe.Pointer"
}
return a
}
func unexport(a string) string {
return strings.ToLower(string(a[0])) + a[1:]
}
func strip(a string) string {
return strings.Replace(a, ".", "", -1)
}
func reflectKind(a reflect.Kind) string {
return strip(strings.Title(a.String()))
}
func asType(a reflect.Kind) string {
return clean(a.String())
}
func sliceOf(a reflect.Kind) string {
s := fmt.Sprintf("%ss()", strings.Title(a.String()))
return strip(clean(s))
}
func getOne(a reflect.Kind) string {
return fmt.Sprintf("Get%s", short(a))
}
func setOne(a reflect.Kind) string {
return fmt.Sprintf("Set%s", short(a))
}
func filter(a []reflect.Kind, is func(reflect.Kind) bool) (retVal []reflect.Kind) {
for _, k := range a {
if is(k) {
retVal = append(retVal, k)
}
}
return
} | genlib2/genlib.go | 0.723114 | 0.444987 | genlib.go | starcoder |
package lisp
import (
"errors"
"fmt"
)
type Environment struct {
Parent *Environment
values map[IdentifierNode]Node
}
func NewEnvironment(parent *Environment) Environment {
return Environment{parent, make(map[IdentifierNode]Node)}
}
func (env *Environment) Get(id IdentifierNode) Node {
node, ok := env.values[id]
if ok {
return node
}
if env.Parent != nil {
return env.Parent.Get(id)
}
return nil
}
func (env *Environment) Put(id IdentifierNode, value Node) {
env.values[id] = value
}
func (env *Environment) Def(id IdentifierNode, value Node) {
if env.Parent != nil {
env.Parent.Def(id, value)
return
}
env.Put(id, value)
}
func (env *Environment) AddBuiltins() {
env.Def("+", FunctionNode{Builtin: Add})
env.Def("-", FunctionNode{Builtin: Sub})
env.Def("*", FunctionNode{Builtin: Mul})
env.Def("/", FunctionNode{Builtin: Div})
env.Def("=", FunctionNode{Builtin: Equal})
env.Def("<", FunctionNode{Builtin: Less})
env.Def("<=", FunctionNode{Builtin: LessEqual})
env.Def(">", FunctionNode{Builtin: More})
env.Def(">=", FunctionNode{Builtin: MoreEqual})
env.Def("%", FunctionNode{Builtin: Mod})
env.Def("import", FunctionNode{Builtin: Import})
env.Def("head", FunctionNode{Builtin: Head})
env.Def("tail", FunctionNode{Builtin: Tail})
env.Def("post", FunctionNode{Builtin: Post})
env.Def("init", FunctionNode{Builtin: Init})
env.Def("list", FunctionNode{Builtin: List})
env.Def("eval", FunctionNode{Builtin: Eval})
env.Def("join", FunctionNode{Builtin: Join})
env.Def("def", FunctionNode{Builtin: Def})
env.Def("let", FunctionNode{Builtin: Let})
env.Def("fn", FunctionNode{Builtin: Fn})
env.Def("if", FunctionNode{Builtin: If})
}
func (e ExpressionNode) EvalAsSExpr(env *Environment) Node {
if len(e.Nodes) == 0 {
return e
}
nodes := make([]Node, len(e.Nodes))
for i, node := range e.Nodes {
evaluated := node.Evaluate(env)
_, ok := evaluated.(ErrorNode)
if ok {
return evaluated
}
nodes[i] = evaluated
}
if len(nodes) == 1 {
return nodes[0]
}
op := nodes[0]
args := nodes[1:]
fun, ok := op.(FunctionNode)
if !ok {
return ErrorNode{errors.New("S-Expressions should start with an function")}
}
return fun.call(env, args)
}
func (e ExpressionNode) Evaluate(env *Environment) Node {
if e.Type == QExpression {
return e
}
return e.EvalAsSExpr(env)
}
func (i IdentifierNode) Evaluate(env *Environment) Node {
node := env.Get(i)
if node == nil {
return ErrorNode{errors.New("unknown identifier " + string(i))}
}
return node
}
func (v NumberNode) Evaluate(_ *Environment) Node {
return v
}
func (s StringNode) Evaluate(_ *Environment) Node {
return s
}
func (e ErrorNode) Evaluate(_ *Environment) Node {
return e
}
func (f FunctionNode) call(env *Environment, args []Node) Node {
if f.Builtin != nil {
return f.Builtin(env, args)
}
formals := f.Formals
funEnv := NewEnvironment(env)
f.Environment = &funEnv
for i, arg := range args {
if len(formals) == 0 {
return ErrorNode{fmt.Errorf("expected %v arguments, got %v", len(f.Formals), len(args))}
}
ident := formals[0]
formals = formals[1:]
if ident == "&" {
if len(formals) != 1 {
return ErrorNode{fmt.Errorf("expected 1 variadic argument, got %v", len(formals))}
}
ident = formals[0]
formals = formals[:0]
f.Environment.Put(ident, ExpressionNode{QExpression, args[i:]})
break
}
f.Environment.Put(ident, arg)
}
if len(formals) == 2 && formals[0] == "&" {
f.Environment.Put(formals[1], ExpressionNode{QExpression, make([]Node, 0)})
formals = formals[:0]
}
if len(formals) == 0 {
return f.Body.EvalAsSExpr(f.Environment)
}
return FunctionNode{
Builtin: nil,
Environment: f.Environment,
Formals: formals,
Body: f.Body,
}
}
func (f FunctionNode) Evaluate(_ *Environment) Node {
return f
}
func Evaluate(env *Environment, input string, multi bool) (Node, error) {
tokens, err := Tokenize(input)
if err != nil {
return nil, fmt.Errorf("tokenization error: %v", err)
}
if multi {
expression, err := ParseExpression(tokens, QExpression)
if err != nil {
return nil, fmt.Errorf("parsing error: %v", err)
}
for _, node := range expression.Nodes {
out := node.Evaluate(env)
err, ok := out.(ErrorNode)
if ok {
return nil, err.Error
}
}
return ExpressionNode{Type: SExpression, Nodes: make([]Node, 0)}, nil
} else {
expression, err := ParseExpression(tokens, SExpression)
if err != nil {
return nil, fmt.Errorf("parsing error: %v", err)
}
return expression.Evaluate(env), nil
}
} | lisp/evaluate.go | 0.522446 | 0.4575 | evaluate.go | starcoder |
package rulebasedconv
/*
Note:
Many re-implementation of Avro Classic Phonetic saw the JavaScript implementation
(https://github.com/torifat/jsAvroPhonetic/blob/master/src/avro-lib.js) and thought it might be a better idea to extract
the rules in a separate JSON file to make Avro Phonetic more configurable by the users.
But I am going to keep it hardcoded like this.
Reasons:
- In practice, that customization never happened. These rules are complex and may lead to subtle errors and end users
never want that kind of configurability.
- Moreover, these rules are also associated with the muscle memory of the Avro Keyboard (IME) users.
If you arbitrarily change them, they are no longer "Avro Phonetic".
- It's more important to write the test-cases to check if as a whole Avro Phonetic conversion is working as
expected from the user's perspective.
*/
const suffix = "suffix"
const prefix = "prefix"
const vowel = "vowel"
const notVowel = "!vowel"
const consonant = "consonant"
const notConsonant = "!consonant"
const punctuation = "punctuation"
const notPunctuation = "!punctuation"
const exactly = "exactly"
const notExactly = "!exactly"
var avroClassicPhoneticRules = []rule{
// match-replace rules are most basic form of a rule. If we find this match, we replace it with that in the output
{
// match is always case-sensitive. That's why we use fixCase function on the input string before trying to transliterate them.
match: "bhl",
replace: "ভ্ল",
},
// More complex rules look like this. When we find a match like this , we first check if any exceptions are true.
// "thenReplace" from an exception block always gets more priority over plain "replace".
// If none of the exception conditions are true, it works as basic match-replace rule.
{
match: "a",
replace: "া",
exceptions: []exception{
{
// ifAllMatch works as "AND" for all the rules inside it. If all of them are true, "thenReplace" if this block takes place
// If any of the condition is false, we move on to the next exception ifAllMatch block.
ifAllMatch: []matchCondition{
{
when: prefix,
is: punctuation,
},
// The rule is supposed to read like:
// (Our current position is "a") and when the suffix (next characters after that) is not exactly "`"
{
when: suffix,
is: notExactly,
value: "`",
},
},
thenReplace: "আ",
},
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: notConsonant,
},
{
when: prefix,
is: notExactly,
value: "a",
},
{
when: suffix,
is: notExactly,
value: "`",
},
},
thenReplace: bnYYA + "া",
},
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: exactly,
value: "a",
},
{
when: suffix,
is: notExactly,
value: "`",
},
},
thenReplace: "আ",
},
},
},
{
match: "psh",
replace: "পশ",
},
{
match: "bdh",
replace: "ব্ধ",
},
{
match: "bj",
replace: "ব্জ",
},
{
match: "bd",
replace: "ব্দ",
},
{
match: "bb",
replace: "ব্ব",
},
{
match: "bl",
replace: "ব্ল",
},
{
match: "bh",
replace: "ভ",
},
{
match: "vl",
replace: "ভ্ল",
},
{
match: "b",
replace: "ব",
},
{
match: "v",
replace: "ভ",
},
{
match: "cNG",
replace: "চ্ঞ",
},
{
match: "cch",
replace: "চ্ছ",
},
{
match: "cc",
replace: "চ্চ",
},
{
match: "ch",
replace: "ছ",
},
{
match: "c",
replace: "চ",
},
{
match: "dhn",
replace: "ধ্ন",
},
{
match: "dhm",
replace: "ধ্ম",
},
{
match: "dgh",
replace: "দ্ঘ",
},
{
match: "ddh",
replace: "দ্ধ",
},
{
match: "dbh",
replace: "দ্ভ",
},
{
match: "dv",
replace: "দ্ভ",
},
{
match: "dm",
replace: "দ্ম",
},
{
match: "DD",
replace: "ড্ড",
},
{
match: "Dh",
replace: "ঢ",
},
{
match: "dh",
replace: "ধ",
},
{
match: "dg",
replace: "দ্গ",
},
{
match: "dd",
replace: "দ্দ",
},
{
match: "D",
replace: "ড",
},
{
match: "d",
replace: "দ",
},
{
match: "...",
replace: "...",
},
{
match: ".`",
replace: ".",
},
{
match: "..",
replace: "।।",
},
{
match: ".",
replace: "।",
},
{
match: "ghn",
replace: "ঘ্ন",
},
{
match: "Ghn",
replace: "ঘ্ন",
},
{
match: "gdh",
replace: "গ্ধ",
},
{
match: "Gdh",
replace: "গ্ধ",
},
{
match: "gN",
replace: "গ্ণ",
},
{
match: "GN",
replace: "গ্ণ",
},
{
match: "gn",
replace: "গ্ন",
},
{
match: "Gn",
replace: "গ্ন",
},
{
match: "gm",
replace: "গ্ম",
},
{
match: "Gm",
replace: "গ্ম",
},
{
match: "gl",
replace: "গ্ল",
},
{
match: "Gl",
replace: "গ্ল",
},
{
match: "gg",
replace: "জ্ঞ",
},
{
match: "GG",
replace: "জ্ঞ",
},
{
match: "Gg",
replace: "জ্ঞ",
},
{
match: "gG",
replace: "জ্ঞ",
},
{
match: "gh",
replace: "ঘ",
},
{
match: "Gh",
replace: "ঘ",
},
{
match: "g",
replace: "গ",
},
{
match: "G",
replace: "গ",
},
{
match: "hN",
replace: "হ্ণ",
},
{
match: "hn",
replace: "হ্ন",
},
{
match: "hm",
replace: "হ্ম",
},
{
match: "hl",
replace: "হ্ল",
},
{
match: "h",
replace: "হ",
},
{
match: "jjh",
replace: "জ্ঝ",
},
{
match: "jNG",
replace: "জ্ঞ",
},
{
match: "jh",
replace: "ঝ",
},
{
match: "jj",
replace: "জ্জ",
},
{
match: "j",
replace: "জ",
},
{
match: "J",
replace: "জ",
},
{
match: "kkhN",
replace: "ক্ষ্ণ",
},
{
match: "kShN",
replace: "ক্ষ্ণ",
},
{
match: "kkhm",
replace: "ক্ষ্ম",
},
{
match: "kShm",
replace: "ক্ষ্ম",
},
{
match: "kxN",
replace: "ক্ষ্ণ",
},
{
match: "kxm",
replace: "ক্ষ্ম",
},
{
match: "kkh",
replace: "ক্ষ",
},
{
match: "kSh",
replace: "ক্ষ",
},
{
match: "ksh",
replace: "কশ",
},
{
match: "kx",
replace: "ক্ষ",
},
{
match: "kk",
replace: "ক্ক",
},
{
match: "kT",
replace: "ক্ট",
},
{
match: "kt",
replace: "ক্ত",
},
{
match: "kl",
replace: "ক্ল",
},
{
match: "ks",
replace: "ক্স",
},
{
match: "kh",
replace: "খ",
},
{
match: "k",
replace: "ক",
},
{
match: "lbh",
replace: "ল্ভ",
},
{
match: "ldh",
replace: "ল্ধ",
},
{
match: "lkh",
replace: "লখ",
},
{
match: "lgh",
replace: "লঘ",
},
{
match: "lph",
replace: "লফ",
},
{
match: "lk",
replace: "ল্ক",
},
{
match: "lg",
replace: "ল্গ",
},
{
match: "lT",
replace: "ল্ট",
},
{
match: "lD",
replace: "ল্ড",
},
{
match: "lp",
replace: "ল্প",
},
{
match: "lv",
replace: "ল্ভ",
},
{
match: "lm",
replace: "ল্ম",
},
{
match: "ll",
replace: "ল্ল",
},
{
match: "lb",
replace: "ল্ব",
},
{
match: "l",
replace: "ল",
},
{
match: "mth",
replace: "ম্থ",
},
{
match: "mph",
replace: "ম্ফ",
},
{
match: "mbh",
replace: "ম্ভ",
},
{
match: "mpl",
replace: "মপ্ল",
},
{
match: "mn",
replace: "ম্ন",
},
{
match: "mp",
replace: "ম্প",
},
{
match: "mv",
replace: "ম্ভ",
},
{
match: "mm",
replace: "ম্ম",
},
{
match: "ml",
replace: "ম্ল",
},
{
match: "mb",
replace: "ম্ব",
},
{
match: "mf",
replace: "ম্ফ",
},
{
match: "m",
replace: "ম",
},
{
match: "0",
replace: "০",
},
{
match: "1",
replace: "১",
},
{
match: "2",
replace: "২",
},
{
match: "3",
replace: "৩",
},
{
match: "4",
replace: "৪",
},
{
match: "5",
replace: "৫",
},
{
match: "6",
replace: "৬",
},
{
match: "7",
replace: "৭",
},
{
match: "8",
replace: "৮",
},
{
match: "9",
replace: "৯",
},
{
match: "NgkSh",
replace: "ঙ্ক্ষ",
},
{
match: "Ngkkh",
replace: "ঙ্ক্ষ",
},
{
match: "NGch",
replace: "ঞ্ছ",
},
{
match: "Nggh",
replace: "ঙ্ঘ",
},
{
match: "Ngkh",
replace: "ঙ্খ",
},
{
match: "NGjh",
replace: "ঞ্ঝ",
},
{
match: "ngOU",
replace: "ঙ্গৌ",
},
{
match: "ngOI",
replace: "ঙ্গৈ",
},
{
match: "Ngkx",
replace: "ঙ্ক্ষ",
},
{
match: "NGc",
replace: "ঞ্চ",
},
{
match: "nch",
replace: "ঞ্ছ",
},
{
match: "njh",
replace: "ঞ্ঝ",
},
{
match: "ngh",
replace: "ঙ্ঘ",
},
{
match: "Ngk",
replace: "ঙ্ক",
},
{
match: "Ngx",
replace: "ঙ্ষ",
},
{
match: "Ngg",
replace: "ঙ্গ",
},
{
match: "Ngm",
replace: "ঙ্ম",
},
{
match: "NGj",
replace: "ঞ্জ",
},
{
match: "ndh",
replace: "ন্ধ",
},
{
match: "nTh",
replace: "ন্ঠ",
},
{
match: "NTh",
replace: "ণ্ঠ",
},
{
match: "nth",
replace: "ন্থ",
},
{
match: "nkh",
replace: "ঙ্খ",
},
{
match: "ngo",
replace: "ঙ্গ",
},
{
match: "nga",
replace: "ঙ্গা",
},
{
match: "ngi",
replace: "ঙ্গি",
},
{
match: "ngI",
replace: "ঙ্গী",
},
{
match: "ngu",
replace: "ঙ্গু",
},
{
match: "ngU",
replace: "ঙ্গূ",
},
{
match: "nge",
replace: "ঙ্গে",
},
{
match: "ngO",
replace: "ঙ্গো",
},
{
match: "NDh",
replace: "ণ্ঢ",
},
{
match: "nsh",
replace: "নশ",
},
{
match: "Ngr",
replace: "ঙর",
},
{
match: "NGr",
replace: "ঞর",
},
{
match: "ngr",
replace: "ংর",
},
{
match: "nj",
replace: "ঞ্জ",
},
{
match: "Ng",
replace: "ঙ",
},
{
match: "NG",
replace: "ঞ",
},
{
match: "nk",
replace: "ঙ্ক",
},
{
match: "ng",
replace: "ং",
},
{
match: "nn",
replace: "ন্ন",
},
{
match: "NN",
replace: "ণ্ণ",
},
{
match: "Nn",
replace: "ণ্ন",
},
{
match: "nm",
replace: "ন্ম",
},
{
match: "Nm",
replace: "ণ্ম",
},
{
match: "nd",
replace: "ন্দ",
},
{
match: "nT",
replace: "ন্ট",
},
{
match: "NT",
replace: "ণ্ট",
},
{
match: "nD",
replace: "ন্ড",
},
{
match: "ND",
replace: "ণ্ড",
},
{
match: "nt",
replace: "ন্ত",
},
{
match: "ns",
replace: "ন্স",
},
{
match: "nc",
replace: "ঞ্চ",
},
{
match: "n",
replace: "ন",
},
{
match: "N",
replace: "ণ",
},
{
match: "OI`",
replace: "ৈ",
},
{
match: "OU`",
replace: "ৌ",
},
{
match: "O`",
replace: "ো",
},
{
match: "OI",
replace: "ৈ",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: notConsonant,
},
},
thenReplace: "ঐ",
},
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: punctuation,
},
},
thenReplace: "ঐ",
},
},
},
{
match: "OU",
replace: "ৌ",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: notConsonant,
},
},
thenReplace: "ঔ",
},
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: punctuation,
},
},
thenReplace: "ঔ",
},
},
},
{
match: "O",
replace: "ো",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: notConsonant,
},
},
thenReplace: "ও",
},
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: punctuation,
},
},
thenReplace: "ও",
},
},
},
{
match: "phl",
replace: "ফ্ল",
},
{
match: "pT",
replace: "প্ট",
},
{
match: "pt",
replace: "প্ত",
},
{
match: "pn",
replace: "প্ন",
},
{
match: "pp",
replace: "প্প",
},
{
match: "pl",
replace: "প্ল",
},
{
match: "ps",
replace: "প্স",
},
{
match: "ph",
replace: "ফ",
},
{
match: "fl",
replace: "ফ্ল",
},
{
match: "f",
replace: "ফ",
},
{
match: "p",
replace: "প",
},
{
match: "rri`",
replace: "ৃ",
},
{
match: "rri",
replace: "ৃ",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: notConsonant,
},
},
thenReplace: "ঋ",
},
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: punctuation,
},
},
thenReplace: "ঋ",
},
},
},
{
match: "rrZ",
replace: "রর্য",
},
{
match: "rry",
replace: "রর্য",
},
{
match: "rZ",
replace: "র্য",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: consonant,
},
{
when: prefix,
is: notExactly,
value: "r",
},
{
when: prefix,
is: notExactly,
value: "y",
},
{
when: prefix,
is: notExactly,
value: "w",
},
{
when: prefix,
is: notExactly,
value: "x",
},
},
thenReplace: "্র্য",
},
},
},
{
match: "ry",
replace: "র্য",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: consonant,
},
{
when: prefix,
is: notExactly,
value: "r",
},
{
when: prefix,
is: notExactly,
value: "y",
},
{
when: prefix,
is: notExactly,
value: "w",
},
{
when: prefix,
is: notExactly,
value: "x",
},
},
thenReplace: "্র্য",
},
},
},
{
match: "rr",
replace: "রর",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: notConsonant,
},
{
when: suffix,
is: notVowel,
},
{
when: suffix,
is: notExactly,
value: "r",
},
{
when: suffix,
is: notPunctuation,
},
},
thenReplace: "র্",
},
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: consonant,
},
{
when: prefix,
is: notExactly,
value: "r",
},
},
thenReplace: "্রর",
},
},
},
{
match: "Rg",
replace: bnRRA + "্গ",
},
{
match: "Rh",
replace: bnRHA,
},
{
match: "R",
replace: bnRRA,
},
{
match: "r",
replace: "র",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: consonant,
},
{
when: prefix,
is: notExactly,
value: "r",
},
{
when: prefix,
is: notExactly,
value: "y",
},
{
when: prefix,
is: notExactly,
value: "w",
},
{
when: prefix,
is: notExactly,
value: "x",
},
{
when: prefix,
is: notExactly,
value: "Z",
},
},
thenReplace: "্র",
},
},
},
{
match: "shch",
replace: "শ্ছ",
},
{
match: "ShTh",
replace: "ষ্ঠ",
},
{
match: "Shph",
replace: "ষ্ফ",
},
{
match: "Sch",
replace: "শ্ছ",
},
{
match: "skl",
replace: "স্ক্ল",
},
{
match: "skh",
replace: "স্খ",
},
{
match: "sth",
replace: "স্থ",
},
{
match: "sph",
replace: "স্ফ",
},
{
match: "shc",
replace: "শ্চ",
},
{
match: "sht",
replace: "শ্ত",
},
{
match: "shn",
replace: "শ্ন",
},
{
match: "shm",
replace: "শ্ম",
},
{
match: "shl",
replace: "শ্ল",
},
{
match: "Shk",
replace: "ষ্ক",
},
{
match: "ShT",
replace: "ষ্ট",
},
{
match: "ShN",
replace: "ষ্ণ",
},
{
match: "Shp",
replace: "ষ্প",
},
{
match: "Shf",
replace: "ষ্ফ",
},
{
match: "Shm",
replace: "ষ্ম",
},
{
match: "spl",
replace: "স্প্ল",
},
{
match: "sk",
replace: "স্ক",
},
{
match: "Sc",
replace: "শ্চ",
},
{
match: "sT",
replace: "স্ট",
},
{
match: "st",
replace: "স্ত",
},
{
match: "sn",
replace: "স্ন",
},
{
match: "sp",
replace: "স্প",
},
{
match: "sf",
replace: "স্ফ",
},
{
match: "sm",
replace: "স্ম",
},
{
match: "sl",
replace: "স্ল",
},
{
match: "sh",
replace: "শ",
},
{
match: "Sc",
replace: "শ্চ",
},
{
match: "St",
replace: "শ্ত",
},
{
match: "Sn",
replace: "শ্ন",
},
{
match: "Sm",
replace: "শ্ম",
},
{
match: "Sl",
replace: "শ্ল",
},
{
match: "Sh",
replace: "ষ",
},
{
match: "s",
replace: "স",
},
{
match: "S",
replace: "শ",
},
{
match: "oo`",
replace: "ু",
},
{
match: "oo",
replace: "ু",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: notConsonant,
},
{
when: suffix,
is: notExactly,
value: "`",
},
},
thenReplace: "উ",
},
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: punctuation,
},
{
when: suffix,
is: notExactly,
value: "`",
},
},
thenReplace: "উ",
},
},
},
{
match: "o`",
replace: "",
},
{
match: "oZ",
replace: "অ্য",
},
{
match: "o",
replace: "",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: vowel,
},
{
when: prefix,
is: notExactly,
value: "o",
},
},
thenReplace: "ও",
},
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: vowel,
},
{
when: prefix,
is: exactly,
value: "o",
},
},
thenReplace: "অ",
},
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: punctuation,
},
},
thenReplace: "অ",
},
},
},
{
match: "tth",
replace: "ত্থ",
},
{
match: "t``",
replace: "ৎ",
},
{
match: "TT",
replace: "ট্ট",
},
{
match: "Tm",
replace: "ট্ম",
},
{
match: "Th",
replace: "ঠ",
},
{
match: "tn",
replace: "ত্ন",
},
{
match: "tm",
replace: "ত্ম",
},
{
match: "th",
replace: "থ",
},
{
match: "tt",
replace: "ত্ত",
},
{
match: "T",
replace: "ট",
},
{
match: "t",
replace: "ত",
},
{
match: "aZ",
replace: "অ্যা",
},
{
match: "AZ",
replace: "অ্যা",
},
{
match: "a`",
replace: "া",
},
{
match: "A`",
replace: "া",
},
{
match: "i`",
replace: "ি",
},
{
match: "i",
replace: "ি",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: notConsonant,
},
{
when: suffix,
is: notExactly,
value: "`",
},
},
thenReplace: "ই",
},
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: punctuation,
},
{
when: suffix,
is: notExactly,
value: "`",
},
},
thenReplace: "ই",
},
},
},
{
match: "I`",
replace: "ী",
},
{
match: "I",
replace: "ী",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: notConsonant,
},
{
when: suffix,
is: notExactly,
value: "`",
},
},
thenReplace: "ঈ",
},
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: punctuation,
},
{
when: suffix,
is: notExactly,
value: "`",
},
},
thenReplace: "ঈ",
},
},
},
{
match: "u`",
replace: "ু",
},
{
match: "u",
replace: "ু",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: notConsonant,
},
{
when: suffix,
is: notExactly,
value: "`",
},
},
thenReplace: "উ",
},
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: punctuation,
},
{
when: suffix,
is: notExactly,
value: "`",
},
},
thenReplace: "উ",
},
},
},
{
match: "U`",
replace: "ূ",
},
{
match: "U",
replace: "ূ",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: notConsonant,
},
{
when: suffix,
is: notExactly,
value: "`",
},
},
thenReplace: "ঊ",
},
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: punctuation,
},
{
when: suffix,
is: notExactly,
value: "`",
},
},
thenReplace: "ঊ",
},
},
},
{
match: "ee`",
replace: "ী",
},
{
match: "ee",
replace: "ী",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: notConsonant,
},
{
when: suffix,
is: notExactly,
value: "`",
},
},
thenReplace: "ঈ",
},
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: punctuation,
},
{
when: suffix,
is: notExactly,
value: "`",
},
},
thenReplace: "ঈ",
},
},
},
{
match: "e`",
replace: "ে",
},
{
match: "e",
replace: "ে",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: notConsonant,
},
{
when: suffix,
is: notExactly,
value: "`",
},
},
thenReplace: "এ",
},
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: punctuation,
},
{
when: suffix,
is: notExactly,
value: "`",
},
},
thenReplace: "এ",
},
},
},
{
match: "z",
replace: "য",
},
{
match: "Z",
replace: "্য",
},
{
match: "y",
replace: "্য",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: notConsonant,
},
{
when: prefix,
is: notPunctuation,
},
},
thenReplace: bnYYA,
},
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: punctuation,
},
},
thenReplace: "ই" + bnYYA,
},
},
},
{
match: "Y",
replace: bnYYA,
},
{
match: "q",
replace: "ক",
},
{
match: "w",
replace: "ও",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: punctuation,
},
{
when: suffix,
is: vowel,
},
},
thenReplace: "ও" + bnYYA,
},
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: consonant,
},
},
thenReplace: "্ব",
},
},
},
{
match: "x",
replace: "ক্স",
exceptions: []exception{
{
ifAllMatch: []matchCondition{
{
when: prefix,
is: punctuation,
},
},
thenReplace: "এক্স",
},
},
},
{
match: ":`",
replace: ":",
},
{
match: ":",
replace: "ঃ",
},
{
match: "^`",
replace: "^",
},
{
match: "^",
replace: "ঁ",
},
{
match: ",,",
replace: "্",
},
{
match: ",",
replace: ",",
},
{
match: "$",
replace: "৳",
},
{
match: "`",
replace: "",
},
} | rulebasedconv/rules_source.go | 0.61451 | 0.475118 | rules_source.go | starcoder |
package vec2
import (
"fmt"
"math"
)
// Rect is a coordinate system aligned rectangle defined by a Min and Max vector.
type Rect struct {
Min T
Max T
}
// ParseRect parses a Rect from a string. See also String()
func ParseRect(s string) (r Rect, err error) {
_, err = fmt.Sscan(s, &r.Min[0], &r.Min[1], &r.Max[0], &r.Max[1])
return r, err
}
func (rect *Rect) Width() float32 {
return rect.Min[0] - rect.Max[0]
}
func (rect *Rect) Height() float32 {
return rect.Min[1] - rect.Max[1]
}
func (rect *Rect) Size() float32 {
width := rect.Width()
height := rect.Height()
return float32(math.Max(float64(width), float64(height)))
}
// Slice returns the elements of the vector as slice.
func (rect *Rect) Slice() []float32 {
return rect.Array()[:]
}
func (rect *Rect) Array() *[4]float32 {
return &[...]float32{
rect.Min[0], rect.Min[1],
rect.Max[0], rect.Max[1],
}
}
// String formats Rect as string. See also ParseRect().
func (rect *Rect) String() string {
return rect.Min.String() + " " + rect.Max.String()
}
// ContainsPoint returns if a point is contained within the rectangle.
func (rect *Rect) ContainsPoint(p *T) bool {
return p[0] >= rect.Min[0] && p[0] <= rect.Max[0] &&
p[1] >= rect.Min[1] && p[1] <= rect.Max[1]
}
func (rect *Rect) Contains(other *Rect) bool {
return other.Min[0] >= rect.Min[0] &&
other.Max[0] <= rect.Max[0] &&
other.Min[1] >= rect.Min[1] &&
other.Max[1] <= rect.Max[1]
}
func (rect *Rect) Intersects(other *Rect) bool {
return other.Max[0] >= rect.Min[0] &&
other.Min[0] <= rect.Max[0] &&
other.Max[1] >= rect.Min[0] &&
other.Min[1] <= rect.Max[1]
}
func (rect *Rect) Join(other *Rect) {
rect.Min = Min(&rect.Min, &other.Min)
rect.Max = Max(&rect.Max, &other.Max)
}
func (rect *Rect) Extend(p *T) {
rect.Min = Min(&rect.Min, p)
rect.Max = Max(&rect.Max, p)
}
// Joined returns the minimal rectangle containing both a and b.
func Joined(a, b *Rect) (rect Rect) {
rect.Min = Min(&a.Min, &b.Min)
rect.Max = Max(&a.Max, &b.Max)
return rect
} | vec2/rect.go | 0.923953 | 0.569254 | rect.go | starcoder |
package chunk
import (
"sort"
"github.com/pingcap/tidb/parser/mysql"
"github.com/pingcap/tidb/types"
)
// CompareFunc is a function to compare the two values in Row, the two columns must have the same type.
type CompareFunc = func(l Row, lCol int, r Row, rCol int) int
// GetCompareFunc gets a compare function for the field type.
func GetCompareFunc(tp *types.FieldType) CompareFunc {
switch tp.Tp {
case mysql.TypeTiny, mysql.TypeShort, mysql.TypeInt24, mysql.TypeLong, mysql.TypeLonglong, mysql.TypeYear:
if mysql.HasUnsignedFlag(tp.Flag) {
return cmpUint64
}
return cmpInt64
case mysql.TypeFloat:
return cmpFloat32
case mysql.TypeDouble:
return cmpFloat64
case mysql.TypeString, mysql.TypeVarString, mysql.TypeVarchar,
mysql.TypeBlob, mysql.TypeTinyBlob, mysql.TypeMediumBlob, mysql.TypeLongBlob:
return cmpString
}
return nil
}
func cmpNull(lNull, rNull bool) int {
if lNull && rNull {
return 0
}
if lNull {
return -1
}
return 1
}
func cmpInt64(l Row, lCol int, r Row, rCol int) int {
lNull, rNull := l.IsNull(lCol), r.IsNull(rCol)
if lNull || rNull {
return cmpNull(lNull, rNull)
}
return types.CompareInt64(l.GetInt64(lCol), r.GetInt64(rCol))
}
func cmpUint64(l Row, lCol int, r Row, rCol int) int {
lNull, rNull := l.IsNull(lCol), r.IsNull(rCol)
if lNull || rNull {
return cmpNull(lNull, rNull)
}
return types.CompareUint64(l.GetUint64(lCol), r.GetUint64(rCol))
}
func cmpString(l Row, lCol int, r Row, rCol int) int {
lNull, rNull := l.IsNull(lCol), r.IsNull(rCol)
if lNull || rNull {
return cmpNull(lNull, rNull)
}
return types.CompareString(l.GetString(lCol), r.GetString(rCol))
}
func cmpFloat32(l Row, lCol int, r Row, rCol int) int {
lNull, rNull := l.IsNull(lCol), r.IsNull(rCol)
if lNull || rNull {
return cmpNull(lNull, rNull)
}
return types.CompareFloat64(float64(l.GetFloat32(lCol)), float64(r.GetFloat32(rCol)))
}
func cmpFloat64(l Row, lCol int, r Row, rCol int) int {
lNull, rNull := l.IsNull(lCol), r.IsNull(rCol)
if lNull || rNull {
return cmpNull(lNull, rNull)
}
return types.CompareFloat64(l.GetFloat64(lCol), r.GetFloat64(rCol))
}
// Compare compares the value with ad.
func Compare(row Row, colIdx int, ad *types.Datum) int {
switch ad.Kind() {
case types.KindNull:
if row.IsNull(colIdx) {
return 0
}
return 1
case types.KindMinNotNull:
if row.IsNull(colIdx) {
return -1
}
return 1
case types.KindMaxValue:
return -1
case types.KindInt64:
return types.CompareInt64(row.GetInt64(colIdx), ad.GetInt64())
case types.KindUint64:
return types.CompareUint64(row.GetUint64(colIdx), ad.GetUint64())
case types.KindFloat32:
return types.CompareFloat64(float64(row.GetFloat32(colIdx)), float64(ad.GetFloat32()))
case types.KindFloat64:
return types.CompareFloat64(row.GetFloat64(colIdx), ad.GetFloat64())
case types.KindString, types.KindBytes:
return types.CompareString(row.GetString(colIdx), ad.GetString())
default:
return 0
}
}
// LowerBound searches on the non-decreasing Column colIdx,
// returns the smallest index i such that the value at row i is not less than `d`.
func (c *Chunk) LowerBound(colIdx int, d *types.Datum) (index int, match bool) {
index = sort.Search(c.NumRows(), func(i int) bool {
cmp := Compare(c.GetRow(i), colIdx, d)
if cmp == 0 {
match = true
}
return cmp >= 0
})
return
}
// UpperBound searches on the non-decreasing Column colIdx,
// returns the smallest index i such that the value at row i is larger than `d`.
func (c *Chunk) UpperBound(colIdx int, d *types.Datum) int {
return sort.Search(c.NumRows(), func(i int) bool {
return Compare(c.GetRow(i), colIdx, d) > 0
})
} | util/chunk/compare.go | 0.584153 | 0.42483 | compare.go | starcoder |
package main
import "fmt"
// Pos is a convenience struct for coordinate pairs
type Pos struct {
X, Y int
}
// NewPos is the constructor. It range-checks the coordinates to guarantee
// they fall within the board
func NewPos(x, y int) (*Pos, error) {
if x >= 0 && x <= 7 && y >= 0 && y <= 7 {
return &Pos{x, y}, nil
}
return nil, fmt.Errorf("Range error")
}
// NewPosFromSquareID constructs from the standard notation square number
func NewPosFromSquareID(squareNumber int) Pos {
pair := [][]int{
{1, 0}, {3, 0}, {5, 0}, {7, 0},
{0, 1}, {2, 1}, {4, 1}, {6, 1},
{1, 2}, {3, 2}, {5, 2}, {7, 2},
{0, 3}, {2, 3}, {4, 3}, {6, 3},
{1, 4}, {3, 4}, {5, 4}, {7, 4},
{0, 5}, {2, 5}, {4, 5}, {6, 5},
{1, 6}, {3, 6}, {5, 6}, {7, 6},
{0, 7}, {2, 7}, {4, 7}, {6, 7},
}[squareNumber-1]
return Pos{pair[0], pair[1]}
}
// AsPDNSquare does the opposite of NewPosFromSquareID
func (p Pos) AsPDNSquare() int {
pdnSquares := map[Pos]int{
Pos{1, 0}: 1, Pos{3, 0}: 2, Pos{5, 0}: 3, Pos{7, 0}: 4,
Pos{0, 1}: 5, Pos{2, 1}: 6, Pos{4, 1}: 7, Pos{6, 1}: 8,
Pos{1, 2}: 9, Pos{3, 2}: 10, Pos{5, 2}: 11, Pos{7, 2}: 12,
Pos{0, 3}: 13, Pos{2, 3}: 14, Pos{4, 3}: 15, Pos{6, 3}: 16,
Pos{1, 4}: 17, Pos{3, 4}: 18, Pos{5, 4}: 19, Pos{7, 4}: 20,
Pos{0, 5}: 21, Pos{2, 5}: 22, Pos{4, 5}: 23, Pos{6, 5}: 24,
Pos{1, 6}: 25, Pos{3, 6}: 26, Pos{5, 6}: 27, Pos{7, 6}: 28,
Pos{0, 7}: 29, Pos{2, 7}: 30, Pos{4, 7}: 31, Pos{6, 7}: 32,
}
sq, _ := pdnSquares[p]
return sq
}
// AsString returns a string representation of a coordinate for
// display and error reporting purposes
func (p Pos) AsString() string {
return fmt.Sprintf("{%d, %d}", p.X, p.Y)
}
// IsJump compares a pair and returns true if the transition has skipped
// one square, and an indicator of the direction
func IsJump(p1, p2 Pos) (bool, int) {
dY := p2.Y - p1.Y
if dY == 2 {
return true, 1
}
if dY == -2 {
return true, -1
}
return false, 0
}
func abs(v int) int {
if v < 0 {
return -v
}
return v
}
// ValidDiagonal check that we moved diagonally at least one and max 2
// squares
func ValidDiagonal(p1, p2 Pos) (int, int, error) {
dX := p2.X - p1.X
dY := p2.Y - p1.Y
adX := abs(dX)
adY := abs(dY)
// Check that we moved either 1 or 2 squares in X
if adX != 1 && adX != 2 {
return 0, 0, fmt.Errorf("Incorrect X for valid diagonal move")
}
// Check that we moved either 1 or 2 squares in Y
if adY != 1 && adY != 2 {
return 0, 0, fmt.Errorf("Incorrect Y for valid diagonal move")
}
return dX, dY, nil
} | pos.go | 0.824179 | 0.657078 | pos.go | starcoder |
package geopos
import (
"fmt"
"math"
"math/rand"
"sync"
)
// ========== addition methods
// random string {{{
var letterRunes = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
func rndStr(n int) string {
rndStr := make([]rune, n)
for i := range rndStr {
rndStr[i] = letterRunes[rand.Intn(len(letterRunes))]
}
return string(rndStr)
} // }}}
// ========== data section
type TokenReq struct {
Token string `form:"Token" binding:"required"`
}
type DistanceReq struct {
Distance float64 `form:"Distance" binding:"required"`
}
// GeoPoint for example {lat: 1.011111, lng: 1.0000450}
type GeoPoint struct {
Type string `form:"-"`
Token string `form:"Token" binding:"required"`
Coordinates [2]float64 `form:"Coordinates" binding:"required"`
}
// GeoState is map(array) of points
type GeoState struct {
Location map[string]GeoPoint `json:"Location"`
sync.RWMutex
}
// ========== GeoState methods
// NewGeoState will return a new state {{{
func NewGeoState() *GeoState {
return &GeoState{
Location: make(map[string]GeoPoint),
}
} // }}}
// Add new point with token {{{
func (geost *GeoState) Add(point *GeoPoint) {
geost.Lock()
defer geost.Unlock()
geost.Location[point.Token] = *point
} // }}}
// SetRnd fill GeoState the n points {{{
func (geost *GeoState) SetRnd(num int) {
geost.Lock()
defer geost.Unlock()
point := new(GeoPoint)
for i := 0; i < num; i++ {
point.SetRnd()
geost.Location[point.Token] = *point
}
} // }}}
// Clear state {{{
func (geost *GeoState) Clear() {
geost.Lock()
defer geost.Unlock()
geost.Location = make(map[string]GeoPoint)
} // }}}
// Len return lenght state {{{
func (geost *GeoState) Len() int {
return len(geost.Location)
} // }}}
// Print print poinsts to a dafault stream {{{
func (geost *GeoState) Print() {
fmt.Print(geost)
} // }}}
// GetPoint new point with token// {{{
func (geost *GeoState) GetPoint(token string) (point GeoPoint, ok bool) {
geost.Lock()
defer geost.Unlock()
point, ok = geost.Location[token]
return point, ok
} // }}}
// ========== GeoPoint methods
// GetDistance set random data to a point// {{{
func (point *GeoPoint) GetDistance(toPoint *GeoPoint) (distance float64) {
distance = math.Sqrt(
math.Pow(point.Coordinates[0]-toPoint.Coordinates[0], 2) +
math.Pow(point.Coordinates[1]-toPoint.Coordinates[1], 2))
return distance
} // }}}
// NewGeoPoint will return a new point {{{
func NewGeoPoint() *GeoPoint {
point := new(GeoPoint)
point.SetRnd()
return point
} // }}}
// SetRnd set random data to a point// {{{
func (point *GeoPoint) SetRnd() {
point.Type = "Point"
point.Token = rndStr(8)
point.Coordinates[0] = (rand.Float64() * 5) + 5
point.Coordinates[1] = (rand.Float64() * 5) + 5
} // }}} | back/geopos/model.go | 0.687315 | 0.444505 | model.go | starcoder |
package main
// A simple example that shows how to send activity to Bubble Tea in real-time
// through a channel.
import (
"fmt"
"math/rand"
"os"
"time"
"github.com/charmbracelet/bubbles/spinner"
tea "github.com/charmbracelet/bubbletea"
)
// A message used to indicate that activity has occurred. In the real world (for
// example, chat) this would contain actual data.
type responseMsg struct{}
// Simulate a process that sends events at an irregular interval in real time.
// In this case, we'll send events on the channel at a random interval between
// 100 to 1000 milliseconds. As a command, Bubble Tea will run this
// asynchronously.
func listenForActivity(sub chan struct{}) tea.Cmd {
return func() tea.Msg {
for {
time.Sleep(time.Millisecond * time.Duration(rand.Int63n(900)+100))
sub <- struct{}{}
}
}
}
// A command that waits for the activity on a channel.
func waitForActivity(sub chan struct{}) tea.Cmd {
return func() tea.Msg {
return responseMsg(<-sub)
}
}
type model struct {
sub chan struct{} // where we'll receive activity notifications
responses int // how many responses we've received
spinner spinner.Model
quitting bool
}
func (m model) Init() tea.Cmd {
return tea.Batch(
spinner.Tick,
listenForActivity(m.sub), // generate activity
waitForActivity(m.sub), // wait for activity
)
}
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch msg.(type) {
case tea.KeyMsg:
m.quitting = true
return m, tea.Quit
case responseMsg:
m.responses++ // record external activity
return m, waitForActivity(m.sub) // wait for next event
case spinner.TickMsg:
var cmd tea.Cmd
m.spinner, cmd = m.spinner.Update(msg)
return m, cmd
default:
return m, nil
}
}
func (m model) View() string {
s := fmt.Sprintf("\n %s Events received: %d\n\n Press any key to exit\n", m.spinner.View(), m.responses)
if m.quitting {
s += "\n"
}
return s
}
func main() {
rand.Seed(time.Now().UTC().UnixNano())
p := tea.NewProgram(model{
sub: make(chan struct{}),
spinner: spinner.NewModel(),
})
if p.Start() != nil {
fmt.Println("could not start program")
os.Exit(1)
}
} | examples/realtime/main.go | 0.624408 | 0.406862 | main.go | starcoder |
package panel
import log "github.com/sirupsen/logrus"
// SetBrightness is a helper function that allows updating a StateSettings
// object with shorthand eg "settings.SetBrightness(20)"
func (settings *StateSettings) SetBrightness(brightness Brightness) {
brightnessSetting := brightnessSetting{Value: brightness}
settings.Brightness = &brightnessSetting
}
// SetTemperature is a helper function that allows updating a StateSettings
// object with shorthand eg "settings.SetTemperature(1200)"
func (settings *StateSettings) SetTemperature(temperature Temperature) {
temperatureSetting := temperatureSetting{Value: temperature}
settings.Temperature = &temperatureSetting
}
// SetHue is a helper function that allows updating a StateSettings
// object with shorthand eg "settings.SetHue(20)"
func (settings *StateSettings) SetHue(hue Hue) {
hueSetting := hueSetting{Value: hue}
settings.Hue = &hueSetting
}
// SetSaturation is a helper function that allows updating a StateSettings
// object with shorthand eg "settings.SetSaturation(20)"
func (settings *StateSettings) SetSaturation(saturation Saturation) {
satSettings := saturationSetting{Value: saturation}
settings.Saturation = &satSettings
}
// Validate adjusts settings to required min/max
func (settings *StateSettings) Validate() {
if settings != nil {
if settings.Temperature != nil {
if settings.Temperature.Value < MinimumTemperature {
log.Warnf("requested temperature %d is below minimum %d, adjusting", settings.Temperature.Value, MinimumTemperature)
settings.Temperature.Value = MinimumTemperature
}
if settings.Temperature.Value > MaximumTemperature {
log.Warnf("requested temperature %d is above maximum %d, adjusting", settings.Temperature.Value, MaximumTemperature)
settings.Temperature.Value = MaximumTemperature
}
}
if settings.Brightness != nil {
if settings.Brightness.Value < MinimumBrightness {
log.Warnf("requested brightness %d is below minimum %d, adjusting", settings.Brightness.Value, MinimumBrightness)
settings.Brightness.Value = MinimumBrightness
}
if settings.Brightness.Value > MaximumBrightness {
log.Warnf("requested brightness %d is above maximum %d, adjusting", settings.Brightness.Value, MaximumBrightness)
settings.Brightness.Value = MaximumBrightness
}
}
if settings.Saturation != nil {
if settings.Saturation.Value < MinimumSaturation {
log.Warnf("requested saturation %d is below minimum %d, adjusting", settings.Saturation.Value, MinimumSaturation)
settings.Saturation.Value = MinimumSaturation
}
if settings.Saturation.Value > MaximumSaturation {
log.Warnf("requested saturation %d is above maximum %d, adjusting", settings.Saturation.Value, MaximumSaturation)
settings.Saturation.Value = MaximumSaturation
}
}
if settings.Hue != nil {
if settings.Hue.Value < MinimumHue {
log.Warnf("requested hue %d is below minimum %d, adjusting", settings.Hue.Value, MinimumHue)
settings.Hue.Value = MinimumHue
}
if settings.Hue.Value > MaximumHue {
log.Warnf("requested hue %d is above maximum %d, adjusting", settings.Hue.Value, MaximumHue)
settings.Hue.Value = MaximumHue
}
}
}
} | settings.go | 0.814643 | 0.490114 | settings.go | starcoder |
package math
import (
"golang.org/x/exp/constraints"
)
// Gcd returns the greatest common divisor of a and b.
func Gcd[T constraints.Integer](a, b T) T {
for b != 0 {
a, b = b, a%b
}
return a
}
// Lcm returns the least common multiple of a and b.
func Lcm[T constraints.Integer](a, b T) T {
g := Gcd(a, b)
return a * b / g
}
// powermod returns a^b mod c.
func powermod[T constraints.Integer](x, y, m T) T {
z := T(1)
for y > 0 {
if y&1 == 1 {
z = z * x % m
}
y = y >> 1
x = x * x % m
}
return z
}
// MillerRabin returns true if n is probably prime.
func MillerRabin[T constraints.Integer](n T) bool {
if n < 2 {
return false
}
if n == 2 {
return true
}
if n%2 == 0 {
return false
}
loop:
for _, c := range []T{2, 3, 5, 7, 11, 13, 17} {
if c >= n {
continue loop
}
d := n - 1
for d%2 == 0 {
if powermod(c, d, n) == n-1 {
continue loop
}
d /= 2
}
t := powermod(c, d, n)
if t == 1 || t == n-1 {
continue loop
}
return false
}
return true
}
// IsPrime returns true if n is must have prime.
func IsPrime[T constraints.Integer](n T) bool {
if n < 2 {
return false
}
if n == 2 {
return true
}
if n%2 == 0 {
return false
}
l := []T{2}
for i := T(3); i*i <= n; i += 2 {
isPrime := true
for _, v := range l {
if i%v == 0 {
isPrime = false
break
}
}
if isPrime {
l = append(l, i)
}
}
for _, v := range l {
if n%v == 0 {
return false
}
}
return true
}
// SieveOfSundaram returns the prime numbers from 2 to n.
func SieveOfSundaram[T constraints.Integer](n T) []T {
m := n/2 - 1
set := map[T]struct{}{}
for i := T(1); i <= m; i++ {
for j := i; j <= m; j++ {
k := i + j + 2*i*j
if k <= n {
set[k] = struct{}{}
continue
}
break
}
}
l := make([]T, 0, int(n)-len(set)+1)
for i := T(1); i <= m; i++ {
if _, ok := set[i]; !ok {
l = append(l, 2*i+1)
}
}
return l
}
// PrimesTo returns the prime numbers from 2 to n.
func PrimesTo[T constraints.Integer](n T) []T {
l := []T{2}
for i := T(3); i <= n; i += 2 {
isPrime := true
for _, v := range l {
if i%v == 0 {
isPrime = false
break
}
}
if isPrime {
l = append(l, i)
}
}
return l
} | math/prime.go | 0.72952 | 0.484014 | prime.go | starcoder |
package hashing
import (
"encoding/binary"
"fmt"
"math"
"reflect"
"sort"
)
/**
* Has value to byte array conversion functions.
* @author rnojiri
**/
// float64ToByteArray - converts a float64 to byte array
func float64ToByteArray(f float64) []byte {
var buffer = make([]byte, 8)
binary.BigEndian.PutUint64(buffer, math.Float64bits(f))
return buffer
}
// int64ToByteArray - converts a int64 to byte array
func int64ToByteArray(i int64) []byte {
var buffer = make([]byte, 8)
binary.BigEndian.PutUint64(buffer, uint64(i))
return buffer
}
// uint64ToByteArray - converts a int64 to byte array
func uint64ToByteArray(i uint64) []byte {
var buffer = make([]byte, 8)
binary.BigEndian.PutUint64(buffer, i)
return buffer
}
// boolToByteArray - converts a boolean to byte
func boolToByteArray(b bool) []byte {
if b {
return []byte{1}
}
return []byte{0}
}
// stringToByteArray - converts a string to byte array
func stringToByteArray(s string) []byte {
if len(s) == 0 {
return make([]byte, 0)
}
return []byte(s)
}
// mapToByteArray - converts a map to a byte array
func mapToByteArray(v reflect.Value) ([]byte, error) {
if v.Len() == 0 {
return nil, nil
}
var err error
keys := v.MapKeys()
sortKeys(keys, keys[0].Kind())
var keyBytes, valBytes []byte
bytes := []byte{}
for _, k := range keys {
keyBytes, err = getByteArray(k)
if err != nil {
return nil, err
}
valBytes, err = getByteArray(v.MapIndex(k))
if err != nil {
return nil, err
}
bytes = append(bytes, keyBytes...)
bytes = append(bytes, valBytes...)
}
return bytes, nil
}
// arrayToByteArray - converts a array to a byte array
func arrayToByteArray(v reflect.Value) ([]byte, error) {
var err error
var indexBytes []byte
bytes := []byte{}
for i := 0; i < v.Len(); i++ {
indexBytes, err = getByteArray(v.Index(i))
if err != nil {
return nil, err
}
bytes = append(bytes, indexBytes...)
}
return bytes, nil
}
// getByteArray - returns the byte array from the given value
func getByteArray(v reflect.Value) ([]byte, error) {
switch v.Kind() {
case reflect.String:
return stringToByteArray(v.String()), nil
case reflect.Int, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int8:
return int64ToByteArray(v.Int()), nil
case reflect.Uint, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint8:
return uint64ToByteArray(v.Uint()), nil
case reflect.Float32, reflect.Float64:
return float64ToByteArray(v.Float()), nil
case reflect.Bool:
return boolToByteArray(v.Bool()), nil
case reflect.Map:
return mapToByteArray(v)
case reflect.Array, reflect.Slice:
return arrayToByteArray(v)
case reflect.Interface:
return getByteArray(v.Elem())
default:
return nil, fmt.Errorf("type is not mapped to get byte array: %s", v.Kind().String())
}
}
// sortKeys - returns the sorted array for the specified type
func sortKeys(array []reflect.Value, kind reflect.Kind) error {
switch kind {
case reflect.String:
sort.Sort(byString(array))
case reflect.Uint, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint8, reflect.Int, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int8:
sort.Sort(byInt(array))
case reflect.Float32, reflect.Float64:
sort.Sort(byFloat(array))
case reflect.Bool:
sort.Sort(byBool(array))
default:
return fmt.Errorf("type is not mapped to sort keys: %s", kind.String())
}
return nil
} | byteconv.go | 0.778691 | 0.500793 | byteconv.go | starcoder |
package line
import (
"math"
"github.com/gravestench/pho/geom"
"github.com/gravestench/pho/geom/point"
)
// New creates a new line
func New(x1, y1, x2, y2 float64) *Line {
return &Line{
Type: geom.Line,
X1: x1,
Y1: y1,
X2: x2,
Y2: y2,
}
}
// Line defines a Line segment, a part of a line between two endpoints.
type Line struct {
Type geom.ShapeType
X1, Y1 float64
X2, Y2 float64
}
// Length calculates the length of the line.
func (l *Line) Length() float64 {
return Length(l)
}
// Left returns the left position of the line
func (l *Line) Left() float64 {
return math.Min(l.X1, l.X2)
}
// SetLeft sets the left position of the line
func (l *Line) SetLeft(value float64) *Line {
if l.X1 < l.X2 {
l.X1 = value
} else {
l.X2 = value
}
return l
}
// Right returns the right position of the line
func (l *Line) Right() float64 {
return math.Max(l.X1, l.X2)
}
// SetRight sets the right position of the line
func (l *Line) SetRight(value float64) *Line {
if l.X1 > l.X2 {
l.X1 = value
} else {
l.X2 = value
}
return l
}
// Top returns the top position of the line
func (l *Line) Top() float64 {
return math.Min(l.Y1, l.Y2)
}
// SetTop sets the top position of the line
func (l *Line) SetTop(value float64) *Line {
if l.Y1 < l.Y2 {
l.Y1 = value
} else {
l.Y2 = value
}
return l
}
// Bottom returns the bottom position of the line
func (l *Line) Bottom() float64 {
return math.Max(l.Y1, l.Y2)
}
// SetBottom sets the bottom position of the line
func (l *Line) SetBottom(value float64) *Line {
if l.Y1 > l.Y2 {
l.Y1 = value
} else {
l.Y2 = value
}
return l
}
// GetPoint on a line that's a given percentage along its length.
func (l *Line) GetPoint(position float64, out *point.Point) *point.Point {
return GetPoint(l, position, out)
}
// Get a number of points along a line's length.
// Provide a `quantity` to get an exact number of points along the line.
func (l *Line) GetPoints(quantity int, stepRate float64, out []*point.Point) []*point.Point {
return GetPoints(l, quantity, stepRate, out)
}
// GetRandomPoint picks a random point along the line and assigns it to the argument point.
// If argument is nil, a new point is created and returned.
func (l *Line) GetRandomPoint(assignTo *point.Point) *point.Point {
return GetRandomPoint(l, assignTo)
}
// SetTo sets new coordinates for the line endpoints.
func (l *Line) SetTo(x1, y1, x2, y2 float64) *Line {
l.X1, l.Y1, l.X2, l.Y2 = x1, y1, x2, y2
return l
}
// Returns a point that corresponds to the start of the line segment.
func (l *Line) GetPointA(assignTo *point.Point) *point.Point {
if assignTo == nil {
assignTo = point.New(0, 0)
}
return assignTo.SetTo(l.X1, l.Y1)
}
// Returns a point that corresponds to the end of the line segment.
func (l *Line) GetPointB(assignTo *point.Point) *point.Point {
if assignTo == nil {
assignTo = point.New(0, 0)
}
return assignTo.SetTo(l.X2, l.Y2)
}
// Angle calculates the angle of the line in radians
func (l *Line) Angle() float64 {
return Angle(l)
}
// CenterOn centers a line on the given coordinates.
func (l *Line) CenterOn(x, y float64) *Line {
return CenterOn(l, x, y)
}
// Clone creates a clone of the line
func (l *Line) Clone() *Line {
return Clone(l)
}
// CopyFrom copies the values of one line to the line.
func (l *Line) CopyFrom(from *Line) *Line {
return CopyFrom(from, l)
}
// Equals checks if the line is approximately equal to another
func (l *Line) Equals(other *Line) bool {
return Equals(l, other)
}
// GetMidPoint get the midpoint of the line.
// Assigns to the `out` point, or creates one if nil.
func (l *Line) GetMidPoint(out *point.Point) *point.Point {
return GetMidPoint(l, out)
}
// GetNearestPoint get the nearest point on a line perpendicular to the given point.
func (l *Line) GetNearestPoint(p, out *point.Point) *point.Point {
return GetNearestPoint(l, p, out)
}
// GetNormal calculates the normal of the line.
// The normal of a line is a vector that points perpendicular from it.
func (l *Line) GetNormal(p, out *point.Point) *point.Point {
return GetNormal(l, p, out)
}
// GetShortestDistance get the shortest distance from a Line to the given Point.
func (l *Line) GetShortestDistance(p *point.Point) float64 {
return GetShortestDistance(l, p)
}
// Height calculates the height of the line.
func (l *Line) Height() float64 {
return Height(l)
}
// Width calculates the width of the given line.
func (l *Line) Width() float64 {
return Width(l)
}
// NormalAngle get the angle of the normal of the line in radians.
func (l *Line) NormalAngle() float64 {
return NormalAngle(l)
}
// NormalX returns the x component of the normal vector of the line.
// The normal of a line is a vector that points perpendicular from it.
func (l *Line) NormalX() float64 {
return NormalX(l)
}
// NormalX returns the x component of the normal vector of the line.
// The normal of a line is a vector that points perpendicular from it.
func (l *Line) NormalY() float64 {
return NormalY(l)
}
// Offset the line by the given amount.
func (l *Line) Offset(x, y float64) *Line {
return Offset(l, x, y)
}
// PerpendicularSlope calculates the perpendicular slope of the line.
func (l *Line) PerpendicularSlope() float64 {
return PerpendicularSlope(l)
}
// ReflectAngle calculates the reflected angle between the line and another line.
// This is the outgoing angle based on the angle of Line 1 and the normalAngle of Line 2.
func (l *Line) ReflectAngle(other *Line) float64 {
return ReflectAngle(l, other)
}
// Rotate a line around its midpoint by the given angle in radians.
func (l *Line) Rotate(angle float64) *Line {
return Rotate(l, angle)
}
// RotateAroundPoint rotates a line around a point by the given angle in radians.
func (l *Line) RotateAroundPoint(p *point.Point, angle float64) *Line {
return RotateAroundPoint(l, p, angle)
}
// RotateXY rotates a line around the given coordinates by the given angle in radians.
func (l *Line) RotateAroundXY(x, y, angle float64) *Line {
return RotateAroundXY(l, x, y, angle)
}
// SetToAngle sets a line to a given position, angle and length.
func (l *Line) SetToAngle(x, y, angle, length float64) *Line {
return SetToAngle(l, x, y, angle, length)
}
// Slope calculates the slope of the line.
func (l *Line) Slope() float64 {
return Slope(l)
} | geom/line/line.go | 0.916288 | 0.593491 | line.go | starcoder |
package exchangestream
import (
"context"
"errors"
"math"
"math/rand"
"time"
)
// PolicyExponential defines an executer for the exponential retry policy.
type PolicyExponential struct {
// Retries specifies the number of retries allowed.
// -1 means infinite number of retries
// 0 means to never retry
// Any other number greater or equal to 1 means retry X amount of times
Retries int
// MaximunBackoff specifies the maximun waiting time between actions (in seconds)
MaximumBackoff uint
currentCount uint
threshhold bool
}
// NewPolicyExponential creates a new PolicyExponential.
// Accepts a PolicyExponential struct as the first argument and the initialCount as second.
// For most use cases you will want to set initialCount to zero.
func NewPolicyExponential(retries int, maximunBackoff uint, initialCount uint) PolicyExponential {
return PolicyExponential{Retries: retries, MaximumBackoff: maximunBackoff, currentCount: initialCount}
}
// BackOffTime returns the time to wait (in milliseconds) until next retry.
// If returned value is -1 it means no more retries.
func (pee *PolicyExponential) BackOffTime() int {
if pee.Retries >= 0 {
if pee.Retries == 0 || int(pee.currentCount) >= pee.Retries {
return -1
}
}
if pee.threshhold {
pee.currentCount++
return int(pee.MaximumBackoff * 1000)
}
calcedWaitTime := (math.Pow(2, float64(pee.currentCount)) + rand.Float64()) * 1000
pee.currentCount++
if calcedWaitTime > float64(pee.MaximumBackoff)*1000 {
pee.threshhold = true
return int(pee.MaximumBackoff * 1000)
}
return int(calcedWaitTime)
}
// WaitBackOff waits for a certain time until next retry.
// It accepts a context so the caller can cancel the waiting time and get back control.
// In case of a cancellation, the first returned value will be true, false otherwise.
// If no more retries should happen, this function will return immediately with an error.
func (pee *PolicyExponential) WaitBackOff(ctx context.Context) (bool, error) {
result := pee.BackOffTime()
if result == -1 {
return false, errors.New("No more retries allowed")
}
duration := time.Duration(result) * time.Millisecond
cancelled := sleepCanBreak(ctx, duration)
return cancelled, nil
}
// RetryAllowed returns a boolean reflecting whether it's still allowed to retry or not.
func (pee PolicyExponential) RetryAllowed() bool {
if pee.Retries >= 0 {
if pee.Retries == 0 || int(pee.currentCount) >= pee.Retries {
return false
}
}
return true
}
// RetryCount returns the number of retry attempts so far.
func (pee PolicyExponential) RetryCount() uint {
return pee.currentCount
}
// sleepCanBreak is an helper function that sleeps for a specified duration and can be stopped via the context passed in.
func sleepCanBreak(ctx context.Context, sleep time.Duration) (isBreak bool) {
select {
case <-ctx.Done():
isBreak = true
case <-time.After(sleep):
isBreak = false
}
return
} | pkg/exchangestream/retry.go | 0.795698 | 0.446917 | retry.go | starcoder |
package common
import (
"fmt"
"github.com/go-vgo/robotgo"
"strconv"
"strings"
)
//{0, 0}, {1535, 0}, {1920, 0}, {3839, 0},
//{0, 863}, {1535, 863}, {1920, 1079}, {3839, 1079},
// record pos, left and right all use 1.25 rate
// so if use in left x,y = x * LeftRate / RecordRate, y * LeftRate / RecordRate,
// so if use in right x,y = x * RightRate / RecordRate, y * RightRate / RecordRate,
const RecordRate = float64(1.25)
const LeftRate = float64(1.25)
const RightRate = float64(1.0)
func GetCurrentScreenRate() float64 {
w, h := robotgo.GetScaleSize()
sW, sH := robotgo.GetScreenSize()
fmt.Println("GetScaleSize:", w, h, "GetScreenSize:", sW, sH)
rate := float64(h) / float64(sH)
return rate
}
func GetAutoXy(x, y int) (cX, cY int) {
rate := GetCurrentScreenRate()
fX, fY := float64(x) * rate / RecordRate , float64(y) * rate / RecordRate
cX, cY = int(fX), int(fY)
return cX, cY
}
func GetLeftXy(x, y int) (cX, cY int) {
fX, fY := float64(x) * LeftRate / RecordRate , float64(y) * LeftRate / RecordRate
cX, cY = int(fX), int(fY)
return cX, cY
}
func GetRightXy(x, y int) (cX, cY int) {
fX, fY := float64(x) * RightRate / RecordRate , float64(y) * RightRate / RecordRate
cX, cY = int(fX), int(fY)
return cX, cY
}
func ToAuto100(x, y int) (x100, y100 int) {
w, h := robotgo.GetScaleSize()
sW, sH := robotgo.GetScreenSize()
fmt.Println("GetScaleSize:", w, "*", h, " GetScreenSize:", sW , "*", sH)
return x * 100 / 100, y * 100 / 100
}
// GetRealPx return x * 125 / 100
func GetRealPx(x, y int) (x100, y100 int) {
_, h := robotgo.GetScaleSize()
_, sH := robotgo.GetScreenSize()
fmt.Println(h, sH)
return x * h / sH, y * h / sH
}
// IntJoin [1,2,3] to 1,2,3
func IntJoin(arr []int) string {
if len(arr) == 0 {
return ""
}
strArr := []string{}
for _, d := range arr {
strArr = append(strArr, strconv.Itoa(d))
}
return strings.Join(strArr, ",")
}
// AllowEmpty "否" to ",omitempty"
func AllowEmpty(wordStr string) string {
if wordStr == "是" {
return ""
}
return ",omitempty"
}
// ToField "user_id" to "UserId"
func ToField(wordStr string) string {
arr :=strings.Split(wordStr, "_")
newArr := []string{}
for _, str := range arr {
newArr = append(newArr, FirstUp(str))
}
return strings.Join(newArr, "")
}
func FirstUp(wordStr string) string {
vv := []rune(wordStr)
if len(vv) > 0 && vv[0] >= 97 && vv[0] <= 122 {
vv[0] -= 32
}
return string(vv)
} | common/posHelper.go | 0.533884 | 0.44734 | posHelper.go | starcoder |
package exec
import (
"encoding/binary"
"fmt"
"math"
)
var ErrLimitExceeded = fmt.Errorf("memory limit exceeded")
// Memory is a WASM linear memory.
type Memory struct {
min, max uint32
bytes []byte
}
// NewMemory creates a new linear memory with the given limits.
func NewMemory(min, max uint32) Memory {
return Memory{
min: min,
max: max,
bytes: make([]byte, min*65536),
}
}
// Limits returns the minimum and maximum size of the memory in pages.
func (m *Memory) Limits() (min, max uint32) {
return m.min, m.max
}
// Size returns the current size of the memory in pages.
func (m *Memory) Size() uint32 {
return uint32(len(m.bytes) / 65536)
}
// Grow grows the memory by the given number of pages. It returns the old size of the memory in pages and an error if
// growing the memory by the requested amount would exceed the memory's maximum size.
func (m *Memory) Grow(pages uint32) (uint32, error) {
currentSize := m.Size()
newSize := currentSize + pages
if newSize > m.max || newSize > 65536 {
return currentSize, ErrLimitExceeded
}
newBytes := make([]byte, int(newSize*65536))
copy(newBytes, m.bytes)
m.bytes = newBytes
return currentSize, nil
}
// Bytes returns the memory's bytes.
func (m *Memory) Bytes() []byte {
return m.bytes
}
func (m *Memory) Start() uintptr {
panic("Start() is not supported on this platform")
}
func effectiveAddress(base, offset uint32) uint64 {
return uint64(base) + uint64(offset)
}
// Byte returns the byte stored at the given effective address.
func (m *Memory) Byte(base, offset uint32) byte {
return m.bytes[effectiveAddress(base, offset)]
}
// Uint8 returns the byte stored at the given effective address.
func (m *Memory) Uint8(base, offset uint32) byte {
return m.bytes[effectiveAddress(base, offset)]
}
// PutByte writes the given byte to the given effective address.
func (m *Memory) PutByte(v byte, base, offset uint32) {
m.bytes[effectiveAddress(base, offset)] = v
}
// PutUint8 writes the given byte to the given effective address.
func (m *Memory) PutUint8(v byte, base, offset uint32) {
m.bytes[effectiveAddress(base, offset)] = v
}
// Uint16 returns the uint16 stored at the given effective address.
func (m *Memory) Uint16(base, offset uint32) uint16 {
return binary.LittleEndian.Uint16(m.bytes[effectiveAddress(base, offset):])
}
// PutUint16 writes the given uint16 to the given effective address.
func (m *Memory) PutUint16(v uint16, base, offset uint32) {
binary.LittleEndian.PutUint16(m.bytes[effectiveAddress(base, offset):], v)
}
// Uint32 returns the uint32 stored at the given effective address.
func (m *Memory) Uint32(base, offset uint32) uint32 {
return binary.LittleEndian.Uint32(m.bytes[effectiveAddress(base, offset):])
}
// PutUint32 writes the given uint32 to the given effective address.
func (m *Memory) PutUint32(v uint32, base, offset uint32) {
binary.LittleEndian.PutUint32(m.bytes[effectiveAddress(base, offset):], v)
}
// Uint64 returns the uint64 stored at the given effective address.
func (m *Memory) Uint64(base, offset uint32) uint64 {
return binary.LittleEndian.Uint64(m.bytes[effectiveAddress(base, offset):])
}
// PutUint64 writes the given uint64 to the given effective address.
func (m *Memory) PutUint64(v uint64, base, offset uint32) {
binary.LittleEndian.PutUint64(m.bytes[effectiveAddress(base, offset):], v)
}
// Float32 returns the float32 stored at the given effective address.
func (m *Memory) Float32(base, offset uint32) float32 {
return math.Float32frombits(m.Uint32(base, offset))
}
// PutFloat32 writes the given float32 to the given effective address.
func (m *Memory) PutFloat32(v float32, base, offset uint32) {
m.PutUint32(math.Float32bits(v), base, offset)
}
// Float64 returns the float64 stored at the given effective address.
func (m *Memory) Float64(base, offset uint32) float64 {
return math.Float64frombits(m.Uint64(base, offset))
}
// PutFloat64 writes the given float64 to the given effective address.
func (m *Memory) PutFloat64(v float64, base, offset uint32) {
m.PutUint64(math.Float64bits(v), base, offset)
}
// ByteAt returns the byte stored at the given offset.
func (m *Memory) ByteAt(offset uint32) byte {
return m.bytes[offset]
}
// PutByteAt writes the given byte to the given offset.
func (m *Memory) PutByteAt(v byte, offset uint32) {
m.bytes[offset] = v
}
// Uint8At returns the byte stored at the given offset.
func (m *Memory) Uint8At(offset uint32) byte {
return m.bytes[offset]
}
// PutUint8At writes the given byte to the given offset.
func (m *Memory) PutUint8At(v byte, offset uint32) {
m.bytes[offset] = v
}
// Uint16At returns the uint16 stored at the given offset.
func (m *Memory) Uint16At(offset uint32) uint16 {
return binary.LittleEndian.Uint16(m.bytes[offset:])
}
// PutUint16At writes the given uint16 to the given offset.
func (m *Memory) PutUint16At(v uint16, offset uint32) {
binary.LittleEndian.PutUint16(m.bytes[offset:], v)
}
// Uint32At returns the uint32 stored at the given offset.
func (m *Memory) Uint32At(offset uint32) uint32 {
return binary.LittleEndian.Uint32(m.bytes[offset:])
}
// PutUint32At writes the given uint32 to the given offset.
func (m *Memory) PutUint32At(v uint32, offset uint32) {
binary.LittleEndian.PutUint32(m.bytes[offset:], v)
}
// Uint64 returns the uint64 stored at the given offset.
func (m *Memory) Uint64At(offset uint32) uint64 {
return binary.LittleEndian.Uint64(m.bytes[offset:])
}
// PutUint64 writes the given uint64 to the given offset.
func (m *Memory) PutUint64At(v uint64, offset uint32) {
binary.LittleEndian.PutUint64(m.bytes[offset:], v)
}
// Float32At returns the float32 stored at the given offset.
func (m *Memory) Float32At(offset uint32) float32 {
return math.Float32frombits(m.Uint32At(offset))
}
// PutFloat32At writes the given float32 to the given offset.
func (m *Memory) PutFloat32At(v float32, offset uint32) {
m.PutUint32At(math.Float32bits(v), offset)
}
// Float64At returns the float64 stored at the given offset.
func (m *Memory) Float64At(offset uint32) float64 {
return math.Float64frombits(m.Uint64At(offset))
}
// PutFloat64At writes the given float64 to the given offset.
func (m *Memory) PutFloat64At(v float64, offset uint32) {
m.PutUint64At(math.Float64bits(v), offset)
} | exec/memory.go | 0.907993 | 0.520923 | memory.go | starcoder |
package onshape
import (
"encoding/json"
)
// BTFSTableColumnInfo623 struct for BTFSTableColumnInfo623
type BTFSTableColumnInfo623 struct {
BTTableColumnInfo1222
BtType *string `json:"btType,omitempty"`
CrossHighlightData *BTTableBaseCrossHighlightData2609 `json:"crossHighlightData,omitempty"`
}
// NewBTFSTableColumnInfo623 instantiates a new BTFSTableColumnInfo623 object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewBTFSTableColumnInfo623() *BTFSTableColumnInfo623 {
this := BTFSTableColumnInfo623{}
return &this
}
// NewBTFSTableColumnInfo623WithDefaults instantiates a new BTFSTableColumnInfo623 object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewBTFSTableColumnInfo623WithDefaults() *BTFSTableColumnInfo623 {
this := BTFSTableColumnInfo623{}
return &this
}
// GetBtType returns the BtType field value if set, zero value otherwise.
func (o *BTFSTableColumnInfo623) GetBtType() string {
if o == nil || o.BtType == nil {
var ret string
return ret
}
return *o.BtType
}
// GetBtTypeOk returns a tuple with the BtType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BTFSTableColumnInfo623) GetBtTypeOk() (*string, bool) {
if o == nil || o.BtType == nil {
return nil, false
}
return o.BtType, true
}
// HasBtType returns a boolean if a field has been set.
func (o *BTFSTableColumnInfo623) HasBtType() bool {
if o != nil && o.BtType != nil {
return true
}
return false
}
// SetBtType gets a reference to the given string and assigns it to the BtType field.
func (o *BTFSTableColumnInfo623) SetBtType(v string) {
o.BtType = &v
}
// GetCrossHighlightData returns the CrossHighlightData field value if set, zero value otherwise.
func (o *BTFSTableColumnInfo623) GetCrossHighlightData() BTTableBaseCrossHighlightData2609 {
if o == nil || o.CrossHighlightData == nil {
var ret BTTableBaseCrossHighlightData2609
return ret
}
return *o.CrossHighlightData
}
// GetCrossHighlightDataOk returns a tuple with the CrossHighlightData field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BTFSTableColumnInfo623) GetCrossHighlightDataOk() (*BTTableBaseCrossHighlightData2609, bool) {
if o == nil || o.CrossHighlightData == nil {
return nil, false
}
return o.CrossHighlightData, true
}
// HasCrossHighlightData returns a boolean if a field has been set.
func (o *BTFSTableColumnInfo623) HasCrossHighlightData() bool {
if o != nil && o.CrossHighlightData != nil {
return true
}
return false
}
// SetCrossHighlightData gets a reference to the given BTTableBaseCrossHighlightData2609 and assigns it to the CrossHighlightData field.
func (o *BTFSTableColumnInfo623) SetCrossHighlightData(v BTTableBaseCrossHighlightData2609) {
o.CrossHighlightData = &v
}
func (o BTFSTableColumnInfo623) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
serializedBTTableColumnInfo1222, errBTTableColumnInfo1222 := json.Marshal(o.BTTableColumnInfo1222)
if errBTTableColumnInfo1222 != nil {
return []byte{}, errBTTableColumnInfo1222
}
errBTTableColumnInfo1222 = json.Unmarshal([]byte(serializedBTTableColumnInfo1222), &toSerialize)
if errBTTableColumnInfo1222 != nil {
return []byte{}, errBTTableColumnInfo1222
}
if o.BtType != nil {
toSerialize["btType"] = o.BtType
}
if o.CrossHighlightData != nil {
toSerialize["crossHighlightData"] = o.CrossHighlightData
}
return json.Marshal(toSerialize)
}
type NullableBTFSTableColumnInfo623 struct {
value *BTFSTableColumnInfo623
isSet bool
}
func (v NullableBTFSTableColumnInfo623) Get() *BTFSTableColumnInfo623 {
return v.value
}
func (v *NullableBTFSTableColumnInfo623) Set(val *BTFSTableColumnInfo623) {
v.value = val
v.isSet = true
}
func (v NullableBTFSTableColumnInfo623) IsSet() bool {
return v.isSet
}
func (v *NullableBTFSTableColumnInfo623) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBTFSTableColumnInfo623(val *BTFSTableColumnInfo623) *NullableBTFSTableColumnInfo623 {
return &NullableBTFSTableColumnInfo623{value: val, isSet: true}
}
func (v NullableBTFSTableColumnInfo623) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBTFSTableColumnInfo623) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
} | onshape/model_btfs_table_column_info_623.go | 0.717606 | 0.479565 | model_btfs_table_column_info_623.go | starcoder |
package operators
import (
bs "github.com/sharnoff/badstudent"
"math"
)
// ****************************************
// ReLU
// ****************************************
type relu int8
// ReLU returns the standard rectified linear unit, which implements
// badstudent.Operator.
func ReLU() relu {
return relu(0)
}
func (t relu) TypeString() string {
return "relu"
}
func (t relu) Finalize(n *bs.Node) error {
// We don't need to check number of values because badstudent main does it for us
return nil
}
func (t relu) Value(in float64, index int) float64 {
return math.Max(in, 0)
}
func (t relu) Deriv(n *bs.Node, index int) float64 {
return math.Max(n.Value(index), 0)
}
// ****************************************
// Leaky ReLU
// ****************************************
type lrelu float64
// LeakyReLU returns a standard 'leaky ReLU', where the leaky factor is given by alpha.
func LeakyReLU(alpha float64) lrelu {
return lrelu(alpha)
}
func (t lrelu) TypeString() string {
return "leaky-relu"
}
func (t *lrelu) Get() interface{} {
return *t
}
func (t *lrelu) Blank() interface{} {
return t
}
func (t lrelu) Finalize(n *bs.Node) error {
return nil
}
func (t lrelu) Value(in float64, index int) float64 {
if in < 0 {
return float64(t) * in
}
return in
}
func (t lrelu) Deriv(n *bs.Node, index int) float64 {
if n.InputValue(index) < 0 {
return float64(t)
}
return 1
}
// ****************************************
// PReLU
// ****************************************
type prelu struct {
Ws []float64
}
// PReLU (parametric ReLU) returns a parameterized version of the leaky ReLU.
func PReLU() *prelu {
return &prelu{}
}
func (t *prelu) TypeString() string {
return "prelu"
}
func (t *prelu) Finalize(n *bs.Node) error {
t.Ws = make([]float64, n.Size())
return nil
}
func (t *prelu) Get() interface{} {
return *t
}
func (t *prelu) Blank() interface{} {
return t
}
func (t *prelu) Value(in float64, index int) float64 {
if in < 0 {
return t.Ws[index] * in
}
return in
}
func (t *prelu) Deriv(n *bs.Node, index int) float64 {
if n.InputValue(index) < 0 {
return t.Ws[index]
}
return 1
}
func (t *prelu) Weights() []float64 {
return t.Ws
}
func (t *prelu) Grad(n *bs.Node, index int) float64 {
if in := n.InputValue(index); in < 0 {
return in
}
return 0
}
// ****************************************
// ELU
// ****************************************
type elu int8
// ELU (exponential linear unit) returns a smooth approximation of ReLU that tends towards -1 as
// inputs become infinitely negative.
func ELU() elu {
return elu(0)
}
func (t elu) TypeString() string {
return "elu"
}
func (t elu) Finalize(n *bs.Node) error {
return nil
}
func (t elu) Value(in float64, index int) float64 {
if in >= 0 {
return in
}
return math.Exp(in) - 1
}
func (t elu) Deriv(n *bs.Node, index int) float64 {
if in := n.InputValue(index); in < 0 {
return math.Exp(in)
}
return 1
}
// ****************************************
// Softplus
// ****************************************
type softplus int8
// Softplus is a smooth approximation of ReLU that approaches 0 as inputs tend towards negative
// infinity.
func Softplus() softplus {
return softplus(0)
}
func (t softplus) TypeString() string {
return "softplus"
}
func (t softplus) Finalize(n *bs.Node) error {
return nil
}
func (t softplus) Value(in float64, index int) float64 {
return math.Log(1 + math.Exp(in))
}
func (t softplus) Deriv(n *bs.Node, index int) float64 {
// 1 / (1 + e^-x)
return 1.0 / (1 + math.Exp(-n.InputValue(index)))
} | operators/relus.go | 0.769254 | 0.4206 | relus.go | starcoder |
package types
import (
fmt "fmt"
fssz "github.com/ferranbt/fastssz"
)
var _ fssz.HashRoot = (Slot)(0)
var _ fssz.Marshaler = (*Slot)(nil)
var _ fssz.Unmarshaler = (*Slot)(nil)
// Slot represents a single slot.
type Slot uint64
// Mul multiplies slot by x.
func (s Slot) Mul(x uint64) Slot {
return Slot(uint64(s) * x)
}
// MulSlot multiplies slot by another slot.
func (s Slot) MulSlot(x Slot) Slot {
return s * x
}
// MulEpoch multiplies slot using epoch value.
func (s Slot) MulEpoch(x Epoch) Slot {
return Slot(uint64(s) * uint64(x))
}
// Div divides slot by x.
func (s Slot) Div(x uint64) Slot {
if x == 0 {
panic("divbyzero")
}
return Slot(uint64(s) / x)
}
// DivSlot divides slot by another slot.
func (s Slot) DivSlot(x Slot) Slot {
if x == 0 {
panic("divbyzero")
}
return s / x
}
// DivEpoch divides slot using epoch value.
func (s Slot) DivEpoch(x Epoch) Slot {
if x == 0 {
panic("divbyzero")
}
return Slot(uint64(s) / uint64(x))
}
// Add increases slot by x.
func (s Slot) Add(x uint64) Slot {
return Slot(uint64(s) + x)
}
// AddSlot increases slot by another slot.
func (s Slot) AddSlot(x Slot) Slot {
return s + x
}
// AddEpoch increases slot using epoch value.
func (s Slot) AddEpoch(x Epoch) Slot {
return Slot(uint64(s) + uint64(x))
}
// Sub subtracts x from the slot.
func (s Slot) Sub(x uint64) Slot {
if uint64(s) < x {
panic("underflow")
}
return Slot(uint64(s) - x)
}
// SubSlot finds difference between two slot values.
func (s Slot) SubSlot(x Slot) Slot {
if s < x {
panic("underflow")
}
return s - x
}
// SubEpoch subtracts value of epoch type from the slot.
func (s Slot) SubEpoch(x Epoch) Slot {
if uint64(s) < uint64(x) {
panic("underflow")
}
return Slot(uint64(s) - uint64(x))
}
// Mod returns result of `slot % x`.
func (s Slot) Mod(x uint64) Slot {
return Slot(uint64(s) % x)
}
// ModSlot returns result of `slot % slot`.
func (s Slot) ModSlot(x Slot) Slot {
return s % x
}
// ModEpoch returns result of `slot % epoch`.
func (s Slot) ModEpoch(x Epoch) Slot {
return Slot(uint64(s) % uint64(x))
}
// HashTreeRoot returns calculated hash root.
func (s Slot) HashTreeRoot() ([32]byte, error) {
return fssz.HashWithDefaultHasher(s)
}
// HashWithDefaultHasher hashes a HashRoot object with a Hasher from the default HasherPool.
func (s Slot) HashTreeRootWith(hh *fssz.Hasher) error {
hh.PutUint64(uint64(s))
return nil
}
// UnmarshalSSZ deserializes the provided bytes buffer into the slot object.
func (s *Slot) UnmarshalSSZ(buf []byte) error {
if len(buf) != s.SizeSSZ() {
return fmt.Errorf("expected buffer of length %d received %d", s.SizeSSZ(), len(buf))
}
*s = Slot(fssz.UnmarshallUint64(buf))
return nil
}
// MarshalSSZTo marshals slot with the provided byte slice.
func (s *Slot) MarshalSSZTo(dst []byte) ([]byte, error) {
marshalled, err := s.MarshalSSZ()
if err != nil {
return nil, err
}
return append(dst, marshalled...), nil
}
// MarshalSSZ marshals slot into a serialized object.
func (s *Slot) MarshalSSZ() ([]byte, error) {
marshalled := fssz.MarshalUint64([]byte{}, uint64(*s))
return marshalled, nil
}
// SizeSSZ returns the size of the serialized object.
func (s *Slot) SizeSSZ() int {
return 8
} | slot.go | 0.835181 | 0.437163 | slot.go | starcoder |
// Package acd implements the double ratchet protocol specified by
// <NAME>, <NAME> and <NAME> in their paper
// The Double Ratchet: Security Notions, Proofs, and
// Modularization for the Signal Protocol (https://eprint.iacr.org/2018/1037.pdf).
// The scheme relies on novel cryptographic primitives like a forward-secure
// authenticated encryption scheme with associated data (FS-AEAD), a
// continuous key-agreement protocol (CKA) and a PRF-PRNG construction.
package acd
import (
"crypto/elliptic"
"strconv"
"github.com/alecthomas/binary"
"github.com/pkg/errors"
"github.com/qantik/ratcheted/primitives"
"github.com/qantik/ratcheted/primitives/encryption"
"github.com/qantik/ratcheted/primitives/signature"
)
const keySize = 16
// DoubleRatchet designates the the secure channel protocol defined by a
// FS-AEAD scheme, a CKA construction and a PRF-PRNG algorithm.
type DoubleRatchet struct {
pp *prfPRNG
fsa *fsAEAD
cka *cka
// optional pke and dss schemes
pke encryption.Asymmetric
dss signature.Signature
}
// dratchCiphertext bundles ciphertext material.
type dratchCiphertext struct {
I int // I is the epoch of the sender.
T []byte // T is the CKA message.
C []byte // C is the actual ciphertext.
S []byte // S is an optional signature.
EK, VK []byte
}
// User designates a participant in the protocol that can both send and receive
// messages. It has to be passed as an argument to both the send and receive routines.
type User struct {
Gamma []byte // Gamma is CKA state.
T []byte // T is the current CKA message.
I int // I is the current user epoch.
Root []byte // Root is the current PRF-PRNG key.
V map[int][]byte // V contains all FS-AEAD (send, receive) states.
// optional pke and dss key maps
ek, dk map[int][]byte
vk, sk map[int][]byte
name string
}
// NewDoubleRatchet returns a fresh double ratchet instance for a given AEAD scheme.
func NewDoubleRatchet(aead encryption.Authenticated,
pke encryption.Asymmetric,
dss signature.Signature) *DoubleRatchet {
return &DoubleRatchet{
pp: &prfPRNG{},
fsa: &fsAEAD{aead: aead, pp: &prfPRNG{}},
cka: &cka{curve: elliptic.P256()},
pke: pke, dss: dss,
}
}
// Init intializes the double ratchet protocol and returns two user states.
func (d DoubleRatchet) Init() (alice, bob *User, err error) {
root, err := d.pp.generate()
if err != nil {
return nil, nil, errors.Wrap(err, "unable to initialize prf-prng")
}
root, k, err := d.pp.up(keySize, root, nil)
if err != nil {
return nil, nil, errors.Wrap(err, "unable to poll prf-prng")
}
_, va, err := d.fsa.generate(k)
if err != nil {
return nil, nil, errors.Wrap(err, "unable to generate fs-aead state")
}
_, vb, err := d.fsa.generate(k)
if err != nil {
return nil, nil, errors.Wrap(err, "unable to generate fs-aead state")
}
ga, gb, err := d.cka.generate()
if err != nil {
return nil, nil, errors.Wrap(err, "unable to generate cka states")
}
var eka, dka, vka, ska map[int][]byte
var ekb, dkb, vkb, skb map[int][]byte
if d.pke != nil && d.dss != nil {
eka, dka, vka, ska, ekb, dkb, vkb, skb, err = d.genOpt()
if err != nil {
return nil, nil, errors.Wrap(err, "unable to create optional keys")
}
}
alice = &User{
Gamma: ga, T: nil, I: 0, V: map[int][]byte{0: va},
ek: eka, dk: dka, vk: vka, sk: ska,
name: "alice",
}
bob = &User{
Gamma: gb, T: nil, I: 0, V: map[int][]byte{0: vb},
ek: ekb, dk: dkb, vk: vkb, sk: skb,
name: "bob",
}
return
}
// genOpt generates the sets of optional PKE and DSS key pairs.
func (d DoubleRatchet) genOpt() (eka, dka, vka, ska, ekb, dkb, vkb, skb map[int][]byte, err error) {
eka, ekb = make(map[int][]byte), make(map[int][]byte)
dka, dkb = make(map[int][]byte), make(map[int][]byte)
vka, vkb = make(map[int][]byte), make(map[int][]byte)
ska, skb = make(map[int][]byte), make(map[int][]byte)
ek0, dk0, _ := d.pke.Generate(nil)
ek1, dk1, _ := d.pke.Generate(nil)
vk0, sk0, _ := d.dss.Generate()
vk1, sk1, _ := d.dss.Generate()
vk2, sk2, _ := d.dss.Generate()
vka[0], dka[0] = vk0, dk0
eka[1], ska[1] = ek1, sk1
vka[1], dka[1] = vk1, dk1
vkb[0], dkb[0] = vk0, dk0
ekb[1], skb[1] = ek1, sk1
vkb[1], dkb[1] = vk1, dk1
ska[2], skb[2] = sk2, sk2
vka[2], vkb[2] = vk2, vk2
eka[0], ekb[0] = ek0, ek0
ska[0], skb[0] = sk0, sk0
return
}
// Send calls the double ratchet send routine for a given user and message.
func (d DoubleRatchet) Send(user *User, msg []byte) ([]byte, error) {
if (user.name == "alice" && user.I%2 == 0) || (user.name == "bob" && user.I%2 == 1) {
user.V[user.I-1] = nil
user.I++
gamma, t, i, err := d.cka.send(user.Gamma)
if err != nil {
return nil, errors.Wrap(err, "unable create cka message")
}
user.Gamma = gamma
user.T = t
root, k, err := d.pp.up(16, user.Root, i)
if err != nil {
return nil, errors.Wrap(err, "unable to poll prf-prng")
}
user.Root = root
v, _, err := d.fsa.generate(k)
if err != nil {
return nil, errors.Wrap(err, "unable to create fresh fs-aead sender state")
}
user.V[user.I] = v
if d.pke != nil && d.dss != nil {
ek, dk, err := d.pke.Generate(nil)
if err != nil {
return nil, errors.Wrap(err, "unable to create fresh pke key pair")
}
vk, sk, err := d.dss.Generate()
if err != nil {
return nil, errors.Wrap(err, "unable to create fresh dss key pair")
}
user.ek[user.I+1], user.dk[user.I+1] = ek, dk
user.vk[user.I+2], user.sk[user.I+2] = vk, sk
}
}
var ad []byte
if d.pke != nil && d.dss != nil {
ad = primitives.Concat(
[]byte(strconv.Itoa(user.I)),
user.T,
user.ek[user.I+1],
user.vk[user.I+2],
)
} else {
ad = primitives.Concat([]byte(strconv.Itoa(user.I)), user.T)
}
v, c, err := d.fsa.send(user.V[user.I], msg, ad)
if err != nil {
return nil, errors.Wrap(err, "unable to fs-aead encrypt message")
}
user.V[user.I] = v
var ct []byte
if d.pke != nil && d.dss != nil {
c, err = d.pke.Encrypt(user.ek[user.I], c, nil)
if err != nil {
return nil, errors.Wrap(err, "unable to pke encrypt message")
}
s, err := d.dss.Sign(user.sk[user.I], append(ad, c...))
if err != nil {
return nil, errors.Wrap(err, "unable to dss sign message")
}
ct, err = binary.Marshal(&dratchCiphertext{
I: user.I, T: user.T,
C: c, S: s,
EK: user.ek[user.I+1], VK: user.vk[user.I+2],
})
if err != nil {
return nil, errors.Wrap(err, "unable to encode dratch ciphertext")
}
} else {
ct, err = binary.Marshal(&dratchCiphertext{I: user.I, T: user.T, C: c})
if err != nil {
return nil, errors.Wrap(err, "unable to encode dratch ciphertext")
}
}
return ct, nil
}
// Receive calls the double ratchet receive routine for a given user and ciphertext.
func (d DoubleRatchet) Receive(user *User, ct []byte) ([]byte, error) {
var c dratchCiphertext
if err := binary.Unmarshal(ct, &c); err != nil {
return nil, errors.Wrap(err, "unable to decode dratch ciphertext")
}
var ad, cipher []byte
if d.pke != nil && d.dss != nil {
ad = primitives.Concat(
[]byte(strconv.Itoa(c.I)),
c.T,
c.EK, c.VK,
)
if err := d.dss.Verify(user.vk[c.I], append(ad, c.C...), c.S); err != nil {
return nil, errors.Wrap(err, "unable to verify dss signature")
}
cipher, _ = d.pke.Decrypt(user.dk[c.I], c.C, nil)
} else {
ad = append([]byte(strconv.Itoa(c.I)), c.T...)
cipher = c.C
}
if (user.name == "alice" && c.I <= user.I && c.I%2 == 0) ||
(user.name == "bob" && c.I <= user.I && c.I%2 == 1) {
v, msg, err := d.fsa.receive(user.V[c.I], cipher, ad)
if err != nil {
return nil, errors.Wrap(err, "unable to fs-aead decrypt message")
}
user.V[c.I] = v
return msg, nil
} else if (user.name == "alice" && c.I == user.I+1 && user.I%2 == 1) ||
(user.name == "bob" && c.I == user.I+1 && user.I%2 == 0) {
user.V[c.I-2] = nil
user.I++
if d.pke != nil && d.dss != nil {
user.sk[c.I-1], user.ek[c.I], user.vk[c.I+1] = nil, nil, nil
user.ek[c.I+1], user.vk[c.I+2] = c.EK, c.VK
}
gamma, i, err := d.cka.receive(user.Gamma, c.T)
if err != nil {
return nil, errors.Wrap(err, "unable to receive cka message")
}
user.Gamma = gamma
root, k, err := d.pp.up(16, user.Root, i)
if err != nil {
return nil, errors.Wrap(err, "unable to poll prf-prng")
}
user.Root = root
_, v, err := d.fsa.generate(k)
if err != nil {
return nil, errors.Wrap(err, "unable to create fresh fs-aead receiver state")
}
user.V[c.I] = v
v, msg, err := d.fsa.receive(user.V[c.I], cipher, ad)
if err != nil {
return nil, errors.Wrap(err, "unable to fs-aead decrypt message")
}
user.V[c.I] = v
return msg, nil
}
return nil, errors.New("user epochs are out-of-sync")
}
// Size returns the size (in bytes) of a user state.
func (u User) Size() int {
size := 0
for _, a := range []map[int][]byte{u.V, u.ek, u.dk, u.vk, u.sk} {
for _, b := range a {
size += len(b)
}
}
return size + len(u.Gamma) + len(u.T) + len(u.Root)
} | acd/double-ratchet.go | 0.727298 | 0.471467 | double-ratchet.go | starcoder |
package connect4
/*
* How a connect4 - bitmap works
* https:github.com/denkspuren/BitboardC4/blob/master/BitboardDesign.md
*/
const BOTTOM uint64 = 0b_0000001_0000001_0000001_0000001_0000001_0000001_0000001
const THIRD uint64 = 0b_1111111_0000000_0000000
const SECOND uint64 = 0b_0000000_1111111_0000000
const FIRST uint64 = 0b_0000000_0000000_1111111
type BitmapBoard struct {
Pos uint64
Mask uint64
}
func (bb *BitmapBoard) Init() {
bb.Pos = 0
bb.Mask = 0
}
func (bb *BitmapBoard) GetPlayerBitmap(color int8) uint64 {
return Ternary(color == 1, bb.Pos, bb.Pos^bb.Mask).(uint64)
}
func (bb *BitmapBoard) CanPlay(col int8) bool {
return (bb.Mask>>(col*7+5))&1 == 0
}
func (bb *BitmapBoard) ToMatrix(weight int) [Height][Width]int {
var board [Height][Width]int
opponent := bb.GetPlayerBitmap(-1)
for i := 0; i < Width; i++ {
for j := 0; j < Height; j++ {
idx := i*Width + j
if (bb.Pos>>idx)&1 == 1 {
board[j][i] = -weight
} else if (opponent>>idx)&1 == 1 {
board[j][i] = weight
}
}
}
return board
}
func (bb *BitmapBoard) MakeMove(col int8) {
bb.Mask |= bb.Mask + (1 << (col * 7))
bb.Pos ^= bb.Mask
}
func (bb *BitmapBoard) Hash() uint64 {
return bb.Pos + bb.Mask + BOTTOM
}
func (bb *BitmapBoard) CheckWinner() bool {
var options = [4]int8{1, 6, 8, 7}
var pos uint64
for _, dir := range options {
pos = bb.Pos & (bb.Pos >> dir)
if pos&(pos>>(dir*2)) > 0 {
return true
}
}
return false
}
/*
@result => tuple (code - int, all moves - [7]array, size - amount of valid moves)
@code => 0: ok, 1: empty, 2: forced move
*/
func (bb *BitmapBoard) SortedMoves(hash uint64) (int8, [7]MoveEval, int) {
var moves [7]MoveEval
var validCount int = 0
isSymmetrical := IsSymmetrical(hash)
// fill table with valid moves
for _, option := range ExploreOrder {
if (isSymmetrical && option > 3) || !bb.CanPlay(option) {
continue
}
tmpBoard := BitmapBoard{Pos: bb.Pos, Mask: bb.Mask}
tmpBoard.MakeMove(option)
winner := tmpBoard.CheckWinner()
if winner {
return 2, [7]MoveEval{{Col: option, Board: tmpBoard, Winner: winner}}, 0 // forced move
}
moves[validCount] = MoveEval{Col: option, Board: tmpBoard, Winner: winner}
validCount++
}
if validCount == 0 {
return 1, [7]MoveEval{}, 0
}
return 0, moves, validCount
} | core/modules/connect4/bitmapboard.go | 0.827201 | 0.422624 | bitmapboard.go | starcoder |
package mercantile
import (
"math"
)
type Bbox struct {
Left float64
Bottom float64
Right float64
Top float64
}
type LngLatBbox struct {
West float64
South float64
East float64
North float64
}
type Tile struct {
X int
Y int
Z int
}
type LngLat struct {
Lng float64
Lat float64
}
type XY struct {
X float64
Y float64
}
func (t *Tile) Bounds() *LngLatBbox {
nt := &Tile{
X: t.X + 1,
Y: t.Y + 1,
Z: t.Z,
}
a := t.UpperLeft()
b := nt.UpperLeft()
return &LngLatBbox{
West: a.Lng,
South: b.Lat,
East: b.Lng,
North: a.Lat,
}
}
func (t *Tile) XYBounds() *Bbox {
nt := &Tile{
X: t.X + 1,
Y: t.Y + 1,
Z: t.Z,
}
leftTopLngLat := t.UpperLeft()
rightBottomLngLat := nt.UpperLeft()
leftTopXY := leftTopLngLat.XY(false)
rightBottomXY := rightBottomLngLat.XY(false)
return &Bbox{
Left: leftTopXY.X,
Bottom: rightBottomXY.Y,
Right: rightBottomXY.X,
Top: leftTopXY.Y,
}
}
func (t *Tile) UpperLeft() *LngLat {
n := math.Pow(2.0, float64(t.Z))
lonDeg := float64(t.X)/n*360.0 - 180.0
latRad := math.Atan(math.Sinh(math.Pi * (1 - 2*float64(t.Y)/n)))
latDeg := latRad * 180.0 / math.Pi
lngLat := &LngLat{
Lng: lonDeg,
Lat: latDeg,
}
return lngLat
}
func (lngLat *LngLat) Truncate() {
if lngLat.Lng > 180.0 {
lngLat.Lng = 180.0
} else if lngLat.Lng < -180.0 {
lngLat.Lng = -180.0
}
if lngLat.Lat > 90.0 {
lngLat.Lng = 90.0
} else if lngLat.Lat < -90.0 {
lngLat.Lat = -90.0
}
}
func (lngLat *LngLat) XY(truncate bool) *XY {
if truncate {
lngLat.Truncate()
}
x := 6378137.0 * lngLat.Lng * math.Pi / 180.0
var y float64
if lngLat.Lat <= -90 {
y = math.Inf(-1)
} else if lngLat.Lat >= 90 {
y = math.Inf(0)
} else {
latRad := lngLat.Lat * math.Pi / 180.0
y = 6378137.0 * math.Log(math.Tan((math.Pi*0.25)+(0.5*latRad)))
}
xy := &XY{
X: x,
Y: y,
}
return xy
}
func (xy *XY) LngLat(truncate bool) *LngLat {
r2d := 180.0 / math.Pi
a := 6378137.0
lngLat := &LngLat{
Lng: xy.X * r2d / a,
Lat: ((math.Pi * 0.5) - 2.0*math.Atan(math.Exp(-xy.Y/a))) * r2d,
}
if truncate {
lngLat.Truncate()
}
return lngLat
} | mercantile.go | 0.750736 | 0.44077 | mercantile.go | starcoder |
package house
// Song generates the full text of "The House That Jack Built".
func Song() (song string) {
phrases := []struct {
object, predicate string
}{
{"the house that Jack built", "lay in"},
{"the malt", "ate"},
{"the rat", "killed"},
{"the cat", "worried"},
{"the dog", "tossed"},
{"the cow with the crumpled horn", "milked"},
{"the maiden all forlorn", "kissed"},
{"the man all tattered and torn", "married"},
{"the priest all shaven and shorn", "woke"},
{"the rooster that crowed in the morn", "kept"},
{"the farmer sowing his corn", "belonged to"},
{"the horse and the hound and the horn", ""},
}
for v := range phrases {
prefixPhrase := ""
relPhrases := []string{}
suffixPhrase := ""
for i := v; i >= 0; i-- {
phrase := phrases[i]
switch {
case i == v && 0 == v:
prefixPhrase = Embed("This is", phrase.object) + "."
if v != len(phrases)-1 {
prefixPhrase += "\n"
}
case i == v:
prefixPhrase = Embed("This is", phrase.object) + "\n"
case i == 0:
suffixPhrase = Embed(Embed("that", phrase.predicate), phrase.object) + "."
if v != len(phrases)-1 {
suffixPhrase += "\n"
}
default:
relPhrases = append(relPhrases, Embed(Embed("that", phrase.predicate), phrase.object)+"\n")
}
}
verse := Verse(prefixPhrase, relPhrases, suffixPhrase)
song += verse
if v != len(phrases)-1 {
song += "\n"
}
}
return song
}
// Verse generates a verse with relative phrases that have a recursive structure.
func Verse(prefixPhrase string, relPhrases []string, suffixPhrase string) (verse string) {
verse = prefixPhrase
for _, relPhrase := range relPhrases {
verse = Embed(verse, relPhrase)
}
verse = Embed(verse, suffixPhrase)
return verse
}
// Embed embeds a phrase into another phrase.
func Embed(prefixPhrase, suffixPhrase string) (phrase string) {
if prefixPhrase == "" || suffixPhrase == "" || prefixPhrase[len(prefixPhrase)-1] == '\n' || suffixPhrase[0] == '\n' {
phrase = prefixPhrase + suffixPhrase
} else {
phrase = prefixPhrase + " " + suffixPhrase
}
return phrase
} | solutions/go/house/house.go | 0.545286 | 0.420124 | house.go | starcoder |
package enmime
import (
"container/list"
)
// PartMatcher is a function type that you must implement to search for Parts using the
// BreadthMatch* functions. Implementators should inspect the provided Part and return true if it
// matches your criteria.
type PartMatcher func(part *Part) bool
// BreadthMatchFirst performs a breadth first search of the Part tree and returns the first part
// that causes the given matcher to return true
func (p *Part) BreadthMatchFirst(matcher PartMatcher) *Part {
q := list.New()
q.PushBack(p)
// Push children onto queue and attempt to match in that order
for q.Len() > 0 {
e := q.Front()
p := e.Value.(*Part)
if matcher(p) {
return p
}
q.Remove(e)
c := p.FirstChild
for c != nil {
q.PushBack(c)
c = c.NextSibling
}
}
return nil
}
// BreadthMatchAll performs a breadth first search of the Part tree and returns all parts that cause
// the given matcher to return true
func (p *Part) BreadthMatchAll(matcher PartMatcher) []*Part {
q := list.New()
q.PushBack(p)
matches := make([]*Part, 0, 10)
// Push children onto queue and attempt to match in that order
for q.Len() > 0 {
e := q.Front()
p := e.Value.(*Part)
if matcher(p) {
matches = append(matches, p)
}
q.Remove(e)
c := p.FirstChild
for c != nil {
q.PushBack(c)
c = c.NextSibling
}
}
return matches
}
// DepthMatchFirst performs a depth first search of the Part tree and returns the first part that
// causes the given matcher to return true
func (p *Part) DepthMatchFirst(matcher PartMatcher) *Part {
root := p
for {
if matcher(p) {
return p
}
c := p.FirstChild
if c != nil {
p = c
} else {
for p.NextSibling == nil {
if p == root {
return nil
}
p = p.Parent
}
p = p.NextSibling
}
}
}
// DepthMatchAll performs a depth first search of the Part tree and returns all parts that causes
// the given matcher to return true
func (p *Part) DepthMatchAll(matcher PartMatcher) []*Part {
root := p
matches := make([]*Part, 0, 10)
for {
if matcher(p) {
matches = append(matches, p)
}
c := p.FirstChild
if c != nil {
p = c
} else {
for p.NextSibling == nil {
if p == root {
return matches
}
p = p.Parent
}
p = p.NextSibling
}
}
} | match.go | 0.694406 | 0.465813 | match.go | starcoder |
package example
import (
"encoding/json"
"fmt"
"io"
"os"
"sort"
"strings"
"github.com/kiteco/kiteco/kite-go/lang/python/pythoncomplete/offline/legacy"
"github.com/kiteco/kiteco/kite-golib/fileutil"
)
// Example describes a situation we want to provide completions in, defined as a buffer/cursor position, along with
// the completion that was expected for the example, as well as the completions that were provided by different models.
type Example struct {
Buffer string
Cursor int64
// Symbol of the relevant value on which we want to do completions
Symbol string
// Expected identifier for this example
Expected string
// Provided is a map of model name to the information provided by the model for the example
Provided map[string]Provided
}
// Rank returns the rank of the expected completion in the completions given by the provider, -1 if not found.
func (e Example) Rank(provider string) int {
for i, c := range e.Provided[provider].Completions {
if c.Identifier == e.Expected {
return i
}
}
return -1
}
// Provided contains the output of each completions model for the particular example
type Provided struct {
Completions []Completion
MungedBuffer string
}
// Completion generated by a model that is stored in the example
type Completion struct {
Identifier string
Score float64
MixCompletion legacy.MixCompletion
Duplicate bool
}
// Collection of examples
type Collection struct {
Examples []Example
Path string
}
// NewCollection creates a collection from either a single file or a directory. If given a directory, it reads all
// .json files in the directory. In either case, the files are assumed to contain JSON-encoded examples separated by
// newlines.
func NewCollection(path string) (Collection, error) {
fi, err := os.Stat(path)
if err != nil {
return Collection{}, err
}
var files []string
if fi.IsDir() {
files, err = listJSONFiles(path)
if err != nil {
return Collection{}, err
}
} else {
files = []string{path}
}
var examples []Example
for _, filename := range files {
exs, err := readExamples(filename)
if err != nil {
return Collection{}, err
}
examples = append(examples, exs...)
}
return Collection{
Examples: examples,
Path: path,
}, nil
}
// WriteToFile writes a collection to a single file.
func (c Collection) WriteToFile(filename string) error {
outf, err := os.Create(filename)
if err != nil {
return err
}
defer outf.Close()
for _, e := range c.Examples {
if err := writeExample(e, outf); err != nil {
return err
}
}
return nil
}
// WriteToDir writes a collection to a directory, with one JSON file per example.
func (c Collection) WriteToDir(dir string) error {
for i, e := range c.Examples {
filename := fmt.Sprintf("%s/example-%04d-of-%04d.json", dir, i+1, len(c.Examples))
outf, err := os.Create(filename)
if err != nil {
return err
}
err = writeExample(e, outf)
outf.Close()
if err != nil {
return err
}
}
return nil
}
func writeExample(e Example, w io.Writer) error {
enc := json.NewEncoder(w)
enc.SetIndent("", " ")
return enc.Encode(e)
}
func readExamples(filename string) ([]Example, error) {
inf, err := fileutil.NewCachedReader(filename)
if err != nil {
return nil, err
}
defer inf.Close()
var examples []Example
d := json.NewDecoder(inf)
for {
var ex Example
err := d.Decode(&ex)
if err == io.EOF {
break
}
if err != nil {
return nil, err
}
examples = append(examples, ex)
}
return examples, nil
}
func listJSONFiles(dir string) ([]string, error) {
files, err := fileutil.ListDir(dir)
if err != nil {
return nil, err
}
sort.Strings(files)
var filtered []string
for _, f := range files {
if strings.HasSuffix(f, ".json") {
filtered = append(filtered, f)
}
}
return filtered, nil
} | kite-go/lang/python/pythoncomplete/offline/example/example.go | 0.692954 | 0.407392 | example.go | starcoder |
package metadata
import (
"encoding/json"
"fmt"
)
type RpcBlock struct {
Author string `"&json:author&"`
Difficulty string `"&json:difficulty&"`
ExtraData string `"&json:extraData&"`
GasLimit string `"&json:gasLimit&"`
GasUsed string `"&json:gasUsed&"`
Hash string `"&json:hash&"`
LogsBloom string `"&json:logsBloom&"`
Miner string `"&json:miner&"`
MixHash string `"&json:mixHash&"`
Nonce string `"&json:nonce&"`
Number string `"&json:number&"`
ParentHash string `"&json:parentHash&"`
ReceiptsRoot string `"&json:receiptsRoot&"`
SealFields []string `"&json:sealFields&"`
Sha3Uncles string `"&json:sha3Uncles&"`
Size string `"&json:size&"`
StateRoot string `"&json:stateRoot&"`
Timestamp string `"&json:timestamp&"`
TotalDifficulty string `"&json:totalDifficulty&"`
TransactionsRoot string `"&json:transactionsRoot&"`
Transactions []rpcTransaction `json:"transactions"`
}
type rpcTransaction struct {
BlockHash string `"&json:blockHash&"`
BlockNumber string `"&json:blockNumber&"`
ChainId string `"&json:chainId&"`
Condition string `"&json:condition&"`
Creates string `"&json:creates&"`
From string `"&json:from&"`
Gas string `"&json:gas&"`
GasPrice string `"&json:gasPrice&"`
Hash string `"&json:hash&"`
Input string `"&json:input&"`
Nonce string `"&json:nonce&"`
PublicKey string `"&json:publicKey&"`
R string `"&json:r&"`
Raw string `"&json:raw&"`
S string `"&json:s&"`
StandardV string `"&json:standardV&"`
To string `"&json:to&"`
TransactionIndex string `"&json:transactionIndex&"`
V string `"&json:v&"`
Value string `"&json:value&"`
}
func UnMarshalBlock(data []byte) (*RpcBlock, error) {
para := RpcBlock{}
err := json.Unmarshal([]byte(data), ¶)
if err != nil {
fmt.Print(err)
return nil, err
}
return ¶, nil
} | metadata/etherBlock.go | 0.510985 | 0.471102 | etherBlock.go | starcoder |
package core
// BuildSpec defines how the software is to be built
type BuildSpec struct {
}
// PackageSpec defines how the software is to be packaged
type PackageSpec struct {
}
// DeploymentSpec defines how software is to be deployed
type DeploymentSpec struct {
}
// Metadata is a map of key value pairs the can be used to hold metada.
type Metadata map[string]string
// CreateMsg is an instruction to create a CompositeInteractor based
// upon the CompositeInteractorSpec. The CompositeInteractorSpec
// specifies the functionality. The Build, Package, Deploy fields
/// specify how that functionality should be implemented.
type CreateMsg struct {
Interactor CompositeInteractorSpec
Version VersionSpec
Build BuildSpec
Package PackageSpec
Deploy DeploymentSpec
Meta Metadata
}
// UpdateMsg is an instruction to re-create a CompositeInteractor based
// upon the CompositeInteractorSpec. The CompositeInteractorSpec
// specifies the functionality. The Build, Package, Deploy fields
// specify how that functionality should be reimplemented.
type UpdateMsg struct {
Interactor CompositeInteractorSpec
Version VersionSpec
Build BuildSpec
Package PackageSpec
Deploy DeploymentSpec
Meta Metadata
}
// DeprecateMsg is an instruction to deprecate the particular version of
// the Interactor specified by the InteractorTypeRef
type DeprecateMsg struct {
TypeRef InteractorTypeRef
Meta Metadata
}
// ArchiveMsg is an instruction to archive the particular version of
// the Interactor specified by the InteractorTypeRef
type ArchiveMsg struct {
TypeRef InteractorTypeRef
Meta Metadata
}
// BuildMsg is an instruction to (re-) build the particular version
// of the Interactor specified by the InteractorTypeRef
type BuildMsg struct {
TypeRef InteractorTypeRef
Meta Metadata
}
// DeployMsg is an instruction to (re-)deploy the particular version
// of the Interactor specified by the InteractorTypeRef
type DeployMsg struct {
TypeRef InteractorTypeRef
Meta Metadata
}
// UndeployMsg is an instruction to undeploy the particular version
// of the Interactor specified by the InteractorTypeRef
type UndeployMsg struct {
TypeRef InteractorTypeRef
Meta Metadata
}
// HotSwapMsg is an instruction to substitute all instances of the
// RemoveInteractor with the InsertInteractor.
type HotSwapMsg struct {
Container InteractorTypeRef
RemoveInteractor InteractorTypeRef
InsertInteractor InteractorTypeRef
Meta Metadata
} | core/messages.go | 0.604632 | 0.489137 | messages.go | starcoder |
package bingo
import (
"encoding/base64"
"errors"
)
// Board represents a 5*5 square bingo board.
// The middle square (index 12) is left empty (0).
type Board [25]Number
// NewBoard creates a board by drawing numbers from a game.
// Each column of the board (5-cell group) only contains numbers of the same column.
func NewBoard() *Board {
var g Game
GameResetter.Reset(&g)
g.numbersDrawn = g.NumbersLeft() // "draw" all the numbers
cols := g.DrawnNumberColumns()
var b Board
copy(b[0:], cols[0][:5])
copy(b[5:], cols[1][:5])
copy(b[10:], cols[2][:2])
copy(b[13:], cols[2][2:4]) // leave space for free cell, copying numbers and indexes 3 & 4 into rows 4 & 5 of middle column
copy(b[15:], cols[3][:5])
copy(b[20:], cols[4][:5])
return &b
}
// HasLine determines if the board has a five-in-a row line, creating a BINGO for the game.
func (b Board) HasLine(g Game) bool {
nums := numberSet(g)
if b.hasDiagonal1(nums) || b.hasDiagonal2(nums) {
return true
}
for i := 0; i < 5; i++ {
if b.hasColumn(i, nums) || b.hasRow(i, nums) {
return true
}
}
return false
}
// IsFilled determines if all the numbers in the board have been called in the game.
func (b Board) IsFilled(g Game) bool {
nums := numberSet(g)
for _, n := range b {
if _, ok := nums[n]; !ok {
return false
}
}
return true
}
// NumberSet creates a map of all the drawn numbers in the game.
// It also includes the zero number to always account for the middle free cell.
func numberSet(g Game) map[Number]struct{} {
nums := make(map[Number]struct{}, g.numbersDrawn+1)
nums[0] = struct{}{} // free cell
drawnNumbers := g.DrawnNumbers()
for _, n := range drawnNumbers {
nums[n] = struct{}{}
}
return nums
}
// hasColumn checks to see if the column on the board is completely included in nums.
func (b Board) hasColumn(c int, nums map[Number]struct{}) bool {
for r := 0; r < 5; r++ {
i := c*5 + r
if _, ok := nums[b[i]]; !ok {
return false
}
}
return true
}
// hasColumn checks to see if the row on the board is completely included in nums.
func (b Board) hasRow(r int, nums map[Number]struct{}) bool {
for c := 0; c < 5; c++ {
i := c*5 + r
if _, ok := nums[b[i]]; !ok {
return false
}
}
return true
}
// hasDiagonal1 checks to see if the leading 5-number diagonal on the board is completely included in nums.
func (b Board) hasDiagonal1(nums map[Number]struct{}) bool {
for j := 0; j < 5; j++ {
i := j*5 + j
if _, ok := nums[b[i]]; !ok {
return false
}
}
return true
}
// hasColumn checks to see if the trailing 5-number diagonal on the board is completely included in nums.
func (b Board) hasDiagonal2(nums map[Number]struct{}) bool {
for j := 0; j < 5; j++ {
i := j*5 + 4 - j
if _, ok := nums[b[i]]; !ok {
return false
}
}
return true
}
// ID encodes the board into a base64 string.
// Each two numbers can be shrunk to a 0-14 number, concatenated, and converted to a byte.
// This results in a byte array that is (25-1)/2 = 12 characters long
// Since there are 8 bits in a byte the array uses 8 * 12 = 96 bits.
// Base 64 uses 6 bits for each character, so the string will be 96 / 6 = 16 characters long
func (b Board) ID() (string, error) {
if !b.isValid() {
return "", errors.New("board has duplicate/invalid numbers")
}
data := make([]byte, 0, 12)
for i := 0; i < len(b); i++ {
l := b.encodeNumber(i)
i++
r := b.encodeNumber(i)
ch := byte(l<<4 | r)
data = append(data, ch)
if i == 11 { // free cell
i++
}
}
id := base64.URLEncoding.EncodeToString(data)
return id, nil
}
// BoardFromID converts the board id to a Board.
// An error is returned if the id is for an invalid board.
func BoardFromID(id string) (*Board, error) {
if len(id) != 16 {
return nil, errors.New("id must be 16 characters long")
}
data, err := base64.URLEncoding.DecodeString(id)
if err != nil {
return nil, errors.New("decoding board from id: " + err.Error())
}
var b Board
i := 0
for _, ch := range data {
l, err := decodeBoardNumber(ch>>4, i)
if err != nil {
return nil, err
}
r, err := decodeBoardNumber(ch&15, i+1)
if err != nil {
return nil, err
}
b[i], b[i+1] = l, r
i += 2
if i == 12 { // free cell
i++
}
}
if !b.isValid() {
return nil, errors.New("board has duplicate/invalid numbers")
}
return &b, nil
}
// encodeNumber converts the number to one in [0,15)
func (b Board) encodeNumber(index int) int {
encodedNumber := int(b[index]-1) % 15 // (mod 15 is same as subtract n.Column()*15)
return encodedNumber
}
// decodeBoardNumber converts the [0,15) byte back to a number at the index in the board
func decodeBoardNumber(encodedNumber byte, index int) (Number, error) {
c := index / 5
n := Number(int(encodedNumber+1) + c*15)
return n, nil
}
func (b Board) numbers() numbers {
nums := make(numbers, len(b)-1) // do not check the center
copy(nums, b[:12])
copy(nums[12:], b[13:])
return nums
}
// isValid determines if the board has valid numbers, no duplicates, and the center is the zero value
func (b Board) isValid() bool {
switch {
case b[12] != 0, !b.numbers().Valid(), !b.numbersInCorrectColumns():
return false
}
return true
}
// numbersInCorrectColumns ensures numbers are in correct columns
func (b Board) numbersInCorrectColumns() bool {
for i, n := range b {
if i != 12 && n.Column() != i/5 {
return false
}
}
return true
} | bingo/board.go | 0.741674 | 0.474022 | board.go | starcoder |
package gg
import (
"image"
"image/color"
"golang.org/x/image/font"
"gopkg.in/fogleman/gg.v1"
)
type Canvas struct {
ctx *gg.Context
}
func NewCanvas(width, height int) *Canvas {
return &Canvas{ctx: gg.NewContext(width, height)}
}
func (C *Canvas) Image() image.Image {
return C.ctx.Image()
}
func (C *Canvas) Width() int {
return C.ctx.Width()
}
func (C *Canvas) Height() int {
return C.ctx.Height()
}
func (C *Canvas) Clear() {
C.ctx.Clear()
}
func (C *Canvas) ClearPath() {
C.ctx.ClearPath()
}
func (C *Canvas) Clip() {
C.ctx.Clip()
}
func (C *Canvas) ClosePath() {
C.ctx.ClosePath()
}
func (C *Canvas) BeginPath() {
C.ctx.NewSubPath()
}
func (C *Canvas) CubicTo(x1, y1, x2, y2, x3, y3 float64) {
C.ctx.CubicTo(x1, y1, x2, y2, x3, y3)
}
func (C *Canvas) Arc(x, y, r, angle1, angle2 float64) {
C.ctx.DrawArc(x, y, r, angle1, angle2)
}
func (C *Canvas) Circle(x, y, r float64) {
C.ctx.DrawCircle(x, y, r)
}
func (C *Canvas) Ellipse(x, y, rx, ry float64) {
C.ctx.DrawEllipse(x, y, rx, ry)
}
func (C *Canvas) Line(x1, y1, x2, y2 float64) {
C.ctx.DrawLine(x1, y1, x2, y2)
}
func (C *Canvas) Rectangle(x, y, w, h float64) {
C.ctx.DrawRectangle(x, y, w, h)
}
func (C *Canvas) RoundedRectangle(x, y, w, h, r float64) {
C.ctx.DrawRoundedRectangle(x, y, w, h, r)
}
func (C *Canvas) DrawImage(im image.Image, x, y int) {
C.ctx.DrawImage(im, x, y)
}
func (C *Canvas) DrawString(s string, x, y float64) {
C.ctx.DrawString(s, x, y)
}
func (C *Canvas) Fill() {
C.ctx.Fill()
}
func (C *Canvas) LineTo(x, y float64) {
C.ctx.LineTo(x, y)
}
func (C *Canvas) SetFont(v font.Face) {
C.ctx.SetFontFace(v)
}
func (C *Canvas) MeasureString(s string) (w, h float64) {
return C.ctx.MeasureString(s)
}
func (C *Canvas) MoveTo(x, y float64) {
C.ctx.MoveTo(x, y)
}
func (C *Canvas) Save() {
C.ctx.Push()
}
func (C *Canvas) Restore() {
C.ctx.Pop()
}
func (C *Canvas) ResetClip() {
C.ctx.ResetClip()
}
func (C *Canvas) QuadraticTo(x1, y1, x2, y2 float64) {
C.ctx.QuadraticTo(x1, y1, x2, y2)
}
func (C *Canvas) Scale(x, y float64) {
C.ctx.Scale(x, y)
}
func (C *Canvas) SetColor(c color.Color) {
C.ctx.SetColor(c)
}
func (C *Canvas) SetDash(dashes ...float64) {
C.ctx.SetDash(dashes...)
}
func (C *Canvas) SetDashOffset(offset float64) {
C.ctx.SetDashOffset(offset)
}
func (C *Canvas) SetHexColor(x string) {
C.ctx.SetHexColor(x)
}
func (C *Canvas) SetLineWidth(lineWidth float64) {
C.ctx.SetLineWidth(lineWidth)
}
func (C *Canvas) Stroke() {
C.ctx.Stroke()
}
func (C *Canvas) Rotate(angle float64) {
C.ctx.Rotate(angle)
}
func (C *Canvas) Translate(x, y float64) {
C.ctx.Translate(x, y)
} | canvas/gg/canvas.go | 0.814828 | 0.449695 | canvas.go | starcoder |
package main
import (
"fmt"
"math"
"math/rand"
"github.com/ByteArena/box2d"
)
// Short names
var kinematic uint8 = box2d.B2BodyType.B2_kinematicBody
var dynamic uint8 = box2d.B2BodyType.B2_dynamicBody
var static uint8 = box2d.B2BodyType.B2_staticBody
// func initBox2D() *box2d.B2World {
// // Box2D is tuned for meters, kilograms, and seconds.
// // Define the gravity vector.
// gravity := box2d.MakeB2Vec2(0.0, 0.0)
// // Construct a world object, which will hold and simulate the rigid bodies.
// world := box2d.MakeB2World(box2d.MakeB2Vec2(0.0, 0.0))
// return &world
// }
func addFrame(world *box2d.B2World, frameSize float64) {
// A place to store bodies by name
//characters := make(map[string]*box2d.B2Body)
// 1. Create a bodydef. Initial Position, Type (Dynamic, Static, Kinematic)
// 2. Create the body from the def.
// 3. Create a shape - Polygon, Chain, Circle
// 4. Create a fixture - glues body and shape. denisty, friction, restitution
// shape - a polygon or circle
// restitution - how bouncy the fixture is
// friction - how slippery it is
// density - how heavy it is in relation to its area
// Fixtures are used to describe the size, shape, and material properties of an object in the physics scene.
// ----------------- Left
leftBodyDef := box2d.MakeB2BodyDef()
leftBodyDef.Position.Set(-frameSize, 0)
leftBody := world.CreateBody(&leftBodyDef)
leftBox := box2d.MakeB2PolygonShape()
leftBox.SetAsBox(10.0, 100.0)
leftBody.CreateFixture(&leftBox, 0)
// ----------------- Right
rightBodyDef := box2d.MakeB2BodyDef()
rightBodyDef.Position.Set(frameSize, 0)
rightBody := world.CreateBody(&rightBodyDef)
rightBox := box2d.MakeB2PolygonShape()
rightBox.SetAsBox(10.0, 100.0)
rightBody.CreateFixture(&rightBox, 00)
// ----------------- Ground
groundBodyDef := box2d.MakeB2BodyDef()
groundBodyDef.Position.Set(0, -frameSize)
groundBody := world.CreateBody(&groundBodyDef)
groundBox := box2d.MakeB2PolygonShape()
groundBox.SetAsBox(100.0, 10.0)
groundBody.CreateFixture(&groundBox, 0)
// ----------------- Ceiling
ceilingBodyDef := box2d.MakeB2BodyDef()
ceilingBodyDef.Position.Set(0.0, frameSize)
ceilingBody := world.CreateBody(&ceilingBodyDef)
ceilingBox := box2d.MakeB2PolygonShape()
ceilingBox.SetAsBox(100.0, 10.0)
ceilingBody.CreateFixture(&ceilingBox, 0.0)
}
// func addBox(world *box2d.B2World, pos, size box2d.B2Vec2, type2D uint8) {
// // BoxDef
// boxBodyDef := box2d.MakeB2BodyDef()
// boxBodyDef.Position.Set(pos.X, pos.Y)
// boxBodyDef.Type = type2D
// // Create body instance
// boxBody := world.CreateBody(&boxBodyDef)
// boxBody.SetTransform(box2d.B2Vec2{X: pos.X, Y: pos.Y}, 0)
// boxBody.SetUserData("box")
// // Create a box/circle shape
// boxShape := box2d.MakeB2PolygonShape()
// boxShape.SetAsBox(size.X, size.Y)
// // Fixture
// // A fixture binds a shape to a body and adds material properties such as density, friction, and restitution.
// // A fixture puts a shape into the collision system (broad-phase) so that it can collide with other shapes.
// fixtureDef := box2d.MakeB2FixtureDef()
// fixtureDef.Shape = &boxShape
// fixtureDef.Density = 1.0
// fixtureDef.Friction = 0.0
// fixtureDef.Restitution = 1
// boxBody.CreateFixtureFromDef(&fixtureDef)
// }
func addBox(world *box2d.B2World, pos, vel, size box2d.B2Vec2, type2D uint8) {
// ----------------- Box
boxBodyDef := box2d.MakeB2BodyDef()
boxBodyDef.Position.Set(pos.X, pos.Y)
boxBodyDef.Type = type2D
boxBodyDef.AllowSleep = false
boxBodyDef.LinearVelocity.Set(vel.X, vel.Y)
// Body instance
boxBody := world.CreateBody(&boxBodyDef)
boxBody.SetTransform(box2d.B2Vec2{X: pos.X, Y: pos.Y}, 0)
boxBody.SetUserData("box")
// Create a box/circle shape
boxShape := box2d.MakeB2PolygonShape()
boxShape.SetAsBox(size.X, size.Y)
// Fixture
// A fixture binds a shape to a body and adds material properties such as density, friction, and restitution.
// A fixture puts a shape into the collision system (broad-phase) so that it can collide with other shapes.
fixtureDef := box2d.MakeB2FixtureDef()
fixtureDef.Shape = &boxShape
fixtureDef.Density = 1.0
fixtureDef.Friction = 0.0
fixtureDef.Restitution = 1
boxBody.CreateFixtureFromDef(&fixtureDef)
}
func addDynamicBall(world *box2d.B2World, pos, vel, size box2d.B2Vec2) {
// ----------------- Box
boxBodyDef := box2d.MakeB2BodyDef()
boxBodyDef.Position.Set(pos.X, pos.Y)
boxBodyDef.Type = dynamic
boxBodyDef.AllowSleep = false
boxBodyDef.LinearVelocity.Set(vel.X, vel.Y)
// Body instance
boxBody := world.CreateBody(&boxBodyDef)
boxBody.SetTransform(box2d.B2Vec2{X: pos.X, Y: pos.Y}, rand.Float64()*2*math.Pi)
boxBody.SetUserData("box")
// Create a box/circle shape
boxShape := box2d.MakeB2PolygonShape()
boxShape.SetAsBox(size.X, size.Y)
// Fixture
// A fixture binds a shape to a body and adds material properties such as density, friction, and restitution.
// A fixture puts a shape into the collision system (broad-phase) so that it can collide with other shapes.
fixtureDef := box2d.MakeB2FixtureDef()
fixtureDef.Shape = &boxShape
fixtureDef.Density = 1.0
fixtureDef.Friction = 0.0
fixtureDef.Restitution = 1
boxBody.CreateFixtureFromDef(&fixtureDef)
}
func buildMaze(world *box2d.B2World, m *Maze) int {
// world := initBox2D()
// frameSize := float64(48)
// addFrame(&world, frameSize)
wallCount := 0
for i := uint8(0); i < m.width; i++ {
for j := uint8(0); j < m.height; j++ {
if m.data[i][j] == wall {
addBox(world, box2d.B2Vec2{X: float64(i) * 2.1, Y: float64(j) * 2.1}, box2d.B2Vec2{X: 0, Y: 0}, box2d.B2Vec2{X: 1, Y: 1}, static)
wallCount++
}
}
}
fmt.Println("wallCount Box2D", wallCount)
return wallCount
} | cmd/Basics2/02-MazeBall/setupMaze.go | 0.608012 | 0.629888 | setupMaze.go | starcoder |
package utfc
// All characters below this code point are considered Latin, so within this range the state of `offs` stays equal to 0
const maxLatinCp = 0x02FF
// All characters starting from this code encoded in long (21-bit) mode
const min21BitCp = 0x2800
// Offs always includes top 6 bits of the codepoint (it identifies the currently selected "alphabet")
const offsMask13Bit = 0xFFFFFF80 // Characters encoded using their lowest 7 bits
const offsMask21Bit = 0xFFFF8000 // Characters encoded using their lowest 15 bits
const markerAux = 0b11000000 // => 1 byte encoding, auxiliary alphabet
const marker13Bit = 0b10000000 // => 2 byte encoding
const marker21Bit = 0b10100000 // => 3 byte encoding
const markerExtra = 0b10110000 // => 2 byte encoding, extra ranges
const offsInitAux = 0x00C0
// The subrange of the previous (auxiliary) alphabet is coded via 0b11000000.
// Unfortunately, a lot of alphabets are not aligned to 64-byte chunks in a good way,
// so we select different portions here to cover most frequently used characters.
var auxOffset = map[int]int{
// 0x0000, Latin is a special case, it merges A-Z, a-z, 0-9, "-" and " " characters.
0x0080: offsInitAux, // Latin-1 Supplement
0x0380: 0x0391, // Greek
0x0400: 0x0410, // Cyrillic
0x0580: 0x05BE, // Hebrew
0x0530: 0x0531, // Armenian
0x0600: 0x060B, // Arabic
0x0900: 0x090D, // Devangari
0x0980: 0x098F, // Bengali
0x0A00: 0x0A02, // Gurmukhi
0x0A80: 0x0A8F, // Gujarati
0x0B00: 0x0B0F, // Oriya
0x0B80: 0x0B8E, // Tamil
0x0C80: 0x0C8E, // Kannada
0x0D00: 0x0D0E, // Malayalam
0x0D80: 0x0D9B, // Sinhala
0x0E00: 0x0E01, // Thai
0x0E80: 0x0E81, // Lao
0x0F00: 0x0F40, // Tibetan
0x0F80: 0x0F90, // Tibetan
0x1080: 0x10B0, // Georgian
0x3000: 0x3040, // Hiragana
}
// Hiragana and Katakana
var rangeHK = []int{0x3000, 0x3100}
var rangesLatin = [][]int{
{0x41, 0x5B}, {0x61, 0x7B}, {0x30, 0x3A},
{0x20, 0x21}, {0x2D, 0x2E},
}
var rangesExtra = [][]int{
{0x2000, 0x2800}, rangeHK, {0xFE00, 0xFE10},
{0x1F170, 0x1F200}, {0x1F300, 0x1F700}, {0x1F900, 0x1FA00},
}
func inRanges(cp int, ranges [][]int) bool {
for _, rng := range ranges {
if rng[0] <= cp && cp < rng[1] {
return true
}
}
return false
}
func encodeRanges(cp int, ranges [][]int) int {
v := 0
for _, rng := range ranges {
if rng[0] <= cp && cp < rng[1] {
return v + (cp - rng[0])
}
v += rng[1] - rng[0]
}
return -1
}
func decodeRanges(v int, ranges [][]int) int {
for _, rng := range ranges {
if v < rng[1]-rng[0] {
return rng[0] + v
}
v -= rng[1] - rng[0]
}
return -1
}
func getAuxOffset(offs int) int {
if remappedOffs, ok := auxOffset[offs]; ok {
return remappedOffs
}
return offs
}
// Encode converts string to an UTF-C byte array
func Encode(str string) []byte {
// `offs`, `auxOffs` and `is21Bit` describe the current state.
// `offs` is the start of the currently active window of Unicode codepoints.
// `auxOffs` allows encoding 64 codepoints of the auxiliary alphabet.
// `is21Bit` is true if we're in 21-bit mode (2-3 bytes per character).
offs := 0
auxOffs := offsInitAux
is21Bit := false
buf := []byte{}
for _, ch := range str {
cp := int(ch)
// First, check if we can use 1-byte encoding via small 6-bit auxiliary alphabet
if auxOffs == 0 && inRanges(cp, rangesLatin) {
// 1 byte: auxiliary alphabet is Latin, rearrange it to fit 0xC0-0xFF range
buf = append(buf, byte(markerAux|encodeRanges(cp, rangesLatin)))
} else if auxOffs != 0 && cp >= auxOffs && cp <= auxOffs+0x3F {
// 1 byte: code point is within the auxiliary alphabet (non-Latin)
buf = append(buf, byte(markerAux|(cp-auxOffs)))
} else
// Second, there're 6 extra ranges (Hiragana, Katakana, and Emojis) that normally would require 3 bytes/character,
// but are encoded with 2 (using range of codepoints 0x10FFFF-0x1FFFFF, which are not covered by Unicode)
if inRanges(cp, rangesExtra) {
newOffs := cp & offsMask13Bit
if !is21Bit && newOffs == offs { // 1 byte: code point is within the current alphabet
buf = append(buf, byte(cp&0x7F))
} else {
// Reindex 6 ranges into a single contiguous one
extra := encodeRanges(cp, rangesExtra)
buf = append(buf, byte(markerExtra|(1+(extra>>8))), byte(extra))
if cp >= rangeHK[0] && cp < rangeHK[1] { // Only Hiragana and Katakana change the current alphabet
auxOffs = getAuxOffset(offs)
offs = newOffs
is21Bit = false
}
}
} else
// Lastly, check codepoint size to determine if it needs short (13-bit) or long (21-bit) mode
if cp >= min21BitCp {
// This code point requires 21 bit to encode
// Characters up to 0x2800 can be encoded in shorter forms, so we start from 0
cp -= min21BitCp
newOffs := cp & offsMask21Bit
if is21Bit && newOffs == offs { // 2 bytes: code point is within the current alphabet
buf = append(buf, byte((cp>>8)&0x7F), byte(cp))
} else { // 3 bytes: we need to switch to the new alphabet
buf = append(buf, byte(marker21Bit|(cp>>16)), byte(cp>>8), byte(cp))
auxOffs = offs
offs = newOffs
is21Bit = true
}
} else { // This code point requires max 13 bits to encode
newOffs := cp & offsMask13Bit
if !is21Bit && newOffs == offs { // 1 byte: code point is within the current alphabet
buf = append(buf, byte(cp&0x7F))
} else { // Final case: we need 2 bytes for this character
buf = append(buf, byte(marker13Bit|(cp>>8)), byte(cp&0xFF))
auxOffs = getAuxOffset(offs)
if cp <= maxLatinCp {
offs = 0
} else {
offs = newOffs
}
is21Bit = false
}
}
}
return buf
}
// Decode converts UTF-C byte array to a string
func Decode(buf []byte) string {
offs := 0
auxOffs := offsInitAux
is21Bit := false
str := ""
i := 0
for i < len(buf) {
cp := int(buf[i])
i++
if (cp & markerAux) == markerAux {
if auxOffs == 0 {
cp = decodeRanges(cp^markerAux, rangesLatin)
} else {
cp = auxOffs + (cp ^ markerAux)
}
} else if (cp&markerExtra) == markerExtra && (cp^markerExtra) != 0 {
cp = decodeRanges(((cp^markerExtra)-1)<<8|int(buf[i]), rangesExtra)
i++
if cp >= rangeHK[0] && cp < rangeHK[1] {
auxOffs = getAuxOffset(offs)
offs = cp & offsMask13Bit
is21Bit = false
}
} else if (cp & marker21Bit) == marker21Bit {
cp = ((cp^marker21Bit)<<16 | int(buf[i])<<8 | int(buf[i+1]))
i += 2
auxOffs = offs
offs = cp & offsMask21Bit
is21Bit = true
cp += min21BitCp
} else if (cp & marker13Bit) == marker13Bit {
cp = (cp^marker13Bit)<<8 | int(buf[i])
i++
auxOffs = getAuxOffset(offs)
if cp <= maxLatinCp {
offs = 0
} else {
offs = cp & offsMask13Bit
}
is21Bit = false
} else if is21Bit {
cp = min21BitCp + (offs | cp<<8 | int(buf[i]))
i++
} else {
cp = offs | cp
}
str += string(rune(cp))
}
return str
} | go/utfc.go | 0.667256 | 0.483161 | utfc.go | starcoder |
package utils
import "strconv"
type NestedInteger struct {
Num int
Ns []*NestedInteger
}
// Return true if this NestedInteger holds a single integer, rather than a nested list.
func (n NestedInteger) IsInteger() bool {
return n.Ns == nil
}
// Return the single integer that this NestedInteger holds, if it holds a single integer
func (n NestedInteger) GetInteger() int {
return n.Num
}
// Set this NestedInteger to hold a single integer.
func (n *NestedInteger) SetInteger(value int) {
n.Num = value
}
// Set this NestedInteger to hold a nested list and adds a nested integer to it.
func (n *NestedInteger) Add(elem NestedInteger) {
n.Ns = append(n.Ns, &elem)
}
// Return the nested list that this NestedInteger holds, if it holds a nested list
func (n NestedInteger) GetList() []*NestedInteger {
return n.Ns
}
func (n NestedInteger) String() string {
ret := ""
if n.Num > 0 {
ret += strconv.Itoa(n.Num)
}
if len(n.Ns) != 0 {
for i, v := range n.Ns {
if i == 0 {
ret += v.String()
} else {
ret += " " + v.String()
}
if i != len(n.Ns)-1 {
ret += ","
}
}
return "[ " + ret + " ]"
}
return ret
}
func ConstructorNestedInteger(s string) *NestedInteger {
stack, cur := []*NestedInteger{}, &NestedInteger{}
for i := 0; i < len(s); {
switch {
case isDigital(s[i]) || s[i] == '-':
j := 0
for j = i + 1; j < len(s) && isDigital(s[j]); j++ {
}
num, _ := strconv.Atoi(s[i:j])
next := &NestedInteger{}
next.SetInteger(num)
if len(stack) > 0 {
stack[len(stack)-1].Ns = append(stack[len(stack)-1].GetList(), next)
} else {
cur = next
}
i = j
case s[i] == '[':
next := &NestedInteger{}
if len(stack) > 0 {
stack[len(stack)-1].Ns = append(stack[len(stack)-1].GetList(), next)
}
stack = append(stack, next)
i++
case s[i] == ']':
cur = stack[len(stack)-1]
stack = stack[:len(stack)-1]
i++
case s[i] == ',':
i++
}
}
return cur
}
func isDigital(v byte) bool {
if v >= '0' && v <= '9' {
return true
}
return false
} | golang/utils/nested_integer.go | 0.6973 | 0.444565 | nested_integer.go | starcoder |
package ds
import (
"fmt"
"math"
)
type Comparer func(interface{}, interface{}) int
type treeNode struct {
data interface{}
left *treeNode
right *treeNode
}
func insert(root *treeNode, data interface{}, compare Comparer) *treeNode {
if root == nil {
return &treeNode{data: data}
}
if compare(data, root.data) > 0 {
root.right = insert(root.right, data, compare)
} else {
root.left = insert(root.left, data, compare)
}
return root
}
func swapData(a *treeNode, b *treeNode) {
tmp := a.data
a.data = b.data
b.data = tmp
}
func dswTreeToVine(root *treeNode) {
tail := root
rest := tail.right
for rest != nil {
if rest.left == nil {
tail = rest
rest = rest.right
} else {
temp := rest.left
rest.left = temp.right
temp.right = rest
rest = temp
tail.right = temp
}
}
}
func dswVineToTree(root *treeNode, size int) {
leaves := size + 1 - int(math.Pow(2, math.Floor(math.Log2(float64(size+1)))))
dswCompress(root, leaves)
size = size - leaves
for size > 1 {
size = size / 2
dswCompress(root, size)
}
}
func dswCompress(root *treeNode, count int) {
scanner := root
for i := 0; i < count; i++ {
child := scanner.right
scanner.right = child.right
scanner = scanner.right
child.right = scanner.left
scanner.left = child
}
}
func printTree(root *treeNode, indent string, rightChild bool) {
fmt.Print(indent)
var newIndent string
if rightChild {
fmt.Print(" └╴ ")
newIndent = indent + " "
} else {
fmt.Print(" ├╴ ")
newIndent = indent + " │ "
}
if root == nil {
fmt.Print("<>\n")
return
} else {
fmt.Printf("%v\n", root.data)
printTree(root.left, newIndent, false)
printTree(root.right, newIndent, true)
}
}
func height(root *treeNode) int {
if root == nil {
return 0
}
leftHeight := height(root.left)
rightHeight := height(root.right)
if leftHeight > rightHeight {
return leftHeight + 1
} else {
return rightHeight + 1
}
}
func toArray(root *treeNode) []interface{} {
treeHeight := height(root)
arraySize := (treeHeight * 2) + 1
array := make([]interface{}, arraySize)
addToArray(array, root, 0)
return array
}
func addToArray(array []interface{}, node *treeNode, level int) {
if node == nil {
return
}
index := level * 2
array[index] = node
array[level+1] = node.left
array[level+2] = node.right
addToArray(array, node.left, level+1)
addToArray(array, node.right, level+1)
}
type BinaryTree struct {
root *treeNode
size int
compare Comparer
}
func NewBinaryTree(comparer Comparer) *BinaryTree {
return &BinaryTree{compare: comparer}
}
func (bt *BinaryTree) Insert(data ...interface{}) {
for _, d := range data {
bt.root = insert(bt.root, d, bt.compare)
bt.size += 1
}
}
func (bt *BinaryTree) Print() {
printTree(bt.root, "", true)
}
func (bt *BinaryTree) Balance() {
pseudoRoot := &treeNode{}
pseudoRoot.right = bt.root
dswTreeToVine(pseudoRoot)
dswVineToTree(pseudoRoot, bt.size)
bt.root = pseudoRoot.right
} | ds/binarytree.go | 0.588416 | 0.468487 | binarytree.go | starcoder |
package cmd
import (
"fmt"
"os"
"strconv"
"strings"
"github.com/jaredbancroft/aoc2020/pkg/assembly"
"github.com/jaredbancroft/aoc2020/pkg/helpers"
"github.com/spf13/cobra"
)
// day8Cmd represents the day8 command
var day8Cmd = &cobra.Command{
Use: "day8",
Short: "Advent of Code 2020 - Day 8: Handheld Halting",
Long: `
Advent of Code 2020
--- Day 8: Handheld Halting ---
Your flight to the major airline hub reaches cruising altitude without incident.
While you consider checking the in-flight menu for one of those drinks that come with a
little umbrella, you are interrupted by the kid sitting next to you.
Their handheld game console won't turn on! They ask if you can take a look.
You narrow the problem down to a strange infinite loop in the boot code (your puzzle input)
of the device. You should be able to fix it, but first you need to be able to run the code
in isolation.
The boot code is represented as a text file with one instruction per line of text. Each
instruction consists of an operation (acc, jmp, or nop) and an argument (a signed number
like +4 or -20).
acc increases or decreases a single global value called the accumulator by the value given
in the argument. For example, acc +7 would increase the accumulator by 7. The accumulator
starts at 0. After an acc instruction, the instruction immediately below it is executed next.
jmp jumps to a new instruction relative to itself. The next instruction to execute is found
using the argument as an offset from the jmp instruction; for example, jmp +2 would skip the
next instruction, jmp +1 would continue to the instruction immediately below it, and jmp -20
would cause the instruction 20 lines above to be executed next.
nop stands for No OPeration - it does nothing. The instruction immediately below it is executed next.
For example, consider the following program:
nop +0
acc +1
jmp +4
acc +3
jmp -3
acc -99
acc +1
jmp -4
acc +6
These instructions are visited in this order:
nop +0 | 1
acc +1 | 2, 8(!)
jmp +4 | 3
acc +3 | 6
jmp -3 | 7
acc -99 |
acc +1 | 4
jmp -4 | 5
acc +6 |
First, the nop +0 does nothing. Then, the accumulator is increased from 0 to 1 (acc +1)
and jmp +4 sets the next instruction to the other acc +1 near the bottom. After it increases
the accumulator from 1 to 2, jmp -4 executes, setting the next instruction to the only acc +3.
It sets the accumulator to 5, and jmp -3 causes the program to continue back at the first acc +1.
This is an infinite loop: with this sequence of jumps, the program will run forever. The
moment the program tries to run any instruction a second time, you know it will never terminate.
Immediately before the program would run an instruction a second time, the value in the
accumulator is 5.
Run your copy of the boot code. Immediately before any instruction is executed a second time,
what value is in the accumulator?
--- Part Two ---
After some careful analysis, you believe that exactly one instruction is corrupted.
Somewhere in the program, either a jmp is supposed to be a nop, or a nop is supposed to be a jmp.
(No acc instructions were harmed in the corruption of this boot code.)
The program is supposed to terminate by attempting to execute an instruction immediately after
the last instruction in the file. By changing exactly one jmp or nop, you can repair the boot
code and make it terminate correctly.
For example, consider the same program from above:
nop +0
acc +1
jmp +4
acc +3
jmp -3
acc -99
acc +1
jmp -4
acc +6
If you change the first instruction from nop +0 to jmp +0, it would create a single-instruction infinite
loop, never leaving that instruction. If you change almost any of the jmp instructions, the program will
still eventually find another jmp instruction and loop forever.
However, if you change the second-to-last instruction (from jmp -4 to nop -4), the program terminates!
The instructions are visited in this order:
nop +0 | 1
acc +1 | 2
jmp +4 | 3
acc +3 |
jmp -3 |
acc -99 |
acc +1 | 4
nop -4 | 5
acc +6 | 6
After the last instruction (acc +6), the program terminates by attempting to run the instruction below the
last instruction in the file. With this change, after the program terminates, the accumulator contains the
value 8 (acc +1, acc +1, acc +6).
Fix the program so that it terminates normally by changing exactly one jmp (to nop) or nop (to jmp). What
is the value of the accumulator after the program terminates?`,
RunE: func(cmd *cobra.Command, args []string) error {
instructions, err := helpers.ReadStringFile(input)
if err != nil {
return err
}
instructionList := parseInstructions(instructions)
result := instructionList.Process()
result2 := instructionList.Fix()
fmt.Println(result)
fmt.Println(result2)
return nil
},
}
func init() {
rootCmd.AddCommand(day8Cmd)
}
func parseInstructions(instructions []string) *assembly.InstructionList {
var parsedInstructions = assembly.NewInstructionList()
for _, instruction := range instructions {
s := strings.Split(instruction, " ")
op := s[0]
arg, err := strconv.Atoi(s[1])
if err != nil {
fmt.Println(err)
os.Exit(1)
}
parsedInstructions.Append(assembly.NewInstruction(op, arg))
}
return parsedInstructions
} | cmd/day8.go | 0.63409 | 0.514339 | day8.go | starcoder |
package writer
import (
"github.com/theMPatel/streamvbyte-simdgo/pkg/encode"
"github.com/theMPatel/streamvbyte-simdgo/pkg/shared"
)
const (
jump = 16
jumpCtrl = jump / 4
)
// WriteAll will encode all the integers from in using the Stream VByte
// format and will return the byte array holding the encoded data. It will
// select the best implementation depending on the presence of special
// hardware instructions.
func WriteAll(in []uint32) []byte {
if encode.GetMode() == shared.Fast {
return WriteAllFast(in)
} else {
return WriteAllScalar(in)
}
}
// WriteAllDelta will differentially encode all the integers from in using
// the Stream VByte format and will return the byte array holding the encoded
// data. It will select the best implementation depending on the presence of
// special hardware instructions.
func WriteAllDelta(in []uint32, prev uint32) []byte {
if encode.GetMode() == shared.Fast {
return WriteAllDeltaFast(in, prev)
} else {
return WriteAllDeltaScalar(in, prev)
}
}
// WriteAllScalar will encode all the integers from in using the Stream VByte
// format and will return the byte array holding the encoded data.
func WriteAllScalar(in []uint32) []byte {
var (
count = len(in)
ctrlLen = (count + 3) / 4
stream = make([]byte, ctrlLen+(encode.MaxBytesPerNum*count))
dataPos = ctrlLen
ctrlPos = 0
encoded = 0
lowestJump = count &^ (jump - 1)
lowest4 = count &^ 3
)
for ; encoded < lowestJump; encoded += jump {
nums := in[encoded : encoded+jump]
data := stream[dataPos:]
ctrls := stream[ctrlPos : ctrlPos+jumpCtrl]
ctrl := encode.Put4uint32Scalar(nums, data)
ctrls[0] = ctrl
sizeA := shared.ControlByteToSize(ctrl)
ctrl = encode.Put4uint32Scalar(nums[4:], data[sizeA:])
ctrls[1] = ctrl
sizeB := shared.ControlByteToSize(ctrl)
ctrl = encode.Put4uint32Scalar(nums[8:], data[sizeA+sizeB:])
ctrls[2] = ctrl
sizeC := shared.ControlByteToSize(ctrl)
ctrl = encode.Put4uint32Scalar(nums[12:], data[sizeA+sizeB+sizeC:])
ctrls[3] = ctrl
sizeD := shared.ControlByteToSize(ctrl)
dataPos += sizeA + sizeB + sizeC + sizeD
ctrlPos += jumpCtrl
}
for ; encoded < lowest4; encoded += 4 {
ctrl := encode.Put4uint32Scalar(in[encoded:], stream[dataPos:])
stream[ctrlPos] = ctrl
size := shared.ControlByteToSize(ctrl)
dataPos += size
ctrlPos++
}
if lowest4 != count {
nums := count - lowest4
ctrl := encode.PutUint32Scalar(in[encoded:], stream[dataPos:], nums)
size := shared.ControlByteToSize(ctrl)
size -= 4 - nums
dataPos += size
stream[ctrlPos] = ctrl
}
return stream[:dataPos]
}
// WriteAllDeltaScalar will differentially encode all the integers from in using
// the Stream VByte format and will return the byte array holding the encoded data.
func WriteAllDeltaScalar(in []uint32, prev uint32) []byte {
var (
count = len(in)
ctrlLen = (count + 3) / 4
stream = make([]byte, ctrlLen+(encode.MaxBytesPerNum*count))
dataPos = ctrlLen
ctrlPos = 0
encoded = 0
lowestJump = count &^ (jump - 1)
lowest4 = count &^ 3
)
for ; encoded < lowestJump; encoded += jump {
nums := in[encoded : encoded+jump]
data := stream[dataPos:]
ctrls := stream[ctrlPos : ctrlPos+jumpCtrl]
ctrl := encode.Put4uint32DeltaScalar(nums, data, prev)
ctrls[0] = ctrl
sizeA := shared.ControlByteToSize(ctrl)
ctrl = encode.Put4uint32DeltaScalar(nums[4:], data[sizeA:], nums[3])
ctrls[1] = ctrl
sizeB := shared.ControlByteToSize(ctrl)
ctrl = encode.Put4uint32DeltaScalar(nums[8:], data[sizeA+sizeB:], nums[7])
ctrls[2] = ctrl
sizeC := shared.ControlByteToSize(ctrl)
ctrl = encode.Put4uint32DeltaScalar(nums[12:], data[sizeA+sizeB+sizeC:], nums[11])
ctrls[3] = ctrl
sizeD := shared.ControlByteToSize(ctrl)
dataPos += sizeA + sizeB + sizeC + sizeD
ctrlPos += jumpCtrl
prev = nums[15]
}
for ; encoded < lowest4; encoded += 4 {
ctrl := encode.Put4uint32DeltaScalar(in[encoded:], stream[dataPos:], prev)
stream[ctrlPos] = ctrl
size := shared.ControlByteToSize(ctrl)
dataPos += size
ctrlPos++
prev = in[encoded+3]
}
if lowest4 != count {
nums := count - lowest4
ctrl := encode.PutUint32DeltaScalar(in[encoded:], stream[dataPos:], nums, prev)
size := shared.ControlByteToSize(ctrl)
size -= 4 - nums
dataPos += size
stream[ctrlPos] = ctrl
}
return stream[:dataPos]
} | pkg/stream/writer/writer.go | 0.551332 | 0.568715 | writer.go | starcoder |
package twobucket
import "errors"
type bucket struct {
level int
size int
name string
}
type waterPour struct {
a *bucket
b *bucket
goal *int
goalBucket *string
otherBucketLevel *int
steps *int
}
// Solve given:
// - the size of bucket one
// - the size of bucket two
// - the desired number of liters to reach
// - which bucket to fill first, either bucket one or bucket two
// determines:
// - the total number of "moves" it should take to reach the desired number of liters, including the first fill
// - which bucket should end up with the desired number of liters (let's say this is bucket A) - either bucket one or bucket two
// - how many liters are left in the other bucket (bucket B)
func Solve(sizeBucketOne,
sizeBucketTwo,
goalAmount int,
startBucket string) (goalBucket string, numSteps, otherBucketLevel int, e error) {
if sizeBucketOne == 0 || sizeBucketTwo == 0 || goalAmount == 0 ||
!(startBucket == "one" || startBucket == "two") ||
goalAmount%gcd(sizeBucketOne, sizeBucketTwo) != 0 {
return "", 0, 0, errors.New("invalid parameter")
}
wp := &waterPour{
a: &bucket{level: 0, size: sizeBucketOne, name: "one"},
b: &bucket{level: 0, size: sizeBucketTwo, name: "two"},
goal: &goalAmount,
goalBucket: &goalBucket,
otherBucketLevel: &otherBucketLevel,
steps: &numSteps,
}
if startBucket != "one" {
wp.a, wp.b = wp.b, wp.a
}
for {
if wp.fill(wp.a, wp.b) {
break
}
if wp.b.size == goalAmount {
wp.fill(wp.b, wp.a)
break
}
if wp.pour() {
break
}
}
return goalBucket, numSteps, otherBucketLevel, nil
}
func (wp *waterPour) fill(dest, other *bucket) bool {
dest.level = dest.size
*wp.steps++
if dest.level == *wp.goal {
*wp.goalBucket = dest.name
*wp.otherBucketLevel = other.level
return true
}
return false
}
func (wp *waterPour) pour() bool {
for wp.a.level != 0 {
delta := min(wp.a.level, wp.b.size-wp.b.level)
wp.b.level += delta
wp.a.level -= delta
*wp.steps++
if wp.a.level == *wp.goal {
*wp.goalBucket = wp.a.name
*wp.otherBucketLevel = wp.b.level
return true
}
if wp.b.level == *wp.goal {
*wp.goalBucket = wp.b.name
*wp.otherBucketLevel = wp.a.level
return true
}
if wp.b.level == wp.b.size {
wp.b.level = 0
*wp.steps++
}
}
return false
}
func min(a, b int) int {
if a < b {
return a
}
return b
}
func gcd(a, b int) int {
if b == 0 {
return a
}
return gcd(b, a%b)
} | go/two-bucket/two_bucket.go | 0.636805 | 0.444444 | two_bucket.go | starcoder |
package cmd
import (
"fmt"
"log"
"os"
"time"
"github.com/kristinjeanna/third-monday/spec"
"github.com/kristinjeanna/third-monday/util"
"github.com/relvacode/iso8601"
"github.com/spf13/cobra"
)
// checkCmd represents the check command
var checkCmd = &cobra.Command{
Use: "check [flags] specification",
Short: "Check a date against an occurrence specification. Returns exit code 0 if the check succeeds (i.e., the specification matches today's date) and exit code 1 if it fails.",
Long: `Check a date against an occurrence specification. Returns exit code 0 if the check succeeds (i.e., the specification matches today's date) and exit code 1 if it fails.
One positional argument is required which specifies the occurrence specification to use in the check operation. This argument follows the format of one or more occurrence ordinals (comma-separated), a "#" symbol, followed by one or more day of week ordinals (comma-separated).
In month mode (default), occurrence ordinals must be greater than or equal to 0 and less than or equal to 5. In year mode, occurrence ordinals must be greater than or equal to 0 and less than or equal to 53.
Day of week ordinals must be greater than or equal to 0 (Sunday) and less than or equal to 6 (Saturday).
Examples: The second Monday would be specified as "2#1". The first and third Wednesdays would be "1,3#3". The second Tuesday and Thursday would be "2#2,4" The first and third Sunday and Friday would be "1,3#0,5". In year mode, the 42nd Friday of the year would be specified by "42#5.`,
Args: func(cmd *cobra.Command, args []string) error {
if len(args) != 1 {
return fmt.Errorf("accepts %d arg(s), received %d", 1, len(args))
}
return spec.Validate(args[0], UseYearMode)
},
Run: func(cmd *cobra.Command, args []string) {
date := getDate(Date)
data1 := spec.NewFromDate(date, UseYearMode)
util.PrintDateInfo(Verbose, UseYearMode, date, *data1)
data2, err := spec.New(args[0])
if err != nil {
log.Printf("%v", err)
os.Exit(100)
}
util.PrintSpecInfo(Verbose, UseYearMode, *data2)
if data1.Intersects(data2) {
util.PrintMsg(Verbose, "Date matches the specification. Exit code 0.")
os.Exit(0)
} else {
util.PrintMsg(Verbose, "Date does not match the specification. Exit code 1.")
os.Exit(1)
}
},
}
func init() {
rootCmd.AddCommand(checkCmd)
checkCmd.Flags().BoolVarP(&UseYearMode, "year", "y", false,
"Enable year mode. When false (default), month mode is active.")
checkCmd.Flags().StringVarP(&Date, "date", "d", time.Now().Format("2006-01-02"),
"Date to check against, in YYYY-MM-DD format. If not specified, current local date is used.")
}
func getDate(dateString string) (date time.Time) {
if dateString != "" {
d, err := iso8601.ParseString(dateString)
if err != nil {
log.Printf("%v", err)
os.Exit(101)
}
date = d
} else {
date = time.Now()
}
return
} | cmd/check.go | 0.600305 | 0.438424 | check.go | starcoder |
package ordered
import (
"fmt"
"github.com/m4gshm/gollections/c"
"github.com/m4gshm/gollections/it/impl/it"
"github.com/m4gshm/gollections/op"
"github.com/m4gshm/gollections/slice"
)
//ToSet converts an elements slice to the set containing them.
func ToSet[T comparable](elements []T) *Set[T] {
var (
l = len(elements)
uniques = make(map[T]int, l)
order = make([]T, 0, l)
)
pos := 0
for _, v := range elements {
if _, ok := uniques[v]; !ok {
order = append(order, v)
uniques[v] = pos
pos++
}
}
return WrapSet(order, uniques)
}
//NewSet creates a set with a predefined capacity.
func NewSet[T comparable](capacity int) *Set[T] {
return WrapSet(make([]T, 0, capacity), make(map[T]int, capacity))
}
//WrapSet creates a set using a map and an order slice as the internal storage.
func WrapSet[T comparable](elements []T, uniques map[T]int) *Set[T] {
return &Set[T]{elements: elements, uniques: uniques}
}
//Set is the Collection implementation that provides element uniqueness and access order. Elements must be comparable.
type Set[T comparable] struct {
elements []T
uniques map[T]int
}
var (
_ c.Addable[int] = (*Set[int])(nil)
_ c.Deleteable[int] = (*Set[int])(nil)
_ c.Set[int] = (*Set[int])(nil)
_ fmt.Stringer = (*Set[int])(nil)
)
func (s *Set[T]) Begin() c.Iterator[T] {
return s.Head()
}
func (s *Set[T]) BeginEdit() c.DelIterator[T] {
return s.Head()
}
func (s *Set[T]) Head() *SetIter[T] {
return NewSetIter(&s.elements, s.DeleteOne)
}
func (s *Set[T]) Collect() []T {
return slice.Copy(s.elements)
}
func (s *Set[T]) For(walker func(T) error) error {
return slice.For(s.elements, walker)
}
func (s *Set[T]) ForEach(walker func(T)) {
slice.ForEach(s.elements, walker)
}
func (s *Set[T]) Len() int {
return len(s.elements)
}
func (s *Set[T]) IsEmpty() bool {
return s.Len() == 0
}
func (s *Set[T]) Contains(v T) bool {
_, ok := s.uniques[v]
return ok
}
func (s *Set[T]) Add(elements ...T) bool {
return s.AddAll(elements)
}
func (s *Set[T]) AddAll(elements []T) bool {
u := s.uniques
result := false
for i := range elements {
v := elements[i]
if _, ok := u[v]; !ok {
e := s.elements
u[v] = len(e)
s.elements = append(e, v)
result = true
}
}
return result
}
func (s *Set[T]) AddOne(v T) bool {
u := s.uniques
if _, ok := u[v]; !ok {
e := s.elements
u[v] = len(e)
s.elements = append(e, v)
return true
}
return false
}
func (s *Set[T]) Delete(elements ...T) bool {
return s.DeleteAll(elements)
}
func (s *Set[T]) DeleteAll(elements []T) bool {
u := s.uniques
result := false
for i := range elements {
v := elements[i]
if pos, ok := u[v]; ok {
delete(u, v)
//todo: need optimize
e := s.elements
ne := slice.Delete(pos, e)
for i := pos; i < len(ne); i++ {
u[ne[i]]--
}
s.elements = ne
result = true
}
}
return result
}
func (s *Set[T]) DeleteOne(v T) bool {
u := s.uniques
if pos, ok := u[v]; ok {
delete(u, v)
//todo: need optimize
e := s.elements
ne := slice.Delete(pos, e)
for i := pos; i < len(ne); i++ {
u[ne[i]]--
}
s.elements = ne
return true
}
return false
}
func (s *Set[T]) Filter(filter c.Predicate[T]) c.Pipe[T, []T] {
return it.NewPipe[T](it.Filter(s.Head(), filter))
}
func (s *Set[T]) Map(by c.Converter[T, T]) c.Pipe[T, []T] {
return it.NewPipe[T](it.Map(s.Head(), by))
}
func (s *Set[T]) Reduce(by op.Binary[T]) T {
return it.Reduce(s.Head(), by)
}
func (s *Set[t]) Sort(less func(e1, e2 t) bool) *Set[t] {
s.elements = slice.Sort(s.elements, less)
return s
}
func (s *Set[T]) String() string {
return slice.ToString(s.elements)
} | mutable/ordered/set.go | 0.736874 | 0.491883 | set.go | starcoder |
package labelarray
import (
"fmt"
"github.com/janelia-flyem/dvid/datastore"
"github.com/janelia-flyem/dvid/datatype/common/downres"
"github.com/janelia-flyem/dvid/datatype/common/labels"
"github.com/janelia-flyem/dvid/dvid"
)
// For any lores block, divide it into octants and see if we have mutated the corresponding higher-res blocks.
type octantMap map[dvid.IZYXString][8]*labels.Block
// Group hires blocks by octants so we see when we actually need to GET a lower-res block.
func (d *Data) getHiresChanges(hires downres.BlockMap) (octantMap, error) {
octants := make(octantMap)
for hiresZYX, value := range hires {
block, ok := value.(*labels.Block)
if !ok {
return nil, fmt.Errorf("bad changing block %s: expected *labels.Block got %v", hiresZYX, value)
}
hresCoord, err := hiresZYX.ToChunkPoint3d()
if err != nil {
return nil, err
}
downresX := hresCoord[0] >> 1
downresY := hresCoord[1] >> 1
downresZ := hresCoord[2] >> 1
loresZYX := dvid.ChunkPoint3d{downresX, downresY, downresZ}.ToIZYXString()
octidx := ((hresCoord[2] % 2) << 2) + ((hresCoord[1] % 2) << 1) + (hresCoord[0] % 2)
oct, found := octants[loresZYX]
if !found {
oct = [8]*labels.Block{}
}
oct[octidx] = block
octants[loresZYX] = oct
}
return octants, nil
}
func (d *Data) StoreDownres(v dvid.VersionID, hiresScale uint8, hires downres.BlockMap) (downres.BlockMap, error) {
if hiresScale >= d.MaxDownresLevel {
return nil, fmt.Errorf("can't downres %q scale %d since max downres scale is %d", d.DataName(), hiresScale, d.MaxDownresLevel)
}
octants, err := d.getHiresChanges(hires)
if err != nil {
return nil, err
}
blockSize, ok := d.BlockSize().(dvid.Point3d)
if !ok {
return nil, fmt.Errorf("block size for data %q is not 3d: %v\n", d.DataName(), d.BlockSize())
}
batcher, err := datastore.GetKeyValueBatcher(d)
if err != nil {
return nil, err
}
ctx := datastore.NewVersionedCtx(d, v)
batch := batcher.NewBatch(ctx)
downresBMap := make(downres.BlockMap)
for loresZYX, octant := range octants {
var numBlocks int
for _, block := range octant {
if block != nil {
numBlocks++
}
}
var loresBlock *labels.Block
if numBlocks < 8 {
chunkPt, err := loresZYX.ToChunkPoint3d()
if err != nil {
return nil, err
}
loresBlock, err = d.GetLabelBlock(v, chunkPt, hiresScale+1)
if err != nil {
return nil, err
}
} else {
loresBlock = labels.MakeSolidBlock(0, blockSize)
}
if err := loresBlock.Downres(octant); err != nil {
return nil, err
}
downresBMap[loresZYX] = loresBlock
compressed, _ := loresBlock.MarshalBinary()
serialization, err := dvid.SerializeData(compressed, d.Compression(), d.Checksum())
if err != nil {
return nil, fmt.Errorf("Unable to serialize downres block in %q: %v\n", d.DataName(), err)
}
tk := NewBlockTKeyByCoord(hiresScale+1, loresZYX)
batch.Put(tk, serialization)
}
if err := batch.Commit(); err != nil {
return nil, fmt.Errorf("Error on trying to write downres batch of scale %d->%d: %v\n", hiresScale, hiresScale+1, err)
}
return downresBMap, nil
} | datatype/labelarray/downres.go | 0.541894 | 0.413122 | downres.go | starcoder |
package onthefly
// Various JavaScript and JQuery functions
// fn returns JavaScript code wrapped in an anonymous function
func fn(source string) string {
return "function() { " + source + " }"
}
// quote quotes the given string in a simple way, by wrapping it in double quotes
func quote(src string) string {
return "\"" + src + "\""
}
// event returns JavaScript code that runs the given JavaScript code at the
// given event on the given tag. For example the "click" event.
func event(tagname, event, source string) string {
return "$(" + quote(tagname) + ")." + event + "(" + fn(source) + ");"
}
// method returns JavaScript code that calls a given method on a given
// tag, with the given string value as the argument.
// The value is used raw and not quoted.
func method(tagname, methodname, value string) string {
return "$(" + quote(tagname) + ")." + methodname + "(" + value + ");"
}
// methodString returns JavaScript code that calls a given method on a given
// tag, with the given string value as the argument
// The value is quoted.
func methodString(tagname, methodname, value string) string {
return method(tagname, methodname, quote(value))
}
// OnDocumentReady returns JavaScript code the runs the given JavaScript code when the HTML document is ready in the browser.
func OnDocumentReady(source string) string {
return "$(document).ready(" + fn(source) + ");"
}
// Alert returns JavaScript code that displays a pretty intruding message box. The "msg" will be quoted.
func Alert(msg string) string {
return "alert(" + quote(msg) + ");"
}
// OnClick returns JavaScript code that runs the given JavaScript code when the given tag name is clicked on
func OnClick(tagname, source string) string {
return event(tagname, "click", source)
}
// SetText returns JavaScript code that sets the text of the given tag name
func SetText(tagname, text string) string {
return methodString(tagname, "text", text)
}
// SetHTML returns JavaScript code that sets the HTML of the given tag name
func SetHTML(tagname, html string) string {
return method(tagname, "html", html)
}
// SetValue returns JavaScript code that quotes and then sets the contents of the given tag name
func SetValue(tagname, val string) string {
return methodString(tagname, "val", val)
}
// SetRawValue returns JavaScript code that sets the contents of a given tag name, without quoting
func SetRawValue(tagname, val string) string {
return method(tagname, "val", val)
}
// Hide returns JavaScript code that hides the given tag name
func Hide(tagname string) string {
return "$(" + quote(tagname) + ").hide();"
}
// HideAnimated returns JavaScript code that hides the given tag name in an animated way
func HideAnimated(tagname string) string {
return "$(" + quote(tagname) + ").hide('normal');" // 'fast', 'normal', 'slow' or milliseconds
}
// Show returns JavaScript code that shows the given tag name
func Show(tagname string) string {
return "$(" + quote(tagname) + ").show();"
}
// Focus returns JavaScript code that sets focus on the given tag name
func Focus(tagname string) string {
return "$(" + quote(tagname) + ").focus();"
}
// ShowAnimated returns JavaScript code that displays the given tag name in an animated way
func ShowAnimated(tagname string) string {
return "$(" + quote(tagname) + ").show('normal');" // 'fast', 'normal', 'slow' or milliseconds
}
// ShowInline returns JavaScript code that styles the given tag with "display:inline"
func ShowInline(tagname string) string {
return "$(" + quote(tagname) + ").css('display', 'inline');"
}
// ShowInlineAnimated returns JavaScript code that show the given tag with "display:inline", then hides it and then shows it in an animated way
func ShowInlineAnimated(tagname string) string {
return ShowInline(tagname) + Hide(tagname) + ShowAnimated(tagname)
}
// ShowInlineAnimatedIf returns JavaScript that shows the given tag in an animated way if the value from the given URL is "1"
func ShowInlineAnimatedIf(booleanURL, tagname string) string {
return "$.get(" + quote(booleanURL) + ", function(data) { if (data == \"1\") {" + ShowInlineAnimated(tagname) + "}; });"
}
// Return JavaScript that loads the contents of the given URL into the given tag name
func Load(tagname, url string) string {
return methodString(tagname, "load", url)
}
// HidIfNot returns JavaScript that will hide a tag if booleanURL doesn't return "1"
func HideIfNot(booleanURL, tagname string) string {
return "$.get(" + quote(booleanURL) + ", function(data) { if (data != \"1\") {" + Hide(tagname) + "}; });"
}
// ShowAnimatedIf returns JavaScript that will show a tag if booleanURL returns "1"
func ShowAnimatedIf(booleanURL, tagname string) string {
return "$.get(" + quote(booleanURL) + ", function(data) { if (data == \"1\") {" + ShowAnimated(tagname) + "}; });"
}
// ScrollDownAnimated returns JavaScript code that will slowly scroll the page down
func ScrollDownAnimated() string {
return "$('html, body').animate({scrollTop:$(document).height()}, 'slow');"
}
// JS wraps JavaScript code in a <script> tag
func JS(source string) string {
if source != "" {
return "<script type=\"text/javascript\">" + source + "</script>"
}
return ""
}
// Returns HTML that will run the given JavaScript code once the document is ready.
// Returns an empty string if there is no JavaScript code to run.
func DocumentReadyJS(source string) string {
if source != "" {
return JS(OnDocumentReady(source))
}
return ""
}
// Redirect returns JavaScript code that redirects to the given URL
func Redirect(URL string) string {
return "window.location.href = \"" + URL + "\";"
} | vendor/github.com/xyproto/onthefly/jquery.go | 0.808597 | 0.549338 | jquery.go | starcoder |
package gaia
import (
"fmt"
"time"
"github.com/globalsign/mgo/bson"
"github.com/mitchellh/copystructure"
"go.aporeto.io/elemental"
)
// GraphNodeTypeValue represents the possible values for attribute "type".
type GraphNodeTypeValue string
const (
// GraphNodeTypeAPIGateway represents the value APIGateway.
GraphNodeTypeAPIGateway GraphNodeTypeValue = "APIGateway"
// GraphNodeTypeClaim represents the value Claim.
GraphNodeTypeClaim GraphNodeTypeValue = "Claim"
// GraphNodeTypeDocker represents the value Docker.
GraphNodeTypeDocker GraphNodeTypeValue = "Docker"
// GraphNodeTypeECS represents the value ECS.
GraphNodeTypeECS GraphNodeTypeValue = "ECS"
// GraphNodeTypeExternalNetwork represents the value ExternalNetwork.
GraphNodeTypeExternalNetwork GraphNodeTypeValue = "ExternalNetwork"
// GraphNodeTypeHost represents the value Host.
GraphNodeTypeHost GraphNodeTypeValue = "Host"
// GraphNodeTypeHostService represents the value HostService.
GraphNodeTypeHostService GraphNodeTypeValue = "HostService"
// GraphNodeTypeLinuxService represents the value LinuxService.
GraphNodeTypeLinuxService GraphNodeTypeValue = "LinuxService"
// GraphNodeTypeNamespace represents the value Namespace.
GraphNodeTypeNamespace GraphNodeTypeValue = "Namespace"
// GraphNodeTypeNode represents the value Node.
GraphNodeTypeNode GraphNodeTypeValue = "Node"
// GraphNodeTypeRKT represents the value RKT.
GraphNodeTypeRKT GraphNodeTypeValue = "RKT"
// GraphNodeTypeRemoteController represents the value RemoteController.
GraphNodeTypeRemoteController GraphNodeTypeValue = "RemoteController"
// GraphNodeTypeSSHSession represents the value SSHSession.
GraphNodeTypeSSHSession GraphNodeTypeValue = "SSHSession"
// GraphNodeTypeUser represents the value User.
GraphNodeTypeUser GraphNodeTypeValue = "User"
// GraphNodeTypeVolume represents the value Volume.
GraphNodeTypeVolume GraphNodeTypeValue = "Volume"
// GraphNodeTypeWindowsService represents the value WindowsService.
GraphNodeTypeWindowsService GraphNodeTypeValue = "WindowsService"
)
// GraphNodeIdentity represents the Identity of the object.
var GraphNodeIdentity = elemental.Identity{
Name: "graphnode",
Category: "graphnodes",
Package: "meteor",
Private: true,
}
// GraphNodesList represents a list of GraphNodes
type GraphNodesList []*GraphNode
// Identity returns the identity of the objects in the list.
func (o GraphNodesList) Identity() elemental.Identity {
return GraphNodeIdentity
}
// Copy returns a pointer to a copy the GraphNodesList.
func (o GraphNodesList) Copy() elemental.Identifiables {
copy := append(GraphNodesList{}, o...)
return ©
}
// Append appends the objects to the a new copy of the GraphNodesList.
func (o GraphNodesList) Append(objects ...elemental.Identifiable) elemental.Identifiables {
out := append(GraphNodesList{}, o...)
for _, obj := range objects {
out = append(out, obj.(*GraphNode))
}
return out
}
// List converts the object to an elemental.IdentifiablesList.
func (o GraphNodesList) List() elemental.IdentifiablesList {
out := make(elemental.IdentifiablesList, len(o))
for i := 0; i < len(o); i++ {
out[i] = o[i]
}
return out
}
// DefaultOrder returns the default ordering fields of the content.
func (o GraphNodesList) DefaultOrder() []string {
return []string{}
}
// ToSparse returns the GraphNodesList converted to SparseGraphNodesList.
// Objects in the list will only contain the given fields. No field means entire field set.
func (o GraphNodesList) ToSparse(fields ...string) elemental.Identifiables {
out := make(SparseGraphNodesList, len(o))
for i := 0; i < len(o); i++ {
out[i] = o[i].ToSparse(fields...).(*SparseGraphNode)
}
return out
}
// Version returns the version of the content.
func (o GraphNodesList) Version() int {
return 1
}
// GraphNode represents the model of a graphnode
type GraphNode struct {
// Identifier of object represented by the node.
ID string `json:"ID" msgpack:"ID" bson:"id" mapstructure:"ID,omitempty"`
// Enforcement status of processing unit represented by the node.
EnforcementStatus string `json:"enforcementStatus" msgpack:"enforcementStatus" bson:"enforcementstatus" mapstructure:"enforcementStatus,omitempty"`
// Contains the date when the edge was first seen.
FirstSeen time.Time `json:"firstSeen" msgpack:"firstSeen" bson:"firstseen" mapstructure:"firstSeen,omitempty"`
// ID of the group the node is eventually part of.
GroupID string `json:"groupID" msgpack:"groupID" bson:"groupid" mapstructure:"groupID,omitempty"`
// List of images.
Images []string `json:"images" msgpack:"images" bson:"images" mapstructure:"images,omitempty"`
// Contains the date when the edge was last seen.
LastSeen time.Time `json:"lastSeen" msgpack:"lastSeen" bson:"lastseen" mapstructure:"lastSeen,omitempty"`
// Name of object represented by the node.
Name string `json:"name" msgpack:"name" bson:"name" mapstructure:"name,omitempty"`
// Namespace of object represented by the node.
Namespace string `json:"namespace" msgpack:"namespace" bson:"namespace" mapstructure:"namespace,omitempty"`
// Status of object represented by the node.
Status string `json:"status" msgpack:"status" bson:"status" mapstructure:"status,omitempty"`
// Tags of object represented by the node.
Tags []string `json:"tags,omitempty" msgpack:"tags,omitempty" bson:"tags,omitempty" mapstructure:"tags,omitempty"`
// Type of object represented by the node.
Type GraphNodeTypeValue `json:"type" msgpack:"type" bson:"type" mapstructure:"type,omitempty"`
// If `true` the node is marked as unreachable.
Unreachable bool `json:"unreachable" msgpack:"unreachable" bson:"unreachable" mapstructure:"unreachable,omitempty"`
// Tags of object represented by the node.
VulnerabilityLevel string `json:"vulnerabilityLevel" msgpack:"vulnerabilityLevel" bson:"vulnerabilitylevel" mapstructure:"vulnerabilityLevel,omitempty"`
ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}
// NewGraphNode returns a new *GraphNode
func NewGraphNode() *GraphNode {
return &GraphNode{
ModelVersion: 1,
Images: []string{},
Tags: []string{},
}
}
// Identity returns the Identity of the object.
func (o *GraphNode) Identity() elemental.Identity {
return GraphNodeIdentity
}
// Identifier returns the value of the object's unique identifier.
func (o *GraphNode) Identifier() string {
return ""
}
// SetIdentifier sets the value of the object's unique identifier.
func (o *GraphNode) SetIdentifier(id string) {
}
// GetBSON implements the bson marshaling interface.
// This is used to transparently convert ID to MongoDBID as ObectID.
func (o *GraphNode) GetBSON() (interface{}, error) {
if o == nil {
return nil, nil
}
s := &mongoAttributesGraphNode{}
s.ID = o.ID
s.EnforcementStatus = o.EnforcementStatus
s.FirstSeen = o.FirstSeen
s.GroupID = o.GroupID
s.Images = o.Images
s.LastSeen = o.LastSeen
s.Name = o.Name
s.Namespace = o.Namespace
s.Status = o.Status
s.Tags = o.Tags
s.Type = o.Type
s.Unreachable = o.Unreachable
s.VulnerabilityLevel = o.VulnerabilityLevel
return s, nil
}
// SetBSON implements the bson marshaling interface.
// This is used to transparently convert ID to MongoDBID as ObectID.
func (o *GraphNode) SetBSON(raw bson.Raw) error {
if o == nil {
return nil
}
s := &mongoAttributesGraphNode{}
if err := raw.Unmarshal(s); err != nil {
return err
}
o.ID = s.ID
o.EnforcementStatus = s.EnforcementStatus
o.FirstSeen = s.FirstSeen
o.GroupID = s.GroupID
o.Images = s.Images
o.LastSeen = s.LastSeen
o.Name = s.Name
o.Namespace = s.Namespace
o.Status = s.Status
o.Tags = s.Tags
o.Type = s.Type
o.Unreachable = s.Unreachable
o.VulnerabilityLevel = s.VulnerabilityLevel
return nil
}
// Version returns the hardcoded version of the model.
func (o *GraphNode) Version() int {
return 1
}
// BleveType implements the bleve.Classifier Interface.
func (o *GraphNode) BleveType() string {
return "graphnode"
}
// DefaultOrder returns the list of default ordering fields.
func (o *GraphNode) DefaultOrder() []string {
return []string{}
}
// Doc returns the documentation for the object
func (o *GraphNode) Doc() string {
return `Represents an node from the dependency map.`
}
func (o *GraphNode) String() string {
return fmt.Sprintf("<%s:%s>", o.Identity().Name, o.Identifier())
}
// ToSparse returns the sparse version of the model.
// The returned object will only contain the given fields. No field means entire field set.
func (o *GraphNode) ToSparse(fields ...string) elemental.SparseIdentifiable {
if len(fields) == 0 {
// nolint: goimports
return &SparseGraphNode{
ID: &o.ID,
EnforcementStatus: &o.EnforcementStatus,
FirstSeen: &o.FirstSeen,
GroupID: &o.GroupID,
Images: &o.Images,
LastSeen: &o.LastSeen,
Name: &o.Name,
Namespace: &o.Namespace,
Status: &o.Status,
Tags: &o.Tags,
Type: &o.Type,
Unreachable: &o.Unreachable,
VulnerabilityLevel: &o.VulnerabilityLevel,
}
}
sp := &SparseGraphNode{}
for _, f := range fields {
switch f {
case "ID":
sp.ID = &(o.ID)
case "enforcementStatus":
sp.EnforcementStatus = &(o.EnforcementStatus)
case "firstSeen":
sp.FirstSeen = &(o.FirstSeen)
case "groupID":
sp.GroupID = &(o.GroupID)
case "images":
sp.Images = &(o.Images)
case "lastSeen":
sp.LastSeen = &(o.LastSeen)
case "name":
sp.Name = &(o.Name)
case "namespace":
sp.Namespace = &(o.Namespace)
case "status":
sp.Status = &(o.Status)
case "tags":
sp.Tags = &(o.Tags)
case "type":
sp.Type = &(o.Type)
case "unreachable":
sp.Unreachable = &(o.Unreachable)
case "vulnerabilityLevel":
sp.VulnerabilityLevel = &(o.VulnerabilityLevel)
}
}
return sp
}
// Patch apply the non nil value of a *SparseGraphNode to the object.
func (o *GraphNode) Patch(sparse elemental.SparseIdentifiable) {
if !sparse.Identity().IsEqual(o.Identity()) {
panic("cannot patch from a parse with different identity")
}
so := sparse.(*SparseGraphNode)
if so.ID != nil {
o.ID = *so.ID
}
if so.EnforcementStatus != nil {
o.EnforcementStatus = *so.EnforcementStatus
}
if so.FirstSeen != nil {
o.FirstSeen = *so.FirstSeen
}
if so.GroupID != nil {
o.GroupID = *so.GroupID
}
if so.Images != nil {
o.Images = *so.Images
}
if so.LastSeen != nil {
o.LastSeen = *so.LastSeen
}
if so.Name != nil {
o.Name = *so.Name
}
if so.Namespace != nil {
o.Namespace = *so.Namespace
}
if so.Status != nil {
o.Status = *so.Status
}
if so.Tags != nil {
o.Tags = *so.Tags
}
if so.Type != nil {
o.Type = *so.Type
}
if so.Unreachable != nil {
o.Unreachable = *so.Unreachable
}
if so.VulnerabilityLevel != nil {
o.VulnerabilityLevel = *so.VulnerabilityLevel
}
}
// DeepCopy returns a deep copy if the GraphNode.
func (o *GraphNode) DeepCopy() *GraphNode {
if o == nil {
return nil
}
out := &GraphNode{}
o.DeepCopyInto(out)
return out
}
// DeepCopyInto copies the receiver into the given *GraphNode.
func (o *GraphNode) DeepCopyInto(out *GraphNode) {
target, err := copystructure.Copy(o)
if err != nil {
panic(fmt.Sprintf("Unable to deepcopy GraphNode: %s", err))
}
*out = *target.(*GraphNode)
}
// Validate valides the current information stored into the structure.
func (o *GraphNode) Validate() error {
errors := elemental.Errors{}
requiredErrors := elemental.Errors{}
if err := elemental.ValidateStringInList("type", string(o.Type), []string{"Docker", "ExternalNetwork", "Volume", "Claim", "Node", "Namespace", "RemoteController", "APIGateway", "Host", "HostService", "LinuxService", "WindowsService", "RKT", "User", "SSHSession", "ECS"}, false); err != nil {
errors = errors.Append(err)
}
if len(requiredErrors) > 0 {
return requiredErrors
}
if len(errors) > 0 {
return errors
}
return nil
}
// SpecificationForAttribute returns the AttributeSpecification for the given attribute name key.
func (*GraphNode) SpecificationForAttribute(name string) elemental.AttributeSpecification {
if v, ok := GraphNodeAttributesMap[name]; ok {
return v
}
// We could not find it, so let's check on the lower case indexed spec map
return GraphNodeLowerCaseAttributesMap[name]
}
// AttributeSpecifications returns the full attribute specifications map.
func (*GraphNode) AttributeSpecifications() map[string]elemental.AttributeSpecification {
return GraphNodeAttributesMap
}
// ValueForAttribute returns the value for the given attribute.
// This is a very advanced function that you should not need but in some
// very specific use cases.
func (o *GraphNode) ValueForAttribute(name string) interface{} {
switch name {
case "ID":
return o.ID
case "enforcementStatus":
return o.EnforcementStatus
case "firstSeen":
return o.FirstSeen
case "groupID":
return o.GroupID
case "images":
return o.Images
case "lastSeen":
return o.LastSeen
case "name":
return o.Name
case "namespace":
return o.Namespace
case "status":
return o.Status
case "tags":
return o.Tags
case "type":
return o.Type
case "unreachable":
return o.Unreachable
case "vulnerabilityLevel":
return o.VulnerabilityLevel
}
return nil
}
// GraphNodeAttributesMap represents the map of attribute for GraphNode.
var GraphNodeAttributesMap = map[string]elemental.AttributeSpecification{
"ID": {
AllowedChoices: []string{},
BSONFieldName: "id",
ConvertedName: "ID",
Description: `Identifier of object represented by the node.`,
Exposed: true,
Name: "ID",
Stored: true,
Type: "string",
},
"EnforcementStatus": {
AllowedChoices: []string{},
BSONFieldName: "enforcementstatus",
ConvertedName: "EnforcementStatus",
Description: `Enforcement status of processing unit represented by the node.`,
Exposed: true,
Name: "enforcementStatus",
Stored: true,
Type: "string",
},
"FirstSeen": {
AllowedChoices: []string{},
BSONFieldName: "firstseen",
ConvertedName: "FirstSeen",
Description: `Contains the date when the edge was first seen.`,
Exposed: true,
Name: "firstSeen",
Stored: true,
Type: "time",
},
"GroupID": {
AllowedChoices: []string{},
BSONFieldName: "groupid",
ConvertedName: "GroupID",
Description: `ID of the group the node is eventually part of.`,
Exposed: true,
Name: "groupID",
Stored: true,
Type: "string",
},
"Images": {
AllowedChoices: []string{},
BSONFieldName: "images",
ConvertedName: "Images",
Description: `List of images.`,
Exposed: true,
Name: "images",
Stored: true,
SubType: "string",
Type: "list",
},
"LastSeen": {
AllowedChoices: []string{},
BSONFieldName: "lastseen",
ConvertedName: "LastSeen",
Description: `Contains the date when the edge was last seen.`,
Exposed: true,
Name: "lastSeen",
Stored: true,
Type: "time",
},
"Name": {
AllowedChoices: []string{},
BSONFieldName: "name",
ConvertedName: "Name",
Description: `Name of object represented by the node.`,
Exposed: true,
Name: "name",
Stored: true,
Type: "string",
},
"Namespace": {
AllowedChoices: []string{},
BSONFieldName: "namespace",
ConvertedName: "Namespace",
Description: `Namespace of object represented by the node.`,
Exposed: true,
Name: "namespace",
Stored: true,
Type: "string",
},
"Status": {
AllowedChoices: []string{},
BSONFieldName: "status",
ConvertedName: "Status",
Description: `Status of object represented by the node.`,
Exposed: true,
Name: "status",
Stored: true,
Type: "string",
},
"Tags": {
AllowedChoices: []string{},
BSONFieldName: "tags",
ConvertedName: "Tags",
Description: `Tags of object represented by the node.`,
Exposed: true,
Name: "tags",
Stored: true,
SubType: "string",
Type: "list",
},
"Type": {
AllowedChoices: []string{"Docker", "ExternalNetwork", "Volume", "Claim", "Node", "Namespace", "RemoteController", "APIGateway", "Host", "HostService", "LinuxService", "WindowsService", "RKT", "User", "SSHSession", "ECS"},
BSONFieldName: "type",
ConvertedName: "Type",
Description: `Type of object represented by the node.`,
Exposed: true,
Name: "type",
Stored: true,
Type: "enum",
},
"Unreachable": {
AllowedChoices: []string{},
BSONFieldName: "unreachable",
ConvertedName: "Unreachable",
Description: `If ` + "`" + `true` + "`" + ` the node is marked as unreachable.`,
Exposed: true,
Name: "unreachable",
Stored: true,
Type: "boolean",
},
"VulnerabilityLevel": {
AllowedChoices: []string{},
BSONFieldName: "vulnerabilitylevel",
ConvertedName: "VulnerabilityLevel",
Description: `Tags of object represented by the node.`,
Exposed: true,
Name: "vulnerabilityLevel",
Stored: true,
Type: "string",
},
}
// GraphNodeLowerCaseAttributesMap represents the map of attribute for GraphNode.
var GraphNodeLowerCaseAttributesMap = map[string]elemental.AttributeSpecification{
"id": {
AllowedChoices: []string{},
BSONFieldName: "id",
ConvertedName: "ID",
Description: `Identifier of object represented by the node.`,
Exposed: true,
Name: "ID",
Stored: true,
Type: "string",
},
"enforcementstatus": {
AllowedChoices: []string{},
BSONFieldName: "enforcementstatus",
ConvertedName: "EnforcementStatus",
Description: `Enforcement status of processing unit represented by the node.`,
Exposed: true,
Name: "enforcementStatus",
Stored: true,
Type: "string",
},
"firstseen": {
AllowedChoices: []string{},
BSONFieldName: "firstseen",
ConvertedName: "FirstSeen",
Description: `Contains the date when the edge was first seen.`,
Exposed: true,
Name: "firstSeen",
Stored: true,
Type: "time",
},
"groupid": {
AllowedChoices: []string{},
BSONFieldName: "groupid",
ConvertedName: "GroupID",
Description: `ID of the group the node is eventually part of.`,
Exposed: true,
Name: "groupID",
Stored: true,
Type: "string",
},
"images": {
AllowedChoices: []string{},
BSONFieldName: "images",
ConvertedName: "Images",
Description: `List of images.`,
Exposed: true,
Name: "images",
Stored: true,
SubType: "string",
Type: "list",
},
"lastseen": {
AllowedChoices: []string{},
BSONFieldName: "lastseen",
ConvertedName: "LastSeen",
Description: `Contains the date when the edge was last seen.`,
Exposed: true,
Name: "lastSeen",
Stored: true,
Type: "time",
},
"name": {
AllowedChoices: []string{},
BSONFieldName: "name",
ConvertedName: "Name",
Description: `Name of object represented by the node.`,
Exposed: true,
Name: "name",
Stored: true,
Type: "string",
},
"namespace": {
AllowedChoices: []string{},
BSONFieldName: "namespace",
ConvertedName: "Namespace",
Description: `Namespace of object represented by the node.`,
Exposed: true,
Name: "namespace",
Stored: true,
Type: "string",
},
"status": {
AllowedChoices: []string{},
BSONFieldName: "status",
ConvertedName: "Status",
Description: `Status of object represented by the node.`,
Exposed: true,
Name: "status",
Stored: true,
Type: "string",
},
"tags": {
AllowedChoices: []string{},
BSONFieldName: "tags",
ConvertedName: "Tags",
Description: `Tags of object represented by the node.`,
Exposed: true,
Name: "tags",
Stored: true,
SubType: "string",
Type: "list",
},
"type": {
AllowedChoices: []string{"Docker", "ExternalNetwork", "Volume", "Claim", "Node", "Namespace", "RemoteController", "APIGateway", "Host", "HostService", "LinuxService", "WindowsService", "RKT", "User", "SSHSession", "ECS"},
BSONFieldName: "type",
ConvertedName: "Type",
Description: `Type of object represented by the node.`,
Exposed: true,
Name: "type",
Stored: true,
Type: "enum",
},
"unreachable": {
AllowedChoices: []string{},
BSONFieldName: "unreachable",
ConvertedName: "Unreachable",
Description: `If ` + "`" + `true` + "`" + ` the node is marked as unreachable.`,
Exposed: true,
Name: "unreachable",
Stored: true,
Type: "boolean",
},
"vulnerabilitylevel": {
AllowedChoices: []string{},
BSONFieldName: "vulnerabilitylevel",
ConvertedName: "VulnerabilityLevel",
Description: `Tags of object represented by the node.`,
Exposed: true,
Name: "vulnerabilityLevel",
Stored: true,
Type: "string",
},
}
// SparseGraphNodesList represents a list of SparseGraphNodes
type SparseGraphNodesList []*SparseGraphNode
// Identity returns the identity of the objects in the list.
func (o SparseGraphNodesList) Identity() elemental.Identity {
return GraphNodeIdentity
}
// Copy returns a pointer to a copy the SparseGraphNodesList.
func (o SparseGraphNodesList) Copy() elemental.Identifiables {
copy := append(SparseGraphNodesList{}, o...)
return ©
}
// Append appends the objects to the a new copy of the SparseGraphNodesList.
func (o SparseGraphNodesList) Append(objects ...elemental.Identifiable) elemental.Identifiables {
out := append(SparseGraphNodesList{}, o...)
for _, obj := range objects {
out = append(out, obj.(*SparseGraphNode))
}
return out
}
// List converts the object to an elemental.IdentifiablesList.
func (o SparseGraphNodesList) List() elemental.IdentifiablesList {
out := make(elemental.IdentifiablesList, len(o))
for i := 0; i < len(o); i++ {
out[i] = o[i]
}
return out
}
// DefaultOrder returns the default ordering fields of the content.
func (o SparseGraphNodesList) DefaultOrder() []string {
return []string{}
}
// ToPlain returns the SparseGraphNodesList converted to GraphNodesList.
func (o SparseGraphNodesList) ToPlain() elemental.IdentifiablesList {
out := make(elemental.IdentifiablesList, len(o))
for i := 0; i < len(o); i++ {
out[i] = o[i].ToPlain()
}
return out
}
// Version returns the version of the content.
func (o SparseGraphNodesList) Version() int {
return 1
}
// SparseGraphNode represents the sparse version of a graphnode.
type SparseGraphNode struct {
// Identifier of object represented by the node.
ID *string `json:"ID,omitempty" msgpack:"ID,omitempty" bson:"id,omitempty" mapstructure:"ID,omitempty"`
// Enforcement status of processing unit represented by the node.
EnforcementStatus *string `json:"enforcementStatus,omitempty" msgpack:"enforcementStatus,omitempty" bson:"enforcementstatus,omitempty" mapstructure:"enforcementStatus,omitempty"`
// Contains the date when the edge was first seen.
FirstSeen *time.Time `json:"firstSeen,omitempty" msgpack:"firstSeen,omitempty" bson:"firstseen,omitempty" mapstructure:"firstSeen,omitempty"`
// ID of the group the node is eventually part of.
GroupID *string `json:"groupID,omitempty" msgpack:"groupID,omitempty" bson:"groupid,omitempty" mapstructure:"groupID,omitempty"`
// List of images.
Images *[]string `json:"images,omitempty" msgpack:"images,omitempty" bson:"images,omitempty" mapstructure:"images,omitempty"`
// Contains the date when the edge was last seen.
LastSeen *time.Time `json:"lastSeen,omitempty" msgpack:"lastSeen,omitempty" bson:"lastseen,omitempty" mapstructure:"lastSeen,omitempty"`
// Name of object represented by the node.
Name *string `json:"name,omitempty" msgpack:"name,omitempty" bson:"name,omitempty" mapstructure:"name,omitempty"`
// Namespace of object represented by the node.
Namespace *string `json:"namespace,omitempty" msgpack:"namespace,omitempty" bson:"namespace,omitempty" mapstructure:"namespace,omitempty"`
// Status of object represented by the node.
Status *string `json:"status,omitempty" msgpack:"status,omitempty" bson:"status,omitempty" mapstructure:"status,omitempty"`
// Tags of object represented by the node.
Tags *[]string `json:"tags,omitempty" msgpack:"tags,omitempty" bson:"tags,omitempty" mapstructure:"tags,omitempty"`
// Type of object represented by the node.
Type *GraphNodeTypeValue `json:"type,omitempty" msgpack:"type,omitempty" bson:"type,omitempty" mapstructure:"type,omitempty"`
// If `true` the node is marked as unreachable.
Unreachable *bool `json:"unreachable,omitempty" msgpack:"unreachable,omitempty" bson:"unreachable,omitempty" mapstructure:"unreachable,omitempty"`
// Tags of object represented by the node.
VulnerabilityLevel *string `json:"vulnerabilityLevel,omitempty" msgpack:"vulnerabilityLevel,omitempty" bson:"vulnerabilitylevel,omitempty" mapstructure:"vulnerabilityLevel,omitempty"`
ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}
// NewSparseGraphNode returns a new SparseGraphNode.
func NewSparseGraphNode() *SparseGraphNode {
return &SparseGraphNode{}
}
// Identity returns the Identity of the sparse object.
func (o *SparseGraphNode) Identity() elemental.Identity {
return GraphNodeIdentity
}
// Identifier returns the value of the sparse object's unique identifier.
func (o *SparseGraphNode) Identifier() string {
return ""
}
// SetIdentifier sets the value of the sparse object's unique identifier.
func (o *SparseGraphNode) SetIdentifier(id string) {
}
// GetBSON implements the bson marshaling interface.
// This is used to transparently convert ID to MongoDBID as ObectID.
func (o *SparseGraphNode) GetBSON() (interface{}, error) {
if o == nil {
return nil, nil
}
s := &mongoAttributesSparseGraphNode{}
if o.ID != nil {
s.ID = o.ID
}
if o.EnforcementStatus != nil {
s.EnforcementStatus = o.EnforcementStatus
}
if o.FirstSeen != nil {
s.FirstSeen = o.FirstSeen
}
if o.GroupID != nil {
s.GroupID = o.GroupID
}
if o.Images != nil {
s.Images = o.Images
}
if o.LastSeen != nil {
s.LastSeen = o.LastSeen
}
if o.Name != nil {
s.Name = o.Name
}
if o.Namespace != nil {
s.Namespace = o.Namespace
}
if o.Status != nil {
s.Status = o.Status
}
if o.Tags != nil {
s.Tags = o.Tags
}
if o.Type != nil {
s.Type = o.Type
}
if o.Unreachable != nil {
s.Unreachable = o.Unreachable
}
if o.VulnerabilityLevel != nil {
s.VulnerabilityLevel = o.VulnerabilityLevel
}
return s, nil
}
// SetBSON implements the bson marshaling interface.
// This is used to transparently convert ID to MongoDBID as ObectID.
func (o *SparseGraphNode) SetBSON(raw bson.Raw) error {
if o == nil {
return nil
}
s := &mongoAttributesSparseGraphNode{}
if err := raw.Unmarshal(s); err != nil {
return err
}
if s.ID != nil {
o.ID = s.ID
}
if s.EnforcementStatus != nil {
o.EnforcementStatus = s.EnforcementStatus
}
if s.FirstSeen != nil {
o.FirstSeen = s.FirstSeen
}
if s.GroupID != nil {
o.GroupID = s.GroupID
}
if s.Images != nil {
o.Images = s.Images
}
if s.LastSeen != nil {
o.LastSeen = s.LastSeen
}
if s.Name != nil {
o.Name = s.Name
}
if s.Namespace != nil {
o.Namespace = s.Namespace
}
if s.Status != nil {
o.Status = s.Status
}
if s.Tags != nil {
o.Tags = s.Tags
}
if s.Type != nil {
o.Type = s.Type
}
if s.Unreachable != nil {
o.Unreachable = s.Unreachable
}
if s.VulnerabilityLevel != nil {
o.VulnerabilityLevel = s.VulnerabilityLevel
}
return nil
}
// Version returns the hardcoded version of the model.
func (o *SparseGraphNode) Version() int {
return 1
}
// ToPlain returns the plain version of the sparse model.
func (o *SparseGraphNode) ToPlain() elemental.PlainIdentifiable {
out := NewGraphNode()
if o.ID != nil {
out.ID = *o.ID
}
if o.EnforcementStatus != nil {
out.EnforcementStatus = *o.EnforcementStatus
}
if o.FirstSeen != nil {
out.FirstSeen = *o.FirstSeen
}
if o.GroupID != nil {
out.GroupID = *o.GroupID
}
if o.Images != nil {
out.Images = *o.Images
}
if o.LastSeen != nil {
out.LastSeen = *o.LastSeen
}
if o.Name != nil {
out.Name = *o.Name
}
if o.Namespace != nil {
out.Namespace = *o.Namespace
}
if o.Status != nil {
out.Status = *o.Status
}
if o.Tags != nil {
out.Tags = *o.Tags
}
if o.Type != nil {
out.Type = *o.Type
}
if o.Unreachable != nil {
out.Unreachable = *o.Unreachable
}
if o.VulnerabilityLevel != nil {
out.VulnerabilityLevel = *o.VulnerabilityLevel
}
return out
}
// DeepCopy returns a deep copy if the SparseGraphNode.
func (o *SparseGraphNode) DeepCopy() *SparseGraphNode {
if o == nil {
return nil
}
out := &SparseGraphNode{}
o.DeepCopyInto(out)
return out
}
// DeepCopyInto copies the receiver into the given *SparseGraphNode.
func (o *SparseGraphNode) DeepCopyInto(out *SparseGraphNode) {
target, err := copystructure.Copy(o)
if err != nil {
panic(fmt.Sprintf("Unable to deepcopy SparseGraphNode: %s", err))
}
*out = *target.(*SparseGraphNode)
}
type mongoAttributesGraphNode struct {
ID string `bson:"id"`
EnforcementStatus string `bson:"enforcementstatus"`
FirstSeen time.Time `bson:"firstseen"`
GroupID string `bson:"groupid"`
Images []string `bson:"images"`
LastSeen time.Time `bson:"lastseen"`
Name string `bson:"name"`
Namespace string `bson:"namespace"`
Status string `bson:"status"`
Tags []string `bson:"tags,omitempty"`
Type GraphNodeTypeValue `bson:"type"`
Unreachable bool `bson:"unreachable"`
VulnerabilityLevel string `bson:"vulnerabilitylevel"`
}
type mongoAttributesSparseGraphNode struct {
ID *string `bson:"id,omitempty"`
EnforcementStatus *string `bson:"enforcementstatus,omitempty"`
FirstSeen *time.Time `bson:"firstseen,omitempty"`
GroupID *string `bson:"groupid,omitempty"`
Images *[]string `bson:"images,omitempty"`
LastSeen *time.Time `bson:"lastseen,omitempty"`
Name *string `bson:"name,omitempty"`
Namespace *string `bson:"namespace,omitempty"`
Status *string `bson:"status,omitempty"`
Tags *[]string `bson:"tags,omitempty"`
Type *GraphNodeTypeValue `bson:"type,omitempty"`
Unreachable *bool `bson:"unreachable,omitempty"`
VulnerabilityLevel *string `bson:"vulnerabilitylevel,omitempty"`
} | graphnode.go | 0.776962 | 0.487734 | graphnode.go | starcoder |
package filters
import (
"github.com/gpayer/go-audio-service/snd"
"math"
)
type BiquadState struct {
b0, b1, b2 float32
a1, a2 float32
xn1, xn2 snd.Sample
yn1, yn2 snd.Sample
}
func (state *BiquadState) Process(input, output []snd.Sample) {
if len(input) != len(output) {
panic("input and output must have the same size")
}
size := len(input)
b0 := state.b0
b1 := state.b1
b2 := state.b2
a1 := state.a1
a2 := state.a2
xn1 := state.xn1
xn2 := state.xn2
yn1 := state.yn1
yn2 := state.yn2
// loop for each sample
for n := 0; n < size; n++ {
// get the current sample
xn0 := input[n]
// the formula is the same for each channel
L :=
b0*xn0.L +
b1*xn1.L +
b2*xn2.L -
a1*yn1.L -
a2*yn2.L
R :=
b0*xn0.R +
b1*xn1.R +
b2*xn2.R -
a1*yn1.R -
a2*yn2.R
// save the result
output[n] = snd.Sample{L: L, R: R}
// slide everything down one sample
xn2 = xn1
xn1 = xn0
yn2 = yn1
yn1 = output[n]
}
// save the state for future processing
state.xn1 = xn1
state.xn2 = xn2
state.yn1 = yn1
state.yn2 = yn2
}
func (state *BiquadState) Reset() {
state.xn1 = snd.Sample{L: 0, R: 0}
state.xn2 = snd.Sample{L: 0, R: 0}
state.yn1 = snd.Sample{L: 0, R: 0}
state.yn2 = snd.Sample{L: 0, R: 0}
}
func (state *BiquadState) scale(amt float32) {
state.b0 = amt
state.b1 = 0.0
state.b2 = 0.0
state.a1 = 0.0
state.a2 = 0.0
}
func (state *BiquadState) passThrough() {
state.scale(1.0)
}
func (state *BiquadState) zero() {
state.scale(0.0)
}
func (state *BiquadState) LowPass(rate uint32, cutoff, resonance float32) {
nyquist := float32(rate) * 0.5
cutoff /= nyquist
if cutoff >= 1.0 {
state.passThrough()
} else if cutoff <= 0.0 {
state.zero()
} else {
resonance = float32(math.Pow(10.0, float64(resonance)*0.05)) // convert resonance from dB to linear
theta := math.Pi * 2.0 * float64(cutoff)
alpha := float32(math.Sin(theta)) / (2.0 * resonance)
cosw := float32(math.Cos(theta))
beta := (1.0 - cosw) * 0.5
a0inv := 1.0 / (1.0 + alpha)
state.b0 = a0inv * beta
state.b1 = a0inv * 2.0 * beta
state.b2 = a0inv * beta
state.a1 = a0inv * -2.0 * cosw
state.a2 = a0inv * (1.0 - alpha)
}
} | filters/biquad.go | 0.541894 | 0.494263 | biquad.go | starcoder |
package field
import (
"fmt"
"time"
"go.uber.org/zap"
)
type Field = zap.Field
func Binary(key string, value []byte) zap.Field {
return zap.Binary(key, value)
}
func Bool(key string, value bool) zap.Field {
return zap.Bool(key, value)
}
func ByteString(key string, value []byte) zap.Field {
return zap.ByteString(key, value)
}
func Complex128(key string, value complex128) zap.Field {
return zap.Complex128(key, value)
}
func Complex64(key string, value complex64) zap.Field {
return zap.Complex64(key, value)
}
func Error(err error) zap.Field {
return zap.Error(err)
}
func Float64(key string, value float64) zap.Field {
return zap.Float64(key, value)
}
func Float32(key string, value float32) zap.Field {
return zap.Float32(key, value)
}
func Int(key string, value int) zap.Field {
return zap.Int(key, value)
}
func Int64(key string, value int64) zap.Field {
return zap.Int64(key, value)
}
func Int32(key string, value int32) zap.Field {
return zap.Int32(key, value)
}
func Int16(key string, value int16) zap.Field {
return zap.Int16(key, value)
}
func Int8(key string, value int8) zap.Field {
return zap.Int8(key, value)
}
func String(key string, value string) zap.Field {
return zap.String(key, value)
}
func Uint(key string, value uint) zap.Field {
return zap.Uint(key, value)
}
func Uint64(key string, value uint64) zap.Field {
return zap.Uint64(key, value)
}
func Uint32(key string, value uint32) zap.Field {
return zap.Uint32(key, value)
}
func Uint16(key string, value uint16) zap.Field {
return zap.Uint16(key, value)
}
func Uint8(key string, value uint8) zap.Field {
return zap.Uint8(key, value)
}
func Stringer(key string, value fmt.Stringer) zap.Field {
return zap.Stringer(key, value)
}
func Time(key string, value time.Time) zap.Field {
return zap.Time(key, value)
}
func Stack(key string) zap.Field {
return zap.Stack(key)
}
func Duration(key string, value time.Duration) zap.Field {
return zap.Duration(key, value)
}
func Any(key string, value interface{}) zap.Field {
return zap.Any(key, value)
}
func Package(name string) zap.Field {
return zap.String("package", name)
}
func Entity(name string) zap.Field {
return zap.String("entity", name)
} | log/field/field.go | 0.807195 | 0.46478 | field.go | starcoder |
package sequtil
import (
"fmt"
)
const (
// AminoAcids holds the single-letter amino acid symbols.
// These are the valid inputs to AminoName.
AminoAcids = "ABCDEFGHIKLMNPQRSTVWXYZ*"
)
// Translate translates the nucleotides in src to amino acids, appends the result to
// dst and returns the new slice. Nucleotides should be in "aAcCgGtT". Length of src
// should be a multiple of 3.
func Translate(dst, src []byte) []byte {
if len(src)%3 != 0 {
panic(fmt.Sprintf("length of src should be a multiple of 3, got %v",
len(src)))
}
var buf [3]byte
for i := 0; i < len(src); i += 3 {
copy(buf[:], src[i:i+3])
for j := range buf {
if buf[j] >= 'a' {
buf[j] -= 'a' - 'A'
}
}
aa := codonToAmino[buf]
if aa == 0 {
panic(fmt.Sprintf("bad codon at position %v: %q", i, src[i:i+3]))
}
dst = append(dst, aa)
}
return dst
}
// TranslateReadingFrames returns the translation of the 3 reading frames of seq.
// Nucleotides should be in "aAcCgGtT". seq can be of any length.
func TranslateReadingFrames(seq []byte) [3][]byte {
var result [3][]byte
for i := 0; i < 3; i++ {
sub := seq[i:]
sub = sub[:len(sub)/3*3]
result[i] = Translate(nil, sub)
}
return result
}
// AminoName returns the 3-letter code and the full name of the amino acid with the
// given letter. Input may be uppercase or lowercase.
func AminoName(aa byte) (string, string) {
if aa >= 'a' && aa <= 'z' {
aa -= 'a' - 'A'
}
names, ok := aminoToName[aa]
if !ok {
panic(fmt.Sprintf("bad amino acid code: '%c'", aa))
}
return names[0], names[1]
}
var codonToAmino = map[[3]byte]byte{
{'A', 'A', 'A'}: 'K',
{'A', 'A', 'C'}: 'N',
{'A', 'A', 'G'}: 'K',
{'A', 'A', 'T'}: 'N',
{'A', 'C', 'A'}: 'T',
{'A', 'C', 'C'}: 'T',
{'A', 'C', 'G'}: 'T',
{'A', 'C', 'T'}: 'T',
{'A', 'G', 'A'}: 'R',
{'A', 'G', 'C'}: 'S',
{'A', 'G', 'G'}: 'R',
{'A', 'G', 'T'}: 'S',
{'A', 'T', 'A'}: 'I',
{'A', 'T', 'C'}: 'I',
{'A', 'T', 'G'}: 'M',
{'A', 'T', 'T'}: 'I',
{'C', 'A', 'A'}: 'Q',
{'C', 'A', 'C'}: 'H',
{'C', 'A', 'G'}: 'Q',
{'C', 'A', 'T'}: 'H',
{'C', 'C', 'A'}: 'P',
{'C', 'C', 'C'}: 'P',
{'C', 'C', 'G'}: 'P',
{'C', 'C', 'T'}: 'P',
{'C', 'G', 'A'}: 'R',
{'C', 'G', 'C'}: 'R',
{'C', 'G', 'G'}: 'R',
{'C', 'G', 'T'}: 'R',
{'C', 'T', 'A'}: 'L',
{'C', 'T', 'C'}: 'L',
{'C', 'T', 'G'}: 'L',
{'C', 'T', 'T'}: 'L',
{'G', 'A', 'A'}: 'E',
{'G', 'A', 'C'}: 'D',
{'G', 'A', 'G'}: 'E',
{'G', 'A', 'T'}: 'D',
{'G', 'C', 'A'}: 'A',
{'G', 'C', 'C'}: 'A',
{'G', 'C', 'G'}: 'A',
{'G', 'C', 'T'}: 'A',
{'G', 'G', 'A'}: 'G',
{'G', 'G', 'C'}: 'G',
{'G', 'G', 'G'}: 'G',
{'G', 'G', 'T'}: 'G',
{'G', 'T', 'A'}: 'V',
{'G', 'T', 'C'}: 'V',
{'G', 'T', 'G'}: 'V',
{'G', 'T', 'T'}: 'V',
{'T', 'A', 'A'}: '*',
{'T', 'A', 'C'}: 'Y',
{'T', 'A', 'G'}: '*',
{'T', 'A', 'T'}: 'Y',
{'T', 'C', 'A'}: 'S',
{'T', 'C', 'C'}: 'S',
{'T', 'C', 'G'}: 'S',
{'T', 'C', 'T'}: 'S',
{'T', 'G', 'A'}: '*',
{'T', 'G', 'C'}: 'C',
{'T', 'G', 'G'}: 'W',
{'T', 'G', 'T'}: 'C',
{'T', 'T', 'A'}: 'L',
{'T', 'T', 'C'}: 'F',
{'T', 'T', 'G'}: 'L',
{'T', 'T', 'T'}: 'F',
}
var aminoToName = map[byte][2]string{
'A': {"Ala", "Alanine"},
'B': {"Asx", "Asparagine"},
'C': {"Cys", "Cysteine"},
'D': {"Asp", "Aspartic"},
'E': {"Glu", "Glutamic"},
'F': {"Phe", "Phenylalanine"},
'G': {"Gly", "Glycine"},
'H': {"His", "Histidine"},
'I': {"Ile", "Isoleucine"},
'K': {"Lys", "Lysine"},
'L': {"Leu", "Leucine"},
'M': {"Met", "Methionine"},
'N': {"Asn", "Asparagine"},
'P': {"Pro", "Proline"},
'Q': {"Gln", "Glutamine"},
'R': {"Arg", "Arginine"},
'S': {"Ser", "Serine"},
'T': {"Thr", "Threonine"},
'V': {"Val", "Valine"},
'W': {"Trp", "Tryptophan"},
'X': {"X", "Any codon"},
'Y': {"Tyr", "Tyrosine"},
'Z': {"Glx", "Glutamine"},
'*': {"*", "Stop codon"},
} | sequtil/amino.go | 0.645679 | 0.437583 | amino.go | starcoder |
package astar
import (
"math/rand"
"github.com/hajimehoshi/ebiten/v2"
)
// Board represents the game board.
type Board struct {
width int
height int
tiles []*Tile
graph *AStarGraph
initialized bool
}
// NewBoard generates a new Board with giving a size.
func NewBoard(height, width int) (*Board, error) {
b := &Board{
height: height,
width: width,
tiles: make([]*Tile, height*width),
initialized: false,
}
for i := range b.tiles {
x, y := b.Coord(i)
b.tiles[i] = &Tile{
kind: TypeBlank,
x: x,
y: y,
}
}
b.Start().SetKind(TypeStart)
b.End().SetKind(TypeEnd)
return b, nil
}
// Index returns the position in the array for a coordinate.
// Board stores the grid as a 1-d array, so this helper computes the
// 1-d index based on the 2-d coordinates.
func (b *Board) Index(x, y int) int {
return y*b.width + x
}
// Coord returns the 2-d coordinates for an array index.
// Board stores the grid as a 1-d array.
func (b *Board) Coord(index int) (int, int) {
x := index % b.width
y := index / b.width
return x, y
}
// Start returns the top left tile in the board which is our starting point.
func (b *Board) Start() *Tile {
index := b.Index(0, 0)
return b.tiles[index]
}
// End returns the bottom right tile in thee board, which is our destination.
func (b *Board) End() *Tile {
index := b.Index(b.width-1, b.height-1)
return b.tiles[index]
}
func (b *Board) initialize() {
g := NewAStarGraph(b)
b.graph = g
b.initialized = true
}
// addRandomWalls adds numWalls in random locations on the board.
func (b *Board) addRandomWalls(numWalls int) {
start := b.Start()
end := b.End()
for i := 0; i < numWalls; i++ {
isValidTile := false
for !isValidTile {
x := rand.Intn(b.width)
y := rand.Intn(b.height)
index := b.Index(x, y)
tile := b.tiles[index]
// Start and end are not valid walls.
if tile == start || tile == end || tile.kind == TypeWall {
continue
}
isValidTile = true
tile.SetKind(TypeWall)
}
}
}
// IsOnBoard reeturns true if the coordinate is on the board.
// This is the relative x and y coordiantes of the mouse, not the cell in the grid.
func (b *Board) IsOnBoard(x, y int) bool {
xOnBoard := x >= 0 && x <= (b.width*TileSize)+(b.width+1)*TileMargin
yOnBoard := y >= 0 && y <= (b.height*TileSize)+(b.height+1)*TileMargin
return xOnBoard && yOnBoard
}
// TileAt returns the tile at the x and y position on the board.
// This is the position of the mouse, not the x and y coordinates of the grid.
func (b *Board) TileAt(x, y int) *Tile {
xCoord := x / (TileSize + TileMargin)
yCoord := y / (TileSize + TileMargin)
index := b.Index(xCoord, yCoord)
return b.tiles[index]
}
// Update updates the board state.
func (b *Board) Update(input *Input) {
if b.initialized {
b.graph.Step()
return
}
if input.EnterPressed {
b.initialize()
return
}
if input.RightMousePressed {
b.addRandomWalls(10)
return
}
if !input.LeftMousePressed {
return
}
if b.IsOnBoard(input.MouseX, input.MouseY) {
tile := b.TileAt(input.MouseX, input.MouseY)
tile.TryFlipWall()
}
}
// Size returns the board size.
func (b *Board) Size() (int, int) {
x := b.width*TileSize + (b.width+1)*TileMargin
y := b.height*TileSize + (b.height+1)*TileMargin
return x, y
}
// Draw draws the board to the given boardImage.
func (b *Board) Draw(boardImage *ebiten.Image) {
boardImage.Fill(FrameColor)
for j := 0; j < b.height; j++ {
for i := 0; i < b.width; i++ {
op := &ebiten.DrawImageOptions{}
x := i*TileSize + (i+1)*TileMargin
y := j*TileSize + (j+1)*TileMargin
op.GeoM.Translate(float64(x), float64(y))
boardImage.DrawImage(tileImage, op)
}
}
for _, tile := range b.tiles {
tile.Draw(boardImage)
}
} | board.go | 0.820182 | 0.488466 | board.go | starcoder |
package nthash
import (
"fmt"
"math"
"sync"
)
const (
// maxK is the maximum k-mer size permitted
maxK uint = math.MaxUint32
// bufferSize is the size of te buffer used by the channel in the Hash method
bufferSize uint = 128
// offset is used as a mask to retrieve a base's complement in the seed table
offset uint8 = 0x07
// seedA is the 64-bit random seed corresponding to base A
seedA uint64 = 0x3c8bfbb395c60474
// seedC is the 64-bit random seed corresponding to base C
seedC uint64 = 0x3193c18562a02b4c
// seedG is the 64-bit random seed corresponding to base G
seedG uint64 = 0x20323ed082572324
// seedT is the 64-bit random seed corresponding to base T
seedT uint64 = 0x295549f54be24456
// seedN is the 64-bit random seed corresponding to N
seedN uint64 = 0x0000000000000000
// seed for gerenerating multiple hash values
multiSeed uint64 = 0x90b45d39fb6da1fa
// multiShift is used for gerenerating multiple hash values
multiShift uint = 27
)
// seedTab is the lookup table for the bases on their complements
var seedTab = [256]uint64{
seedN, seedT, seedN, seedG, seedA, seedA, seedN, seedC, // 0..7
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 8..15
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 16..23
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 24..31
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 32..39
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 40..47
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 48..55
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 56..63
seedN, seedA, seedN, seedC, seedN, seedN, seedN, seedG, // 64..71
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 72..79
seedN, seedN, seedN, seedN, seedT, seedT, seedN, seedN, // 80..87
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 88..95
seedN, seedA, seedN, seedC, seedN, seedN, seedN, seedG, // 96..103
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 104..111
seedN, seedN, seedN, seedN, seedT, seedT, seedN, seedN, // 112..119
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 120..127
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 128..135
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 136..143
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 144..151
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 152..159
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 160..167
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 168..175
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 176..183
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 184..191
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 192..199
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 200..207
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 208..215
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 216..223
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 224..231
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 232..239
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 240..247
seedN, seedN, seedN, seedN, seedN, seedN, seedN, seedN, // 248..255
}
// NTHi is the ntHash iterator
type NTHi struct {
seq *[]byte // the sequence being hashed
k uint // the k-mer size
fh uint64 // the current forward hash value
rh uint64 // the current reverse hash value
currentIdx uint // the current index position in the sequence being hashed
maxIdx uint // the maximum index position to hash up to
}
// use object pool to reducing GC load for computation of huge number of sequences.
var poolNTHi = &sync.Pool{New: func() interface{} {
return &NTHi{}
}}
// NewHasher is the constructor function for the ntHash iterator
// seq is a pointer to the sequence being hashed
// k is the k-mer size to use
func NewHasher(seq *[]byte, k uint) (*NTHi, error) {
seqLen := uint(len(*seq))
if k > seqLen {
return nil, fmt.Errorf("k size is greater than sequence length (%d vs %d)", k, seqLen)
}
if k > maxK {
return nil, fmt.Errorf("k size is greater than the maximum allowed k size (%d vs %d)", k, maxK)
}
fh := ntf64((*seq)[0:k], 0, k)
rh := ntr64((*seq)[0:k], 0, k)
nthi := poolNTHi.Get().(*NTHi)
nthi.seq = seq
nthi.k = k
nthi.fh = fh
nthi.rh = rh
nthi.currentIdx = 0
nthi.maxIdx = seqLen - (k - 1)
return nthi, nil
}
// Next returns the next ntHash value from an ntHash iterator
func (nthi *NTHi) Next(canonical bool) (uint64, bool) {
// end the iterator if we have got to the maximum index position TODO: this needs to be done in a better way.
if nthi.currentIdx >= nthi.maxIdx {
poolNTHi.Put(nthi)
return 0, false
}
// roll the hash if index>0
if nthi.currentIdx != 0 {
prevBase := (*nthi.seq)[nthi.currentIdx-1]
endBase := (*nthi.seq)[nthi.currentIdx+nthi.k-1]
// alg 3. of ntHash paper
nthi.fh = roL(nthi.fh, 1)
nthi.fh ^= roL(seedTab[prevBase], nthi.k)
nthi.fh ^= seedTab[endBase]
nthi.rh = roR(nthi.rh, 1)
nthi.rh ^= roR(seedTab[prevBase&offset], 1)
nthi.rh ^= roL(seedTab[endBase&offset], nthi.k-1)
}
nthi.currentIdx++
if canonical {
return nthi.getCanonical(), true
}
return nthi.fh, true
}
// Hash returns a channel to range over the canonical ntHash values of a sequence
// canonical is set true to return the canonical k-mers, otherwise the forward hashes are returned
func (nthi *NTHi) Hash(canonical bool) <-chan uint64 {
hashChan := make(chan uint64, bufferSize)
go func() {
defer close(hashChan)
// start the rolling hash
for {
// check that rolling can continue
if nthi.currentIdx >= nthi.maxIdx {
poolNTHi.Put(nthi)
return
}
// start the hashing
if nthi.currentIdx != 0 {
prevBase := (*nthi.seq)[nthi.currentIdx-1]
endBase := (*nthi.seq)[nthi.currentIdx+nthi.k-1]
// alg 3. of ntHash paper
nthi.fh = roL(nthi.fh, 1)
nthi.fh ^= roL(seedTab[prevBase], nthi.k)
nthi.fh ^= seedTab[endBase]
nthi.rh = roR(nthi.rh, 1)
nthi.rh ^= roR(seedTab[prevBase&offset], 1)
nthi.rh ^= roL(seedTab[endBase&offset], nthi.k-1)
}
// calculate and return the canonical ntHash if requested
if canonical {
hashChan <- nthi.getCanonical()
} else {
hashChan <- nthi.fh
}
// increment the index
nthi.currentIdx++
}
}()
return hashChan
}
// MultiHash returns a channel to range over the canonical multi ntHash values of a sequence
// canonical is set true to return the canonical k-mers, otherwise the forward hashes are returned
// numMultiHash sets the number of multi hashes to generate for each k-mer
func (nthi *NTHi) MultiHash(canonical bool, numMultiHash uint) <-chan []uint64 {
hashChan := make(chan []uint64, bufferSize)
go func() {
defer close(hashChan)
// start the rolling hash
for {
// check that rolling can continue
if nthi.currentIdx >= nthi.maxIdx {
poolNTHi.Put(nthi)
return
}
// start the hashing
if nthi.currentIdx != 0 {
prevBase := (*nthi.seq)[nthi.currentIdx-1]
endBase := (*nthi.seq)[nthi.currentIdx+nthi.k-1]
// alg 3. of ntHash paper
nthi.fh = roL(nthi.fh, 1)
nthi.fh ^= roL(seedTab[prevBase], nthi.k)
nthi.fh ^= seedTab[endBase]
nthi.rh = roR(nthi.rh, 1)
nthi.rh ^= roR(seedTab[prevBase&offset], 1)
nthi.rh ^= roL(seedTab[endBase&offset], nthi.k-1)
}
// set up the return slice
multiHashes := make([]uint64, numMultiHash)
if canonical {
multiHashes[0] = nthi.getCanonical()
} else {
multiHashes[0] = nthi.fh
}
for i := uint64(1); i < uint64(numMultiHash); i++ {
tVal := multiHashes[0] * (i ^ uint64(nthi.k)*multiSeed)
tVal ^= tVal >> multiShift
multiHashes[i] = tVal
}
// send the multihashes for this k-mer
hashChan <- multiHashes
// increment the index
nthi.currentIdx++
}
}()
return hashChan
}
// getCanonical returns the canonical hash value currently held by the iterator
func (nthi *NTHi) getCanonical() uint64 {
if nthi.rh < nthi.fh {
return nthi.rh
}
return nthi.fh
}
// roL is a function to bit shift to the left by "n" positions
func roL(v uint64, n uint) uint64 {
if (n & 63) == 0 {
return v
}
return (v << n) | (v >> (64 - n))
}
// roR is a function to bit shift to the right by "n" positions
func roR(v uint64, n uint) uint64 {
if (n & 63) == 0 {
return v
}
return (v >> n) | (v << (64 - n))
}
// ntf64 generates the ntHash for the forward strand of the kmer
func ntf64(seq []byte, i, k uint) uint64 {
var hv uint64
for i < k {
hv = roL(hv, 1)
hv ^= seedTab[seq[i]]
i++
}
return hv
}
// ntr64 generates the ntHash for the reverse strand of the kmer
func ntr64(seq []byte, i, k uint) uint64 {
var hv uint64
for i < k {
hv = roL(hv, 1)
hv ^= seedTab[seq[k-1-i]&offset]
i++
}
return hv
}
// ntc64 generates the canonical ntHash
func ntc64(seq []byte, i, k uint) uint64 {
fh := ntf64(seq, i, k)
rh := ntr64(seq, i, k)
if rh < fh {
return rh
}
return fh
}
// nthash returns the canonical ntHash for each k-mer in a sequence
// it does not use the rolling hash properties of ntHash
func nthash(seq []byte, k int) []uint64 {
hvs := make([]uint64, (len(seq) - (k - 1)))
for i := 0; i <= (len(seq) - k); i++ {
hvs[i] = ntc64(seq[i:i+k], 0, uint(k))
}
return hvs
} | ntHash.go | 0.517815 | 0.420719 | ntHash.go | starcoder |
package qdb
/*
#include <qdb/ts.h>
*/
import "C"
import (
"math"
"time"
"unsafe"
)
// TsDoublePoint : timestamped double data point
type TsDoublePoint struct {
timestamp time.Time
content float64
}
// Timestamp : return data point timestamp
func (t TsDoublePoint) Timestamp() time.Time {
return t.timestamp
}
// Content : return data point content
func (t TsDoublePoint) Content() float64 {
return t.content
}
// NewTsDoublePoint : Create new timeseries double point
func NewTsDoublePoint(timestamp time.Time, value float64) TsDoublePoint {
return TsDoublePoint{timestamp, value}
}
// :: internals
func (t TsDoublePoint) toStructC() C.qdb_ts_double_point {
return C.qdb_ts_double_point{toQdbTimespec(t.timestamp), C.double(t.content)}
}
func (t C.qdb_ts_double_point) toStructG() TsDoublePoint {
return TsDoublePoint{t.timestamp.toStructG(), float64(t.value)}
}
func doublePointArrayToC(pts ...TsDoublePoint) *C.qdb_ts_double_point {
if len(pts) == 0 {
return nil
}
points := make([]C.qdb_ts_double_point, len(pts))
for idx, pt := range pts {
points[idx] = pt.toStructC()
}
return &points[0]
}
func doublePointArrayToSlice(points *C.qdb_ts_double_point, length int) []C.qdb_ts_double_point {
// See https://github.com/mattn/go-sqlite3/issues/238 for details.
return (*[(math.MaxInt32 - 1) / unsafe.Sizeof(C.qdb_ts_double_point{})]C.qdb_ts_double_point)(unsafe.Pointer(points))[:length:length]
}
func doublePointArrayToGo(points *C.qdb_ts_double_point, pointsCount C.qdb_size_t) []TsDoublePoint {
length := int(pointsCount)
output := make([]TsDoublePoint, length)
if length > 0 {
slice := doublePointArrayToSlice(points, length)
for i, s := range slice {
output[i] = s.toStructG()
}
}
return output
}
// TsDoubleColumn : a time series double column
type TsDoubleColumn struct {
tsColumn
}
// DoubleColumn : create a column object
func (entry TimeseriesEntry) DoubleColumn(columnName string) TsDoubleColumn {
return TsDoubleColumn{tsColumn{NewTsColumnInfo(columnName, TsColumnDouble), entry}}
}
// Insert double points into a timeseries
func (column TsDoubleColumn) Insert(points ...TsDoublePoint) error {
alias := convertToCharStar(column.parent.alias)
defer releaseCharStar(alias)
columnName := convertToCharStar(column.name)
defer releaseCharStar(columnName)
contentCount := C.qdb_size_t(len(points))
content := doublePointArrayToC(points...)
err := C.qdb_ts_double_insert(column.parent.handle, alias, columnName, content, contentCount)
return makeErrorOrNil(err)
}
// EraseRanges : erase all points in the specified ranges
func (column TsDoubleColumn) EraseRanges(rgs ...TsRange) (uint64, error) {
alias := convertToCharStar(column.parent.alias)
defer releaseCharStar(alias)
columnName := convertToCharStar(column.name)
defer releaseCharStar(columnName)
ranges := rangeArrayToC(rgs...)
rangesCount := C.qdb_size_t(len(rgs))
erasedCount := C.qdb_uint_t(0)
err := C.qdb_ts_erase_ranges(column.parent.handle, alias, columnName, ranges, rangesCount, &erasedCount)
return uint64(erasedCount), makeErrorOrNil(err)
}
// GetRanges : Retrieves blobs in the specified range of the time series column.
// It is an error to call this function on a non existing time-series.
func (column TsDoubleColumn) GetRanges(rgs ...TsRange) ([]TsDoublePoint, error) {
alias := convertToCharStar(column.parent.alias)
defer releaseCharStar(alias)
columnName := convertToCharStar(column.name)
defer releaseCharStar(columnName)
ranges := rangeArrayToC(rgs...)
rangesCount := C.qdb_size_t(len(rgs))
var points *C.qdb_ts_double_point
var pointsCount C.qdb_size_t
err := C.qdb_ts_double_get_ranges(column.parent.handle, alias, columnName, ranges, rangesCount, &points, &pointsCount)
if err == 0 {
defer column.parent.Release(unsafe.Pointer(points))
return doublePointArrayToGo(points, pointsCount), nil
}
return nil, ErrorType(err)
}
// TsDoubleAggregation : Aggregation of double type
type TsDoubleAggregation struct {
kind TsAggregationType
rng TsRange
count int64
point TsDoublePoint
}
// Type : returns the type of the aggregation
func (t TsDoubleAggregation) Type() TsAggregationType {
return t.kind
}
// Range : returns the range of the aggregation
func (t TsDoubleAggregation) Range() TsRange {
return t.rng
}
// Count : returns the number of points aggregated into the result
func (t TsDoubleAggregation) Count() int64 {
return t.count
}
// Result : result of the aggregation
func (t TsDoubleAggregation) Result() TsDoublePoint {
return t.point
}
// NewDoubleAggregation : Create new timeseries double aggregation
func NewDoubleAggregation(kind TsAggregationType, rng TsRange) *TsDoubleAggregation {
return &TsDoubleAggregation{kind, rng, 0, TsDoublePoint{}}
}
// :: internals
func (t TsDoubleAggregation) toStructC() C.qdb_ts_double_aggregation_t {
var cAgg C.qdb_ts_double_aggregation_t
cAgg._type = C.qdb_ts_aggregation_type_t(t.kind)
cAgg._range = t.rng.toStructC()
cAgg.count = C.qdb_size_t(t.count)
cAgg.result = t.point.toStructC()
return cAgg
}
func (t C.qdb_ts_double_aggregation_t) toStructG() TsDoubleAggregation {
var gAgg TsDoubleAggregation
gAgg.kind = TsAggregationType(t._type)
gAgg.rng = t._range.toStructG()
gAgg.count = int64(t.count)
gAgg.point = t.result.toStructG()
return gAgg
}
func doubleAggregationArrayToC(ags ...*TsDoubleAggregation) *C.qdb_ts_double_aggregation_t {
if len(ags) == 0 {
return nil
}
var doubleAggregations []C.qdb_ts_double_aggregation_t
for _, ag := range ags {
doubleAggregations = append(doubleAggregations, ag.toStructC())
}
return &doubleAggregations[0]
}
func doubleAggregationArrayToSlice(aggregations *C.qdb_ts_double_aggregation_t, length int) []C.qdb_ts_double_aggregation_t {
// See https://github.com/mattn/go-sqlite3/issues/238 for details.
return (*[(math.MaxInt32 - 1) / unsafe.Sizeof(C.qdb_ts_double_aggregation_t{})]C.qdb_ts_double_aggregation_t)(unsafe.Pointer(aggregations))[:length:length]
}
func doubleAggregationArrayToGo(aggregations *C.qdb_ts_double_aggregation_t, aggregationsCount C.qdb_size_t, aggs []*TsDoubleAggregation) []TsDoubleAggregation {
length := int(aggregationsCount)
output := make([]TsDoubleAggregation, length)
if length > 0 {
slice := doubleAggregationArrayToSlice(aggregations, length)
for i, s := range slice {
*aggs[i] = s.toStructG()
output[i] = s.toStructG()
}
}
return output
}
// Aggregate : Aggregate a sub-part of a timeseries from the specified aggregations.
// It is an error to call this function on a non existing time-series.
func (column TsDoubleColumn) Aggregate(aggs ...*TsDoubleAggregation) ([]TsDoubleAggregation, error) {
alias := convertToCharStar(column.parent.alias)
defer releaseCharStar(alias)
columnName := convertToCharStar(column.name)
defer releaseCharStar(columnName)
aggregations := doubleAggregationArrayToC(aggs...)
aggregationsCount := C.qdb_size_t(len(aggs))
var output []TsDoubleAggregation
err := C.qdb_ts_double_aggregate(column.parent.handle, alias, columnName, aggregations, aggregationsCount)
if err == 0 {
output = doubleAggregationArrayToGo(aggregations, aggregationsCount, aggs)
}
return output, makeErrorOrNil(err)
}
// Double : adds a double in row transaction
func (t *TsBulk) Double(value float64) *TsBulk {
if t.err == nil {
t.err = makeErrorOrNil(C.qdb_ts_row_set_double(t.table, C.qdb_size_t(t.index), C.double(value)))
}
t.index++
return t
}
// GetDouble : gets a double in row
func (t *TsBulk) GetDouble() (float64, error) {
var content C.double
err := C.qdb_ts_row_get_double(t.table, C.qdb_size_t(t.index), &content)
t.index++
return float64(content), makeErrorOrNil(err)
}
// RowSetDouble : Set double at specified index in current row
func (t *TsBatch) RowSetDouble(index int64, value float64) error {
valueIndex := C.qdb_size_t(index)
return makeErrorOrNil(C.qdb_ts_batch_row_set_double(t.table, valueIndex, C.double(value)))
} | entry_timeseries_double.go | 0.709221 | 0.459743 | entry_timeseries_double.go | starcoder |
package tegola
import (
"encoding/json"
"fmt"
"io"
)
// Geometry describes a geometry.
type Geometry interface{}
// Point is how a point should look like.
type Point interface {
Geometry
X() float64
Y() float64
}
// Point3 is a point with three dimensions; at current is just converted and treated as a point.
type Point3 interface {
Point
Z() float64
}
// MultiPoint is a Geometry with multiple individual points.
type MultiPoint interface {
Geometry
Points() []Point
}
// LineString is a Geometry of a line.
type LineString interface {
Geometry
Subpoints() []Point
}
// MultiLine is a Geometry with multiple individual lines.
type MultiLine interface {
Geometry
Lines() []LineString
}
// Polygon is a multi-line Geometry where all the lines connect to form an enclose space.
type Polygon interface {
Geometry
Sublines() []LineString
}
// MultiPolygon describes a Geometry multiple intersecting polygons. There should only one
// exterior polygon, and the rest of the polygons should be interior polygons. The interior
// polygons will exclude the area from the exterior polygon.
type MultiPolygon interface {
Geometry
Polygons() []Polygon
}
// Collection is a collections of different geometries.
type Collection interface {
Geometry
Geometries() []Geometry
}
func GeometryAsString(g Geometry) string {
switch geo := g.(type) {
case LineString:
rstring := "["
for _, p := range geo.Subpoints() {
rstring = fmt.Sprintf("%v ( %v %v )", rstring, p.X(), p.Y())
}
rstring += "]"
return rstring
default:
return fmt.Sprintf("%v", g)
}
}
func GeometryAsMap(g Geometry) map[string]interface{} {
js := make(map[string]interface{})
var vals []map[string]interface{}
switch geo := g.(type) {
case Point:
js["type"] = "point"
js["value"] = []float64{geo.X(), geo.Y()}
case Point3:
js["type"] = "point3"
js["value"] = []float64{geo.X(), geo.Y(), geo.Z()}
case MultiPoint:
js["type"] = "multipoint"
for _, p := range geo.Points() {
vals = append(vals, GeometryAsMap(p))
}
js["value"] = vals
case LineString:
js["type"] = "linestring"
var fv []float64
for _, p := range geo.Subpoints() {
fv = append(fv, p.X(), p.Y())
}
js["value"] = fv
case MultiLine:
js["type"] = "multiline"
for _, l := range geo.Lines() {
vals = append(vals, GeometryAsMap(l))
}
js["value"] = vals
case Polygon:
js["type"] = "polygon"
for _, l := range geo.Sublines() {
vals = append(vals, GeometryAsMap(l))
}
js["value"] = vals
case MultiPolygon:
js["type"] = "multipolygon"
for _, p := range geo.Polygons() {
vals = append(vals, GeometryAsMap(p))
}
js["value"] = vals
}
return js
}
func GeometryAsJSON(g Geometry, w io.Writer) error {
enc := json.NewEncoder(w)
return enc.Encode(GeometryAsMap(g))
} | geometry.go | 0.740737 | 0.437163 | geometry.go | starcoder |
package graph
import (
"fmt"
"github.com/DmitryBogomolov/algorithms/graph/internal/utils"
)
// ConnectedComponents is a collection of connected components in a graph.
// Connected component is a set of vertices connected by edges.
type ConnectedComponents struct {
count int
componentIDs []int
}
// Count gets number of connected components.
func (connectedComponents ConnectedComponents) Count() int {
return connectedComponents.count
}
// ComponentID returns component to which vertex belongs.
func (connectedComponents ConnectedComponents) ComponentID(vertexID int) int {
if vertexID < 0 || vertexID > len(connectedComponents.componentIDs)-1 {
panic(fmt.Sprintf("vertex '%d' is out of range", vertexID))
}
return connectedComponents.componentIDs[vertexID]
}
// Connected tells if two vertices are connected.
func (connectedComponents ConnectedComponents) Connected(vertexID1 int, vertexID2 int) bool {
return connectedComponents.ComponentID(vertexID1) == connectedComponents.ComponentID(vertexID2)
}
// Component returns vertices of a connected component.
func (connectedComponents ConnectedComponents) Component(componentID int) []int {
if componentID < 0 || componentID > connectedComponents.count-1 {
panic(fmt.Sprintf("component '%d' is out of range", componentID))
}
var vertices []int
for vertexID := 0; vertexID < len(connectedComponents.componentIDs); vertexID++ {
if connectedComponents.componentIDs[vertexID] == componentID {
vertices = append(vertices, vertexID)
}
}
return vertices
}
// NewConnectedComponents creates instance.
func NewConnectedComponents(count int, componentIDs []int) ConnectedComponents {
return ConnectedComponents{count: count, componentIDs: componentIDs}
}
func findConnectedComponentsCore(
gr Graph, marked []bool, componentCount *int, componentIDs []int,
vertexID int,
) {
marked[vertexID] = true
componentIDs[vertexID] = *componentCount
for _, adjacentVertexID := range gr.AdjacentVertices(vertexID) {
if !marked[adjacentVertexID] {
findConnectedComponentsCore(gr, marked, componentCount, componentIDs, adjacentVertexID)
}
}
}
// FindConnectedComponents returns connected components in a graph.
// https://algs4.cs.princeton.edu/41graph/CC.java.html
func FindConnectedComponents(gr Graph) ConnectedComponents {
componentCount := 0
componentIDs := make([]int, gr.NumVertices())
utils.ResetList(componentIDs)
marked := make([]bool, gr.NumVertices())
for vertexID := 0; vertexID < gr.NumVertices(); vertexID++ {
if !marked[vertexID] {
findConnectedComponentsCore(gr, marked, &componentCount, componentIDs, vertexID)
componentCount++
}
}
return NewConnectedComponents(componentCount, componentIDs)
} | graph/graph/connected_components.go | 0.774583 | 0.445107 | connected_components.go | starcoder |
package bitslice
import (
"sort"
)
type BitSlice []int
func (nums *BitSlice) tidyRange(l, r int) (int, int) {
if l < 0 {
l = 0
}
if r < 0 {
n := len(*nums)
r = (n + r % n) % n
}
return l, r
}
// ConvertToBitSlice creates a BitSlice from a normal slice.
// Note that the bitSlice shares memory with the original slice, and is therefore a mutable method, but also modifies the original slice.
// If used in an immutable scenario, a copied array would be passed instead.
func ConvertToBitSlice(nums []int) BitSlice {
sort.Ints(nums)
return BitSlice(nums)
}
// Search returns the index of the given value, -1 if not found, and the time complexity is O(lgn).
func (nums BitSlice) Search(v int, l, r int) int {
l, r = nums.tidyRange(l, r)
for l <= r {
m := l + (r-l) >> 2
val := nums[m]
if val == v {
return m
} else if val > v {
r = m - 1
} else {
l = m + 1
}
}
return -1
}
// BitSectLeft searches for and returns the insertion position of the given value, ensuring that the BitSect is still ordered after the insertion.
// Inserting from this position guarantees that the bitSect is still ordered after the insertion.
// If the same value is already present in the BitSect, the FIRST insertion position is returned.
func (nums BitSlice) BitSectLeft(v int, l, r int) int {
l, r = nums.tidyRange(l, r)
for l < r {
m := l + (r-l) >> 1
vMid := nums[m]
if v <= vMid {
r = m
} else {
l = m + 1
}
}
return l
}
// BitSectRight searches for and returns the insertion position of the given value, ensuring that the BitSect is still ordered after the insertion.
// Inserting from this position guarantees that the bitSect is still ordered after the insertion.
// If the same value is already present in the BitSect, the LAST insertion position is returned.
func (nums BitSlice) BitSectRight(v int, l, r int) int {
l, r = nums.tidyRange(l, r)
for l < r {
m := l + (r-l+1) >> 1
vMid := nums[m]
if v >= vMid {
l = m
} else {
r = m - 1
}
}
return l + 1
} | bitslice/bitslice.go | 0.681409 | 0.479808 | bitslice.go | starcoder |
package version
func license_cc0_v1() string {
return `
CC0 1.0 Universal
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator and
subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for the
purpose of contributing to a commons of creative, cultural and scientific
works ("Commons") that the public can reliably and without fear of later
claims of infringement build upon, modify, incorporate in other works, reuse
and redistribute as freely as possible in any form whatsoever and for any
purposes, including without limitation commercial purposes. These owners may
contribute to the Commons to promote the ideal of a free culture and the
further production of creative, cultural and scientific works, or to gain
reputation or greater distribution for their Work in part through the use and
efforts of others.
For these and/or other purposes and motivations, and without any expectation
of additional consideration or compensation, the person associating CC0 with a
Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
and publicly distribute the Work under its terms, with knowledge of his or her
Copyright and Related Rights in the Work and the meaning and intended legal
effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not limited
to, the following:
i. the right to reproduce, adapt, distribute, perform, display, communicate,
and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or likeness
depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data in
a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation thereof,
including any amended or successor version of such directive); and
vii. other similar, equivalent or corresponding rights throughout the world
based on applicable law or treaty, and any national implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention of,
applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
and Related Rights and associated claims and causes of action, whether now
known or unknown (including existing as well as future claims and causes of
action), in the Work (i) in all territories worldwide, (ii) for the maximum
duration provided by applicable law or treaty (including future time
extensions), (iii) in any current or future medium and for any number of
copies, and (iv) for any purpose whatsoever, including without limitation
commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
the Waiver for the benefit of each member of the public at large and to the
detriment of Affirmer's heirs and successors, fully intending that such Waiver
shall not be subject to revocation, rescission, cancellation, termination, or
any other legal or equitable action to disrupt the quiet enjoyment of the Work
by the public as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason be
judged legally invalid or ineffective under applicable law, then the Waiver
shall be preserved to the maximum extent permitted taking into account
Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
is so judged Affirmer hereby grants to each affected person a royalty-free,
non transferable, non sublicensable, non exclusive, irrevocable and
unconditional license to exercise Affirmer's Copyright and Related Rights in
the Work (i) in all territories worldwide, (ii) for the maximum duration
provided by applicable law or treaty (including future time extensions), (iii)
in any current or future medium and for any number of copies, and (iv) for any
purpose whatsoever, including without limitation commercial, advertising or
promotional purposes (the "License"). The License shall be deemed effective as
of the date CC0 was applied by Affirmer to the Work. Should any part of the
License for any reason be judged legally invalid or ineffective under
applicable law, such partial invalidity or ineffectiveness shall not
invalidate the remainder of the License, and in such case Affirmer hereby
affirms that he or she will not (i) exercise any of his or her remaining
Copyright and Related Rights in the Work or (ii) assert any associated claims
and causes of action with respect to the Work, in either case contrary to
Affirmer's express Statement of Purpose.
4. Limitations and Disclaimers.
a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or warranties
of any kind concerning the Work, express, implied, statutory or otherwise,
including without limitation warranties of title, merchantability, fitness
for a particular purpose, non infringement, or the absence of latent or
other defects, accuracy, or the present or absence of errors, whether or not
discoverable, all to the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without limitation
any person's Copyright and Related Rights in the Work. Further, Affirmer
disclaims responsibility for obtaining any necessary consents, permissions
or other rights required for any use of the Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to this
CC0 or use of the Work.
For more information, please see
<http://creativecommons.org/publicdomain/zero/1.0/>
`
} | version/license_cc0-v1.go | 0.613005 | 0.632559 | license_cc0-v1.go | starcoder |
package diff
// PatienceDiffer generates diffs using the Patience Diff algorithm. This:
// 1. Removes matching lines from the start and end of a file
// 2. Computes the LCS for lines that occur uniquely in both sequences
// 3. Do step 1 for the sections in between.
// It's described in http://bramcohen.livejournal.com/73318.html
type PatienceDiffer struct{}
type card struct {
leftidx, rightidx int
back *card
}
// TODO: binary search
func findpile(piles []*card, rightidx int) int {
for i := range piles {
if piles[i].rightidx > rightidx {
return i
}
}
return len(piles)
}
func computelcs(left, right Sequence, leftmin, leftmax, rightmin, rightmax int) [][2]int {
// These maps store the line number if the hash is uniq, else -1.
leftuniq := make(map[uint64]int)
rightuniq := make(map[uint64]int)
for i := leftmin; i < leftmax; i++ {
fp := left.Fingerprint(i)
if _, ok := leftuniq[fp]; ok {
leftuniq[fp] = -1
} else {
leftuniq[fp] = i
}
}
for i := rightmin; i < rightmax; i++ {
fp := right.Fingerprint(i)
if _, ok := rightuniq[fp]; ok {
rightuniq[fp] = -1
} else {
rightuniq[fp] = i
}
}
var piles []*card
for i := leftmin; i < leftmax; i++ {
fp := left.Fingerprint(i)
leftidx, ok := leftuniq[fp]
if !ok || leftidx == -1 {
continue
}
rightidx, ok := rightuniq[fp]
if !ok || rightidx == -1 {
continue
}
// We've found a line that occurs uniquely in both sequences.
pileidx := findpile(piles, rightidx)
if pileidx == len(piles) {
piles = append(piles, nil)
}
var prev *card
if pileidx > 0 {
prev = piles[pileidx-1]
}
piles[pileidx] = &card{leftidx, rightidx, prev}
}
if len(piles) == 0 {
// We had no lines.
return nil
}
result := make([][2]int, len(piles))
for i, card := 0, piles[len(piles)-1]; card != nil; i, card = i+1, card.back {
result[len(piles)-i-1] = [2]int{card.leftidx, card.rightidx}
}
return result
}
func patience(dolcs bool, left, right Sequence, leftmin, leftmax, rightmin, rightmax int, result *[]Edit) {
var i int
// Match the starts of the sequences, writing the edit into the result
for i = 0; i < leftmax-leftmin && i < rightmax-rightmin; i++ {
if left.Fingerprint(leftmin+i) != right.Fingerprint(rightmin+i) {
break
}
}
if i > 0 {
*result = append(*result, Edit{i, i})
}
leftmin, rightmin = leftmin+i, rightmin+i
// Match the ends of the sequences, storing the number of matched lines
// so we can add them to the result at the end.
for i = 0; i < leftmax-leftmin && i < rightmax-rightmin; i++ {
if left.Fingerprint(leftmax-i-1) != right.Fingerprint(rightmax-i-1) {
break
}
}
tailMatched := i
leftmax, rightmax = leftmax-i, rightmax-i
if dolcs {
lcs := computelcs(left, right, leftmin, leftmax, rightmin, rightmax)
for _, line := range lcs {
patience(false, left, right, leftmin, line[0], rightmin, line[1], result)
*result = append(*result, Edit{1, 1})
leftmin, rightmin = line[0]+1, line[1]+1
}
}
if leftmax > leftmin {
*result = append(*result, Edit{leftmax - leftmin, 0})
}
if rightmax > rightmin {
*result = append(*result, Edit{0, rightmax - rightmin})
}
if tailMatched > 0 {
*result = append(*result, Edit{tailMatched, tailMatched})
}
}
// Diff diffs left and right, using Bram Cohen's "patience" diffing algorithm.
func (PatienceDiffer) Diff(left, right Sequence) []Edit {
var result []Edit
patience(true, left, right, 0, left.Length(), 0, right.Length(), &result)
return result
} | patience.go | 0.521959 | 0.540075 | patience.go | starcoder |
package noise
type ImplicitFractalNormalized struct {
source ImplicitBase
/*
Octaves is the number of iterations, or the depth of the fractal. The more octaves, the better quality, but performance suffers. Keep this number as small as you can.
Frequency determines the wavelength of your noise. A low frequency means a few wide hills, and a high frequency means many skinny hills. Each successive octave doubles the frequency, which is what gives us the 4 hills on top of 1 in the above example.
Persistence determines how much each successive octave affects the end result. If it's 1.0, then every octave holds the same weight. If it's 0.0, then only the first octave does anything. At 0.5, each successive octave applies half as much weight to the end product. A good value is typically in the range of 0.8, depending on what you are trying to make.
*/
octaves int64
frequency float64
persistence float64
}
func NewImplicitFractalNormalized(source ImplicitBase, octaves int64, frequency, persistence float64) *ImplicitFractalNormalized {
return &ImplicitFractalNormalized{
source: source,
octaves: octaves,
frequency: frequency,
persistence: persistence,
}
}
func (implicitFractal *ImplicitFractalNormalized) execute(fn func(frequency float64) float64) float64 {
// Total value so far
total := 0.0
// Accumulates highest theoretical amplitude
maxAmplitude := 0.0
amplitude := 1.0
frequency := implicitFractal.frequency
for i := int64(0); i < implicitFractal.octaves; i++ {
// Get the noise sample
total += fn(frequency) * amplitude
// Make the wavelength twice as small
frequency *= 2.0
// Add to our maximum possible amplitude
maxAmplitude += amplitude
// Reduce amplitude according to persistence for the next octave
amplitude *= implicitFractal.persistence
}
// Scale the result by the maximum amplitude
return total / maxAmplitude
}
func (implicitFractal *ImplicitFractalNormalized) Get2D(x, y float64) float64 {
return implicitFractal.execute(func(frequency float64) float64 {
return implicitFractal.source.Get2D(x*frequency, y*frequency)
})
}
func (implicitFractal *ImplicitFractalNormalized) Get3D(x, y, z float64) float64 {
return implicitFractal.execute(func(frequency float64) float64 {
return implicitFractal.source.Get3D(x*frequency, y*frequency, z*frequency)
})
}
func (implicitFractal *ImplicitFractalNormalized) Get4D(x, y, z, w float64) float64 {
return implicitFractal.execute(func(frequency float64) float64 {
return implicitFractal.source.Get4D(x*frequency, y*frequency, z*frequency, w*frequency)
})
} | server/game/universe/generator/texture/noise/implicit-fractal-normalized.go | 0.8474 | 0.767254 | implicit-fractal-normalized.go | starcoder |
package interpret
import (
"strconv"
"github.com/cdkini/Okra/src/interpreter/ast"
"github.com/cdkini/Okra/src/okraerr"
)
// interpretExpr is a helper function used to interpret Expr attributes of Stmt instances and evaluating them
// into returnable values. The method determines which interpret method to use at runtime based on Expr type.
func (i *Interpreter) interpretExpr(expr ast.Expr) interface{} {
switch t := expr.(type) {
case *ast.AssignmentExpr:
return i.interpretAssignmentExpr(t)
case *ast.BinaryExpr:
return i.interpretBinaryExpr(t)
case *ast.CallExpr:
return i.interpretCallExpr(t)
case *ast.GetExpr:
return i.interpretGetExpr(t)
case *ast.GroupingExpr:
return i.interpretGroupingExpr(t)
case *ast.LiteralExpr:
return i.interpretLiteralExpr(t)
case *ast.LogicalExpr:
return i.interpretLogicalExpr(t)
case *ast.SetExpr:
return i.interpretSetExpr(t)
case *ast.ThisExpr:
return i.interpretThisExpr(t)
case *ast.UnaryExpr:
return i.interpretUnaryExpr(t)
case *ast.VariableExpr:
return i.interpretVariableExpr(t)
default:
return nil
}
}
func (i *Interpreter) interpretAssignmentExpr(a *ast.AssignmentExpr) interface{} {
value := i.interpretExpr(a.Val)
i.env.Assign(a.Identifier, value)
return value
}
func (i *Interpreter) interpretBinaryExpr(b *ast.BinaryExpr) interface{} {
leftOperand := i.interpretExpr(b.LeftOperand)
rightOperand := i.interpretExpr(b.RightOperand)
switch b.Operator.Type {
case ast.Minus:
checkNumericValidity("Invalid usage of \"-\" on non-numeric operands", leftOperand, rightOperand)
return evalNumeric(leftOperand) - evalNumeric(rightOperand)
case ast.Plus:
checkNumericValidity("Invalid usage of \"+\" on non-numeric operands", leftOperand, rightOperand)
return evalNumeric(leftOperand) + evalNumeric(rightOperand)
case ast.Slash:
checkNumericValidity("Invalid usage of \"/\" on non-numeric operands", leftOperand, rightOperand)
return evalNumeric(leftOperand) / evalNumeric(rightOperand)
case ast.Star:
checkNumericValidity("Invalid usage of \"*\" on non-numeric operands", leftOperand, rightOperand)
return evalNumeric(leftOperand) * evalNumeric(rightOperand)
case ast.Greater:
checkNumericValidity("Invalid usage of \">\" on non-numeric operands", leftOperand, rightOperand)
return evalNumeric(leftOperand) > evalNumeric(rightOperand)
case ast.Less:
checkNumericValidity("Invalid usage of \"<\" on non-numeric operands", leftOperand, rightOperand)
return evalNumeric(leftOperand) < evalNumeric(rightOperand)
case ast.GreaterEqual:
checkNumericValidity("Invalid usage of \">=\" on non-numeric operands", leftOperand, rightOperand)
return evalNumeric(leftOperand) >= evalNumeric(rightOperand)
case ast.LessEqual:
checkNumericValidity("Invalid usage of \"<=\" on non-numeric operands", leftOperand, rightOperand)
return evalNumeric(leftOperand) <= evalNumeric(rightOperand)
case ast.Equal:
return leftOperand == rightOperand
case ast.BangEqual:
return leftOperand != rightOperand
}
return nil
}
func (i *Interpreter) interpretCallExpr(c *ast.CallExpr) interface{} {
callee := i.interpretExpr(c.Callee)
var args []interface{}
for _, arg := range c.Args {
args = append(args, i.interpretExpr(arg))
}
if function, ok := callee.(Callable); ok {
if len(args) != function.Arity() {
okraerr.ReportErr(0, 0, "Expected "+strconv.Itoa(function.Arity())+" args but got "+strconv.Itoa(len(args))+".")
}
return function.Call(i, args)
}
okraerr.ReportErr(0, 0, "Can only call funcs and structs.")
return nil
}
func (i *Interpreter) interpretLiteralExpr(l *ast.LiteralExpr) interface{} {
if str, ok := l.Val.(string); ok {
return str
} else if num, ok := l.Val.(float64); ok {
return num
} else if boolean, ok := l.Val.(bool); ok {
return boolean
}
return l.Val
}
func (i *Interpreter) interpretLogicalExpr(l *ast.LogicalExpr) interface{} {
left := i.interpretExpr(l.LeftOperand)
switch l.Operator.Type {
case ast.Or:
if isTruthy(left) {
return left
}
case ast.And:
if !isTruthy(left) {
return left
}
}
return i.interpretExpr(l.RightOperand)
}
func (i *Interpreter) interpretGetExpr(g *ast.GetExpr) interface{} {
object := i.interpretExpr(g.Object)
if instance, ok := object.(*Instance); ok {
return instance.get(g.Property)
}
okraerr.ReportErr(0, 0, "Only struct instances have properties.")
return nil
}
func (i *Interpreter) interpretGroupingExpr(g *ast.GroupingExpr) interface{} {
return i.interpretExpr(g.Expression)
}
func (i *Interpreter) interpretSetExpr(s *ast.SetExpr) interface{} {
object := i.interpretExpr(s.Object)
if instance, ok := object.(*Instance); !ok {
okraerr.ReportErr(0, 0, "Only struct instances have properties.")
} else {
val := i.interpretStmt(s.Val)
instance.set(s.Property, val)
return val
}
return nil
}
func (i *Interpreter) interpretThisExpr(t *ast.ThisExpr) interface{} {
// FIXME: Not currently working; open to check and write tests
return i.env.Get(t.Keyword)
}
func (i *Interpreter) interpretUnaryExpr(u *ast.UnaryExpr) interface{} {
operand := i.interpretExpr(u.Operand)
switch u.Operator.Type {
case ast.Minus:
checkNumericValidity("Invalid usage of \"-\" on non-numeric operand", operand)
return -evalNumeric(operand)
case ast.Bang:
return !isTruthy(operand)
}
return nil
}
func (i *Interpreter) interpretVariableExpr(v *ast.VariableExpr) interface{} {
return i.env.Get(v.Identifier)
} | src/interpreter/interpret/interpreter_expr.go | 0.527317 | 0.612165 | interpreter_expr.go | starcoder |
package dot
import (
"fmt"
"github.com/gonum/graph"
"github.com/gonum/graph/formats/dot"
"github.com/gonum/graph/formats/dot/ast"
"golang.org/x/tools/container/intsets"
)
// Builder is a graph that can have user-defined nodes and edges added.
type Builder interface {
graph.Graph
graph.Builder
// NewNode adds a new node with a unique node ID to the graph.
NewNode() graph.Node
// NewEdge adds a new edge from the source to the destination node to the
// graph, or returns the existing edge if already present.
NewEdge(from, to graph.Node) graph.Edge
}
// UnmarshalerAttr is the interface implemented by objects that can unmarshal a
// DOT attribute description of themselves.
type UnmarshalerAttr interface {
// UnmarshalDOTAttr decodes a single DOT attribute.
UnmarshalDOTAttr(attr Attribute) error
}
// Unmarshal parses the Graphviz DOT-encoded data and stores the result in dst.
func Unmarshal(data []byte, dst Builder) error {
file, err := dot.ParseBytes(data)
if err != nil {
return err
}
if len(file.Graphs) != 1 {
return fmt.Errorf("invalid number of graphs; expected 1, got %d", len(file.Graphs))
}
return copyGraph(dst, file.Graphs[0])
}
// copyGraph copies the nodes and edges from the Graphviz AST source graph to
// the destination graph. Edge direction is maintained if present.
func copyGraph(dst Builder, src *ast.Graph) (err error) {
defer func() {
switch e := recover().(type) {
case nil:
case error:
err = e
default:
panic(e)
}
}()
gen := &generator{
directed: src.Directed,
ids: make(map[string]graph.Node),
}
for _, stmt := range src.Stmts {
gen.addStmt(dst, stmt)
}
return err
}
// A generator keeps track of the information required for generating a gonum
// graph from a dot AST graph.
type generator struct {
// Directed graph.
directed bool
// Map from dot AST node ID to gonum node.
ids map[string]graph.Node
// Nodes processed within the context of a subgraph, that is to be used as a
// vertex of an edge.
subNodes []graph.Node
// Stack of start indices into the subgraph node slice. The top element
// corresponds to the start index of the active (or inner-most) subgraph.
subStart []int
}
// node returns the gonum node corresponding to the given dot AST node ID,
// generating a new such node if none exist.
func (gen *generator) node(dst Builder, id string) graph.Node {
if n, ok := gen.ids[id]; ok {
return n
}
n := dst.NewNode()
gen.ids[id] = n
// Check if within the context of a subgraph, that is to be used as a vertex
// of an edge.
if gen.isInSubgraph() {
// Append node processed within the context of a subgraph, that is to be
// used as a vertex of an edge
gen.appendSubgraphNode(n)
}
return n
}
// addStmt adds the given statement to the graph.
func (gen *generator) addStmt(dst Builder, stmt ast.Stmt) {
switch stmt := stmt.(type) {
case *ast.NodeStmt:
n := gen.node(dst, stmt.Node.ID)
if n, ok := n.(UnmarshalerAttr); ok {
for _, attr := range stmt.Attrs {
a := Attribute{
Key: attr.Key,
Value: attr.Val,
}
if err := n.UnmarshalDOTAttr(a); err != nil {
panic(fmt.Errorf("unable to unmarshal node DOT attribute (%s=%s)", a.Key, a.Value))
}
}
}
case *ast.EdgeStmt:
gen.addEdgeStmt(dst, stmt)
case *ast.AttrStmt:
// ignore.
case *ast.Attr:
// ignore.
case *ast.Subgraph:
for _, stmt := range stmt.Stmts {
gen.addStmt(dst, stmt)
}
default:
panic(fmt.Sprintf("unknown statement type %T", stmt))
}
}
// addEdgeStmt adds the given edge statement to the graph.
func (gen *generator) addEdgeStmt(dst Builder, e *ast.EdgeStmt) {
fs := gen.addVertex(dst, e.From)
ts := gen.addEdge(dst, e.To)
for _, f := range fs {
for _, t := range ts {
edge := dst.NewEdge(f, t)
if edge, ok := edge.(UnmarshalerAttr); ok {
for _, attr := range e.Attrs {
a := Attribute{
Key: attr.Key,
Value: attr.Val,
}
if err := edge.UnmarshalDOTAttr(a); err != nil {
panic(fmt.Errorf("unable to unmarshal edge DOT attribute (%s=%s)", a.Key, a.Value))
}
}
}
}
}
}
// addVertex adds the given vertex to the graph, and returns its set of nodes.
func (gen *generator) addVertex(dst Builder, v ast.Vertex) []graph.Node {
switch v := v.(type) {
case *ast.Node:
n := gen.node(dst, v.ID)
return []graph.Node{n}
case *ast.Subgraph:
gen.pushSubgraph()
for _, stmt := range v.Stmts {
gen.addStmt(dst, stmt)
}
return gen.popSubgraph()
default:
panic(fmt.Sprintf("unknown vertex type %T", v))
}
}
// addEdge adds the given edge to the graph, and returns its set of nodes.
func (gen *generator) addEdge(dst Builder, to *ast.Edge) []graph.Node {
if !gen.directed && to.Directed {
panic(fmt.Errorf("directed edge to %v in undirected graph", to.Vertex))
}
fs := gen.addVertex(dst, to.Vertex)
if to.To != nil {
ts := gen.addEdge(dst, to.To)
for _, f := range fs {
for _, t := range ts {
dst.NewEdge(f, t)
}
}
}
return fs
}
// pushSubgraph pushes the node start index of the active subgraph onto the
// stack.
func (gen *generator) pushSubgraph() {
gen.subStart = append(gen.subStart, len(gen.subNodes))
}
// popSubgraph pops the node start index of the active subgraph from the stack,
// and returns the nodes processed since.
func (gen *generator) popSubgraph() []graph.Node {
// Get nodes processed since the subgraph became active.
start := gen.subStart[len(gen.subStart)-1]
// TODO: Figure out a better way to store subgraph nodes, so that duplicates
// may not occur.
nodes := unique(gen.subNodes[start:])
// Remove subgraph from stack.
gen.subStart = gen.subStart[:len(gen.subStart)-1]
if len(gen.subStart) == 0 {
// Remove subgraph nodes when the bottom-most subgraph has been processed.
gen.subNodes = gen.subNodes[:0]
}
return nodes
}
// unique returns the set of unique nodes contained within ns.
func unique(ns []graph.Node) []graph.Node {
var nodes []graph.Node
var set intsets.Sparse
for _, n := range ns {
id := n.ID()
if set.Has(id) {
// skip duplicate node
continue
}
set.Insert(id)
nodes = append(nodes, n)
}
return nodes
}
// isInSubgraph reports whether the active context is within a subgraph, that is
// to be used as a vertex of an edge.
func (gen *generator) isInSubgraph() bool {
return len(gen.subStart) > 0
}
// appendSubgraphNode appends the given node to the slice of nodes processed
// within the context of a subgraph.
func (gen *generator) appendSubgraphNode(n graph.Node) {
gen.subNodes = append(gen.subNodes, n)
} | vendor/github.com/gonum/graph/encoding/dot/decode.go | 0.702836 | 0.40987 | decode.go | starcoder |
package quadedge
import (
"errors"
"fmt"
"log"
"github.com/go-spatial/geom"
"github.com/go-spatial/geom/planar"
)
var ErrLocateFailure = errors.New("failure locating edge")
/*
QuadEdgeSubdivision is a class that contains the QuadEdges representing a
planar subdivision that models a triangulation. The subdivision is constructed
using the quadedge algebra defined in the class QuadEdge. All metric
calculations are done in the Vertex class. In addition to a triangulation,
subdivisions support extraction of Voronoi diagrams. This is easily
accomplished, since the Voronoi diagram is the dual of the Delaunay
triangulation.
Subdivisions can be provided with a tolerance value. Inserted vertices which
are closer than this value to vertices already in the subdivision will be
ignored. Using a suitable tolerance value can prevent robustness failures
from happening during Delaunay triangulation.
Subdivisions maintain a frame triangle around the client-created
edges. The frame is used to provide a bounded "container" for all edges
within a TIN. Normally the frame edges, frame connecting edges, and frame
triangles are not included in client processing.
Author <NAME>
Author <NAME>
Ported to Go by <NAME>
*/
type QuadEdgeSubdivision struct {
// used for edge extraction to ensure edge uniqueness
visitedKey int
quadEdges []*QuadEdge
startingEdge *QuadEdge
tolerance float64
edgeCoincidenceTolerance float64
frameVertex [3]Vertex
frameEnv geom.Extent
locator QuadEdgeLocator
}
var EDGE_COINCIDENCE_TOL_FACTOR float64 = 1000
// /**
// * Gets the edges for the triangle to the left of the given {@link QuadEdge}.
// *
// * @param startQE
// * @param triEdge
// *
// * @throws IllegalArgumentException
// * if the edges do not form a triangle
// */
// public static void getTriangleEdges(QuadEdge startQE, QuadEdge[] triEdge) {
// triEdge[0] = startQE;
// triEdge[1] = triEdge[0].lNext();
// triEdge[2] = triEdge[1].lNext();
// if (triEdge[2].lNext() != triEdge[0])
// throw new IllegalArgumentException("Edges do not form a triangle");
// }
/*
NewQuadEdgeSubdivision creates a new instance of a quad-edge subdivision based
on a frame triangle that encloses a supplied bounding box. A new
super-bounding box that contains the triangle is computed and stored.
env - the bounding box to surround
tolerance - the tolerance value for determining if two sites are equal
*/
func NewQuadEdgeSubdivision(env geom.Extent, tolerance float64) *QuadEdgeSubdivision {
var qes QuadEdgeSubdivision
qes.tolerance = tolerance
qes.edgeCoincidenceTolerance = tolerance / EDGE_COINCIDENCE_TOL_FACTOR
qes.createFrame(env)
qes.startingEdge = qes.initSubdiv()
qes.locator = NewLastFoundQuadEdgeLocator(&qes)
return &qes
}
/*
createFrame creates the frame of a triangulation around the given extent.
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) createFrame(env geom.Extent) {
deltaX := env.XSpan()
deltaY := env.YSpan()
offset := 0.0
if deltaX > deltaY {
offset = deltaX * 10.0
} else {
offset = deltaY * 10.0
}
qes.frameVertex[0] = Vertex{(env.MaxX() + env.MinX()) / 2.0, env.MaxY() + offset}
qes.frameVertex[1] = Vertex{env.MinX() - offset, env.MinY() - offset}
qes.frameVertex[2] = Vertex{env.MaxX() + offset, env.MinY() - offset}
qes.frameEnv = *geom.NewExtent(qes.frameVertex[0], qes.frameVertex[1], qes.frameVertex[2])
}
/*
initSubdiv initializes a subdivision from the frame.
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) initSubdiv() *QuadEdge {
// build initial subdivision from frame
ea := qes.MakeEdge(qes.frameVertex[0], qes.frameVertex[1])
eb := qes.MakeEdge(qes.frameVertex[1], qes.frameVertex[2])
Splice(ea.Sym(), eb)
ec := qes.MakeEdge(qes.frameVertex[2], qes.frameVertex[0])
Splice(eb.Sym(), ec)
Splice(ec.Sym(), ea)
return ea
}
/*
GetTolerance gets the vertex-equality tolerance value used in this subdivision
return the tolerance value
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) GetTolerance() float64 {
return qes.tolerance
}
/*
GetEnvelope gets the envelope of the Subdivision (including the frame).
Return the envelope
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) GetEnvelope() geom.Extent {
// returns a deep copy to avoid modification by caller
return qes.frameEnv.Extent()
}
/*
GetEdges gets the collection of base {@link QuadEdge}s (one for every pair of
vertices which is connected).
return a collection of QuadEdges
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) GetEdges() []*QuadEdge {
return qes.quadEdges
}
// /**
// * Sets the {@link QuadEdgeLocator} to use for locating containing triangles
// * in this subdivision.
// *
// * @param locator
// * a QuadEdgeLocator
// */
// public void setLocator(QuadEdgeLocator locator) {
// this.locator = locator;
// }
/*
MakeEdge creates a new quadedge, recording it in the edges list.
return a new quadedge
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) MakeEdge(o Vertex, d Vertex) *QuadEdge {
q := MakeEdge(o, d)
qes.quadEdges = append(qes.quadEdges, q)
return q
}
/*
Connect creates a new QuadEdge connecting the destination of a to the origin
of b, in such a way that all three have the same left face after the connection
is complete. The quadedge is recorded in the edges list.
Return a quadedge
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) Connect(a *QuadEdge, b *QuadEdge) *QuadEdge {
q := Connect(a, b)
qes.quadEdges = append(qes.quadEdges, q)
return q
}
/*
Delete a quadedge from the subdivision. Linked quadedges are updated to
reflect the deletion.
e - the quadedge to delete
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) Delete(e *QuadEdge) {
Splice(e, e.OPrev())
Splice(e.Sym(), e.Sym().OPrev())
eSym := e.Sym()
eRot := e.Rot()
eRotSym := e.Rot().Sym()
e.Delete()
eSym.Delete()
eRot.Delete()
eRotSym.Delete()
// this is inefficient on an array, but this method should be called
// infrequently
newArray := make([]*QuadEdge, 0, len(qes.quadEdges))
for _, ele := range qes.quadEdges {
if ele.IsLive() {
newArray = append(newArray, ele)
if ele.next.IsLive() == false {
log.Fatalf("a dead edge is still linked: %v", ele)
}
}
}
qes.quadEdges = newArray
if qes.startingEdge.IsLive() == false {
if len(qes.quadEdges) > 0 {
qes.startingEdge = qes.quadEdges[0]
} else {
qes.startingEdge = nil
}
}
}
/*
LocateFromEdge locates an edge of a triangle which contains a location
specified by a Vertex v. The edge returned has the property that either v is
on e, or e is an edge of a triangle containing v. The search starts from
startEdge amd proceeds on the general direction of v.
This locate algorithm relies on the subdivision being Delaunay. For
non-Delaunay subdivisions, this may loop for ever.
v - the location to search for
startEdge - an edge of the subdivision to start searching at
return a QuadEdge which contains v, or is on the edge of a triangle containing
v
If the location algorithm fails to converge in a reasonable number of
iterations a ErrLocateFailure will be returned.
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) LocateFromEdge(v Vertex, startEdge *QuadEdge) (*QuadEdge, error) {
iter := 0
maxIter := len(qes.quadEdges)
e := startEdge
for {
iter++
/*
So far it has always been the case that failure to locate indicates an
invalid subdivision. So just fail completely. (An alternative would be
to perform an exhaustive search for the containing triangle, but this
would mask errors in the subdivision topology)
This can also happen if two vertices are located very close together,
since the orientation predicates may experience precision failures.
*/
if iter > maxIter {
return nil, ErrLocateFailure
}
if v.Equals(e.Orig()) || v.Equals(e.Dest()) {
break
} else if v.RightOf(*e) {
e = e.Sym()
} else if !v.RightOf(*e.ONext()) {
e = e.ONext()
} else if !v.RightOf(*e.DPrev()) {
e = e.DPrev()
} else {
// on edge or in triangle containing edge
break
}
}
// System.out.println("Locate count: " + iter);
return e, nil
}
/*
Locate Finds a quadedge of a triangle containing a location specified by a Vertex, if one exists.
v - the vertex to locate
Return a quadedge on the edge of a triangle which touches or contains the
location or nil if no such triangle exists
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) Locate(v Vertex) (*QuadEdge, error) {
return qes.locator.Locate(v)
}
/*
LocateSegment locates the edge between the given vertices, if it exists in the
subdivision.
p0 a coordinate
p1 another coordinate
Return the edge joining the coordinates, if present or null if no such edge
exists
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) LocateSegment(p0 Vertex, p1 Vertex) (*QuadEdge, error) {
// find an edge containing one of the points
e, err := qes.locator.Locate(p0)
if err != nil || e == nil {
return nil, err
}
// normalize so that p0 is origin of base edge
base := e
if e.Dest().EqualsTolerance(p0, qes.tolerance) {
base = e.Sym()
}
// check all edges around origin of base edge
locEdge := base
done := false
for !done {
if locEdge.Dest().EqualsTolerance(p1, qes.tolerance) {
return locEdge, nil
}
locEdge = locEdge.ONext()
if locEdge == base {
done = true
}
}
return nil, nil
}
/**
* Inserts a new site into the Subdivision, connecting it to the vertices of
* the containing triangle (or quadrilateral, if the split point falls on an
* existing edge).
* <p>
* This method does NOT maintain the Delaunay condition. If desired, this must
* be checked and enforced by the caller.
* <p>
* This method does NOT check if the inserted vertex falls on an edge. This
* must be checked by the caller, since this situation may cause erroneous
* triangulation
*
* @param v
* the vertex to insert
* @return a new quad edge terminating in v
*/
// public QuadEdge insertSite(Vertex v) {
// QuadEdge e = locate(v);
// if ((v.equals(e.orig(), tolerance)) || (v.equals(e.dest(), tolerance))) {
// return e; // point already in subdivision.
// }
// // Connect the new point to the vertices of the containing
// // triangle (or quadrilateral, if the new point fell on an
// // existing edge.)
// QuadEdge base = makeEdge(e.orig(), v);
// QuadEdge.splice(base, e);
// QuadEdge startEdge = base;
// do {
// base = connect(e, base.sym());
// e = base.oPrev();
// } while (e.lNext() != startEdge);
// return startEdge;
// }
/*
isFrameEdge tests whether a QuadEdge is an edge incident on a frame triangle
vertex.
e - the edge to test
return true if the edge is connected to the frame triangle
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) isFrameEdge(e *QuadEdge) bool {
if qes.isFrameVertex(e.Orig()) || qes.isFrameVertex(e.Dest()) {
return true
}
return false
}
// /**
// * Tests whether a QuadEdge is an edge on the border of the frame facets and
// * the internal facets. E.g. an edge which does not itself touch a frame
// * vertex, but which touches an edge which does.
// *
// * @param e
// * the edge to test
// * @return true if the edge is on the border of the frame
// */
// public boolean isFrameBorderEdge(QuadEdge e) {
// // MD debugging
// QuadEdge[] leftTri = new QuadEdge[3];
// getTriangleEdges(e, leftTri);
// // System.out.println(new QuadEdgeTriangle(leftTri).toString());
// QuadEdge[] rightTri = new QuadEdge[3];
// getTriangleEdges(e.sym(), rightTri);
// // System.out.println(new QuadEdgeTriangle(rightTri).toString());
// // check other vertex of triangle to left of edge
// Vertex vLeftTriOther = e.lNext().dest();
// if (isFrameVertex(vLeftTriOther))
// return true;
// // check other vertex of triangle to right of edge
// Vertex vRightTriOther = e.sym().lNext().dest();
// if (isFrameVertex(vRightTriOther))
// return true;
// return false;
// }
/*
isFrameVertex tests whether a vertex is a vertex of the outer triangle.
v - the vertex to test
returns true if the vertex is an outer triangle vertex
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) isFrameVertex(v Vertex) bool {
if v.Equals(qes.frameVertex[0]) {
return true
}
if v.Equals(qes.frameVertex[1]) {
return true
}
if v.Equals(qes.frameVertex[2]) {
return true
}
return false
}
// private LineSegment seg = new LineSegment();
/*
IsOnEdge Tests whether a point lies on a QuadEdge, up to a tolerance
determined by the subdivision tolerance.
Returns true if the vertex lies on the edge
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) IsOnEdge(e *QuadEdge, p geom.Pointer) bool {
dist := planar.DistanceToLineSegment(p, e.Orig(), e.Dest())
// heuristic (hack?)
return dist < qes.edgeCoincidenceTolerance
}
/*
IsOnLine Tests whether a point lies on a segment, up to a tolerance
determined by the subdivision tolerance.
Returns true if the vertex lies on the edge
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) IsOnLine(l geom.Line, p geom.Pointer) bool {
dist := planar.DistanceToLineSegment(p, geom.Point(l[0]), geom.Point(l[1]))
// heuristic (hack?)
return dist < qes.edgeCoincidenceTolerance
}
/*
IsVertexOfEdge tests whether a Vertex is the start or end vertex of a
QuadEdge, up to the subdivision tolerance distance.
Returns true if the vertex is a endpoint of the edge
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) IsVertexOfEdge(e *QuadEdge, v Vertex) bool {
if (v.EqualsTolerance(e.Orig(), qes.tolerance)) || (v.EqualsTolerance(e.Dest(), qes.tolerance)) {
return true
}
return false
}
// /**
// * Gets the unique {@link Vertex}es in the subdivision,
// * including the frame vertices if desired.
// *
// * @param includeFrame
// * true if the frame vertices should be included
// * @return a collection of the subdivision vertices
// *
// * @see #getVertexUniqueEdges
// */
// public Collection getVertices(boolean includeFrame)
// {
// Set vertices = new HashSet();
// for (Iterator i = quadEdges.iterator(); i.hasNext();) {
// QuadEdge qe = (QuadEdge) i.next();
// Vertex v = qe.orig();
// //System.out.println(v);
// if (includeFrame || ! isFrameVertex(v))
// vertices.add(v);
// /**
// * Inspect the sym edge as well, since it is
// * possible that a vertex is only at the
// * dest of all tracked quadedges.
// */
// Vertex vd = qe.dest();
// //System.out.println(vd);
// if (includeFrame || ! isFrameVertex(vd))
// vertices.add(vd);
// }
// return vertices;
// }
// /**
// * Gets a collection of {@link QuadEdge}s whose origin
// * vertices are a unique set which includes
// * all vertices in the subdivision.
// * The frame vertices can be included if required.
// * <p>
// * This is useful for algorithms which require traversing the
// * subdivision starting at all vertices.
// * Returning a quadedge for each vertex
// * is more efficient than
// * the alternative of finding the actual vertices
// * using {@link #getVertices} and then locating
// * quadedges attached to them.
// *
// * @param includeFrame true if the frame vertices should be included
// * @return a collection of QuadEdge with the vertices of the subdivision as their origins
// */
// public List getVertexUniqueEdges(boolean includeFrame)
// {
// List edges = new ArrayList();
// Set visitedVertices = new HashSet();
// for (Iterator i = quadEdges.iterator(); i.hasNext();) {
// QuadEdge qe = (QuadEdge) i.next();
// Vertex v = qe.orig();
// //System.out.println(v);
// if (! visitedVertices.contains(v)) {
// visitedVertices.add(v);
// if (includeFrame || ! isFrameVertex(v)) {
// edges.add(qe);
// }
// }
// /**
// * Inspect the sym edge as well, since it is
// * possible that a vertex is only at the
// * dest of all tracked quadedges.
// */
// QuadEdge qd = qe.sym();
// Vertex vd = qd.orig();
// //System.out.println(vd);
// if (! visitedVertices.contains(vd)) {
// visitedVertices.add(vd);
// if (includeFrame || ! isFrameVertex(vd)) {
// edges.add(qd);
// }
// }
// }
// return edges;
// }
type edgeStack []*QuadEdge
type edgeSet map[*QuadEdge]bool
/*
push pushes an edge onto the edgeStack
If es is nil a panic will occur.
*/
func (es *edgeStack) push(edge *QuadEdge) {
*es = append(*es, edge)
}
/*
pop pops an edge off the edgeStack
If es is nil a panic will occur.
*/
func (es *edgeStack) pop() *QuadEdge {
if len(*es) == 0 {
return nil
}
result := (*es)[len(*es)-1]
*es = (*es)[:len(*es)-1]
return result
}
/*
contains returns true if edge is in the map.
This just isn't natural for me yet...
if _, ok := es[edge]; ok {
If es is nil a panic will occur.
*/
func (es *edgeSet) contains(edge *QuadEdge) bool {
_, ok := (*es)[edge]
return ok
}
/*
GetPrimaryEdges gets all primary quadedges in the subdivision. A primary edge
is a QuadEdge which occupies the 0'th position in its array of associated
quadedges. These provide the unique geometric edges of the triangulation.
includeFrame true if the frame edges are to be included
Return a List of QuadEdges
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) GetPrimaryEdges(includeFrame bool) []*QuadEdge {
qes.visitedKey++
var edges []*QuadEdge
if qes.startingEdge == nil {
return edges
}
var stack edgeStack
stack.push(qes.startingEdge)
visitedEdges := make(edgeSet)
for len(stack) > 0 {
edge := stack.pop()
if !visitedEdges.contains(edge) {
priQE := edge.GetPrimary()
if includeFrame || !qes.isFrameEdge(priQE) {
edges = append(edges, priQE)
}
stack.push(edge.ONext())
stack.push(edge.Sym().ONext())
visitedEdges[edge] = true
visitedEdges[edge.Sym()] = true
}
}
return edges
}
// /**
// * A TriangleVisitor which computes and sets the
// * circumcentre as the origin of the dual
// * edges originating in each triangle.
// *
// * @author mbdavis
// *
// */
// private static class TriangleCircumcentreVisitor implements TriangleVisitor
// {
// public TriangleCircumcentreVisitor() {
// }
// public void visit(QuadEdge[] triEdges)
// {
// Coordinate a = triEdges[0].orig().getCoordinate();
// Coordinate b = triEdges[1].orig().getCoordinate();
// Coordinate c = triEdges[2].orig().getCoordinate();
// // TODO: choose the most accurate circumcentre based on the edges
// Coordinate cc = Triangle.circumcentre(a, b, c);
// Vertex ccVertex = new Vertex(cc);
// // save the circumcentre as the origin for the dual edges originating in this triangle
// for (int i = 0; i < 3; i++) {
// triEdges[i].rot().setOrig(ccVertex);
// }
// }
// }
// /*****************************************************************************
// * Visitors
// ****************************************************************************/
func (qes *QuadEdgeSubdivision) visitTriangles(triVisitor func(triEdges []*QuadEdge), includeFrame bool) {
qes.visitedKey++
// visited flag is used to record visited edges of triangles
// setVisitedAll(false);
var stack *edgeStack = new(edgeStack)
if qes.startingEdge != nil {
stack.push(qes.startingEdge)
}
visitedEdges := make(edgeSet)
for len(*stack) > 0 {
edge := stack.pop()
if !visitedEdges.contains(edge) {
triEdges := qes.fetchTriangleToVisit(edge, stack, includeFrame, visitedEdges)
if triEdges != nil {
triVisitor(triEdges)
}
}
}
}
/*
Stores the edges for a visited triangle. Also pushes sym (neighbour) edges
on stack to visit later.
Return the visited triangle edges or null if the triangle should not be
visited (for instance, if it is outer)
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) fetchTriangleToVisit(edge *QuadEdge, stack *edgeStack, includeFrame bool, visitedEdges edgeSet) []*QuadEdge {
triEdges := make([]*QuadEdge, 0, 3)
curr := edge
var isFrame bool
for true {
triEdges = append(triEdges, curr)
if curr.IsLive() == false {
log.Fatal("traversing dead edge")
}
if qes.isFrameEdge(curr) {
isFrame = true
}
// push sym edges to visit next
sym := curr.Sym()
if !visitedEdges.contains(sym) {
stack.push(sym)
}
// mark this edge as visited
visitedEdges[curr] = true
curr = curr.LNext()
if curr == edge {
break
}
}
if isFrame && !includeFrame {
return nil
}
return triEdges
}
// /**
// * Gets a list of the triangles
// * in the subdivision, specified as
// * an array of the primary quadedges around the triangle.
// *
// * @param includeFrame
// * true if the frame triangles should be included
// * @return a List of QuadEdge[3] arrays
// */
// public List getTriangleEdges(boolean includeFrame) {
// TriangleEdgesListVisitor visitor = new TriangleEdgesListVisitor();
// visitTriangles(visitor, includeFrame);
// return visitor.getTriangleEdges();
// }
// private static class TriangleEdgesListVisitor implements TriangleVisitor {
// private List triList = new ArrayList();
// public void visit(QuadEdge[] triEdges) {
// triList.add(triEdges);
// }
// public List getTriangleEdges() {
// return triList;
// }
// }
// /**
// * Gets a list of the triangles in the subdivision,
// * specified as an array of the triangle {@link Vertex}es.
// *
// * @param includeFrame
// * true if the frame triangles should be included
// * @return a List of Vertex[3] arrays
// */
// public List getTriangleVertices(boolean includeFrame) {
// TriangleVertexListVisitor visitor = new TriangleVertexListVisitor();
// visitTriangles(visitor, includeFrame);
// return visitor.getTriangleVertices();
// }
// private static class TriangleVertexListVisitor implements TriangleVisitor {
// private List triList = new ArrayList();
// public void visit(QuadEdge[] triEdges) {
// triList.add(new Vertex[] { triEdges[0].orig(), triEdges[1].orig(),
// triEdges[2].orig() });
// }
// public List getTriangleVertices() {
// return triList;
// }
// }
/*
Gets the coordinates for each triangle in the subdivision as an array.
includeFrame true if the frame triangles should be included
Return a list of Coordinate[4] representing each triangle
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) GetTriangleCoordinates(includeFrame bool) ([]geom.Polygon, error) {
var visitor TriangleCoordinatesVisitor
qes.visitTriangles(visitor.visit, includeFrame)
if visitor.err != nil {
return nil, visitor.err
}
return visitor.getTriangles(), nil
}
type TriangleCoordinatesVisitor struct {
triCoords []geom.Polygon
err error
}
func (tcv *TriangleCoordinatesVisitor) visit(triEdges []*QuadEdge) {
if tcv.err != nil {
return
}
var triangle geom.Polygon
triangle = append(triangle, [][2]float64{})
for i := 0; i < 3; i++ {
v := triEdges[i].Orig()
triangle[0] = append(triangle[0], [2]float64(v))
}
if len(triangle[0]) > 0 {
// close the ring
triangle[0] = append(triangle[0], triangle[0][0])
if len(triangle[0]) != 4 {
//checkTriangleSize(pts);
tcv.err = fmt.Errorf("invalid triangle: %v", triangle)
return
}
tcv.triCoords = append(tcv.triCoords, triangle)
}
}
func (tcv *TriangleCoordinatesVisitor) getTriangles() []geom.Polygon {
return tcv.triCoords
}
// private void checkTriangleSize(Coordinate[] pts)
// {
// String loc = "";
// if (pts.length >= 2)
// loc = WKTWriter.toLineString(pts[0], pts[1]);
// else {
// if (pts.length >= 1)
// loc = WKTWriter.toPoint(pts[0]);
// }
// // Assert.isTrue(pts.length == 4, "Too few points for visited triangle at " + loc);
// //com.vividsolutions.jts.util.Debug.println("too few points for triangle at " + loc);
// }
/*
GetEdgesAsMultiLineString gets the geometry for the edges in the subdivision
as a MultiLineString containing 2-point lines.
returns a MultiLineString
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) GetEdgesAsMultiLineString() geom.MultiLineString {
quadEdges := qes.GetPrimaryEdges(false)
var ms geom.MultiLineString
for _, qe := range quadEdges {
var ls [][2]float64
ls = append(ls, qe.Orig().XY(), qe.Dest().XY())
ms = append(ms, ls)
}
return ms
}
/*
GetTriangles gets the geometry for the triangles in a triangulated subdivision
as a MultiPolygon of triangular Polygons.
Unlike JTS, this method returns a MultiPolygon. I found not all viewers like
displaying collections. -JRS
Returns a MultiPolygon of triangular Polygons
If qes is nil a panic will occur.
*/
func (qes *QuadEdgeSubdivision) GetTriangles() (geom.MultiPolygon, error) {
tris, err := qes.GetTriangleCoordinates(false)
if err != nil {
return nil, err
}
var gc geom.MultiPolygon
for i := 0; i < len(tris); i++ {
gc = append(gc, tris[i])
}
return gc, nil
}
// /**
// * Gets the cells in the Voronoi diagram for this triangulation.
// * The cells are returned as a {@link GeometryCollection} of {@link Polygon}s
// * <p>
// * The userData of each polygon is set to be the {@link Coordinate}
// * of the cell site. This allows easily associating external
// * data associated with the sites to the cells.
// *
// * @param geomFact a geometry factory
// * @return a GeometryCollection of Polygons
// */
// public Geometry getVoronoiDiagram(GeometryFactory geomFact)
// {
// List vorCells = getVoronoiCellPolygons(geomFact);
// return geomFact.createGeometryCollection(GeometryFactory.toGeometryArray(vorCells));
// }
// /**
// * Gets a List of {@link Polygon}s for the Voronoi cells
// * of this triangulation.
// * <p>
// * The userData of each polygon is set to be the {@link Coordinate}
// * of the cell site. This allows easily associating external
// * data associated with the sites to the cells.
// *
// * @param geomFact a geometry factory
// * @return a List of Polygons
// */
// public List getVoronoiCellPolygons(GeometryFactory geomFact)
// {
// /*
// * Compute circumcentres of triangles as vertices for dual edges.
// * Precomputing the circumcentres is more efficient,
// * and more importantly ensures that the computed centres
// * are consistent across the Voronoi cells.
// */
// visitTriangles(new TriangleCircumcentreVisitor(), true);
// List cells = new ArrayList();
// Collection edges = getVertexUniqueEdges(false);
// for (Iterator i = edges.iterator(); i.hasNext(); ) {
// QuadEdge qe = (QuadEdge) i.next();
// cells.add(getVoronoiCellPolygon(qe, geomFact));
// }
// return cells;
// }
// /**
// * Gets the Voronoi cell around a site specified
// * by the origin of a QuadEdge.
// * <p>
// * The userData of the polygon is set to be the {@link Coordinate}
// * of the site. This allows attaching external
// * data associated with the site to this cell polygon.
// *
// * @param qe a quadedge originating at the cell site
// * @param geomFact a factory for building the polygon
// * @return a polygon indicating the cell extent
// */
// public Polygon getVoronoiCellPolygon(QuadEdge qe, GeometryFactory geomFact)
// {
// List cellPts = new ArrayList();
// QuadEdge startQE = qe;
// do {
// // Coordinate cc = circumcentre(qe);
// // use previously computed circumcentre
// Coordinate cc = qe.rot().orig().getCoordinate();
// cellPts.add(cc);
// // move to next triangle CW around vertex
// qe = qe.oPrev();
// } while (qe != startQE);
// CoordinateList coordList = new CoordinateList();
// coordList.addAll(cellPts, false);
// coordList.closeRing();
// if (coordList.size() < 4) {
// System.out.println(coordList);
// coordList.add(coordList.get(coordList.size()-1), true);
// }
// Coordinate[] pts = coordList.toCoordinateArray();
// Polygon cellPoly = geomFact.createPolygon(geomFact.createLinearRing(pts));
// Vertex v = startQE.orig();
// cellPoly.setUserData(v.getCoordinate());
// return cellPoly;
// }
// } | planar/triangulate/quadedge/quadedgesubdivision.go | 0.667148 | 0.547101 | quadedgesubdivision.go | starcoder |
package guia2_ext_opencv
func (dExt *DriverExt) Swipe(pathname string, toX, toY int) (err error) {
return dExt.SwipeFloat(pathname, float64(toX), float64(toY))
}
func (dExt *DriverExt) SwipeFloat(pathname string, toX, toY float64) (err error) {
return dExt.SwipeOffsetFloat(pathname, toX, toY, 0.5, 0.5)
}
func (dExt *DriverExt) SwipeOffset(pathname string, toX, toY int, xOffset, yOffset float64) (err error) {
return dExt.SwipeOffsetFloat(pathname, float64(toX), float64(toY), xOffset, yOffset)
}
func (dExt *DriverExt) SwipeOffsetFloat(pathname string, toX, toY, xOffset, yOffset float64) (err error) {
var x, y, width, height float64
if x, y, width, height, err = dExt.FindImageRectInUIKit(pathname); err != nil {
return err
}
fromX := x + width*xOffset
fromY := y + height*yOffset
return dExt.d.SwipeFloat(fromX, fromY, toX, toY)
}
func (dExt *DriverExt) SwipeUp(pathname string, distance ...float64) (err error) {
return dExt.SwipeUpOffset(pathname, 0.5, 0.9, distance...)
}
func (dExt *DriverExt) SwipeUpOffset(pathname string, xOffset, yOffset float64, distance ...float64) (err error) {
if len(distance) == 0 {
distance = []float64{1.0}
}
var x, y, width, height float64
if x, y, width, height, err = dExt.FindImageRectInUIKit(pathname); err != nil {
return err
}
fromX := x + width*xOffset
fromY := (y + height) - height*(1.0-yOffset)
toX := fromX
toY := fromY - height*distance[0]
return dExt.d.SwipeFloat(fromX, fromY, toX, toY)
}
func (dExt *DriverExt) SwipeDown(pathname string, distance ...float64) (err error) {
return dExt.SwipeDownOffset(pathname, 0.5, 0.1, distance...)
}
func (dExt *DriverExt) SwipeDownOffset(pathname string, xOffset, yOffset float64, distance ...float64) (err error) {
if len(distance) == 0 {
distance = []float64{1.0}
}
var x, y, width, height float64
if x, y, width, height, err = dExt.FindImageRectInUIKit(pathname); err != nil {
return err
}
fromX := x + width*xOffset
fromY := y + height*yOffset
toX := fromX
toY := fromY + height*distance[0]
return dExt.d.SwipeFloat(fromX, fromY, toX, toY)
}
func (dExt *DriverExt) SwipeLeft(pathname string, distance ...float64) (err error) {
return dExt.SwipeLeftOffset(pathname, 0.9, 0.5, distance...)
}
func (dExt *DriverExt) SwipeLeftOffset(pathname string, xOffset, yOffset float64, distance ...float64) (err error) {
if len(distance) == 0 {
distance = []float64{1.0}
}
var x, y, width, height float64
if x, y, width, height, err = dExt.FindImageRectInUIKit(pathname); err != nil {
return err
}
fromX := x + width*xOffset
fromY := y + height*yOffset
toX := fromX - width*distance[0]
toY := fromY
return dExt.d.SwipeFloat(fromX, fromY, toX, toY)
}
func (dExt *DriverExt) SwipeRight(pathname string, distance ...float64) (err error) {
return dExt.SwipeRightOffset(pathname, 0.1, 0.5, distance...)
}
func (dExt *DriverExt) SwipeRightOffset(pathname string, xOffset, yOffset float64, distance ...float64) (err error) {
if len(distance) == 0 {
distance = []float64{1.0}
}
var x, y, width, height float64
if x, y, width, height, err = dExt.FindImageRectInUIKit(pathname); err != nil {
return err
}
fromX := x + width*xOffset
fromY := y + height*yOffset
toX := fromX + width*distance[0]
toY := fromY
return dExt.d.SwipeFloat(fromX, fromY, toX, toY)
} | swipe.go | 0.78016 | 0.465387 | swipe.go | starcoder |
package table
import (
"context"
"io"
"sort"
"github.com/liquidata-inc/dolt/go/libraries/doltcore/row"
"github.com/liquidata-inc/dolt/go/libraries/doltcore/schema"
"github.com/liquidata-inc/dolt/go/store/types"
)
// InMemTable holds a simple list of rows that can be retrieved, or appended to. It is meant primarily for testing.
type InMemTable struct {
sch schema.Schema
rows []row.Row
}
// NewInMemTable creates an empty Table with the expectation that any rows added will have the given
// Schema
func NewInMemTable(sch schema.Schema) *InMemTable {
return NewInMemTableWithData(sch, []row.Row{})
}
// NewInMemTableWithData creates a Table with the riven rows
func NewInMemTableWithData(sch schema.Schema, rows []row.Row) *InMemTable {
return NewInMemTableWithDataAndValidationType(sch, rows)
}
func NewInMemTableWithDataAndValidationType(sch schema.Schema, rows []row.Row) *InMemTable {
return &InMemTable{sch, rows}
}
// AppendRow appends a row. Appended rows must be valid for the table's schema. Sorts rows as they are inserted.
func (imt *InMemTable) AppendRow(r row.Row) error {
if isv, err := row.IsValid(r, imt.sch); err != nil {
return err
} else if !isv {
col, err := row.GetInvalidCol(r, imt.sch)
if err != nil {
return err
}
val, ok := r.GetColVal(col.Tag)
if !ok {
return NewBadRow(r, col.Name+" is missing")
} else {
encValStr, err := types.EncodedValue(context.Background(), val)
if err != nil {
return err
}
return NewBadRow(r, col.Name+":"+encValStr+" is not valid.")
}
}
imt.rows = append(imt.rows, r)
var err error
// If we are going to pipe these into noms, they need to be sorted.
sort.Slice(imt.rows, func(i, j int) bool {
if err != nil {
return false
}
iRow := imt.rows[i]
jRow := imt.rows[j]
isLess := false
isLess, err = iRow.NomsMapKey(imt.sch).Less(r.Format(), jRow.NomsMapKey(imt.sch))
return isLess
})
return nil
}
// GetRow gets a row by index
func (imt *InMemTable) GetRow(index int) (row.Row, error) {
return imt.rows[index], nil
}
// GetSchema gets the table's schema
func (imt *InMemTable) GetSchema() schema.Schema {
return imt.sch
}
// NumRows returns the number of rows in the table
func (imt *InMemTable) NumRows() int {
return len(imt.rows)
}
// InMemTableReader is an implementation of a TableReader for an InMemTable
type InMemTableReader struct {
tt *InMemTable
current int
}
// NewInMemTableReader creates an instance of a TableReader from an InMemTable
func NewInMemTableReader(imt *InMemTable) *InMemTableReader {
return &InMemTableReader{imt, 0}
}
// ReadRow reads a row from a table. If there is a bad row the returned error will be non nil, and callin IsBadRow(err)
// will be return true. This is a potentially non-fatal error and callers can decide if they want to continue on a bad row, or fail.
func (rd *InMemTableReader) ReadRow(ctx context.Context) (row.Row, error) {
numRows := rd.tt.NumRows()
if rd.current < numRows {
r := rd.tt.rows[rd.current]
rd.current++
return r, nil
}
return nil, io.EOF
}
// Close should release resources being held
func (rd *InMemTableReader) Close(ctx context.Context) error {
rd.current = -1
return nil
}
// GetSchema gets the schema of the rows that this reader will return
func (rd *InMemTableReader) GetSchema() schema.Schema {
return rd.tt.sch
}
// VerifySchema checks that the incoming schema matches the schema from the existing table
func (rd *InMemTableReader) VerifySchema(outSch schema.Schema) (bool, error) {
return schema.VerifyInSchema(rd.tt.sch, outSch)
}
// InMemTableWriter is an implementation of a TableWriter for an InMemTable
type InMemTableWriter struct {
tt *InMemTable
}
// NewInMemTableWriter creates an instance of a TableWriter from an InMemTable
func NewInMemTableWriter(imt *InMemTable) *InMemTableWriter {
return &InMemTableWriter{imt}
}
// WriteRow will write a row to a table
func (w *InMemTableWriter) WriteRow(ctx context.Context, r row.Row) error {
return w.tt.AppendRow(r)
}
// Close should flush all writes, release resources being held
func (w *InMemTableWriter) Close(ctx context.Context) error {
return nil
}
// GetSchema gets the schema of the rows that this writer writes
func (w *InMemTableWriter) GetSchema() schema.Schema {
return w.tt.sch
} | go/libraries/doltcore/table/inmem_table.go | 0.646349 | 0.493287 | inmem_table.go | starcoder |
package common
// GeneralReference struct contains data for the name and path of a
// compliance reference.
// This struct is a one-to-one mapping of `references` in the component.yaml schema
// https://github.com/opencontrol/schemas#component-yaml
type GeneralReference struct {
Name string `yaml:"name" json:"name"`
Path string `yaml:"path" json:"path"`
Type string `yaml:"type" json:"type"`
}
//GeneralReferences a slice of type GeneralReference
type GeneralReferences []GeneralReference
// VerificationReference struct is a general reference that verifies a specific
// control, it can be pointed to in the control documentation.
// This struct is a one-to-one mapping of `verifications` in the component.yaml schema
// https://github.com/opencontrol/schemas#component-yaml
type VerificationReference struct {
GeneralReference `yaml:",inline"`
Key string `yaml:"key" json:"key"`
}
//VerificationReferences a slice of type VerificationReference
type VerificationReferences []VerificationReference
// CoveredBy struct is the pointing mechanism for for referring to
// VerificationReferences in the documentation.
// This struct is a one-to-one mapping of `covered_by` in the component.yaml schema
// https://github.com/opencontrol/schemas#component-yaml
type CoveredBy struct {
ComponentKey string `yaml:"component_key" json:"component_key"`
VerificationKey string `yaml:"verification_key" json:"verification_key"`
}
//CoveredByList a slice of type CoveredBy
type CoveredByList []CoveredBy
// Len returns the length of the GeneralReferences slice
func (slice GeneralReferences) Len() int {
return len(slice)
}
// Less returns true if a GeneralReference is less than another reference
func (slice GeneralReferences) Less(i, j int) bool {
return slice[i].Name < slice[j].Name
}
// Swap swaps the two GeneralReferences
func (slice GeneralReferences) Swap(i, j int) {
slice[i], slice[j] = slice[j], slice[i]
}
// Len returns the length of the VerificationReference slice
func (slice VerificationReferences) Len() int {
return len(slice)
}
// Less returns true if a VerificationReference is less than another reference
func (slice VerificationReferences) Less(i, j int) bool {
return slice[i].Name < slice[j].Name
}
// Swap swaps the two VerificationReferences
func (slice VerificationReferences) Swap(i, j int) {
slice[i], slice[j] = slice[j], slice[i]
}
// Get returns a VerificationReference of the given key
func (slice VerificationReferences) Get(key string) VerificationReference {
for _, reference := range slice {
if reference.Key == key {
return reference
}
}
return VerificationReference{}
} | pkg/lib/common/references.go | 0.87198 | 0.48182 | references.go | starcoder |
package chaindb
import (
"context"
api "github.com/attestantio/go-eth2-client/api/v1"
"github.com/attestantio/go-eth2-client/spec/phase0"
)
// AttestationsProvider defines functions to access attestations.
type AttestationsProvider interface {
// AttestationsForBlock fetches all attestations made for the given block.
AttestationsForBlock(ctx context.Context, blockRoot phase0.Root) ([]*Attestation, error)
// AttestationsInBlock fetches all attestations contained in the given block.
AttestationsInBlock(ctx context.Context, blockRoot phase0.Root) ([]*Attestation, error)
// AttestationsForSlotRange fetches all attestations made for the given slot range.
// Ranges are inclusive of start and exclusive of end i.e. a request with startSlot 2 and endSlot 4 will provide
// attestations for slots 2 and 3.
AttestationsForSlotRange(ctx context.Context, startSlot phase0.Slot, endSlot phase0.Slot) ([]*Attestation, error)
// AttestationsInSlotRange fetches all attestations made in the given slot range.
// Ranges are inclusive of start and exclusive of end i.e. a request with startSlot 2 and endSlot 4 will provide
// attestations in slots 2 and 3.
AttestationsInSlotRange(ctx context.Context, startSlot phase0.Slot, endSlot phase0.Slot) ([]*Attestation, error)
// IndeterminateAttestationSlots fetches the slots in the given range with attestations that do not have a canonical status.
IndeterminateAttestationSlots(ctx context.Context, minSlot phase0.Slot, maxSlot phase0.Slot) ([]phase0.Slot, error)
}
// AttestationsSetter defines functions to create and update attestations.
type AttestationsSetter interface {
// SetAttestation sets an attestation.
SetAttestation(ctx context.Context, attestation *Attestation) error
}
// AttesterSlashingsProvider defines functions to obtain attester slashings.
type AttesterSlashingsProvider interface {
// AttesterSlashingsForSlotRange fetches all attester slashings made for the given slot range.
// It will return slashings from blocks that are canonical or undefined, but not from non-canonical blocks.
AttesterSlashingsForSlotRange(ctx context.Context, minSlot phase0.Slot, maxSlot phase0.Slot) ([]*AttesterSlashing, error)
// AttesterSlashingsForValidator fetches all attester slashings made for the given validator.
// It will return slashings from blocks that are canonical or undefined, but not from non-canonical blocks.
AttesterSlashingsForValidator(ctx context.Context, index phase0.ValidatorIndex) ([]*AttesterSlashing, error)
}
// AttesterSlashingsSetter defines functions to create and update attester slashings.
type AttesterSlashingsSetter interface {
// SetAttesterSlashing sets an attester slashing.
SetAttesterSlashing(ctx context.Context, attesterSlashing *AttesterSlashing) error
}
// BeaconCommitteesProvider defines functions to access beacon committee information.
type BeaconCommitteesProvider interface {
// BeaconComitteeBySlotAndIndex fetches the beacon committee with the given slot and index.
BeaconCommitteeBySlotAndIndex(ctx context.Context, slot phase0.Slot, index phase0.CommitteeIndex) (*BeaconCommittee, error)
// AttesterDuties fetches the attester duties at the given slot range for the given validator indices.
AttesterDuties(ctx context.Context, startSlot phase0.Slot, endSlot phase0.Slot, validatorIndices []phase0.ValidatorIndex) ([]*AttesterDuty, error)
}
// BeaconCommitteesSetter defines functions to create and update beacon committee information.
type BeaconCommitteesSetter interface {
// SetBeaconComittee sets a beacon committee.
SetBeaconCommittee(ctx context.Context, beaconCommittee *BeaconCommittee) error
}
// BlocksProvider defines functions to access blocks.
type BlocksProvider interface {
// BlocksBySlot fetches all blocks with the given slot.
BlocksBySlot(ctx context.Context, slot phase0.Slot) ([]*Block, error)
// BlocksForSlotRange fetches all blocks with the given slot range.
// Ranges are inclusive of start and exclusive of end i.e. a request with startSlot 2 and endSlot 4 will provide
// blocks duties for slots 2 and 3.
BlocksForSlotRange(ctx context.Context, startSlot phase0.Slot, endSlot phase0.Slot) ([]*Block, error)
// BlockByRoot fetches the block with the given root.
BlockByRoot(ctx context.Context, root phase0.Root) (*Block, error)
// BlocksByParentRoot fetches the blocks with the given parent root.
BlocksByParentRoot(ctx context.Context, root phase0.Root) ([]*Block, error)
// EmptySlots fetches the slots in the given range without a block in the database.
EmptySlots(ctx context.Context, minSlot phase0.Slot, maxSlot phase0.Slot) ([]phase0.Slot, error)
// LatestBlocks fetches the blocks with the highest slot number in the database.
LatestBlocks(ctx context.Context) ([]*Block, error)
// IndeterminateBlocks fetches the blocks in the given range that do not have a canonical status.
IndeterminateBlocks(ctx context.Context, minSlot phase0.Slot, maxSlot phase0.Slot) ([]phase0.Root, error)
// CanonicalBlockPresenceForSlotRange returns a boolean for each slot in the range for the presence
// of a canonical block.
// Ranges are inclusive of start and exclusive of end i.e. a request with startSlot 2 and endSlot 4 will provide
// presence duties for slots 2 and 3.
CanonicalBlockPresenceForSlotRange(ctx context.Context, minSlot phase0.Slot, maxSlot phase0.Slot) ([]bool, error)
// LatestCanonicalBlock returns the slot of the latest canonical block known in the database.
LatestCanonicalBlock(ctx context.Context) (phase0.Slot, error)
}
// BlocksSetter defines functions to create and update blocks.
type BlocksSetter interface {
// SetBlock sets a block.
SetBlock(ctx context.Context, block *Block) error
}
// ChainSpecProvider defines functions to access chain specification.
type ChainSpecProvider interface {
// ChainSpec fetches all chain specification values.
ChainSpec(ctx context.Context) (map[string]interface{}, error)
// ChainSpecValue fetches a chain specification value given its key.
ChainSpecValue(ctx context.Context, key string) (interface{}, error)
}
// ChainSpecSetter defines functions to create and update chain specification.
type ChainSpecSetter interface {
// SetChainSpecValue sets the value of the provided key.
SetChainSpecValue(ctx context.Context, key string, value interface{}) error
}
// GenesisProvider defines functions to access genesis information.
type GenesisProvider interface {
// Genesis fetches genesis values.
Genesis(ctx context.Context) (*api.Genesis, error)
}
// GenesisSetter defines functions to create and update genesis information.
type GenesisSetter interface {
// SetGenesis sets the genesis information.
SetGenesis(ctx context.Context, genesis *api.Genesis) error
}
// ETH1DepositsProvider defines functions to access Ethereum 1 deposits.
type ETH1DepositsProvider interface {
// ETH1DepositsByPublicKey fetches Ethereum 1 deposits for a given set of validator public keys.
ETH1DepositsByPublicKey(ctx context.Context, pubKeys []phase0.BLSPubKey) ([]*ETH1Deposit, error)
}
// ETH1DepositsSetter defines functions to create and update Ethereum 1 deposits.
type ETH1DepositsSetter interface {
// SetETH1Deposit sets an Ethereum 1 deposit.
SetETH1Deposit(ctx context.Context, deposit *ETH1Deposit) error
}
// ProposerDutiesProvider defines functions to access proposer duties.
type ProposerDutiesProvider interface {
// ProposerDutiesForSlotRange fetches all proposer duties for the given slot range.
// Ranges are inclusive of start and exclusive of end i.e. a request with startSlot 2 and endSlot 4 will provide
// proposer duties for slots 2 and 3.
ProposerDutiesForSlotRange(ctx context.Context, startSlot phase0.Slot, endSlot phase0.Slot) ([]*ProposerDuty, error)
}
// ProposerDutiesSetter defines the functions to create and update proposer duties.
type ProposerDutiesSetter interface {
// SetProposerDuty sets a proposer duty.
SetProposerDuty(ctx context.Context, proposerDuty *ProposerDuty) error
}
// ProposerSlashingsProvider defines functions to access proposer slashings.
type ProposerSlashingsProvider interface {
// ProposerSlashingsForSlotRange fetches all proposer slashings made for the given slot range.
// It will return slashings from blocks that are canonical or undefined, but not from non-canonical blocks.
ProposerSlashingsForSlotRange(ctx context.Context, minSlot phase0.Slot, maxSlot phase0.Slot) ([]*ProposerSlashing, error)
// ProposerSlashingsForValidator fetches all proposer slashings made for the given validator.
// It will return slashings from blocks that are canonical or undefined, but not from non-canonical blocks.
ProposerSlashingsForValidator(ctx context.Context, index phase0.ValidatorIndex) ([]*ProposerSlashing, error)
}
// ProposerSlashingsSetter defines functions to create and update proposer slashings.
type ProposerSlashingsSetter interface {
// SetProposerSlashing sets an proposer slashing.
SetProposerSlashing(ctx context.Context, proposerSlashing *ProposerSlashing) error
}
// ValidatorsProvider defines functions to access validator information.
type ValidatorsProvider interface {
// Validators fetches all validators.
Validators(ctx context.Context) ([]*Validator, error)
// ValidatorsByPublicKey fetches all validators matching the given public keys.
// This is a common starting point for external entities to query specific validators, as they should
// always have the public key at a minimum, hence the return map keyed by public key.
ValidatorsByPublicKey(ctx context.Context, pubKeys []phase0.BLSPubKey) (map[phase0.BLSPubKey]*Validator, error)
// ValidatorsByIndex fetches all validators matching the given indices.
ValidatorsByIndex(ctx context.Context, indices []phase0.ValidatorIndex) (map[phase0.ValidatorIndex]*Validator, error)
// ValidatorBalancesByIndexAndEpoch fetches the validator balances for the given validators and epoch.
ValidatorBalancesByIndexAndEpoch(
ctx context.Context,
indices []phase0.ValidatorIndex,
epoch phase0.Epoch,
) (
map[phase0.ValidatorIndex]*ValidatorBalance,
error,
)
// ValidatorBalancesByIndexAndEpochRange fetches the validator balances for the given validators and epoch range.
// Ranges are inclusive of start and exclusive of end i.e. a request with startEpoch 2 and endEpoch 4 will provide
// balances for epochs 2 and 3.
ValidatorBalancesByIndexAndEpochRange(
ctx context.Context,
indices []phase0.ValidatorIndex,
startEpoch phase0.Epoch,
endEpoch phase0.Epoch,
) (
map[phase0.ValidatorIndex][]*ValidatorBalance,
error,
)
// ValidatorBalancesByIndexAndEpochs fetches the validator balances for the given validators at the specified epochs.
ValidatorBalancesByIndexAndEpochs(
ctx context.Context,
indices []phase0.ValidatorIndex,
epochs []phase0.Epoch,
) (
map[phase0.ValidatorIndex][]*ValidatorBalance,
error,
)
}
// AggregateValidatorBalancesProvider defines functions to access aggregate validator balances.
type AggregateValidatorBalancesProvider interface {
// AggregateValidatorBalancesByIndexAndEpoch fetches the aggregate validator balances for the given validators and epoch.
AggregateValidatorBalancesByIndexAndEpoch(
ctx context.Context,
indices []phase0.ValidatorIndex,
epoch phase0.Epoch,
) (
*AggregateValidatorBalance,
error,
)
// AggregateValidatorBalancesByIndexAndEpochRange fetches the aggregate validator balances for the given validators and
// epoch range.
// Ranges are inclusive of start and exclusive of end i.e. a request with startEpoch 2 and endEpoch 4 will provide
// balances for epochs 2 and 3.
AggregateValidatorBalancesByIndexAndEpochRange(
ctx context.Context,
indices []phase0.ValidatorIndex,
startEpoch phase0.Epoch,
endEpoch phase0.Epoch,
) (
[]*AggregateValidatorBalance,
error,
)
// AggregateValidatorBalancesByIndexAndEpochs fetches the validator balances for the given validators at the specified epochs.
AggregateValidatorBalancesByIndexAndEpochs(
ctx context.Context,
indices []phase0.ValidatorIndex,
epochs []phase0.Epoch,
) (
[]*AggregateValidatorBalance,
error,
)
}
// ValidatorsSetter defines functions to create and update validator information.
type ValidatorsSetter interface {
// SetValidator sets a validator.
SetValidator(ctx context.Context, validator *Validator) error
// SetValidatorBalance sets a validator balance.
SetValidatorBalance(ctx context.Context, validatorBalance *ValidatorBalance) error
}
// DepositsProvider defines functions to access deposits.
type DepositsProvider interface {
// DepositsByPublicKey fetches deposits for a given set of validator public keys.
DepositsByPublicKey(ctx context.Context, pubKeys []phase0.BLSPubKey) (map[phase0.BLSPubKey][]*Deposit, error)
// DepositsForSlotRange fetches all deposits made in the given slot range.
// It will return deposits from blocks that are canonical or undefined, but not from non-canonical blocks.
DepositsForSlotRange(ctx context.Context, minSlot phase0.Slot, maxSlot phase0.Slot) ([]*Deposit, error)
}
// DepositsSetter defines functions to create and update deposits.
type DepositsSetter interface {
// SetDeposit sets a deposit.
SetDeposit(ctx context.Context, deposit *Deposit) error
}
// VoluntaryExitsSetter defines functions to create and update voluntary exits.
type VoluntaryExitsSetter interface {
// SetVoluntaryExit sets a voluntary exit.
SetVoluntaryExit(ctx context.Context, voluntaryExit *VoluntaryExit) error
}
// ValidatorEpochSummariesSetter defines functions to create and update validator epoch summaries.
type ValidatorEpochSummariesSetter interface {
// SetValidatorEpochSummary sets a validator epoch summary.
SetValidatorEpochSummary(ctx context.Context, summary *ValidatorEpochSummary) error
}
// BlockSummariesSetter defines functions to create and update block summaries.
type BlockSummariesSetter interface {
// SetBlockSummary sets a block summary.
SetBlockSummary(ctx context.Context, summary *BlockSummary) error
}
// EpochSummariesSetter defines functions to create and update epoch summaries.
type EpochSummariesSetter interface {
// SetEpochSummary sets an epoch summary.
SetEpochSummary(ctx context.Context, summary *EpochSummary) error
}
// Service defines a minimal chain database service.
type Service interface {
// BeginTx begins a transaction.
BeginTx(ctx context.Context) (context.Context, context.CancelFunc, error)
// CommitTx commits a transaction.
CommitTx(ctx context.Context) error
// SetMetadata sets a metadata key to a JSON value.
SetMetadata(ctx context.Context, key string, value []byte) error
// Metadata obtains the JSON value from a metadata key.
Metadata(ctx context.Context, key string) ([]byte, error)
} | services/chaindb/service.go | 0.564459 | 0.555375 | service.go | starcoder |
package twofive
import (
"github.com/francoispqt/gojay"
)
// Banner represents the most general type of impression. Although the term “banner” may have very
// specific meaning in other contexts, here it can be many things including a simple static image, an
// expandable ad unit, or even in-banner video (refer to the Video object in Section 3.2.4 for the more
// generalized and full featured video ad units). An array of Banner objects can also appear within the
// Video to describe optional companion ads defined in the VAST specification.
type Banner struct {
BidFloor *float64 `json:"bidfloor,omitempty" valid:"optional"`
BAttr []int `json:"battr,omitempty" valid:"optional"`
Format []Format `json:"format,omitempty" valid:"optional"`
W int `json:"w" valid:"required"`
H int `json:"h" valid:"required"`
API []int `json:"api,omitempty" valid:"inintarr(1|2|3|4|5|6),optional"` // 3,5,6 -> mraid1, 2, and 3
Pos int `json:"pos,omitempty" valid:"range(0|7),optional"` // 0,1,2,3,4,5,6,7 -> Unknown, Above the Fold, DEPRECATED - May or may not be initially visible depending on screen size/resolution.,Below the Fold,Header,Footer,Sidebar,Full Screen
Vcm int `json:"vcm,omitempty" valid:"optional"` // Relevant only for Banner objects used with a Video object (Section 3.2.7) in an array of companion ads. Indicates the companion banner rendering mode relative to the associated video, where 0 = concurrent, 1 = end-card.
}
// MarshalJSONObject implements MarshalerJSONObject
func (b *Banner) MarshalJSONObject(enc *gojay.Encoder) {
if b.BidFloor != nil {
enc.Float64KeyOmitEmpty("bidfloor", *b.BidFloor)
}
var battrSlice = Ints(b.BAttr)
enc.ArrayKeyOmitEmpty("battr", battrSlice)
var formatSlice = Formats(b.Format)
enc.ArrayKeyOmitEmpty("format", formatSlice)
enc.IntKeyOmitEmpty("w", b.W)
enc.IntKeyOmitEmpty("h", b.H)
enc.IntKeyOmitEmpty("pos", b.Pos)
var aPISlice = Ints(b.API)
enc.ArrayKeyOmitEmpty("api", aPISlice)
enc.IntKeyOmitEmpty("vcm", b.Vcm)
}
// IsNil checks if instance is nil
func (b *Banner) IsNil() bool {
return b == nil
}
// UnmarshalJSONObject implements gojay's UnmarshalerJSONObject
func (b *Banner) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {
switch k {
case "bidfloor":
var value float64
err := dec.Float64(&value)
if err == nil {
b.BidFloor = &value
}
return err
case "format":
var aSlice = Formats{}
err := dec.Array(&aSlice)
if err == nil && len(aSlice) > 0 {
b.Format = []Format(aSlice)
}
return err
case "battr":
var aSlice = Ints{}
err := dec.Array(&aSlice)
if err == nil && len(aSlice) > 0 {
b.BAttr = []int(aSlice)
}
return err
case "w":
return dec.Int(&b.W)
case "h":
return dec.Int(&b.H)
case "pos":
return dec.Int(&b.Pos)
case "api":
var aSlice = Ints{}
err := dec.Array(&aSlice)
if err == nil && len(aSlice) > 0 {
b.API = []int(aSlice)
}
return err
case "vcm":
return dec.Int(&b.Vcm)
}
return nil
}
// NKeys returns the number of keys to unmarshal
func (b *Banner) NKeys() int { return 0 }
// Banners ...
type Banners []Banner
// UnmarshalJSONArray ...
func (s *Banners) UnmarshalJSONArray(dec *gojay.Decoder) error {
var value = Banner{}
if err := dec.Object(&value); err != nil {
return err
}
*s = append(*s, value)
return nil
}
// MarshalJSONArray ...
func (s Banners) MarshalJSONArray(enc *gojay.Encoder) {
for i := range s {
enc.Object(&s[i])
}
}
// IsNil ...
func (s Banners) IsNil() bool {
return len(s) == 0
} | go/request/rtb_twofive/banner.go | 0.655336 | 0.487429 | banner.go | starcoder |
package ascanvas
func TransformRectangle(canvas *Canvas, args TransformRectangleArgs) error {
var (
maxX, maxY int
grid = canvas.AsGrid()
)
if err := args.Validate(); err != nil {
return err
}
if args.Width == 0 {
maxX = args.TopLeft.X
} else {
maxX = args.TopLeft.X + args.Width - 1
}
if maxX >= canvas.Width {
maxX = canvas.Width - 1
}
if args.Height == 0 {
maxY = args.TopLeft.Y
} else {
maxY = args.TopLeft.Y + args.Height - 1
}
if maxY >= canvas.Height {
maxY = canvas.Height - 1
}
if args.Fill != "" {
for x := args.TopLeft.X; x <= maxX; x++ {
for y := args.TopLeft.Y; y <= maxY; y++ {
grid[y][x] = args.Fill
}
}
}
if args.Outline != "" {
for x := args.TopLeft.X; x <= maxX; x++ {
grid[args.TopLeft.Y][x] = args.Outline
grid[maxY][x] = args.Outline
}
for y := args.TopLeft.Y; y <= maxY; y++ {
grid[y][args.TopLeft.X] = args.Outline
grid[y][maxX] = args.Outline
}
}
canvas.FromGrid(grid)
return nil
}
func TransformFloodfill(canvas *Canvas, args TransformFloodfillArgs) error {
if err := args.Validate(); err != nil {
return err
}
if !canvas.Contains(args.Start) {
return ErrOutOfBounds
}
var (
grid = canvas.AsGrid()
pattern = grid[args.Start.Y][args.Start.X]
)
transformFloodfill(canvas, args, grid, pattern)
return nil
}
func transformFloodfill(canvas *Canvas, args TransformFloodfillArgs, grid [][]string, pattern string) {
var (
queue = []Coordinates{args.Start}
visited = make(map[string]interface{})
)
for len(queue) != 0 {
var (
p = queue[0]
s = p.String()
)
queue = queue[1:]
if _, ok := visited[s]; ok || !canvas.Contains(p) {
continue
}
visited[s] = nil
if grid[p.Y][p.X] == pattern {
grid[p.Y][p.X] = args.Fill
} else {
continue
}
var next = []Coordinates{
{X: p.X, Y: p.Y - 1}, // N
{X: p.X, Y: p.Y + 1}, // S
{X: p.X + 1, Y: p.Y}, // E
{X: p.X - 1, Y: p.Y}, // W
}
for i := range next {
var _, ok = visited[next[i].String()]
switch {
case !canvas.Contains(next[i]):
continue
case ok:
continue
case grid[next[i].Y][next[i].X] != pattern:
continue
default:
queue = append(queue, next[i])
}
}
}
canvas.FromGrid(grid)
} | transform.go | 0.555676 | 0.403449 | transform.go | starcoder |
package hr
import "github.com/ContextLogic/cldr"
var calendar = cldr.Calendar{
Formats: cldr.CalendarFormats{
Date: cldr.CalendarDateFormat{Full: "EEEE, d. MMMM y.", Long: "d. MMMM y.", Medium: "d. MMM y.", Short: "dd.MM.y."},
Time: cldr.CalendarDateFormat{Full: "HH:mm:ss zzzz", Long: "HH:mm:ss z", Medium: "HH:mm:ss", Short: "HH:mm"},
DateTime: cldr.CalendarDateFormat{Full: "{1} 'u' {0}", Long: "{1} 'u' {0}", Medium: "{1} {0}", Short: "{1} {0}"},
},
FormatNames: cldr.CalendarFormatNames{
Months: cldr.CalendarMonthFormatNames{
Abbreviated: cldr.CalendarMonthFormatNameValue{Jan: "sij", Feb: "velj", Mar: "ožu", Apr: "tra", May: "svi", Jun: "lip", Jul: "srp", Aug: "kol", Sep: "ruj", Oct: "lis", Nov: "stu", Dec: "pro"},
Narrow: cldr.CalendarMonthFormatNameValue{Jan: "1.", Feb: "2.", Mar: "3.", Apr: "4.", May: "5.", Jun: "6.", Jul: "7.", Aug: "8.", Sep: "9.", Oct: "10.", Nov: "11.", Dec: "12."},
Short: cldr.CalendarMonthFormatNameValue{},
Wide: cldr.CalendarMonthFormatNameValue{Jan: "siječanj", Feb: "veljača", Mar: "ožujak", Apr: "travanj", May: "svibanj", Jun: "lipanj", Jul: "srpanj", Aug: "kolovoz", Sep: "rujan", Oct: "listopad", Nov: "studeni", Dec: "prosinac"},
},
Days: cldr.CalendarDayFormatNames{
Abbreviated: cldr.CalendarDayFormatNameValue{Sun: "ned", Mon: "pon", Tue: "uto", Wed: "sri", Thu: "čet", Fri: "pet", Sat: "sub"},
Narrow: cldr.CalendarDayFormatNameValue{Sun: "n", Mon: "p", Tue: "u", Wed: "s", Thu: "č", Fri: "p", Sat: "s"},
Short: cldr.CalendarDayFormatNameValue{Sun: "ned", Mon: "pon", Tue: "uto", Wed: "sri", Thu: "čet", Fri: "pet", Sat: "sub"},
Wide: cldr.CalendarDayFormatNameValue{Sun: "nedjelja", Mon: "ponedjeljak", Tue: "utorak", Wed: "srijeda", Thu: "četvrtak", Fri: "petak", Sat: "subota"},
},
Periods: cldr.CalendarPeriodFormatNames{
Abbreviated: cldr.CalendarPeriodFormatNameValue{},
Narrow: cldr.CalendarPeriodFormatNameValue{AM: "AM", PM: "PM"},
Short: cldr.CalendarPeriodFormatNameValue{},
Wide: cldr.CalendarPeriodFormatNameValue{AM: "AM", PM: "PM"},
},
},
} | resources/locales/hr/calendar.go | 0.513912 | 0.421254 | calendar.go | starcoder |
package incrdelaunay
import (
"math"
"sort"
)
// Delaunay represents a Delaunay triangulation.
type Delaunay struct {
triangles []Triangle
grid CircumcircleGrid // For fast detection of circumcircles containing a point.
pointMap pointMap
freeTriangles []uint16 // A list of free indexes in the triangles slice.
superTriangle Triangle // A triangle that contains all polygons added.
edges []Edge // For performance purposes.
hull []Point // For performance purposes.
ears []ear // For performance purposes.
numPoints int // The number of polygons in the triangulation (including duplicate polygons).
uniquePoints int
}
// NewDelaunay returns a new Delaunay triangulation.
func NewDelaunay(w, h int) *Delaunay {
delaunay := Delaunay{}
superTriangle := NewSuperTriangle(w, h)
delaunay.grid = NewCircumcircleGrid(10, 10, w, h)
delaunay.addTriangle(superTriangle)
delaunay.superTriangle = superTriangle
delaunay.pointMap = newPointMap(100)
return &delaunay
}
// Insert adds a point to the Delaunay triangulation using the Bowyer-Watson algorithm.
// Duplicate polygons are kept track of.
func (d *Delaunay) Insert(p Point) bool {
if d.pointMap.AddPoint(p) == 1 {
d.uniquePoints++
}
d.numPoints++
d.resetEdges()
// Iterate through all the triangles with circumcircles that contain the point
d.grid.RemoveCircumcirclesThatContain(p, d.triangles, func(i uint16) {
t := d.triangles[i]
d.addEdge(NewEdge(t.A, t.B))
d.addEdge(NewEdge(t.B, t.C))
d.addEdge(NewEdge(t.C, t.A))
d.markFreeTriangle(i) // Remove the triangle
})
// Connect the vertices along the hole to the point
for _, e := range d.edges {
A := int64(e.B.X - e.A.X)
B := int64(e.B.Y - e.A.Y)
G := A*int64(p.Y-e.B.Y) - B*int64(p.X-e.B.X)
if G != 0 {
new := NewTriangle(e.A, e.B, p)
d.addTriangle(new)
}
}
return true
}
// Remove removes a point from the Delaunay Triangulation.
// If there are duplicates of the point only one of the duplicates is removed.
func (d *Delaunay) Remove(p Point) {
d.numPoints--
if d.pointMap.RemovePoint(p) != 0 {
return
}
d.uniquePoints--
d.hull = d.hull[:0]
// Adds a point to the hull
addPoint := func(po Point) {
if po == p {
return
}
found := false
for _, v := range d.hull {
if po == v {
found = true
break
}
}
if !found {
d.hull = append(d.hull, po)
}
}
// Iterates through all the triangles that have a connection to point p
d.grid.RemoveThatHasVertex(p, d.triangles, func(i uint16) {
t := d.triangles[i]
addPoint(t.A)
addPoint(t.B)
addPoint(t.C)
d.markFreeTriangle(i)
})
// Sort the polygons in the hull counterclockwise
sort.Slice(d.hull, func(i, j int) bool {
a := d.hull[j]
b := d.hull[i]
if a.X-p.X >= 0 && b.X-p.X < 0 {
return true
}
if a.X-p.X < 0 && b.X-p.X >= 0 {
return false
}
if a.X-p.X == 0 && b.X-p.X == 0 {
if a.Y-p.Y >= 0 || b.Y-p.Y >= 0 {
return a.Y > b.Y
}
return b.Y > a.Y
}
det := int(a.X-p.X)*int(b.Y-p.Y) - int(b.X-p.X)*int(a.Y-p.Y)
if det < 0 {
return true
}
if det > 0 {
return false
}
panic("...")
})
// Add the ears one by one based on its score
// using the algorithm described in: https://hal.inria.fr/inria-00167201/document.
// An ear is a triangle made by three consecutive points along the hull
d.ears = d.ears[:0]
// Create the ears of the hull and calculate their scores
for i := 0; i < len(d.hull); i++ {
e := ear{a: d.hull[i], b: d.hull[(i+1)%len(d.hull)], c: d.hull[(i+2)%len(d.hull)]}
e.computeScore(p)
d.ears = append(d.ears, e)
}
for len(d.ears) > 3 {
// Find the ear with the lowest score
lowestScore := math.MaxFloat64
ear := d.ears[0]
index := 0
for i, e := range d.ears {
if e.score < lowestScore {
lowestScore = e.score
ear = e
index = i
}
}
// Add the ear to the triangulation
d.addTriangle(NewTriangle(ear.a, ear.b, ear.c))
// Remove the ear from the list of ears, remove it from the hull, and update all other ears
// accordingly
// Find the ears before and after the current ear
before := (index - 1) % len(d.ears)
after := (index + 1) % len(d.ears)
if before == -1 {
before = len(d.ears) - 1
}
if after == -1 {
after = len(d.ears) - 1
}
// Connect those ears together as the ear between them has been removed.
// Then, update the scores of the two modified ears
d.ears[before].c = d.ears[index].c
d.ears[before].computeScore(p)
d.ears[after].a = d.ears[index].a
d.ears[after].computeScore(p)
d.ears = append(d.ears[:index], d.ears[index+1:]...)
}
// All three remaining ears are identical
d.addTriangle(NewTriangle(d.ears[0].a, d.ears[0].b, d.ears[0].c))
}
// addEdge adds an edge to the edges if edge e is unique.
func (d *Delaunay) addEdge(e Edge) {
found := false
for i, edge := range d.edges {
if e == edge {
found = true
d.edges[i] = d.edges[len(d.edges)-1]
d.edges = d.edges[:len(d.edges)-1]
break
}
}
if !found {
d.edges = append(d.edges, e)
}
}
// resetEdges empties edges.
func (d *Delaunay) resetEdges() {
d.edges = d.edges[:0]
}
// addToHull adds a point to hull.
func (d *Delaunay) addToHull(p Point) {
d.hull = append(d.hull, p)
}
// addTriangle adds a triangle to triangulation.
func (d *Delaunay) addTriangle(t Triangle) {
// First check if there are any free indexes available
if len(d.freeTriangles) > 0 {
// If there is an index available, add the triangle to the index
index := d.freeTriangles[len(d.freeTriangles)-1]
d.triangles[index] = t
d.grid.AddTriangle(t, index) // Update the grid
d.freeTriangles = d.freeTriangles[:len(d.freeTriangles)-1]
return
}
d.grid.AddTriangle(t, uint16(len(d.triangles))) // Update the grid
d.triangles = append(d.triangles, t)
}
// markFreeTriangle marks a triangle in the triangles slice as no longer being needed,
// essentially removing the triangle from the triangulation.
func (d *Delaunay) markFreeTriangle(i uint16) {
d.triangles[i].A.X = -1 // Marks the triangle as invalid
d.freeTriangles = append(d.freeTriangles, i)
}
// IterTriangles iterates through all the triangles in the triangulation, calling function triangle for each one.
func (d Delaunay) IterTriangles(triangle func(t Triangle)) {
for _, t := range d.triangles {
if t.A.X == -1 {
continue
}
// Exclude triangles that are connected to the superTriangle
if t.A != d.superTriangle.A && t.B != d.superTriangle.A && t.C != d.superTriangle.A &&
t.A != d.superTriangle.B && t.B != d.superTriangle.B && t.C != d.superTriangle.B &&
t.A != d.superTriangle.C && t.B != d.superTriangle.C && t.C != d.superTriangle.C {
triangle(t)
}
}
}
// NumPoints returns the number of polygons in the triangulation, including duplicate polygons.
func (d Delaunay) NumPoints() int {
return d.numPoints
}
// Set sets the triangulation to another triangulation.
func (d *Delaunay) Set(other *Delaunay) {
d.triangles = d.triangles[:cap(d.triangles)]
if len(d.triangles) > len(other.triangles) {
d.triangles = d.triangles[:len(other.triangles)]
} else if len(d.triangles) < len(other.triangles) {
d.triangles = make([]Triangle, len(other.triangles))
}
copy(d.triangles, other.triangles)
d.freeTriangles = d.freeTriangles[:cap(d.freeTriangles)]
if len(d.freeTriangles) > len(other.freeTriangles) {
d.freeTriangles = d.freeTriangles[:len(other.freeTriangles)]
} else if len(d.freeTriangles) < len(other.freeTriangles) {
d.freeTriangles = make([]uint16, len(other.freeTriangles))
}
copy(d.freeTriangles, other.freeTriangles)
d.superTriangle = other.superTriangle
d.grid.Set(&other.grid)
d.pointMap.Set(&other.pointMap)
}
// HasPoint returns whether the triangulation contains point p.
func (d Delaunay) HasPoint(p Point) bool {
return d.grid.HasPoint(p, d.triangles)
}
// GetClosestTo returns the closest point in the triangulation to point p.
func (d Delaunay) GetClosestTo(p Point) Point {
var closest Point
closestDist := int64(math.MaxInt64)
for _, t := range d.triangles {
if t.A.X == -1 {
continue
}
// Check all three of the triangles vertices to see if one is closer
dist := p.DistSq(t.A)
if dist < closestDist {
closestDist = dist
closest = t.A
}
dist = p.DistSq(t.B)
if dist < closestDist {
closestDist = dist
closest = t.B
}
dist = p.DistSq(t.C)
if dist < closestDist {
closestDist = dist
closest = t.C
}
}
return closest
} | triangulation/incrdelaunay/delaunay.go | 0.748812 | 0.611556 | delaunay.go | starcoder |
package scheduler
import (
"math/rand"
)
// NodeIterator iterates over a list of nodes based on the defined policy
type NodeIterator interface {
// returns true if there are more values to iterate over
HasNext() (ok bool)
// returns the next node from the iterator
Next() (node *SchedulingNode)
// reset the iterator to a clean state
Reset()
}
// All iterators extend the base iterator
type baseIterator struct {
NodeIterator
countIdx int
size int
nodes []*SchedulingNode
}
// Reset the iterator to start from the beginning
func (bi *baseIterator) Reset() {
bi.countIdx = 0
}
// HasNext returns true if there is a next element in the array.
// Returns false if there are no more elements or list is empty.
func (bi *baseIterator) HasNext() bool {
return !(bi.countIdx+1 > bi.size)
}
// Next returns the next element and advances to next element in array.
// Returns nil at the end of iteration.
func (bi *baseIterator) Next() *SchedulingNode {
if (bi.countIdx + 1) > bi.size {
return nil
}
value := bi.nodes[bi.countIdx]
bi.countIdx++
return value
}
// Default iterator, wraps the base iterator.
// Iterates over the list from the start, position zero, to end.
type DefaultNodeIterator struct {
baseIterator
}
// Create a new default iterator
func NewDefaultNodeIterator(schedulerNodes []*SchedulingNode) *DefaultNodeIterator {
it := &DefaultNodeIterator{}
it.nodes = schedulerNodes
it.size = len(schedulerNodes)
return it
}
// Random iterator, wraps the base iterator
// Iterates over the list from a random starting position in the list.
// The iterator automatically wraps at the end of the list.
type RoundRobinNodeIterator struct {
baseIterator
startIdx int
}
// The starting point is randomised in the slice.
func NewRoundRobinNodeIterator(schedulerNodes []*SchedulingNode) *RoundRobinNodeIterator {
it := &RoundRobinNodeIterator{}
it.nodes = schedulerNodes
it.size = len(schedulerNodes)
if it.size > 0 {
it.startIdx = rand.Intn(it.size)
}
return it
}
// Next returns the next element and advances to next element in array.
// Returns nil at the end of iteration.
func (ri *RoundRobinNodeIterator) Next() *SchedulingNode {
// prevent panic on Next when slice is empty
if (ri.countIdx + 1) > ri.size {
return nil
}
// after reset initialize the rand seed based on number of nodes.
if ri.startIdx == -1 {
ri.startIdx = rand.Intn(ri.size)
}
idx := (ri.countIdx + ri.startIdx) % ri.size
value := ri.nodes[idx]
ri.countIdx++
return value
}
func (ri *RoundRobinNodeIterator) Reset() {
ri.countIdx = 0
ri.startIdx = -1
} | pkg/scheduler/node_iterator.go | 0.833562 | 0.411111 | node_iterator.go | starcoder |
package types
import (
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto"
)
// status of a validator
type BondStatus byte
// nolint
const (
Unbonded BondStatus = 0x00
Unbonding BondStatus = 0x01
Bonded BondStatus = 0x02
)
//BondStatusToString for pretty prints of Bond Status
func BondStatusToString(b BondStatus) string {
switch b {
case 0x00:
return "Unbonded"
case 0x01:
return "Unbonding"
case 0x02:
return "Bonded"
default:
panic("improper use of BondStatusToString")
}
}
// nolint
func (b BondStatus) Equal(b2 BondStatus) bool {
return byte(b) == byte(b2)
}
// validator for a delegated proof of stake system
type Validator interface {
GetJailed() bool // whether the validator is jailed
GetMoniker() string // moniker of the validator
GetStatus() BondStatus // status of the validator
GetOperator() ValAddress // operator address to receive/return validators coins
GetConsPubKey() crypto.PubKey // validation consensus pubkey
GetConsAddr() ConsAddress // validation consensus address
GetPower() Dec // validation power
GetTokens() Dec // validation tokens
GetCommission() Dec // validator commission rate
GetDelegatorShares() Dec // Total out standing delegator shares
GetBondHeight() int64 // height in which the validator became active
}
// validator which fulfills abci validator interface for use in Tendermint
func ABCIValidator(v Validator) abci.Validator {
return abci.Validator{
Address: v.GetConsPubKey().Address(),
Power: v.GetPower().RoundInt64(),
}
}
// properties for the set of all validators
type ValidatorSet interface {
// iterate through validators by operator address, execute func for each validator
IterateValidators(Context,
func(index int64, validator Validator) (stop bool))
// iterate through bonded validators by operator address, execute func for each validator
IterateBondedValidatorsByPower(Context,
func(index int64, validator Validator) (stop bool))
// iterate through the consensus validator set of the last block by operator address, execute func for each validator
IterateLastValidators(Context,
func(index int64, validator Validator) (stop bool))
Validator(Context, ValAddress) Validator // get a particular validator by operator address
ValidatorByConsAddr(Context, ConsAddress) Validator // get a particular validator by consensus address
TotalPower(Context) Dec // total power of the validator set
// slash the validator and delegators of the validator, specifying offence height, offence power, and slash fraction
Slash(Context, ConsAddress, int64, int64, Dec)
Jail(Context, ConsAddress) // jail a validator
Unjail(Context, ConsAddress) // unjail a validator
// Delegation allows for getting a particular delegation for a given validator
// and delegator outside the scope of the staking module.
Delegation(Context, AccAddress, ValAddress) Delegation
}
//_______________________________________________________________________________
// delegation bond for a delegated proof of stake system
type Delegation interface {
GetDelegatorAddr() AccAddress // delegator AccAddress for the bond
GetValidatorAddr() ValAddress // validator operator address
GetShares() Dec // amount of validator's shares held in this delegation
}
// properties for the set of all delegations for a particular
type DelegationSet interface {
GetValidatorSet() ValidatorSet // validator set for which delegation set is based upon
// iterate through all delegations from one delegator by validator-AccAddress,
// execute func for each validator
IterateDelegations(ctx Context, delegator AccAddress,
fn func(index int64, delegation Delegation) (stop bool))
}
//_______________________________________________________________________________
// Event Hooks
// These can be utilized to communicate between a staking keeper and another
// keeper which must take particular actions when validators/delegators change
// state. The second keeper must implement this interface, which then the
// staking keeper can call.
// TODO refactor event hooks out to the receiver modules
// event hooks for staking validator object
type StakingHooks interface {
OnValidatorCreated(ctx Context, valAddr ValAddress) // Must be called when a validator is created
OnValidatorModified(ctx Context, valAddr ValAddress) // Must be called when a validator's state changes
OnValidatorRemoved(ctx Context, consAddr ConsAddress, valAddr ValAddress) // Must be called when a validator is deleted
OnValidatorBonded(ctx Context, consAddr ConsAddress, valAddr ValAddress) // Must be called when a validator is bonded
OnValidatorBeginUnbonding(ctx Context, consAddr ConsAddress, valAddr ValAddress) // Must be called when a validator begins unbonding
OnValidatorPowerDidChange(ctx Context, consAddr ConsAddress, valAddr ValAddress) // Called at EndBlock when a validator's power did change
OnDelegationCreated(ctx Context, delAddr AccAddress, valAddr ValAddress) // Must be called when a delegation is created
OnDelegationSharesModified(ctx Context, delAddr AccAddress, valAddr ValAddress) // Must be called when a delegation's shares are modified
OnDelegationRemoved(ctx Context, delAddr AccAddress, valAddr ValAddress) // Must be called when a delegation is removed
} | types/stake.go | 0.512205 | 0.407451 | stake.go | starcoder |
package tree
import (
"sort"
"github.com/anchore/stereoscope/pkg/tree/node"
)
type NodeVisitor func(node.Node) error
type WalkConditions struct {
// Return true when the walker should stop traversing (before visiting current node)
ShouldTerminate func(node.Node) bool
// Whether we should visit the current node. Note: this will continue down the same traversal
// path, only "skipping" over a single node (but still potentially visiting children later)
// Return true to visit the current node.
ShouldVisit func(node.Node) bool
// Whether we should consider children of this node to be included in the traversal path.
// Return true to traverse children of this node.
ShouldContinueBranch func(node.Node) bool
}
// DepthFirstWalker implements stateful depth-first Tree traversal.
type DepthFirstWalker struct {
visitor NodeVisitor
tree Reader
stack node.Stack
visited node.Set
conditions WalkConditions
}
func NewDepthFirstWalker(reader Reader, visitor NodeVisitor) *DepthFirstWalker {
return &DepthFirstWalker{
visitor: visitor,
tree: reader,
visited: node.NewIDSet(),
}
}
func NewDepthFirstWalkerWithConditions(reader Reader, visitor NodeVisitor, conditions WalkConditions) *DepthFirstWalker {
return &DepthFirstWalker{
visitor: visitor,
tree: reader,
visited: node.NewIDSet(),
conditions: conditions,
}
}
func (w *DepthFirstWalker) Walk(from node.Node) (node.Node, error) {
w.stack.Push(from)
for w.stack.Size() > 0 {
current := w.stack.Pop()
if w.conditions.ShouldTerminate != nil && w.conditions.ShouldTerminate(current) {
return current, nil
}
cid := current.ID()
// visit
if w.visitor != nil && !w.visited.Contains(cid) {
if w.conditions.ShouldVisit == nil || w.conditions.ShouldVisit != nil && w.conditions.ShouldVisit(current) {
if err := w.visitor(current); err != nil {
return current, err
}
w.visited.Add(cid)
}
}
if w.conditions.ShouldContinueBranch != nil && !w.conditions.ShouldContinueBranch(current) {
continue
}
// enqueue children
children := w.tree.Children(current)
sort.Sort(sort.Reverse(children))
for _, child := range children {
w.stack.Push(child)
}
}
return nil, nil
}
func (w *DepthFirstWalker) WalkAll() error {
for _, from := range w.tree.Roots() {
if _, err := w.Walk(from); err != nil {
return err
}
}
return nil
}
func (w *DepthFirstWalker) Visited(n node.Node) bool {
return w.visited.Contains(n.ID())
} | pkg/tree/depth_first_walker.go | 0.762513 | 0.463991 | depth_first_walker.go | starcoder |
package ring
import (
"math/big"
"math/bits"
"unsafe"
)
// Scaler is an interface that rescales polynomial coefficients by a fraction t/Q.
type Scaler interface {
// DivByQOverTRounded returns p1 scaled by a factor t/Q and mod t on the receiver p2.
DivByQOverTRounded(p1, p2 *Poly)
}
// RNSScaler implements the Scaler interface by performing a scaling by t/Q in the RNS domain.
// This implementation of the Scaler interface is preferred over the SimpleScaler implementation.
type RNSScaler struct {
ringQ *Ring
polypoolT *Poly
qHalf *big.Int // (q-1)/2
qHalfModT uint64 // (q-1)/2 mod t
t uint64
qInv uint64 //(q mod t)^-1 mod t
mredParamsT uint64
paramsQP *modupParams
}
// NewRNSScaler creates a new SimpleScaler from t, the modulus under which the reconstruction is returned, the Ring in which the polynomial to reconstruct is represented.
func NewRNSScaler(t uint64, ringQ *Ring) (rnss *RNSScaler) {
rnss = new(RNSScaler)
rnss.ringQ = ringQ
rnss.mredParamsT = MRedParams(t)
rnss.polypoolT = NewPoly(ringQ.N, 1)
rnss.t = t
rnss.qHalf = new(big.Int)
rnss.qInv = rnss.qHalf.Mod(ringQ.ModulusBigint, NewUint(t)).Uint64()
rnss.qInv = ModExp(rnss.qInv, int(t-2), t)
rnss.qInv = MForm(rnss.qInv, t, BRedParams(t))
rnss.qHalf.Set(ringQ.ModulusBigint)
rnss.qHalf.Rsh(rnss.qHalf, 1)
rnss.qHalfModT = rnss.qHalf.Mod(rnss.qHalf, NewUint(t)).Uint64()
rnss.qHalf.Set(ringQ.ModulusBigint)
rnss.qHalf.Rsh(rnss.qHalf, 1)
rnss.paramsQP = basisextenderparameters(ringQ.Modulus, []uint64{t})
return
}
// DivByQOverTRounded returns p1 scaled by a factor t/Q and mod t on the receiver p2.
func (rnss *RNSScaler) DivByQOverTRounded(p1Q, p2T *Poly) {
ringQ := rnss.ringQ
T := rnss.t
p2tmp := p2T.Coeffs[0]
p3tmp := rnss.polypoolT.Coeffs[0]
mredParams := rnss.mredParamsT
qInv := T - rnss.qInv
qHalfModT := T - rnss.qHalfModT
// Multiply P_{Q} by t and extend the basis from P_{Q} to t*(P_{Q}||P_{t})
// Since the coefficients of P_{t} are multiplied by t, they are all zero,
// hence the basis extension can be omitted
ringQ.MulScalar(p1Q, T, p1Q)
// Center t*P_{Q} around (Q-1)/2 to round instead of floor during the division
ringQ.AddScalarBigint(p1Q, rnss.qHalf, p1Q)
// Extend the basis of (t*P_{Q} + (Q-1)/2) to (t*P_{t} + (Q-1)/2)
modUpExact(p1Q.Coeffs, rnss.polypoolT.Coeffs, rnss.paramsQP)
// Compute [Q^{-1} * (t*P_{t} - (t*P_{Q} - ((Q-1)/2 mod t)))] mod t which returns round(t/Q * P_{Q}) mod t
for j := 0; j < ringQ.N; j = j + 8 {
x := (*[8]uint64)(unsafe.Pointer(&p3tmp[j]))
z := (*[8]uint64)(unsafe.Pointer(&p2tmp[j]))
z[0] = MRed(qHalfModT+x[0], qInv, T, mredParams)
z[1] = MRed(qHalfModT+x[1], qInv, T, mredParams)
z[2] = MRed(qHalfModT+x[2], qInv, T, mredParams)
z[3] = MRed(qHalfModT+x[3], qInv, T, mredParams)
z[4] = MRed(qHalfModT+x[4], qInv, T, mredParams)
z[5] = MRed(qHalfModT+x[5], qInv, T, mredParams)
z[6] = MRed(qHalfModT+x[6], qInv, T, mredParams)
z[7] = MRed(qHalfModT+x[7], qInv, T, mredParams)
}
}
// SimpleScaler implements the Scaler interface by performing an RNS reconstruction and scaling by t/Q.
// This implementation of the Scaler interface is less efficient than the RNSScaler, but uses simple
// multi-precision arithmetic of the math/big package.
type SimpleScaler struct {
ringQ *Ring
r, one *big.Int
t uint64 // Plaintext modulus
tBI *big.Int
wi []uint64 // Integer parts of ([Q/Qi]^(-1))_{Qi} * t/Qi
ti []*big.Float
p1BI []*big.Int
reducealgoMul func(x, y uint64) uint64
reducealgoAdd func(x uint64) uint64
reducealgoAddParam uint64
reducealgoMulParam uint64
}
// SimpleScalerFloatPrecision is the precision in bits for the big.Float in the scaling by t/Q.
const SimpleScalerFloatPrecision = 80
// NewSimpleScaler creates a new SimpleScaler from t, the modulus under which the reconstruction is returned, and
// ringQ, the Ring in which the polynomial to reconstruct is represented.
func NewSimpleScaler(t uint64, ringQ *Ring) (ss *SimpleScaler) {
ss = new(SimpleScaler)
ss.r = new(big.Int)
ss.one = NewInt(1)
var tmp *big.Float
QiB := new(big.Int) // Qi
QiBF := new(big.Float) // Qi
QiStar := new(big.Int) // Q/Qi
QiBarre := new(big.Int) // (Q/Qi)^(-1) mod Qi
QiBarreBF := new(big.Float) // (Q/Qi)^(-1) mod Qi
tBF := new(big.Float).SetUint64(t)
ss.t = t
ss.tBI = new(big.Int).SetUint64(t)
ss.ringQ = ringQ
// Assign the correct reduction algorithm depending on the provided t
// If t is a power of 2
if (t&(t-1)) == 0 && t != 0 {
ss.reducealgoAddParam = t - 1
ss.reducealgoMulParam = t - 1
ss.reducealgoMul = func(x, y uint64) uint64 {
return (x * y) & ss.reducealgoAddParam
}
ss.reducealgoAdd = func(x uint64) uint64 {
return x & ss.reducealgoMulParam
}
// Otherwise, we can use Montgomery reduction
} else {
ss.reducealgoAddParam = BRedParams(t)[0]
ss.reducealgoMulParam = MRedParams(t)
ss.reducealgoMul = func(x, y uint64) uint64 {
ahi, alo := bits.Mul64(x, y)
R := alo * ss.reducealgoMulParam
H, _ := bits.Mul64(R, ss.t)
r := ahi - H + ss.t
if r >= ss.t {
r -= ss.t
}
return r
}
ss.reducealgoAdd = func(x uint64) uint64 {
s0, _ := bits.Mul64(x, ss.reducealgoAddParam)
r := x - s0*ss.t
if r >= ss.t {
r -= ss.t
}
return r
}
}
// Integer and rational parts of QiBarre * t/Qi
ss.wi = make([]uint64, len(ringQ.Modulus))
ss.ti = make([]*big.Float, len(ringQ.Modulus))
ss.p1BI = make([]*big.Int, ringQ.N)
for i := range ss.p1BI {
ss.p1BI[i] = new(big.Int)
ss.p1BI[i].Mul(ss.ringQ.ModulusBigint, ss.ringQ.ModulusBigint) // Extend to Q^2
}
for i, qi := range ringQ.Modulus {
QiB.SetUint64(qi)
QiBF.SetUint64(qi)
QiStar.Quo(ringQ.ModulusBigint, QiB)
QiBarre.ModInverse(QiStar, QiB)
QiBarre.Mod(QiBarre, QiB)
QiBarreBF.SetInt(QiBarre)
tmp = new(big.Float).Quo(tBF, QiBF)
tmp.Mul(tmp, QiBarreBF)
// floor( ([Q/Qi]^(-1))_{Qi} * t/Qi )
ss.wi[i], _ = tmp.Uint64()
// If t is not a power of 2, convert to Montgomery form
if (t&(t-1)) != 0 && t != 0 {
ss.wi[i] = MForm(ss.wi[i], t, BRedParams(t))
}
QiBarre.Mul(QiBarre, NewUint(t))
QiBarre.Mod(QiBarre, QiB)
QiBarreBF.SetInt(QiBarre)
ss.ti[i] = new(big.Float).SetPrec(SimpleScalerFloatPrecision).Quo(QiBarreBF, QiBF)
}
return
}
// DivByQOverTRounded returns p1 scaled by a factor t/Q and mod t on the receiver p2.
func (ss *SimpleScaler) DivByQOverTRounded(p1, p2 *Poly) {
ss.reconstructThenScale(p1, p2)
}
// reconstructThenScale performs the RNS reconstruction and scaling sequentially.
func (ss *SimpleScaler) reconstructThenScale(p1, p2 *Poly) {
// reconstruction
ss.ringQ.PolyToBigint(p1, ss.p1BI)
// scaling
for i, coeff := range ss.p1BI {
coeff.Mul(coeff, ss.tBI)
coeff.QuoRem(coeff, ss.ringQ.ModulusBigint, ss.r)
if ss.r.Lsh(ss.r, 1).CmpAbs(ss.ringQ.ModulusBigint) != -1 {
coeff.Add(coeff, ss.one)
}
for j := range p2.Coeffs {
p2.Coeffs[j][i] = coeff.Uint64()
}
}
}
// reconstructAndScale performs the RNS reconstruction and scaling operations in one single pass over the coefficients.
// Algorithm from https://eprint.iacr.org/2018/117.pdf.
func (ss *SimpleScaler) reconstructAndScale(p1, p2 *Poly) {
for i := 0; i < ss.ringQ.N; i++ {
var a uint64
var bBF big.Float
var p1j big.Float
for j := range ss.ringQ.Modulus {
// round(xi*wi + xi*ti)%t
a += ss.reducealgoMul(ss.wi[j], p1.Coeffs[j][i])
p1j.SetPrec(SimpleScalerFloatPrecision).SetUint64(p1.Coeffs[j][i])
bBF.SetPrec(SimpleScalerFloatPrecision).Add(&bBF, p1j.Mul(&p1j, ss.ti[j]))
}
bBF.Add(&bBF, new(big.Float).SetFloat64(0.5))
buint64, _ := bBF.Uint64()
abf := a + buint64
a = ss.reducealgoAdd(abf)
for j := 0; j < len(p2.Coeffs); j++ {
p2.Coeffs[j][i] = a
}
}
}
// ============== Scaling-related methods ==============
// DivFloorByLastModulusNTT divides (floored) the polynomial by its last modulus. The input must be in the NTT domain.
// Output poly level must be equal or one less than input level.
func (r *Ring) DivFloorByLastModulusNTT(p0, p1 *Poly) {
r.divFloorByLastModulusNTT(p0.Level(), p0, p1)
p1.Coeffs = p1.Coeffs[:p0.Level()]
}
func (r *Ring) divFloorByLastModulusNTT(level int, p0, p1 *Poly) {
pool0 := make([]uint64, len(p0.Coeffs[0]))
pool1 := make([]uint64, len(p0.Coeffs[0]))
InvNTTLazy(p0.Coeffs[level], pool0, r.N, r.NttPsiInv[level], r.NttNInv[level], r.Modulus[level], r.MredParams[level])
for i := 0; i < level; i++ {
NTTLazy(pool0, pool1, r.N, r.NttPsi[i], r.Modulus[i], r.MredParams[i], r.BredParams[i])
p0tmp := p0.Coeffs[i]
p1tmp := p1.Coeffs[i]
qi := r.Modulus[i]
twoqi := qi << 1
qInv := r.MredParams[i]
rescaleParams := r.RescaleParams[level-1][i]
// (x[i] - x[-1]) * InvQ
for j := 0; j < r.N; j = j + 8 {
x := (*[8]uint64)(unsafe.Pointer(&pool1[j]))
y := (*[8]uint64)(unsafe.Pointer(&p0tmp[j]))
z := (*[8]uint64)(unsafe.Pointer(&p1tmp[j]))
z[0] = MRed(twoqi-y[0]+x[0], rescaleParams, qi, qInv)
z[1] = MRed(twoqi-y[1]+x[1], rescaleParams, qi, qInv)
z[2] = MRed(twoqi-y[2]+x[2], rescaleParams, qi, qInv)
z[3] = MRed(twoqi-y[3]+x[3], rescaleParams, qi, qInv)
z[4] = MRed(twoqi-y[4]+x[4], rescaleParams, qi, qInv)
z[5] = MRed(twoqi-y[5]+x[5], rescaleParams, qi, qInv)
z[6] = MRed(twoqi-y[6]+x[6], rescaleParams, qi, qInv)
z[7] = MRed(twoqi-y[7]+x[7], rescaleParams, qi, qInv)
}
}
}
// DivFloorByLastModulus divides (floored) the polynomial by its last modulus.
// Output poly level must be equal or one less than input level.
func (r *Ring) DivFloorByLastModulus(p0, p1 *Poly) {
r.divFloorByLastModulus(p0.Level(), p0, p1)
p1.Coeffs = p1.Coeffs[:p0.Level()]
}
func (r *Ring) divFloorByLastModulus(level int, p0, p1 *Poly) {
for i := 0; i < level; i++ {
p0tmp := p0.Coeffs[level]
p1tmp := p0.Coeffs[i]
p2tmp := p1.Coeffs[i]
qi := r.Modulus[i]
twoqi := qi << 1
qInv := r.MredParams[i]
rescaleParams := r.RescaleParams[level-1][i]
// (x[i] - x[-1]) * InvQ
for j := 0; j < r.N; j = j + 8 {
x := (*[8]uint64)(unsafe.Pointer(&p0tmp[j]))
y := (*[8]uint64)(unsafe.Pointer(&p1tmp[j]))
z := (*[8]uint64)(unsafe.Pointer(&p2tmp[j]))
z[0] = MRed(twoqi-y[0]+x[0], rescaleParams, qi, qInv)
z[1] = MRed(twoqi-y[1]+x[1], rescaleParams, qi, qInv)
z[2] = MRed(twoqi-y[2]+x[2], rescaleParams, qi, qInv)
z[3] = MRed(twoqi-y[3]+x[3], rescaleParams, qi, qInv)
z[4] = MRed(twoqi-y[4]+x[4], rescaleParams, qi, qInv)
z[5] = MRed(twoqi-y[5]+x[5], rescaleParams, qi, qInv)
z[6] = MRed(twoqi-y[6]+x[6], rescaleParams, qi, qInv)
z[7] = MRed(twoqi-y[7]+x[7], rescaleParams, qi, qInv)
}
}
}
// DivFloorByLastModulusManyNTT divides (floored) sequentially nbRescales times the polynomial by its last modulus. Input must be in the NTT domain.
// Output poly level must be equal or nbRescales less than input level.
func (r *Ring) DivFloorByLastModulusManyNTT(p0, p1 *Poly, nbRescales int) {
level := p0.Level()
if nbRescales == 0 {
if p0 != p1 {
CopyValuesLvl(p1.Level(), p0, p1)
}
} else {
r.InvNTTLvl(level, p0, p1)
for i := 0; i < nbRescales; i++ {
r.divFloorByLastModulus(level-i, p1, p1)
}
p1.Coeffs = p1.Coeffs[:level-nbRescales+1]
r.NTTLvl(p1.Level(), p1, p1)
}
}
// DivFloorByLastModulusMany divides (floored) sequentially nbRescales times the polynomial by its last modulus.
// Output poly level must be equal or nbRescales less than input level.
func (r *Ring) DivFloorByLastModulusMany(p0, p1 *Poly, nbRescales int) {
level := p0.Level()
if nbRescales == 0 {
if p0 != p1 {
CopyValuesLvl(p1.Level(), p0, p1)
}
} else {
if nbRescales > 1 {
r.divFloorByLastModulus(level, p0, p1)
for i := 1; i < nbRescales; i++ {
if i == nbRescales-1 {
r.divFloorByLastModulus(level-i, p1, p1)
} else {
r.divFloorByLastModulus(level-i, p1, p1)
}
}
} else {
r.divFloorByLastModulus(level, p0, p1)
}
p1.Coeffs = p1.Coeffs[:level-nbRescales+1]
}
}
// DivRoundByLastModulusNTT divides (rounded) the polynomial by its last modulus. The input must be in the NTT domain.
// Output poly level must be equal or one less than input level.
func (r *Ring) DivRoundByLastModulusNTT(p0, p1 *Poly) {
r.divRoundByLastModulusNTT(p0.Level(), p0, p1)
p1.Coeffs = p1.Coeffs[:p0.Level()]
}
func (r *Ring) divRoundByLastModulusNTT(level int, p0, p1 *Poly) {
var pHalf, pHalfNegQi uint64
pool0 := make([]uint64, len(p0.Coeffs[0]))
pool1 := make([]uint64, len(p0.Coeffs[0]))
InvNTT(p0.Coeffs[level], pool0, r.N, r.NttPsiInv[level], r.NttNInv[level], r.Modulus[level], r.MredParams[level])
// Center by (p-1)/2
pj := r.Modulus[level]
pHalf = (pj - 1) >> 1
for i := 0; i < r.N; i = i + 8 {
z := (*[8]uint64)(unsafe.Pointer(&pool0[i]))
z[0] = CRed(z[0]+pHalf, pj)
z[1] = CRed(z[1]+pHalf, pj)
z[2] = CRed(z[2]+pHalf, pj)
z[3] = CRed(z[3]+pHalf, pj)
z[4] = CRed(z[4]+pHalf, pj)
z[5] = CRed(z[5]+pHalf, pj)
z[6] = CRed(z[6]+pHalf, pj)
z[7] = CRed(z[7]+pHalf, pj)
}
for i := 0; i < level; i++ {
p0tmp := p0.Coeffs[i]
p1tmp := p1.Coeffs[i]
qi := r.Modulus[i]
twoqi := qi << 1
qInv := r.MredParams[i]
bredParams := r.BredParams[i]
nttPsi := r.NttPsi[i]
rescaleParams := r.RescaleParams[level-1][i]
pHalfNegQi = r.Modulus[i] - BRedAdd(pHalf, qi, bredParams)
for j := 0; j < r.N; j = j + 8 {
x := (*[8]uint64)(unsafe.Pointer(&pool0[j]))
z := (*[8]uint64)(unsafe.Pointer(&pool1[j]))
z[0] = x[0] + pHalfNegQi
z[1] = x[1] + pHalfNegQi
z[2] = x[2] + pHalfNegQi
z[3] = x[3] + pHalfNegQi
z[4] = x[4] + pHalfNegQi
z[5] = x[5] + pHalfNegQi
z[6] = x[6] + pHalfNegQi
z[7] = x[7] + pHalfNegQi
}
NTTLazy(pool1, pool1, r.N, nttPsi, qi, qInv, bredParams)
// (x[i] - x[-1]) * InvQ
for j := 0; j < r.N; j = j + 8 {
x := (*[8]uint64)(unsafe.Pointer(&pool1[j]))
y := (*[8]uint64)(unsafe.Pointer(&p0tmp[j]))
z := (*[8]uint64)(unsafe.Pointer(&p1tmp[j]))
z[0] = MRed(twoqi+x[0]-y[0], rescaleParams, qi, qInv)
z[1] = MRed(twoqi+x[1]-y[1], rescaleParams, qi, qInv)
z[2] = MRed(twoqi+x[2]-y[2], rescaleParams, qi, qInv)
z[3] = MRed(twoqi+x[3]-y[3], rescaleParams, qi, qInv)
z[4] = MRed(twoqi+x[4]-y[4], rescaleParams, qi, qInv)
z[5] = MRed(twoqi+x[5]-y[5], rescaleParams, qi, qInv)
z[6] = MRed(twoqi+x[6]-y[6], rescaleParams, qi, qInv)
z[7] = MRed(twoqi+x[7]-y[7], rescaleParams, qi, qInv)
}
}
}
// DivRoundByLastModulus divides (rounded) the polynomial by its last modulus. The input must be in the NTT domain.
// Output poly level must be equal or one less than input level.
func (r *Ring) DivRoundByLastModulus(p0, p1 *Poly) {
r.divRoundByLastModulus(p0.Level(), p0, p1)
p1.Coeffs = p1.Coeffs[:p0.Level()]
}
func (r *Ring) divRoundByLastModulus(level int, p0, p1 *Poly) {
var pHalf, pHalfNegQi uint64
// Center by (p-1)/2
pHalf = (r.Modulus[level] - 1) >> 1
p0tmp := p0.Coeffs[level]
pj := r.Modulus[level]
for i := 0; i < r.N; i = i + 8 {
x := (*[8]uint64)(unsafe.Pointer(&p0tmp[i]))
x[0] = CRed(x[0]+pHalf, pj)
x[1] = CRed(x[1]+pHalf, pj)
x[2] = CRed(x[2]+pHalf, pj)
x[3] = CRed(x[3]+pHalf, pj)
x[4] = CRed(x[4]+pHalf, pj)
x[5] = CRed(x[5]+pHalf, pj)
x[6] = CRed(x[6]+pHalf, pj)
x[7] = CRed(x[7]+pHalf, pj)
}
for i := 0; i < level; i++ {
p1tmp := p0.Coeffs[i]
p2tmp := p1.Coeffs[i]
qi := r.Modulus[i]
twoqi := qi << 1
qInv := r.MredParams[i]
bredParams := r.BredParams[i]
rescaleParams := r.RescaleParams[level-1][i]
pHalfNegQi = r.Modulus[i] - BRedAdd(pHalf, qi, bredParams)
// (x[i] - x[-1]) * InvQ
for j := 0; j < r.N; j = j + 8 {
x := (*[8]uint64)(unsafe.Pointer(&p0tmp[j]))
y := (*[8]uint64)(unsafe.Pointer(&p1tmp[j]))
z := (*[8]uint64)(unsafe.Pointer(&p2tmp[j]))
z[0] = MRed(x[0]+pHalfNegQi+twoqi-y[0], rescaleParams, qi, qInv)
z[1] = MRed(x[1]+pHalfNegQi+twoqi-y[1], rescaleParams, qi, qInv)
z[2] = MRed(x[2]+pHalfNegQi+twoqi-y[2], rescaleParams, qi, qInv)
z[3] = MRed(x[3]+pHalfNegQi+twoqi-y[3], rescaleParams, qi, qInv)
z[4] = MRed(x[4]+pHalfNegQi+twoqi-y[4], rescaleParams, qi, qInv)
z[5] = MRed(x[5]+pHalfNegQi+twoqi-y[5], rescaleParams, qi, qInv)
z[6] = MRed(x[6]+pHalfNegQi+twoqi-y[6], rescaleParams, qi, qInv)
z[7] = MRed(x[7]+pHalfNegQi+twoqi-y[7], rescaleParams, qi, qInv)
}
}
}
// DivRoundByLastModulusManyNTT divides (rounded) sequentially nbRescales times the polynomial by its last modulus. The input must be in the NTT domain.
// Output poly level must be equal or nbRescales less than input level.
func (r *Ring) DivRoundByLastModulusManyNTT(p0, p1 *Poly, nbRescales int) {
level := p0.Level()
if nbRescales == 0 {
if p0 != p1 {
CopyValuesLvl(p1.Level(), p0, p1)
}
} else {
if nbRescales > 1 {
r.InvNTTLvl(level, p0, p1)
for i := 0; i < nbRescales; i++ {
r.divRoundByLastModulus(level-i, p1, p1)
}
r.NTTLvl(p1.Level(), p1, p1)
} else {
r.divRoundByLastModulusNTT(level, p0, p1)
}
p1.Coeffs = p1.Coeffs[:level-nbRescales+1]
}
}
// DivRoundByLastModulusMany divides (rounded) sequentially nbRescales times the polynomial by its last modulus.
// Output poly level must be equal or nbRescales less than input level.
func (r *Ring) DivRoundByLastModulusMany(p0, p1 *Poly, nbRescales int) {
level := p0.Level()
if nbRescales == 0 {
if p0 != p1 {
CopyValuesLvl(p1.Level(), p0, p1)
}
} else {
if nbRescales > 1 {
r.divRoundByLastModulus(level, p0, p1)
for i := 1; i < nbRescales; i++ {
if i == nbRescales-1 {
r.divRoundByLastModulus(level-i, p1, p1)
} else {
r.divRoundByLastModulus(level-i, p1, p1)
}
}
} else {
r.divRoundByLastModulus(level, p0, p1)
}
p1.Coeffs = p1.Coeffs[:level-nbRescales+1]
}
} | ring/ring_scaling.go | 0.824214 | 0.495117 | ring_scaling.go | starcoder |
package agozon
var LocaleITMap = map[string]LocaleSearchIndex{
"All": LocaleIT.All, "Apparel": LocaleIT.Apparel, "Automotive": LocaleIT.Automotive, "Baby": LocaleIT.Baby,
"Books": LocaleIT.Books, "DVD": LocaleIT.DVD, "Electronics": LocaleIT.Electronics, "ForeignBooks": LocaleIT.ForeignBooks, "Garden": LocaleIT.Garden,
"GiftCards": LocaleIT.GiftCards, "Jewelry": LocaleIT.Jewelry, "KindleStore": LocaleIT.KindleStore, "Kitchen": LocaleIT.Kitchen, "Lighting": LocaleIT.Lighting,
"Luggage": LocaleIT.Luggage, "MP3Downloads": LocaleIT.MP3Downloads, "MobileApps": LocaleIT.MobileApps, "Music": LocaleIT.Music, "MusicalInstruments": LocaleIT.MusicalInstruments, "OfficeProducts": LocaleIT.OfficeProducts, "PCHardware": LocaleIT.PCHardware,
"Shoes": LocaleIT.Shoes, "Software": LocaleIT.Software, "SportingGoods": LocaleIT.SportingGoods, "Tools": LocaleIT.Tools, "Toys": LocaleIT.Toys, "VideoGames": LocaleIT.VideoGames, "Watches": LocaleIT.Watches,
}
var LocaleIT = struct {
All, Apparel, Automotive, Baby,
Books, DVD, Electronics, ForeignBooks, Garden,
GiftCards, Jewelry, KindleStore, Kitchen, Lighting,
Luggage, MP3Downloads, MobileApps, Music, MusicalInstruments, OfficeProducts, PCHardware,
Shoes, Software, SportingGoods, Tools, Toys, VideoGames, Watches LocaleSearchIndex
}{
Baby: LocaleSearchIndex{
BrowseNode: 1571287031,
SortValues: []string{"-price", "price", "relevancerank", "reviewrank", "salesrank"},
ItemSearchParameters: []string{"Author", "Availability", "Brand", "ItemPage", "Keywords", "Manufacturer", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Sort", "Title"},
},
Lighting: LocaleSearchIndex{
BrowseNode: 1571293031,
SortValues: []string{"-price", "price", "relevancerank", "reviewrank", "salesrank"},
ItemSearchParameters: []string{"Availability", "Brand", "ItemPage", "Keywords", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Sort", "Title"},
},
Watches: LocaleSearchIndex{
BrowseNode: 524010031,
SortValues: []string{"-price", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Availability", "ItemPage", "Keywords", "MerchantId", "MinPercentageOff", "Sort", "Title"},
},
All: LocaleSearchIndex{
BrowseNode: 0,
SortValues: []string{},
ItemSearchParameters: []string{"Availability", "ItemPage", "Keywords", "MerchantId"},
},
Books: LocaleSearchIndex{
BrowseNode: 411664031,
SortValues: []string{"-price", "-pubdate", "-publication_date", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Author", "Availability", "ItemPage", "Keywords", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Power", "Publisher", "Sort", "Title"},
},
Shoes: LocaleSearchIndex{
BrowseNode: 524007031,
SortValues: []string{"-launch-date", "-price", "inverse-pricerank", "price", "pricerank", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Availability", "Brand", "ItemPage", "Keywords", "Manufacturer", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Sort", "Title"},
},
Electronics: LocaleSearchIndex{
BrowseNode: 412610031,
SortValues: []string{"-price", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Availability", "ItemPage", "Keywords", "Manufacturer", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Sort", "Title"},
},
Kitchen: LocaleSearchIndex{
BrowseNode: 524016031,
SortValues: []string{"-price", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Author", "Availability", "Brand", "ItemPage", "Keywords", "Manufacturer", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Sort", "Title"},
},
MobileApps: LocaleSearchIndex{
BrowseNode: 1661661031,
SortValues: []string{"-price", "pmrank", "price", "relevancerank", "reviewrank", "reviewrank_authority"},
ItemSearchParameters: []string{"Author", "Availability", "Brand", "ItemPage", "Keywords", "Manufacturer", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Sort", "Title"},
},
Toys: LocaleSearchIndex{
BrowseNode: 523998031,
SortValues: []string{"-price", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Availability", "ItemPage", "Keywords", "MerchantId", "MinPercentageOff", "Sort", "Title"},
},
Apparel: LocaleSearchIndex{
BrowseNode: 0,
SortValues: []string{"-price", "price", "relevancerank", "reviewrank", "salesrank"},
ItemSearchParameters: []string{"Author", "Availability", "Brand", "ItemPage", "Keywords", "Manufacturer", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Sort", "Title"},
},
Garden: LocaleSearchIndex{
BrowseNode: 635017031,
SortValues: []string{"-price", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Author", "Availability", "Brand", "ItemPage", "Keywords", "Manufacturer", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Neighborhood", "Sort", "Title"},
},
GiftCards: LocaleSearchIndex{
BrowseNode: 0,
SortValues: []string{"-price", "date-desc-rank", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Artist", "Availability", "Keywords", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice"},
},
OfficeProducts: LocaleSearchIndex{
BrowseNode: 0,
SortValues: []string{"-price", "date-desc-rank", "price", "relevancerank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Availability", "Brand", "ItemPage", "Keywords", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Sort", "Title"},
},
PCHardware: LocaleSearchIndex{
BrowseNode: 425917031,
SortValues: []string{"-price", "date-desc-rank", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Author", "Availability", "Brand", "ItemPage", "Keywords", "Manufacturer", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Sort", "Title"},
},
DVD: LocaleSearchIndex{
BrowseNode: 412607031,
SortValues: []string{"-price", "-releasedate", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Actor", "AudienceRating", "Availability", "Director", "ItemPage", "Keywords", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Publisher", "Sort", "Title"},
},
ForeignBooks: LocaleSearchIndex{
BrowseNode: 433843031,
SortValues: []string{"-price", "-pubdate", "-publication_date", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Author", "Availability", "ItemPage", "Keywords", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Power", "Publisher", "Sort", "Title"},
},
SportingGoods: LocaleSearchIndex{
BrowseNode: 524013031,
SortValues: []string{"-price", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Availability", "ItemPage", "Keywords", "MerchantId", "MinPercentageOff", "Sort", "Title"},
},
Automotive: LocaleSearchIndex{
BrowseNode: 1571281031,
SortValues: []string{"-price", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Availability", "Brand", "ItemPage", "Keywords", "Manufacturer", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Sort", "Title"},
},
Jewelry: LocaleSearchIndex{
BrowseNode: 2454164031,
SortValues: []string{"-price", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Availability", "ItemPage", "Keywords", "MerchantId", "MinPercentageOff", "Sort", "Title"},
},
Music: LocaleSearchIndex{
BrowseNode: 412601031,
SortValues: []string{"-price", "-releasedate", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Artist", "Availability", "ItemPage", "Keywords", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Sort", "Title"},
},
MusicalInstruments: LocaleSearchIndex{
BrowseNode: 0,
SortValues: []string{"-price", "-release-date", "popularityrank", "price", "relevancerank", "reviewrank"},
ItemSearchParameters: []string{"Author", "Availability", "Brand", "ItemPage", "Keywords", "Manufacturer", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Sort", "Title"},
},
VideoGames: LocaleSearchIndex{
BrowseNode: 412604031,
SortValues: []string{"-price", "-releasedate", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Author", "Availability", "Brand", "ItemPage", "Keywords", "Manufacturer", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Sort", "Title"},
},
Luggage: LocaleSearchIndex{
BrowseNode: 2454149031,
SortValues: []string{"-price", "date-desc-rank", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Availability", "Brand", "ItemPage", "Keywords", "Manufacturer", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Sort", "Title"},
},
KindleStore: LocaleSearchIndex{
BrowseNode: 1331141031,
SortValues: []string{"-edition-sales-velocity", "-price", "daterank", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Author", "Availability", "ItemPage", "Keywords", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Publisher", "Sort", "Title"},
},
MP3Downloads: LocaleSearchIndex{
BrowseNode: 1748204031,
SortValues: []string{"-albumrank", "-artistalbumrank", "-price", "-releasedate", "-runtime", "-titlerank", "albumrank", "artistalbumrank", "price", "relevancerank", "reviewrank", "reviewrank_authority", "runtime", "salesrank", "titlerank"},
ItemSearchParameters: []string{"Availability", "ItemPage", "Keywords", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Sort", "Title"},
},
Software: LocaleSearchIndex{
BrowseNode: 412613031,
SortValues: []string{"-price", "-releasedate", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Author", "Availability", "Brand", "ItemPage", "Keywords", "Manufacturer", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Sort", "Title"},
},
Tools: LocaleSearchIndex{
BrowseNode: 2454161031,
SortValues: []string{"-price", "date-desc-rank", "price", "relevancerank", "reviewrank", "reviewrank_authority", "salesrank"},
ItemSearchParameters: []string{"Actor", "Artist", "AudienceRating", "Author", "Availability", "Brand", "Composer", "Conductor", "Director", "ItemPage", "Keywords", "Manufacturer", "MaximumPrice", "MerchantId", "MinPercentageOff", "MinimumPrice", "Neighborhood", "Orchestra", "Power", "Publisher", "ReleaseDate", "Sort", "Title"}}} | LocaleIT.go | 0.544075 | 0.402686 | LocaleIT.go | starcoder |
package paramsets
import (
"go.skia.org/infra/go/paramtools"
"go.skia.org/infra/golden/go/digest_counter"
"go.skia.org/infra/golden/go/shared"
"go.skia.org/infra/golden/go/tiling"
"go.skia.org/infra/golden/go/types"
)
// ParamSummary keep precalculated paramsets for each test, digest pair.
// It is considered immutable and thread-safe.
type ParamSummary interface {
// Get returns the paramset for the given digest.
Get(test types.TestName, digest types.Digest) paramtools.ParamSet
// GetByTest returns the parameter sets organized by tests and digests.
GetByTest() map[types.TestName]map[types.Digest]paramtools.ParamSet
}
// ParamSummaryImpl implements the ParamSummary interface.
type ParamSummaryImpl struct {
byTest map[types.TestName]map[types.Digest]paramtools.ParamSet
}
// byTestForTile calculates all the paramsets from the given tile and tallies.
func byTestForTile(tile *tiling.Tile, digestCountsByTrace map[tiling.TraceID]digest_counter.DigestCount) map[types.TestName]map[types.Digest]paramtools.ParamSet {
ret := map[types.TestName]map[types.Digest]paramtools.ParamSet{}
for id, dc := range digestCountsByTrace {
if tr, ok := tile.Traces[id]; ok {
test := tr.TestName()
ko := tr.KeysAndOptions()
for digest := range dc {
if foundTest, ok := ret[test]; !ok {
ret[test] = map[types.Digest]paramtools.ParamSet{
digest: paramtools.NewParamSet(ko),
}
} else if foundDigest, ok := foundTest[digest]; !ok {
foundTest[digest] = paramtools.NewParamSet(ko)
} else {
foundDigest.AddParams(ko)
}
}
}
}
// Normalize the data so clients don't have to.
for _, byDigest := range ret {
for _, ps := range byDigest {
ps.Normalize()
}
}
return ret
}
// NewParamSummary creates a new ParamSummaryImpl.
func NewParamSummary(tile *tiling.Tile, dCounter digest_counter.DigestCounter) *ParamSummaryImpl {
defer shared.NewMetricsTimer("param_summary_calculate").Stop()
p := &ParamSummaryImpl{
byTest: byTestForTile(tile, dCounter.ByTrace()),
}
return p
}
// Get implements the ParamSummaryImpl interface.
func (s *ParamSummaryImpl) Get(test types.TestName, digest types.Digest) paramtools.ParamSet {
if foundTest, ok := s.byTest[test]; ok {
return foundTest[digest]
}
return nil
}
// GetByTest implements the ParamSummaryImpl interface.
func (s *ParamSummaryImpl) GetByTest() map[types.TestName]map[types.Digest]paramtools.ParamSet {
return s.byTest
} | golden/go/paramsets/paramsets.go | 0.620852 | 0.432243 | paramsets.go | starcoder |
package main
var readmeText = `
This document is an attempt to document the way that bk backs up data in
sufficient detail so that (if ever necessary), it's possible to restore a
backup from a bk repository even without the existing bk source code. We'll
proceed in bottom-up fashion from the low-level storage systems up to the
backup-specific representations built on top of them.
# Storage Format (both on-disk and GCS)
The main task of the bk storage systems is to take chunks of data, store
them safely, and return hashes that identify them. bk uses SHAKE256 to hash
chunks (though that doesn't matter for restoring) and then uses 32 bytes
worth of hash for each chunk.
The packs/ directory stores pack files, which store a series of blobs.
Each blob is stored starting with the 4-byte string "BL0B". Next is the
length of the chunk stored using go's binary.PutVarint followed by the
chunk's data.
The filenames of blob files are arbitrary. Each blob file has a
corresponding index file in the indices/ directory. Index files allow us to
efficiently find out which blob hashes are already stored and where the
corresponding blobs are in pack files.
Each index in an index file starts with the magic number "Idx2", then 32
bytes of the corresponding chunk's hash, the offset in the pack file where
the chunk starts and the length of the chunk (both also encoded using
binary.PutVaring).
Note that the index files can be reconstructed from the pack file contents
alone.
# Reed-Solomon encoding
All files stored on disk are coded with Reed-Solomon encoding. The
Reed-Solomon parity information is stored in a .rs file for each regular
file. The .rs files are based on the Go "gob" encoding package; they just
store the following structure:
const HashSize = 64
type Hash [HashSize]byte
type ReedSolomonFile struct {
// Size of the original file
FileSize int64
NDataShards, NParityShards int
HashRate int64
Hashes [][]Hash // First the data hashes, then the parity hashes.
ParityShards [][]byte
}
# Compression and Encryption
Chunks in pack files are compressed using gzip if doing so makes them
smaller. The first byte of each chunk is one if it was compressed and is
zero if it's uncompressed.
Chunks may be encrypted as well; encryption is appied *after* gzip
compression (otherwise compression would be useless) and so decryption
should be applied before decompression during restore. If encryption is
used, each chunk starts with a random 16 byte initialization vector. Chunk
data is encrypted using the go standard library's implementation of the AES
encryption algorithm.
To get the decryption key: First, the file metadata/encrypt.txt has four
hex-encoded values. In order: a salt, the hash of the passphrase, the
encrypted key, and the IV used to encrypt the encryption key.
Given the passphrase from the user, a 64-byte derived key is computed using
65536 rounds of pbkdf2:
derivedKey := pbkdf2.Key([]byte(passphrase), salt, 65536, 64, sha256.New)
The first 32 bytes of the result should match the passphrase hash in
encrypt.txt. The last 32 bytes give the decryption key to use to decrypt
the encrypted key from encrypt.txt. (Again, using go's AES implementation.)
# Backing up bistreams
Each bitstream backup (as done using "bk savebits") has an associated file
in the metadata directory of the form metadata/bits-*. That file stores a
the hash for the root of a Merkle hash tree, where the first 32 bytes give
the hash of a chunk in the storage system and the last bytes gives the
depth of the Merkle hash tree--if zero, then the associated hash refers to
the actual data for the stored bitstream; if one, then the data associated
with the hash is itself a series of 32-byte hashes; reading and
concatenating their data gives the bitstream, and so forth.
# Backing up directory hierarchies
Each file system backup has a 32-byte hash stored in a metadata/backups-*
file. The data associated with that hash is in turn a BackupRoot,
represented as
type BackupRoot struct {
Dir DirEntry
Time time.Time
}
and encoded using go's "gob" encode. Dir refers to the root of the
hierarchy and is a gob-encoded instance of this structure:
type DirEntry struct {
// Just the file name, not its full path.
Name string
// If non-nil, stores the file's contents. Empty files have nil
// contents and an invalid hash, so it's important to check the Size
// before trying to make use of either. Symlink targets are always
// stored here.
Contents []byte
// For a file, if Contents is nil, Hash points to its contents. For a
// directory, it gives the serialized []DirEntry for the files in a
// directory.
Hash storage.MerkleHash
// Not used for directories or symlinks.
Size int64
ModTime time.Time
Mode os.FileMode
}
The MerkleHash values are encoded as described in "Backing up bitstreams."
` | cmd/bk/readme.go | 0.699254 | 0.682838 | readme.go | starcoder |
package owl
import (
"github.com/meowpub/meow/ld"
)
// The property that determines the class that a universal property restriction refers to.
func GetAllValuesFrom(e ld.Entity) interface{} { return e.Get(Prop_AllValuesFrom.ID) }
func SetAllValuesFrom(e ld.Entity, v interface{}) { e.Set(Prop_AllValuesFrom.ID, v) }
// The property that determines the predicate of an annotated axiom or annotated annotation.
func GetAnnotatedProperty(e ld.Entity) interface{} { return e.Get(Prop_AnnotatedProperty.ID) }
func SetAnnotatedProperty(e ld.Entity, v interface{}) { e.Set(Prop_AnnotatedProperty.ID, v) }
// The property that determines the subject of an annotated axiom or annotated annotation.
func GetAnnotatedSource(e ld.Entity) interface{} { return e.Get(Prop_AnnotatedSource.ID) }
func SetAnnotatedSource(e ld.Entity, v interface{}) { e.Set(Prop_AnnotatedSource.ID, v) }
// The property that determines the object of an annotated axiom or annotated annotation.
func GetAnnotatedTarget(e ld.Entity) interface{} { return e.Get(Prop_AnnotatedTarget.ID) }
func SetAnnotatedTarget(e ld.Entity, v interface{}) { e.Set(Prop_AnnotatedTarget.ID, v) }
// The property that determines the predicate of a negative property assertion.
func GetAssertionProperty(e ld.Entity) interface{} { return e.Get(Prop_AssertionProperty.ID) }
func SetAssertionProperty(e ld.Entity, v interface{}) { e.Set(Prop_AssertionProperty.ID, v) }
// The annotation property that indicates that a given ontology is backward compatible with another ontology.
func GetBackwardCompatibleWith(e ld.Entity) interface{} { return e.Get(Prop_BackwardCompatibleWith.ID) }
func SetBackwardCompatibleWith(e ld.Entity, v interface{}) { e.Set(Prop_BackwardCompatibleWith.ID, v) }
// The data property that does not relate any individual to any data value.
func GetBottomDataProperty(e ld.Entity) interface{} { return e.Get(Prop_BottomDataProperty.ID) }
func SetBottomDataProperty(e ld.Entity, v interface{}) { e.Set(Prop_BottomDataProperty.ID, v) }
// The object property that does not relate any two individuals.
func GetBottomObjectProperty(e ld.Entity) interface{} { return e.Get(Prop_BottomObjectProperty.ID) }
func SetBottomObjectProperty(e ld.Entity, v interface{}) { e.Set(Prop_BottomObjectProperty.ID, v) }
// The property that determines the cardinality of an exact cardinality restriction.
func GetCardinality(e ld.Entity) interface{} { return e.Get(Prop_Cardinality.ID) }
func SetCardinality(e ld.Entity, v interface{}) { e.Set(Prop_Cardinality.ID, v) }
// The property that determines that a given class is the complement of another class.
func GetComplementOf(e ld.Entity) interface{} { return e.Get(Prop_ComplementOf.ID) }
func SetComplementOf(e ld.Entity, v interface{}) { e.Set(Prop_ComplementOf.ID, v) }
// The property that determines that a given data range is the complement of another data range with respect to the data domain.
func GetDatatypeComplementOf(e ld.Entity) interface{} { return e.Get(Prop_DatatypeComplementOf.ID) }
func SetDatatypeComplementOf(e ld.Entity, v interface{}) { e.Set(Prop_DatatypeComplementOf.ID, v) }
// The annotation property that indicates that a given entity has been deprecated.
func GetDeprecated(e ld.Entity) interface{} { return e.Get(Prop_Deprecated.ID) }
func SetDeprecated(e ld.Entity, v interface{}) { e.Set(Prop_Deprecated.ID, v) }
// The property that determines that two given individuals are different.
func GetDifferentFrom(e ld.Entity) interface{} { return e.Get(Prop_DifferentFrom.ID) }
func SetDifferentFrom(e ld.Entity, v interface{}) { e.Set(Prop_DifferentFrom.ID, v) }
// The property that determines that a given class is equivalent to the disjoint union of a collection of other classes.
func GetDisjointUnionOf(e ld.Entity) interface{} { return e.Get(Prop_DisjointUnionOf.ID) }
func SetDisjointUnionOf(e ld.Entity, v interface{}) { e.Set(Prop_DisjointUnionOf.ID, v) }
// The property that determines that two given classes are disjoint.
func GetDisjointWith(e ld.Entity) interface{} { return e.Get(Prop_DisjointWith.ID) }
func SetDisjointWith(e ld.Entity, v interface{}) { e.Set(Prop_DisjointWith.ID, v) }
// The property that determines the collection of pairwise different individuals in a owl:AllDifferent axiom.
func GetDistinctMembers(e ld.Entity) interface{} { return e.Get(Prop_DistinctMembers.ID) }
func SetDistinctMembers(e ld.Entity, v interface{}) { e.Set(Prop_DistinctMembers.ID, v) }
// The property that determines that two given classes are equivalent, and that is used to specify datatype definitions.
func GetEquivalentClass(e ld.Entity) interface{} { return e.Get(Prop_EquivalentClass.ID) }
func SetEquivalentClass(e ld.Entity, v interface{}) { e.Set(Prop_EquivalentClass.ID, v) }
// The property that determines that two given properties are equivalent.
func GetEquivalentProperty(e ld.Entity) interface{} { return e.Get(Prop_EquivalentProperty.ID) }
func SetEquivalentProperty(e ld.Entity, v interface{}) { e.Set(Prop_EquivalentProperty.ID, v) }
// The property that determines the collection of properties that jointly build a key.
func GetHasKey(e ld.Entity) interface{} { return e.Get(Prop_HasKey.ID) }
func SetHasKey(e ld.Entity, v interface{}) { e.Set(Prop_HasKey.ID, v) }
// The property that determines the property that a self restriction refers to.
func GetHasSelf(e ld.Entity) interface{} { return e.Get(Prop_HasSelf.ID) }
func SetHasSelf(e ld.Entity, v interface{}) { e.Set(Prop_HasSelf.ID, v) }
// The property that determines the individual that a has-value restriction refers to.
func GetHasValue(e ld.Entity) interface{} { return e.Get(Prop_HasValue.ID) }
func SetHasValue(e ld.Entity, v interface{}) { e.Set(Prop_HasValue.ID, v) }
// The property that is used for importing other ontologies into a given ontology.
func GetImports(e ld.Entity) interface{} { return e.Get(Prop_Imports.ID) }
func SetImports(e ld.Entity, v interface{}) { e.Set(Prop_Imports.ID, v) }
// The annotation property that indicates that a given ontology is incompatible with another ontology.
func GetIncompatibleWith(e ld.Entity) interface{} { return e.Get(Prop_IncompatibleWith.ID) }
func SetIncompatibleWith(e ld.Entity, v interface{}) { e.Set(Prop_IncompatibleWith.ID, v) }
// The property that determines the collection of classes or data ranges that build an intersection.
func GetIntersectionOf(e ld.Entity) interface{} { return e.Get(Prop_IntersectionOf.ID) }
func SetIntersectionOf(e ld.Entity, v interface{}) { e.Set(Prop_IntersectionOf.ID, v) }
// The property that determines that two given properties are inverse.
func GetInverseOf(e ld.Entity) interface{} { return e.Get(Prop_InverseOf.ID) }
func SetInverseOf(e ld.Entity, v interface{}) { e.Set(Prop_InverseOf.ID, v) }
// The property that determines the cardinality of a maximum cardinality restriction.
func GetMaxCardinality(e ld.Entity) interface{} { return e.Get(Prop_MaxCardinality.ID) }
func SetMaxCardinality(e ld.Entity, v interface{}) { e.Set(Prop_MaxCardinality.ID, v) }
// The property that determines the cardinality of a maximum qualified cardinality restriction.
func GetMaxQualifiedCardinality(e ld.Entity) interface{} {
return e.Get(Prop_MaxQualifiedCardinality.ID)
}
func SetMaxQualifiedCardinality(e ld.Entity, v interface{}) { e.Set(Prop_MaxQualifiedCardinality.ID, v) }
// The property that determines the collection of members in either a owl:AllDifferent, owl:AllDisjointClasses or owl:AllDisjointProperties axiom.
func GetMembers(e ld.Entity) interface{} { return e.Get(Prop_Members.ID) }
func SetMembers(e ld.Entity, v interface{}) { e.Set(Prop_Members.ID, v) }
// The property that determines the cardinality of a minimum cardinality restriction.
func GetMinCardinality(e ld.Entity) interface{} { return e.Get(Prop_MinCardinality.ID) }
func SetMinCardinality(e ld.Entity, v interface{}) { e.Set(Prop_MinCardinality.ID, v) }
// The property that determines the cardinality of a minimum qualified cardinality restriction.
func GetMinQualifiedCardinality(e ld.Entity) interface{} {
return e.Get(Prop_MinQualifiedCardinality.ID)
}
func SetMinQualifiedCardinality(e ld.Entity, v interface{}) { e.Set(Prop_MinQualifiedCardinality.ID, v) }
// The property that determines the class that a qualified object cardinality restriction refers to.
func GetOnClass(e ld.Entity) interface{} { return e.Get(Prop_OnClass.ID) }
func SetOnClass(e ld.Entity, v interface{}) { e.Set(Prop_OnClass.ID, v) }
// The property that determines the data range that a qualified data cardinality restriction refers to.
func GetOnDataRange(e ld.Entity) interface{} { return e.Get(Prop_OnDataRange.ID) }
func SetOnDataRange(e ld.Entity, v interface{}) { e.Set(Prop_OnDataRange.ID, v) }
// The property that determines the datatype that a datatype restriction refers to.
func GetOnDatatype(e ld.Entity) interface{} { return e.Get(Prop_OnDatatype.ID) }
func SetOnDatatype(e ld.Entity, v interface{}) { e.Set(Prop_OnDatatype.ID, v) }
// The property that determines the n-tuple of properties that a property restriction on an n-ary data range refers to.
func GetOnProperties(e ld.Entity) interface{} { return e.Get(Prop_OnProperties.ID) }
func SetOnProperties(e ld.Entity, v interface{}) { e.Set(Prop_OnProperties.ID, v) }
// The property that determines the property that a property restriction refers to.
func GetOnProperty(e ld.Entity) interface{} { return e.Get(Prop_OnProperty.ID) }
func SetOnProperty(e ld.Entity, v interface{}) { e.Set(Prop_OnProperty.ID, v) }
// The property that determines the collection of individuals or data values that build an enumeration.
func GetOneOf(e ld.Entity) interface{} { return e.Get(Prop_OneOf.ID) }
func SetOneOf(e ld.Entity, v interface{}) { e.Set(Prop_OneOf.ID, v) }
// The annotation property that indicates the predecessor ontology of a given ontology.
func GetPriorVersion(e ld.Entity) interface{} { return e.Get(Prop_PriorVersion.ID) }
func SetPriorVersion(e ld.Entity, v interface{}) { e.Set(Prop_PriorVersion.ID, v) }
// The property that determines the n-tuple of properties that build a sub property chain of a given property.
func GetPropertyChainAxiom(e ld.Entity) interface{} { return e.Get(Prop_PropertyChainAxiom.ID) }
func SetPropertyChainAxiom(e ld.Entity, v interface{}) { e.Set(Prop_PropertyChainAxiom.ID, v) }
// The property that determines that two given properties are disjoint.
func GetPropertyDisjointWith(e ld.Entity) interface{} { return e.Get(Prop_PropertyDisjointWith.ID) }
func SetPropertyDisjointWith(e ld.Entity, v interface{}) { e.Set(Prop_PropertyDisjointWith.ID, v) }
// The property that determines the cardinality of an exact qualified cardinality restriction.
func GetQualifiedCardinality(e ld.Entity) interface{} { return e.Get(Prop_QualifiedCardinality.ID) }
func SetQualifiedCardinality(e ld.Entity, v interface{}) { e.Set(Prop_QualifiedCardinality.ID, v) }
// The property that determines that two given individuals are equal.
func GetSameAs(e ld.Entity) interface{} { return e.Get(Prop_SameAs.ID) }
func SetSameAs(e ld.Entity, v interface{}) { e.Set(Prop_SameAs.ID, v) }
// The property that determines the class that an existential property restriction refers to.
func GetSomeValuesFrom(e ld.Entity) interface{} { return e.Get(Prop_SomeValuesFrom.ID) }
func SetSomeValuesFrom(e ld.Entity, v interface{}) { e.Set(Prop_SomeValuesFrom.ID, v) }
// The property that determines the subject of a negative property assertion.
func GetSourceIndividual(e ld.Entity) interface{} { return e.Get(Prop_SourceIndividual.ID) }
func SetSourceIndividual(e ld.Entity, v interface{}) { e.Set(Prop_SourceIndividual.ID, v) }
// The property that determines the object of a negative object property assertion.
func GetTargetIndividual(e ld.Entity) interface{} { return e.Get(Prop_TargetIndividual.ID) }
func SetTargetIndividual(e ld.Entity, v interface{}) { e.Set(Prop_TargetIndividual.ID, v) }
// The property that determines the value of a negative data property assertion.
func GetTargetValue(e ld.Entity) interface{} { return e.Get(Prop_TargetValue.ID) }
func SetTargetValue(e ld.Entity, v interface{}) { e.Set(Prop_TargetValue.ID, v) }
// The data property that relates every individual to every data value.
func GetTopDataProperty(e ld.Entity) interface{} { return e.Get(Prop_TopDataProperty.ID) }
func SetTopDataProperty(e ld.Entity, v interface{}) { e.Set(Prop_TopDataProperty.ID, v) }
// The object property that relates every two individuals.
func GetTopObjectProperty(e ld.Entity) interface{} { return e.Get(Prop_TopObjectProperty.ID) }
func SetTopObjectProperty(e ld.Entity, v interface{}) { e.Set(Prop_TopObjectProperty.ID, v) }
// The property that determines the collection of classes or data ranges that build a union.
func GetUnionOf(e ld.Entity) interface{} { return e.Get(Prop_UnionOf.ID) }
func SetUnionOf(e ld.Entity, v interface{}) { e.Set(Prop_UnionOf.ID, v) }
// The property that identifies the version IRI of an ontology.
func GetVersionIRI(e ld.Entity) interface{} { return e.Get(Prop_VersionIRI.ID) }
func SetVersionIRI(e ld.Entity, v interface{}) { e.Set(Prop_VersionIRI.ID, v) }
// The annotation property that provides version information for an ontology or another OWL construct.
func GetVersionInfo(e ld.Entity) interface{} { return e.Get(Prop_VersionInfo.ID) }
func SetVersionInfo(e ld.Entity, v interface{}) { e.Set(Prop_VersionInfo.ID, v) }
// The property that determines the collection of facet-value pairs that define a datatype restriction.
func GetWithRestrictions(e ld.Entity) interface{} { return e.Get(Prop_WithRestrictions.ID) }
func SetWithRestrictions(e ld.Entity, v interface{}) { e.Set(Prop_WithRestrictions.ID, v) } | ld/ns/owl/properties.gen.go | 0.854126 | 0.465873 | properties.gen.go | starcoder |
package hbook
import "sort"
// Bin1D models a bin in a 1-dim space.
type Bin1D struct {
xrange Range
dist dist1D
}
// Rank returns the number of dimensions for this bin.
func (Bin1D) Rank() int { return 1 }
func (b *Bin1D) scaleW(f float64) {
b.dist.scaleW(f)
}
func (b *Bin1D) fill(x, w float64) {
b.dist.fill(x, w)
}
// Entries returns the number of entries in this bin.
func (b *Bin1D) Entries() int64 {
return b.dist.Entries()
}
// EffEntries returns the effective number of entries \f$ = (\sum w)^2 / \sum w^2 \f$
func (b *Bin1D) EffEntries() float64 {
return b.dist.EffEntries()
}
// SumW returns the sum of weights in this bin.
func (b *Bin1D) SumW() float64 {
return b.dist.SumW()
}
// SumW2 returns the sum of squared weights in this bin.
func (b *Bin1D) SumW2() float64 {
return b.dist.SumW2()
}
// ErrW returns the absolute error on SumW()
func (b *Bin1D) ErrW() float64 {
return b.dist.errW()
}
// XEdges returns the [low,high] edges of this bin.
func (b *Bin1D) XEdges() Range {
return b.xrange
}
// XMin returns the lower limit of the bin (inclusive).
func (b *Bin1D) XMin() float64 {
return b.xrange.Min
}
// XMax returns the upper limit of the bin (exclusive).
func (b *Bin1D) XMax() float64 {
return b.xrange.Max
}
// XMid returns the geometric center of the bin.
// i.e.: 0.5*(high+low)
func (b *Bin1D) XMid() float64 {
return 0.5 * (b.xrange.Min + b.xrange.Max)
}
// XWidth returns the (signed) width of the bin
func (b *Bin1D) XWidth() float64 {
return b.xrange.Max - b.xrange.Min
}
// XFocus returns the mean position in the bin, or the midpoint (if the
// sum of weights for this bin is 0).
func (b *Bin1D) XFocus() float64 {
if b.SumW() == 0 {
return b.XMid()
}
return b.XMean()
}
// XMean returns the mean X.
func (b *Bin1D) XMean() float64 {
return b.dist.mean()
}
// XVariance returns the variance in X.
func (b *Bin1D) XVariance() float64 {
return b.dist.variance()
}
// XStdDev returns the standard deviation in X.
func (b *Bin1D) XStdDev() float64 {
return b.dist.stdDev()
}
// XStdErr returns the standard error in X.
func (b *Bin1D) XStdErr() float64 {
return b.dist.stdErr()
}
// XRMS returns the RMS in X.
func (b *Bin1D) XRMS() float64 {
return b.dist.rms()
}
// Bin1Ds is a sorted slice of Bin1D implementing sort.Interface.
type Bin1Ds []Bin1D
func (p Bin1Ds) Len() int { return len(p) }
func (p Bin1Ds) Less(i, j int) bool { return p[i].xrange.Min < p[j].xrange.Min }
func (p Bin1Ds) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
// IndexOf returns the index of the Bin1D containing the value v.
// It returns UndeflowBin if v is smaller than the smallest bin value.
// It returns OverflowBin if v is greater than the greatest bin value.
// It returns len(bins) if v falls within a bins gap.
func (p Bin1Ds) IndexOf(v float64) int {
i := sort.Search(len(p), func(i int) bool { return v < p[i].xrange.Max })
if i == len(p) {
return OverflowBin
}
rng := p[i].xrange
if i == 0 && v < rng.Min {
return UnderflowBin
}
if rng.Min <= v && v < rng.Max {
return i
}
return len(p)
} | hbook/bin1d.go | 0.874901 | 0.669448 | bin1d.go | starcoder |
package basic
import (
"math"
"github.com/starainrt/astro/planet"
. "github.com/starainrt/astro/tools"
)
func NeptuneL(JD float64) float64 {
return planet.WherePlanet(7, 0, JD)
}
func NeptuneB(JD float64) float64 {
return planet.WherePlanet(7, 1, JD)
}
func NeptuneR(JD float64) float64 {
return planet.WherePlanet(7, 2, JD)
}
func ANeptuneX(JD float64) float64 {
l := NeptuneL(JD)
b := NeptuneB(JD)
r := NeptuneR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el)
return x
}
func ANeptuneY(JD float64) float64 {
l := NeptuneL(JD)
b := NeptuneB(JD)
r := NeptuneR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el)
return y
}
func ANeptuneZ(JD float64) float64 {
//l := NeptuneL(JD)
b := NeptuneB(JD)
r := NeptuneR(JD)
// el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
z := r*Sin(b) - er*Sin(eb)
return z
}
func ANeptuneXYZ(JD float64) (float64, float64, float64) {
l := NeptuneL(JD)
b := NeptuneB(JD)
r := NeptuneR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el)
y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el)
z := r*Sin(b) - er*Sin(eb)
return x, y, z
}
func NeptuneSeeRa(JD float64) float64 {
lo, bo := NeptuneSeeLoBo(JD)
sita := Sita(JD)
ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo))
ra = ra * 180 / math.Pi
return Limit360(ra)
}
func NeptuneSeeDec(JD float64) float64 {
lo, bo := NeptuneSeeLoBo(JD)
sita := Sita(JD)
dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo))
return dec
}
func NeptuneSeeRaDec(JD float64) (float64, float64) {
lo, bo := NeptuneSeeLoBo(JD)
sita := Sita(JD)
ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo))
ra = ra * 180 / math.Pi
dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo))
return Limit360(ra), dec
}
func EarthNeptuneAway(JD float64) float64 {
x, y, z := ANeptuneXYZ(JD)
to := math.Sqrt(x*x + y*y + z*z)
return to
}
func NeptuneSeeLo(JD float64) float64 {
x, y, z := ANeptuneXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = ANeptuneXYZ(JD - to)
lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
lo = Limit360(lo)
//lo-=GXCLo(lo,bo,JD)/3600;
//bo+=GXCBo(lo,bo,JD);
lo += HJZD(JD)
return lo
}
func NeptuneSeeBo(JD float64) float64 {
x, y, z := ANeptuneXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = ANeptuneXYZ(JD - to)
//lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
//lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
//lo+=GXCLo(lo,bo,JD);
//bo+=GXCBo(lo,bo,JD)/3600;
//lo+=HJZD(JD);
return bo
}
func NeptuneSeeLoBo(JD float64) (float64, float64) {
x, y, z := ANeptuneXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = ANeptuneXYZ(JD - to)
lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
lo = Limit360(lo)
//lo-=GXCLo(lo,bo,JD)/3600;
//bo+=GXCBo(lo,bo,JD);
lo += HJZD(JD)
return lo, bo
}
func NeptuneMag(JD float64) float64 {
AwaySun := NeptuneR(JD)
AwayEarth := EarthNeptuneAway(JD)
Away := planet.WherePlanet(-1, 2, JD)
i := (AwaySun*AwaySun + AwayEarth*AwayEarth - Away*Away) / (2 * AwaySun * AwayEarth)
i = ArcCos(i)
Mag := -6.87 + 5*math.Log10(AwaySun*AwayEarth)
return FloatRound(Mag, 2)
} | basic/neptune.go | 0.689619 | 0.466542 | neptune.go | starcoder |
package detour
import (
"encoding/binary"
"io"
"math"
)
// TileRef is a reference to a tile of the navigation mesh.
type TileRef uint32
type navMeshTileHeader struct {
TileRef TileRef
DataSize int32
}
func (s *navMeshTileHeader) Size() int {
return 8
}
func (s *navMeshTileHeader) WriteTo(w io.Writer) (int64, error) {
buf := make([]byte, s.Size())
s.Serialize(buf)
n, err := w.Write(buf)
return int64(n), err
}
func (s *navMeshTileHeader) Serialize(dst []byte) {
if len(dst) < s.Size() {
panic("undersized buffer for navMeshTileHeader")
}
var (
little = binary.LittleEndian
off int
)
// write each field as little endian
little.PutUint32(dst[off:], uint32(s.TileRef))
little.PutUint32(dst[off+4:], uint32(s.DataSize))
}
// MeshTile defines a navigation mesh tile.
type MeshTile struct {
// Counter describing modifications to the tile.
Salt uint32
// Index to the next free link.
LinksFreeList uint32
// The tile header.
Header *MeshHeader
// The tile polygons.
// [Size: MeshHeader.PolyCount]
Polys []Poly
// The tile vertices.
// [Size: MeshHeader.VertCount]
Verts []float32
// The tile links.
// [Size: MeshHeader.MaxLinkCount]
Links []Link
// The tile's detail sub-meshes.
// [Size: MeshHeader.DetailMeshCount]
DetailMeshes []PolyDetail
// The detail mesh's unique vertices.
// [(x, y, z) * MeshHeader.DetailVertCount]
DetailVerts []float32
// The detail mesh's triangles.
// [(vertA, vertB, vertC) * MeshHeader.DetailTriCount]
DetailTris []uint8
// The tile bounding volume nodes.
// [Size: MeshHeader.BvNodeCount]
// (Will be null if bounding volumes are disabled.)
BvTree []BvNode
// The tile off-mesh connections.
// [Size: MeshHeader.OffMeshConCount]
OffMeshCons []OffMeshConnection
// Size of the tile data.
DataSize int32
// Tile flags. (See: tileFlags)
Flags int32
// The next free tile, or the next tile in the spatial grid.
Next *MeshTile
}
func (s *MeshTile) serialize(dst []byte) {
serializeTileData(dst, s.Verts, s.Polys, s.Links, s.DetailMeshes, s.DetailVerts, s.DetailTris, s.BvTree, s.OffMeshCons)
}
func (s *MeshTile) unserialize(hdr *MeshHeader, src []byte) {
var (
little = binary.LittleEndian
i, off int
)
s.Verts = make([]float32, 3*hdr.VertCount)
for i = range s.Verts {
s.Verts[i] = math.Float32frombits(little.Uint32(src[off+0:]))
off += 4
}
s.Polys = make([]Poly, hdr.PolyCount)
for i := range s.Polys {
p := &s.Polys[i]
p.FirstLink = little.Uint32(src[off:])
off += 4
for j := uint32(0); j < VertsPerPolygon; j++ {
p.Verts[j] = little.Uint16(src[off:])
off += 2
}
for j := uint32(0); j < VertsPerPolygon; j++ {
p.Neis[j] = little.Uint16(src[off:])
off += 2
}
p.Flags = little.Uint16(src[off:])
p.VertCount = src[off+2]
p.AreaAndType = src[off+3]
off += 4
}
s.Links = make([]Link, hdr.MaxLinkCount)
for i := range s.Links {
l := &s.Links[i]
l.Ref = PolyRef(little.Uint32(src[off:]))
l.Next = little.Uint32(src[off+4:])
l.Edge = src[off+8]
l.Side = src[off+9]
l.BMin = src[off+10]
l.BMax = src[off+11]
off += 12
}
s.DetailMeshes = make([]PolyDetail, hdr.DetailMeshCount)
for i := range s.DetailMeshes {
m := &s.DetailMeshes[i]
m.VertBase = little.Uint32(src[off:])
m.TriBase = little.Uint32(src[off+4:])
m.VertCount = src[off+8]
m.TriCount = src[off+9]
off += 12
}
s.DetailVerts = make([]float32, 3*hdr.DetailVertCount)
for i := range s.DetailVerts {
s.DetailVerts[i] = math.Float32frombits(little.Uint32(src[off:]))
off += 4
}
s.DetailTris = make([]uint8, 4*hdr.DetailTriCount)
copy(s.DetailTris, src[off:])
off += len(s.DetailTris)
s.BvTree = make([]BvNode, hdr.BvNodeCount)
for i := range s.BvTree {
t := &s.BvTree[i]
t.BMin[0] = little.Uint16(src[off:])
t.BMin[1] = little.Uint16(src[off+2:])
t.BMin[2] = little.Uint16(src[off+4:])
t.BMax[0] = little.Uint16(src[off+6:])
t.BMax[1] = little.Uint16(src[off+8:])
t.BMax[2] = little.Uint16(src[off+10:])
t.I = int32(little.Uint32(src[off+12:]))
off += 16
}
s.OffMeshCons = make([]OffMeshConnection, hdr.OffMeshConCount)
for i := range s.OffMeshCons {
o := &s.OffMeshCons[i]
o.Pos[0] = math.Float32frombits(little.Uint32(src[off:]))
o.Pos[1] = math.Float32frombits(little.Uint32(src[off+4:]))
o.Pos[2] = math.Float32frombits(little.Uint32(src[off+8:]))
o.Pos[3] = math.Float32frombits(little.Uint32(src[off+12:]))
o.Pos[4] = math.Float32frombits(little.Uint32(src[off+16:]))
o.Pos[5] = math.Float32frombits(little.Uint32(src[off+20:]))
o.Rad = math.Float32frombits(little.Uint32(src[off+24:]))
o.Poly = little.Uint16(src[off+28:])
o.Flags = src[30]
o.Side = src[31]
o.UserID = little.Uint32(src[off+32:])
off += 36
}
}
func serializeTileData(dst []byte,
verts []float32,
polys []Poly,
links []Link,
dmeshes []PolyDetail,
dverts []float32,
dtris []uint8,
bvtree []BvNode,
offMeshCons []OffMeshConnection,
) error {
var (
little = binary.LittleEndian
off int
)
for _, f := range verts {
little.PutUint32(dst[off:], uint32(math.Float32bits(f)))
off += 4
}
for i := range polys {
p := &polys[i]
little.PutUint32(dst[off:], uint32(p.FirstLink))
off += 4
for j := uint32(0); j < VertsPerPolygon; j++ {
little.PutUint16(dst[off:], p.Verts[j])
off += 2
}
for j := uint32(0); j < VertsPerPolygon; j++ {
little.PutUint16(dst[off:], p.Neis[j])
off += 2
}
little.PutUint16(dst[off:], p.Flags)
dst[off+2] = p.VertCount
dst[off+3] = p.AreaAndType
off += 4
}
for i := range links {
l := &links[i]
little.PutUint32(dst[off:], uint32(l.Ref))
little.PutUint32(dst[off+4:], l.Next)
dst[off+8] = l.Edge
dst[off+9] = l.Side
dst[off+10] = l.BMin
dst[off+11] = l.BMax
off += 12
}
for i := range dmeshes {
m := &dmeshes[i]
little.PutUint32(dst[off:], m.VertBase)
little.PutUint32(dst[off+4:], m.TriBase)
dst[off+8] = m.VertCount
dst[off+9] = m.TriCount
off += 12
}
for i := range dverts {
little.PutUint32(dst[off:], uint32(math.Float32bits(dverts[i])))
off += 4
}
copy(dst[off:], dtris)
off += len(dtris)
for i := range bvtree {
t := &bvtree[i]
little.PutUint16(dst[off:], t.BMin[0])
little.PutUint16(dst[off+2:], t.BMin[1])
little.PutUint16(dst[off+4:], t.BMin[2])
little.PutUint16(dst[off+6:], t.BMax[0])
little.PutUint16(dst[off+8:], t.BMax[1])
little.PutUint16(dst[off+10:], t.BMax[2])
little.PutUint32(dst[off+12:], uint32(t.I))
off += 16
}
for i := range offMeshCons {
o := &offMeshCons[i]
little.PutUint32(dst[off:], uint32(math.Float32bits(o.Pos[0])))
little.PutUint32(dst[off+4:], uint32(math.Float32bits(o.Pos[1])))
little.PutUint32(dst[off+8:], uint32(math.Float32bits(o.Pos[2])))
little.PutUint32(dst[off+12:], uint32(math.Float32bits(o.Pos[3])))
little.PutUint32(dst[off+16:], uint32(math.Float32bits(o.Pos[4])))
little.PutUint32(dst[off+20:], uint32(math.Float32bits(o.Pos[5])))
little.PutUint32(dst[off+24:], uint32(math.Float32bits(o.Rad)))
little.PutUint16(dst[off+28:], o.Poly)
dst[30] = o.Flags
dst[31] = o.Side
little.PutUint32(dst[off+32:], o.UserID)
off += 36
}
return nil
} | detour/tile.go | 0.630685 | 0.425725 | tile.go | starcoder |
package board
import (
"errors"
"fmt"
"strconv"
"strings"
)
// columns allows easy converstion of a column name to its index. The
// opposite conversion can be done by using strconv.Atoi() instead.
var columns = map[string]int{
"A": 0, "B": 1, "C": 2, "D": 3, "E": 4,
"F": 5, "G": 6, "H": 7, "I": 8, "J": 9,
}
// Square is a struct for holding a coordinate on the board.
type Square struct {
Letter int
Number int
}
// Square creation functions
// SquareByValue creates a Square by letter and number integers.
func SquareByValue(let int, num int) (Square, error) {
if let < 0 || let > 9 || num < 0 || num > 9 {
return Square{}, errors.New("String coordinates out of bounds")
}
return Square{let, num}, nil
}
// SquareByString creates a Square by a string of the coordinates.
func SquareByString(coords string) (Square, error) {
chars := strings.Split(coords, "")
var letstr, numstr string
if len(chars) < 2 || len(chars) > 3 {
return Square{}, errors.New("Coordinate string is improperly sized")
} else if len(chars) == 3 {
letstr = chars[0]
numstr = chars[1] + chars[2]
} else {
letstr = chars[0]
numstr = chars[1]
}
if let, found := columns[strings.ToUpper(letstr)]; found {
num, err := strconv.Atoi(numstr)
if err != nil {
return Square{}, errors.New("String number could not convert to integer")
} else if num < 1 || num > 10 {
return Square{}, errors.New("String number coordinate out of bounds")
}
return Square{let, num - 1}, nil
}
return Square{}, errors.New("String letter coordinate not found")
}
// Square retrieval methods
// PrintLetter returns the column (letter) as a string.
func (s Square) PrintLetter() string {
return string(rune('A' - 0 + s.Letter))
}
// PrintNumber returns the row (number) as a string.
func (s Square) PrintNumber() string {
return fmt.Sprint(s.Number + 1)
}
// PrintSquare returns the column and row as a two-letter string.
func (s Square) PrintSquare() string {
return s.PrintLetter() + s.PrintNumber()
} | pkg/board/square.go | 0.79854 | 0.448668 | square.go | starcoder |
package memory
import (
"github.com/google/gapid/core/data/binary"
"github.com/google/gapid/core/math/u64"
"github.com/google/gapid/core/os/device"
)
// Decoder provides methods to read primitives from a binary.Reader, respecting
// a given MemoryLayout.
// Decoder will automatically handle alignment and types sizes.
type Decoder struct {
r binary.Reader
m *device.MemoryLayout
o uint64
}
// NewDecoder constructs and returns a new Decoder that reads from r using
// the memory layout m.
func NewDecoder(r binary.Reader, m *device.MemoryLayout) *Decoder {
return &Decoder{r, m, 0}
}
func (d *Decoder) alignAndOffset(l *device.DataTypeLayout) {
d.Align(uint64(l.GetAlignment()))
d.o += uint64(l.GetSize())
}
// MemoryLayout returns the MemoryLayout used by the decoder.
func (d *Decoder) MemoryLayout() *device.MemoryLayout {
return d.m
}
// Offset returns the byte offset of the reader from the initial Decoder
// creation.
func (d *Decoder) Offset() uint64 {
return d.o
}
// Align skips bytes until the read position is a multiple of to.
func (d *Decoder) Align(to uint64) {
alignment := u64.AlignUp(d.o, uint64(to))
if pad := alignment - d.o; pad != 0 {
d.Skip(pad)
}
}
// Skip skips n bytes from the reader.
func (d *Decoder) Skip(n uint64) {
binary.ConsumeBytes(d.r, n)
d.o += n
}
// Pointer loads and returns a pointer address.
func (d *Decoder) Pointer() uint64 {
d.alignAndOffset(d.m.GetPointer())
return binary.ReadUint(d.r, 8*d.m.GetPointer().GetSize())
}
// F32 loads and returns a float32.
func (d *Decoder) F32() float32 {
d.alignAndOffset(d.m.GetF32())
return d.r.Float32()
}
// F64 loads and returns a float64.
func (d *Decoder) F64() float64 {
d.alignAndOffset(d.m.GetF64())
return d.r.Float64()
}
// I8 loads and returns a int8.
func (d *Decoder) I8() int8 {
d.alignAndOffset(d.m.GetI8())
return d.r.Int8()
}
// I16 loads and returns a int16.
func (d *Decoder) I16() int16 {
d.alignAndOffset(d.m.GetI16())
return d.r.Int16()
}
// I32 loads and returns a int32.
func (d *Decoder) I32() int32 {
d.alignAndOffset(d.m.GetI32())
return d.r.Int32()
}
// I64 loads and returns a int64.
func (d *Decoder) I64() int64 {
d.alignAndOffset(d.m.GetI64())
return d.r.Int64()
}
// U8 loads and returns a uint8.
func (d *Decoder) U8() uint8 {
d.alignAndOffset(d.m.GetI8())
return d.r.Uint8()
}
// U16 loads and returns a uint16.
func (d *Decoder) U16() uint16 {
d.alignAndOffset(d.m.GetI16())
return d.r.Uint16()
}
// U32 loads and returns a uint32.
func (d *Decoder) U32() uint32 {
d.alignAndOffset(d.m.GetI32())
return d.r.Uint32()
}
// U64 loads and returns a uint64.
func (d *Decoder) U64() uint64 {
d.alignAndOffset(d.m.GetI64())
return d.r.Uint64()
}
// Char loads and returns an char.
func (d *Decoder) Char() Char {
d.alignAndOffset(d.m.GetChar())
return Char(binary.ReadInt(d.r, 8*d.m.GetChar().GetSize()))
}
// Int loads and returns an int.
func (d *Decoder) Int() Int {
d.alignAndOffset(d.m.GetInteger())
return Int(binary.ReadInt(d.r, 8*d.m.GetInteger().GetSize()))
}
// Uint loads and returns a uint.
func (d *Decoder) Uint() Uint {
d.alignAndOffset(d.m.GetInteger())
return Uint(binary.ReadUint(d.r, 8*d.m.GetInteger().GetSize()))
}
// Size loads and returns a size_t.
func (d *Decoder) Size() Size {
d.alignAndOffset(d.m.GetSize())
return Size(binary.ReadUint(d.r, 8*d.m.GetSize().GetSize()))
}
// String loads and returns a null-terminated string.
func (d *Decoder) String() string {
out := d.r.String()
d.o += uint64(len(out) + 1)
return out
}
// Bool loads and returns a boolean value.
func (d *Decoder) Bool() bool {
d.o++
return d.r.Uint8() != 0
}
// Data reads raw bytes into buf.
func (d *Decoder) Data(buf []byte) {
d.r.Data(buf)
d.o += uint64(len(buf))
}
// Error returns the error state of the underlying reader.
func (d *Decoder) Error() error {
return d.r.Error()
} | gapis/memory/decoder.go | 0.853654 | 0.416856 | decoder.go | starcoder |
package parquet
import (
"bytes"
"fmt"
"github.com/segmentio/parquet-go/deprecated"
"github.com/segmentio/parquet-go/encoding"
"github.com/segmentio/parquet-go/format"
)
var (
BooleanType Type = primitiveType[bool]{class: &boolClass}
Int32Type Type = primitiveType[int32]{class: &int32Class}
Int64Type Type = primitiveType[int64]{class: &int64Class}
Int96Type Type = primitiveType[deprecated.Int96]{class: &int96Class}
FloatType Type = primitiveType[float32]{class: &float32Class}
DoubleType Type = primitiveType[float64]{class: &float64Class}
ByteArrayType Type = byteArrayType{}
)
type primitiveType[T primitive] struct{ class *class[T] }
func (t primitiveType[T]) ColumnOrder() *format.ColumnOrder { return &typeDefinedColumnOrder }
func (t primitiveType[T]) PhysicalType() *format.Type { return &physicalTypes[t.class.kind] }
func (t primitiveType[T]) LogicalType() *format.LogicalType { return nil }
func (t primitiveType[T]) ConvertedType() *deprecated.ConvertedType { return nil }
func (t primitiveType[T]) String() string { return t.class.name }
func (t primitiveType[T]) Kind() Kind { return t.class.kind }
func (t primitiveType[T]) Length() int { return int(t.class.bits) }
func (t primitiveType[T]) Compare(a, b Value) int {
return t.class.compare(t.class.value(a), t.class.value(b))
}
func (t primitiveType[T]) NewColumnIndexer(sizeLimit int) ColumnIndexer {
return newColumnIndexer(t.class)
}
func (t primitiveType[T]) NewDictionary(columnIndex, bufferSize int) Dictionary {
return newDictionary(t, makeColumnIndex(columnIndex), bufferSize, t.class)
}
func (t primitiveType[T]) NewColumnBuffer(columnIndex, bufferSize int) ColumnBuffer {
return newColumnBuffer(t, makeColumnIndex(columnIndex), bufferSize, t.class)
}
func (t primitiveType[T]) NewColumnReader(columnIndex, bufferSize int) ColumnReader {
return newColumnReader(t, makeColumnIndex(columnIndex), bufferSize, t.class)
}
func (t primitiveType[T]) ReadDictionary(columnIndex, numValues int, decoder encoding.Decoder) (Dictionary, error) {
return readDictionary(t, makeColumnIndex(columnIndex), numValues, decoder, t.class)
}
type byteArrayType struct{}
func (t byteArrayType) String() string { return "BYTE_ARRAY" }
func (t byteArrayType) Kind() Kind { return ByteArray }
func (t byteArrayType) Length() int { return 0 }
func (t byteArrayType) Compare(a, b Value) int {
return bytes.Compare(a.ByteArray(), b.ByteArray())
}
func (t byteArrayType) ColumnOrder() *format.ColumnOrder { return &typeDefinedColumnOrder }
func (t byteArrayType) LogicalType() *format.LogicalType { return nil }
func (t byteArrayType) ConvertedType() *deprecated.ConvertedType { return nil }
func (t byteArrayType) PhysicalType() *format.Type {
return &physicalTypes[ByteArray]
}
func (t byteArrayType) NewColumnIndexer(sizeLimit int) ColumnIndexer {
return newByteArrayColumnIndexer(sizeLimit)
}
func (t byteArrayType) NewDictionary(columnIndex, bufferSize int) Dictionary {
return newByteArrayDictionary(t, makeColumnIndex(columnIndex), bufferSize)
}
func (t byteArrayType) NewColumnBuffer(columnIndex, bufferSize int) ColumnBuffer {
return newByteArrayColumnBuffer(t, makeColumnIndex(columnIndex), bufferSize)
}
func (t byteArrayType) NewColumnReader(columnIndex, bufferSize int) ColumnReader {
return newByteArrayColumnReader(t, makeColumnIndex(columnIndex), bufferSize)
}
func (t byteArrayType) ReadDictionary(columnIndex, numValues int, decoder encoding.Decoder) (Dictionary, error) {
return readByteArrayDictionary(t, makeColumnIndex(columnIndex), numValues, decoder)
}
type fixedLenByteArrayType struct{ length int }
func (t *fixedLenByteArrayType) String() string {
return fmt.Sprintf("FIXED_LEN_BYTE_ARRAY(%d)", t.length)
}
func (t *fixedLenByteArrayType) Kind() Kind { return FixedLenByteArray }
func (t *fixedLenByteArrayType) Length() int { return t.length }
func (t *fixedLenByteArrayType) Compare(a, b Value) int {
return bytes.Compare(a.ByteArray(), b.ByteArray())
}
func (t fixedLenByteArrayType) ColumnOrder() *format.ColumnOrder { return &typeDefinedColumnOrder }
func (t fixedLenByteArrayType) LogicalType() *format.LogicalType { return nil }
func (t fixedLenByteArrayType) ConvertedType() *deprecated.ConvertedType { return nil }
func (t *fixedLenByteArrayType) PhysicalType() *format.Type { return &physicalTypes[FixedLenByteArray] }
func (t *fixedLenByteArrayType) NewColumnIndexer(sizeLimit int) ColumnIndexer {
return newFixedLenByteArrayColumnIndexer(t.length, sizeLimit)
}
func (t *fixedLenByteArrayType) NewDictionary(columnIndex, bufferSize int) Dictionary {
return newFixedLenByteArrayDictionary(t, makeColumnIndex(columnIndex), bufferSize)
}
func (t *fixedLenByteArrayType) NewColumnBuffer(columnIndex, bufferSize int) ColumnBuffer {
return newFixedLenByteArrayColumnBuffer(t, makeColumnIndex(columnIndex), bufferSize)
}
func (t *fixedLenByteArrayType) NewColumnReader(columnIndex, bufferSize int) ColumnReader {
return newFixedLenByteArrayColumnReader(t, makeColumnIndex(columnIndex), bufferSize)
}
func (t *fixedLenByteArrayType) ReadDictionary(columnIndex, numValues int, decoder encoding.Decoder) (Dictionary, error) {
return readFixedLenByteArrayDictionary(t, makeColumnIndex(columnIndex), numValues, decoder)
}
// FixedLenByteArrayType constructs a type for fixed-length values of the given
// size (in bytes).
func FixedLenByteArrayType(length int) Type { return &fixedLenByteArrayType{length: length} }
func (t *intType) NewColumnIndexer(sizeLimit int) ColumnIndexer {
if t.IsSigned {
if t.BitWidth == 64 {
return newColumnIndexer(&int64Class)
} else {
return newColumnIndexer(&int32Class)
}
} else {
if t.BitWidth == 64 {
return newColumnIndexer(&uint64Class)
} else {
return newColumnIndexer(&uint32Class)
}
}
}
func (t *intType) NewDictionary(columnIndex, bufferSize int) Dictionary {
if t.IsSigned {
if t.BitWidth == 64 {
return newDictionary(t, makeColumnIndex(columnIndex), bufferSize, &int64Class)
} else {
return newDictionary(t, makeColumnIndex(columnIndex), bufferSize, &int32Class)
}
} else {
if t.BitWidth == 64 {
return newDictionary(t, makeColumnIndex(columnIndex), bufferSize, &uint64Class)
} else {
return newDictionary(t, makeColumnIndex(columnIndex), bufferSize, &uint32Class)
}
}
}
func (t *intType) NewColumnBuffer(columnIndex, bufferSize int) ColumnBuffer {
if t.IsSigned {
if t.BitWidth == 64 {
return newColumnBuffer(t, makeColumnIndex(columnIndex), bufferSize, &int64Class)
} else {
return newColumnBuffer(t, makeColumnIndex(columnIndex), bufferSize, &int32Class)
}
} else {
if t.BitWidth == 64 {
return newColumnBuffer(t, makeColumnIndex(columnIndex), bufferSize, &uint64Class)
} else {
return newColumnBuffer(t, makeColumnIndex(columnIndex), bufferSize, &uint32Class)
}
}
}
func (t *intType) NewColumnReader(columnIndex, bufferSize int) ColumnReader {
if t.IsSigned {
if t.BitWidth == 64 {
return newColumnReader(t, makeColumnIndex(columnIndex), bufferSize, &int64Class)
} else {
return newColumnReader(t, makeColumnIndex(columnIndex), bufferSize, &int32Class)
}
} else {
if t.BitWidth == 64 {
return newColumnReader(t, makeColumnIndex(columnIndex), bufferSize, &uint64Class)
} else {
return newColumnReader(t, makeColumnIndex(columnIndex), bufferSize, &uint32Class)
}
}
}
func (t *intType) ReadDictionary(columnIndex, numValues int, decoder encoding.Decoder) (Dictionary, error) {
if t.IsSigned {
if t.BitWidth == 64 {
return readDictionary(t, makeColumnIndex(columnIndex), numValues, decoder, &int64Class)
} else {
return readDictionary(t, makeColumnIndex(columnIndex), numValues, decoder, &int32Class)
}
} else {
if t.BitWidth == 64 {
return readDictionary(t, makeColumnIndex(columnIndex), numValues, decoder, &uint64Class)
} else {
return readDictionary(t, makeColumnIndex(columnIndex), numValues, decoder, &uint32Class)
}
}
}
func (t *dateType) NewColumnIndexer(sizeLimit int) ColumnIndexer {
return newColumnIndexer(&int32Class)
}
func (t *dateType) NewDictionary(columnIndex, bufferSize int) Dictionary {
return newDictionary(t, makeColumnIndex(columnIndex), bufferSize, &int32Class)
}
func (t *dateType) NewColumnBuffer(columnIndex, bufferSize int) ColumnBuffer {
return newColumnBuffer(t, makeColumnIndex(columnIndex), bufferSize, &int32Class)
}
func (t *dateType) NewColumnReader(columnIndex, bufferSize int) ColumnReader {
return newColumnReader(t, makeColumnIndex(columnIndex), bufferSize, &int64Class)
}
func (t *dateType) ReadDictionary(columnIndex, numValues int, decoder encoding.Decoder) (Dictionary, error) {
return readDictionary(t, makeColumnIndex(columnIndex), numValues, decoder, &int64Class)
}
func (t *timeType) NewColumnIndexer(sizeLimit int) ColumnIndexer {
if t.Unit.Millis != nil {
return newColumnIndexer(&int32Class)
} else {
return newColumnIndexer(&int64Class)
}
}
func (t *timeType) NewDictionary(columnIndex, bufferSize int) Dictionary {
if t.Unit.Millis != nil {
return newDictionary(t, makeColumnIndex(columnIndex), bufferSize, &int32Class)
} else {
return newDictionary(t, makeColumnIndex(columnIndex), bufferSize, &int64Class)
}
}
func (t *timeType) NewColumnBuffer(columnIndex, bufferSize int) ColumnBuffer {
if t.Unit.Millis != nil {
return newColumnBuffer(t, makeColumnIndex(columnIndex), bufferSize, &int32Class)
} else {
return newColumnBuffer(t, makeColumnIndex(columnIndex), bufferSize, &int64Class)
}
}
func (t *timeType) NewColumnReader(columnIndex, bufferSize int) ColumnReader {
if t.Unit.Millis != nil {
return newColumnReader(t, makeColumnIndex(columnIndex), bufferSize, &int32Class)
} else {
return newColumnReader(t, makeColumnIndex(columnIndex), bufferSize, &int64Class)
}
}
func (t *timeType) ReadDictionary(columnIndex, numValues int, decoder encoding.Decoder) (Dictionary, error) {
if t.Unit.Millis != nil {
return readDictionary(t, makeColumnIndex(columnIndex), numValues, decoder, &int32Class)
} else {
return readDictionary(t, makeColumnIndex(columnIndex), numValues, decoder, &int64Class)
}
}
func (t *timestampType) NewColumnIndexer(sizeLimit int) ColumnIndexer {
return newColumnIndexer(&int64Class)
}
func (t *timestampType) NewDictionary(columnIndex, bufferSize int) Dictionary {
return newDictionary(t, makeColumnIndex(columnIndex), bufferSize, &int64Class)
}
func (t *timestampType) NewColumnBuffer(columnIndex, bufferSize int) ColumnBuffer {
return newColumnBuffer(t, makeColumnIndex(columnIndex), bufferSize, &int64Class)
}
func (t *timestampType) NewColumnReader(columnIndex, bufferSize int) ColumnReader {
return newColumnReader(t, makeColumnIndex(columnIndex), bufferSize, &int64Class)
}
func (t *timestampType) ReadDictionary(columnIndex, numValues int, decoder encoding.Decoder) (Dictionary, error) {
return readDictionary(t, makeColumnIndex(columnIndex), numValues, decoder, &int64Class)
} | type_go18.go | 0.630799 | 0.439146 | type_go18.go | starcoder |
package luhn
import (
"errors"
"fmt"
"math/rand"
"strconv"
"strings"
"time"
"github.com/thiepwong/smartid/pkg/logger"
)
// Valid returns a boolean indicating if the argument was valid according to the Luhn algorithm.
func Valid(luhnString string) bool {
checksumMod := calculateChecksum(luhnString, false) % 10
return checksumMod == 0
}
// Generate creates and returns a string of the length of the argument targetSize.
// The returned string is valid according to the Luhn algorithm.
func Generate(size int) string {
random := randomString(size - 1)
controlDigit := strconv.Itoa(generateControlDigit(random))
return random + controlDigit
}
// GenerateWithPrefix creates and returns a string of the length of the argument targetSize
// but prefixed with the second argument.
// The returned string is valid according to the Luhn algorithm.
func GenerateWithPrefix(size int, prefix string) string {
size = size - 1 - len(prefix)
random := prefix + randomString(size)
controlDigit := strconv.Itoa(generateControlDigit(random))
return random + controlDigit
}
func randomString(size int) string {
rand.Seed(time.Now().UTC().UnixNano())
source := make([]int, size)
for i := 0; i < size; i++ {
source[i] = rand.Intn(9)
}
return integersToString(source)
}
func generateControlDigit(luhnString string) int {
controlDigit := calculateChecksum(luhnString, true) % 10
if controlDigit != 0 {
controlDigit = 10 - controlDigit
}
return controlDigit
}
func calculateChecksum(luhnString string, double bool) int {
source := strings.Split(luhnString, "")
checksum := 0
for i := len(source) - 1; i > -1; i-- {
t, _ := strconv.ParseInt(source[i], 10, 8)
n := int(t)
if double {
n = n * 2
}
double = !double
if n >= 10 {
n = n - 9
}
checksum += n
}
return checksum
}
func integersToString(integers []int) string {
result := make([]string, len(integers))
for i, number := range integers {
result[i] = strconv.Itoa(number)
}
return strings.Join(result, "")
}
// GenerateSmartID function Generate an account id base in Luhn algorithm
func GenerateSmartID(systemCode int, nodeCode int, size int) (id uint64, err error) {
if (systemCode > 9 || systemCode < 1) || (nodeCode < 0 || nodeCode > 255) {
fmt.Println("Loi roi")
err = errors.New("System Code is invalid")
return 0, err
}
var nodeCodeStr string
if nodeCode >= 0 && nodeCode <= 9 {
nodeCodeStr = "00" + strconv.Itoa(nodeCode)
}
if nodeCode >= 10 && nodeCode <= 99 {
nodeCodeStr = "0" + strconv.Itoa(nodeCode)
}
if nodeCode > 99 {
nodeCodeStr = strconv.Itoa(nodeCode)
}
randomCode := randomString(size - 6)
accountSeed := strconv.Itoa(systemCode) + nodeCodeStr + strconv.Itoa(generateControlDigit(randomCode)) + randomCode
accountSeed += strconv.Itoa(generateControlDigit(accountSeed))
fmt.Println(accountSeed)
accountID, err := strconv.ParseUint(accountSeed, 10, 64)
if err != nil {
logger.LogErr.Printf("Error when pass the smart id %s", err)
return 0, err
}
return accountID, err
}
// func main() {
// x := randomString(5)
// fmt.Println(x)
// controlDigit := strconv.Itoa(generateControlDigit(x))
// x += controlDigit
// fmt.Println("So check", controlDigit)
// fmt.Println(x)
// fmt.Println(Valid(x))
// id, _err := GenerateSmartID(6, 0xff, 0x10)
// if _err != nil {
// logger.LogErr.Println("Da bi loi khi tao ID")
// }
// fmt.Println("Da tao tai khoan la: ", id)
// logger.LogInfo.Println(fmt.Sprintf("So ngau nhien: %s -------- So kiem tra: %s ------------- Ma ID da sinh: %d", x, controlDigit, id))
// } | pkg/luhn/luhn.go | 0.668015 | 0.431644 | luhn.go | starcoder |
package cryptoapis
import (
"encoding/json"
)
// GetLastMinedBlockRI struct for GetLastMinedBlockRI
type GetLastMinedBlockRI struct {
// Represents the hash of the block, which is its unique identifier. It represents a cryptographic digital fingerprint made by hashing the block header twice through the SHA256 algorithm.
Hash string `json:"hash"`
// Represents the number of blocks in the blockchain preceding this specific block. Block numbers have no gaps. A blockchain usually starts with block 0 called the \"Genesis block\".
Height int32 `json:"height"`
// Represents the hash of the previous block, also known as the parent block.
PreviousBlockHash string `json:"previousBlockHash"`
// Defines the exact date/time when this block was mined in Unix Timestamp.
Timestamp int32 `json:"timestamp"`
// Represents the total number of all transactions as part of this block.
TransactionsCount int32 `json:"transactionsCount"`
BlockchainSpecific GetLastMinedBlockRIBS `json:"blockchainSpecific"`
}
// NewGetLastMinedBlockRI instantiates a new GetLastMinedBlockRI object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewGetLastMinedBlockRI(hash string, height int32, previousBlockHash string, timestamp int32, transactionsCount int32, blockchainSpecific GetLastMinedBlockRIBS) *GetLastMinedBlockRI {
this := GetLastMinedBlockRI{}
this.Hash = hash
this.Height = height
this.PreviousBlockHash = previousBlockHash
this.Timestamp = timestamp
this.TransactionsCount = transactionsCount
this.BlockchainSpecific = blockchainSpecific
return &this
}
// NewGetLastMinedBlockRIWithDefaults instantiates a new GetLastMinedBlockRI object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewGetLastMinedBlockRIWithDefaults() *GetLastMinedBlockRI {
this := GetLastMinedBlockRI{}
return &this
}
// GetHash returns the Hash field value
func (o *GetLastMinedBlockRI) GetHash() string {
if o == nil {
var ret string
return ret
}
return o.Hash
}
// GetHashOk returns a tuple with the Hash field value
// and a boolean to check if the value has been set.
func (o *GetLastMinedBlockRI) GetHashOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Hash, true
}
// SetHash sets field value
func (o *GetLastMinedBlockRI) SetHash(v string) {
o.Hash = v
}
// GetHeight returns the Height field value
func (o *GetLastMinedBlockRI) GetHeight() int32 {
if o == nil {
var ret int32
return ret
}
return o.Height
}
// GetHeightOk returns a tuple with the Height field value
// and a boolean to check if the value has been set.
func (o *GetLastMinedBlockRI) GetHeightOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.Height, true
}
// SetHeight sets field value
func (o *GetLastMinedBlockRI) SetHeight(v int32) {
o.Height = v
}
// GetPreviousBlockHash returns the PreviousBlockHash field value
func (o *GetLastMinedBlockRI) GetPreviousBlockHash() string {
if o == nil {
var ret string
return ret
}
return o.PreviousBlockHash
}
// GetPreviousBlockHashOk returns a tuple with the PreviousBlockHash field value
// and a boolean to check if the value has been set.
func (o *GetLastMinedBlockRI) GetPreviousBlockHashOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.PreviousBlockHash, true
}
// SetPreviousBlockHash sets field value
func (o *GetLastMinedBlockRI) SetPreviousBlockHash(v string) {
o.PreviousBlockHash = v
}
// GetTimestamp returns the Timestamp field value
func (o *GetLastMinedBlockRI) GetTimestamp() int32 {
if o == nil {
var ret int32
return ret
}
return o.Timestamp
}
// GetTimestampOk returns a tuple with the Timestamp field value
// and a boolean to check if the value has been set.
func (o *GetLastMinedBlockRI) GetTimestampOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.Timestamp, true
}
// SetTimestamp sets field value
func (o *GetLastMinedBlockRI) SetTimestamp(v int32) {
o.Timestamp = v
}
// GetTransactionsCount returns the TransactionsCount field value
func (o *GetLastMinedBlockRI) GetTransactionsCount() int32 {
if o == nil {
var ret int32
return ret
}
return o.TransactionsCount
}
// GetTransactionsCountOk returns a tuple with the TransactionsCount field value
// and a boolean to check if the value has been set.
func (o *GetLastMinedBlockRI) GetTransactionsCountOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.TransactionsCount, true
}
// SetTransactionsCount sets field value
func (o *GetLastMinedBlockRI) SetTransactionsCount(v int32) {
o.TransactionsCount = v
}
// GetBlockchainSpecific returns the BlockchainSpecific field value
func (o *GetLastMinedBlockRI) GetBlockchainSpecific() GetLastMinedBlockRIBS {
if o == nil {
var ret GetLastMinedBlockRIBS
return ret
}
return o.BlockchainSpecific
}
// GetBlockchainSpecificOk returns a tuple with the BlockchainSpecific field value
// and a boolean to check if the value has been set.
func (o *GetLastMinedBlockRI) GetBlockchainSpecificOk() (*GetLastMinedBlockRIBS, bool) {
if o == nil {
return nil, false
}
return &o.BlockchainSpecific, true
}
// SetBlockchainSpecific sets field value
func (o *GetLastMinedBlockRI) SetBlockchainSpecific(v GetLastMinedBlockRIBS) {
o.BlockchainSpecific = v
}
func (o GetLastMinedBlockRI) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["hash"] = o.Hash
}
if true {
toSerialize["height"] = o.Height
}
if true {
toSerialize["previousBlockHash"] = o.PreviousBlockHash
}
if true {
toSerialize["timestamp"] = o.Timestamp
}
if true {
toSerialize["transactionsCount"] = o.TransactionsCount
}
if true {
toSerialize["blockchainSpecific"] = o.BlockchainSpecific
}
return json.Marshal(toSerialize)
}
type NullableGetLastMinedBlockRI struct {
value *GetLastMinedBlockRI
isSet bool
}
func (v NullableGetLastMinedBlockRI) Get() *GetLastMinedBlockRI {
return v.value
}
func (v *NullableGetLastMinedBlockRI) Set(val *GetLastMinedBlockRI) {
v.value = val
v.isSet = true
}
func (v NullableGetLastMinedBlockRI) IsSet() bool {
return v.isSet
}
func (v *NullableGetLastMinedBlockRI) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetLastMinedBlockRI(val *GetLastMinedBlockRI) *NullableGetLastMinedBlockRI {
return &NullableGetLastMinedBlockRI{value: val, isSet: true}
}
func (v NullableGetLastMinedBlockRI) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetLastMinedBlockRI) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
} | model_get_last_mined_block_ri.go | 0.835819 | 0.469034 | model_get_last_mined_block_ri.go | starcoder |
package gfx
import (
"azul3d.org/engine/lmath"
)
// TexCoord represents a 2D texture coordinate with U and V components.
type TexCoord struct {
U, V float32
}
// Mat4 represents a 32-bit floating point 4x4 matrix for compatability with
// graphics hardware.
// lmath.Mat4 should be used anywhere that an explicit 32-bit type is not
// needed.
type Mat4 [4][4]float32
// Mat4 converts this 32-bit Mat4 to a 64-bit lmath.Mat4 matrix.
func (m Mat4) Mat4() lmath.Mat4 {
return lmath.Mat4{
[4]float64{float64(m[0][0]), float64(m[0][1]), float64(m[0][2]), float64(m[0][3])},
[4]float64{float64(m[1][0]), float64(m[1][1]), float64(m[1][2]), float64(m[1][3])},
[4]float64{float64(m[2][0]), float64(m[2][1]), float64(m[2][2]), float64(m[2][3])},
[4]float64{float64(m[3][0]), float64(m[3][1]), float64(m[3][2]), float64(m[3][3])},
}
}
// ConvertMat4 converts the 64-bit lmath.Mat4 to a 32-bit Mat4 matrix.
func ConvertMat4(m lmath.Mat4) Mat4 {
return Mat4{
[4]float32{float32(m[0][0]), float32(m[0][1]), float32(m[0][2]), float32(m[0][3])},
[4]float32{float32(m[1][0]), float32(m[1][1]), float32(m[1][2]), float32(m[1][3])},
[4]float32{float32(m[2][0]), float32(m[2][1]), float32(m[2][2]), float32(m[2][3])},
[4]float32{float32(m[3][0]), float32(m[3][1]), float32(m[3][2]), float32(m[3][3])},
}
}
// Vec3 represents a 32-bit floating point three-component vector for
// compatability with graphics hardware.
// lmath.Vec3 should be used anywhere that an explicit 32-bit type is not
// needed.
type Vec3 struct {
X, Y, Z float32
}
// Vec3 converts this 32-bit Vec3 to a 64-bit lmath.Vec3 vector.
func (v Vec3) Vec3() lmath.Vec3 {
return lmath.Vec3{X: float64(v.X), Y: float64(v.Y), Z: float64(v.Z)}
}
// ConvertVec3 converts the 64-bit lmath.Vec3 to a 32-bit Vec3 vector.
func ConvertVec3(v lmath.Vec3) Vec3 {
return Vec3{X: float32(v.X), Y: float32(v.Y), Z: float32(v.Z)}
}
// Vec4 represents a 32-bit floating point four-component vector for
// compatability with graphics hardware.
// lmath.Vec4 should be used anywhere that an explicit 32-bit type is not
// needed.
type Vec4 struct {
X, Y, Z, W float32
}
// Vec4 converts this 32-bit Vec4 to a 64-bit lmath.Vec4 vector.
func (v Vec4) Vec4() lmath.Vec4 {
return lmath.Vec4{X: float64(v.X), Y: float64(v.Y), Z: float64(v.Z)}
}
// ConvertVec4 converts the 64-bit lmath.Vec4 to a 32-bit Vec4 vector.
func ConvertVec4(v lmath.Vec4) Vec4 {
return Vec4{X: float32(v.X), Y: float32(v.Y), Z: float32(v.Z), W: float32(v.W)}
} | gfx/types.go | 0.861407 | 0.65769 | types.go | starcoder |
package main
import (
"fmt"
"math/rand"
"strings"
"time"
"advent/lib/util"
"github.com/smartystreets/assertions/assert"
"github.com/smartystreets/assertions/should"
)
func main() {
fmt.Println(assert.So(part1(), should.Equal, 509))
fmt.Println(assert.So(part2(), should.Equal, 195))
}
const (
molecule = `CRnCaSiRnBSiRnFArTiBPTiTiBFArPBCaSiThSiRnTiBPBPMgArCaSiRnTiMgArCaSiThCaSiRnFArRnSiRnFArTiTiBFArCaCaSiRnSiThCaCaSiRnMgArFYSiRnFYCaFArSiThCaSiThPBPTiMgArCaPRnSiAlArPBCaCaSiRnFYSiThCaRnFArArCaCaSiRnPBSiRnFArMgYCaCaCaCaSiThCaCaSiAlArCaCaSiRnPBSiAlArBCaCaCaCaSiThCaPBSiThPBPBCaSiRnFYFArSiThCaSiRnFArBCaCaSiRnFYFArSiThCaPBSiThCaSiRnPMgArRnFArPTiBCaPRnFArCaCaCaCaSiRnCaCaSiRnFYFArFArBCaSiThFArThSiThSiRnTiRnPMgArFArCaSiThCaPBCaSiRnBFArCaCaPRnCaCaPMgArSiRnFYFArCaSiThRnPBPMgAr`
part1Start = molecule
)
func part1() int {
machine := NewMoleculeMachine()
for scanner := util.InputScanner(); scanner.Scan(); {
line := scanner.Text()
if line == "" {
break
}
machine.RegisterReplacement(line)
}
molecules := machine.Calibrate(part1Start)
return len(molecules)
}
func part2() (transformations int) {
var replacements []Pair
for scanner := util.InputScanner(); scanner.Scan(); {
line := scanner.Text()
if line == "" {
break
}
fields := strings.Fields(line)
replacements = append(replacements, Pair{fields[0], fields[2]})
}
shuffles := 0
working := molecule
for len(working) > 1 {
checkpoint := working
for _, pair := range replacements {
from, to := pair.Key, pair.Value
for strings.Contains(working, to) {
transformations += strings.Count(working, to)
working = strings.Replace(working, to, from, -1)
}
}
if working == checkpoint {
Shuffle(replacements)
working = molecule
transformations = 0
shuffles++
}
}
return transformations
}
// Credit: https://www.calhoun.io/how-to-shuffle-arrays-and-slices-in-go/
func Shuffle(slice []Pair) {
generator := rand.New(rand.NewSource(time.Now().Unix()))
for len(slice) > 0 {
n := len(slice)
randIndex := generator.Intn(n)
slice[n-1], slice[randIndex] = slice[randIndex], slice[n-1]
slice = slice[:n-1]
}
}
type Pair struct {
Key, Value string
}
/*
Credit: https://www.reddit.com/r/adventofcode/comments/3xflz8/day_19_solutions/cy4kpms/
# In Python 2, part two only shown. I work from the molecule removing chunks of the string according to the rules until I get down to a molecule of length 1.
# But I apply the transformations randomly. When I apply a transformation, I apply it as many times as a I can before moving on to the next. If the molecule is not smaller after all transformations, I shuffle all the possible transformations and start again.
# The number of times I have to the transformations over is much much fewer than I thought it would be. I find the solution after 1 to 10 restarts. And it's apparently the same number of transformations each time. This is surprising. I'm guessing it's the nature of the data and not my "awesome" random algorithm.
# It'd be great to get a proof that this algorithm quickly finds the solution (as it appears to in practice), but I'm not sure there is a proof...
The code:
count = shuffles = 0
mol = molecule
while len(mol) > 1:
start = mol
for frm, to in transforms:
while to in mol:
count += mol.count(to)
mol = mol.replace(to, frm)
if start == mol: # no progress start again
shuffle(transforms)
mol = molecule
count = 0
shuffles += 1
print('{} transforms after {} shuffles'.format(count, shuffles))
*/ | go/2015/day19/main.go | 0.510252 | 0.491029 | main.go | starcoder |
package quadtree
import (
"github.com/rob05c/sauropoda/dino"
"math/rand"
"time"
)
const elementSize = 100
type Quadtree struct {
root *Node
dinos map[int64]*dino.PositionedDinosaur
}
func (q *Quadtree) GetByID(id int64) (*dino.PositionedDinosaur, bool) {
dino, ok := q.dinos[id]
if !ok {
return nil, false
}
if time.Now().After(dino.Expiration) {
return nil, false
}
return dino, true
}
type Node struct {
left float64
right float64
top float64
bottom float64
topLeft *Node
topRight *Node
bottomLeft *Node
bottomRight *Node
elements []dino.PositionedDinosaur
}
func (n *Node) hasSplit() bool {
return n.topLeft != nil // it has split, if any child nodes are non-nil
}
func init() {
rand.Seed(time.Now().Unix())
}
// Create Returns a Latitude-Longitude Quadtree
// Note this creates a latlon quadtree. In Lat Lon, right > left and top > bottom
func Create() Quadtree {
return createGeneric(-180.0, 180.0, 90.0, -90.0)
}
func createGeneric(l, r, t, b float64) Quadtree {
return Quadtree{
root: &Node{
left: l,
right: r,
top: t,
bottom: b,
elements: make([]dino.PositionedDinosaur, 0, elementSize),
},
dinos: map[int64]*dino.PositionedDinosaur{},
}
}
// Insert inserts the given dinosaur into the quadtree
func (q *Quadtree) Insert(d dino.PositionedDinosaur) {
q.root.insert(d)
q.dinos[d.PositionedID] = &d
}
func (n *Node) insert(d dino.PositionedDinosaur) {
if !n.hasSplit() {
n.elements = append(n.elements, d)
n.splitIfNecessary()
return
}
n.insertAppropriateChild(d)
}
func (n *Node) insertAppropriateChild(d dino.PositionedDinosaur) {
leftMid := (n.right-n.left)/2 + n.left
topMid := (n.top-n.bottom)/2 + n.bottom
left := d.Longitude < leftMid
top := d.Latitude > topMid
if left && top {
n.topLeft.insert(d)
} else if top {
n.topRight.insert(d)
} else if left {
n.bottomLeft.insert(d)
} else {
n.bottomRight.insert(d)
}
}
func (n *Node) splitIfNecessary() {
if len(n.elements) > elementSize {
n.split()
}
}
func (n *Node) split() {
leftMid := (n.right-n.left)/2 + n.left
topMid := (n.top-n.bottom)/2 + n.bottom
n.topLeft = &Node{left: n.left, right: leftMid, top: n.top, bottom: topMid}
n.topRight = &Node{left: leftMid, right: n.right, top: n.top, bottom: topMid}
n.bottomLeft = &Node{left: n.left, right: leftMid, top: topMid, bottom: n.bottom}
n.bottomRight = &Node{left: leftMid, right: n.right, top: topMid, bottom: n.bottom}
for _, e := range n.elements {
n.insertAppropriateChild(e)
}
n.elements = nil
}
func (q *Quadtree) Get(top float64, left float64, bottom float64, right float64) []dino.PositionedDinosaur {
dinos, expired := q.root.get(top, left, bottom, right)
for _, dino := range expired {
delete(q.dinos, dino.PositionedID)
}
return dinos
}
// get returns the dinosaurs in the given rect, and the dinosaurs which have expired and should be removed from the Quadtree's map of IDs.
func (n *Node) get(top float64, left float64, bottom float64, right float64) ([]dino.PositionedDinosaur, []dino.PositionedDinosaur) {
if top < n.bottom || bottom > n.top || left > n.right || right < n.left {
return nil, nil
}
if !n.hasSplit() {
expired := n.removeExpired()
return elementsInRect(top, left, bottom, right, n.elements), expired
}
topLeftElements, topLeftExpired := n.topLeft.get(top, left, bottom, right)
topRightElements, topRightExpired := n.topRight.get(top, left, bottom, right)
bottomLeftElements, bottomLeftExpired := n.bottomLeft.get(top, left, bottom, right)
bottomRightElements, bottomRightExpired := n.bottomRight.get(top, left, bottom, right)
allExpired := make([]dino.PositionedDinosaur, 0, len(topLeftExpired)+len(topRightExpired)+len(bottomLeftExpired)+len(bottomRightExpired))
allExpired = append(allExpired, topLeftExpired...)
allExpired = append(allExpired, topRightExpired...)
allExpired = append(allExpired, bottomLeftExpired...)
allExpired = append(allExpired, bottomRightExpired...)
all := make([]dino.PositionedDinosaur, 0, len(topLeftElements)+len(topRightElements)+len(bottomLeftElements)+len(bottomRightElements))
all = append(all, topLeftElements...)
all = append(all, topRightElements...)
all = append(all, bottomLeftElements...)
all = append(all, bottomRightElements...)
return all, allExpired
}
func inRect(rtop float64, rleft float64, rbottom float64, rright float64, latitude float64, longitude float64) bool {
return latitude < rtop && latitude > rbottom && longitude > rleft && longitude < rright
}
func elementsInRect(rtop float64, rleft float64, rbottom float64, rright float64, elements []dino.PositionedDinosaur) []dino.PositionedDinosaur {
in := []dino.PositionedDinosaur{}
for _, e := range elements {
if inRect(rtop, rleft, rbottom, rright, e.Latitude, e.Longitude) {
in = append(in, e)
}
}
return in
}
// removeExpired removes expired elements.
// Note this only removes expired elements from this node, not children.
// Returns expired dinosaurs, so they may be removed from the Quadtree map of IDs.
func (n *Node) removeExpired() []dino.PositionedDinosaur {
now := time.Now()
newElements := []dino.PositionedDinosaur{}
expired := []dino.PositionedDinosaur{}
for _, e := range n.elements {
if !e.Expiration.Before(now) {
newElements = append(newElements, e)
} else {
expired = append(expired, e)
}
}
n.elements = newElements
return expired
} | quadtree/quadtree.go | 0.75037 | 0.432123 | quadtree.go | starcoder |
package expr
import (
"github.com/pkg/errors"
"go/ast"
"go/token"
"math"
"strconv"
)
type EvaluatorFunc func(s *Stack) interface{}
type evaluator struct {
identifiers map[string]interface{}
stack *Stack
err error
}
func newEvaluator() *evaluator {
e := &evaluator{
identifiers: make(map[string]interface{}),
stack: NewStack(),
}
e.useCoreLibrary()
return e
}
func (e *evaluator) Evaluate(node ast.Node) (interface{}, error) {
ast.Walk(e, node)
if e.err != nil {
return nil, e.err
}
if !e.stack.IsEmpty() {
return e.stack.Tail(), nil
}
return nil, errors.New("empty expression")
}
func (e *evaluator) Visit(node ast.Node) ast.Visitor {
switch n := node.(type) {
case *ast.BasicLit:
e.VisitBasicLiteral(n)
case *ast.Ident:
e.VisitIdentifier(n)
case *ast.BinaryExpr:
e.VisitBinaryExpression(n)
case *ast.UnaryExpr:
e.VisitUnaryExpression(n)
case *ast.ParenExpr:
e.VisitParenthesesExpression(n)
case *ast.CallExpr:
e.VisitCallExpression(n)
default:
}
return nil
}
func (e *evaluator) VisitBasicLiteral(n *ast.BasicLit) {
var x interface{}
switch n.Kind {
case token.INT, token.FLOAT:
x, _ = strconv.ParseFloat(n.Value, 64)
case token.STRING:
x = n.Value
}
e.stack.Push(x)
}
func (e *evaluator) VisitBinaryExpression(n *ast.BinaryExpr) {
ast.Walk(e, n.X)
ast.Walk(e, n.Y)
y := e.stack.Pop()
x := e.stack.Pop()
switch x := x.(type) {
case float64:
switch y := y.(type) {
case float64:
switch n.Op {
case token.ADD:
e.stack.Push(x + y)
case token.SUB:
e.stack.Push(x - y)
case token.MUL:
e.stack.Push(x * y)
case token.QUO:
e.stack.Push(x / y)
case token.EQL:
e.stack.Push(x == y)
case token.NEQ:
e.stack.Push(x != y)
default:
e.err = errors.Errorf("invalid operation '%s' at [%v]", n.Op, n.Pos())
return
}
}
case string:
switch y := y.(type) {
case string:
e.stack.Push(x + y)
}
}
}
func (e *evaluator) VisitUnaryExpression(n *ast.UnaryExpr) {
ast.Walk(e, n.X)
x := e.stack.Pop()
switch x := x.(type) {
case float64:
switch n.Op {
case token.SUB:
e.stack.Push(-x)
default:
e.err = errors.Errorf("invalid operation '%s' at [%v]", n.Op, n.Pos())
return
}
case bool:
switch n.Op {
case token.NOT:
e.stack.Push(!x)
default:
e.err = errors.Errorf("invalid operation '%s' at [%v]", n.Op, n.Pos())
}
}
}
func (e *evaluator) VisitParenthesesExpression(n *ast.ParenExpr) {
ast.Walk(e, n.X)
}
func (e *evaluator) VisitCallExpression(n *ast.CallExpr) {
for _, arg := range n.Args {
ast.Walk(e, arg)
}
ast.Walk(e, n.Fun)
}
func (e *evaluator) VisitIdentifier(n *ast.Ident) {
if x, ok := e.identifiers[n.Name]; ok {
switch x := x.(type) {
case EvaluatorFunc:
y := x(e.stack)
e.stack.Push(y)
default:
e.stack.Push(x)
}
} else {
e.err = errors.Errorf("unknown identifier '%s' at [%v]", n.Name, n.Pos())
}
}
func (e *evaluator) RegisterFunc(name string, f EvaluatorFunc) {
e.identifiers[name] = f
}
func (e *evaluator) useCoreLibrary() {
e.identifiers["true"] = true
e.identifiers["false"] = false
e.identifiers["Pi"] = math.Pi
e.identifiers["E"] = math.E
e.RegisterFunc("floor", func(s *Stack) interface{} {
return math.Floor(s.Pop().(float64))
})
e.RegisterFunc("ceil", func(s *Stack) interface{} {
return math.Ceil(s.Pop().(float64))
})
e.RegisterFunc("round", func(s *Stack) interface{} {
return math.Round(s.Pop().(float64))
})
e.RegisterFunc("pow", func(s *Stack) interface{} {
y := s.Pop().(float64)
x := s.Pop().(float64)
return math.Pow(x, y)
})
e.RegisterFunc("sin", func(s *Stack) interface{} {
return math.Sin(s.Pop().(float64))
})
e.RegisterFunc("cos", func(s *Stack) interface{} {
return math.Cos(s.Pop().(float64))
})
} | expr/eval.go | 0.500977 | 0.423518 | eval.go | starcoder |
// Package block stores information about blocks in Minecraft.
package block
import (
"math"
)
// BitsPerBlock indicates how many bits are needed to represent all possible
// block states. This value is used to determine the size of the global palette.
var BitsPerBlock = int(math.Ceil(math.Log2(float64(len(StateID)))))
// ID describes the numeric ID of a block.
type ID uint32
// Block describes information about a type of block.
type Block struct {
ID ID
DisplayName string
Name string
Hardness float64
Diggable bool
DropIDs []uint32
NeedsTools map[uint32]bool
MinStateID uint32
MaxStateID uint32
Transparent bool
FilterLightLevel int
EmitLightLevel int
}
var (
Air = Block{ID: 0, DisplayName: "Air", Name: "air", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 0, MaxStateID: 0, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Stone = Block{ID: 1, DisplayName: "Stone", Name: "stone", Hardness: 1.5, Diggable: true, DropIDs: []uint32{21}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 1, MaxStateID: 1, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Granite = Block{ID: 2, DisplayName: "Granite", Name: "granite", Hardness: 1.5, Diggable: true, DropIDs: []uint32{2}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 2, MaxStateID: 2, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PolishedGranite = Block{ID: 3, DisplayName: "Polished Granite", Name: "polished_granite", Hardness: 1.5, Diggable: true, DropIDs: []uint32{3}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 3, MaxStateID: 3, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Diorite = Block{ID: 4, DisplayName: "Diorite", Name: "diorite", Hardness: 1.5, Diggable: true, DropIDs: []uint32{4}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 4, MaxStateID: 4, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PolishedDiorite = Block{ID: 5, DisplayName: "Polished Diorite", Name: "polished_diorite", Hardness: 1.5, Diggable: true, DropIDs: []uint32{5}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 5, MaxStateID: 5, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Andesite = Block{ID: 6, DisplayName: "Andesite", Name: "andesite", Hardness: 1.5, Diggable: true, DropIDs: []uint32{6}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 6, MaxStateID: 6, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PolishedAndesite = Block{ID: 7, DisplayName: "Polished Andesite", Name: "polished_andesite", Hardness: 1.5, Diggable: true, DropIDs: []uint32{7}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 7, MaxStateID: 7, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
GrassBlock = Block{ID: 8, DisplayName: "Grass Block", Name: "grass_block", Hardness: 0.6, Diggable: true, DropIDs: []uint32{15}, NeedsTools: map[uint32]bool{}, MinStateID: 8, MaxStateID: 9, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Dirt = Block{ID: 9, DisplayName: "Dirt", Name: "dirt", Hardness: 0.5, Diggable: true, DropIDs: []uint32{15}, NeedsTools: map[uint32]bool{}, MinStateID: 10, MaxStateID: 10, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CoarseDirt = Block{ID: 10, DisplayName: "Coarse Dirt", Name: "coarse_dirt", Hardness: 0.5, Diggable: true, DropIDs: []uint32{16}, NeedsTools: map[uint32]bool{}, MinStateID: 11, MaxStateID: 11, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Podzol = Block{ID: 11, DisplayName: "Podzol", Name: "podzol", Hardness: 0.5, Diggable: true, DropIDs: []uint32{15}, NeedsTools: map[uint32]bool{}, MinStateID: 12, MaxStateID: 13, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Cobblestone = Block{ID: 12, DisplayName: "Cobblestone", Name: "cobblestone", Hardness: 2, Diggable: true, DropIDs: []uint32{21}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 14, MaxStateID: 14, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
OakPlanks = Block{ID: 13, DisplayName: "Oak Planks", Name: "oak_planks", Hardness: 2, Diggable: true, DropIDs: []uint32{22}, NeedsTools: map[uint32]bool{}, MinStateID: 15, MaxStateID: 15, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
SprucePlanks = Block{ID: 14, DisplayName: "Spruce Planks", Name: "spruce_planks", Hardness: 2, Diggable: true, DropIDs: []uint32{23}, NeedsTools: map[uint32]bool{}, MinStateID: 16, MaxStateID: 16, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BirchPlanks = Block{ID: 15, DisplayName: "Birch Planks", Name: "birch_planks", Hardness: 2, Diggable: true, DropIDs: []uint32{24}, NeedsTools: map[uint32]bool{}, MinStateID: 17, MaxStateID: 17, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
JunglePlanks = Block{ID: 16, DisplayName: "Jungle Planks", Name: "jungle_planks", Hardness: 2, Diggable: true, DropIDs: []uint32{25}, NeedsTools: map[uint32]bool{}, MinStateID: 18, MaxStateID: 18, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
AcaciaPlanks = Block{ID: 17, DisplayName: "Acacia Planks", Name: "acacia_planks", Hardness: 2, Diggable: true, DropIDs: []uint32{26}, NeedsTools: map[uint32]bool{}, MinStateID: 19, MaxStateID: 19, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DarkOakPlanks = Block{ID: 18, DisplayName: "Dark Oak Planks", Name: "dark_oak_planks", Hardness: 2, Diggable: true, DropIDs: []uint32{27}, NeedsTools: map[uint32]bool{}, MinStateID: 20, MaxStateID: 20, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
OakSapling = Block{ID: 19, DisplayName: "Oak Sapling", Name: "oak_sapling", Hardness: 0, Diggable: true, DropIDs: []uint32{30}, NeedsTools: map[uint32]bool{}, MinStateID: 21, MaxStateID: 22, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
SpruceSapling = Block{ID: 20, DisplayName: "Spruce Sapling", Name: "spruce_sapling", Hardness: 0, Diggable: true, DropIDs: []uint32{31}, NeedsTools: map[uint32]bool{}, MinStateID: 23, MaxStateID: 24, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BirchSapling = Block{ID: 21, DisplayName: "Birch Sapling", Name: "birch_sapling", Hardness: 0, Diggable: true, DropIDs: []uint32{32}, NeedsTools: map[uint32]bool{}, MinStateID: 25, MaxStateID: 26, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
JungleSapling = Block{ID: 22, DisplayName: "Jungle Sapling", Name: "jungle_sapling", Hardness: 0, Diggable: true, DropIDs: []uint32{33}, NeedsTools: map[uint32]bool{}, MinStateID: 27, MaxStateID: 28, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
AcaciaSapling = Block{ID: 23, DisplayName: "Acacia Sapling", Name: "acacia_sapling", Hardness: 0, Diggable: true, DropIDs: []uint32{34}, NeedsTools: map[uint32]bool{}, MinStateID: 29, MaxStateID: 30, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
DarkOakSapling = Block{ID: 24, DisplayName: "Dark Oak Sapling", Name: "dark_oak_sapling", Hardness: 0, Diggable: true, DropIDs: []uint32{35}, NeedsTools: map[uint32]bool{}, MinStateID: 31, MaxStateID: 32, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Bedrock = Block{ID: 25, DisplayName: "Bedrock", Name: "bedrock", Hardness: 0, Diggable: false, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 33, MaxStateID: 33, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Water = Block{ID: 26, DisplayName: "Air", Name: "water", Hardness: 100, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 34, MaxStateID: 49, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
Lava = Block{ID: 27, DisplayName: "Air", Name: "lava", Hardness: 100, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 50, MaxStateID: 65, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 15}
Sand = Block{ID: 28, DisplayName: "Sand", Name: "sand", Hardness: 0.5, Diggable: true, DropIDs: []uint32{37}, NeedsTools: map[uint32]bool{}, MinStateID: 66, MaxStateID: 66, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
RedSand = Block{ID: 29, DisplayName: "Red Sand", Name: "red_sand", Hardness: 0.5, Diggable: true, DropIDs: []uint32{38}, NeedsTools: map[uint32]bool{}, MinStateID: 67, MaxStateID: 67, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Gravel = Block{ID: 30, DisplayName: "Gravel", Name: "gravel", Hardness: 0.6, Diggable: true, DropIDs: []uint32{39}, NeedsTools: map[uint32]bool{}, MinStateID: 68, MaxStateID: 68, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
GoldOre = Block{ID: 31, DisplayName: "Gold Ore", Name: "gold_ore", Hardness: 3, Diggable: true, DropIDs: []uint32{695}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true}, MinStateID: 69, MaxStateID: 69, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DeepslateGoldOre = Block{ID: 32, DisplayName: "Deepslate Gold Ore", Name: "deepslate_gold_ore", Hardness: 4.5, Diggable: true, DropIDs: []uint32{695}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true}, MinStateID: 70, MaxStateID: 70, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
IronOre = Block{ID: 33, DisplayName: "Iron Ore", Name: "iron_ore", Hardness: 3, Diggable: true, DropIDs: []uint32{691}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 71, MaxStateID: 71, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DeepslateIronOre = Block{ID: 34, DisplayName: "Deepslate Iron Ore", Name: "deepslate_iron_ore", Hardness: 4.5, Diggable: true, DropIDs: []uint32{691}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 72, MaxStateID: 72, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CoalOre = Block{ID: 35, DisplayName: "Coal Ore", Name: "coal_ore", Hardness: 3, Diggable: true, DropIDs: []uint32{684}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 73, MaxStateID: 73, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DeepslateCoalOre = Block{ID: 36, DisplayName: "Deepslate Coal Ore", Name: "deepslate_coal_ore", Hardness: 4.5, Diggable: true, DropIDs: []uint32{684}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 74, MaxStateID: 74, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
NetherGoldOre = Block{ID: 37, DisplayName: "Nether Gold Ore", Name: "nether_gold_ore", Hardness: 3, Diggable: true, DropIDs: []uint32{861}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 75, MaxStateID: 75, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
OakLog = Block{ID: 38, DisplayName: "Oak Log", Name: "oak_log", Hardness: 2, Diggable: true, DropIDs: []uint32{101}, NeedsTools: map[uint32]bool{}, MinStateID: 76, MaxStateID: 78, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
SpruceLog = Block{ID: 39, DisplayName: "Spruce Log", Name: "spruce_log", Hardness: 2, Diggable: true, DropIDs: []uint32{102}, NeedsTools: map[uint32]bool{}, MinStateID: 79, MaxStateID: 81, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BirchLog = Block{ID: 40, DisplayName: "Birch Log", Name: "birch_log", Hardness: 2, Diggable: true, DropIDs: []uint32{103}, NeedsTools: map[uint32]bool{}, MinStateID: 82, MaxStateID: 84, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
JungleLog = Block{ID: 41, DisplayName: "Jungle Log", Name: "jungle_log", Hardness: 2, Diggable: true, DropIDs: []uint32{104}, NeedsTools: map[uint32]bool{}, MinStateID: 85, MaxStateID: 87, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
AcaciaLog = Block{ID: 42, DisplayName: "Acacia Log", Name: "acacia_log", Hardness: 2, Diggable: true, DropIDs: []uint32{105}, NeedsTools: map[uint32]bool{}, MinStateID: 88, MaxStateID: 90, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DarkOakLog = Block{ID: 43, DisplayName: "Dark Oak Log", Name: "dark_oak_log", Hardness: 2, Diggable: true, DropIDs: []uint32{106}, NeedsTools: map[uint32]bool{}, MinStateID: 91, MaxStateID: 93, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
StrippedSpruceLog = Block{ID: 44, DisplayName: "Stripped Spruce Log", Name: "stripped_spruce_log", Hardness: 2, Diggable: true, DropIDs: []uint32{110}, NeedsTools: map[uint32]bool{}, MinStateID: 94, MaxStateID: 96, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
StrippedBirchLog = Block{ID: 45, DisplayName: "Stripped Birch Log", Name: "stripped_birch_log", Hardness: 2, Diggable: true, DropIDs: []uint32{111}, NeedsTools: map[uint32]bool{}, MinStateID: 97, MaxStateID: 99, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
StrippedJungleLog = Block{ID: 46, DisplayName: "Stripped Jungle Log", Name: "stripped_jungle_log", Hardness: 2, Diggable: true, DropIDs: []uint32{112}, NeedsTools: map[uint32]bool{}, MinStateID: 100, MaxStateID: 102, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
StrippedAcaciaLog = Block{ID: 47, DisplayName: "Stripped Acacia Log", Name: "stripped_acacia_log", Hardness: 2, Diggable: true, DropIDs: []uint32{113}, NeedsTools: map[uint32]bool{}, MinStateID: 103, MaxStateID: 105, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
StrippedDarkOakLog = Block{ID: 48, DisplayName: "Stripped Dark Oak Log", Name: "stripped_dark_oak_log", Hardness: 2, Diggable: true, DropIDs: []uint32{114}, NeedsTools: map[uint32]bool{}, MinStateID: 106, MaxStateID: 108, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
StrippedOakLog = Block{ID: 49, DisplayName: "Stripped Oak Log", Name: "stripped_oak_log", Hardness: 2, Diggable: true, DropIDs: []uint32{109}, NeedsTools: map[uint32]bool{}, MinStateID: 109, MaxStateID: 111, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
OakWood = Block{ID: 50, DisplayName: "Oak Wood", Name: "oak_wood", Hardness: 2, Diggable: true, DropIDs: []uint32{125}, NeedsTools: map[uint32]bool{}, MinStateID: 112, MaxStateID: 114, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
SpruceWood = Block{ID: 51, DisplayName: "Spruce Wood", Name: "spruce_wood", Hardness: 2, Diggable: true, DropIDs: []uint32{126}, NeedsTools: map[uint32]bool{}, MinStateID: 115, MaxStateID: 117, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BirchWood = Block{ID: 52, DisplayName: "Birch Wood", Name: "birch_wood", Hardness: 2, Diggable: true, DropIDs: []uint32{127}, NeedsTools: map[uint32]bool{}, MinStateID: 118, MaxStateID: 120, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
JungleWood = Block{ID: 53, DisplayName: "Jungle Wood", Name: "jungle_wood", Hardness: 2, Diggable: true, DropIDs: []uint32{128}, NeedsTools: map[uint32]bool{}, MinStateID: 121, MaxStateID: 123, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
AcaciaWood = Block{ID: 54, DisplayName: "Acacia Wood", Name: "acacia_wood", Hardness: 2, Diggable: true, DropIDs: []uint32{129}, NeedsTools: map[uint32]bool{}, MinStateID: 124, MaxStateID: 126, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DarkOakWood = Block{ID: 55, DisplayName: "Dark Oak Wood", Name: "dark_oak_wood", Hardness: 2, Diggable: true, DropIDs: []uint32{130}, NeedsTools: map[uint32]bool{}, MinStateID: 127, MaxStateID: 129, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
StrippedOakWood = Block{ID: 56, DisplayName: "Stripped Oak Wood", Name: "stripped_oak_wood", Hardness: 2, Diggable: true, DropIDs: []uint32{117}, NeedsTools: map[uint32]bool{}, MinStateID: 130, MaxStateID: 132, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
StrippedSpruceWood = Block{ID: 57, DisplayName: "Stripped Spruce Wood", Name: "stripped_spruce_wood", Hardness: 2, Diggable: true, DropIDs: []uint32{118}, NeedsTools: map[uint32]bool{}, MinStateID: 133, MaxStateID: 135, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
StrippedBirchWood = Block{ID: 58, DisplayName: "Stripped Birch Wood", Name: "stripped_birch_wood", Hardness: 2, Diggable: true, DropIDs: []uint32{119}, NeedsTools: map[uint32]bool{}, MinStateID: 136, MaxStateID: 138, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
StrippedJungleWood = Block{ID: 59, DisplayName: "Stripped Jungle Wood", Name: "stripped_jungle_wood", Hardness: 2, Diggable: true, DropIDs: []uint32{120}, NeedsTools: map[uint32]bool{}, MinStateID: 139, MaxStateID: 141, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
StrippedAcaciaWood = Block{ID: 60, DisplayName: "Stripped Acacia Wood", Name: "stripped_acacia_wood", Hardness: 2, Diggable: true, DropIDs: []uint32{121}, NeedsTools: map[uint32]bool{}, MinStateID: 142, MaxStateID: 144, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
StrippedDarkOakWood = Block{ID: 61, DisplayName: "Stripped Dark Oak Wood", Name: "stripped_dark_oak_wood", Hardness: 2, Diggable: true, DropIDs: []uint32{122}, NeedsTools: map[uint32]bool{}, MinStateID: 145, MaxStateID: 147, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
OakLeaves = Block{ID: 62, DisplayName: "Oak Leaves", Name: "oak_leaves", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 148, MaxStateID: 161, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
SpruceLeaves = Block{ID: 63, DisplayName: "Spruce Leaves", Name: "spruce_leaves", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 162, MaxStateID: 175, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
BirchLeaves = Block{ID: 64, DisplayName: "Birch Leaves", Name: "birch_leaves", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 176, MaxStateID: 189, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
JungleLeaves = Block{ID: 65, DisplayName: "Jungle Leaves", Name: "jungle_leaves", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 190, MaxStateID: 203, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
AcaciaLeaves = Block{ID: 66, DisplayName: "Acacia Leaves", Name: "acacia_leaves", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 204, MaxStateID: 217, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
DarkOakLeaves = Block{ID: 67, DisplayName: "Dark Oak Leaves", Name: "dark_oak_leaves", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 218, MaxStateID: 231, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
AzaleaLeaves = Block{ID: 68, DisplayName: "Azalea Leaves", Name: "azalea_leaves", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 232, MaxStateID: 245, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
FloweringAzaleaLeaves = Block{ID: 69, DisplayName: "Flowering Azalea Leaves", Name: "flowering_azalea_leaves", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 246, MaxStateID: 259, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
Sponge = Block{ID: 70, DisplayName: "Sponge", Name: "sponge", Hardness: 0.6, Diggable: true, DropIDs: []uint32{141}, NeedsTools: map[uint32]bool{}, MinStateID: 260, MaxStateID: 260, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WetSponge = Block{ID: 71, DisplayName: "Wet Sponge", Name: "wet_sponge", Hardness: 0.6, Diggable: true, DropIDs: []uint32{142}, NeedsTools: map[uint32]bool{}, MinStateID: 261, MaxStateID: 261, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Glass = Block{ID: 72, DisplayName: "Glass", Name: "glass", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 262, MaxStateID: 262, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LapisOre = Block{ID: 73, DisplayName: "Lapis Lazuli Ore", Name: "lapis_ore", Hardness: 3, Diggable: true, DropIDs: []uint32{688}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 263, MaxStateID: 263, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DeepslateLapisOre = Block{ID: 74, DisplayName: "Deepslate Lapis Lazuli Ore", Name: "deepslate_lapis_ore", Hardness: 4.5, Diggable: true, DropIDs: []uint32{688}, NeedsTools: map[uint32]bool{721: true, 726: true, 706: true, 716: true}, MinStateID: 264, MaxStateID: 264, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
LapisBlock = Block{ID: 75, DisplayName: "Block of Lapis Lazuli", Name: "lapis_block", Hardness: 3, Diggable: true, DropIDs: []uint32{145}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 265, MaxStateID: 265, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Dispenser = Block{ID: 76, DisplayName: "Dispenser", Name: "dispenser", Hardness: 3.5, Diggable: true, DropIDs: []uint32{596}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 266, MaxStateID: 277, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Sandstone = Block{ID: 77, DisplayName: "Sandstone", Name: "sandstone", Hardness: 0.8, Diggable: true, DropIDs: []uint32{146}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 278, MaxStateID: 278, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
ChiseledSandstone = Block{ID: 78, DisplayName: "Chiseled Sandstone", Name: "chiseled_sandstone", Hardness: 0.8, Diggable: true, DropIDs: []uint32{147}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 279, MaxStateID: 279, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CutSandstone = Block{ID: 79, DisplayName: "Cut Sandstone", Name: "cut_sandstone", Hardness: 0.8, Diggable: true, DropIDs: []uint32{148}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 280, MaxStateID: 280, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
NoteBlock = Block{ID: 80, DisplayName: "Note Block", Name: "note_block", Hardness: 0.8, Diggable: true, DropIDs: []uint32{608}, NeedsTools: map[uint32]bool{}, MinStateID: 281, MaxStateID: 1080, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WhiteBed = Block{ID: 81, DisplayName: "White Bed", Name: "white_bed", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1081, MaxStateID: 1096, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
OrangeBed = Block{ID: 82, DisplayName: "Orange Bed", Name: "orange_bed", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1097, MaxStateID: 1112, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
MagentaBed = Block{ID: 83, DisplayName: "Magenta Bed", Name: "magenta_bed", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1113, MaxStateID: 1128, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LightBlueBed = Block{ID: 84, DisplayName: "Light Blue Bed", Name: "light_blue_bed", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1129, MaxStateID: 1144, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
YellowBed = Block{ID: 85, DisplayName: "Yellow Bed", Name: "yellow_bed", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1145, MaxStateID: 1160, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LimeBed = Block{ID: 86, DisplayName: "Lime Bed", Name: "lime_bed", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1161, MaxStateID: 1176, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PinkBed = Block{ID: 87, DisplayName: "Pink Bed", Name: "pink_bed", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1177, MaxStateID: 1192, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
GrayBed = Block{ID: 88, DisplayName: "Gray Bed", Name: "gray_bed", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1193, MaxStateID: 1208, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LightGrayBed = Block{ID: 89, DisplayName: "Light Gray Bed", Name: "light_gray_bed", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1209, MaxStateID: 1224, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
CyanBed = Block{ID: 90, DisplayName: "Cyan Bed", Name: "cyan_bed", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1225, MaxStateID: 1240, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PurpleBed = Block{ID: 91, DisplayName: "Purple Bed", Name: "purple_bed", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1241, MaxStateID: 1256, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BlueBed = Block{ID: 92, DisplayName: "Blue Bed", Name: "blue_bed", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1257, MaxStateID: 1272, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BrownBed = Block{ID: 93, DisplayName: "Brown Bed", Name: "brown_bed", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1273, MaxStateID: 1288, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
GreenBed = Block{ID: 94, DisplayName: "Green Bed", Name: "green_bed", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1289, MaxStateID: 1304, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
RedBed = Block{ID: 95, DisplayName: "Red Bed", Name: "red_bed", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1305, MaxStateID: 1320, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BlackBed = Block{ID: 96, DisplayName: "Black Bed", Name: "black_bed", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1321, MaxStateID: 1336, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PoweredRail = Block{ID: 97, DisplayName: "Powered Rail", Name: "powered_rail", Hardness: 0.7, Diggable: true, DropIDs: []uint32{657}, NeedsTools: map[uint32]bool{}, MinStateID: 1337, MaxStateID: 1360, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
DetectorRail = Block{ID: 98, DisplayName: "Detector Rail", Name: "detector_rail", Hardness: 0.7, Diggable: true, DropIDs: []uint32{658}, NeedsTools: map[uint32]bool{}, MinStateID: 1361, MaxStateID: 1384, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
StickyPiston = Block{ID: 99, DisplayName: "Sticky Piston", Name: "sticky_piston", Hardness: 1.5, Diggable: true, DropIDs: []uint32{591}, NeedsTools: map[uint32]bool{}, MinStateID: 1385, MaxStateID: 1396, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Cobweb = Block{ID: 100, DisplayName: "Cobweb", Name: "cobweb", Hardness: 4, Diggable: true, DropIDs: []uint32{732}, NeedsTools: map[uint32]bool{699: true, 704: true, 709: true, 714: true, 719: true, 724: true, 848: true}, MinStateID: 1397, MaxStateID: 1397, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
Grass = Block{ID: 101, DisplayName: "Grass", Name: "grass", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1398, MaxStateID: 1398, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Fern = Block{ID: 102, DisplayName: "Fern", Name: "fern", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1399, MaxStateID: 1399, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
DeadBush = Block{ID: 103, DisplayName: "Dead Bush", Name: "dead_bush", Hardness: 0, Diggable: true, DropIDs: []uint32{729}, NeedsTools: map[uint32]bool{}, MinStateID: 1400, MaxStateID: 1400, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Seagrass = Block{ID: 104, DisplayName: "Seagrass", Name: "seagrass", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1401, MaxStateID: 1401, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
TallSeagrass = Block{ID: 105, DisplayName: "Air", Name: "tall_seagrass", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1402, MaxStateID: 1403, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
Piston = Block{ID: 106, DisplayName: "Piston", Name: "piston", Hardness: 1.5, Diggable: true, DropIDs: []uint32{590}, NeedsTools: map[uint32]bool{}, MinStateID: 1404, MaxStateID: 1415, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PistonHead = Block{ID: 107, DisplayName: "Air", Name: "piston_head", Hardness: 1.5, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1416, MaxStateID: 1439, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WhiteWool = Block{ID: 108, DisplayName: "White Wool", Name: "white_wool", Hardness: 0.8, Diggable: true, DropIDs: []uint32{157}, NeedsTools: map[uint32]bool{}, MinStateID: 1440, MaxStateID: 1440, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
OrangeWool = Block{ID: 109, DisplayName: "Orange Wool", Name: "orange_wool", Hardness: 0.8, Diggable: true, DropIDs: []uint32{158}, NeedsTools: map[uint32]bool{}, MinStateID: 1441, MaxStateID: 1441, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
MagentaWool = Block{ID: 110, DisplayName: "Magenta Wool", Name: "magenta_wool", Hardness: 0.8, Diggable: true, DropIDs: []uint32{159}, NeedsTools: map[uint32]bool{}, MinStateID: 1442, MaxStateID: 1442, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
LightBlueWool = Block{ID: 111, DisplayName: "Light Blue Wool", Name: "light_blue_wool", Hardness: 0.8, Diggable: true, DropIDs: []uint32{160}, NeedsTools: map[uint32]bool{}, MinStateID: 1443, MaxStateID: 1443, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
YellowWool = Block{ID: 112, DisplayName: "Yellow Wool", Name: "yellow_wool", Hardness: 0.8, Diggable: true, DropIDs: []uint32{161}, NeedsTools: map[uint32]bool{}, MinStateID: 1444, MaxStateID: 1444, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
LimeWool = Block{ID: 113, DisplayName: "Lime Wool", Name: "lime_wool", Hardness: 0.8, Diggable: true, DropIDs: []uint32{162}, NeedsTools: map[uint32]bool{}, MinStateID: 1445, MaxStateID: 1445, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PinkWool = Block{ID: 114, DisplayName: "Pink Wool", Name: "pink_wool", Hardness: 0.8, Diggable: true, DropIDs: []uint32{163}, NeedsTools: map[uint32]bool{}, MinStateID: 1446, MaxStateID: 1446, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
GrayWool = Block{ID: 115, DisplayName: "Gray Wool", Name: "gray_wool", Hardness: 0.8, Diggable: true, DropIDs: []uint32{164}, NeedsTools: map[uint32]bool{}, MinStateID: 1447, MaxStateID: 1447, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
LightGrayWool = Block{ID: 116, DisplayName: "Light Gray Wool", Name: "light_gray_wool", Hardness: 0.8, Diggable: true, DropIDs: []uint32{165}, NeedsTools: map[uint32]bool{}, MinStateID: 1448, MaxStateID: 1448, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CyanWool = Block{ID: 117, DisplayName: "Cyan Wool", Name: "cyan_wool", Hardness: 0.8, Diggable: true, DropIDs: []uint32{166}, NeedsTools: map[uint32]bool{}, MinStateID: 1449, MaxStateID: 1449, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PurpleWool = Block{ID: 118, DisplayName: "Purple Wool", Name: "purple_wool", Hardness: 0.8, Diggable: true, DropIDs: []uint32{167}, NeedsTools: map[uint32]bool{}, MinStateID: 1450, MaxStateID: 1450, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BlueWool = Block{ID: 119, DisplayName: "Blue Wool", Name: "blue_wool", Hardness: 0.8, Diggable: true, DropIDs: []uint32{168}, NeedsTools: map[uint32]bool{}, MinStateID: 1451, MaxStateID: 1451, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BrownWool = Block{ID: 120, DisplayName: "Brown Wool", Name: "brown_wool", Hardness: 0.8, Diggable: true, DropIDs: []uint32{169}, NeedsTools: map[uint32]bool{}, MinStateID: 1452, MaxStateID: 1452, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
GreenWool = Block{ID: 121, DisplayName: "Green Wool", Name: "green_wool", Hardness: 0.8, Diggable: true, DropIDs: []uint32{170}, NeedsTools: map[uint32]bool{}, MinStateID: 1453, MaxStateID: 1453, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
RedWool = Block{ID: 122, DisplayName: "Red Wool", Name: "red_wool", Hardness: 0.8, Diggable: true, DropIDs: []uint32{171}, NeedsTools: map[uint32]bool{}, MinStateID: 1454, MaxStateID: 1454, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BlackWool = Block{ID: 123, DisplayName: "Black Wool", Name: "black_wool", Hardness: 0.8, Diggable: true, DropIDs: []uint32{172}, NeedsTools: map[uint32]bool{}, MinStateID: 1455, MaxStateID: 1455, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
MovingPiston = Block{ID: 124, DisplayName: "Air", Name: "moving_piston", Hardness: 0, Diggable: false, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1456, MaxStateID: 1467, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Dandelion = Block{ID: 125, DisplayName: "Dandelion", Name: "dandelion", Hardness: 0, Diggable: true, DropIDs: []uint32{173}, NeedsTools: map[uint32]bool{}, MinStateID: 1468, MaxStateID: 1468, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Poppy = Block{ID: 126, DisplayName: "Poppy", Name: "poppy", Hardness: 0, Diggable: true, DropIDs: []uint32{174}, NeedsTools: map[uint32]bool{}, MinStateID: 1469, MaxStateID: 1469, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BlueOrchid = Block{ID: 127, DisplayName: "Blue Orchid", Name: "blue_orchid", Hardness: 0, Diggable: true, DropIDs: []uint32{175}, NeedsTools: map[uint32]bool{}, MinStateID: 1470, MaxStateID: 1470, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Allium = Block{ID: 128, DisplayName: "Allium", Name: "allium", Hardness: 0, Diggable: true, DropIDs: []uint32{176}, NeedsTools: map[uint32]bool{}, MinStateID: 1471, MaxStateID: 1471, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
AzureBluet = Block{ID: 129, DisplayName: "Azure Bluet", Name: "azure_bluet", Hardness: 0, Diggable: true, DropIDs: []uint32{177}, NeedsTools: map[uint32]bool{}, MinStateID: 1472, MaxStateID: 1472, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
RedTulip = Block{ID: 130, DisplayName: "Red Tulip", Name: "red_tulip", Hardness: 0, Diggable: true, DropIDs: []uint32{178}, NeedsTools: map[uint32]bool{}, MinStateID: 1473, MaxStateID: 1473, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
OrangeTulip = Block{ID: 131, DisplayName: "Orange Tulip", Name: "orange_tulip", Hardness: 0, Diggable: true, DropIDs: []uint32{179}, NeedsTools: map[uint32]bool{}, MinStateID: 1474, MaxStateID: 1474, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
WhiteTulip = Block{ID: 132, DisplayName: "White Tulip", Name: "white_tulip", Hardness: 0, Diggable: true, DropIDs: []uint32{180}, NeedsTools: map[uint32]bool{}, MinStateID: 1475, MaxStateID: 1475, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PinkTulip = Block{ID: 133, DisplayName: "Pink Tulip", Name: "pink_tulip", Hardness: 0, Diggable: true, DropIDs: []uint32{181}, NeedsTools: map[uint32]bool{}, MinStateID: 1476, MaxStateID: 1476, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
OxeyeDaisy = Block{ID: 134, DisplayName: "Oxeye Daisy", Name: "oxeye_daisy", Hardness: 0, Diggable: true, DropIDs: []uint32{182}, NeedsTools: map[uint32]bool{}, MinStateID: 1477, MaxStateID: 1477, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Cornflower = Block{ID: 135, DisplayName: "Cornflower", Name: "cornflower", Hardness: 0, Diggable: true, DropIDs: []uint32{183}, NeedsTools: map[uint32]bool{}, MinStateID: 1478, MaxStateID: 1478, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
WitherRose = Block{ID: 136, DisplayName: "Wither Rose", Name: "wither_rose", Hardness: 0, Diggable: true, DropIDs: []uint32{185}, NeedsTools: map[uint32]bool{}, MinStateID: 1479, MaxStateID: 1479, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LilyOfTheValley = Block{ID: 137, DisplayName: "Lily of the Valley", Name: "lily_of_the_valley", Hardness: 0, Diggable: true, DropIDs: []uint32{184}, NeedsTools: map[uint32]bool{}, MinStateID: 1480, MaxStateID: 1480, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BrownMushroom = Block{ID: 138, DisplayName: "Brown Mushroom", Name: "brown_mushroom", Hardness: 0, Diggable: true, DropIDs: []uint32{187}, NeedsTools: map[uint32]bool{}, MinStateID: 1481, MaxStateID: 1481, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 1}
RedMushroom = Block{ID: 139, DisplayName: "Red Mushroom", Name: "red_mushroom", Hardness: 0, Diggable: true, DropIDs: []uint32{188}, NeedsTools: map[uint32]bool{}, MinStateID: 1482, MaxStateID: 1482, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
GoldBlock = Block{ID: 140, DisplayName: "Block of Gold", Name: "gold_block", Hardness: 3, Diggable: true, DropIDs: []uint32{67}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true}, MinStateID: 1483, MaxStateID: 1483, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
IronBlock = Block{ID: 141, DisplayName: "Block of Iron", Name: "iron_block", Hardness: 5, Diggable: true, DropIDs: []uint32{65}, NeedsTools: map[uint32]bool{721: true, 726: true, 706: true, 716: true}, MinStateID: 1484, MaxStateID: 1484, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Bricks = Block{ID: 142, DisplayName: "Bricks", Name: "bricks", Hardness: 2, Diggable: true, DropIDs: []uint32{232}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 1485, MaxStateID: 1485, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Tnt = Block{ID: 143, DisplayName: "TNT", Name: "tnt", Hardness: 0, Diggable: true, DropIDs: []uint32{606}, NeedsTools: map[uint32]bool{}, MinStateID: 1486, MaxStateID: 1487, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Bookshelf = Block{ID: 144, DisplayName: "Bookshelf", Name: "bookshelf", Hardness: 1.5, Diggable: true, DropIDs: []uint32{792}, NeedsTools: map[uint32]bool{}, MinStateID: 1488, MaxStateID: 1488, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
MossyCobblestone = Block{ID: 145, DisplayName: "Mossy Cobblestone", Name: "mossy_cobblestone", Hardness: 2, Diggable: true, DropIDs: []uint32{234}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 1489, MaxStateID: 1489, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Obsidian = Block{ID: 146, DisplayName: "Obsidian", Name: "obsidian", Hardness: 50, Diggable: true, DropIDs: []uint32{235}, NeedsTools: map[uint32]bool{721: true, 726: true}, MinStateID: 1490, MaxStateID: 1490, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Torch = Block{ID: 147, DisplayName: "Torch", Name: "torch", Hardness: 0, Diggable: true, DropIDs: []uint32{236}, NeedsTools: map[uint32]bool{}, MinStateID: 1491, MaxStateID: 1491, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 14}
WallTorch = Block{ID: 148, DisplayName: "Torch", Name: "wall_torch", Hardness: 0, Diggable: true, DropIDs: []uint32{236}, NeedsTools: map[uint32]bool{}, MinStateID: 1492, MaxStateID: 1495, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 14}
Fire = Block{ID: 149, DisplayName: "Air", Name: "fire", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 1496, MaxStateID: 2007, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 15}
SoulFire = Block{ID: 150, DisplayName: "Air", Name: "soul_fire", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 2008, MaxStateID: 2008, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 10}
Spawner = Block{ID: 151, DisplayName: "Spawner", Name: "spawner", Hardness: 5, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 2009, MaxStateID: 2009, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
OakStairs = Block{ID: 152, DisplayName: "Oak Stairs", Name: "oak_stairs", Hardness: 2, Diggable: true, DropIDs: []uint32{244}, NeedsTools: map[uint32]bool{}, MinStateID: 2010, MaxStateID: 2089, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
Chest = Block{ID: 153, DisplayName: "Chest", Name: "chest", Hardness: 2.5, Diggable: true, DropIDs: []uint32{245}, NeedsTools: map[uint32]bool{}, MinStateID: 2090, MaxStateID: 2113, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
RedstoneWire = Block{ID: 154, DisplayName: "Redstone Dust", Name: "redstone_wire", Hardness: 0, Diggable: true, DropIDs: []uint32{585}, NeedsTools: map[uint32]bool{}, MinStateID: 2114, MaxStateID: 3409, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
DiamondOre = Block{ID: 155, DisplayName: "Diamond Ore", Name: "diamond_ore", Hardness: 3, Diggable: true, DropIDs: []uint32{686}, NeedsTools: map[uint32]bool{721: true, 726: true, 716: true}, MinStateID: 3410, MaxStateID: 3410, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DeepslateDiamondOre = Block{ID: 156, DisplayName: "Deepslate Diamond Ore", Name: "deepslate_diamond_ore", Hardness: 4.5, Diggable: true, DropIDs: []uint32{686}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true}, MinStateID: 3411, MaxStateID: 3411, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DiamondBlock = Block{ID: 157, DisplayName: "Block of Diamond", Name: "diamond_block", Hardness: 5, Diggable: true, DropIDs: []uint32{68}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true}, MinStateID: 3412, MaxStateID: 3412, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CraftingTable = Block{ID: 158, DisplayName: "Crafting Table", Name: "crafting_table", Hardness: 2.5, Diggable: true, DropIDs: []uint32{246}, NeedsTools: map[uint32]bool{}, MinStateID: 3413, MaxStateID: 3413, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Wheat = Block{ID: 159, DisplayName: "Wheat Seeds", Name: "wheat", Hardness: 0, Diggable: true, DropIDs: []uint32{735}, NeedsTools: map[uint32]bool{}, MinStateID: 3414, MaxStateID: 3421, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Farmland = Block{ID: 160, DisplayName: "Farmland", Name: "farmland", Hardness: 0.6, Diggable: true, DropIDs: []uint32{15}, NeedsTools: map[uint32]bool{}, MinStateID: 3422, MaxStateID: 3429, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
Furnace = Block{ID: 161, DisplayName: "Furnace", Name: "furnace", Hardness: 3.5, Diggable: true, DropIDs: []uint32{248}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 3430, MaxStateID: 3437, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
OakSign = Block{ID: 162, DisplayName: "Oak Sign", Name: "oak_sign", Hardness: 1, Diggable: true, DropIDs: []uint32{768}, NeedsTools: map[uint32]bool{}, MinStateID: 3438, MaxStateID: 3469, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
SpruceSign = Block{ID: 163, DisplayName: "Spruce Sign", Name: "spruce_sign", Hardness: 1, Diggable: true, DropIDs: []uint32{769}, NeedsTools: map[uint32]bool{}, MinStateID: 3470, MaxStateID: 3501, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BirchSign = Block{ID: 164, DisplayName: "Birch Sign", Name: "birch_sign", Hardness: 1, Diggable: true, DropIDs: []uint32{770}, NeedsTools: map[uint32]bool{}, MinStateID: 3502, MaxStateID: 3533, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
AcaciaSign = Block{ID: 165, DisplayName: "Acacia Sign", Name: "acacia_sign", Hardness: 1, Diggable: true, DropIDs: []uint32{772}, NeedsTools: map[uint32]bool{}, MinStateID: 3534, MaxStateID: 3565, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
JungleSign = Block{ID: 166, DisplayName: "Jungle Sign", Name: "jungle_sign", Hardness: 1, Diggable: true, DropIDs: []uint32{771}, NeedsTools: map[uint32]bool{}, MinStateID: 3566, MaxStateID: 3597, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
DarkOakSign = Block{ID: 167, DisplayName: "Dark Oak Sign", Name: "dark_oak_sign", Hardness: 1, Diggable: true, DropIDs: []uint32{773}, NeedsTools: map[uint32]bool{}, MinStateID: 3598, MaxStateID: 3629, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
OakDoor = Block{ID: 168, DisplayName: "Oak Door", Name: "oak_door", Hardness: 3, Diggable: true, DropIDs: []uint32{632}, NeedsTools: map[uint32]bool{}, MinStateID: 3630, MaxStateID: 3693, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Ladder = Block{ID: 169, DisplayName: "Ladder", Name: "ladder", Hardness: 0.4, Diggable: true, DropIDs: []uint32{249}, NeedsTools: map[uint32]bool{}, MinStateID: 3694, MaxStateID: 3701, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Rail = Block{ID: 170, DisplayName: "Rail", Name: "rail", Hardness: 0.7, Diggable: true, DropIDs: []uint32{659}, NeedsTools: map[uint32]bool{}, MinStateID: 3702, MaxStateID: 3721, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
CobblestoneStairs = Block{ID: 171, DisplayName: "Cobblestone Stairs", Name: "cobblestone_stairs", Hardness: 2, Diggable: true, DropIDs: []uint32{250}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 3722, MaxStateID: 3801, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
OakWallSign = Block{ID: 172, DisplayName: "Oak Sign", Name: "oak_wall_sign", Hardness: 1, Diggable: true, DropIDs: []uint32{768}, NeedsTools: map[uint32]bool{}, MinStateID: 3802, MaxStateID: 3809, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
SpruceWallSign = Block{ID: 173, DisplayName: "Spruce Sign", Name: "spruce_wall_sign", Hardness: 1, Diggable: true, DropIDs: []uint32{769}, NeedsTools: map[uint32]bool{}, MinStateID: 3810, MaxStateID: 3817, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BirchWallSign = Block{ID: 174, DisplayName: "Birch Sign", Name: "birch_wall_sign", Hardness: 1, Diggable: true, DropIDs: []uint32{770}, NeedsTools: map[uint32]bool{}, MinStateID: 3818, MaxStateID: 3825, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
AcaciaWallSign = Block{ID: 175, DisplayName: "Acacia Sign", Name: "acacia_wall_sign", Hardness: 1, Diggable: true, DropIDs: []uint32{772}, NeedsTools: map[uint32]bool{}, MinStateID: 3826, MaxStateID: 3833, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
JungleWallSign = Block{ID: 176, DisplayName: "Jungle Sign", Name: "jungle_wall_sign", Hardness: 1, Diggable: true, DropIDs: []uint32{771}, NeedsTools: map[uint32]bool{}, MinStateID: 3834, MaxStateID: 3841, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
DarkOakWallSign = Block{ID: 177, DisplayName: "Dark Oak Sign", Name: "dark_oak_wall_sign", Hardness: 1, Diggable: true, DropIDs: []uint32{773}, NeedsTools: map[uint32]bool{}, MinStateID: 3842, MaxStateID: 3849, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Lever = Block{ID: 178, DisplayName: "Lever", Name: "lever", Hardness: 0.5, Diggable: true, DropIDs: []uint32{600}, NeedsTools: map[uint32]bool{}, MinStateID: 3850, MaxStateID: 3873, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
StonePressurePlate = Block{ID: 179, DisplayName: "Stone Pressure Plate", Name: "stone_pressure_plate", Hardness: 0.5, Diggable: true, DropIDs: []uint32{619}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 3874, MaxStateID: 3875, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
IronDoor = Block{ID: 180, DisplayName: "Iron Door", Name: "iron_door", Hardness: 5, Diggable: true, DropIDs: []uint32{631}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 3876, MaxStateID: 3939, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
OakPressurePlate = Block{ID: 181, DisplayName: "Oak Pressure Plate", Name: "oak_pressure_plate", Hardness: 0.5, Diggable: true, DropIDs: []uint32{623}, NeedsTools: map[uint32]bool{}, MinStateID: 3940, MaxStateID: 3941, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
SprucePressurePlate = Block{ID: 182, DisplayName: "Spruce Pressure Plate", Name: "spruce_pressure_plate", Hardness: 0.5, Diggable: true, DropIDs: []uint32{624}, NeedsTools: map[uint32]bool{}, MinStateID: 3942, MaxStateID: 3943, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BirchPressurePlate = Block{ID: 183, DisplayName: "Birch Pressure Plate", Name: "birch_pressure_plate", Hardness: 0.5, Diggable: true, DropIDs: []uint32{625}, NeedsTools: map[uint32]bool{}, MinStateID: 3944, MaxStateID: 3945, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
JunglePressurePlate = Block{ID: 184, DisplayName: "Jungle Pressure Plate", Name: "jungle_pressure_plate", Hardness: 0.5, Diggable: true, DropIDs: []uint32{626}, NeedsTools: map[uint32]bool{}, MinStateID: 3946, MaxStateID: 3947, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
AcaciaPressurePlate = Block{ID: 185, DisplayName: "Acacia Pressure Plate", Name: "acacia_pressure_plate", Hardness: 0.5, Diggable: true, DropIDs: []uint32{627}, NeedsTools: map[uint32]bool{}, MinStateID: 3948, MaxStateID: 3949, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
DarkOakPressurePlate = Block{ID: 186, DisplayName: "Dark Oak Pressure Plate", Name: "dark_oak_pressure_plate", Hardness: 0.5, Diggable: true, DropIDs: []uint32{628}, NeedsTools: map[uint32]bool{}, MinStateID: 3950, MaxStateID: 3951, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
RedstoneOre = Block{ID: 187, DisplayName: "Redstone Ore", Name: "redstone_ore", Hardness: 3, Diggable: true, DropIDs: []uint32{585}, NeedsTools: map[uint32]bool{726: true, 716: true, 721: true}, MinStateID: 3952, MaxStateID: 3953, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DeepslateRedstoneOre = Block{ID: 188, DisplayName: "Deepslate Redstone Ore", Name: "deepslate_redstone_ore", Hardness: 4.5, Diggable: true, DropIDs: []uint32{585}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true}, MinStateID: 3954, MaxStateID: 3955, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
RedstoneTorch = Block{ID: 189, DisplayName: "Redstone Torch", Name: "redstone_torch", Hardness: 0, Diggable: true, DropIDs: []uint32{586}, NeedsTools: map[uint32]bool{}, MinStateID: 3956, MaxStateID: 3957, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 7}
RedstoneWallTorch = Block{ID: 190, DisplayName: "Redstone Torch", Name: "redstone_wall_torch", Hardness: 0, Diggable: true, DropIDs: []uint32{586}, NeedsTools: map[uint32]bool{}, MinStateID: 3958, MaxStateID: 3965, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 7}
StoneButton = Block{ID: 191, DisplayName: "Stone Button", Name: "stone_button", Hardness: 0.5, Diggable: true, DropIDs: []uint32{609}, NeedsTools: map[uint32]bool{}, MinStateID: 3966, MaxStateID: 3989, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Snow = Block{ID: 192, DisplayName: "Snow", Name: "snow", Hardness: 0.1, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{700: true, 705: true, 710: true, 715: true, 720: true, 725: true}, MinStateID: 3990, MaxStateID: 3997, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
Ice = Block{ID: 193, DisplayName: "Ice", Name: "ice", Hardness: 0.5, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 3998, MaxStateID: 3998, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
SnowBlock = Block{ID: 194, DisplayName: "Snow Block", Name: "snow_block", Hardness: 0.2, Diggable: true, DropIDs: []uint32{780}, NeedsTools: map[uint32]bool{700: true, 705: true, 710: true, 715: true, 720: true, 725: true}, MinStateID: 3999, MaxStateID: 3999, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Cactus = Block{ID: 195, DisplayName: "Cactus", Name: "cactus", Hardness: 0.4, Diggable: true, DropIDs: []uint32{254}, NeedsTools: map[uint32]bool{}, MinStateID: 4000, MaxStateID: 4015, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
Clay = Block{ID: 196, DisplayName: "Clay", Name: "clay", Hardness: 0.6, Diggable: true, DropIDs: []uint32{789}, NeedsTools: map[uint32]bool{}, MinStateID: 4016, MaxStateID: 4016, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
SugarCane = Block{ID: 197, DisplayName: "Sugar Cane", Name: "sugar_cane", Hardness: 0, Diggable: true, DropIDs: []uint32{196}, NeedsTools: map[uint32]bool{}, MinStateID: 4017, MaxStateID: 4032, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Jukebox = Block{ID: 198, DisplayName: "Jukebox", Name: "jukebox", Hardness: 2, Diggable: true, DropIDs: []uint32{256}, NeedsTools: map[uint32]bool{}, MinStateID: 4033, MaxStateID: 4034, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
OakFence = Block{ID: 199, DisplayName: "Oak Fence", Name: "oak_fence", Hardness: 2, Diggable: true, DropIDs: []uint32{257}, NeedsTools: map[uint32]bool{}, MinStateID: 4035, MaxStateID: 4066, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
Pumpkin = Block{ID: 200, DisplayName: "Pumpkin", Name: "pumpkin", Hardness: 1, Diggable: true, DropIDs: []uint32{265}, NeedsTools: map[uint32]bool{}, MinStateID: 4067, MaxStateID: 4067, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Netherrack = Block{ID: 201, DisplayName: "Netherrack", Name: "netherrack", Hardness: 0.4, Diggable: true, DropIDs: []uint32{268}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 4068, MaxStateID: 4068, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
SoulSand = Block{ID: 202, DisplayName: "Soul Sand", Name: "soul_sand", Hardness: 0.5, Diggable: true, DropIDs: []uint32{269}, NeedsTools: map[uint32]bool{}, MinStateID: 4069, MaxStateID: 4069, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
SoulSoil = Block{ID: 203, DisplayName: "Soul Soil", Name: "soul_soil", Hardness: 0.5, Diggable: true, DropIDs: []uint32{270}, NeedsTools: map[uint32]bool{}, MinStateID: 4070, MaxStateID: 4070, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Basalt = Block{ID: 204, DisplayName: "Basalt", Name: "basalt", Hardness: 1.25, Diggable: true, DropIDs: []uint32{271}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 4071, MaxStateID: 4073, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PolishedBasalt = Block{ID: 205, DisplayName: "Polished Basalt", Name: "polished_basalt", Hardness: 1.25, Diggable: true, DropIDs: []uint32{272}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 4074, MaxStateID: 4076, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
SoulTorch = Block{ID: 206, DisplayName: "Soul Torch", Name: "soul_torch", Hardness: 0, Diggable: true, DropIDs: []uint32{274}, NeedsTools: map[uint32]bool{}, MinStateID: 4077, MaxStateID: 4077, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 10}
SoulWallTorch = Block{ID: 207, DisplayName: "Soul Torch", Name: "soul_wall_torch", Hardness: 0, Diggable: true, DropIDs: []uint32{274}, NeedsTools: map[uint32]bool{}, MinStateID: 4078, MaxStateID: 4081, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 10}
Glowstone = Block{ID: 208, DisplayName: "Glowstone", Name: "glowstone", Hardness: 0.3, Diggable: true, DropIDs: []uint32{800}, NeedsTools: map[uint32]bool{}, MinStateID: 4082, MaxStateID: 4082, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 15}
NetherPortal = Block{ID: 209, DisplayName: "Air", Name: "nether_portal", Hardness: 0, Diggable: false, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4083, MaxStateID: 4084, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 11}
CarvedPumpkin = Block{ID: 210, DisplayName: "Carved Pumpkin", Name: "carved_pumpkin", Hardness: 1, Diggable: true, DropIDs: []uint32{266}, NeedsTools: map[uint32]bool{}, MinStateID: 4085, MaxStateID: 4088, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
JackOLantern = Block{ID: 211, DisplayName: "Jack o'Lantern", Name: "jack_o_lantern", Hardness: 1, Diggable: true, DropIDs: []uint32{267}, NeedsTools: map[uint32]bool{}, MinStateID: 4089, MaxStateID: 4092, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 15}
Cake = Block{ID: 212, DisplayName: "Cake", Name: "cake", Hardness: 0.5, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4093, MaxStateID: 4099, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
Repeater = Block{ID: 213, DisplayName: "Redstone Repeater", Name: "repeater", Hardness: 0, Diggable: true, DropIDs: []uint32{588}, NeedsTools: map[uint32]bool{}, MinStateID: 4100, MaxStateID: 4163, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WhiteStainedGlass = Block{ID: 214, DisplayName: "White Stained Glass", Name: "white_stained_glass", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4164, MaxStateID: 4164, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
OrangeStainedGlass = Block{ID: 215, DisplayName: "Orange Stained Glass", Name: "orange_stained_glass", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4165, MaxStateID: 4165, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
MagentaStainedGlass = Block{ID: 216, DisplayName: "Magenta Stained Glass", Name: "magenta_stained_glass", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4166, MaxStateID: 4166, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LightBlueStainedGlass = Block{ID: 217, DisplayName: "Light Blue Stained Glass", Name: "light_blue_stained_glass", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4167, MaxStateID: 4167, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
YellowStainedGlass = Block{ID: 218, DisplayName: "Yellow Stained Glass", Name: "yellow_stained_glass", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4168, MaxStateID: 4168, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LimeStainedGlass = Block{ID: 219, DisplayName: "Lime Stained Glass", Name: "lime_stained_glass", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4169, MaxStateID: 4169, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PinkStainedGlass = Block{ID: 220, DisplayName: "Pink Stained Glass", Name: "pink_stained_glass", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4170, MaxStateID: 4170, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
GrayStainedGlass = Block{ID: 221, DisplayName: "Gray Stained Glass", Name: "gray_stained_glass", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4171, MaxStateID: 4171, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LightGrayStainedGlass = Block{ID: 222, DisplayName: "Light Gray Stained Glass", Name: "light_gray_stained_glass", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4172, MaxStateID: 4172, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
CyanStainedGlass = Block{ID: 223, DisplayName: "Cyan Stained Glass", Name: "cyan_stained_glass", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4173, MaxStateID: 4173, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PurpleStainedGlass = Block{ID: 224, DisplayName: "Purple Stained Glass", Name: "purple_stained_glass", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4174, MaxStateID: 4174, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BlueStainedGlass = Block{ID: 225, DisplayName: "Blue Stained Glass", Name: "blue_stained_glass", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4175, MaxStateID: 4175, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BrownStainedGlass = Block{ID: 226, DisplayName: "Brown Stained Glass", Name: "brown_stained_glass", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4176, MaxStateID: 4176, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
GreenStainedGlass = Block{ID: 227, DisplayName: "Green Stained Glass", Name: "green_stained_glass", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4177, MaxStateID: 4177, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
RedStainedGlass = Block{ID: 228, DisplayName: "Red Stained Glass", Name: "red_stained_glass", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4178, MaxStateID: 4178, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BlackStainedGlass = Block{ID: 229, DisplayName: "Black Stained Glass", Name: "black_stained_glass", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4179, MaxStateID: 4179, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
OakTrapdoor = Block{ID: 230, DisplayName: "Oak Trapdoor", Name: "oak_trapdoor", Hardness: 3, Diggable: true, DropIDs: []uint32{641}, NeedsTools: map[uint32]bool{}, MinStateID: 4180, MaxStateID: 4243, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
SpruceTrapdoor = Block{ID: 231, DisplayName: "Spruce Trapdoor", Name: "spruce_trapdoor", Hardness: 3, Diggable: true, DropIDs: []uint32{642}, NeedsTools: map[uint32]bool{}, MinStateID: 4244, MaxStateID: 4307, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BirchTrapdoor = Block{ID: 232, DisplayName: "Birch Trapdoor", Name: "birch_trapdoor", Hardness: 3, Diggable: true, DropIDs: []uint32{643}, NeedsTools: map[uint32]bool{}, MinStateID: 4308, MaxStateID: 4371, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
JungleTrapdoor = Block{ID: 233, DisplayName: "Jungle Trapdoor", Name: "jungle_trapdoor", Hardness: 3, Diggable: true, DropIDs: []uint32{644}, NeedsTools: map[uint32]bool{}, MinStateID: 4372, MaxStateID: 4435, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
AcaciaTrapdoor = Block{ID: 234, DisplayName: "Acacia Trapdoor", Name: "acacia_trapdoor", Hardness: 3, Diggable: true, DropIDs: []uint32{645}, NeedsTools: map[uint32]bool{}, MinStateID: 4436, MaxStateID: 4499, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
DarkOakTrapdoor = Block{ID: 235, DisplayName: "Dark Oak Trapdoor", Name: "dark_oak_trapdoor", Hardness: 3, Diggable: true, DropIDs: []uint32{646}, NeedsTools: map[uint32]bool{}, MinStateID: 4500, MaxStateID: 4563, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
StoneBricks = Block{ID: 236, DisplayName: "Stone Bricks", Name: "stone_bricks", Hardness: 1.5, Diggable: true, DropIDs: []uint32{283}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 4564, MaxStateID: 4564, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
MossyStoneBricks = Block{ID: 237, DisplayName: "Mossy Stone Bricks", Name: "mossy_stone_bricks", Hardness: 1.5, Diggable: true, DropIDs: []uint32{284}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 4565, MaxStateID: 4565, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CrackedStoneBricks = Block{ID: 238, DisplayName: "Cracked Stone Bricks", Name: "cracked_stone_bricks", Hardness: 1.5, Diggable: true, DropIDs: []uint32{285}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 4566, MaxStateID: 4566, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
ChiseledStoneBricks = Block{ID: 239, DisplayName: "Chiseled Stone Bricks", Name: "chiseled_stone_bricks", Hardness: 1.5, Diggable: true, DropIDs: []uint32{286}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 4567, MaxStateID: 4567, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
InfestedStone = Block{ID: 240, DisplayName: "Infested Stone", Name: "infested_stone", Hardness: 0.75, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4568, MaxStateID: 4568, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
InfestedCobblestone = Block{ID: 241, DisplayName: "Infested Cobblestone", Name: "infested_cobblestone", Hardness: 1, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4569, MaxStateID: 4569, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
InfestedStoneBricks = Block{ID: 242, DisplayName: "Infested Stone Bricks", Name: "infested_stone_bricks", Hardness: 0.75, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4570, MaxStateID: 4570, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
InfestedMossyStoneBricks = Block{ID: 243, DisplayName: "Infested Mossy Stone Bricks", Name: "infested_mossy_stone_bricks", Hardness: 0.75, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4571, MaxStateID: 4571, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
InfestedCrackedStoneBricks = Block{ID: 244, DisplayName: "Infested Cracked Stone Bricks", Name: "infested_cracked_stone_bricks", Hardness: 0.75, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4572, MaxStateID: 4572, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
InfestedChiseledStoneBricks = Block{ID: 245, DisplayName: "Infested Chiseled Stone Bricks", Name: "infested_chiseled_stone_bricks", Hardness: 0.75, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4573, MaxStateID: 4573, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BrownMushroomBlock = Block{ID: 246, DisplayName: "Brown Mushroom Block", Name: "brown_mushroom_block", Hardness: 0.2, Diggable: true, DropIDs: []uint32{0}, NeedsTools: map[uint32]bool{}, MinStateID: 4574, MaxStateID: 4637, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
RedMushroomBlock = Block{ID: 247, DisplayName: "Red Mushroom Block", Name: "red_mushroom_block", Hardness: 0.2, Diggable: true, DropIDs: []uint32{0}, NeedsTools: map[uint32]bool{}, MinStateID: 4638, MaxStateID: 4701, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
MushroomStem = Block{ID: 248, DisplayName: "Mushroom Stem", Name: "mushroom_stem", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4702, MaxStateID: 4765, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
IronBars = Block{ID: 249, DisplayName: "Iron Bars", Name: "iron_bars", Hardness: 5, Diggable: true, DropIDs: []uint32{295}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 4766, MaxStateID: 4797, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Chain = Block{ID: 250, DisplayName: "Chain", Name: "chain", Hardness: 5, Diggable: true, DropIDs: []uint32{296}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 4798, MaxStateID: 4803, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
GlassPane = Block{ID: 251, DisplayName: "Glass Pane", Name: "glass_pane", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4804, MaxStateID: 4835, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Melon = Block{ID: 252, DisplayName: "Melon", Name: "melon", Hardness: 1, Diggable: true, DropIDs: []uint32{849}, NeedsTools: map[uint32]bool{}, MinStateID: 4836, MaxStateID: 4836, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
AttachedPumpkinStem = Block{ID: 253, DisplayName: "Air", Name: "attached_pumpkin_stem", Hardness: 0, Diggable: true, DropIDs: []uint32{851}, NeedsTools: map[uint32]bool{}, MinStateID: 4837, MaxStateID: 4840, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
AttachedMelonStem = Block{ID: 254, DisplayName: "Air", Name: "attached_melon_stem", Hardness: 0, Diggable: true, DropIDs: []uint32{852}, NeedsTools: map[uint32]bool{}, MinStateID: 4841, MaxStateID: 4844, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PumpkinStem = Block{ID: 255, DisplayName: "Pumpkin Seeds", Name: "pumpkin_stem", Hardness: 0, Diggable: true, DropIDs: []uint32{0}, NeedsTools: map[uint32]bool{}, MinStateID: 4845, MaxStateID: 4852, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
MelonStem = Block{ID: 256, DisplayName: "Melon Seeds", Name: "melon_stem", Hardness: 0, Diggable: true, DropIDs: []uint32{0}, NeedsTools: map[uint32]bool{}, MinStateID: 4853, MaxStateID: 4860, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Vine = Block{ID: 257, DisplayName: "Vines", Name: "vine", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4861, MaxStateID: 4892, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
GlowLichen = Block{ID: 258, DisplayName: "Glow Lichen", Name: "glow_lichen", Hardness: 0.2, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 4893, MaxStateID: 5020, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
OakFenceGate = Block{ID: 259, DisplayName: "Oak Fence Gate", Name: "oak_fence_gate", Hardness: 2, Diggable: true, DropIDs: []uint32{649}, NeedsTools: map[uint32]bool{}, MinStateID: 5021, MaxStateID: 5052, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
BrickStairs = Block{ID: 260, DisplayName: "Brick Stairs", Name: "brick_stairs", Hardness: 2, Diggable: true, DropIDs: []uint32{301}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 5053, MaxStateID: 5132, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
StoneBrickStairs = Block{ID: 261, DisplayName: "Stone Brick Stairs", Name: "stone_brick_stairs", Hardness: 1.5, Diggable: true, DropIDs: []uint32{302}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 5133, MaxStateID: 5212, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
Mycelium = Block{ID: 262, DisplayName: "Mycelium", Name: "mycelium", Hardness: 0.6, Diggable: true, DropIDs: []uint32{15}, NeedsTools: map[uint32]bool{}, MinStateID: 5213, MaxStateID: 5214, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
LilyPad = Block{ID: 263, DisplayName: "Lily Pad", Name: "lily_pad", Hardness: 0, Diggable: true, DropIDs: []uint32{304}, NeedsTools: map[uint32]bool{}, MinStateID: 5215, MaxStateID: 5215, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
NetherBricks = Block{ID: 264, DisplayName: "Nether Bricks", Name: "nether_bricks", Hardness: 2, Diggable: true, DropIDs: []uint32{305}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 5216, MaxStateID: 5216, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
NetherBrickFence = Block{ID: 265, DisplayName: "Nether Brick Fence", Name: "nether_brick_fence", Hardness: 2, Diggable: true, DropIDs: []uint32{308}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 5217, MaxStateID: 5248, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
NetherBrickStairs = Block{ID: 266, DisplayName: "Nether Brick Stairs", Name: "nether_brick_stairs", Hardness: 2, Diggable: true, DropIDs: []uint32{309}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 5249, MaxStateID: 5328, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
NetherWart = Block{ID: 267, DisplayName: "Ne<NAME>", Name: "nether_wart", Hardness: 0, Diggable: true, DropIDs: []uint32{862}, NeedsTools: map[uint32]bool{}, MinStateID: 5329, MaxStateID: 5332, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
EnchantingTable = Block{ID: 268, DisplayName: "Enchanting Table", Name: "enchanting_table", Hardness: 5, Diggable: true, DropIDs: []uint32{310}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 5333, MaxStateID: 5333, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
BrewingStand = Block{ID: 269, DisplayName: "Brewing Stand", Name: "brewing_stand", Hardness: 0.5, Diggable: true, DropIDs: []uint32{869}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 5334, MaxStateID: 5341, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 1}
Cauldron = Block{ID: 270, DisplayName: "Cauldron", Name: "cauldron", Hardness: 2, Diggable: true, DropIDs: []uint32{870}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 5342, MaxStateID: 5342, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
WaterCauldron = Block{ID: 271, DisplayName: "Cauldron", Name: "water_cauldron", Hardness: 2, Diggable: true, DropIDs: []uint32{870}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 5343, MaxStateID: 5345, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LavaCauldron = Block{ID: 272, DisplayName: "Cauldron", Name: "lava_cauldron", Hardness: 2, Diggable: true, DropIDs: []uint32{870}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 5346, MaxStateID: 5346, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 15}
PowderSnowCauldron = Block{ID: 273, DisplayName: "Cauldron", Name: "powder_snow_cauldron", Hardness: 2, Diggable: true, DropIDs: []uint32{870}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 5347, MaxStateID: 5349, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
EndPortal = Block{ID: 274, DisplayName: "Air", Name: "end_portal", Hardness: 0, Diggable: false, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 5350, MaxStateID: 5350, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 15}
EndPortalFrame = Block{ID: 275, DisplayName: "End Portal Frame", Name: "end_portal_frame", Hardness: 0, Diggable: false, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 5351, MaxStateID: 5358, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 1}
EndStone = Block{ID: 276, DisplayName: "End Stone", Name: "end_stone", Hardness: 3, Diggable: true, DropIDs: []uint32{312}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 5359, MaxStateID: 5359, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DragonEgg = Block{ID: 277, DisplayName: "Dragon Egg", Name: "dragon_egg", Hardness: 3, Diggable: true, DropIDs: []uint32{314}, NeedsTools: map[uint32]bool{}, MinStateID: 5360, MaxStateID: 5360, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 1}
RedstoneLamp = Block{ID: 278, DisplayName: "Redstone Lamp", Name: "redstone_lamp", Hardness: 0.3, Diggable: true, DropIDs: []uint32{607}, NeedsTools: map[uint32]bool{}, MinStateID: 5361, MaxStateID: 5362, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Cocoa = Block{ID: 279, DisplayName: "Cocoa Beans", Name: "cocoa", Hardness: 0.2, Diggable: true, DropIDs: []uint32{809}, NeedsTools: map[uint32]bool{}, MinStateID: 5363, MaxStateID: 5374, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
SandstoneStairs = Block{ID: 280, DisplayName: "Sandstone Stairs", Name: "sandstone_stairs", Hardness: 0.8, Diggable: true, DropIDs: []uint32{315}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 5375, MaxStateID: 5454, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
EmeraldOre = Block{ID: 281, DisplayName: "Emerald Ore", Name: "emerald_ore", Hardness: 3, Diggable: true, DropIDs: []uint32{687}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true}, MinStateID: 5455, MaxStateID: 5455, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DeepslateEmeraldOre = Block{ID: 282, DisplayName: "Deepslate Emerald Ore", Name: "deepslate_emerald_ore", Hardness: 4.5, Diggable: true, DropIDs: []uint32{687}, NeedsTools: map[uint32]bool{726: true, 716: true, 721: true}, MinStateID: 5456, MaxStateID: 5456, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
EnderChest = Block{ID: 283, DisplayName: "Ender Chest", Name: "ender_chest", Hardness: 22.5, Diggable: true, DropIDs: []uint32{235}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 5457, MaxStateID: 5464, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 7}
TripwireHook = Block{ID: 284, DisplayName: "Tripwire Hook", Name: "tripwire_hook", Hardness: 0, Diggable: true, DropIDs: []uint32{604}, NeedsTools: map[uint32]bool{}, MinStateID: 5465, MaxStateID: 5480, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Tripwire = Block{ID: 285, DisplayName: "String", Name: "tripwire", Hardness: 0, Diggable: true, DropIDs: []uint32{732}, NeedsTools: map[uint32]bool{}, MinStateID: 5481, MaxStateID: 5608, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
EmeraldBlock = Block{ID: 286, DisplayName: "Block of Emerald", Name: "emerald_block", Hardness: 5, Diggable: true, DropIDs: []uint32{317}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true}, MinStateID: 5609, MaxStateID: 5609, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
SpruceStairs = Block{ID: 287, DisplayName: "Spruce Stairs", Name: "spruce_stairs", Hardness: 2, Diggable: true, DropIDs: []uint32{318}, NeedsTools: map[uint32]bool{}, MinStateID: 5610, MaxStateID: 5689, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
BirchStairs = Block{ID: 288, DisplayName: "Birch Stairs", Name: "birch_stairs", Hardness: 2, Diggable: true, DropIDs: []uint32{319}, NeedsTools: map[uint32]bool{}, MinStateID: 5690, MaxStateID: 5769, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
JungleStairs = Block{ID: 289, DisplayName: "Jungle Stairs", Name: "jungle_stairs", Hardness: 2, Diggable: true, DropIDs: []uint32{320}, NeedsTools: map[uint32]bool{}, MinStateID: 5770, MaxStateID: 5849, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
CommandBlock = Block{ID: 290, DisplayName: "Command Block", Name: "command_block", Hardness: 0, Diggable: false, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 5850, MaxStateID: 5861, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Beacon = Block{ID: 291, DisplayName: "Beacon", Name: "beacon", Hardness: 3, Diggable: true, DropIDs: []uint32{324}, NeedsTools: map[uint32]bool{}, MinStateID: 5862, MaxStateID: 5862, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 15}
CobblestoneWall = Block{ID: 292, DisplayName: "Cobblestone Wall", Name: "cobblestone_wall", Hardness: 2, Diggable: true, DropIDs: []uint32{325}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 5863, MaxStateID: 6186, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
MossyCobblestoneWall = Block{ID: 293, DisplayName: "Mossy Cobblestone Wall", Name: "mossy_cobblestone_wall", Hardness: 2, Diggable: true, DropIDs: []uint32{326}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 6187, MaxStateID: 6510, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
FlowerPot = Block{ID: 294, DisplayName: "Flower Pot", Name: "flower_pot", Hardness: 0, Diggable: true, DropIDs: []uint32{946}, NeedsTools: map[uint32]bool{}, MinStateID: 6511, MaxStateID: 6511, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedOakSapling = Block{ID: 295, DisplayName: "Air", Name: "potted_oak_sapling", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 30}, NeedsTools: map[uint32]bool{}, MinStateID: 6512, MaxStateID: 6512, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedSpruceSapling = Block{ID: 296, DisplayName: "Air", Name: "potted_spruce_sapling", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 31}, NeedsTools: map[uint32]bool{}, MinStateID: 6513, MaxStateID: 6513, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedBirchSapling = Block{ID: 297, DisplayName: "Air", Name: "potted_birch_sapling", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 32}, NeedsTools: map[uint32]bool{}, MinStateID: 6514, MaxStateID: 6514, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedJungleSapling = Block{ID: 298, DisplayName: "Air", Name: "potted_jungle_sapling", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 33}, NeedsTools: map[uint32]bool{}, MinStateID: 6515, MaxStateID: 6515, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedAcaciaSapling = Block{ID: 299, DisplayName: "Air", Name: "potted_acacia_sapling", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 34}, NeedsTools: map[uint32]bool{}, MinStateID: 6516, MaxStateID: 6516, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedDarkOakSapling = Block{ID: 300, DisplayName: "Air", Name: "potted_dark_oak_sapling", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 35}, NeedsTools: map[uint32]bool{}, MinStateID: 6517, MaxStateID: 6517, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedFern = Block{ID: 301, DisplayName: "Air", Name: "potted_fern", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 151}, NeedsTools: map[uint32]bool{}, MinStateID: 6518, MaxStateID: 6518, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedDandelion = Block{ID: 302, DisplayName: "Air", Name: "potted_dandelion", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 173}, NeedsTools: map[uint32]bool{}, MinStateID: 6519, MaxStateID: 6519, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedPoppy = Block{ID: 303, DisplayName: "Air", Name: "potted_poppy", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 174}, NeedsTools: map[uint32]bool{}, MinStateID: 6520, MaxStateID: 6520, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedBlueOrchid = Block{ID: 304, DisplayName: "Air", Name: "potted_blue_orchid", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 175}, NeedsTools: map[uint32]bool{}, MinStateID: 6521, MaxStateID: 6521, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedAllium = Block{ID: 305, DisplayName: "Air", Name: "potted_allium", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 176}, NeedsTools: map[uint32]bool{}, MinStateID: 6522, MaxStateID: 6522, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedAzureBluet = Block{ID: 306, DisplayName: "Air", Name: "potted_azure_bluet", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 177}, NeedsTools: map[uint32]bool{}, MinStateID: 6523, MaxStateID: 6523, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedRedTulip = Block{ID: 307, DisplayName: "Air", Name: "potted_red_tulip", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 178}, NeedsTools: map[uint32]bool{}, MinStateID: 6524, MaxStateID: 6524, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedOrangeTulip = Block{ID: 308, DisplayName: "Air", Name: "potted_orange_tulip", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 179}, NeedsTools: map[uint32]bool{}, MinStateID: 6525, MaxStateID: 6525, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedWhiteTulip = Block{ID: 309, DisplayName: "Air", Name: "potted_white_tulip", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 180}, NeedsTools: map[uint32]bool{}, MinStateID: 6526, MaxStateID: 6526, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedPinkTulip = Block{ID: 310, DisplayName: "Air", Name: "potted_pink_tulip", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 181}, NeedsTools: map[uint32]bool{}, MinStateID: 6527, MaxStateID: 6527, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedOxeyeDaisy = Block{ID: 311, DisplayName: "Air", Name: "potted_oxeye_daisy", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 182}, NeedsTools: map[uint32]bool{}, MinStateID: 6528, MaxStateID: 6528, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedCornflower = Block{ID: 312, DisplayName: "Air", Name: "potted_cornflower", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 183}, NeedsTools: map[uint32]bool{}, MinStateID: 6529, MaxStateID: 6529, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedLilyOfTheValley = Block{ID: 313, DisplayName: "Air", Name: "potted_lily_of_the_valley", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 184}, NeedsTools: map[uint32]bool{}, MinStateID: 6530, MaxStateID: 6530, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedWitherRose = Block{ID: 314, DisplayName: "Air", Name: "potted_wither_rose", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 185}, NeedsTools: map[uint32]bool{}, MinStateID: 6531, MaxStateID: 6531, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedRedMushroom = Block{ID: 315, DisplayName: "Air", Name: "potted_red_mushroom", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 188}, NeedsTools: map[uint32]bool{}, MinStateID: 6532, MaxStateID: 6532, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedBrownMushroom = Block{ID: 316, DisplayName: "Air", Name: "potted_brown_mushroom", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 187}, NeedsTools: map[uint32]bool{}, MinStateID: 6533, MaxStateID: 6533, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedDeadBush = Block{ID: 317, DisplayName: "Air", Name: "potted_dead_bush", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 154}, NeedsTools: map[uint32]bool{}, MinStateID: 6534, MaxStateID: 6534, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedCactus = Block{ID: 318, DisplayName: "Air", Name: "potted_cactus", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 254}, NeedsTools: map[uint32]bool{}, MinStateID: 6535, MaxStateID: 6535, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Carrots = Block{ID: 319, DisplayName: "Carrot", Name: "carrots", Hardness: 0, Diggable: true, DropIDs: []uint32{947}, NeedsTools: map[uint32]bool{}, MinStateID: 6536, MaxStateID: 6543, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Potatoes = Block{ID: 320, DisplayName: "Potato", Name: "potatoes", Hardness: 0, Diggable: true, DropIDs: []uint32{948}, NeedsTools: map[uint32]bool{}, MinStateID: 6544, MaxStateID: 6551, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
OakButton = Block{ID: 321, DisplayName: "Oak Button", Name: "oak_button", Hardness: 0.5, Diggable: true, DropIDs: []uint32{611}, NeedsTools: map[uint32]bool{}, MinStateID: 6552, MaxStateID: 6575, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
SpruceButton = Block{ID: 322, DisplayName: "Spruce Button", Name: "spruce_button", Hardness: 0.5, Diggable: true, DropIDs: []uint32{612}, NeedsTools: map[uint32]bool{}, MinStateID: 6576, MaxStateID: 6599, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BirchButton = Block{ID: 323, DisplayName: "Birch Button", Name: "birch_button", Hardness: 0.5, Diggable: true, DropIDs: []uint32{613}, NeedsTools: map[uint32]bool{}, MinStateID: 6600, MaxStateID: 6623, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
JungleButton = Block{ID: 324, DisplayName: "Jungle Button", Name: "jungle_button", Hardness: 0.5, Diggable: true, DropIDs: []uint32{614}, NeedsTools: map[uint32]bool{}, MinStateID: 6624, MaxStateID: 6647, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
AcaciaButton = Block{ID: 325, DisplayName: "Acacia Button", Name: "acacia_button", Hardness: 0.5, Diggable: true, DropIDs: []uint32{615}, NeedsTools: map[uint32]bool{}, MinStateID: 6648, MaxStateID: 6671, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
DarkOakButton = Block{ID: 326, DisplayName: "Dark Oak Button", Name: "dark_oak_button", Hardness: 0.5, Diggable: true, DropIDs: []uint32{616}, NeedsTools: map[uint32]bool{}, MinStateID: 6672, MaxStateID: 6695, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
SkeletonSkull = Block{ID: 327, DisplayName: "Skeleton Skull", Name: "skeleton_skull", Hardness: 1, Diggable: true, DropIDs: []uint32{953}, NeedsTools: map[uint32]bool{}, MinStateID: 6696, MaxStateID: 6711, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
SkeletonWallSkull = Block{ID: 328, DisplayName: "Skeleton Skull", Name: "skeleton_wall_skull", Hardness: 1, Diggable: true, DropIDs: []uint32{953}, NeedsTools: map[uint32]bool{}, MinStateID: 6712, MaxStateID: 6715, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WitherSkeletonSkull = Block{ID: 329, DisplayName: "Wither Skeleton Skull", Name: "wither_skeleton_skull", Hardness: 1, Diggable: true, DropIDs: []uint32{954}, NeedsTools: map[uint32]bool{}, MinStateID: 6716, MaxStateID: 6731, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WitherSkeletonWallSkull = Block{ID: 330, DisplayName: "Wither Skeleton Skull", Name: "wither_skeleton_wall_skull", Hardness: 1, Diggable: true, DropIDs: []uint32{954}, NeedsTools: map[uint32]bool{}, MinStateID: 6732, MaxStateID: 6735, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
ZombieHead = Block{ID: 331, DisplayName: "Zombie Head", Name: "zombie_head", Hardness: 1, Diggable: true, DropIDs: []uint32{956}, NeedsTools: map[uint32]bool{}, MinStateID: 6736, MaxStateID: 6751, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
ZombieWallHead = Block{ID: 332, DisplayName: "Zombie Head", Name: "zombie_wall_head", Hardness: 1, Diggable: true, DropIDs: []uint32{956}, NeedsTools: map[uint32]bool{}, MinStateID: 6752, MaxStateID: 6755, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PlayerHead = Block{ID: 333, DisplayName: "Player Head", Name: "player_head", Hardness: 1, Diggable: true, DropIDs: []uint32{955}, NeedsTools: map[uint32]bool{}, MinStateID: 6756, MaxStateID: 6771, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PlayerWallHead = Block{ID: 334, DisplayName: "Player Head", Name: "player_wall_head", Hardness: 1, Diggable: true, DropIDs: []uint32{955}, NeedsTools: map[uint32]bool{}, MinStateID: 6772, MaxStateID: 6775, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
CreeperHead = Block{ID: 335, DisplayName: "Creeper Head", Name: "creeper_head", Hardness: 1, Diggable: true, DropIDs: []uint32{957}, NeedsTools: map[uint32]bool{}, MinStateID: 6776, MaxStateID: 6791, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
CreeperWallHead = Block{ID: 336, DisplayName: "Creeper Head", Name: "creeper_wall_head", Hardness: 1, Diggable: true, DropIDs: []uint32{957}, NeedsTools: map[uint32]bool{}, MinStateID: 6792, MaxStateID: 6795, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DragonHead = Block{ID: 337, DisplayName: "Dragon Head", Name: "dragon_head", Hardness: 1, Diggable: true, DropIDs: []uint32{958}, NeedsTools: map[uint32]bool{}, MinStateID: 6796, MaxStateID: 6811, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DragonWallHead = Block{ID: 338, DisplayName: "Dragon Head", Name: "dragon_wall_head", Hardness: 1, Diggable: true, DropIDs: []uint32{958}, NeedsTools: map[uint32]bool{}, MinStateID: 6812, MaxStateID: 6815, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
Anvil = Block{ID: 339, DisplayName: "Anvil", Name: "anvil", Hardness: 5, Diggable: true, DropIDs: []uint32{346}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 6816, MaxStateID: 6819, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
ChippedAnvil = Block{ID: 340, DisplayName: "Chipped Anvil", Name: "chipped_anvil", Hardness: 5, Diggable: true, DropIDs: []uint32{347}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 6820, MaxStateID: 6823, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DamagedAnvil = Block{ID: 341, DisplayName: "Damaged Anvil", Name: "damaged_anvil", Hardness: 5, Diggable: true, DropIDs: []uint32{348}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 6824, MaxStateID: 6827, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
TrappedChest = Block{ID: 342, DisplayName: "Trapped Chest", Name: "trapped_chest", Hardness: 2.5, Diggable: true, DropIDs: []uint32{605}, NeedsTools: map[uint32]bool{}, MinStateID: 6828, MaxStateID: 6851, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
LightWeightedPressurePlate = Block{ID: 343, DisplayName: "Light Weighted Pressure Plate", Name: "light_weighted_pressure_plate", Hardness: 0.5, Diggable: true, DropIDs: []uint32{621}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 6852, MaxStateID: 6867, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
HeavyWeightedPressurePlate = Block{ID: 344, DisplayName: "Heavy Weighted Pressure Plate", Name: "heavy_weighted_pressure_plate", Hardness: 0.5, Diggable: true, DropIDs: []uint32{622}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 6868, MaxStateID: 6883, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Comparator = Block{ID: 345, DisplayName: "Redstone Comparator", Name: "comparator", Hardness: 0, Diggable: true, DropIDs: []uint32{589}, NeedsTools: map[uint32]bool{}, MinStateID: 6884, MaxStateID: 6899, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DaylightDetector = Block{ID: 346, DisplayName: "Daylight Detector", Name: "daylight_detector", Hardness: 0.2, Diggable: true, DropIDs: []uint32{602}, NeedsTools: map[uint32]bool{}, MinStateID: 6900, MaxStateID: 6931, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
RedstoneBlock = Block{ID: 347, DisplayName: "Block of Redstone", Name: "redstone_block", Hardness: 5, Diggable: true, DropIDs: []uint32{587}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 6932, MaxStateID: 6932, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
NetherQuartzOre = Block{ID: 348, DisplayName: "Nether Quartz Ore", Name: "nether_quartz_ore", Hardness: 3, Diggable: true, DropIDs: []uint32{689}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 6933, MaxStateID: 6933, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Hopper = Block{ID: 349, DisplayName: "Hopper", Name: "hopper", Hardness: 3, Diggable: true, DropIDs: []uint32{595}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 6934, MaxStateID: 6943, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
QuartzBlock = Block{ID: 350, DisplayName: "Block of Quartz", Name: "quartz_block", Hardness: 0.8, Diggable: true, DropIDs: []uint32{350}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 6944, MaxStateID: 6944, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
ChiseledQuartzBlock = Block{ID: 351, DisplayName: "Chiseled Quartz Block", Name: "chiseled_quartz_block", Hardness: 0.8, Diggable: true, DropIDs: []uint32{349}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 6945, MaxStateID: 6945, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
QuartzPillar = Block{ID: 352, DisplayName: "Quartz Pillar", Name: "quartz_pillar", Hardness: 0.8, Diggable: true, DropIDs: []uint32{352}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 6946, MaxStateID: 6948, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
QuartzStairs = Block{ID: 353, DisplayName: "Quartz Stairs", Name: "quartz_stairs", Hardness: 0.8, Diggable: true, DropIDs: []uint32{353}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 6949, MaxStateID: 7028, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
ActivatorRail = Block{ID: 354, DisplayName: "Activator Rail", Name: "activator_rail", Hardness: 0.7, Diggable: true, DropIDs: []uint32{660}, NeedsTools: map[uint32]bool{}, MinStateID: 7029, MaxStateID: 7052, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Dropper = Block{ID: 355, DisplayName: "Dropper", Name: "dropper", Hardness: 3.5, Diggable: true, DropIDs: []uint32{597}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 7053, MaxStateID: 7064, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WhiteTerracotta = Block{ID: 356, DisplayName: "White Terracotta", Name: "white_terracotta", Hardness: 1.25, Diggable: true, DropIDs: []uint32{354}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 7065, MaxStateID: 7065, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
OrangeTerracotta = Block{ID: 357, DisplayName: "Orange Terracotta", Name: "orange_terracotta", Hardness: 1.25, Diggable: true, DropIDs: []uint32{355}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 7066, MaxStateID: 7066, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
MagentaTerracotta = Block{ID: 358, DisplayName: "Magenta Terracotta", Name: "magenta_terracotta", Hardness: 1.25, Diggable: true, DropIDs: []uint32{356}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 7067, MaxStateID: 7067, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
LightBlueTerracotta = Block{ID: 359, DisplayName: "Light Blue Terracotta", Name: "light_blue_terracotta", Hardness: 1.25, Diggable: true, DropIDs: []uint32{357}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 7068, MaxStateID: 7068, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
YellowTerracotta = Block{ID: 360, DisplayName: "Yellow Terracotta", Name: "yellow_terracotta", Hardness: 1.25, Diggable: true, DropIDs: []uint32{358}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 7069, MaxStateID: 7069, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
LimeTerracotta = Block{ID: 361, DisplayName: "<NAME>", Name: "lime_terracotta", Hardness: 1.25, Diggable: true, DropIDs: []uint32{359}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 7070, MaxStateID: 7070, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PinkTerracotta = Block{ID: 362, DisplayName: "Pink Terracotta", Name: "pink_terracotta", Hardness: 1.25, Diggable: true, DropIDs: []uint32{360}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 7071, MaxStateID: 7071, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
GrayTerracotta = Block{ID: 363, DisplayName: "Gray Terracotta", Name: "gray_terracotta", Hardness: 1.25, Diggable: true, DropIDs: []uint32{361}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 7072, MaxStateID: 7072, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
LightGrayTerracotta = Block{ID: 364, DisplayName: "Light Gray Terracotta", Name: "light_gray_terracotta", Hardness: 1.25, Diggable: true, DropIDs: []uint32{362}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 7073, MaxStateID: 7073, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CyanTerracotta = Block{ID: 365, DisplayName: "Cyan Terracotta", Name: "cyan_terracotta", Hardness: 1.25, Diggable: true, DropIDs: []uint32{363}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 7074, MaxStateID: 7074, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PurpleTerracotta = Block{ID: 366, DisplayName: "<NAME>", Name: "purple_terracotta", Hardness: 1.25, Diggable: true, DropIDs: []uint32{364}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 7075, MaxStateID: 7075, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BlueTerracotta = Block{ID: 367, DisplayName: "<NAME>", Name: "blue_terracotta", Hardness: 1.25, Diggable: true, DropIDs: []uint32{365}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 7076, MaxStateID: 7076, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BrownTerracotta = Block{ID: 368, DisplayName: "<NAME>", Name: "brown_terracotta", Hardness: 1.25, Diggable: true, DropIDs: []uint32{366}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 7077, MaxStateID: 7077, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
GreenTerracotta = Block{ID: 369, DisplayName: "<NAME>", Name: "green_terracotta", Hardness: 1.25, Diggable: true, DropIDs: []uint32{367}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 7078, MaxStateID: 7078, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
RedTerracotta = Block{ID: 370, DisplayName: "<NAME>", Name: "red_terracotta", Hardness: 1.25, Diggable: true, DropIDs: []uint32{368}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 7079, MaxStateID: 7079, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BlackTerracotta = Block{ID: 371, DisplayName: "<NAME>", Name: "black_terracotta", Hardness: 1.25, Diggable: true, DropIDs: []uint32{369}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 7080, MaxStateID: 7080, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WhiteStainedGlassPane = Block{ID: 372, DisplayName: "White Stained Glass Pane", Name: "white_stained_glass_pane", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 7081, MaxStateID: 7112, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
OrangeStainedGlassPane = Block{ID: 373, DisplayName: "Orange Stained Glass Pane", Name: "orange_stained_glass_pane", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 7113, MaxStateID: 7144, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
MagentaStainedGlassPane = Block{ID: 374, DisplayName: "Magenta Stained Glass Pane", Name: "magenta_stained_glass_pane", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 7145, MaxStateID: 7176, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LightBlueStainedGlassPane = Block{ID: 375, DisplayName: "Light Blue Stained Glass Pane", Name: "light_blue_stained_glass_pane", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 7177, MaxStateID: 7208, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
YellowStainedGlassPane = Block{ID: 376, DisplayName: "Yellow Stained Glass Pane", Name: "yellow_stained_glass_pane", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 7209, MaxStateID: 7240, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LimeStainedGlassPane = Block{ID: 377, DisplayName: "Lime Stained Glass Pane", Name: "lime_stained_glass_pane", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 7241, MaxStateID: 7272, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PinkStainedGlassPane = Block{ID: 378, DisplayName: "Pink Stained Glass Pane", Name: "pink_stained_glass_pane", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 7273, MaxStateID: 7304, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
GrayStainedGlassPane = Block{ID: 379, DisplayName: "Gray Stained Glass Pane", Name: "gray_stained_glass_pane", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 7305, MaxStateID: 7336, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LightGrayStainedGlassPane = Block{ID: 380, DisplayName: "Light Gray Stained Glass Pane", Name: "light_gray_stained_glass_pane", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 7337, MaxStateID: 7368, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
CyanStainedGlassPane = Block{ID: 381, DisplayName: "Cyan Stained Glass Pane", Name: "cyan_stained_glass_pane", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 7369, MaxStateID: 7400, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PurpleStainedGlassPane = Block{ID: 382, DisplayName: "Purple Stained Glass Pane", Name: "purple_stained_glass_pane", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 7401, MaxStateID: 7432, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BlueStainedGlassPane = Block{ID: 383, DisplayName: "Blue Stained Glass Pane", Name: "blue_stained_glass_pane", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 7433, MaxStateID: 7464, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BrownStainedGlassPane = Block{ID: 384, DisplayName: "Brown Stained Glass Pane", Name: "brown_stained_glass_pane", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 7465, MaxStateID: 7496, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
GreenStainedGlassPane = Block{ID: 385, DisplayName: "Green Stained Glass Pane", Name: "green_stained_glass_pane", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 7497, MaxStateID: 7528, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
RedStainedGlassPane = Block{ID: 386, DisplayName: "Red Stained Glass Pane", Name: "red_stained_glass_pane", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 7529, MaxStateID: 7560, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BlackStainedGlassPane = Block{ID: 387, DisplayName: "Black Stained Glass Pane", Name: "black_stained_glass_pane", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 7561, MaxStateID: 7592, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
AcaciaStairs = Block{ID: 388, DisplayName: "Acacia Stairs", Name: "acacia_stairs", Hardness: 2, Diggable: true, DropIDs: []uint32{391}, NeedsTools: map[uint32]bool{}, MinStateID: 7593, MaxStateID: 7672, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DarkOakStairs = Block{ID: 389, DisplayName: "Dark Oak Stairs", Name: "dark_oak_stairs", Hardness: 2, Diggable: true, DropIDs: []uint32{392}, NeedsTools: map[uint32]bool{}, MinStateID: 7673, MaxStateID: 7752, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
SlimeBlock = Block{ID: 390, DisplayName: "Slime Block", Name: "slime_block", Hardness: 0, Diggable: true, DropIDs: []uint32{592}, NeedsTools: map[uint32]bool{}, MinStateID: 7753, MaxStateID: 7753, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
Barrier = Block{ID: 391, DisplayName: "Barrier", Name: "barrier", Hardness: 0, Diggable: false, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 7754, MaxStateID: 7754, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Light = Block{ID: 392, DisplayName: "Light", Name: "light", Hardness: 0, Diggable: false, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 7755, MaxStateID: 7786, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 15}
IronTrapdoor = Block{ID: 393, DisplayName: "Iron Trapdoor", Name: "iron_trapdoor", Hardness: 5, Diggable: true, DropIDs: []uint32{640}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 7787, MaxStateID: 7850, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Prismarine = Block{ID: 394, DisplayName: "Prismarine", Name: "prismarine", Hardness: 1.5, Diggable: true, DropIDs: []uint32{432}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 7851, MaxStateID: 7851, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PrismarineBricks = Block{ID: 395, DisplayName: "Prismarine Bricks", Name: "prismarine_bricks", Hardness: 1.5, Diggable: true, DropIDs: []uint32{433}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 7852, MaxStateID: 7852, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DarkPrismarine = Block{ID: 396, DisplayName: "Dark Prismarine", Name: "dark_prismarine", Hardness: 1.5, Diggable: true, DropIDs: []uint32{434}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 7853, MaxStateID: 7853, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PrismarineStairs = Block{ID: 397, DisplayName: "Prismarine Stairs", Name: "prismarine_stairs", Hardness: 1.5, Diggable: true, DropIDs: []uint32{435}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 7854, MaxStateID: 7933, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PrismarineBrickStairs = Block{ID: 398, DisplayName: "Prismarine Brick Stairs", Name: "prismarine_brick_stairs", Hardness: 1.5, Diggable: true, DropIDs: []uint32{436}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 7934, MaxStateID: 8013, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DarkPrismarineStairs = Block{ID: 399, DisplayName: "Dark Prismarine Stairs", Name: "dark_prismarine_stairs", Hardness: 1.5, Diggable: true, DropIDs: []uint32{437}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 8014, MaxStateID: 8093, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PrismarineSlab = Block{ID: 400, DisplayName: "Prismarine Slab", Name: "prismarine_slab", Hardness: 1.5, Diggable: true, DropIDs: []uint32{225}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 8094, MaxStateID: 8099, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PrismarineBrickSlab = Block{ID: 401, DisplayName: "Prismarine Brick Slab", Name: "prismarine_brick_slab", Hardness: 1.5, Diggable: true, DropIDs: []uint32{226}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 8100, MaxStateID: 8105, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DarkPrismarineSlab = Block{ID: 402, DisplayName: "Dark Prismarine Slab", Name: "dark_prismarine_slab", Hardness: 1.5, Diggable: true, DropIDs: []uint32{227}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 8106, MaxStateID: 8111, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
SeaLantern = Block{ID: 403, DisplayName: "Sea Lantern", Name: "sea_lantern", Hardness: 0.3, Diggable: true, DropIDs: []uint32{966}, NeedsTools: map[uint32]bool{}, MinStateID: 8112, MaxStateID: 8112, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 15}
HayBlock = Block{ID: 404, DisplayName: "Hay Bale", Name: "hay_block", Hardness: 0.5, Diggable: true, DropIDs: []uint32{372}, NeedsTools: map[uint32]bool{}, MinStateID: 8113, MaxStateID: 8115, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WhiteCarpet = Block{ID: 405, DisplayName: "White Carpet", Name: "white_carpet", Hardness: 0.1, Diggable: true, DropIDs: []uint32{373}, NeedsTools: map[uint32]bool{}, MinStateID: 8116, MaxStateID: 8116, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
OrangeCarpet = Block{ID: 406, DisplayName: "Orange Carpet", Name: "orange_carpet", Hardness: 0.1, Diggable: true, DropIDs: []uint32{374}, NeedsTools: map[uint32]bool{}, MinStateID: 8117, MaxStateID: 8117, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
MagentaCarpet = Block{ID: 407, DisplayName: "Magenta Carpet", Name: "magenta_carpet", Hardness: 0.1, Diggable: true, DropIDs: []uint32{375}, NeedsTools: map[uint32]bool{}, MinStateID: 8118, MaxStateID: 8118, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
LightBlueCarpet = Block{ID: 408, DisplayName: "Light Blue Carpet", Name: "light_blue_carpet", Hardness: 0.1, Diggable: true, DropIDs: []uint32{376}, NeedsTools: map[uint32]bool{}, MinStateID: 8119, MaxStateID: 8119, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
YellowCarpet = Block{ID: 409, DisplayName: "Yellow Carpet", Name: "yellow_carpet", Hardness: 0.1, Diggable: true, DropIDs: []uint32{377}, NeedsTools: map[uint32]bool{}, MinStateID: 8120, MaxStateID: 8120, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
LimeCarpet = Block{ID: 410, DisplayName: "Lime Carpet", Name: "lime_carpet", Hardness: 0.1, Diggable: true, DropIDs: []uint32{378}, NeedsTools: map[uint32]bool{}, MinStateID: 8121, MaxStateID: 8121, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PinkCarpet = Block{ID: 411, DisplayName: "Pink Carpet", Name: "pink_carpet", Hardness: 0.1, Diggable: true, DropIDs: []uint32{379}, NeedsTools: map[uint32]bool{}, MinStateID: 8122, MaxStateID: 8122, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
GrayCarpet = Block{ID: 412, DisplayName: "Gray Carpet", Name: "gray_carpet", Hardness: 0.1, Diggable: true, DropIDs: []uint32{380}, NeedsTools: map[uint32]bool{}, MinStateID: 8123, MaxStateID: 8123, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
LightGrayCarpet = Block{ID: 413, DisplayName: "Light Gray Carpet", Name: "light_gray_carpet", Hardness: 0.1, Diggable: true, DropIDs: []uint32{381}, NeedsTools: map[uint32]bool{}, MinStateID: 8124, MaxStateID: 8124, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
CyanCarpet = Block{ID: 414, DisplayName: "Cyan Carpet", Name: "cyan_carpet", Hardness: 0.1, Diggable: true, DropIDs: []uint32{382}, NeedsTools: map[uint32]bool{}, MinStateID: 8125, MaxStateID: 8125, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PurpleCarpet = Block{ID: 415, DisplayName: "Purple Carpet", Name: "purple_carpet", Hardness: 0.1, Diggable: true, DropIDs: []uint32{383}, NeedsTools: map[uint32]bool{}, MinStateID: 8126, MaxStateID: 8126, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
BlueCarpet = Block{ID: 416, DisplayName: "Blue Carpet", Name: "blue_carpet", Hardness: 0.1, Diggable: true, DropIDs: []uint32{384}, NeedsTools: map[uint32]bool{}, MinStateID: 8127, MaxStateID: 8127, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
BrownCarpet = Block{ID: 417, DisplayName: "Brown Carpet", Name: "brown_carpet", Hardness: 0.1, Diggable: true, DropIDs: []uint32{385}, NeedsTools: map[uint32]bool{}, MinStateID: 8128, MaxStateID: 8128, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
GreenCarpet = Block{ID: 418, DisplayName: "Green Carpet", Name: "green_carpet", Hardness: 0.1, Diggable: true, DropIDs: []uint32{386}, NeedsTools: map[uint32]bool{}, MinStateID: 8129, MaxStateID: 8129, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
RedCarpet = Block{ID: 419, DisplayName: "Red Carpet", Name: "red_carpet", Hardness: 0.1, Diggable: true, DropIDs: []uint32{387}, NeedsTools: map[uint32]bool{}, MinStateID: 8130, MaxStateID: 8130, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
BlackCarpet = Block{ID: 420, DisplayName: "Black Carpet", Name: "black_carpet", Hardness: 0.1, Diggable: true, DropIDs: []uint32{388}, NeedsTools: map[uint32]bool{}, MinStateID: 8131, MaxStateID: 8131, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
Terracotta = Block{ID: 421, DisplayName: "Terracotta", Name: "terracotta", Hardness: 1.25, Diggable: true, DropIDs: []uint32{389}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 8132, MaxStateID: 8132, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CoalBlock = Block{ID: 422, DisplayName: "Block of Coal", Name: "coal_block", Hardness: 5, Diggable: true, DropIDs: []uint32{59}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 8133, MaxStateID: 8133, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PackedIce = Block{ID: 423, DisplayName: "Packed Ice", Name: "packed_ice", Hardness: 0.5, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 8134, MaxStateID: 8134, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Sunflower = Block{ID: 424, DisplayName: "Sunflower", Name: "sunflower", Hardness: 0, Diggable: true, DropIDs: []uint32{394}, NeedsTools: map[uint32]bool{}, MinStateID: 8135, MaxStateID: 8136, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Lilac = Block{ID: 425, DisplayName: "Lilac", Name: "lilac", Hardness: 0, Diggable: true, DropIDs: []uint32{395}, NeedsTools: map[uint32]bool{}, MinStateID: 8137, MaxStateID: 8138, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
RoseBush = Block{ID: 426, DisplayName: "Rose Bush", Name: "rose_bush", Hardness: 0, Diggable: true, DropIDs: []uint32{396}, NeedsTools: map[uint32]bool{}, MinStateID: 8139, MaxStateID: 8140, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Peony = Block{ID: 427, DisplayName: "Peony", Name: "peony", Hardness: 0, Diggable: true, DropIDs: []uint32{397}, NeedsTools: map[uint32]bool{}, MinStateID: 8141, MaxStateID: 8142, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
TallGrass = Block{ID: 428, DisplayName: "Tall Grass", Name: "tall_grass", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 8143, MaxStateID: 8144, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LargeFern = Block{ID: 429, DisplayName: "Large Fern", Name: "large_fern", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 8145, MaxStateID: 8146, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
WhiteBanner = Block{ID: 430, DisplayName: "White Banner", Name: "white_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{982}, NeedsTools: map[uint32]bool{}, MinStateID: 8147, MaxStateID: 8162, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
OrangeBanner = Block{ID: 431, DisplayName: "Orange Banner", Name: "orange_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{983}, NeedsTools: map[uint32]bool{}, MinStateID: 8163, MaxStateID: 8178, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
MagentaBanner = Block{ID: 432, DisplayName: "Magenta Banner", Name: "magenta_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{984}, NeedsTools: map[uint32]bool{}, MinStateID: 8179, MaxStateID: 8194, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LightBlueBanner = Block{ID: 433, DisplayName: "Light Blue Banner", Name: "light_blue_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{985}, NeedsTools: map[uint32]bool{}, MinStateID: 8195, MaxStateID: 8210, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
YellowBanner = Block{ID: 434, DisplayName: "Yellow Banner", Name: "yellow_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{986}, NeedsTools: map[uint32]bool{}, MinStateID: 8211, MaxStateID: 8226, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LimeBanner = Block{ID: 435, DisplayName: "Lime Banner", Name: "lime_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{987}, NeedsTools: map[uint32]bool{}, MinStateID: 8227, MaxStateID: 8242, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PinkBanner = Block{ID: 436, DisplayName: "Pink Banner", Name: "pink_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{988}, NeedsTools: map[uint32]bool{}, MinStateID: 8243, MaxStateID: 8258, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
GrayBanner = Block{ID: 437, DisplayName: "Gray Banner", Name: "gray_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{989}, NeedsTools: map[uint32]bool{}, MinStateID: 8259, MaxStateID: 8274, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LightGrayBanner = Block{ID: 438, DisplayName: "Light Gray Banner", Name: "light_gray_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{990}, NeedsTools: map[uint32]bool{}, MinStateID: 8275, MaxStateID: 8290, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
CyanBanner = Block{ID: 439, DisplayName: "Cyan Banner", Name: "cyan_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{991}, NeedsTools: map[uint32]bool{}, MinStateID: 8291, MaxStateID: 8306, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PurpleBanner = Block{ID: 440, DisplayName: "Purple Banner", Name: "purple_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{992}, NeedsTools: map[uint32]bool{}, MinStateID: 8307, MaxStateID: 8322, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BlueBanner = Block{ID: 441, DisplayName: "Blue Banner", Name: "blue_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{993}, NeedsTools: map[uint32]bool{}, MinStateID: 8323, MaxStateID: 8338, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BrownBanner = Block{ID: 442, DisplayName: "Brown Banner", Name: "brown_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{994}, NeedsTools: map[uint32]bool{}, MinStateID: 8339, MaxStateID: 8354, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
GreenBanner = Block{ID: 443, DisplayName: "Green Banner", Name: "green_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{995}, NeedsTools: map[uint32]bool{}, MinStateID: 8355, MaxStateID: 8370, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
RedBanner = Block{ID: 444, DisplayName: "Red Banner", Name: "red_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{996}, NeedsTools: map[uint32]bool{}, MinStateID: 8371, MaxStateID: 8386, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BlackBanner = Block{ID: 445, DisplayName: "Black Banner", Name: "black_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{997}, NeedsTools: map[uint32]bool{}, MinStateID: 8387, MaxStateID: 8402, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
WhiteWallBanner = Block{ID: 446, DisplayName: "White Banner", Name: "white_wall_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{982}, NeedsTools: map[uint32]bool{}, MinStateID: 8403, MaxStateID: 8406, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
OrangeWallBanner = Block{ID: 447, DisplayName: "Orange Banner", Name: "orange_wall_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{983}, NeedsTools: map[uint32]bool{}, MinStateID: 8407, MaxStateID: 8410, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
MagentaWallBanner = Block{ID: 448, DisplayName: "Magenta Banner", Name: "magenta_wall_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{984}, NeedsTools: map[uint32]bool{}, MinStateID: 8411, MaxStateID: 8414, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LightBlueWallBanner = Block{ID: 449, DisplayName: "Light Blue Banner", Name: "light_blue_wall_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{985}, NeedsTools: map[uint32]bool{}, MinStateID: 8415, MaxStateID: 8418, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
YellowWallBanner = Block{ID: 450, DisplayName: "Yellow Banner", Name: "yellow_wall_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{986}, NeedsTools: map[uint32]bool{}, MinStateID: 8419, MaxStateID: 8422, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LimeWallBanner = Block{ID: 451, DisplayName: "Lime Banner", Name: "lime_wall_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{987}, NeedsTools: map[uint32]bool{}, MinStateID: 8423, MaxStateID: 8426, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PinkWallBanner = Block{ID: 452, DisplayName: "Pink Banner", Name: "pink_wall_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{988}, NeedsTools: map[uint32]bool{}, MinStateID: 8427, MaxStateID: 8430, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
GrayWallBanner = Block{ID: 453, DisplayName: "Gray Banner", Name: "gray_wall_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{989}, NeedsTools: map[uint32]bool{}, MinStateID: 8431, MaxStateID: 8434, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LightGrayWallBanner = Block{ID: 454, DisplayName: "Light Gray Banner", Name: "light_gray_wall_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{990}, NeedsTools: map[uint32]bool{}, MinStateID: 8435, MaxStateID: 8438, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
CyanWallBanner = Block{ID: 455, DisplayName: "Cyan Banner", Name: "cyan_wall_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{991}, NeedsTools: map[uint32]bool{}, MinStateID: 8439, MaxStateID: 8442, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PurpleWallBanner = Block{ID: 456, DisplayName: "Purple Banner", Name: "purple_wall_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{992}, NeedsTools: map[uint32]bool{}, MinStateID: 8443, MaxStateID: 8446, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BlueWallBanner = Block{ID: 457, DisplayName: "Blue Banner", Name: "blue_wall_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{993}, NeedsTools: map[uint32]bool{}, MinStateID: 8447, MaxStateID: 8450, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BrownWallBanner = Block{ID: 458, DisplayName: "Brown Banner", Name: "brown_wall_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{994}, NeedsTools: map[uint32]bool{}, MinStateID: 8451, MaxStateID: 8454, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
GreenWallBanner = Block{ID: 459, DisplayName: "Green Banner", Name: "green_wall_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{995}, NeedsTools: map[uint32]bool{}, MinStateID: 8455, MaxStateID: 8458, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
RedWallBanner = Block{ID: 460, DisplayName: "Red Banner", Name: "red_wall_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{996}, NeedsTools: map[uint32]bool{}, MinStateID: 8459, MaxStateID: 8462, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BlackWallBanner = Block{ID: 461, DisplayName: "Black Banner", Name: "black_wall_banner", Hardness: 1, Diggable: true, DropIDs: []uint32{997}, NeedsTools: map[uint32]bool{}, MinStateID: 8463, MaxStateID: 8466, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
RedSandstone = Block{ID: 462, DisplayName: "Red Sandstone", Name: "red_sandstone", Hardness: 0.8, Diggable: true, DropIDs: []uint32{439}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 8467, MaxStateID: 8467, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
ChiseledRedSandstone = Block{ID: 463, DisplayName: "Chiseled Red Sandstone", Name: "chiseled_red_sandstone", Hardness: 0.8, Diggable: true, DropIDs: []uint32{440}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 8468, MaxStateID: 8468, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CutRedSandstone = Block{ID: 464, DisplayName: "Cut Red Sandstone", Name: "cut_red_sandstone", Hardness: 0.8, Diggable: true, DropIDs: []uint32{441}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 8469, MaxStateID: 8469, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
RedSandstoneStairs = Block{ID: 465, DisplayName: "Red Sandstone Stairs", Name: "red_sandstone_stairs", Hardness: 0.8, Diggable: true, DropIDs: []uint32{442}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 8470, MaxStateID: 8549, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
OakSlab = Block{ID: 466, DisplayName: "Oak Slab", Name: "oak_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{204}, NeedsTools: map[uint32]bool{}, MinStateID: 8550, MaxStateID: 8555, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
SpruceSlab = Block{ID: 467, DisplayName: "Spruce Slab", Name: "spruce_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{205}, NeedsTools: map[uint32]bool{}, MinStateID: 8556, MaxStateID: 8561, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
BirchSlab = Block{ID: 468, DisplayName: "Birch Slab", Name: "birch_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{206}, NeedsTools: map[uint32]bool{}, MinStateID: 8562, MaxStateID: 8567, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
JungleSlab = Block{ID: 469, DisplayName: "Jungle Slab", Name: "jungle_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{207}, NeedsTools: map[uint32]bool{}, MinStateID: 8568, MaxStateID: 8573, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
AcaciaSlab = Block{ID: 470, DisplayName: "Acacia Slab", Name: "acacia_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{208}, NeedsTools: map[uint32]bool{}, MinStateID: 8574, MaxStateID: 8579, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DarkOakSlab = Block{ID: 471, DisplayName: "Dark Oak Slab", Name: "dark_oak_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{209}, NeedsTools: map[uint32]bool{}, MinStateID: 8580, MaxStateID: 8585, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
StoneSlab = Block{ID: 472, DisplayName: "Stone Slab", Name: "stone_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{212}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 8586, MaxStateID: 8591, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
SmoothStoneSlab = Block{ID: 473, DisplayName: "Smooth Stone Slab", Name: "smooth_stone_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{213}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 8592, MaxStateID: 8597, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
SandstoneSlab = Block{ID: 474, DisplayName: "Sandstone Slab", Name: "sandstone_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{214}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 8598, MaxStateID: 8603, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
CutSandstoneSlab = Block{ID: 475, DisplayName: "Cut Sandstone Slab", Name: "cut_sandstone_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{215}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 8604, MaxStateID: 8609, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PetrifiedOakSlab = Block{ID: 476, DisplayName: "Petrified Oak Slab", Name: "petrified_oak_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{216}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 8610, MaxStateID: 8615, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
CobblestoneSlab = Block{ID: 477, DisplayName: "Cobblestone Slab", Name: "cobblestone_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{217}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 8616, MaxStateID: 8621, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
BrickSlab = Block{ID: 478, DisplayName: "Brick Slab", Name: "brick_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{218}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 8622, MaxStateID: 8627, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
StoneBrickSlab = Block{ID: 479, DisplayName: "Stone Brick Slab", Name: "stone_brick_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{219}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 8628, MaxStateID: 8633, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
NetherBrickSlab = Block{ID: 480, DisplayName: "Nether Brick Slab", Name: "nether_brick_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{220}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 8634, MaxStateID: 8639, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
QuartzSlab = Block{ID: 481, DisplayName: "Quartz Slab", Name: "quartz_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{221}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 8640, MaxStateID: 8645, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
RedSandstoneSlab = Block{ID: 482, DisplayName: "Red Sandstone Slab", Name: "red_sandstone_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{222}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 8646, MaxStateID: 8651, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
CutRedSandstoneSlab = Block{ID: 483, DisplayName: "Cut Red Sandstone Slab", Name: "cut_red_sandstone_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{223}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 8652, MaxStateID: 8657, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PurpurSlab = Block{ID: 484, DisplayName: "Purpur Slab", Name: "purpur_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{224}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 8658, MaxStateID: 8663, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
SmoothStone = Block{ID: 485, DisplayName: "Smooth Stone", Name: "smooth_stone", Hardness: 2, Diggable: true, DropIDs: []uint32{231}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 8664, MaxStateID: 8664, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
SmoothSandstone = Block{ID: 486, DisplayName: "Smooth Sandstone", Name: "smooth_sandstone", Hardness: 2, Diggable: true, DropIDs: []uint32{230}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 8665, MaxStateID: 8665, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
SmoothQuartz = Block{ID: 487, DisplayName: "Smooth Quartz Block", Name: "smooth_quartz", Hardness: 2, Diggable: true, DropIDs: []uint32{228}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 8666, MaxStateID: 8666, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
SmoothRedSandstone = Block{ID: 488, DisplayName: "Smooth Red Sandstone", Name: "smooth_red_sandstone", Hardness: 2, Diggable: true, DropIDs: []uint32{229}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 8667, MaxStateID: 8667, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
SpruceFenceGate = Block{ID: 489, DisplayName: "Spruce Fence Gate", Name: "spruce_fence_gate", Hardness: 2, Diggable: true, DropIDs: []uint32{650}, NeedsTools: map[uint32]bool{}, MinStateID: 8668, MaxStateID: 8699, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
BirchFenceGate = Block{ID: 490, DisplayName: "Birch Fence Gate", Name: "birch_fence_gate", Hardness: 2, Diggable: true, DropIDs: []uint32{651}, NeedsTools: map[uint32]bool{}, MinStateID: 8700, MaxStateID: 8731, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
JungleFenceGate = Block{ID: 491, DisplayName: "Jungle Fence Gate", Name: "jungle_fence_gate", Hardness: 2, Diggable: true, DropIDs: []uint32{652}, NeedsTools: map[uint32]bool{}, MinStateID: 8732, MaxStateID: 8763, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
AcaciaFenceGate = Block{ID: 492, DisplayName: "Acacia Fence Gate", Name: "acacia_fence_gate", Hardness: 2, Diggable: true, DropIDs: []uint32{653}, NeedsTools: map[uint32]bool{}, MinStateID: 8764, MaxStateID: 8795, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DarkOakFenceGate = Block{ID: 493, DisplayName: "Dark Oak Fence Gate", Name: "dark_oak_fence_gate", Hardness: 2, Diggable: true, DropIDs: []uint32{654}, NeedsTools: map[uint32]bool{}, MinStateID: 8796, MaxStateID: 8827, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
SpruceFence = Block{ID: 494, DisplayName: "Spruce Fence", Name: "spruce_fence", Hardness: 2, Diggable: true, DropIDs: []uint32{258}, NeedsTools: map[uint32]bool{}, MinStateID: 8828, MaxStateID: 8859, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
BirchFence = Block{ID: 495, DisplayName: "Birch Fence", Name: "birch_fence", Hardness: 2, Diggable: true, DropIDs: []uint32{259}, NeedsTools: map[uint32]bool{}, MinStateID: 8860, MaxStateID: 8891, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
JungleFence = Block{ID: 496, DisplayName: "Jungle Fence", Name: "jungle_fence", Hardness: 2, Diggable: true, DropIDs: []uint32{260}, NeedsTools: map[uint32]bool{}, MinStateID: 8892, MaxStateID: 8923, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
AcaciaFence = Block{ID: 497, DisplayName: "Acacia Fence", Name: "acacia_fence", Hardness: 2, Diggable: true, DropIDs: []uint32{261}, NeedsTools: map[uint32]bool{}, MinStateID: 8924, MaxStateID: 8955, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DarkOakFence = Block{ID: 498, DisplayName: "Dark Oak Fence", Name: "dark_oak_fence", Hardness: 2, Diggable: true, DropIDs: []uint32{262}, NeedsTools: map[uint32]bool{}, MinStateID: 8956, MaxStateID: 8987, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
SpruceDoor = Block{ID: 499, DisplayName: "Spruce Door", Name: "spruce_door", Hardness: 3, Diggable: true, DropIDs: []uint32{633}, NeedsTools: map[uint32]bool{}, MinStateID: 8988, MaxStateID: 9051, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BirchDoor = Block{ID: 500, DisplayName: "Birch Door", Name: "birch_door", Hardness: 3, Diggable: true, DropIDs: []uint32{634}, NeedsTools: map[uint32]bool{}, MinStateID: 9052, MaxStateID: 9115, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
JungleDoor = Block{ID: 501, DisplayName: "Jungle Door", Name: "jungle_door", Hardness: 3, Diggable: true, DropIDs: []uint32{635}, NeedsTools: map[uint32]bool{}, MinStateID: 9116, MaxStateID: 9179, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
AcaciaDoor = Block{ID: 502, DisplayName: "Acacia Door", Name: "acacia_door", Hardness: 3, Diggable: true, DropIDs: []uint32{636}, NeedsTools: map[uint32]bool{}, MinStateID: 9180, MaxStateID: 9243, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
DarkOakDoor = Block{ID: 503, DisplayName: "Dark Oak Door", Name: "dark_oak_door", Hardness: 3, Diggable: true, DropIDs: []uint32{637}, NeedsTools: map[uint32]bool{}, MinStateID: 9244, MaxStateID: 9307, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
EndRod = Block{ID: 504, DisplayName: "End Rod", Name: "end_rod", Hardness: 0, Diggable: true, DropIDs: []uint32{237}, NeedsTools: map[uint32]bool{}, MinStateID: 9308, MaxStateID: 9313, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 14}
ChorusPlant = Block{ID: 505, DisplayName: "Chorus Plant", Name: "chorus_plant", Hardness: 0.4, Diggable: true, DropIDs: []uint32{999}, NeedsTools: map[uint32]bool{}, MinStateID: 9314, MaxStateID: 9377, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
ChorusFlower = Block{ID: 506, DisplayName: "Chorus Flower", Name: "chorus_flower", Hardness: 0.4, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9378, MaxStateID: 9383, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
PurpurBlock = Block{ID: 507, DisplayName: "Purpur Block", Name: "purpur_block", Hardness: 1.5, Diggable: true, DropIDs: []uint32{240}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9384, MaxStateID: 9384, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PurpurPillar = Block{ID: 508, DisplayName: "Purpur Pillar", Name: "purpur_pillar", Hardness: 1.5, Diggable: true, DropIDs: []uint32{241}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9385, MaxStateID: 9387, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PurpurStairs = Block{ID: 509, DisplayName: "Purpur Stairs", Name: "purpur_stairs", Hardness: 1.5, Diggable: true, DropIDs: []uint32{242}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 9388, MaxStateID: 9467, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
EndStoneBricks = Block{ID: 510, DisplayName: "End Stone Bricks", Name: "end_stone_bricks", Hardness: 3, Diggable: true, DropIDs: []uint32{313}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9468, MaxStateID: 9468, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Beetroots = Block{ID: 511, DisplayName: "Beetroot Seeds", Name: "beetroots", Hardness: 0, Diggable: true, DropIDs: []uint32{1002}, NeedsTools: map[uint32]bool{}, MinStateID: 9469, MaxStateID: 9472, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
DirtPath = Block{ID: 512, DisplayName: "Dirt Path", Name: "dirt_path", Hardness: 0.65, Diggable: true, DropIDs: []uint32{15}, NeedsTools: map[uint32]bool{}, MinStateID: 9473, MaxStateID: 9473, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
EndGateway = Block{ID: 513, DisplayName: "Air", Name: "end_gateway", Hardness: 0, Diggable: false, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9474, MaxStateID: 9474, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 15}
RepeatingCommandBlock = Block{ID: 514, DisplayName: "Repeating Command Block", Name: "repeating_command_block", Hardness: 0, Diggable: false, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9475, MaxStateID: 9486, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
ChainCommandBlock = Block{ID: 515, DisplayName: "Chain Command Block", Name: "chain_command_block", Hardness: 0, Diggable: false, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9487, MaxStateID: 9498, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
FrostedIce = Block{ID: 516, DisplayName: "Air", Name: "frosted_ice", Hardness: 0.5, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9499, MaxStateID: 9502, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
MagmaBlock = Block{ID: 517, DisplayName: "Magma Block", Name: "magma_block", Hardness: 0.5, Diggable: true, DropIDs: []uint32{445}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 9503, MaxStateID: 9503, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 3}
NetherWartBlock = Block{ID: 518, DisplayName: "Nether Wart Block", Name: "nether_wart_block", Hardness: 1, Diggable: true, DropIDs: []uint32{446}, NeedsTools: map[uint32]bool{}, MinStateID: 9504, MaxStateID: 9504, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
RedNetherBricks = Block{ID: 519, DisplayName: "Red Nether Bricks", Name: "red_nether_bricks", Hardness: 2, Diggable: true, DropIDs: []uint32{448}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 9505, MaxStateID: 9505, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BoneBlock = Block{ID: 520, DisplayName: "Bone Block", Name: "bone_block", Hardness: 2, Diggable: true, DropIDs: []uint32{449}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9506, MaxStateID: 9508, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
StructureVoid = Block{ID: 521, DisplayName: "Structure Void", Name: "structure_void", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9509, MaxStateID: 9509, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Observer = Block{ID: 522, DisplayName: "Observer", Name: "observer", Hardness: 3, Diggable: true, DropIDs: []uint32{594}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9510, MaxStateID: 9521, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
ShulkerBox = Block{ID: 523, DisplayName: "Shulker Box", Name: "shulker_box", Hardness: 2, Diggable: true, DropIDs: []uint32{451}, NeedsTools: map[uint32]bool{}, MinStateID: 9522, MaxStateID: 9527, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
WhiteShulkerBox = Block{ID: 524, DisplayName: "White Shulker Box", Name: "white_shulker_box", Hardness: 2, Diggable: true, DropIDs: []uint32{452}, NeedsTools: map[uint32]bool{}, MinStateID: 9528, MaxStateID: 9533, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
OrangeShulkerBox = Block{ID: 525, DisplayName: "Orange Shulker Box", Name: "orange_shulker_box", Hardness: 2, Diggable: true, DropIDs: []uint32{453}, NeedsTools: map[uint32]bool{}, MinStateID: 9534, MaxStateID: 9539, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
MagentaShulkerBox = Block{ID: 526, DisplayName: "Magenta Shulker Box", Name: "magenta_shulker_box", Hardness: 2, Diggable: true, DropIDs: []uint32{454}, NeedsTools: map[uint32]bool{}, MinStateID: 9540, MaxStateID: 9545, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
LightBlueShulkerBox = Block{ID: 527, DisplayName: "Light Blue Shulker Box", Name: "light_blue_shulker_box", Hardness: 2, Diggable: true, DropIDs: []uint32{455}, NeedsTools: map[uint32]bool{}, MinStateID: 9546, MaxStateID: 9551, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
YellowShulkerBox = Block{ID: 528, DisplayName: "Yellow Shulker Box", Name: "yellow_shulker_box", Hardness: 2, Diggable: true, DropIDs: []uint32{456}, NeedsTools: map[uint32]bool{}, MinStateID: 9552, MaxStateID: 9557, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
LimeShulkerBox = Block{ID: 529, DisplayName: "Lime Shulker Box", Name: "lime_shulker_box", Hardness: 2, Diggable: true, DropIDs: []uint32{457}, NeedsTools: map[uint32]bool{}, MinStateID: 9558, MaxStateID: 9563, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
PinkShulkerBox = Block{ID: 530, DisplayName: "Pink Shulker Box", Name: "pink_shulker_box", Hardness: 2, Diggable: true, DropIDs: []uint32{458}, NeedsTools: map[uint32]bool{}, MinStateID: 9564, MaxStateID: 9569, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
GrayShulkerBox = Block{ID: 531, DisplayName: "Gray Shulker Box", Name: "gray_shulker_box", Hardness: 2, Diggable: true, DropIDs: []uint32{459}, NeedsTools: map[uint32]bool{}, MinStateID: 9570, MaxStateID: 9575, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
LightGrayShulkerBox = Block{ID: 532, DisplayName: "Light Gray Shulker Box", Name: "light_gray_shulker_box", Hardness: 2, Diggable: true, DropIDs: []uint32{460}, NeedsTools: map[uint32]bool{}, MinStateID: 9576, MaxStateID: 9581, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
CyanShulkerBox = Block{ID: 533, DisplayName: "Cyan Shulker Box", Name: "cyan_shulker_box", Hardness: 2, Diggable: true, DropIDs: []uint32{461}, NeedsTools: map[uint32]bool{}, MinStateID: 9582, MaxStateID: 9587, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
PurpleShulkerBox = Block{ID: 534, DisplayName: "Purple Shulker Box", Name: "purple_shulker_box", Hardness: 2, Diggable: true, DropIDs: []uint32{462}, NeedsTools: map[uint32]bool{}, MinStateID: 9588, MaxStateID: 9593, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
BlueShulkerBox = Block{ID: 535, DisplayName: "Blue Shulker Box", Name: "blue_shulker_box", Hardness: 2, Diggable: true, DropIDs: []uint32{463}, NeedsTools: map[uint32]bool{}, MinStateID: 9594, MaxStateID: 9599, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
BrownShulkerBox = Block{ID: 536, DisplayName: "Brown Shulker Box", Name: "brown_shulker_box", Hardness: 2, Diggable: true, DropIDs: []uint32{464}, NeedsTools: map[uint32]bool{}, MinStateID: 9600, MaxStateID: 9605, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
GreenShulkerBox = Block{ID: 537, DisplayName: "Green Shulker Box", Name: "green_shulker_box", Hardness: 2, Diggable: true, DropIDs: []uint32{465}, NeedsTools: map[uint32]bool{}, MinStateID: 9606, MaxStateID: 9611, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
RedShulkerBox = Block{ID: 538, DisplayName: "Red Shulker Box", Name: "red_shulker_box", Hardness: 2, Diggable: true, DropIDs: []uint32{466}, NeedsTools: map[uint32]bool{}, MinStateID: 9612, MaxStateID: 9617, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
BlackShulkerBox = Block{ID: 539, DisplayName: "Black Shulker Box", Name: "black_shulker_box", Hardness: 2, Diggable: true, DropIDs: []uint32{467}, NeedsTools: map[uint32]bool{}, MinStateID: 9618, MaxStateID: 9623, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
WhiteGlazedTerracotta = Block{ID: 540, DisplayName: "White Glazed Terracotta", Name: "white_glazed_terracotta", Hardness: 1.4, Diggable: true, DropIDs: []uint32{468}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9624, MaxStateID: 9627, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
OrangeGlazedTerracotta = Block{ID: 541, DisplayName: "Orange Glazed Terracotta", Name: "orange_glazed_terracotta", Hardness: 1.4, Diggable: true, DropIDs: []uint32{469}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 9628, MaxStateID: 9631, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
MagentaGlazedTerracotta = Block{ID: 542, DisplayName: "Magenta Glazed Terracotta", Name: "magenta_glazed_terracotta", Hardness: 1.4, Diggable: true, DropIDs: []uint32{470}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9632, MaxStateID: 9635, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
LightBlueGlazedTerracotta = Block{ID: 543, DisplayName: "Light Blue Glazed Terracotta", Name: "light_blue_glazed_terracotta", Hardness: 1.4, Diggable: true, DropIDs: []uint32{471}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 9636, MaxStateID: 9639, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
YellowGlazedTerracotta = Block{ID: 544, DisplayName: "Yellow Glazed Terracotta", Name: "yellow_glazed_terracotta", Hardness: 1.4, Diggable: true, DropIDs: []uint32{472}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9640, MaxStateID: 9643, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
LimeGlazedTerracotta = Block{ID: 545, DisplayName: "Lime Glazed Terracotta", Name: "lime_glazed_terracotta", Hardness: 1.4, Diggable: true, DropIDs: []uint32{473}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9644, MaxStateID: 9647, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PinkGlazedTerracotta = Block{ID: 546, DisplayName: "Pink Glazed Terracotta", Name: "pink_glazed_terracotta", Hardness: 1.4, Diggable: true, DropIDs: []uint32{474}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 9648, MaxStateID: 9651, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
GrayGlazedTerracotta = Block{ID: 547, DisplayName: "Gray Glazed Terracotta", Name: "gray_glazed_terracotta", Hardness: 1.4, Diggable: true, DropIDs: []uint32{475}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9652, MaxStateID: 9655, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
LightGrayGlazedTerracotta = Block{ID: 548, DisplayName: "Light Gray Glazed Terracotta", Name: "light_gray_glazed_terracotta", Hardness: 1.4, Diggable: true, DropIDs: []uint32{476}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9656, MaxStateID: 9659, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CyanGlazedTerracotta = Block{ID: 549, DisplayName: "Cyan Glazed Terracotta", Name: "cyan_glazed_terracotta", Hardness: 1.4, Diggable: true, DropIDs: []uint32{477}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 9660, MaxStateID: 9663, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PurpleGlazedTerracotta = Block{ID: 550, DisplayName: "Purple Glazed Terracotta", Name: "purple_glazed_terracotta", Hardness: 1.4, Diggable: true, DropIDs: []uint32{478}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 9664, MaxStateID: 9667, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BlueGlazedTerracotta = Block{ID: 551, DisplayName: "Blue Glazed Terracotta", Name: "blue_glazed_terracotta", Hardness: 1.4, Diggable: true, DropIDs: []uint32{479}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9668, MaxStateID: 9671, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BrownGlazedTerracotta = Block{ID: 552, DisplayName: "Brown Glazed Terracotta", Name: "brown_glazed_terracotta", Hardness: 1.4, Diggable: true, DropIDs: []uint32{480}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 9672, MaxStateID: 9675, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
GreenGlazedTerracotta = Block{ID: 553, DisplayName: "Green Glazed Terracotta", Name: "green_glazed_terracotta", Hardness: 1.4, Diggable: true, DropIDs: []uint32{481}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9676, MaxStateID: 9679, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
RedGlazedTerracotta = Block{ID: 554, DisplayName: "Red Glazed Terracotta", Name: "red_glazed_terracotta", Hardness: 1.4, Diggable: true, DropIDs: []uint32{482}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9680, MaxStateID: 9683, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BlackGlazedTerracotta = Block{ID: 555, DisplayName: "Black Glazed Terracotta", Name: "black_glazed_terracotta", Hardness: 1.4, Diggable: true, DropIDs: []uint32{483}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 9684, MaxStateID: 9687, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WhiteConcrete = Block{ID: 556, DisplayName: "White Concrete", Name: "white_concrete", Hardness: 1.8, Diggable: true, DropIDs: []uint32{484}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 9688, MaxStateID: 9688, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
OrangeConcrete = Block{ID: 557, DisplayName: "Orange Concrete", Name: "orange_concrete", Hardness: 1.8, Diggable: true, DropIDs: []uint32{485}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 9689, MaxStateID: 9689, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
MagentaConcrete = Block{ID: 558, DisplayName: "Magenta Concrete", Name: "magenta_concrete", Hardness: 1.8, Diggable: true, DropIDs: []uint32{486}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9690, MaxStateID: 9690, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
LightBlueConcrete = Block{ID: 559, DisplayName: "Light Blue Concrete", Name: "light_blue_concrete", Hardness: 1.8, Diggable: true, DropIDs: []uint32{487}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 9691, MaxStateID: 9691, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
YellowConcrete = Block{ID: 560, DisplayName: "Yellow Concrete", Name: "yellow_concrete", Hardness: 1.8, Diggable: true, DropIDs: []uint32{488}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9692, MaxStateID: 9692, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
LimeConcrete = Block{ID: 561, DisplayName: "Lime Concrete", Name: "lime_concrete", Hardness: 1.8, Diggable: true, DropIDs: []uint32{489}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9693, MaxStateID: 9693, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PinkConcrete = Block{ID: 562, DisplayName: "Pink Concrete", Name: "pink_concrete", Hardness: 1.8, Diggable: true, DropIDs: []uint32{490}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 9694, MaxStateID: 9694, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
GrayConcrete = Block{ID: 563, DisplayName: "Gray Concrete", Name: "gray_concrete", Hardness: 1.8, Diggable: true, DropIDs: []uint32{491}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9695, MaxStateID: 9695, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
LightGrayConcrete = Block{ID: 564, DisplayName: "Light Gray Concrete", Name: "light_gray_concrete", Hardness: 1.8, Diggable: true, DropIDs: []uint32{492}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 9696, MaxStateID: 9696, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CyanConcrete = Block{ID: 565, DisplayName: "Cyan Concrete", Name: "cyan_concrete", Hardness: 1.8, Diggable: true, DropIDs: []uint32{493}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9697, MaxStateID: 9697, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PurpleConcrete = Block{ID: 566, DisplayName: "Purple Concrete", Name: "purple_concrete", Hardness: 1.8, Diggable: true, DropIDs: []uint32{494}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 9698, MaxStateID: 9698, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BlueConcrete = Block{ID: 567, DisplayName: "Blue Concrete", Name: "blue_concrete", Hardness: 1.8, Diggable: true, DropIDs: []uint32{495}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9699, MaxStateID: 9699, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BrownConcrete = Block{ID: 568, DisplayName: "Brown Concrete", Name: "brown_concrete", Hardness: 1.8, Diggable: true, DropIDs: []uint32{496}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 9700, MaxStateID: 9700, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
GreenConcrete = Block{ID: 569, DisplayName: "Green Concrete", Name: "green_concrete", Hardness: 1.8, Diggable: true, DropIDs: []uint32{497}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 9701, MaxStateID: 9701, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
RedConcrete = Block{ID: 570, DisplayName: "Red Concrete", Name: "red_concrete", Hardness: 1.8, Diggable: true, DropIDs: []uint32{498}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 9702, MaxStateID: 9702, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BlackConcrete = Block{ID: 571, DisplayName: "Black Concrete", Name: "black_concrete", Hardness: 1.8, Diggable: true, DropIDs: []uint32{499}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 9703, MaxStateID: 9703, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WhiteConcretePowder = Block{ID: 572, DisplayName: "White Concrete Powder", Name: "white_concrete_powder", Hardness: 0.5, Diggable: true, DropIDs: []uint32{500}, NeedsTools: map[uint32]bool{}, MinStateID: 9704, MaxStateID: 9704, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
OrangeConcretePowder = Block{ID: 573, DisplayName: "Orange Concrete Powder", Name: "orange_concrete_powder", Hardness: 0.5, Diggable: true, DropIDs: []uint32{501}, NeedsTools: map[uint32]bool{}, MinStateID: 9705, MaxStateID: 9705, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
MagentaConcretePowder = Block{ID: 574, DisplayName: "Magenta Concrete Powder", Name: "magenta_concrete_powder", Hardness: 0.5, Diggable: true, DropIDs: []uint32{502}, NeedsTools: map[uint32]bool{}, MinStateID: 9706, MaxStateID: 9706, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
LightBlueConcretePowder = Block{ID: 575, DisplayName: "Light Blue Concrete Powder", Name: "light_blue_concrete_powder", Hardness: 0.5, Diggable: true, DropIDs: []uint32{503}, NeedsTools: map[uint32]bool{}, MinStateID: 9707, MaxStateID: 9707, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
YellowConcretePowder = Block{ID: 576, DisplayName: "Yellow Concrete Powder", Name: "yellow_concrete_powder", Hardness: 0.5, Diggable: true, DropIDs: []uint32{504}, NeedsTools: map[uint32]bool{}, MinStateID: 9708, MaxStateID: 9708, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
LimeConcretePowder = Block{ID: 577, DisplayName: "Lime Concrete Powder", Name: "lime_concrete_powder", Hardness: 0.5, Diggable: true, DropIDs: []uint32{505}, NeedsTools: map[uint32]bool{}, MinStateID: 9709, MaxStateID: 9709, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PinkConcretePowder = Block{ID: 578, DisplayName: "Pink Concrete Powder", Name: "pink_concrete_powder", Hardness: 0.5, Diggable: true, DropIDs: []uint32{506}, NeedsTools: map[uint32]bool{}, MinStateID: 9710, MaxStateID: 9710, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
GrayConcretePowder = Block{ID: 579, DisplayName: "Gray Concrete Powder", Name: "gray_concrete_powder", Hardness: 0.5, Diggable: true, DropIDs: []uint32{507}, NeedsTools: map[uint32]bool{}, MinStateID: 9711, MaxStateID: 9711, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
LightGrayConcretePowder = Block{ID: 580, DisplayName: "Light Gray Concrete Powder", Name: "light_gray_concrete_powder", Hardness: 0.5, Diggable: true, DropIDs: []uint32{508}, NeedsTools: map[uint32]bool{}, MinStateID: 9712, MaxStateID: 9712, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CyanConcretePowder = Block{ID: 581, DisplayName: "Cyan Concrete Powder", Name: "cyan_concrete_powder", Hardness: 0.5, Diggable: true, DropIDs: []uint32{509}, NeedsTools: map[uint32]bool{}, MinStateID: 9713, MaxStateID: 9713, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PurpleConcretePowder = Block{ID: 582, DisplayName: "Purple Concrete Powder", Name: "purple_concrete_powder", Hardness: 0.5, Diggable: true, DropIDs: []uint32{510}, NeedsTools: map[uint32]bool{}, MinStateID: 9714, MaxStateID: 9714, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BlueConcretePowder = Block{ID: 583, DisplayName: "Blue Concrete Powder", Name: "blue_concrete_powder", Hardness: 0.5, Diggable: true, DropIDs: []uint32{511}, NeedsTools: map[uint32]bool{}, MinStateID: 9715, MaxStateID: 9715, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BrownConcretePowder = Block{ID: 584, DisplayName: "Brown Concrete Powder", Name: "brown_concrete_powder", Hardness: 0.5, Diggable: true, DropIDs: []uint32{512}, NeedsTools: map[uint32]bool{}, MinStateID: 9716, MaxStateID: 9716, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
GreenConcretePowder = Block{ID: 585, DisplayName: "Green Concrete Powder", Name: "green_concrete_powder", Hardness: 0.5, Diggable: true, DropIDs: []uint32{513}, NeedsTools: map[uint32]bool{}, MinStateID: 9717, MaxStateID: 9717, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
RedConcretePowder = Block{ID: 586, DisplayName: "Red Concrete Powder", Name: "red_concrete_powder", Hardness: 0.5, Diggable: true, DropIDs: []uint32{514}, NeedsTools: map[uint32]bool{}, MinStateID: 9718, MaxStateID: 9718, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BlackConcretePowder = Block{ID: 587, DisplayName: "Black Concrete Powder", Name: "black_concrete_powder", Hardness: 0.5, Diggable: true, DropIDs: []uint32{515}, NeedsTools: map[uint32]bool{}, MinStateID: 9719, MaxStateID: 9719, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Kelp = Block{ID: 588, DisplayName: "Kelp", Name: "kelp", Hardness: 0, Diggable: true, DropIDs: []uint32{197}, NeedsTools: map[uint32]bool{}, MinStateID: 9720, MaxStateID: 9745, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
KelpPlant = Block{ID: 589, DisplayName: "Air", Name: "kelp_plant", Hardness: 0, Diggable: true, DropIDs: []uint32{197}, NeedsTools: map[uint32]bool{}, MinStateID: 9746, MaxStateID: 9746, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
DriedKelpBlock = Block{ID: 590, DisplayName: "Dried Kelp Block", Name: "dried_kelp_block", Hardness: 0.5, Diggable: true, DropIDs: []uint32{790}, NeedsTools: map[uint32]bool{}, MinStateID: 9747, MaxStateID: 9747, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
TurtleEgg = Block{ID: 591, DisplayName: "Turtle Egg", Name: "turtle_egg", Hardness: 0.5, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9748, MaxStateID: 9759, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
DeadTubeCoralBlock = Block{ID: 592, DisplayName: "Dead Tube Coral Block", Name: "dead_tube_coral_block", Hardness: 1.5, Diggable: true, DropIDs: []uint32{517}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 9760, MaxStateID: 9760, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DeadBrainCoralBlock = Block{ID: 593, DisplayName: "Dead Brain Coral Block", Name: "dead_brain_coral_block", Hardness: 1.5, Diggable: true, DropIDs: []uint32{518}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 9761, MaxStateID: 9761, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DeadBubbleCoralBlock = Block{ID: 594, DisplayName: "Dead Bubble Coral Block", Name: "dead_bubble_coral_block", Hardness: 1.5, Diggable: true, DropIDs: []uint32{519}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 9762, MaxStateID: 9762, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DeadFireCoralBlock = Block{ID: 595, DisplayName: "Dead Fire Coral Block", Name: "dead_fire_coral_block", Hardness: 1.5, Diggable: true, DropIDs: []uint32{520}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9763, MaxStateID: 9763, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DeadHornCoralBlock = Block{ID: 596, DisplayName: "Dead Horn Coral Block", Name: "dead_horn_coral_block", Hardness: 1.5, Diggable: true, DropIDs: []uint32{521}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9764, MaxStateID: 9764, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
TubeCoralBlock = Block{ID: 597, DisplayName: "Tube Coral Block", Name: "tube_coral_block", Hardness: 1.5, Diggable: true, DropIDs: []uint32{517}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9765, MaxStateID: 9765, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BrainCoralBlock = Block{ID: 598, DisplayName: "Brain Coral Block", Name: "brain_coral_block", Hardness: 1.5, Diggable: true, DropIDs: []uint32{518}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 9766, MaxStateID: 9766, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BubbleCoralBlock = Block{ID: 599, DisplayName: "Bubble Coral Block", Name: "bubble_coral_block", Hardness: 1.5, Diggable: true, DropIDs: []uint32{519}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 9767, MaxStateID: 9767, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
FireCoralBlock = Block{ID: 600, DisplayName: "Fire Coral Block", Name: "fire_coral_block", Hardness: 1.5, Diggable: true, DropIDs: []uint32{520}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 9768, MaxStateID: 9768, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
HornCoralBlock = Block{ID: 601, DisplayName: "Horn Coral Block", Name: "horn_coral_block", Hardness: 1.5, Diggable: true, DropIDs: []uint32{521}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9769, MaxStateID: 9769, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DeadTubeCoral = Block{ID: 602, DisplayName: "Dead Tube Coral", Name: "dead_tube_coral", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 9770, MaxStateID: 9771, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
DeadBrainCoral = Block{ID: 603, DisplayName: "Dead Brain Coral", Name: "dead_brain_coral", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 9772, MaxStateID: 9773, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
DeadBubbleCoral = Block{ID: 604, DisplayName: "Dead Bubble Coral", Name: "dead_bubble_coral", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9774, MaxStateID: 9775, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
DeadFireCoral = Block{ID: 605, DisplayName: "Dead Fire Coral", Name: "dead_fire_coral", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9776, MaxStateID: 9777, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
DeadHornCoral = Block{ID: 606, DisplayName: "Dead Horn Coral", Name: "dead_horn_coral", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 9778, MaxStateID: 9779, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
TubeCoral = Block{ID: 607, DisplayName: "Tube Coral", Name: "tube_coral", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9780, MaxStateID: 9781, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
BrainCoral = Block{ID: 608, DisplayName: "Brain Coral", Name: "brain_coral", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9782, MaxStateID: 9783, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
BubbleCoral = Block{ID: 609, DisplayName: "Bubble Coral", Name: "bubble_coral", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9784, MaxStateID: 9785, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
FireCoral = Block{ID: 610, DisplayName: "Fire Coral", Name: "fire_coral", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9786, MaxStateID: 9787, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
HornCoral = Block{ID: 611, DisplayName: "Horn Coral", Name: "horn_coral", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9788, MaxStateID: 9789, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
DeadTubeCoralFan = Block{ID: 612, DisplayName: "Dead Tube Coral Fan", Name: "dead_tube_coral_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 9790, MaxStateID: 9791, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
DeadBrainCoralFan = Block{ID: 613, DisplayName: "Dead Brain Coral Fan", Name: "dead_brain_coral_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 9792, MaxStateID: 9793, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
DeadBubbleCoralFan = Block{ID: 614, DisplayName: "Dead Bubble Coral Fan", Name: "dead_bubble_coral_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 9794, MaxStateID: 9795, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
DeadFireCoralFan = Block{ID: 615, DisplayName: "Dead Fire Coral Fan", Name: "dead_fire_coral_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 9796, MaxStateID: 9797, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
DeadHornCoralFan = Block{ID: 616, DisplayName: "Dead Horn Coral Fan", Name: "dead_horn_coral_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 9798, MaxStateID: 9799, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
TubeCoralFan = Block{ID: 617, DisplayName: "Tube Coral Fan", Name: "tube_coral_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9800, MaxStateID: 9801, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
BrainCoralFan = Block{ID: 618, DisplayName: "Brain Coral Fan", Name: "brain_coral_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9802, MaxStateID: 9803, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
BubbleCoralFan = Block{ID: 619, DisplayName: "Bubble Coral Fan", Name: "bubble_coral_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9804, MaxStateID: 9805, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
FireCoralFan = Block{ID: 620, DisplayName: "Fire Coral Fan", Name: "fire_coral_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9806, MaxStateID: 9807, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
HornCoralFan = Block{ID: 621, DisplayName: "Horn Coral Fan", Name: "horn_coral_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9808, MaxStateID: 9809, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
DeadTubeCoralWallFan = Block{ID: 622, DisplayName: "Dead Tube Coral Fan", Name: "dead_tube_coral_wall_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 9810, MaxStateID: 9817, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
DeadBrainCoralWallFan = Block{ID: 623, DisplayName: "Dead Brain Coral Fan", Name: "dead_brain_coral_wall_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 9818, MaxStateID: 9825, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
DeadBubbleCoralWallFan = Block{ID: 624, DisplayName: "Dead Bubble Coral Fan", Name: "dead_bubble_coral_wall_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 9826, MaxStateID: 9833, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
DeadFireCoralWallFan = Block{ID: 625, DisplayName: "Dead Fire Coral Fan", Name: "dead_fire_coral_wall_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 9834, MaxStateID: 9841, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
DeadHornCoralWallFan = Block{ID: 626, DisplayName: "Dead Horn Coral Fan", Name: "dead_horn_coral_wall_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 9842, MaxStateID: 9849, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
TubeCoralWallFan = Block{ID: 627, DisplayName: "Tube Coral Fan", Name: "tube_coral_wall_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9850, MaxStateID: 9857, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
BrainCoralWallFan = Block{ID: 628, DisplayName: "Brain Coral Fan", Name: "brain_coral_wall_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9858, MaxStateID: 9865, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
BubbleCoralWallFan = Block{ID: 629, DisplayName: "Bubble Coral Fan", Name: "bubble_coral_wall_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9866, MaxStateID: 9873, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
FireCoralWallFan = Block{ID: 630, DisplayName: "Fire Coral Fan", Name: "fire_coral_wall_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9874, MaxStateID: 9881, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
HornCoralWallFan = Block{ID: 631, DisplayName: "Horn Coral Fan", Name: "horn_coral_wall_fan", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9882, MaxStateID: 9889, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
SeaPickle = Block{ID: 632, DisplayName: "Sea Pickle", Name: "sea_pickle", Hardness: 0, Diggable: true, DropIDs: []uint32{156}, NeedsTools: map[uint32]bool{}, MinStateID: 9890, MaxStateID: 9897, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 6}
BlueIce = Block{ID: 633, DisplayName: "Blue Ice", Name: "blue_ice", Hardness: 2.8, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9898, MaxStateID: 9898, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Conduit = Block{ID: 634, DisplayName: "Conduit", Name: "conduit", Hardness: 3, Diggable: true, DropIDs: []uint32{548}, NeedsTools: map[uint32]bool{}, MinStateID: 9899, MaxStateID: 9900, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 15}
BambooSapling = Block{ID: 635, DisplayName: "Air", Name: "bamboo_sapling", Hardness: 1, Diggable: true, DropIDs: []uint32{203}, NeedsTools: map[uint32]bool{}, MinStateID: 9901, MaxStateID: 9901, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Bamboo = Block{ID: 636, DisplayName: "Bamboo", Name: "bamboo", Hardness: 1, Diggable: true, DropIDs: []uint32{203}, NeedsTools: map[uint32]bool{}, MinStateID: 9902, MaxStateID: 9913, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedBamboo = Block{ID: 637, DisplayName: "Air", Name: "potted_bamboo", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 203}, NeedsTools: map[uint32]bool{}, MinStateID: 9914, MaxStateID: 9914, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
VoidAir = Block{ID: 638, DisplayName: "Air", Name: "void_air", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9915, MaxStateID: 9915, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
CaveAir = Block{ID: 639, DisplayName: "Air", Name: "cave_air", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9916, MaxStateID: 9916, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BubbleColumn = Block{ID: 640, DisplayName: "Air", Name: "bubble_column", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 9917, MaxStateID: 9918, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
PolishedGraniteStairs = Block{ID: 641, DisplayName: "Polished Granite Stairs", Name: "polished_granite_stairs", Hardness: 1.5, Diggable: true, DropIDs: []uint32{549}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 9919, MaxStateID: 9998, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
SmoothRedSandstoneStairs = Block{ID: 642, DisplayName: "Smooth Red Sandstone Stairs", Name: "smooth_red_sandstone_stairs", Hardness: 2, Diggable: true, DropIDs: []uint32{550}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 9999, MaxStateID: 10078, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
MossyStoneBrickStairs = Block{ID: 643, DisplayName: "Mossy Stone Brick Stairs", Name: "mossy_stone_brick_stairs", Hardness: 1.5, Diggable: true, DropIDs: []uint32{551}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 10079, MaxStateID: 10158, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PolishedDioriteStairs = Block{ID: 644, DisplayName: "Polished Diorite Stairs", Name: "polished_diorite_stairs", Hardness: 1.5, Diggable: true, DropIDs: []uint32{552}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 10159, MaxStateID: 10238, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
MossyCobblestoneStairs = Block{ID: 645, DisplayName: "Mossy Cobblestone Stairs", Name: "mossy_cobblestone_stairs", Hardness: 2, Diggable: true, DropIDs: []uint32{553}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 10239, MaxStateID: 10318, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
EndStoneBrickStairs = Block{ID: 646, DisplayName: "End Stone Brick Stairs", Name: "end_stone_brick_stairs", Hardness: 3, Diggable: true, DropIDs: []uint32{554}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 10319, MaxStateID: 10398, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
StoneStairs = Block{ID: 647, DisplayName: "Stone Stairs", Name: "stone_stairs", Hardness: 1.5, Diggable: true, DropIDs: []uint32{555}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 10399, MaxStateID: 10478, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
SmoothSandstoneStairs = Block{ID: 648, DisplayName: "Smooth Sandstone Stairs", Name: "smooth_sandstone_stairs", Hardness: 2, Diggable: true, DropIDs: []uint32{556}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 10479, MaxStateID: 10558, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
SmoothQuartzStairs = Block{ID: 649, DisplayName: "Smooth Quartz Stairs", Name: "smooth_quartz_stairs", Hardness: 2, Diggable: true, DropIDs: []uint32{557}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 10559, MaxStateID: 10638, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
GraniteStairs = Block{ID: 650, DisplayName: "Granite Stairs", Name: "granite_stairs", Hardness: 1.5, Diggable: true, DropIDs: []uint32{558}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 10639, MaxStateID: 10718, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
AndesiteStairs = Block{ID: 651, DisplayName: "Andesite Stairs", Name: "andesite_stairs", Hardness: 1.5, Diggable: true, DropIDs: []uint32{559}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 10719, MaxStateID: 10798, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
RedNetherBrickStairs = Block{ID: 652, DisplayName: "Red Nether Brick Stairs", Name: "red_nether_brick_stairs", Hardness: 2, Diggable: true, DropIDs: []uint32{560}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 10799, MaxStateID: 10878, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PolishedAndesiteStairs = Block{ID: 653, DisplayName: "Polished Andesite Stairs", Name: "polished_andesite_stairs", Hardness: 1.5, Diggable: true, DropIDs: []uint32{561}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 10879, MaxStateID: 10958, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DioriteStairs = Block{ID: 654, DisplayName: "Diorite Stairs", Name: "diorite_stairs", Hardness: 1.5, Diggable: true, DropIDs: []uint32{562}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 10959, MaxStateID: 11038, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PolishedGraniteSlab = Block{ID: 655, DisplayName: "Polished Granite Slab", Name: "polished_granite_slab", Hardness: 1.5, Diggable: true, DropIDs: []uint32{567}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 11039, MaxStateID: 11044, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
SmoothRedSandstoneSlab = Block{ID: 656, DisplayName: "Smooth Red Sandstone Slab", Name: "smooth_red_sandstone_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{568}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 11045, MaxStateID: 11050, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
MossyStoneBrickSlab = Block{ID: 657, DisplayName: "Mossy Stone Brick Slab", Name: "mossy_stone_brick_slab", Hardness: 1.5, Diggable: true, DropIDs: []uint32{569}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 11051, MaxStateID: 11056, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PolishedDioriteSlab = Block{ID: 658, DisplayName: "Polished Diorite Slab", Name: "polished_diorite_slab", Hardness: 1.5, Diggable: true, DropIDs: []uint32{570}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 11057, MaxStateID: 11062, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
MossyCobblestoneSlab = Block{ID: 659, DisplayName: "Mossy Cobblestone Slab", Name: "mossy_cobblestone_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{571}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 11063, MaxStateID: 11068, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
EndStoneBrickSlab = Block{ID: 660, DisplayName: "End Stone Brick Slab", Name: "end_stone_brick_slab", Hardness: 3, Diggable: true, DropIDs: []uint32{572}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 11069, MaxStateID: 11074, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
SmoothSandstoneSlab = Block{ID: 661, DisplayName: "Smooth Sandstone Slab", Name: "smooth_sandstone_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{573}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 11075, MaxStateID: 11080, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
SmoothQuartzSlab = Block{ID: 662, DisplayName: "Smooth Quartz Slab", Name: "smooth_quartz_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{574}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 11081, MaxStateID: 11086, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
GraniteSlab = Block{ID: 663, DisplayName: "Granite Slab", Name: "granite_slab", Hardness: 1.5, Diggable: true, DropIDs: []uint32{575}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 11087, MaxStateID: 11092, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
AndesiteSlab = Block{ID: 664, DisplayName: "Andesite Slab", Name: "andesite_slab", Hardness: 1.5, Diggable: true, DropIDs: []uint32{576}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 11093, MaxStateID: 11098, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
RedNetherBrickSlab = Block{ID: 665, DisplayName: "Red Nether Brick Slab", Name: "red_nether_brick_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{577}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 11099, MaxStateID: 11104, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PolishedAndesiteSlab = Block{ID: 666, DisplayName: "Polished Andesite Slab", Name: "polished_andesite_slab", Hardness: 1.5, Diggable: true, DropIDs: []uint32{578}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 11105, MaxStateID: 11110, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DioriteSlab = Block{ID: 667, DisplayName: "Diorite Slab", Name: "diorite_slab", Hardness: 1.5, Diggable: true, DropIDs: []uint32{579}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 11111, MaxStateID: 11116, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
BrickWall = Block{ID: 668, DisplayName: "Brick Wall", Name: "brick_wall", Hardness: 2, Diggable: true, DropIDs: []uint32{327}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 11117, MaxStateID: 11440, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PrismarineWall = Block{ID: 669, DisplayName: "Prismarine Wall", Name: "prismarine_wall", Hardness: 1.5, Diggable: true, DropIDs: []uint32{328}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 11441, MaxStateID: 11764, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
RedSandstoneWall = Block{ID: 670, DisplayName: "Red Sandstone Wall", Name: "red_sandstone_wall", Hardness: 0.8, Diggable: true, DropIDs: []uint32{329}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 11765, MaxStateID: 12088, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
MossyStoneBrickWall = Block{ID: 671, DisplayName: "Mossy Stone Brick Wall", Name: "mossy_stone_brick_wall", Hardness: 1.5, Diggable: true, DropIDs: []uint32{330}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 12089, MaxStateID: 12412, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
GraniteWall = Block{ID: 672, DisplayName: "Granite Wall", Name: "granite_wall", Hardness: 1.5, Diggable: true, DropIDs: []uint32{331}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 12413, MaxStateID: 12736, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
StoneBrickWall = Block{ID: 673, DisplayName: "Stone Brick Wall", Name: "stone_brick_wall", Hardness: 1.5, Diggable: true, DropIDs: []uint32{332}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 12737, MaxStateID: 13060, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
NetherBrickWall = Block{ID: 674, DisplayName: "Nether Brick Wall", Name: "nether_brick_wall", Hardness: 2, Diggable: true, DropIDs: []uint32{333}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 13061, MaxStateID: 13384, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
AndesiteWall = Block{ID: 675, DisplayName: "Andesite Wall", Name: "andesite_wall", Hardness: 1.5, Diggable: true, DropIDs: []uint32{334}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 13385, MaxStateID: 13708, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
RedNetherBrickWall = Block{ID: 676, DisplayName: "Red Nether Brick Wall", Name: "red_nether_brick_wall", Hardness: 2, Diggable: true, DropIDs: []uint32{335}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 13709, MaxStateID: 14032, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
SandstoneWall = Block{ID: 677, DisplayName: "Sandstone Wall", Name: "sandstone_wall", Hardness: 0.8, Diggable: true, DropIDs: []uint32{336}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 14033, MaxStateID: 14356, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
EndStoneBrickWall = Block{ID: 678, DisplayName: "End Stone Brick Wall", Name: "end_stone_brick_wall", Hardness: 3, Diggable: true, DropIDs: []uint32{337}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 14357, MaxStateID: 14680, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DioriteWall = Block{ID: 679, DisplayName: "Diorite Wall", Name: "diorite_wall", Hardness: 1.5, Diggable: true, DropIDs: []uint32{338}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 14681, MaxStateID: 15004, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
Scaffolding = Block{ID: 680, DisplayName: "Scaffolding", Name: "scaffolding", Hardness: 0, Diggable: true, DropIDs: []uint32{584}, NeedsTools: map[uint32]bool{}, MinStateID: 15005, MaxStateID: 15036, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Loom = Block{ID: 681, DisplayName: "Loom", Name: "loom", Hardness: 2.5, Diggable: true, DropIDs: []uint32{1034}, NeedsTools: map[uint32]bool{}, MinStateID: 15037, MaxStateID: 15040, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Barrel = Block{ID: 682, DisplayName: "Barrel", Name: "barrel", Hardness: 2.5, Diggable: true, DropIDs: []uint32{1042}, NeedsTools: map[uint32]bool{}, MinStateID: 15041, MaxStateID: 15052, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Smoker = Block{ID: 683, DisplayName: "Smoker", Name: "smoker", Hardness: 3.5, Diggable: true, DropIDs: []uint32{1043}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 15053, MaxStateID: 15060, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BlastFurnace = Block{ID: 684, DisplayName: "Blast Furnace", Name: "blast_furnace", Hardness: 3.5, Diggable: true, DropIDs: []uint32{1044}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 15061, MaxStateID: 15068, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CartographyTable = Block{ID: 685, DisplayName: "Cartography Table", Name: "cartography_table", Hardness: 2.5, Diggable: true, DropIDs: []uint32{1045}, NeedsTools: map[uint32]bool{}, MinStateID: 15069, MaxStateID: 15069, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
FletchingTable = Block{ID: 686, DisplayName: "Fletching Table", Name: "fletching_table", Hardness: 2.5, Diggable: true, DropIDs: []uint32{1046}, NeedsTools: map[uint32]bool{}, MinStateID: 15070, MaxStateID: 15070, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Grindstone = Block{ID: 687, DisplayName: "Grindstone", Name: "grindstone", Hardness: 2, Diggable: true, DropIDs: []uint32{1047}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 15071, MaxStateID: 15082, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
Lectern = Block{ID: 688, DisplayName: "Lectern", Name: "lectern", Hardness: 2.5, Diggable: true, DropIDs: []uint32{598}, NeedsTools: map[uint32]bool{}, MinStateID: 15083, MaxStateID: 15098, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
SmithingTable = Block{ID: 689, DisplayName: "Smithing Table", Name: "smithing_table", Hardness: 2.5, Diggable: true, DropIDs: []uint32{1048}, NeedsTools: map[uint32]bool{}, MinStateID: 15099, MaxStateID: 15099, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Stonecutter = Block{ID: 690, DisplayName: "Stonecutter", Name: "stonecutter", Hardness: 3.5, Diggable: true, DropIDs: []uint32{1049}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 15100, MaxStateID: 15103, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
Bell = Block{ID: 691, DisplayName: "Bell", Name: "bell", Hardness: 5, Diggable: true, DropIDs: []uint32{1050}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 15104, MaxStateID: 15135, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
Lantern = Block{ID: 692, DisplayName: "Lantern", Name: "lantern", Hardness: 3.5, Diggable: true, DropIDs: []uint32{1051}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 15136, MaxStateID: 15139, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 15}
SoulLantern = Block{ID: 693, DisplayName: "Soul Lantern", Name: "soul_lantern", Hardness: 3.5, Diggable: true, DropIDs: []uint32{1052}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 15140, MaxStateID: 15143, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 10}
Campfire = Block{ID: 694, DisplayName: "Campfire", Name: "campfire", Hardness: 2, Diggable: true, DropIDs: []uint32{685}, NeedsTools: map[uint32]bool{}, MinStateID: 15144, MaxStateID: 15175, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 15}
SoulCampfire = Block{ID: 695, DisplayName: "Soul Campfire", Name: "soul_campfire", Hardness: 2, Diggable: true, DropIDs: []uint32{270}, NeedsTools: map[uint32]bool{}, MinStateID: 15176, MaxStateID: 15207, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 10}
SweetBerryBush = Block{ID: 696, DisplayName: "Sweet Berries", Name: "sweet_berry_bush", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 15208, MaxStateID: 15211, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
WarpedStem = Block{ID: 697, DisplayName: "Warped Stem", Name: "warped_stem", Hardness: 2, Diggable: true, DropIDs: []uint32{108}, NeedsTools: map[uint32]bool{}, MinStateID: 15212, MaxStateID: 15214, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
StrippedWarpedStem = Block{ID: 698, DisplayName: "Stripped Warped Stem", Name: "stripped_warped_stem", Hardness: 2, Diggable: true, DropIDs: []uint32{116}, NeedsTools: map[uint32]bool{}, MinStateID: 15215, MaxStateID: 15217, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WarpedHyphae = Block{ID: 699, DisplayName: "Warped Hyphae", Name: "warped_hyphae", Hardness: 2, Diggable: true, DropIDs: []uint32{132}, NeedsTools: map[uint32]bool{}, MinStateID: 15218, MaxStateID: 15220, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
StrippedWarpedHyphae = Block{ID: 700, DisplayName: "Stripped Warped Hyphae", Name: "stripped_warped_hyphae", Hardness: 2, Diggable: true, DropIDs: []uint32{124}, NeedsTools: map[uint32]bool{}, MinStateID: 15221, MaxStateID: 15223, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WarpedNylium = Block{ID: 701, DisplayName: "Warped Nylium", Name: "warped_nylium", Hardness: 0.4, Diggable: true, DropIDs: []uint32{268}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 15224, MaxStateID: 15224, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WarpedFungus = Block{ID: 702, DisplayName: "Warped Fungus", Name: "warped_fungus", Hardness: 0, Diggable: true, DropIDs: []uint32{190}, NeedsTools: map[uint32]bool{}, MinStateID: 15225, MaxStateID: 15225, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
WarpedWartBlock = Block{ID: 703, DisplayName: "Warped Wart Block", Name: "warped_wart_block", Hardness: 1, Diggable: true, DropIDs: []uint32{447}, NeedsTools: map[uint32]bool{}, MinStateID: 15226, MaxStateID: 15226, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WarpedRoots = Block{ID: 704, DisplayName: "Warped Roots", Name: "warped_roots", Hardness: 0, Diggable: true, DropIDs: []uint32{192}, NeedsTools: map[uint32]bool{}, MinStateID: 15227, MaxStateID: 15227, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
NetherSprouts = Block{ID: 705, DisplayName: "Nether Sprouts", Name: "nether_sprouts", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 15228, MaxStateID: 15228, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
CrimsonStem = Block{ID: 706, DisplayName: "Crimson Stem", Name: "crimson_stem", Hardness: 2, Diggable: true, DropIDs: []uint32{107}, NeedsTools: map[uint32]bool{}, MinStateID: 15229, MaxStateID: 15231, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
StrippedCrimsonStem = Block{ID: 707, DisplayName: "Stripped Crimson Stem", Name: "stripped_crimson_stem", Hardness: 2, Diggable: true, DropIDs: []uint32{115}, NeedsTools: map[uint32]bool{}, MinStateID: 15232, MaxStateID: 15234, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CrimsonHyphae = Block{ID: 708, DisplayName: "Crimson Hyphae", Name: "crimson_hyphae", Hardness: 2, Diggable: true, DropIDs: []uint32{131}, NeedsTools: map[uint32]bool{}, MinStateID: 15235, MaxStateID: 15237, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
StrippedCrimsonHyphae = Block{ID: 709, DisplayName: "Stripped Crimson Hyphae", Name: "stripped_crimson_hyphae", Hardness: 2, Diggable: true, DropIDs: []uint32{123}, NeedsTools: map[uint32]bool{}, MinStateID: 15238, MaxStateID: 15240, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CrimsonNylium = Block{ID: 710, DisplayName: "<NAME>", Name: "crimson_nylium", Hardness: 0.4, Diggable: true, DropIDs: []uint32{268}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 15241, MaxStateID: 15241, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CrimsonFungus = Block{ID: 711, DisplayName: "<NAME>", Name: "crimson_fungus", Hardness: 0, Diggable: true, DropIDs: []uint32{189}, NeedsTools: map[uint32]bool{}, MinStateID: 15242, MaxStateID: 15242, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Shroomlight = Block{ID: 712, DisplayName: "Shroomlight", Name: "shroomlight", Hardness: 1, Diggable: true, DropIDs: []uint32{1057}, NeedsTools: map[uint32]bool{}, MinStateID: 15243, MaxStateID: 15243, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 15}
WeepingVines = Block{ID: 713, DisplayName: "Weeping Vines", Name: "weeping_vines", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 15244, MaxStateID: 15269, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
WeepingVinesPlant = Block{ID: 714, DisplayName: "Air", Name: "weeping_vines_plant", Hardness: 0, Diggable: true, DropIDs: []uint32{194}, NeedsTools: map[uint32]bool{}, MinStateID: 15270, MaxStateID: 15270, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
TwistingVines = Block{ID: 715, DisplayName: "Twisting Vines", Name: "twisting_vines", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 15271, MaxStateID: 15296, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
TwistingVinesPlant = Block{ID: 716, DisplayName: "Air", Name: "twisting_vines_plant", Hardness: 0, Diggable: true, DropIDs: []uint32{195}, NeedsTools: map[uint32]bool{}, MinStateID: 15297, MaxStateID: 15297, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
CrimsonRoots = Block{ID: 717, DisplayName: "Crimson Roots", Name: "crimson_roots", Hardness: 0, Diggable: true, DropIDs: []uint32{191}, NeedsTools: map[uint32]bool{}, MinStateID: 15298, MaxStateID: 15298, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
CrimsonPlanks = Block{ID: 718, DisplayName: "Crimson Planks", Name: "crimson_planks", Hardness: 2, Diggable: true, DropIDs: []uint32{28}, NeedsTools: map[uint32]bool{}, MinStateID: 15299, MaxStateID: 15299, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WarpedPlanks = Block{ID: 719, DisplayName: "Warped Planks", Name: "warped_planks", Hardness: 2, Diggable: true, DropIDs: []uint32{29}, NeedsTools: map[uint32]bool{}, MinStateID: 15300, MaxStateID: 15300, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CrimsonSlab = Block{ID: 720, DisplayName: "Crimson Slab", Name: "crimson_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{210}, NeedsTools: map[uint32]bool{}, MinStateID: 15301, MaxStateID: 15306, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WarpedSlab = Block{ID: 721, DisplayName: "Warped Slab", Name: "warped_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{211}, NeedsTools: map[uint32]bool{}, MinStateID: 15307, MaxStateID: 15312, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
CrimsonPressurePlate = Block{ID: 722, DisplayName: "Crimson Pressure Plate", Name: "crimson_pressure_plate", Hardness: 0.5, Diggable: true, DropIDs: []uint32{629}, NeedsTools: map[uint32]bool{}, MinStateID: 15313, MaxStateID: 15314, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
WarpedPressurePlate = Block{ID: 723, DisplayName: "Warped Pressure Plate", Name: "warped_pressure_plate", Hardness: 0.5, Diggable: true, DropIDs: []uint32{630}, NeedsTools: map[uint32]bool{}, MinStateID: 15315, MaxStateID: 15316, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
CrimsonFence = Block{ID: 724, DisplayName: "Crimson Fence", Name: "crimson_fence", Hardness: 2, Diggable: true, DropIDs: []uint32{263}, NeedsTools: map[uint32]bool{}, MinStateID: 15317, MaxStateID: 15348, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WarpedFence = Block{ID: 725, DisplayName: "Warped Fence", Name: "warped_fence", Hardness: 2, Diggable: true, DropIDs: []uint32{264}, NeedsTools: map[uint32]bool{}, MinStateID: 15349, MaxStateID: 15380, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
CrimsonTrapdoor = Block{ID: 726, DisplayName: "Crimson Trapdoor", Name: "crimson_trapdoor", Hardness: 3, Diggable: true, DropIDs: []uint32{647}, NeedsTools: map[uint32]bool{}, MinStateID: 15381, MaxStateID: 15444, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
WarpedTrapdoor = Block{ID: 727, DisplayName: "Warped Trapdoor", Name: "warped_trapdoor", Hardness: 3, Diggable: true, DropIDs: []uint32{648}, NeedsTools: map[uint32]bool{}, MinStateID: 15445, MaxStateID: 15508, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
CrimsonFenceGate = Block{ID: 728, DisplayName: "Crimson Fence Gate", Name: "crimson_fence_gate", Hardness: 2, Diggable: true, DropIDs: []uint32{655}, NeedsTools: map[uint32]bool{}, MinStateID: 15509, MaxStateID: 15540, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WarpedFenceGate = Block{ID: 729, DisplayName: "Warped Fence Gate", Name: "warped_fence_gate", Hardness: 2, Diggable: true, DropIDs: []uint32{656}, NeedsTools: map[uint32]bool{}, MinStateID: 15541, MaxStateID: 15572, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
CrimsonStairs = Block{ID: 730, DisplayName: "Crimson Stairs", Name: "crimson_stairs", Hardness: 2, Diggable: true, DropIDs: []uint32{321}, NeedsTools: map[uint32]bool{}, MinStateID: 15573, MaxStateID: 15652, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WarpedStairs = Block{ID: 731, DisplayName: "Warped Stairs", Name: "warped_stairs", Hardness: 2, Diggable: true, DropIDs: []uint32{322}, NeedsTools: map[uint32]bool{}, MinStateID: 15653, MaxStateID: 15732, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
CrimsonButton = Block{ID: 732, DisplayName: "Crimson Button", Name: "crimson_button", Hardness: 0.5, Diggable: true, DropIDs: []uint32{617}, NeedsTools: map[uint32]bool{}, MinStateID: 15733, MaxStateID: 15756, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
WarpedButton = Block{ID: 733, DisplayName: "Warped Button", Name: "warped_button", Hardness: 0.5, Diggable: true, DropIDs: []uint32{618}, NeedsTools: map[uint32]bool{}, MinStateID: 15757, MaxStateID: 15780, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
CrimsonDoor = Block{ID: 734, DisplayName: "Crimson Door", Name: "crimson_door", Hardness: 3, Diggable: true, DropIDs: []uint32{638}, NeedsTools: map[uint32]bool{}, MinStateID: 15781, MaxStateID: 15844, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
WarpedDoor = Block{ID: 735, DisplayName: "Warped Door", Name: "warped_door", Hardness: 3, Diggable: true, DropIDs: []uint32{639}, NeedsTools: map[uint32]bool{}, MinStateID: 15845, MaxStateID: 15908, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
CrimsonSign = Block{ID: 736, DisplayName: "Crimson Sign", Name: "crimson_sign", Hardness: 1, Diggable: true, DropIDs: []uint32{774}, NeedsTools: map[uint32]bool{}, MinStateID: 15909, MaxStateID: 15940, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
WarpedSign = Block{ID: 737, DisplayName: "Warped Sign", Name: "warped_sign", Hardness: 1, Diggable: true, DropIDs: []uint32{775}, NeedsTools: map[uint32]bool{}, MinStateID: 15941, MaxStateID: 15972, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
CrimsonWallSign = Block{ID: 738, DisplayName: "Crimson Sign", Name: "crimson_wall_sign", Hardness: 1, Diggable: true, DropIDs: []uint32{774}, NeedsTools: map[uint32]bool{}, MinStateID: 15973, MaxStateID: 15980, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
WarpedWallSign = Block{ID: 739, DisplayName: "Warped Sign", Name: "warped_wall_sign", Hardness: 1, Diggable: true, DropIDs: []uint32{775}, NeedsTools: map[uint32]bool{}, MinStateID: 15981, MaxStateID: 15988, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
StructureBlock = Block{ID: 740, DisplayName: "Structure Block", Name: "structure_block", Hardness: 0, Diggable: false, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 15989, MaxStateID: 15992, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Jigsaw = Block{ID: 741, DisplayName: "Jigsaw Block", Name: "jigsaw", Hardness: 0, Diggable: false, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 15993, MaxStateID: 16004, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Composter = Block{ID: 742, DisplayName: "Composter", Name: "composter", Hardness: 0.6, Diggable: true, DropIDs: []uint32{1041}, NeedsTools: map[uint32]bool{}, MinStateID: 16005, MaxStateID: 16013, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
Target = Block{ID: 743, DisplayName: "Target", Name: "target", Hardness: 0.5, Diggable: true, DropIDs: []uint32{599}, NeedsTools: map[uint32]bool{}, MinStateID: 16014, MaxStateID: 16029, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BeeNest = Block{ID: 744, DisplayName: "Bee Nest", Name: "bee_nest", Hardness: 0.3, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 16030, MaxStateID: 16053, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Beehive = Block{ID: 745, DisplayName: "Beehive", Name: "beehive", Hardness: 0.6, Diggable: true, DropIDs: []uint32{1060}, NeedsTools: map[uint32]bool{}, MinStateID: 16054, MaxStateID: 16077, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
HoneyBlock = Block{ID: 746, DisplayName: "Honey Block", Name: "honey_block", Hardness: 0, Diggable: true, DropIDs: []uint32{593}, NeedsTools: map[uint32]bool{}, MinStateID: 16078, MaxStateID: 16078, Transparent: true, FilterLightLevel: 1, EmitLightLevel: 0}
HoneycombBlock = Block{ID: 747, DisplayName: "Honeycomb Block", Name: "honeycomb_block", Hardness: 0.6, Diggable: true, DropIDs: []uint32{1062}, NeedsTools: map[uint32]bool{}, MinStateID: 16079, MaxStateID: 16079, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
NetheriteBlock = Block{ID: 748, DisplayName: "Block of Netherite", Name: "netherite_block", Hardness: 50, Diggable: true, DropIDs: []uint32{69}, NeedsTools: map[uint32]bool{721: true, 726: true}, MinStateID: 16080, MaxStateID: 16080, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
AncientDebris = Block{ID: 749, DisplayName: "Ancient Debris", Name: "ancient_debris", Hardness: 30, Diggable: true, DropIDs: []uint32{58}, NeedsTools: map[uint32]bool{721: true, 726: true}, MinStateID: 16081, MaxStateID: 16081, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CryingObsidian = Block{ID: 750, DisplayName: "Crying Obsidian", Name: "crying_obsidian", Hardness: 50, Diggable: true, DropIDs: []uint32{1064}, NeedsTools: map[uint32]bool{721: true, 726: true}, MinStateID: 16082, MaxStateID: 16082, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 10}
RespawnAnchor = Block{ID: 751, DisplayName: "Respawn Anchor", Name: "respawn_anchor", Hardness: 50, Diggable: true, DropIDs: []uint32{1077}, NeedsTools: map[uint32]bool{721: true, 726: true}, MinStateID: 16083, MaxStateID: 16087, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PottedCrimsonFungus = Block{ID: 752, DisplayName: "Air", Name: "potted_crimson_fungus", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 189}, NeedsTools: map[uint32]bool{}, MinStateID: 16088, MaxStateID: 16088, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedWarpedFungus = Block{ID: 753, DisplayName: "Air", Name: "potted_warped_fungus", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 190}, NeedsTools: map[uint32]bool{}, MinStateID: 16089, MaxStateID: 16089, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedCrimsonRoots = Block{ID: 754, DisplayName: "Air", Name: "potted_crimson_roots", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 191}, NeedsTools: map[uint32]bool{}, MinStateID: 16090, MaxStateID: 16090, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedWarpedRoots = Block{ID: 755, DisplayName: "Air", Name: "potted_warped_roots", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 192}, NeedsTools: map[uint32]bool{}, MinStateID: 16091, MaxStateID: 16091, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Lodestone = Block{ID: 756, DisplayName: "Lodestone", Name: "lodestone", Hardness: 3.5, Diggable: true, DropIDs: []uint32{1063}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 16092, MaxStateID: 16092, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Blackstone = Block{ID: 757, DisplayName: "Blackstone", Name: "blackstone", Hardness: 1.5, Diggable: true, DropIDs: []uint32{1065}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 16093, MaxStateID: 16093, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BlackstoneStairs = Block{ID: 758, DisplayName: "Blackstone Stairs", Name: "blackstone_stairs", Hardness: 1.5, Diggable: true, DropIDs: []uint32{1067}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 16094, MaxStateID: 16173, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
BlackstoneWall = Block{ID: 759, DisplayName: "Blackstone Wall", Name: "blackstone_wall", Hardness: 1.5, Diggable: true, DropIDs: []uint32{339}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 16174, MaxStateID: 16497, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
BlackstoneSlab = Block{ID: 760, DisplayName: "Blackstone Slab", Name: "blackstone_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{1066}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 16498, MaxStateID: 16503, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PolishedBlackstone = Block{ID: 761, DisplayName: "Polished Blackstone", Name: "polished_blackstone", Hardness: 2, Diggable: true, DropIDs: []uint32{1069}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 16504, MaxStateID: 16504, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PolishedBlackstoneBricks = Block{ID: 762, DisplayName: "Polished Blackstone Bricks", Name: "polished_blackstone_bricks", Hardness: 1.5, Diggable: true, DropIDs: []uint32{1073}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 16505, MaxStateID: 16505, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CrackedPolishedBlackstoneBricks = Block{ID: 763, DisplayName: "Cracked Polished Blackstone Bricks", Name: "cracked_polished_blackstone_bricks", Hardness: 1.5, Diggable: true, DropIDs: []uint32{1076}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 16506, MaxStateID: 16506, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
ChiseledPolishedBlackstone = Block{ID: 764, DisplayName: "Chiseled Polished Blackstone", Name: "chiseled_polished_blackstone", Hardness: 1.5, Diggable: true, DropIDs: []uint32{1072}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 16507, MaxStateID: 16507, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PolishedBlackstoneBrickSlab = Block{ID: 765, DisplayName: "Polished Blackstone Brick Slab", Name: "polished_blackstone_brick_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{1074}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 16508, MaxStateID: 16513, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PolishedBlackstoneBrickStairs = Block{ID: 766, DisplayName: "Polished Blackstone Brick Stairs", Name: "polished_blackstone_brick_stairs", Hardness: 1.5, Diggable: true, DropIDs: []uint32{1075}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 16514, MaxStateID: 16593, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PolishedBlackstoneBrickWall = Block{ID: 767, DisplayName: "Polished Blackstone Brick Wall", Name: "polished_blackstone_brick_wall", Hardness: 1.5, Diggable: true, DropIDs: []uint32{341}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 701: true, 706: true, 711: true}, MinStateID: 16594, MaxStateID: 16917, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
GildedBlackstone = Block{ID: 768, DisplayName: "Gilded Blackstone", Name: "gilded_blackstone", Hardness: 1.5, Diggable: true, DropIDs: []uint32{1068}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 16918, MaxStateID: 16918, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PolishedBlackstoneStairs = Block{ID: 769, DisplayName: "Polished Blackstone Stairs", Name: "polished_blackstone_stairs", Hardness: 2, Diggable: true, DropIDs: []uint32{1071}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 16919, MaxStateID: 16998, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PolishedBlackstoneSlab = Block{ID: 770, DisplayName: "Polished Blackstone Slab", Name: "polished_blackstone_slab", Hardness: 2, Diggable: true, DropIDs: []uint32{1070}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 16999, MaxStateID: 17004, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PolishedBlackstonePressurePlate = Block{ID: 771, DisplayName: "Polished Blackstone Pressure Plate", Name: "polished_blackstone_pressure_plate", Hardness: 0.5, Diggable: true, DropIDs: []uint32{620}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 17005, MaxStateID: 17006, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PolishedBlackstoneButton = Block{ID: 772, DisplayName: "Polished Blackstone Button", Name: "polished_blackstone_button", Hardness: 0.5, Diggable: true, DropIDs: []uint32{610}, NeedsTools: map[uint32]bool{}, MinStateID: 17007, MaxStateID: 17030, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PolishedBlackstoneWall = Block{ID: 773, DisplayName: "Polished Blackstone Wall", Name: "polished_blackstone_wall", Hardness: 2, Diggable: true, DropIDs: []uint32{340}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 17031, MaxStateID: 17354, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
ChiseledNetherBricks = Block{ID: 774, DisplayName: "Chiseled Nether Bricks", Name: "chiseled_nether_bricks", Hardness: 2, Diggable: true, DropIDs: []uint32{307}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 17355, MaxStateID: 17355, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CrackedNetherBricks = Block{ID: 775, DisplayName: "Cracked Nether Bricks", Name: "cracked_nether_bricks", Hardness: 2, Diggable: true, DropIDs: []uint32{306}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 17356, MaxStateID: 17356, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
QuartzBricks = Block{ID: 776, DisplayName: "Quartz Bricks", Name: "quartz_bricks", Hardness: 0.8, Diggable: true, DropIDs: []uint32{351}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 17357, MaxStateID: 17357, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Candle = Block{ID: 777, DisplayName: "Candle", Name: "candle", Hardness: 0.1, Diggable: true, DropIDs: []uint32{1078}, NeedsTools: map[uint32]bool{}, MinStateID: 17358, MaxStateID: 17373, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
WhiteCandle = Block{ID: 778, DisplayName: "White Candle", Name: "white_candle", Hardness: 0.1, Diggable: true, DropIDs: []uint32{1079}, NeedsTools: map[uint32]bool{}, MinStateID: 17374, MaxStateID: 17389, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
OrangeCandle = Block{ID: 779, DisplayName: "Orange Candle", Name: "orange_candle", Hardness: 0.1, Diggable: true, DropIDs: []uint32{1080}, NeedsTools: map[uint32]bool{}, MinStateID: 17390, MaxStateID: 17405, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
MagentaCandle = Block{ID: 780, DisplayName: "Magenta Candle", Name: "magenta_candle", Hardness: 0.1, Diggable: true, DropIDs: []uint32{1081}, NeedsTools: map[uint32]bool{}, MinStateID: 17406, MaxStateID: 17421, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LightBlueCandle = Block{ID: 781, DisplayName: "Light Blue Candle", Name: "light_blue_candle", Hardness: 0.1, Diggable: true, DropIDs: []uint32{1082}, NeedsTools: map[uint32]bool{}, MinStateID: 17422, MaxStateID: 17437, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
YellowCandle = Block{ID: 782, DisplayName: "Yellow Candle", Name: "yellow_candle", Hardness: 0.1, Diggable: true, DropIDs: []uint32{1083}, NeedsTools: map[uint32]bool{}, MinStateID: 17438, MaxStateID: 17453, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LimeCandle = Block{ID: 783, DisplayName: "Lime Candle", Name: "lime_candle", Hardness: 0.1, Diggable: true, DropIDs: []uint32{1084}, NeedsTools: map[uint32]bool{}, MinStateID: 17454, MaxStateID: 17469, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PinkCandle = Block{ID: 784, DisplayName: "Pink Candle", Name: "pink_candle", Hardness: 0.1, Diggable: true, DropIDs: []uint32{1085}, NeedsTools: map[uint32]bool{}, MinStateID: 17470, MaxStateID: 17485, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
GrayCandle = Block{ID: 785, DisplayName: "Gray Candle", Name: "gray_candle", Hardness: 0.1, Diggable: true, DropIDs: []uint32{1086}, NeedsTools: map[uint32]bool{}, MinStateID: 17486, MaxStateID: 17501, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
LightGrayCandle = Block{ID: 786, DisplayName: "Light Gray Candle", Name: "light_gray_candle", Hardness: 0.1, Diggable: true, DropIDs: []uint32{1087}, NeedsTools: map[uint32]bool{}, MinStateID: 17502, MaxStateID: 17517, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
CyanCandle = Block{ID: 787, DisplayName: "Cyan Candle", Name: "cyan_candle", Hardness: 0.1, Diggable: true, DropIDs: []uint32{1088}, NeedsTools: map[uint32]bool{}, MinStateID: 17518, MaxStateID: 17533, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PurpleCandle = Block{ID: 788, DisplayName: "Purple Candle", Name: "purple_candle", Hardness: 0.1, Diggable: true, DropIDs: []uint32{1089}, NeedsTools: map[uint32]bool{}, MinStateID: 17534, MaxStateID: 17549, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BlueCandle = Block{ID: 789, DisplayName: "Blue Candle", Name: "blue_candle", Hardness: 0.1, Diggable: true, DropIDs: []uint32{1090}, NeedsTools: map[uint32]bool{}, MinStateID: 17550, MaxStateID: 17565, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BrownCandle = Block{ID: 790, DisplayName: "Brown Candle", Name: "brown_candle", Hardness: 0.1, Diggable: true, DropIDs: []uint32{1091}, NeedsTools: map[uint32]bool{}, MinStateID: 17566, MaxStateID: 17581, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
GreenCandle = Block{ID: 791, DisplayName: "Green Candle", Name: "green_candle", Hardness: 0.1, Diggable: true, DropIDs: []uint32{1092}, NeedsTools: map[uint32]bool{}, MinStateID: 17582, MaxStateID: 17597, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
RedCandle = Block{ID: 792, DisplayName: "Red Candle", Name: "red_candle", Hardness: 0.1, Diggable: true, DropIDs: []uint32{1093}, NeedsTools: map[uint32]bool{}, MinStateID: 17598, MaxStateID: 17613, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
BlackCandle = Block{ID: 793, DisplayName: "Black Candle", Name: "black_candle", Hardness: 0.1, Diggable: true, DropIDs: []uint32{1094}, NeedsTools: map[uint32]bool{}, MinStateID: 17614, MaxStateID: 17629, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
CandleCake = Block{ID: 794, DisplayName: "Air", Name: "candle_cake", Hardness: 0.5, Diggable: true, DropIDs: []uint32{1078}, NeedsTools: map[uint32]bool{}, MinStateID: 17630, MaxStateID: 17631, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WhiteCandleCake = Block{ID: 795, DisplayName: "Air", Name: "white_candle_cake", Hardness: 0.5, Diggable: true, DropIDs: []uint32{1079}, NeedsTools: map[uint32]bool{}, MinStateID: 17632, MaxStateID: 17633, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
OrangeCandleCake = Block{ID: 796, DisplayName: "Air", Name: "orange_candle_cake", Hardness: 0.5, Diggable: true, DropIDs: []uint32{1080}, NeedsTools: map[uint32]bool{}, MinStateID: 17634, MaxStateID: 17635, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
MagentaCandleCake = Block{ID: 797, DisplayName: "Air", Name: "magenta_candle_cake", Hardness: 0.5, Diggable: true, DropIDs: []uint32{1081}, NeedsTools: map[uint32]bool{}, MinStateID: 17636, MaxStateID: 17637, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
LightBlueCandleCake = Block{ID: 798, DisplayName: "Air", Name: "light_blue_candle_cake", Hardness: 0.5, Diggable: true, DropIDs: []uint32{1082}, NeedsTools: map[uint32]bool{}, MinStateID: 17638, MaxStateID: 17639, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
YellowCandleCake = Block{ID: 799, DisplayName: "Air", Name: "yellow_candle_cake", Hardness: 0.5, Diggable: true, DropIDs: []uint32{1083}, NeedsTools: map[uint32]bool{}, MinStateID: 17640, MaxStateID: 17641, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
LimeCandleCake = Block{ID: 800, DisplayName: "Air", Name: "lime_candle_cake", Hardness: 0.5, Diggable: true, DropIDs: []uint32{1084}, NeedsTools: map[uint32]bool{}, MinStateID: 17642, MaxStateID: 17643, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PinkCandleCake = Block{ID: 801, DisplayName: "Air", Name: "pink_candle_cake", Hardness: 0.5, Diggable: true, DropIDs: []uint32{1085}, NeedsTools: map[uint32]bool{}, MinStateID: 17644, MaxStateID: 17645, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
GrayCandleCake = Block{ID: 802, DisplayName: "Air", Name: "gray_candle_cake", Hardness: 0.5, Diggable: true, DropIDs: []uint32{1086}, NeedsTools: map[uint32]bool{}, MinStateID: 17646, MaxStateID: 17647, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
LightGrayCandleCake = Block{ID: 803, DisplayName: "Air", Name: "light_gray_candle_cake", Hardness: 0.5, Diggable: true, DropIDs: []uint32{1087}, NeedsTools: map[uint32]bool{}, MinStateID: 17648, MaxStateID: 17649, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
CyanCandleCake = Block{ID: 804, DisplayName: "Air", Name: "cyan_candle_cake", Hardness: 0.5, Diggable: true, DropIDs: []uint32{1088}, NeedsTools: map[uint32]bool{}, MinStateID: 17650, MaxStateID: 17651, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PurpleCandleCake = Block{ID: 805, DisplayName: "Air", Name: "purple_candle_cake", Hardness: 0.5, Diggable: true, DropIDs: []uint32{1089}, NeedsTools: map[uint32]bool{}, MinStateID: 17652, MaxStateID: 17653, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
BlueCandleCake = Block{ID: 806, DisplayName: "Air", Name: "blue_candle_cake", Hardness: 0.5, Diggable: true, DropIDs: []uint32{1090}, NeedsTools: map[uint32]bool{}, MinStateID: 17654, MaxStateID: 17655, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
BrownCandleCake = Block{ID: 807, DisplayName: "Air", Name: "brown_candle_cake", Hardness: 0.5, Diggable: true, DropIDs: []uint32{1091}, NeedsTools: map[uint32]bool{}, MinStateID: 17656, MaxStateID: 17657, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
GreenCandleCake = Block{ID: 808, DisplayName: "Air", Name: "green_candle_cake", Hardness: 0.5, Diggable: true, DropIDs: []uint32{1092}, NeedsTools: map[uint32]bool{}, MinStateID: 17658, MaxStateID: 17659, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
RedCandleCake = Block{ID: 809, DisplayName: "Air", Name: "red_candle_cake", Hardness: 0.5, Diggable: true, DropIDs: []uint32{1093}, NeedsTools: map[uint32]bool{}, MinStateID: 17660, MaxStateID: 17661, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
BlackCandleCake = Block{ID: 810, DisplayName: "Air", Name: "black_candle_cake", Hardness: 0.5, Diggable: true, DropIDs: []uint32{1094}, NeedsTools: map[uint32]bool{}, MinStateID: 17662, MaxStateID: 17663, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
AmethystBlock = Block{ID: 811, DisplayName: "Block of Amethyst", Name: "amethyst_block", Hardness: 1.5, Diggable: true, DropIDs: []uint32{63}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 17664, MaxStateID: 17664, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BuddingAmethyst = Block{ID: 812, DisplayName: "Budding Amethyst", Name: "budding_amethyst", Hardness: 1.5, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 17665, MaxStateID: 17665, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
AmethystCluster = Block{ID: 813, DisplayName: "Amethyst Cluster", Name: "amethyst_cluster", Hardness: 1.5, Diggable: true, DropIDs: []uint32{690}, NeedsTools: map[uint32]bool{}, MinStateID: 17666, MaxStateID: 17677, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 5}
LargeAmethystBud = Block{ID: 814, DisplayName: "Large Amethyst Bud", Name: "large_amethyst_bud", Hardness: 1.5, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 17678, MaxStateID: 17689, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 4}
MediumAmethystBud = Block{ID: 815, DisplayName: "Medium Amethyst Bud", Name: "medium_amethyst_bud", Hardness: 1.5, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 17690, MaxStateID: 17701, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 2}
SmallAmethystBud = Block{ID: 816, DisplayName: "Small Amethyst Bud", Name: "small_amethyst_bud", Hardness: 1.5, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 17702, MaxStateID: 17713, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 1}
Tuff = Block{ID: 817, DisplayName: "Tuff", Name: "tuff", Hardness: 1.5, Diggable: true, DropIDs: []uint32{12}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 17714, MaxStateID: 17714, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Calcite = Block{ID: 818, DisplayName: "Calcite", Name: "calcite", Hardness: 0.75, Diggable: true, DropIDs: []uint32{11}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 17715, MaxStateID: 17715, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
TintedGlass = Block{ID: 819, DisplayName: "Tinted Glass", Name: "tinted_glass", Hardness: 0.3, Diggable: true, DropIDs: []uint32{144}, NeedsTools: map[uint32]bool{}, MinStateID: 17716, MaxStateID: 17716, Transparent: true, FilterLightLevel: 15, EmitLightLevel: 0}
PowderSnow = Block{ID: 820, DisplayName: "Powder Snow Bucket", Name: "powder_snow", Hardness: 0.25, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 17717, MaxStateID: 17717, Transparent: false, FilterLightLevel: 1, EmitLightLevel: 0}
SculkSensor = Block{ID: 821, DisplayName: "Sculk Sensor", Name: "sculk_sensor", Hardness: 1.5, Diggable: true, DropIDs: []uint32{603}, NeedsTools: map[uint32]bool{}, MinStateID: 17718, MaxStateID: 17813, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 1}
OxidizedCopper = Block{ID: 822, DisplayName: "Oxidized Copper", Name: "oxidized_copper", Hardness: 3, Diggable: true, DropIDs: []uint32{72}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 17814, MaxStateID: 17814, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WeatheredCopper = Block{ID: 823, DisplayName: "Weathered Copper", Name: "weathered_copper", Hardness: 3, Diggable: true, DropIDs: []uint32{71}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 17815, MaxStateID: 17815, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
ExposedCopper = Block{ID: 824, DisplayName: "Exposed Copper", Name: "exposed_copper", Hardness: 3, Diggable: true, DropIDs: []uint32{70}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 17816, MaxStateID: 17816, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CopperBlock = Block{ID: 825, DisplayName: "Block of Copper", Name: "copper_block", Hardness: 3, Diggable: true, DropIDs: []uint32{66}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 17817, MaxStateID: 17817, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CopperOre = Block{ID: 826, DisplayName: "Copper Ore", Name: "copper_ore", Hardness: 3, Diggable: true, DropIDs: []uint32{693}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 706: true}, MinStateID: 17818, MaxStateID: 17818, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DeepslateCopperOre = Block{ID: 827, DisplayName: "Deepslate Copper Ore", Name: "deepslate_copper_ore", Hardness: 4.5, Diggable: true, DropIDs: []uint32{693}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 17819, MaxStateID: 17819, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
OxidizedCutCopper = Block{ID: 828, DisplayName: "Oxidized Cut Copper", Name: "oxidized_cut_copper", Hardness: 3, Diggable: true, DropIDs: []uint32{76}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 17820, MaxStateID: 17820, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WeatheredCutCopper = Block{ID: 829, DisplayName: "Weathered Cut Copper", Name: "weathered_cut_copper", Hardness: 3, Diggable: true, DropIDs: []uint32{75}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 17821, MaxStateID: 17821, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
ExposedCutCopper = Block{ID: 830, DisplayName: "Exposed Cut Copper", Name: "exposed_cut_copper", Hardness: 3, Diggable: true, DropIDs: []uint32{74}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 17822, MaxStateID: 17822, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CutCopper = Block{ID: 831, DisplayName: "Cut Copper", Name: "cut_copper", Hardness: 3, Diggable: true, DropIDs: []uint32{73}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 17823, MaxStateID: 17823, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
OxidizedCutCopperStairs = Block{ID: 832, DisplayName: "Oxidized Cut Copper Stairs", Name: "oxidized_cut_copper_stairs", Hardness: 3, Diggable: true, DropIDs: []uint32{80}, NeedsTools: map[uint32]bool{721: true, 726: true, 706: true, 716: true}, MinStateID: 17824, MaxStateID: 17903, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WeatheredCutCopperStairs = Block{ID: 833, DisplayName: "Weathered Cut Copper Stairs", Name: "weathered_cut_copper_stairs", Hardness: 3, Diggable: true, DropIDs: []uint32{79}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 17904, MaxStateID: 17983, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
ExposedCutCopperStairs = Block{ID: 834, DisplayName: "Exposed Cut Copper Stairs", Name: "exposed_cut_copper_stairs", Hardness: 3, Diggable: true, DropIDs: []uint32{78}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 17984, MaxStateID: 18063, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
CutCopperStairs = Block{ID: 835, DisplayName: "Cut Copper Stairs", Name: "cut_copper_stairs", Hardness: 3, Diggable: true, DropIDs: []uint32{77}, NeedsTools: map[uint32]bool{721: true, 726: true, 706: true, 716: true}, MinStateID: 18064, MaxStateID: 18143, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
OxidizedCutCopperSlab = Block{ID: 836, DisplayName: "Oxidized Cut Copper Slab", Name: "oxidized_cut_copper_slab", Hardness: 3, Diggable: true, DropIDs: []uint32{84}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 706: true}, MinStateID: 18144, MaxStateID: 18149, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WeatheredCutCopperSlab = Block{ID: 837, DisplayName: "Weathered Cut Copper Slab", Name: "weathered_cut_copper_slab", Hardness: 3, Diggable: true, DropIDs: []uint32{83}, NeedsTools: map[uint32]bool{721: true, 726: true, 706: true, 716: true}, MinStateID: 18150, MaxStateID: 18155, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
ExposedCutCopperSlab = Block{ID: 838, DisplayName: "Exposed Cut Copper Slab", Name: "exposed_cut_copper_slab", Hardness: 3, Diggable: true, DropIDs: []uint32{82}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 706: true}, MinStateID: 18156, MaxStateID: 18161, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
CutCopperSlab = Block{ID: 839, DisplayName: "Cut Copper Slab", Name: "cut_copper_slab", Hardness: 3, Diggable: true, DropIDs: []uint32{81}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 18162, MaxStateID: 18167, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WaxedCopperBlock = Block{ID: 840, DisplayName: "Waxed Block of Copper", Name: "waxed_copper_block", Hardness: 3, Diggable: true, DropIDs: []uint32{85}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 18168, MaxStateID: 18168, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WaxedWeatheredCopper = Block{ID: 841, DisplayName: "Waxed Weathered Copper", Name: "waxed_weathered_copper", Hardness: 3, Diggable: true, DropIDs: []uint32{87}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 18169, MaxStateID: 18169, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WaxedExposedCopper = Block{ID: 842, DisplayName: "Waxed Exposed Copper", Name: "waxed_exposed_copper", Hardness: 3, Diggable: true, DropIDs: []uint32{86}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 706: true}, MinStateID: 18170, MaxStateID: 18170, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WaxedOxidizedCopper = Block{ID: 843, DisplayName: "Waxed Oxidized Copper", Name: "waxed_oxidized_copper", Hardness: 3, Diggable: true, DropIDs: []uint32{88}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 18171, MaxStateID: 18171, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WaxedOxidizedCutCopper = Block{ID: 844, DisplayName: "Waxed Oxidized Cut Copper", Name: "waxed_oxidized_cut_copper", Hardness: 3, Diggable: true, DropIDs: []uint32{92}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 18172, MaxStateID: 18172, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WaxedWeatheredCutCopper = Block{ID: 845, DisplayName: "Waxed Weathered Cut Copper", Name: "waxed_weathered_cut_copper", Hardness: 3, Diggable: true, DropIDs: []uint32{91}, NeedsTools: map[uint32]bool{721: true, 726: true, 706: true, 716: true}, MinStateID: 18173, MaxStateID: 18173, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WaxedExposedCutCopper = Block{ID: 846, DisplayName: "Waxed Exposed Cut Copper", Name: "waxed_exposed_cut_copper", Hardness: 3, Diggable: true, DropIDs: []uint32{90}, NeedsTools: map[uint32]bool{726: true, 706: true, 716: true, 721: true}, MinStateID: 18174, MaxStateID: 18174, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WaxedCutCopper = Block{ID: 847, DisplayName: "Waxed Cut Copper", Name: "waxed_cut_copper", Hardness: 3, Diggable: true, DropIDs: []uint32{89}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 18175, MaxStateID: 18175, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
WaxedOxidizedCutCopperStairs = Block{ID: 848, DisplayName: "Waxed Oxidized Cut Copper Stairs", Name: "waxed_oxidized_cut_copper_stairs", Hardness: 3, Diggable: true, DropIDs: []uint32{96}, NeedsTools: map[uint32]bool{726: true, 706: true, 716: true, 721: true}, MinStateID: 18176, MaxStateID: 18255, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WaxedWeatheredCutCopperStairs = Block{ID: 849, DisplayName: "Waxed Weathered Cut Copper Stairs", Name: "waxed_weathered_cut_copper_stairs", Hardness: 3, Diggable: true, DropIDs: []uint32{95}, NeedsTools: map[uint32]bool{721: true, 726: true, 706: true, 716: true}, MinStateID: 18256, MaxStateID: 18335, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WaxedExposedCutCopperStairs = Block{ID: 850, DisplayName: "Waxed Exposed Cut Copper Stairs", Name: "waxed_exposed_cut_copper_stairs", Hardness: 3, Diggable: true, DropIDs: []uint32{94}, NeedsTools: map[uint32]bool{726: true, 706: true, 716: true, 721: true}, MinStateID: 18336, MaxStateID: 18415, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WaxedCutCopperStairs = Block{ID: 851, DisplayName: "Waxed Cut Copper Stairs", Name: "waxed_cut_copper_stairs", Hardness: 3, Diggable: true, DropIDs: []uint32{93}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 18416, MaxStateID: 18495, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WaxedOxidizedCutCopperSlab = Block{ID: 852, DisplayName: "Waxed Oxidized Cut Copper Slab", Name: "waxed_oxidized_cut_copper_slab", Hardness: 3, Diggable: true, DropIDs: []uint32{100}, NeedsTools: map[uint32]bool{726: true, 706: true, 716: true, 721: true}, MinStateID: 18496, MaxStateID: 18501, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WaxedWeatheredCutCopperSlab = Block{ID: 853, DisplayName: "Waxed Weathered Cut Copper Slab", Name: "waxed_weathered_cut_copper_slab", Hardness: 3, Diggable: true, DropIDs: []uint32{99}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 706: true}, MinStateID: 18502, MaxStateID: 18507, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WaxedExposedCutCopperSlab = Block{ID: 854, DisplayName: "Waxed Exposed Cut Copper Slab", Name: "waxed_exposed_cut_copper_slab", Hardness: 3, Diggable: true, DropIDs: []uint32{98}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 18508, MaxStateID: 18513, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
WaxedCutCopperSlab = Block{ID: 855, DisplayName: "Waxed Cut Copper Slab", Name: "waxed_cut_copper_slab", Hardness: 3, Diggable: true, DropIDs: []uint32{97}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 18514, MaxStateID: 18519, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
LightningRod = Block{ID: 856, DisplayName: "Lightning Rod", Name: "lightning_rod", Hardness: 3, Diggable: true, DropIDs: []uint32{601}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 706: true}, MinStateID: 18520, MaxStateID: 18543, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PointedDripstone = Block{ID: 857, DisplayName: "Pointed Dripstone", Name: "pointed_dripstone", Hardness: 1.5, Diggable: true, DropIDs: []uint32{1099}, NeedsTools: map[uint32]bool{}, MinStateID: 18544, MaxStateID: 18563, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
DripstoneBlock = Block{ID: 858, DisplayName: "Dripstone Block", Name: "dripstone_block", Hardness: 1.5, Diggable: true, DropIDs: []uint32{13}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 18564, MaxStateID: 18564, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CaveVines = Block{ID: 859, DisplayName: "Glow Berries", Name: "cave_vines", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 18565, MaxStateID: 18616, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
CaveVinesPlant = Block{ID: 860, DisplayName: "Air", Name: "cave_vines_plant", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 18617, MaxStateID: 18618, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
SporeBlossom = Block{ID: 861, DisplayName: "Spore Blossom", Name: "spore_blossom", Hardness: 0, Diggable: true, DropIDs: []uint32{186}, NeedsTools: map[uint32]bool{}, MinStateID: 18619, MaxStateID: 18619, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
Azalea = Block{ID: 862, DisplayName: "Azalea", Name: "azalea", Hardness: 0, Diggable: true, DropIDs: []uint32{152}, NeedsTools: map[uint32]bool{}, MinStateID: 18620, MaxStateID: 18620, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
FloweringAzalea = Block{ID: 863, DisplayName: "Flowering Azalea", Name: "flowering_azalea", Hardness: 0, Diggable: true, DropIDs: []uint32{153}, NeedsTools: map[uint32]bool{}, MinStateID: 18621, MaxStateID: 18621, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
MossCarpet = Block{ID: 864, DisplayName: "Moss Carpet", Name: "moss_carpet", Hardness: 0.1, Diggable: true, DropIDs: []uint32{198}, NeedsTools: map[uint32]bool{}, MinStateID: 18622, MaxStateID: 18622, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
MossBlock = Block{ID: 865, DisplayName: "Moss Block", Name: "moss_block", Hardness: 0.1, Diggable: true, DropIDs: []uint32{199}, NeedsTools: map[uint32]bool{}, MinStateID: 18623, MaxStateID: 18623, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
BigDripleaf = Block{ID: 866, DisplayName: "Big Dripleaf", Name: "big_dripleaf", Hardness: 0.1, Diggable: true, DropIDs: []uint32{201}, NeedsTools: map[uint32]bool{}, MinStateID: 18624, MaxStateID: 18655, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
BigDripleafStem = Block{ID: 867, DisplayName: "Air", Name: "big_dripleaf_stem", Hardness: 0.1, Diggable: true, DropIDs: []uint32{201}, NeedsTools: map[uint32]bool{}, MinStateID: 18656, MaxStateID: 18663, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
SmallDripleaf = Block{ID: 868, DisplayName: "Small Dripleaf", Name: "small_dripleaf", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 18664, MaxStateID: 18679, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
HangingRoots = Block{ID: 869, DisplayName: "Hanging Roots", Name: "hanging_roots", Hardness: 0, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 18680, MaxStateID: 18681, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
RootedDirt = Block{ID: 870, DisplayName: "Rooted Dirt", Name: "rooted_dirt", Hardness: 0.5, Diggable: true, DropIDs: []uint32{18}, NeedsTools: map[uint32]bool{}, MinStateID: 18682, MaxStateID: 18682, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
Deepslate = Block{ID: 871, DisplayName: "Deepslate", Name: "deepslate", Hardness: 3, Diggable: true, DropIDs: []uint32{9}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 18683, MaxStateID: 18685, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CobbledDeepslate = Block{ID: 872, DisplayName: "Cobbled Deepslate", Name: "cobbled_deepslate", Hardness: 3.5, Diggable: true, DropIDs: []uint32{9}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 18686, MaxStateID: 18686, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CobbledDeepslateStairs = Block{ID: 873, DisplayName: "Cobbled Deepslate Stairs", Name: "cobbled_deepslate_stairs", Hardness: 3.5, Diggable: true, DropIDs: []uint32{563}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 18687, MaxStateID: 18766, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
CobbledDeepslateSlab = Block{ID: 874, DisplayName: "Cobbled Deepslate Slab", Name: "cobbled_deepslate_slab", Hardness: 3.5, Diggable: true, DropIDs: []uint32{580}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 18767, MaxStateID: 18772, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
CobbledDeepslateWall = Block{ID: 875, DisplayName: "Cobbled Deepslate Wall", Name: "cobbled_deepslate_wall", Hardness: 3.5, Diggable: true, DropIDs: []uint32{342}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 18773, MaxStateID: 19096, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PolishedDeepslate = Block{ID: 876, DisplayName: "Polished Deepslate", Name: "polished_deepslate", Hardness: 3.5, Diggable: true, DropIDs: []uint32{10}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 19097, MaxStateID: 19097, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PolishedDeepslateStairs = Block{ID: 877, DisplayName: "Polished Deepslate Stairs", Name: "polished_deepslate_stairs", Hardness: 3.5, Diggable: true, DropIDs: []uint32{564}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 19098, MaxStateID: 19177, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PolishedDeepslateSlab = Block{ID: 878, DisplayName: "Polished Deepslate Slab", Name: "polished_deepslate_slab", Hardness: 3.5, Diggable: true, DropIDs: []uint32{581}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 19178, MaxStateID: 19183, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
PolishedDeepslateWall = Block{ID: 879, DisplayName: "Polished Deepslate Wall", Name: "polished_deepslate_wall", Hardness: 3.5, Diggable: true, DropIDs: []uint32{343}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 19184, MaxStateID: 19507, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DeepslateTiles = Block{ID: 880, DisplayName: "Deepslate Tiles", Name: "deepslate_tiles", Hardness: 3.5, Diggable: true, DropIDs: []uint32{289}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 19508, MaxStateID: 19508, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DeepslateTileStairs = Block{ID: 881, DisplayName: "Deepslate Tile Stairs", Name: "deepslate_tile_stairs", Hardness: 3.5, Diggable: true, DropIDs: []uint32{566}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 19509, MaxStateID: 19588, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DeepslateTileSlab = Block{ID: 882, DisplayName: "Deepslate Tile Slab", Name: "deepslate_tile_slab", Hardness: 3.5, Diggable: true, DropIDs: []uint32{583}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 19589, MaxStateID: 19594, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DeepslateTileWall = Block{ID: 883, DisplayName: "Deepslate Tile Wall", Name: "deepslate_tile_wall", Hardness: 3.5, Diggable: true, DropIDs: []uint32{345}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 19595, MaxStateID: 19918, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DeepslateBricks = Block{ID: 884, DisplayName: "Deepslate Bricks", Name: "deepslate_bricks", Hardness: 3.5, Diggable: true, DropIDs: []uint32{287}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 19919, MaxStateID: 19919, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
DeepslateBrickStairs = Block{ID: 885, DisplayName: "Deepslate Brick Stairs", Name: "deepslate_brick_stairs", Hardness: 3.5, Diggable: true, DropIDs: []uint32{565}, NeedsTools: map[uint32]bool{721: true, 726: true, 701: true, 706: true, 711: true, 716: true}, MinStateID: 19920, MaxStateID: 19999, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DeepslateBrickSlab = Block{ID: 886, DisplayName: "Deepslate Brick Slab", Name: "deepslate_brick_slab", Hardness: 3.5, Diggable: true, DropIDs: []uint32{582}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 20000, MaxStateID: 20005, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
DeepslateBrickWall = Block{ID: 887, DisplayName: "Deepslate Brick Wall", Name: "deepslate_brick_wall", Hardness: 3.5, Diggable: true, DropIDs: []uint32{344}, NeedsTools: map[uint32]bool{701: true, 706: true, 711: true, 716: true, 721: true, 726: true}, MinStateID: 20006, MaxStateID: 20329, Transparent: false, FilterLightLevel: 0, EmitLightLevel: 0}
ChiseledDeepslate = Block{ID: 888, DisplayName: "Chiseled Deepslate", Name: "chiseled_deepslate", Hardness: 3.5, Diggable: true, DropIDs: []uint32{291}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 20330, MaxStateID: 20330, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CrackedDeepslateBricks = Block{ID: 889, DisplayName: "Cracked Deepslate Bricks", Name: "cracked_deepslate_bricks", Hardness: 3.5, Diggable: true, DropIDs: []uint32{288}, NeedsTools: map[uint32]bool{711: true, 716: true, 721: true, 726: true, 701: true, 706: true}, MinStateID: 20331, MaxStateID: 20331, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
CrackedDeepslateTiles = Block{ID: 890, DisplayName: "Cracked Deepslate Tiles", Name: "cracked_deepslate_tiles", Hardness: 3.5, Diggable: true, DropIDs: []uint32{290}, NeedsTools: map[uint32]bool{706: true, 711: true, 716: true, 721: true, 726: true, 701: true}, MinStateID: 20332, MaxStateID: 20332, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
InfestedDeepslate = Block{ID: 891, DisplayName: "Infested Deepslate", Name: "infested_deepslate", Hardness: 1.5, Diggable: true, DropIDs: []uint32{}, NeedsTools: map[uint32]bool{}, MinStateID: 20333, MaxStateID: 20335, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
SmoothBasalt = Block{ID: 892, DisplayName: "Smooth Basalt", Name: "smooth_basalt", Hardness: 1.25, Diggable: true, DropIDs: []uint32{273}, NeedsTools: map[uint32]bool{726: true, 701: true, 706: true, 711: true, 716: true, 721: true}, MinStateID: 20336, MaxStateID: 20336, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
RawIronBlock = Block{ID: 893, DisplayName: "Block of Raw Iron", Name: "raw_iron_block", Hardness: 5, Diggable: true, DropIDs: []uint32{60}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true, 706: true}, MinStateID: 20337, MaxStateID: 20337, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
RawCopperBlock = Block{ID: 894, DisplayName: "Block of Raw Copper", Name: "raw_copper_block", Hardness: 5, Diggable: true, DropIDs: []uint32{61}, NeedsTools: map[uint32]bool{706: true, 716: true, 721: true, 726: true}, MinStateID: 20338, MaxStateID: 20338, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
RawGoldBlock = Block{ID: 895, DisplayName: "Block of Raw Gold", Name: "raw_gold_block", Hardness: 5, Diggable: true, DropIDs: []uint32{62}, NeedsTools: map[uint32]bool{716: true, 721: true, 726: true}, MinStateID: 20339, MaxStateID: 20339, Transparent: false, FilterLightLevel: 15, EmitLightLevel: 0}
PottedAzaleaBush = Block{ID: 896, DisplayName: "Air", Name: "potted_azalea_bush", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 152}, NeedsTools: map[uint32]bool{}, MinStateID: 20340, MaxStateID: 20340, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
PottedFloweringAzaleaBush = Block{ID: 897, DisplayName: "Air", Name: "potted_flowering_azalea_bush", Hardness: 0, Diggable: true, DropIDs: []uint32{946, 153}, NeedsTools: map[uint32]bool{}, MinStateID: 20341, MaxStateID: 20341, Transparent: true, FilterLightLevel: 0, EmitLightLevel: 0}
)
// ByID is an index of minecraft blocks by their ID.
var ByID = map[ID]*Block{
0: &Air,
1: &Stone,
2: &Granite,
3: &PolishedGranite,
4: &Diorite,
5: &PolishedDiorite,
6: &Andesite,
7: &PolishedAndesite,
8: &GrassBlock,
9: &Dirt,
10: &CoarseDirt,
11: &Podzol,
12: &Cobblestone,
13: &OakPlanks,
14: &SprucePlanks,
15: &BirchPlanks,
16: &JunglePlanks,
17: &AcaciaPlanks,
18: &DarkOakPlanks,
19: &OakSapling,
20: &SpruceSapling,
21: &BirchSapling,
22: &JungleSapling,
23: &AcaciaSapling,
24: &DarkOakSapling,
25: &Bedrock,
26: &Water,
27: &Lava,
28: &Sand,
29: &RedSand,
30: &Gravel,
31: &GoldOre,
32: &DeepslateGoldOre,
33: &IronOre,
34: &DeepslateIronOre,
35: &CoalOre,
36: &DeepslateCoalOre,
37: &NetherGoldOre,
38: &OakLog,
39: &SpruceLog,
40: &BirchLog,
41: &JungleLog,
42: &AcaciaLog,
43: &DarkOakLog,
44: &StrippedSpruceLog,
45: &StrippedBirchLog,
46: &StrippedJungleLog,
47: &StrippedAcaciaLog,
48: &StrippedDarkOakLog,
49: &StrippedOakLog,
50: &OakWood,
51: &SpruceWood,
52: &BirchWood,
53: &JungleWood,
54: &AcaciaWood,
55: &DarkOakWood,
56: &StrippedOakWood,
57: &StrippedSpruceWood,
58: &StrippedBirchWood,
59: &StrippedJungleWood,
60: &StrippedAcaciaWood,
61: &StrippedDarkOakWood,
62: &OakLeaves,
63: &SpruceLeaves,
64: &BirchLeaves,
65: &JungleLeaves,
66: &AcaciaLeaves,
67: &DarkOakLeaves,
68: &AzaleaLeaves,
69: &FloweringAzaleaLeaves,
70: &Sponge,
71: &WetSponge,
72: &Glass,
73: &LapisOre,
74: &DeepslateLapisOre,
75: &LapisBlock,
76: &Dispenser,
77: &Sandstone,
78: &ChiseledSandstone,
79: &CutSandstone,
80: &NoteBlock,
81: &WhiteBed,
82: &OrangeBed,
83: &MagentaBed,
84: &LightBlueBed,
85: &YellowBed,
86: &LimeBed,
87: &PinkBed,
88: &GrayBed,
89: &LightGrayBed,
90: &CyanBed,
91: &PurpleBed,
92: &BlueBed,
93: &BrownBed,
94: &GreenBed,
95: &RedBed,
96: &BlackBed,
97: &PoweredRail,
98: &DetectorRail,
99: &StickyPiston,
100: &Cobweb,
101: &Grass,
102: &Fern,
103: &DeadBush,
104: &Seagrass,
105: &TallSeagrass,
106: &Piston,
107: &PistonHead,
108: &WhiteWool,
109: &OrangeWool,
110: &MagentaWool,
111: &LightBlueWool,
112: &YellowWool,
113: &LimeWool,
114: &PinkWool,
115: &GrayWool,
116: &LightGrayWool,
117: &CyanWool,
118: &PurpleWool,
119: &BlueWool,
120: &BrownWool,
121: &GreenWool,
122: &RedWool,
123: &BlackWool,
124: &MovingPiston,
125: &Dandelion,
126: &Poppy,
127: &BlueOrchid,
128: &Allium,
129: &AzureBluet,
130: &RedTulip,
131: &OrangeTulip,
132: &WhiteTulip,
133: &PinkTulip,
134: &OxeyeDaisy,
135: &Cornflower,
136: &WitherRose,
137: &LilyOfTheValley,
138: &BrownMushroom,
139: &RedMushroom,
140: &GoldBlock,
141: &IronBlock,
142: &Bricks,
143: &Tnt,
144: &Bookshelf,
145: &MossyCobblestone,
146: &Obsidian,
147: &Torch,
148: &WallTorch,
149: &Fire,
150: &SoulFire,
151: &Spawner,
152: &OakStairs,
153: &Chest,
154: &RedstoneWire,
155: &DiamondOre,
156: &DeepslateDiamondOre,
157: &DiamondBlock,
158: &CraftingTable,
159: &Wheat,
160: &Farmland,
161: &Furnace,
162: &OakSign,
163: &SpruceSign,
164: &BirchSign,
165: &AcaciaSign,
166: &JungleSign,
167: &DarkOakSign,
168: &OakDoor,
169: &Ladder,
170: &Rail,
171: &CobblestoneStairs,
172: &OakWallSign,
173: &SpruceWallSign,
174: &BirchWallSign,
175: &AcaciaWallSign,
176: &JungleWallSign,
177: &DarkOakWallSign,
178: &Lever,
179: &StonePressurePlate,
180: &IronDoor,
181: &OakPressurePlate,
182: &SprucePressurePlate,
183: &BirchPressurePlate,
184: &JunglePressurePlate,
185: &AcaciaPressurePlate,
186: &DarkOakPressurePlate,
187: &RedstoneOre,
188: &DeepslateRedstoneOre,
189: &RedstoneTorch,
190: &RedstoneWallTorch,
191: &StoneButton,
192: &Snow,
193: &Ice,
194: &SnowBlock,
195: &Cactus,
196: &Clay,
197: &SugarCane,
198: &Jukebox,
199: &OakFence,
200: &Pumpkin,
201: &Netherrack,
202: &SoulSand,
203: &SoulSoil,
204: &Basalt,
205: &PolishedBasalt,
206: &SoulTorch,
207: &SoulWallTorch,
208: &Glowstone,
209: &NetherPortal,
210: &CarvedPumpkin,
211: &JackOLantern,
212: &Cake,
213: &Repeater,
214: &WhiteStainedGlass,
215: &OrangeStainedGlass,
216: &MagentaStainedGlass,
217: &LightBlueStainedGlass,
218: &YellowStainedGlass,
219: &LimeStainedGlass,
220: &PinkStainedGlass,
221: &GrayStainedGlass,
222: &LightGrayStainedGlass,
223: &CyanStainedGlass,
224: &PurpleStainedGlass,
225: &BlueStainedGlass,
226: &BrownStainedGlass,
227: &GreenStainedGlass,
228: &RedStainedGlass,
229: &BlackStainedGlass,
230: &OakTrapdoor,
231: &SpruceTrapdoor,
232: &BirchTrapdoor,
233: &JungleTrapdoor,
234: &AcaciaTrapdoor,
235: &DarkOakTrapdoor,
236: &StoneBricks,
237: &MossyStoneBricks,
238: &CrackedStoneBricks,
239: &ChiseledStoneBricks,
240: &InfestedStone,
241: &InfestedCobblestone,
242: &InfestedStoneBricks,
243: &InfestedMossyStoneBricks,
244: &InfestedCrackedStoneBricks,
245: &InfestedChiseledStoneBricks,
246: &BrownMushroomBlock,
247: &RedMushroomBlock,
248: &MushroomStem,
249: &IronBars,
250: &Chain,
251: &GlassPane,
252: &Melon,
253: &AttachedPumpkinStem,
254: &AttachedMelonStem,
255: &PumpkinStem,
256: &MelonStem,
257: &Vine,
258: &GlowLichen,
259: &OakFenceGate,
260: &BrickStairs,
261: &StoneBrickStairs,
262: &Mycelium,
263: &LilyPad,
264: &NetherBricks,
265: &NetherBrickFence,
266: &NetherBrickStairs,
267: &NetherWart,
268: &EnchantingTable,
269: &BrewingStand,
270: &Cauldron,
271: &WaterCauldron,
272: &LavaCauldron,
273: &PowderSnowCauldron,
274: &EndPortal,
275: &EndPortalFrame,
276: &EndStone,
277: &DragonEgg,
278: &RedstoneLamp,
279: &Cocoa,
280: &SandstoneStairs,
281: &EmeraldOre,
282: &DeepslateEmeraldOre,
283: &EnderChest,
284: &TripwireHook,
285: &Tripwire,
286: &EmeraldBlock,
287: &SpruceStairs,
288: &BirchStairs,
289: &JungleStairs,
290: &CommandBlock,
291: &Beacon,
292: &CobblestoneWall,
293: &MossyCobblestoneWall,
294: &FlowerPot,
295: &PottedOakSapling,
296: &PottedSpruceSapling,
297: &PottedBirchSapling,
298: &PottedJungleSapling,
299: &PottedAcaciaSapling,
300: &PottedDarkOakSapling,
301: &PottedFern,
302: &PottedDandelion,
303: &PottedPoppy,
304: &PottedBlueOrchid,
305: &PottedAllium,
306: &PottedAzureBluet,
307: &PottedRedTulip,
308: &PottedOrangeTulip,
309: &PottedWhiteTulip,
310: &PottedPinkTulip,
311: &PottedOxeyeDaisy,
312: &PottedCornflower,
313: &PottedLilyOfTheValley,
314: &PottedWitherRose,
315: &PottedRedMushroom,
316: &PottedBrownMushroom,
317: &PottedDeadBush,
318: &PottedCactus,
319: &Carrots,
320: &Potatoes,
321: &OakButton,
322: &SpruceButton,
323: &BirchButton,
324: &JungleButton,
325: &AcaciaButton,
326: &DarkOakButton,
327: &SkeletonSkull,
328: &SkeletonWallSkull,
329: &WitherSkeletonSkull,
330: &WitherSkeletonWallSkull,
331: &ZombieHead,
332: &ZombieWallHead,
333: &PlayerHead,
334: &PlayerWallHead,
335: &CreeperHead,
336: &CreeperWallHead,
337: &DragonHead,
338: &DragonWallHead,
339: &Anvil,
340: &ChippedAnvil,
341: &DamagedAnvil,
342: &TrappedChest,
343: &LightWeightedPressurePlate,
344: &HeavyWeightedPressurePlate,
345: &Comparator,
346: &DaylightDetector,
347: &RedstoneBlock,
348: &NetherQuartzOre,
349: &Hopper,
350: &QuartzBlock,
351: &ChiseledQuartzBlock,
352: &QuartzPillar,
353: &QuartzStairs,
354: &ActivatorRail,
355: &Dropper,
356: &WhiteTerracotta,
357: &OrangeTerracotta,
358: &MagentaTerracotta,
359: &LightBlueTerracotta,
360: &YellowTerracotta,
361: &LimeTerracotta,
362: &PinkTerracotta,
363: &GrayTerracotta,
364: &LightGrayTerracotta,
365: &CyanTerracotta,
366: &PurpleTerracotta,
367: &BlueTerracotta,
368: &BrownTerracotta,
369: &GreenTerracotta,
370: &RedTerracotta,
371: &BlackTerracotta,
372: &WhiteStainedGlassPane,
373: &OrangeStainedGlassPane,
374: &MagentaStainedGlassPane,
375: &LightBlueStainedGlassPane,
376: &YellowStainedGlassPane,
377: &LimeStainedGlassPane,
378: &PinkStainedGlassPane,
379: &GrayStainedGlassPane,
380: &LightGrayStainedGlassPane,
381: &CyanStainedGlassPane,
382: &PurpleStainedGlassPane,
383: &BlueStainedGlassPane,
384: &BrownStainedGlassPane,
385: &GreenStainedGlassPane,
386: &RedStainedGlassPane,
387: &BlackStainedGlassPane,
388: &AcaciaStairs,
389: &DarkOakStairs,
390: &SlimeBlock,
391: &Barrier,
392: &Light,
393: &IronTrapdoor,
394: &Prismarine,
395: &PrismarineBricks,
396: &DarkPrismarine,
397: &PrismarineStairs,
398: &PrismarineBrickStairs,
399: &DarkPrismarineStairs,
400: &PrismarineSlab,
401: &PrismarineBrickSlab,
402: &DarkPrismarineSlab,
403: &SeaLantern,
404: &HayBlock,
405: &WhiteCarpet,
406: &OrangeCarpet,
407: &MagentaCarpet,
408: &LightBlueCarpet,
409: &YellowCarpet,
410: &LimeCarpet,
411: &PinkCarpet,
412: &GrayCarpet,
413: &LightGrayCarpet,
414: &CyanCarpet,
415: &PurpleCarpet,
416: &BlueCarpet,
417: &BrownCarpet,
418: &GreenCarpet,
419: &RedCarpet,
420: &BlackCarpet,
421: &Terracotta,
422: &CoalBlock,
423: &PackedIce,
424: &Sunflower,
425: &Lilac,
426: &RoseBush,
427: &Peony,
428: &TallGrass,
429: &LargeFern,
430: &WhiteBanner,
431: &OrangeBanner,
432: &MagentaBanner,
433: &LightBlueBanner,
434: &YellowBanner,
435: &LimeBanner,
436: &PinkBanner,
437: &GrayBanner,
438: &LightGrayBanner,
439: &CyanBanner,
440: &PurpleBanner,
441: &BlueBanner,
442: &BrownBanner,
443: &GreenBanner,
444: &RedBanner,
445: &BlackBanner,
446: &WhiteWallBanner,
447: &OrangeWallBanner,
448: &MagentaWallBanner,
449: &LightBlueWallBanner,
450: &YellowWallBanner,
451: &LimeWallBanner,
452: &PinkWallBanner,
453: &GrayWallBanner,
454: &LightGrayWallBanner,
455: &CyanWallBanner,
456: &PurpleWallBanner,
457: &BlueWallBanner,
458: &BrownWallBanner,
459: &GreenWallBanner,
460: &RedWallBanner,
461: &BlackWallBanner,
462: &RedSandstone,
463: &ChiseledRedSandstone,
464: &CutRedSandstone,
465: &RedSandstoneStairs,
466: &OakSlab,
467: &SpruceSlab,
468: &BirchSlab,
469: &JungleSlab,
470: &AcaciaSlab,
471: &DarkOakSlab,
472: &StoneSlab,
473: &SmoothStoneSlab,
474: &SandstoneSlab,
475: &CutSandstoneSlab,
476: &PetrifiedOakSlab,
477: &CobblestoneSlab,
478: &BrickSlab,
479: &StoneBrickSlab,
480: &NetherBrickSlab,
481: &QuartzSlab,
482: &RedSandstoneSlab,
483: &CutRedSandstoneSlab,
484: &PurpurSlab,
485: &SmoothStone,
486: &SmoothSandstone,
487: &SmoothQuartz,
488: &SmoothRedSandstone,
489: &SpruceFenceGate,
490: &BirchFenceGate,
491: &JungleFenceGate,
492: &AcaciaFenceGate,
493: &DarkOakFenceGate,
494: &SpruceFence,
495: &BirchFence,
496: &JungleFence,
497: &AcaciaFence,
498: &DarkOakFence,
499: &SpruceDoor,
500: &BirchDoor,
501: &JungleDoor,
502: &AcaciaDoor,
503: &DarkOakDoor,
504: &EndRod,
505: &ChorusPlant,
506: &ChorusFlower,
507: &PurpurBlock,
508: &PurpurPillar,
509: &PurpurStairs,
510: &EndStoneBricks,
511: &Beetroots,
512: &DirtPath,
513: &EndGateway,
514: &RepeatingCommandBlock,
515: &ChainCommandBlock,
516: &FrostedIce,
517: &MagmaBlock,
518: &NetherWartBlock,
519: &RedNetherBricks,
520: &BoneBlock,
521: &StructureVoid,
522: &Observer,
523: &ShulkerBox,
524: &WhiteShulkerBox,
525: &OrangeShulkerBox,
526: &MagentaShulkerBox,
527: &LightBlueShulkerBox,
528: &YellowShulkerBox,
529: &LimeShulkerBox,
530: &PinkShulkerBox,
531: &GrayShulkerBox,
532: &LightGrayShulkerBox,
533: &CyanShulkerBox,
534: &PurpleShulkerBox,
535: &BlueShulkerBox,
536: &BrownShulkerBox,
537: &GreenShulkerBox,
538: &RedShulkerBox,
539: &BlackShulkerBox,
540: &WhiteGlazedTerracotta,
541: &OrangeGlazedTerracotta,
542: &MagentaGlazedTerracotta,
543: &LightBlueGlazedTerracotta,
544: &YellowGlazedTerracotta,
545: &LimeGlazedTerracotta,
546: &PinkGlazedTerracotta,
547: &GrayGlazedTerracotta,
548: &LightGrayGlazedTerracotta,
549: &CyanGlazedTerracotta,
550: &PurpleGlazedTerracotta,
551: &BlueGlazedTerracotta,
552: &BrownGlazedTerracotta,
553: &GreenGlazedTerracotta,
554: &RedGlazedTerracotta,
555: &BlackGlazedTerracotta,
556: &WhiteConcrete,
557: &OrangeConcrete,
558: &MagentaConcrete,
559: &LightBlueConcrete,
560: &YellowConcrete,
561: &LimeConcrete,
562: &PinkConcrete,
563: &GrayConcrete,
564: &LightGrayConcrete,
565: &CyanConcrete,
566: &PurpleConcrete,
567: &BlueConcrete,
568: &BrownConcrete,
569: &GreenConcrete,
570: &RedConcrete,
571: &BlackConcrete,
572: &WhiteConcretePowder,
573: &OrangeConcretePowder,
574: &MagentaConcretePowder,
575: &LightBlueConcretePowder,
576: &YellowConcretePowder,
577: &LimeConcretePowder,
578: &PinkConcretePowder,
579: &GrayConcretePowder,
580: &LightGrayConcretePowder,
581: &CyanConcretePowder,
582: &PurpleConcretePowder,
583: &BlueConcretePowder,
584: &BrownConcretePowder,
585: &GreenConcretePowder,
586: &RedConcretePowder,
587: &BlackConcretePowder,
588: &Kelp,
589: &KelpPlant,
590: &DriedKelpBlock,
591: &TurtleEgg,
592: &DeadTubeCoralBlock,
593: &DeadBrainCoralBlock,
594: &DeadBubbleCoralBlock,
595: &DeadFireCoralBlock,
596: &DeadHornCoralBlock,
597: &TubeCoralBlock,
598: &BrainCoralBlock,
599: &BubbleCoralBlock,
600: &FireCoralBlock,
601: &HornCoralBlock,
602: &DeadTubeCoral,
603: &DeadBrainCoral,
604: &DeadBubbleCoral,
605: &DeadFireCoral,
606: &DeadHornCoral,
607: &TubeCoral,
608: &BrainCoral,
609: &BubbleCoral,
610: &FireCoral,
611: &HornCoral,
612: &DeadTubeCoralFan,
613: &DeadBrainCoralFan,
614: &DeadBubbleCoralFan,
615: &DeadFireCoralFan,
616: &DeadHornCoralFan,
617: &TubeCoralFan,
618: &BrainCoralFan,
619: &BubbleCoralFan,
620: &FireCoralFan,
621: &HornCoralFan,
622: &DeadTubeCoralWallFan,
623: &DeadBrainCoralWallFan,
624: &DeadBubbleCoralWallFan,
625: &DeadFireCoralWallFan,
626: &DeadHornCoralWallFan,
627: &TubeCoralWallFan,
628: &BrainCoralWallFan,
629: &BubbleCoralWallFan,
630: &FireCoralWallFan,
631: &HornCoralWallFan,
632: &SeaPickle,
633: &BlueIce,
634: &Conduit,
635: &BambooSapling,
636: &Bamboo,
637: &PottedBamboo,
638: &VoidAir,
639: &CaveAir,
640: &BubbleColumn,
641: &PolishedGraniteStairs,
642: &SmoothRedSandstoneStairs,
643: &MossyStoneBrickStairs,
644: &PolishedDioriteStairs,
645: &MossyCobblestoneStairs,
646: &EndStoneBrickStairs,
647: &StoneStairs,
648: &SmoothSandstoneStairs,
649: &SmoothQuartzStairs,
650: &GraniteStairs,
651: &AndesiteStairs,
652: &RedNetherBrickStairs,
653: &PolishedAndesiteStairs,
654: &DioriteStairs,
655: &PolishedGraniteSlab,
656: &SmoothRedSandstoneSlab,
657: &MossyStoneBrickSlab,
658: &PolishedDioriteSlab,
659: &MossyCobblestoneSlab,
660: &EndStoneBrickSlab,
661: &SmoothSandstoneSlab,
662: &SmoothQuartzSlab,
663: &GraniteSlab,
664: &AndesiteSlab,
665: &RedNetherBrickSlab,
666: &PolishedAndesiteSlab,
667: &DioriteSlab,
668: &BrickWall,
669: &PrismarineWall,
670: &RedSandstoneWall,
671: &MossyStoneBrickWall,
672: &GraniteWall,
673: &StoneBrickWall,
674: &NetherBrickWall,
675: &AndesiteWall,
676: &RedNetherBrickWall,
677: &SandstoneWall,
678: &EndStoneBrickWall,
679: &DioriteWall,
680: &Scaffolding,
681: &Loom,
682: &Barrel,
683: &Smoker,
684: &BlastFurnace,
685: &CartographyTable,
686: &FletchingTable,
687: &Grindstone,
688: &Lectern,
689: &SmithingTable,
690: &Stonecutter,
691: &Bell,
692: &Lantern,
693: &SoulLantern,
694: &Campfire,
695: &SoulCampfire,
696: &SweetBerryBush,
697: &WarpedStem,
698: &StrippedWarpedStem,
699: &WarpedHyphae,
700: &StrippedWarpedHyphae,
701: &WarpedNylium,
702: &WarpedFungus,
703: &WarpedWartBlock,
704: &WarpedRoots,
705: &NetherSprouts,
706: &CrimsonStem,
707: &StrippedCrimsonStem,
708: &CrimsonHyphae,
709: &StrippedCrimsonHyphae,
710: &CrimsonNylium,
711: &CrimsonFungus,
712: &Shroomlight,
713: &WeepingVines,
714: &WeepingVinesPlant,
715: &TwistingVines,
716: &TwistingVinesPlant,
717: &CrimsonRoots,
718: &CrimsonPlanks,
719: &WarpedPlanks,
720: &CrimsonSlab,
721: &WarpedSlab,
722: &CrimsonPressurePlate,
723: &WarpedPressurePlate,
724: &CrimsonFence,
725: &WarpedFence,
726: &CrimsonTrapdoor,
727: &WarpedTrapdoor,
728: &CrimsonFenceGate,
729: &WarpedFenceGate,
730: &CrimsonStairs,
731: &WarpedStairs,
732: &CrimsonButton,
733: &WarpedButton,
734: &CrimsonDoor,
735: &WarpedDoor,
736: &CrimsonSign,
737: &WarpedSign,
738: &CrimsonWallSign,
739: &WarpedWallSign,
740: &StructureBlock,
741: &Jigsaw,
742: &Composter,
743: &Target,
744: &BeeNest,
745: &Beehive,
746: &HoneyBlock,
747: &HoneycombBlock,
748: &NetheriteBlock,
749: &AncientDebris,
750: &CryingObsidian,
751: &RespawnAnchor,
752: &PottedCrimsonFungus,
753: &PottedWarpedFungus,
754: &PottedCrimsonRoots,
755: &PottedWarpedRoots,
756: &Lodestone,
757: &Blackstone,
758: &BlackstoneStairs,
759: &BlackstoneWall,
760: &BlackstoneSlab,
761: &PolishedBlackstone,
762: &PolishedBlackstoneBricks,
763: &CrackedPolishedBlackstoneBricks,
764: &ChiseledPolishedBlackstone,
765: &PolishedBlackstoneBrickSlab,
766: &PolishedBlackstoneBrickStairs,
767: &PolishedBlackstoneBrickWall,
768: &GildedBlackstone,
769: &PolishedBlackstoneStairs,
770: &PolishedBlackstoneSlab,
771: &PolishedBlackstonePressurePlate,
772: &PolishedBlackstoneButton,
773: &PolishedBlackstoneWall,
774: &ChiseledNetherBricks,
775: &CrackedNetherBricks,
776: &QuartzBricks,
777: &Candle,
778: &WhiteCandle,
779: &OrangeCandle,
780: &MagentaCandle,
781: &LightBlueCandle,
782: &YellowCandle,
783: &LimeCandle,
784: &PinkCandle,
785: &GrayCandle,
786: &LightGrayCandle,
787: &CyanCandle,
788: &PurpleCandle,
789: &BlueCandle,
790: &BrownCandle,
791: &GreenCandle,
792: &RedCandle,
793: &BlackCandle,
794: &CandleCake,
795: &WhiteCandleCake,
796: &OrangeCandleCake,
797: &MagentaCandleCake,
798: &LightBlueCandleCake,
799: &YellowCandleCake,
800: &LimeCandleCake,
801: &PinkCandleCake,
802: &GrayCandleCake,
803: &LightGrayCandleCake,
804: &CyanCandleCake,
805: &PurpleCandleCake,
806: &BlueCandleCake,
807: &BrownCandleCake,
808: &GreenCandleCake,
809: &RedCandleCake,
810: &BlackCandleCake,
811: &AmethystBlock,
812: &BuddingAmethyst,
813: &AmethystCluster,
814: &LargeAmethystBud,
815: &MediumAmethystBud,
816: &SmallAmethystBud,
817: &Tuff,
818: &Calcite,
819: &TintedGlass,
820: &PowderSnow,
821: &SculkSensor,
822: &OxidizedCopper,
823: &WeatheredCopper,
824: &ExposedCopper,
825: &CopperBlock,
826: &CopperOre,
827: &DeepslateCopperOre,
828: &OxidizedCutCopper,
829: &WeatheredCutCopper,
830: &ExposedCutCopper,
831: &CutCopper,
832: &OxidizedCutCopperStairs,
833: &WeatheredCutCopperStairs,
834: &ExposedCutCopperStairs,
835: &CutCopperStairs,
836: &OxidizedCutCopperSlab,
837: &WeatheredCutCopperSlab,
838: &ExposedCutCopperSlab,
839: &CutCopperSlab,
840: &WaxedCopperBlock,
841: &WaxedWeatheredCopper,
842: &WaxedExposedCopper,
843: &WaxedOxidizedCopper,
844: &WaxedOxidizedCutCopper,
845: &WaxedWeatheredCutCopper,
846: &WaxedExposedCutCopper,
847: &WaxedCutCopper,
848: &WaxedOxidizedCutCopperStairs,
849: &WaxedWeatheredCutCopperStairs,
850: &WaxedExposedCutCopperStairs,
851: &WaxedCutCopperStairs,
852: &WaxedOxidizedCutCopperSlab,
853: &WaxedWeatheredCutCopperSlab,
854: &WaxedExposedCutCopperSlab,
855: &WaxedCutCopperSlab,
856: &LightningRod,
857: &PointedDripstone,
858: &DripstoneBlock,
859: &CaveVines,
860: &CaveVinesPlant,
861: &SporeBlossom,
862: &Azalea,
863: &FloweringAzalea,
864: &MossCarpet,
865: &MossBlock,
866: &BigDripleaf,
867: &BigDripleafStem,
868: &SmallDripleaf,
869: &HangingRoots,
870: &RootedDirt,
871: &Deepslate,
872: &CobbledDeepslate,
873: &CobbledDeepslateStairs,
874: &CobbledDeepslateSlab,
875: &CobbledDeepslateWall,
876: &PolishedDeepslate,
877: &PolishedDeepslateStairs,
878: &PolishedDeepslateSlab,
879: &PolishedDeepslateWall,
880: &DeepslateTiles,
881: &DeepslateTileStairs,
882: &DeepslateTileSlab,
883: &DeepslateTileWall,
884: &DeepslateBricks,
885: &DeepslateBrickStairs,
886: &DeepslateBrickSlab,
887: &DeepslateBrickWall,
888: &ChiseledDeepslate,
889: &CrackedDeepslateBricks,
890: &CrackedDeepslateTiles,
891: &InfestedDeepslate,
892: &SmoothBasalt,
893: &RawIronBlock,
894: &RawCopperBlock,
895: &RawGoldBlock,
896: &PottedAzaleaBush,
897: &PottedFloweringAzaleaBush,
}
// StateID maps all possible state IDs to a corresponding block ID.
var StateID = map[uint32]ID{
0: 0,
1: 1,
2: 2,
3: 3,
4: 4,
5: 5,
6: 6,
7: 7,
8: 8,
9: 8,
10: 9,
11: 10,
12: 11,
13: 11,
14: 12,
15: 13,
16: 14,
17: 15,
18: 16,
19: 17,
20: 18,
21: 19,
22: 19,
23: 20,
24: 20,
25: 21,
26: 21,
27: 22,
28: 22,
29: 23,
30: 23,
31: 24,
32: 24,
33: 25,
34: 26,
35: 26,
36: 26,
37: 26,
38: 26,
39: 26,
40: 26,
41: 26,
42: 26,
43: 26,
44: 26,
45: 26,
46: 26,
47: 26,
48: 26,
49: 26,
50: 27,
51: 27,
52: 27,
53: 27,
54: 27,
55: 27,
56: 27,
57: 27,
58: 27,
59: 27,
60: 27,
61: 27,
62: 27,
63: 27,
64: 27,
65: 27,
66: 28,
67: 29,
68: 30,
69: 31,
70: 32,
71: 33,
72: 34,
73: 35,
74: 36,
75: 37,
76: 38,
77: 38,
78: 38,
79: 39,
80: 39,
81: 39,
82: 40,
83: 40,
84: 40,
85: 41,
86: 41,
87: 41,
88: 42,
89: 42,
90: 42,
91: 43,
92: 43,
93: 43,
94: 44,
95: 44,
96: 44,
97: 45,
98: 45,
99: 45,
100: 46,
101: 46,
102: 46,
103: 47,
104: 47,
105: 47,
106: 48,
107: 48,
108: 48,
109: 49,
110: 49,
111: 49,
112: 50,
113: 50,
114: 50,
115: 51,
116: 51,
117: 51,
118: 52,
119: 52,
120: 52,
121: 53,
122: 53,
123: 53,
124: 54,
125: 54,
126: 54,
127: 55,
128: 55,
129: 55,
130: 56,
131: 56,
132: 56,
133: 57,
134: 57,
135: 57,
136: 58,
137: 58,
138: 58,
139: 59,
140: 59,
141: 59,
142: 60,
143: 60,
144: 60,
145: 61,
146: 61,
147: 61,
148: 62,
149: 62,
150: 62,
151: 62,
152: 62,
153: 62,
154: 62,
155: 62,
156: 62,
157: 62,
158: 62,
159: 62,
160: 62,
161: 62,
162: 63,
163: 63,
164: 63,
165: 63,
166: 63,
167: 63,
168: 63,
169: 63,
170: 63,
171: 63,
172: 63,
173: 63,
174: 63,
175: 63,
176: 64,
177: 64,
178: 64,
179: 64,
180: 64,
181: 64,
182: 64,
183: 64,
184: 64,
185: 64,
186: 64,
187: 64,
188: 64,
189: 64,
190: 65,
191: 65,
192: 65,
193: 65,
194: 65,
195: 65,
196: 65,
197: 65,
198: 65,
199: 65,
200: 65,
201: 65,
202: 65,
203: 65,
204: 66,
205: 66,
206: 66,
207: 66,
208: 66,
209: 66,
210: 66,
211: 66,
212: 66,
213: 66,
214: 66,
215: 66,
216: 66,
217: 66,
218: 67,
219: 67,
220: 67,
221: 67,
222: 67,
223: 67,
224: 67,
225: 67,
226: 67,
227: 67,
228: 67,
229: 67,
230: 67,
231: 67,
232: 68,
233: 68,
234: 68,
235: 68,
236: 68,
237: 68,
238: 68,
239: 68,
240: 68,
241: 68,
242: 68,
243: 68,
244: 68,
245: 68,
246: 69,
247: 69,
248: 69,
249: 69,
250: 69,
251: 69,
252: 69,
253: 69,
254: 69,
255: 69,
256: 69,
257: 69,
258: 69,
259: 69,
260: 70,
261: 71,
262: 72,
263: 73,
264: 74,
265: 75,
266: 76,
267: 76,
268: 76,
269: 76,
270: 76,
271: 76,
272: 76,
273: 76,
274: 76,
275: 76,
276: 76,
277: 76,
278: 77,
279: 78,
280: 79,
281: 80,
282: 80,
283: 80,
284: 80,
285: 80,
286: 80,
287: 80,
288: 80,
289: 80,
290: 80,
291: 80,
292: 80,
293: 80,
294: 80,
295: 80,
296: 80,
297: 80,
298: 80,
299: 80,
300: 80,
301: 80,
302: 80,
303: 80,
304: 80,
305: 80,
306: 80,
307: 80,
308: 80,
309: 80,
310: 80,
311: 80,
312: 80,
313: 80,
314: 80,
315: 80,
316: 80,
317: 80,
318: 80,
319: 80,
320: 80,
321: 80,
322: 80,
323: 80,
324: 80,
325: 80,
326: 80,
327: 80,
328: 80,
329: 80,
330: 80,
331: 80,
332: 80,
333: 80,
334: 80,
335: 80,
336: 80,
337: 80,
338: 80,
339: 80,
340: 80,
341: 80,
342: 80,
343: 80,
344: 80,
345: 80,
346: 80,
347: 80,
348: 80,
349: 80,
350: 80,
351: 80,
352: 80,
353: 80,
354: 80,
355: 80,
356: 80,
357: 80,
358: 80,
359: 80,
360: 80,
361: 80,
362: 80,
363: 80,
364: 80,
365: 80,
366: 80,
367: 80,
368: 80,
369: 80,
370: 80,
371: 80,
372: 80,
373: 80,
374: 80,
375: 80,
376: 80,
377: 80,
378: 80,
379: 80,
380: 80,
381: 80,
382: 80,
383: 80,
384: 80,
385: 80,
386: 80,
387: 80,
388: 80,
389: 80,
390: 80,
391: 80,
392: 80,
393: 80,
394: 80,
395: 80,
396: 80,
397: 80,
398: 80,
399: 80,
400: 80,
401: 80,
402: 80,
403: 80,
404: 80,
405: 80,
406: 80,
407: 80,
408: 80,
409: 80,
410: 80,
411: 80,
412: 80,
413: 80,
414: 80,
415: 80,
416: 80,
417: 80,
418: 80,
419: 80,
420: 80,
421: 80,
422: 80,
423: 80,
424: 80,
425: 80,
426: 80,
427: 80,
428: 80,
429: 80,
430: 80,
431: 80,
432: 80,
433: 80,
434: 80,
435: 80,
436: 80,
437: 80,
438: 80,
439: 80,
440: 80,
441: 80,
442: 80,
443: 80,
444: 80,
445: 80,
446: 80,
447: 80,
448: 80,
449: 80,
450: 80,
451: 80,
452: 80,
453: 80,
454: 80,
455: 80,
456: 80,
457: 80,
458: 80,
459: 80,
460: 80,
461: 80,
462: 80,
463: 80,
464: 80,
465: 80,
466: 80,
467: 80,
468: 80,
469: 80,
470: 80,
471: 80,
472: 80,
473: 80,
474: 80,
475: 80,
476: 80,
477: 80,
478: 80,
479: 80,
480: 80,
481: 80,
482: 80,
483: 80,
484: 80,
485: 80,
486: 80,
487: 80,
488: 80,
489: 80,
490: 80,
491: 80,
492: 80,
493: 80,
494: 80,
495: 80,
496: 80,
497: 80,
498: 80,
499: 80,
500: 80,
501: 80,
502: 80,
503: 80,
504: 80,
505: 80,
506: 80,
507: 80,
508: 80,
509: 80,
510: 80,
511: 80,
512: 80,
513: 80,
514: 80,
515: 80,
516: 80,
517: 80,
518: 80,
519: 80,
520: 80,
521: 80,
522: 80,
523: 80,
524: 80,
525: 80,
526: 80,
527: 80,
528: 80,
529: 80,
530: 80,
531: 80,
532: 80,
533: 80,
534: 80,
535: 80,
536: 80,
537: 80,
538: 80,
539: 80,
540: 80,
541: 80,
542: 80,
543: 80,
544: 80,
545: 80,
546: 80,
547: 80,
548: 80,
549: 80,
550: 80,
551: 80,
552: 80,
553: 80,
554: 80,
555: 80,
556: 80,
557: 80,
558: 80,
559: 80,
560: 80,
561: 80,
562: 80,
563: 80,
564: 80,
565: 80,
566: 80,
567: 80,
568: 80,
569: 80,
570: 80,
571: 80,
572: 80,
573: 80,
574: 80,
575: 80,
576: 80,
577: 80,
578: 80,
579: 80,
580: 80,
581: 80,
582: 80,
583: 80,
584: 80,
585: 80,
586: 80,
587: 80,
588: 80,
589: 80,
590: 80,
591: 80,
592: 80,
593: 80,
594: 80,
595: 80,
596: 80,
597: 80,
598: 80,
599: 80,
600: 80,
601: 80,
602: 80,
603: 80,
604: 80,
605: 80,
606: 80,
607: 80,
608: 80,
609: 80,
610: 80,
611: 80,
612: 80,
613: 80,
614: 80,
615: 80,
616: 80,
617: 80,
618: 80,
619: 80,
620: 80,
621: 80,
622: 80,
623: 80,
624: 80,
625: 80,
626: 80,
627: 80,
628: 80,
629: 80,
630: 80,
631: 80,
632: 80,
633: 80,
634: 80,
635: 80,
636: 80,
637: 80,
638: 80,
639: 80,
640: 80,
641: 80,
642: 80,
643: 80,
644: 80,
645: 80,
646: 80,
647: 80,
648: 80,
649: 80,
650: 80,
651: 80,
652: 80,
653: 80,
654: 80,
655: 80,
656: 80,
657: 80,
658: 80,
659: 80,
660: 80,
661: 80,
662: 80,
663: 80,
664: 80,
665: 80,
666: 80,
667: 80,
668: 80,
669: 80,
670: 80,
671: 80,
672: 80,
673: 80,
674: 80,
675: 80,
676: 80,
677: 80,
678: 80,
679: 80,
680: 80,
681: 80,
682: 80,
683: 80,
684: 80,
685: 80,
686: 80,
687: 80,
688: 80,
689: 80,
690: 80,
691: 80,
692: 80,
693: 80,
694: 80,
695: 80,
696: 80,
697: 80,
698: 80,
699: 80,
700: 80,
701: 80,
702: 80,
703: 80,
704: 80,
705: 80,
706: 80,
707: 80,
708: 80,
709: 80,
710: 80,
711: 80,
712: 80,
713: 80,
714: 80,
715: 80,
716: 80,
717: 80,
718: 80,
719: 80,
720: 80,
721: 80,
722: 80,
723: 80,
724: 80,
725: 80,
726: 80,
727: 80,
728: 80,
729: 80,
730: 80,
731: 80,
732: 80,
733: 80,
734: 80,
735: 80,
736: 80,
737: 80,
738: 80,
739: 80,
740: 80,
741: 80,
742: 80,
743: 80,
744: 80,
745: 80,
746: 80,
747: 80,
748: 80,
749: 80,
750: 80,
751: 80,
752: 80,
753: 80,
754: 80,
755: 80,
756: 80,
757: 80,
758: 80,
759: 80,
760: 80,
761: 80,
762: 80,
763: 80,
764: 80,
765: 80,
766: 80,
767: 80,
768: 80,
769: 80,
770: 80,
771: 80,
772: 80,
773: 80,
774: 80,
775: 80,
776: 80,
777: 80,
778: 80,
779: 80,
780: 80,
781: 80,
782: 80,
783: 80,
784: 80,
785: 80,
786: 80,
787: 80,
788: 80,
789: 80,
790: 80,
791: 80,
792: 80,
793: 80,
794: 80,
795: 80,
796: 80,
797: 80,
798: 80,
799: 80,
800: 80,
801: 80,
802: 80,
803: 80,
804: 80,
805: 80,
806: 80,
807: 80,
808: 80,
809: 80,
810: 80,
811: 80,
812: 80,
813: 80,
814: 80,
815: 80,
816: 80,
817: 80,
818: 80,
819: 80,
820: 80,
821: 80,
822: 80,
823: 80,
824: 80,
825: 80,
826: 80,
827: 80,
828: 80,
829: 80,
830: 80,
831: 80,
832: 80,
833: 80,
834: 80,
835: 80,
836: 80,
837: 80,
838: 80,
839: 80,
840: 80,
841: 80,
842: 80,
843: 80,
844: 80,
845: 80,
846: 80,
847: 80,
848: 80,
849: 80,
850: 80,
851: 80,
852: 80,
853: 80,
854: 80,
855: 80,
856: 80,
857: 80,
858: 80,
859: 80,
860: 80,
861: 80,
862: 80,
863: 80,
864: 80,
865: 80,
866: 80,
867: 80,
868: 80,
869: 80,
870: 80,
871: 80,
872: 80,
873: 80,
874: 80,
875: 80,
876: 80,
877: 80,
878: 80,
879: 80,
880: 80,
881: 80,
882: 80,
883: 80,
884: 80,
885: 80,
886: 80,
887: 80,
888: 80,
889: 80,
890: 80,
891: 80,
892: 80,
893: 80,
894: 80,
895: 80,
896: 80,
897: 80,
898: 80,
899: 80,
900: 80,
901: 80,
902: 80,
903: 80,
904: 80,
905: 80,
906: 80,
907: 80,
908: 80,
909: 80,
910: 80,
911: 80,
912: 80,
913: 80,
914: 80,
915: 80,
916: 80,
917: 80,
918: 80,
919: 80,
920: 80,
921: 80,
922: 80,
923: 80,
924: 80,
925: 80,
926: 80,
927: 80,
928: 80,
929: 80,
930: 80,
931: 80,
932: 80,
933: 80,
934: 80,
935: 80,
936: 80,
937: 80,
938: 80,
939: 80,
940: 80,
941: 80,
942: 80,
943: 80,
944: 80,
945: 80,
946: 80,
947: 80,
948: 80,
949: 80,
950: 80,
951: 80,
952: 80,
953: 80,
954: 80,
955: 80,
956: 80,
957: 80,
958: 80,
959: 80,
960: 80,
961: 80,
962: 80,
963: 80,
964: 80,
965: 80,
966: 80,
967: 80,
968: 80,
969: 80,
970: 80,
971: 80,
972: 80,
973: 80,
974: 80,
975: 80,
976: 80,
977: 80,
978: 80,
979: 80,
980: 80,
981: 80,
982: 80,
983: 80,
984: 80,
985: 80,
986: 80,
987: 80,
988: 80,
989: 80,
990: 80,
991: 80,
992: 80,
993: 80,
994: 80,
995: 80,
996: 80,
997: 80,
998: 80,
999: 80,
1000: 80,
1001: 80,
1002: 80,
1003: 80,
1004: 80,
1005: 80,
1006: 80,
1007: 80,
1008: 80,
1009: 80,
1010: 80,
1011: 80,
1012: 80,
1013: 80,
1014: 80,
1015: 80,
1016: 80,
1017: 80,
1018: 80,
1019: 80,
1020: 80,
1021: 80,
1022: 80,
1023: 80,
1024: 80,
1025: 80,
1026: 80,
1027: 80,
1028: 80,
1029: 80,
1030: 80,
1031: 80,
1032: 80,
1033: 80,
1034: 80,
1035: 80,
1036: 80,
1037: 80,
1038: 80,
1039: 80,
1040: 80,
1041: 80,
1042: 80,
1043: 80,
1044: 80,
1045: 80,
1046: 80,
1047: 80,
1048: 80,
1049: 80,
1050: 80,
1051: 80,
1052: 80,
1053: 80,
1054: 80,
1055: 80,
1056: 80,
1057: 80,
1058: 80,
1059: 80,
1060: 80,
1061: 80,
1062: 80,
1063: 80,
1064: 80,
1065: 80,
1066: 80,
1067: 80,
1068: 80,
1069: 80,
1070: 80,
1071: 80,
1072: 80,
1073: 80,
1074: 80,
1075: 80,
1076: 80,
1077: 80,
1078: 80,
1079: 80,
1080: 80,
1081: 81,
1082: 81,
1083: 81,
1084: 81,
1085: 81,
1086: 81,
1087: 81,
1088: 81,
1089: 81,
1090: 81,
1091: 81,
1092: 81,
1093: 81,
1094: 81,
1095: 81,
1096: 81,
1097: 82,
1098: 82,
1099: 82,
1100: 82,
1101: 82,
1102: 82,
1103: 82,
1104: 82,
1105: 82,
1106: 82,
1107: 82,
1108: 82,
1109: 82,
1110: 82,
1111: 82,
1112: 82,
1113: 83,
1114: 83,
1115: 83,
1116: 83,
1117: 83,
1118: 83,
1119: 83,
1120: 83,
1121: 83,
1122: 83,
1123: 83,
1124: 83,
1125: 83,
1126: 83,
1127: 83,
1128: 83,
1129: 84,
1130: 84,
1131: 84,
1132: 84,
1133: 84,
1134: 84,
1135: 84,
1136: 84,
1137: 84,
1138: 84,
1139: 84,
1140: 84,
1141: 84,
1142: 84,
1143: 84,
1144: 84,
1145: 85,
1146: 85,
1147: 85,
1148: 85,
1149: 85,
1150: 85,
1151: 85,
1152: 85,
1153: 85,
1154: 85,
1155: 85,
1156: 85,
1157: 85,
1158: 85,
1159: 85,
1160: 85,
1161: 86,
1162: 86,
1163: 86,
1164: 86,
1165: 86,
1166: 86,
1167: 86,
1168: 86,
1169: 86,
1170: 86,
1171: 86,
1172: 86,
1173: 86,
1174: 86,
1175: 86,
1176: 86,
1177: 87,
1178: 87,
1179: 87,
1180: 87,
1181: 87,
1182: 87,
1183: 87,
1184: 87,
1185: 87,
1186: 87,
1187: 87,
1188: 87,
1189: 87,
1190: 87,
1191: 87,
1192: 87,
1193: 88,
1194: 88,
1195: 88,
1196: 88,
1197: 88,
1198: 88,
1199: 88,
1200: 88,
1201: 88,
1202: 88,
1203: 88,
1204: 88,
1205: 88,
1206: 88,
1207: 88,
1208: 88,
1209: 89,
1210: 89,
1211: 89,
1212: 89,
1213: 89,
1214: 89,
1215: 89,
1216: 89,
1217: 89,
1218: 89,
1219: 89,
1220: 89,
1221: 89,
1222: 89,
1223: 89,
1224: 89,
1225: 90,
1226: 90,
1227: 90,
1228: 90,
1229: 90,
1230: 90,
1231: 90,
1232: 90,
1233: 90,
1234: 90,
1235: 90,
1236: 90,
1237: 90,
1238: 90,
1239: 90,
1240: 90,
1241: 91,
1242: 91,
1243: 91,
1244: 91,
1245: 91,
1246: 91,
1247: 91,
1248: 91,
1249: 91,
1250: 91,
1251: 91,
1252: 91,
1253: 91,
1254: 91,
1255: 91,
1256: 91,
1257: 92,
1258: 92,
1259: 92,
1260: 92,
1261: 92,
1262: 92,
1263: 92,
1264: 92,
1265: 92,
1266: 92,
1267: 92,
1268: 92,
1269: 92,
1270: 92,
1271: 92,
1272: 92,
1273: 93,
1274: 93,
1275: 93,
1276: 93,
1277: 93,
1278: 93,
1279: 93,
1280: 93,
1281: 93,
1282: 93,
1283: 93,
1284: 93,
1285: 93,
1286: 93,
1287: 93,
1288: 93,
1289: 94,
1290: 94,
1291: 94,
1292: 94,
1293: 94,
1294: 94,
1295: 94,
1296: 94,
1297: 94,
1298: 94,
1299: 94,
1300: 94,
1301: 94,
1302: 94,
1303: 94,
1304: 94,
1305: 95,
1306: 95,
1307: 95,
1308: 95,
1309: 95,
1310: 95,
1311: 95,
1312: 95,
1313: 95,
1314: 95,
1315: 95,
1316: 95,
1317: 95,
1318: 95,
1319: 95,
1320: 95,
1321: 96,
1322: 96,
1323: 96,
1324: 96,
1325: 96,
1326: 96,
1327: 96,
1328: 96,
1329: 96,
1330: 96,
1331: 96,
1332: 96,
1333: 96,
1334: 96,
1335: 96,
1336: 96,
1337: 97,
1338: 97,
1339: 97,
1340: 97,
1341: 97,
1342: 97,
1343: 97,
1344: 97,
1345: 97,
1346: 97,
1347: 97,
1348: 97,
1349: 97,
1350: 97,
1351: 97,
1352: 97,
1353: 97,
1354: 97,
1355: 97,
1356: 97,
1357: 97,
1358: 97,
1359: 97,
1360: 97,
1361: 98,
1362: 98,
1363: 98,
1364: 98,
1365: 98,
1366: 98,
1367: 98,
1368: 98,
1369: 98,
1370: 98,
1371: 98,
1372: 98,
1373: 98,
1374: 98,
1375: 98,
1376: 98,
1377: 98,
1378: 98,
1379: 98,
1380: 98,
1381: 98,
1382: 98,
1383: 98,
1384: 98,
1385: 99,
1386: 99,
1387: 99,
1388: 99,
1389: 99,
1390: 99,
1391: 99,
1392: 99,
1393: 99,
1394: 99,
1395: 99,
1396: 99,
1397: 100,
1398: 101,
1399: 102,
1400: 103,
1401: 104,
1402: 105,
1403: 105,
1404: 106,
1405: 106,
1406: 106,
1407: 106,
1408: 106,
1409: 106,
1410: 106,
1411: 106,
1412: 106,
1413: 106,
1414: 106,
1415: 106,
1416: 107,
1417: 107,
1418: 107,
1419: 107,
1420: 107,
1421: 107,
1422: 107,
1423: 107,
1424: 107,
1425: 107,
1426: 107,
1427: 107,
1428: 107,
1429: 107,
1430: 107,
1431: 107,
1432: 107,
1433: 107,
1434: 107,
1435: 107,
1436: 107,
1437: 107,
1438: 107,
1439: 107,
1440: 108,
1441: 109,
1442: 110,
1443: 111,
1444: 112,
1445: 113,
1446: 114,
1447: 115,
1448: 116,
1449: 117,
1450: 118,
1451: 119,
1452: 120,
1453: 121,
1454: 122,
1455: 123,
1456: 124,
1457: 124,
1458: 124,
1459: 124,
1460: 124,
1461: 124,
1462: 124,
1463: 124,
1464: 124,
1465: 124,
1466: 124,
1467: 124,
1468: 125,
1469: 126,
1470: 127,
1471: 128,
1472: 129,
1473: 130,
1474: 131,
1475: 132,
1476: 133,
1477: 134,
1478: 135,
1479: 136,
1480: 137,
1481: 138,
1482: 139,
1483: 140,
1484: 141,
1485: 142,
1486: 143,
1487: 143,
1488: 144,
1489: 145,
1490: 146,
1491: 147,
1492: 148,
1493: 148,
1494: 148,
1495: 148,
1496: 149,
1497: 149,
1498: 149,
1499: 149,
1500: 149,
1501: 149,
1502: 149,
1503: 149,
1504: 149,
1505: 149,
1506: 149,
1507: 149,
1508: 149,
1509: 149,
1510: 149,
1511: 149,
1512: 149,
1513: 149,
1514: 149,
1515: 149,
1516: 149,
1517: 149,
1518: 149,
1519: 149,
1520: 149,
1521: 149,
1522: 149,
1523: 149,
1524: 149,
1525: 149,
1526: 149,
1527: 149,
1528: 149,
1529: 149,
1530: 149,
1531: 149,
1532: 149,
1533: 149,
1534: 149,
1535: 149,
1536: 149,
1537: 149,
1538: 149,
1539: 149,
1540: 149,
1541: 149,
1542: 149,
1543: 149,
1544: 149,
1545: 149,
1546: 149,
1547: 149,
1548: 149,
1549: 149,
1550: 149,
1551: 149,
1552: 149,
1553: 149,
1554: 149,
1555: 149,
1556: 149,
1557: 149,
1558: 149,
1559: 149,
1560: 149,
1561: 149,
1562: 149,
1563: 149,
1564: 149,
1565: 149,
1566: 149,
1567: 149,
1568: 149,
1569: 149,
1570: 149,
1571: 149,
1572: 149,
1573: 149,
1574: 149,
1575: 149,
1576: 149,
1577: 149,
1578: 149,
1579: 149,
1580: 149,
1581: 149,
1582: 149,
1583: 149,
1584: 149,
1585: 149,
1586: 149,
1587: 149,
1588: 149,
1589: 149,
1590: 149,
1591: 149,
1592: 149,
1593: 149,
1594: 149,
1595: 149,
1596: 149,
1597: 149,
1598: 149,
1599: 149,
1600: 149,
1601: 149,
1602: 149,
1603: 149,
1604: 149,
1605: 149,
1606: 149,
1607: 149,
1608: 149,
1609: 149,
1610: 149,
1611: 149,
1612: 149,
1613: 149,
1614: 149,
1615: 149,
1616: 149,
1617: 149,
1618: 149,
1619: 149,
1620: 149,
1621: 149,
1622: 149,
1623: 149,
1624: 149,
1625: 149,
1626: 149,
1627: 149,
1628: 149,
1629: 149,
1630: 149,
1631: 149,
1632: 149,
1633: 149,
1634: 149,
1635: 149,
1636: 149,
1637: 149,
1638: 149,
1639: 149,
1640: 149,
1641: 149,
1642: 149,
1643: 149,
1644: 149,
1645: 149,
1646: 149,
1647: 149,
1648: 149,
1649: 149,
1650: 149,
1651: 149,
1652: 149,
1653: 149,
1654: 149,
1655: 149,
1656: 149,
1657: 149,
1658: 149,
1659: 149,
1660: 149,
1661: 149,
1662: 149,
1663: 149,
1664: 149,
1665: 149,
1666: 149,
1667: 149,
1668: 149,
1669: 149,
1670: 149,
1671: 149,
1672: 149,
1673: 149,
1674: 149,
1675: 149,
1676: 149,
1677: 149,
1678: 149,
1679: 149,
1680: 149,
1681: 149,
1682: 149,
1683: 149,
1684: 149,
1685: 149,
1686: 149,
1687: 149,
1688: 149,
1689: 149,
1690: 149,
1691: 149,
1692: 149,
1693: 149,
1694: 149,
1695: 149,
1696: 149,
1697: 149,
1698: 149,
1699: 149,
1700: 149,
1701: 149,
1702: 149,
1703: 149,
1704: 149,
1705: 149,
1706: 149,
1707: 149,
1708: 149,
1709: 149,
1710: 149,
1711: 149,
1712: 149,
1713: 149,
1714: 149,
1715: 149,
1716: 149,
1717: 149,
1718: 149,
1719: 149,
1720: 149,
1721: 149,
1722: 149,
1723: 149,
1724: 149,
1725: 149,
1726: 149,
1727: 149,
1728: 149,
1729: 149,
1730: 149,
1731: 149,
1732: 149,
1733: 149,
1734: 149,
1735: 149,
1736: 149,
1737: 149,
1738: 149,
1739: 149,
1740: 149,
1741: 149,
1742: 149,
1743: 149,
1744: 149,
1745: 149,
1746: 149,
1747: 149,
1748: 149,
1749: 149,
1750: 149,
1751: 149,
1752: 149,
1753: 149,
1754: 149,
1755: 149,
1756: 149,
1757: 149,
1758: 149,
1759: 149,
1760: 149,
1761: 149,
1762: 149,
1763: 149,
1764: 149,
1765: 149,
1766: 149,
1767: 149,
1768: 149,
1769: 149,
1770: 149,
1771: 149,
1772: 149,
1773: 149,
1774: 149,
1775: 149,
1776: 149,
1777: 149,
1778: 149,
1779: 149,
1780: 149,
1781: 149,
1782: 149,
1783: 149,
1784: 149,
1785: 149,
1786: 149,
1787: 149,
1788: 149,
1789: 149,
1790: 149,
1791: 149,
1792: 149,
1793: 149,
1794: 149,
1795: 149,
1796: 149,
1797: 149,
1798: 149,
1799: 149,
1800: 149,
1801: 149,
1802: 149,
1803: 149,
1804: 149,
1805: 149,
1806: 149,
1807: 149,
1808: 149,
1809: 149,
1810: 149,
1811: 149,
1812: 149,
1813: 149,
1814: 149,
1815: 149,
1816: 149,
1817: 149,
1818: 149,
1819: 149,
1820: 149,
1821: 149,
1822: 149,
1823: 149,
1824: 149,
1825: 149,
1826: 149,
1827: 149,
1828: 149,
1829: 149,
1830: 149,
1831: 149,
1832: 149,
1833: 149,
1834: 149,
1835: 149,
1836: 149,
1837: 149,
1838: 149,
1839: 149,
1840: 149,
1841: 149,
1842: 149,
1843: 149,
1844: 149,
1845: 149,
1846: 149,
1847: 149,
1848: 149,
1849: 149,
1850: 149,
1851: 149,
1852: 149,
1853: 149,
1854: 149,
1855: 149,
1856: 149,
1857: 149,
1858: 149,
1859: 149,
1860: 149,
1861: 149,
1862: 149,
1863: 149,
1864: 149,
1865: 149,
1866: 149,
1867: 149,
1868: 149,
1869: 149,
1870: 149,
1871: 149,
1872: 149,
1873: 149,
1874: 149,
1875: 149,
1876: 149,
1877: 149,
1878: 149,
1879: 149,
1880: 149,
1881: 149,
1882: 149,
1883: 149,
1884: 149,
1885: 149,
1886: 149,
1887: 149,
1888: 149,
1889: 149,
1890: 149,
1891: 149,
1892: 149,
1893: 149,
1894: 149,
1895: 149,
1896: 149,
1897: 149,
1898: 149,
1899: 149,
1900: 149,
1901: 149,
1902: 149,
1903: 149,
1904: 149,
1905: 149,
1906: 149,
1907: 149,
1908: 149,
1909: 149,
1910: 149,
1911: 149,
1912: 149,
1913: 149,
1914: 149,
1915: 149,
1916: 149,
1917: 149,
1918: 149,
1919: 149,
1920: 149,
1921: 149,
1922: 149,
1923: 149,
1924: 149,
1925: 149,
1926: 149,
1927: 149,
1928: 149,
1929: 149,
1930: 149,
1931: 149,
1932: 149,
1933: 149,
1934: 149,
1935: 149,
1936: 149,
1937: 149,
1938: 149,
1939: 149,
1940: 149,
1941: 149,
1942: 149,
1943: 149,
1944: 149,
1945: 149,
1946: 149,
1947: 149,
1948: 149,
1949: 149,
1950: 149,
1951: 149,
1952: 149,
1953: 149,
1954: 149,
1955: 149,
1956: 149,
1957: 149,
1958: 149,
1959: 149,
1960: 149,
1961: 149,
1962: 149,
1963: 149,
1964: 149,
1965: 149,
1966: 149,
1967: 149,
1968: 149,
1969: 149,
1970: 149,
1971: 149,
1972: 149,
1973: 149,
1974: 149,
1975: 149,
1976: 149,
1977: 149,
1978: 149,
1979: 149,
1980: 149,
1981: 149,
1982: 149,
1983: 149,
1984: 149,
1985: 149,
1986: 149,
1987: 149,
1988: 149,
1989: 149,
1990: 149,
1991: 149,
1992: 149,
1993: 149,
1994: 149,
1995: 149,
1996: 149,
1997: 149,
1998: 149,
1999: 149,
2000: 149,
2001: 149,
2002: 149,
2003: 149,
2004: 149,
2005: 149,
2006: 149,
2007: 149,
2008: 150,
2009: 151,
2010: 152,
2011: 152,
2012: 152,
2013: 152,
2014: 152,
2015: 152,
2016: 152,
2017: 152,
2018: 152,
2019: 152,
2020: 152,
2021: 152,
2022: 152,
2023: 152,
2024: 152,
2025: 152,
2026: 152,
2027: 152,
2028: 152,
2029: 152,
2030: 152,
2031: 152,
2032: 152,
2033: 152,
2034: 152,
2035: 152,
2036: 152,
2037: 152,
2038: 152,
2039: 152,
2040: 152,
2041: 152,
2042: 152,
2043: 152,
2044: 152,
2045: 152,
2046: 152,
2047: 152,
2048: 152,
2049: 152,
2050: 152,
2051: 152,
2052: 152,
2053: 152,
2054: 152,
2055: 152,
2056: 152,
2057: 152,
2058: 152,
2059: 152,
2060: 152,
2061: 152,
2062: 152,
2063: 152,
2064: 152,
2065: 152,
2066: 152,
2067: 152,
2068: 152,
2069: 152,
2070: 152,
2071: 152,
2072: 152,
2073: 152,
2074: 152,
2075: 152,
2076: 152,
2077: 152,
2078: 152,
2079: 152,
2080: 152,
2081: 152,
2082: 152,
2083: 152,
2084: 152,
2085: 152,
2086: 152,
2087: 152,
2088: 152,
2089: 152,
2090: 153,
2091: 153,
2092: 153,
2093: 153,
2094: 153,
2095: 153,
2096: 153,
2097: 153,
2098: 153,
2099: 153,
2100: 153,
2101: 153,
2102: 153,
2103: 153,
2104: 153,
2105: 153,
2106: 153,
2107: 153,
2108: 153,
2109: 153,
2110: 153,
2111: 153,
2112: 153,
2113: 153,
2114: 154,
2115: 154,
2116: 154,
2117: 154,
2118: 154,
2119: 154,
2120: 154,
2121: 154,
2122: 154,
2123: 154,
2124: 154,
2125: 154,
2126: 154,
2127: 154,
2128: 154,
2129: 154,
2130: 154,
2131: 154,
2132: 154,
2133: 154,
2134: 154,
2135: 154,
2136: 154,
2137: 154,
2138: 154,
2139: 154,
2140: 154,
2141: 154,
2142: 154,
2143: 154,
2144: 154,
2145: 154,
2146: 154,
2147: 154,
2148: 154,
2149: 154,
2150: 154,
2151: 154,
2152: 154,
2153: 154,
2154: 154,
2155: 154,
2156: 154,
2157: 154,
2158: 154,
2159: 154,
2160: 154,
2161: 154,
2162: 154,
2163: 154,
2164: 154,
2165: 154,
2166: 154,
2167: 154,
2168: 154,
2169: 154,
2170: 154,
2171: 154,
2172: 154,
2173: 154,
2174: 154,
2175: 154,
2176: 154,
2177: 154,
2178: 154,
2179: 154,
2180: 154,
2181: 154,
2182: 154,
2183: 154,
2184: 154,
2185: 154,
2186: 154,
2187: 154,
2188: 154,
2189: 154,
2190: 154,
2191: 154,
2192: 154,
2193: 154,
2194: 154,
2195: 154,
2196: 154,
2197: 154,
2198: 154,
2199: 154,
2200: 154,
2201: 154,
2202: 154,
2203: 154,
2204: 154,
2205: 154,
2206: 154,
2207: 154,
2208: 154,
2209: 154,
2210: 154,
2211: 154,
2212: 154,
2213: 154,
2214: 154,
2215: 154,
2216: 154,
2217: 154,
2218: 154,
2219: 154,
2220: 154,
2221: 154,
2222: 154,
2223: 154,
2224: 154,
2225: 154,
2226: 154,
2227: 154,
2228: 154,
2229: 154,
2230: 154,
2231: 154,
2232: 154,
2233: 154,
2234: 154,
2235: 154,
2236: 154,
2237: 154,
2238: 154,
2239: 154,
2240: 154,
2241: 154,
2242: 154,
2243: 154,
2244: 154,
2245: 154,
2246: 154,
2247: 154,
2248: 154,
2249: 154,
2250: 154,
2251: 154,
2252: 154,
2253: 154,
2254: 154,
2255: 154,
2256: 154,
2257: 154,
2258: 154,
2259: 154,
2260: 154,
2261: 154,
2262: 154,
2263: 154,
2264: 154,
2265: 154,
2266: 154,
2267: 154,
2268: 154,
2269: 154,
2270: 154,
2271: 154,
2272: 154,
2273: 154,
2274: 154,
2275: 154,
2276: 154,
2277: 154,
2278: 154,
2279: 154,
2280: 154,
2281: 154,
2282: 154,
2283: 154,
2284: 154,
2285: 154,
2286: 154,
2287: 154,
2288: 154,
2289: 154,
2290: 154,
2291: 154,
2292: 154,
2293: 154,
2294: 154,
2295: 154,
2296: 154,
2297: 154,
2298: 154,
2299: 154,
2300: 154,
2301: 154,
2302: 154,
2303: 154,
2304: 154,
2305: 154,
2306: 154,
2307: 154,
2308: 154,
2309: 154,
2310: 154,
2311: 154,
2312: 154,
2313: 154,
2314: 154,
2315: 154,
2316: 154,
2317: 154,
2318: 154,
2319: 154,
2320: 154,
2321: 154,
2322: 154,
2323: 154,
2324: 154,
2325: 154,
2326: 154,
2327: 154,
2328: 154,
2329: 154,
2330: 154,
2331: 154,
2332: 154,
2333: 154,
2334: 154,
2335: 154,
2336: 154,
2337: 154,
2338: 154,
2339: 154,
2340: 154,
2341: 154,
2342: 154,
2343: 154,
2344: 154,
2345: 154,
2346: 154,
2347: 154,
2348: 154,
2349: 154,
2350: 154,
2351: 154,
2352: 154,
2353: 154,
2354: 154,
2355: 154,
2356: 154,
2357: 154,
2358: 154,
2359: 154,
2360: 154,
2361: 154,
2362: 154,
2363: 154,
2364: 154,
2365: 154,
2366: 154,
2367: 154,
2368: 154,
2369: 154,
2370: 154,
2371: 154,
2372: 154,
2373: 154,
2374: 154,
2375: 154,
2376: 154,
2377: 154,
2378: 154,
2379: 154,
2380: 154,
2381: 154,
2382: 154,
2383: 154,
2384: 154,
2385: 154,
2386: 154,
2387: 154,
2388: 154,
2389: 154,
2390: 154,
2391: 154,
2392: 154,
2393: 154,
2394: 154,
2395: 154,
2396: 154,
2397: 154,
2398: 154,
2399: 154,
2400: 154,
2401: 154,
2402: 154,
2403: 154,
2404: 154,
2405: 154,
2406: 154,
2407: 154,
2408: 154,
2409: 154,
2410: 154,
2411: 154,
2412: 154,
2413: 154,
2414: 154,
2415: 154,
2416: 154,
2417: 154,
2418: 154,
2419: 154,
2420: 154,
2421: 154,
2422: 154,
2423: 154,
2424: 154,
2425: 154,
2426: 154,
2427: 154,
2428: 154,
2429: 154,
2430: 154,
2431: 154,
2432: 154,
2433: 154,
2434: 154,
2435: 154,
2436: 154,
2437: 154,
2438: 154,
2439: 154,
2440: 154,
2441: 154,
2442: 154,
2443: 154,
2444: 154,
2445: 154,
2446: 154,
2447: 154,
2448: 154,
2449: 154,
2450: 154,
2451: 154,
2452: 154,
2453: 154,
2454: 154,
2455: 154,
2456: 154,
2457: 154,
2458: 154,
2459: 154,
2460: 154,
2461: 154,
2462: 154,
2463: 154,
2464: 154,
2465: 154,
2466: 154,
2467: 154,
2468: 154,
2469: 154,
2470: 154,
2471: 154,
2472: 154,
2473: 154,
2474: 154,
2475: 154,
2476: 154,
2477: 154,
2478: 154,
2479: 154,
2480: 154,
2481: 154,
2482: 154,
2483: 154,
2484: 154,
2485: 154,
2486: 154,
2487: 154,
2488: 154,
2489: 154,
2490: 154,
2491: 154,
2492: 154,
2493: 154,
2494: 154,
2495: 154,
2496: 154,
2497: 154,
2498: 154,
2499: 154,
2500: 154,
2501: 154,
2502: 154,
2503: 154,
2504: 154,
2505: 154,
2506: 154,
2507: 154,
2508: 154,
2509: 154,
2510: 154,
2511: 154,
2512: 154,
2513: 154,
2514: 154,
2515: 154,
2516: 154,
2517: 154,
2518: 154,
2519: 154,
2520: 154,
2521: 154,
2522: 154,
2523: 154,
2524: 154,
2525: 154,
2526: 154,
2527: 154,
2528: 154,
2529: 154,
2530: 154,
2531: 154,
2532: 154,
2533: 154,
2534: 154,
2535: 154,
2536: 154,
2537: 154,
2538: 154,
2539: 154,
2540: 154,
2541: 154,
2542: 154,
2543: 154,
2544: 154,
2545: 154,
2546: 154,
2547: 154,
2548: 154,
2549: 154,
2550: 154,
2551: 154,
2552: 154,
2553: 154,
2554: 154,
2555: 154,
2556: 154,
2557: 154,
2558: 154,
2559: 154,
2560: 154,
2561: 154,
2562: 154,
2563: 154,
2564: 154,
2565: 154,
2566: 154,
2567: 154,
2568: 154,
2569: 154,
2570: 154,
2571: 154,
2572: 154,
2573: 154,
2574: 154,
2575: 154,
2576: 154,
2577: 154,
2578: 154,
2579: 154,
2580: 154,
2581: 154,
2582: 154,
2583: 154,
2584: 154,
2585: 154,
2586: 154,
2587: 154,
2588: 154,
2589: 154,
2590: 154,
2591: 154,
2592: 154,
2593: 154,
2594: 154,
2595: 154,
2596: 154,
2597: 154,
2598: 154,
2599: 154,
2600: 154,
2601: 154,
2602: 154,
2603: 154,
2604: 154,
2605: 154,
2606: 154,
2607: 154,
2608: 154,
2609: 154,
2610: 154,
2611: 154,
2612: 154,
2613: 154,
2614: 154,
2615: 154,
2616: 154,
2617: 154,
2618: 154,
2619: 154,
2620: 154,
2621: 154,
2622: 154,
2623: 154,
2624: 154,
2625: 154,
2626: 154,
2627: 154,
2628: 154,
2629: 154,
2630: 154,
2631: 154,
2632: 154,
2633: 154,
2634: 154,
2635: 154,
2636: 154,
2637: 154,
2638: 154,
2639: 154,
2640: 154,
2641: 154,
2642: 154,
2643: 154,
2644: 154,
2645: 154,
2646: 154,
2647: 154,
2648: 154,
2649: 154,
2650: 154,
2651: 154,
2652: 154,
2653: 154,
2654: 154,
2655: 154,
2656: 154,
2657: 154,
2658: 154,
2659: 154,
2660: 154,
2661: 154,
2662: 154,
2663: 154,
2664: 154,
2665: 154,
2666: 154,
2667: 154,
2668: 154,
2669: 154,
2670: 154,
2671: 154,
2672: 154,
2673: 154,
2674: 154,
2675: 154,
2676: 154,
2677: 154,
2678: 154,
2679: 154,
2680: 154,
2681: 154,
2682: 154,
2683: 154,
2684: 154,
2685: 154,
2686: 154,
2687: 154,
2688: 154,
2689: 154,
2690: 154,
2691: 154,
2692: 154,
2693: 154,
2694: 154,
2695: 154,
2696: 154,
2697: 154,
2698: 154,
2699: 154,
2700: 154,
2701: 154,
2702: 154,
2703: 154,
2704: 154,
2705: 154,
2706: 154,
2707: 154,
2708: 154,
2709: 154,
2710: 154,
2711: 154,
2712: 154,
2713: 154,
2714: 154,
2715: 154,
2716: 154,
2717: 154,
2718: 154,
2719: 154,
2720: 154,
2721: 154,
2722: 154,
2723: 154,
2724: 154,
2725: 154,
2726: 154,
2727: 154,
2728: 154,
2729: 154,
2730: 154,
2731: 154,
2732: 154,
2733: 154,
2734: 154,
2735: 154,
2736: 154,
2737: 154,
2738: 154,
2739: 154,
2740: 154,
2741: 154,
2742: 154,
2743: 154,
2744: 154,
2745: 154,
2746: 154,
2747: 154,
2748: 154,
2749: 154,
2750: 154,
2751: 154,
2752: 154,
2753: 154,
2754: 154,
2755: 154,
2756: 154,
2757: 154,
2758: 154,
2759: 154,
2760: 154,
2761: 154,
2762: 154,
2763: 154,
2764: 154,
2765: 154,
2766: 154,
2767: 154,
2768: 154,
2769: 154,
2770: 154,
2771: 154,
2772: 154,
2773: 154,
2774: 154,
2775: 154,
2776: 154,
2777: 154,
2778: 154,
2779: 154,
2780: 154,
2781: 154,
2782: 154,
2783: 154,
2784: 154,
2785: 154,
2786: 154,
2787: 154,
2788: 154,
2789: 154,
2790: 154,
2791: 154,
2792: 154,
2793: 154,
2794: 154,
2795: 154,
2796: 154,
2797: 154,
2798: 154,
2799: 154,
2800: 154,
2801: 154,
2802: 154,
2803: 154,
2804: 154,
2805: 154,
2806: 154,
2807: 154,
2808: 154,
2809: 154,
2810: 154,
2811: 154,
2812: 154,
2813: 154,
2814: 154,
2815: 154,
2816: 154,
2817: 154,
2818: 154,
2819: 154,
2820: 154,
2821: 154,
2822: 154,
2823: 154,
2824: 154,
2825: 154,
2826: 154,
2827: 154,
2828: 154,
2829: 154,
2830: 154,
2831: 154,
2832: 154,
2833: 154,
2834: 154,
2835: 154,
2836: 154,
2837: 154,
2838: 154,
2839: 154,
2840: 154,
2841: 154,
2842: 154,
2843: 154,
2844: 154,
2845: 154,
2846: 154,
2847: 154,
2848: 154,
2849: 154,
2850: 154,
2851: 154,
2852: 154,
2853: 154,
2854: 154,
2855: 154,
2856: 154,
2857: 154,
2858: 154,
2859: 154,
2860: 154,
2861: 154,
2862: 154,
2863: 154,
2864: 154,
2865: 154,
2866: 154,
2867: 154,
2868: 154,
2869: 154,
2870: 154,
2871: 154,
2872: 154,
2873: 154,
2874: 154,
2875: 154,
2876: 154,
2877: 154,
2878: 154,
2879: 154,
2880: 154,
2881: 154,
2882: 154,
2883: 154,
2884: 154,
2885: 154,
2886: 154,
2887: 154,
2888: 154,
2889: 154,
2890: 154,
2891: 154,
2892: 154,
2893: 154,
2894: 154,
2895: 154,
2896: 154,
2897: 154,
2898: 154,
2899: 154,
2900: 154,
2901: 154,
2902: 154,
2903: 154,
2904: 154,
2905: 154,
2906: 154,
2907: 154,
2908: 154,
2909: 154,
2910: 154,
2911: 154,
2912: 154,
2913: 154,
2914: 154,
2915: 154,
2916: 154,
2917: 154,
2918: 154,
2919: 154,
2920: 154,
2921: 154,
2922: 154,
2923: 154,
2924: 154,
2925: 154,
2926: 154,
2927: 154,
2928: 154,
2929: 154,
2930: 154,
2931: 154,
2932: 154,
2933: 154,
2934: 154,
2935: 154,
2936: 154,
2937: 154,
2938: 154,
2939: 154,
2940: 154,
2941: 154,
2942: 154,
2943: 154,
2944: 154,
2945: 154,
2946: 154,
2947: 154,
2948: 154,
2949: 154,
2950: 154,
2951: 154,
2952: 154,
2953: 154,
2954: 154,
2955: 154,
2956: 154,
2957: 154,
2958: 154,
2959: 154,
2960: 154,
2961: 154,
2962: 154,
2963: 154,
2964: 154,
2965: 154,
2966: 154,
2967: 154,
2968: 154,
2969: 154,
2970: 154,
2971: 154,
2972: 154,
2973: 154,
2974: 154,
2975: 154,
2976: 154,
2977: 154,
2978: 154,
2979: 154,
2980: 154,
2981: 154,
2982: 154,
2983: 154,
2984: 154,
2985: 154,
2986: 154,
2987: 154,
2988: 154,
2989: 154,
2990: 154,
2991: 154,
2992: 154,
2993: 154,
2994: 154,
2995: 154,
2996: 154,
2997: 154,
2998: 154,
2999: 154,
3000: 154,
3001: 154,
3002: 154,
3003: 154,
3004: 154,
3005: 154,
3006: 154,
3007: 154,
3008: 154,
3009: 154,
3010: 154,
3011: 154,
3012: 154,
3013: 154,
3014: 154,
3015: 154,
3016: 154,
3017: 154,
3018: 154,
3019: 154,
3020: 154,
3021: 154,
3022: 154,
3023: 154,
3024: 154,
3025: 154,
3026: 154,
3027: 154,
3028: 154,
3029: 154,
3030: 154,
3031: 154,
3032: 154,
3033: 154,
3034: 154,
3035: 154,
3036: 154,
3037: 154,
3038: 154,
3039: 154,
3040: 154,
3041: 154,
3042: 154,
3043: 154,
3044: 154,
3045: 154,
3046: 154,
3047: 154,
3048: 154,
3049: 154,
3050: 154,
3051: 154,
3052: 154,
3053: 154,
3054: 154,
3055: 154,
3056: 154,
3057: 154,
3058: 154,
3059: 154,
3060: 154,
3061: 154,
3062: 154,
3063: 154,
3064: 154,
3065: 154,
3066: 154,
3067: 154,
3068: 154,
3069: 154,
3070: 154,
3071: 154,
3072: 154,
3073: 154,
3074: 154,
3075: 154,
3076: 154,
3077: 154,
3078: 154,
3079: 154,
3080: 154,
3081: 154,
3082: 154,
3083: 154,
3084: 154,
3085: 154,
3086: 154,
3087: 154,
3088: 154,
3089: 154,
3090: 154,
3091: 154,
3092: 154,
3093: 154,
3094: 154,
3095: 154,
3096: 154,
3097: 154,
3098: 154,
3099: 154,
3100: 154,
3101: 154,
3102: 154,
3103: 154,
3104: 154,
3105: 154,
3106: 154,
3107: 154,
3108: 154,
3109: 154,
3110: 154,
3111: 154,
3112: 154,
3113: 154,
3114: 154,
3115: 154,
3116: 154,
3117: 154,
3118: 154,
3119: 154,
3120: 154,
3121: 154,
3122: 154,
3123: 154,
3124: 154,
3125: 154,
3126: 154,
3127: 154,
3128: 154,
3129: 154,
3130: 154,
3131: 154,
3132: 154,
3133: 154,
3134: 154,
3135: 154,
3136: 154,
3137: 154,
3138: 154,
3139: 154,
3140: 154,
3141: 154,
3142: 154,
3143: 154,
3144: 154,
3145: 154,
3146: 154,
3147: 154,
3148: 154,
3149: 154,
3150: 154,
3151: 154,
3152: 154,
3153: 154,
3154: 154,
3155: 154,
3156: 154,
3157: 154,
3158: 154,
3159: 154,
3160: 154,
3161: 154,
3162: 154,
3163: 154,
3164: 154,
3165: 154,
3166: 154,
3167: 154,
3168: 154,
3169: 154,
3170: 154,
3171: 154,
3172: 154,
3173: 154,
3174: 154,
3175: 154,
3176: 154,
3177: 154,
3178: 154,
3179: 154,
3180: 154,
3181: 154,
3182: 154,
3183: 154,
3184: 154,
3185: 154,
3186: 154,
3187: 154,
3188: 154,
3189: 154,
3190: 154,
3191: 154,
3192: 154,
3193: 154,
3194: 154,
3195: 154,
3196: 154,
3197: 154,
3198: 154,
3199: 154,
3200: 154,
3201: 154,
3202: 154,
3203: 154,
3204: 154,
3205: 154,
3206: 154,
3207: 154,
3208: 154,
3209: 154,
3210: 154,
3211: 154,
3212: 154,
3213: 154,
3214: 154,
3215: 154,
3216: 154,
3217: 154,
3218: 154,
3219: 154,
3220: 154,
3221: 154,
3222: 154,
3223: 154,
3224: 154,
3225: 154,
3226: 154,
3227: 154,
3228: 154,
3229: 154,
3230: 154,
3231: 154,
3232: 154,
3233: 154,
3234: 154,
3235: 154,
3236: 154,
3237: 154,
3238: 154,
3239: 154,
3240: 154,
3241: 154,
3242: 154,
3243: 154,
3244: 154,
3245: 154,
3246: 154,
3247: 154,
3248: 154,
3249: 154,
3250: 154,
3251: 154,
3252: 154,
3253: 154,
3254: 154,
3255: 154,
3256: 154,
3257: 154,
3258: 154,
3259: 154,
3260: 154,
3261: 154,
3262: 154,
3263: 154,
3264: 154,
3265: 154,
3266: 154,
3267: 154,
3268: 154,
3269: 154,
3270: 154,
3271: 154,
3272: 154,
3273: 154,
3274: 154,
3275: 154,
3276: 154,
3277: 154,
3278: 154,
3279: 154,
3280: 154,
3281: 154,
3282: 154,
3283: 154,
3284: 154,
3285: 154,
3286: 154,
3287: 154,
3288: 154,
3289: 154,
3290: 154,
3291: 154,
3292: 154,
3293: 154,
3294: 154,
3295: 154,
3296: 154,
3297: 154,
3298: 154,
3299: 154,
3300: 154,
3301: 154,
3302: 154,
3303: 154,
3304: 154,
3305: 154,
3306: 154,
3307: 154,
3308: 154,
3309: 154,
3310: 154,
3311: 154,
3312: 154,
3313: 154,
3314: 154,
3315: 154,
3316: 154,
3317: 154,
3318: 154,
3319: 154,
3320: 154,
3321: 154,
3322: 154,
3323: 154,
3324: 154,
3325: 154,
3326: 154,
3327: 154,
3328: 154,
3329: 154,
3330: 154,
3331: 154,
3332: 154,
3333: 154,
3334: 154,
3335: 154,
3336: 154,
3337: 154,
3338: 154,
3339: 154,
3340: 154,
3341: 154,
3342: 154,
3343: 154,
3344: 154,
3345: 154,
3346: 154,
3347: 154,
3348: 154,
3349: 154,
3350: 154,
3351: 154,
3352: 154,
3353: 154,
3354: 154,
3355: 154,
3356: 154,
3357: 154,
3358: 154,
3359: 154,
3360: 154,
3361: 154,
3362: 154,
3363: 154,
3364: 154,
3365: 154,
3366: 154,
3367: 154,
3368: 154,
3369: 154,
3370: 154,
3371: 154,
3372: 154,
3373: 154,
3374: 154,
3375: 154,
3376: 154,
3377: 154,
3378: 154,
3379: 154,
3380: 154,
3381: 154,
3382: 154,
3383: 154,
3384: 154,
3385: 154,
3386: 154,
3387: 154,
3388: 154,
3389: 154,
3390: 154,
3391: 154,
3392: 154,
3393: 154,
3394: 154,
3395: 154,
3396: 154,
3397: 154,
3398: 154,
3399: 154,
3400: 154,
3401: 154,
3402: 154,
3403: 154,
3404: 154,
3405: 154,
3406: 154,
3407: 154,
3408: 154,
3409: 154,
3410: 155,
3411: 156,
3412: 157,
3413: 158,
3414: 159,
3415: 159,
3416: 159,
3417: 159,
3418: 159,
3419: 159,
3420: 159,
3421: 159,
3422: 160,
3423: 160,
3424: 160,
3425: 160,
3426: 160,
3427: 160,
3428: 160,
3429: 160,
3430: 161,
3431: 161,
3432: 161,
3433: 161,
3434: 161,
3435: 161,
3436: 161,
3437: 161,
3438: 162,
3439: 162,
3440: 162,
3441: 162,
3442: 162,
3443: 162,
3444: 162,
3445: 162,
3446: 162,
3447: 162,
3448: 162,
3449: 162,
3450: 162,
3451: 162,
3452: 162,
3453: 162,
3454: 162,
3455: 162,
3456: 162,
3457: 162,
3458: 162,
3459: 162,
3460: 162,
3461: 162,
3462: 162,
3463: 162,
3464: 162,
3465: 162,
3466: 162,
3467: 162,
3468: 162,
3469: 162,
3470: 163,
3471: 163,
3472: 163,
3473: 163,
3474: 163,
3475: 163,
3476: 163,
3477: 163,
3478: 163,
3479: 163,
3480: 163,
3481: 163,
3482: 163,
3483: 163,
3484: 163,
3485: 163,
3486: 163,
3487: 163,
3488: 163,
3489: 163,
3490: 163,
3491: 163,
3492: 163,
3493: 163,
3494: 163,
3495: 163,
3496: 163,
3497: 163,
3498: 163,
3499: 163,
3500: 163,
3501: 163,
3502: 164,
3503: 164,
3504: 164,
3505: 164,
3506: 164,
3507: 164,
3508: 164,
3509: 164,
3510: 164,
3511: 164,
3512: 164,
3513: 164,
3514: 164,
3515: 164,
3516: 164,
3517: 164,
3518: 164,
3519: 164,
3520: 164,
3521: 164,
3522: 164,
3523: 164,
3524: 164,
3525: 164,
3526: 164,
3527: 164,
3528: 164,
3529: 164,
3530: 164,
3531: 164,
3532: 164,
3533: 164,
3534: 165,
3535: 165,
3536: 165,
3537: 165,
3538: 165,
3539: 165,
3540: 165,
3541: 165,
3542: 165,
3543: 165,
3544: 165,
3545: 165,
3546: 165,
3547: 165,
3548: 165,
3549: 165,
3550: 165,
3551: 165,
3552: 165,
3553: 165,
3554: 165,
3555: 165,
3556: 165,
3557: 165,
3558: 165,
3559: 165,
3560: 165,
3561: 165,
3562: 165,
3563: 165,
3564: 165,
3565: 165,
3566: 166,
3567: 166,
3568: 166,
3569: 166,
3570: 166,
3571: 166,
3572: 166,
3573: 166,
3574: 166,
3575: 166,
3576: 166,
3577: 166,
3578: 166,
3579: 166,
3580: 166,
3581: 166,
3582: 166,
3583: 166,
3584: 166,
3585: 166,
3586: 166,
3587: 166,
3588: 166,
3589: 166,
3590: 166,
3591: 166,
3592: 166,
3593: 166,
3594: 166,
3595: 166,
3596: 166,
3597: 166,
3598: 167,
3599: 167,
3600: 167,
3601: 167,
3602: 167,
3603: 167,
3604: 167,
3605: 167,
3606: 167,
3607: 167,
3608: 167,
3609: 167,
3610: 167,
3611: 167,
3612: 167,
3613: 167,
3614: 167,
3615: 167,
3616: 167,
3617: 167,
3618: 167,
3619: 167,
3620: 167,
3621: 167,
3622: 167,
3623: 167,
3624: 167,
3625: 167,
3626: 167,
3627: 167,
3628: 167,
3629: 167,
3630: 168,
3631: 168,
3632: 168,
3633: 168,
3634: 168,
3635: 168,
3636: 168,
3637: 168,
3638: 168,
3639: 168,
3640: 168,
3641: 168,
3642: 168,
3643: 168,
3644: 168,
3645: 168,
3646: 168,
3647: 168,
3648: 168,
3649: 168,
3650: 168,
3651: 168,
3652: 168,
3653: 168,
3654: 168,
3655: 168,
3656: 168,
3657: 168,
3658: 168,
3659: 168,
3660: 168,
3661: 168,
3662: 168,
3663: 168,
3664: 168,
3665: 168,
3666: 168,
3667: 168,
3668: 168,
3669: 168,
3670: 168,
3671: 168,
3672: 168,
3673: 168,
3674: 168,
3675: 168,
3676: 168,
3677: 168,
3678: 168,
3679: 168,
3680: 168,
3681: 168,
3682: 168,
3683: 168,
3684: 168,
3685: 168,
3686: 168,
3687: 168,
3688: 168,
3689: 168,
3690: 168,
3691: 168,
3692: 168,
3693: 168,
3694: 169,
3695: 169,
3696: 169,
3697: 169,
3698: 169,
3699: 169,
3700: 169,
3701: 169,
3702: 170,
3703: 170,
3704: 170,
3705: 170,
3706: 170,
3707: 170,
3708: 170,
3709: 170,
3710: 170,
3711: 170,
3712: 170,
3713: 170,
3714: 170,
3715: 170,
3716: 170,
3717: 170,
3718: 170,
3719: 170,
3720: 170,
3721: 170,
3722: 171,
3723: 171,
3724: 171,
3725: 171,
3726: 171,
3727: 171,
3728: 171,
3729: 171,
3730: 171,
3731: 171,
3732: 171,
3733: 171,
3734: 171,
3735: 171,
3736: 171,
3737: 171,
3738: 171,
3739: 171,
3740: 171,
3741: 171,
3742: 171,
3743: 171,
3744: 171,
3745: 171,
3746: 171,
3747: 171,
3748: 171,
3749: 171,
3750: 171,
3751: 171,
3752: 171,
3753: 171,
3754: 171,
3755: 171,
3756: 171,
3757: 171,
3758: 171,
3759: 171,
3760: 171,
3761: 171,
3762: 171,
3763: 171,
3764: 171,
3765: 171,
3766: 171,
3767: 171,
3768: 171,
3769: 171,
3770: 171,
3771: 171,
3772: 171,
3773: 171,
3774: 171,
3775: 171,
3776: 171,
3777: 171,
3778: 171,
3779: 171,
3780: 171,
3781: 171,
3782: 171,
3783: 171,
3784: 171,
3785: 171,
3786: 171,
3787: 171,
3788: 171,
3789: 171,
3790: 171,
3791: 171,
3792: 171,
3793: 171,
3794: 171,
3795: 171,
3796: 171,
3797: 171,
3798: 171,
3799: 171,
3800: 171,
3801: 171,
3802: 172,
3803: 172,
3804: 172,
3805: 172,
3806: 172,
3807: 172,
3808: 172,
3809: 172,
3810: 173,
3811: 173,
3812: 173,
3813: 173,
3814: 173,
3815: 173,
3816: 173,
3817: 173,
3818: 174,
3819: 174,
3820: 174,
3821: 174,
3822: 174,
3823: 174,
3824: 174,
3825: 174,
3826: 175,
3827: 175,
3828: 175,
3829: 175,
3830: 175,
3831: 175,
3832: 175,
3833: 175,
3834: 176,
3835: 176,
3836: 176,
3837: 176,
3838: 176,
3839: 176,
3840: 176,
3841: 176,
3842: 177,
3843: 177,
3844: 177,
3845: 177,
3846: 177,
3847: 177,
3848: 177,
3849: 177,
3850: 178,
3851: 178,
3852: 178,
3853: 178,
3854: 178,
3855: 178,
3856: 178,
3857: 178,
3858: 178,
3859: 178,
3860: 178,
3861: 178,
3862: 178,
3863: 178,
3864: 178,
3865: 178,
3866: 178,
3867: 178,
3868: 178,
3869: 178,
3870: 178,
3871: 178,
3872: 178,
3873: 178,
3874: 179,
3875: 179,
3876: 180,
3877: 180,
3878: 180,
3879: 180,
3880: 180,
3881: 180,
3882: 180,
3883: 180,
3884: 180,
3885: 180,
3886: 180,
3887: 180,
3888: 180,
3889: 180,
3890: 180,
3891: 180,
3892: 180,
3893: 180,
3894: 180,
3895: 180,
3896: 180,
3897: 180,
3898: 180,
3899: 180,
3900: 180,
3901: 180,
3902: 180,
3903: 180,
3904: 180,
3905: 180,
3906: 180,
3907: 180,
3908: 180,
3909: 180,
3910: 180,
3911: 180,
3912: 180,
3913: 180,
3914: 180,
3915: 180,
3916: 180,
3917: 180,
3918: 180,
3919: 180,
3920: 180,
3921: 180,
3922: 180,
3923: 180,
3924: 180,
3925: 180,
3926: 180,
3927: 180,
3928: 180,
3929: 180,
3930: 180,
3931: 180,
3932: 180,
3933: 180,
3934: 180,
3935: 180,
3936: 180,
3937: 180,
3938: 180,
3939: 180,
3940: 181,
3941: 181,
3942: 182,
3943: 182,
3944: 183,
3945: 183,
3946: 184,
3947: 184,
3948: 185,
3949: 185,
3950: 186,
3951: 186,
3952: 187,
3953: 187,
3954: 188,
3955: 188,
3956: 189,
3957: 189,
3958: 190,
3959: 190,
3960: 190,
3961: 190,
3962: 190,
3963: 190,
3964: 190,
3965: 190,
3966: 191,
3967: 191,
3968: 191,
3969: 191,
3970: 191,
3971: 191,
3972: 191,
3973: 191,
3974: 191,
3975: 191,
3976: 191,
3977: 191,
3978: 191,
3979: 191,
3980: 191,
3981: 191,
3982: 191,
3983: 191,
3984: 191,
3985: 191,
3986: 191,
3987: 191,
3988: 191,
3989: 191,
3990: 192,
3991: 192,
3992: 192,
3993: 192,
3994: 192,
3995: 192,
3996: 192,
3997: 192,
3998: 193,
3999: 194,
4000: 195,
4001: 195,
4002: 195,
4003: 195,
4004: 195,
4005: 195,
4006: 195,
4007: 195,
4008: 195,
4009: 195,
4010: 195,
4011: 195,
4012: 195,
4013: 195,
4014: 195,
4015: 195,
4016: 196,
4017: 197,
4018: 197,
4019: 197,
4020: 197,
4021: 197,
4022: 197,
4023: 197,
4024: 197,
4025: 197,
4026: 197,
4027: 197,
4028: 197,
4029: 197,
4030: 197,
4031: 197,
4032: 197,
4033: 198,
4034: 198,
4035: 199,
4036: 199,
4037: 199,
4038: 199,
4039: 199,
4040: 199,
4041: 199,
4042: 199,
4043: 199,
4044: 199,
4045: 199,
4046: 199,
4047: 199,
4048: 199,
4049: 199,
4050: 199,
4051: 199,
4052: 199,
4053: 199,
4054: 199,
4055: 199,
4056: 199,
4057: 199,
4058: 199,
4059: 199,
4060: 199,
4061: 199,
4062: 199,
4063: 199,
4064: 199,
4065: 199,
4066: 199,
4067: 200,
4068: 201,
4069: 202,
4070: 203,
4071: 204,
4072: 204,
4073: 204,
4074: 205,
4075: 205,
4076: 205,
4077: 206,
4078: 207,
4079: 207,
4080: 207,
4081: 207,
4082: 208,
4083: 209,
4084: 209,
4085: 210,
4086: 210,
4087: 210,
4088: 210,
4089: 211,
4090: 211,
4091: 211,
4092: 211,
4093: 212,
4094: 212,
4095: 212,
4096: 212,
4097: 212,
4098: 212,
4099: 212,
4100: 213,
4101: 213,
4102: 213,
4103: 213,
4104: 213,
4105: 213,
4106: 213,
4107: 213,
4108: 213,
4109: 213,
4110: 213,
4111: 213,
4112: 213,
4113: 213,
4114: 213,
4115: 213,
4116: 213,
4117: 213,
4118: 213,
4119: 213,
4120: 213,
4121: 213,
4122: 213,
4123: 213,
4124: 213,
4125: 213,
4126: 213,
4127: 213,
4128: 213,
4129: 213,
4130: 213,
4131: 213,
4132: 213,
4133: 213,
4134: 213,
4135: 213,
4136: 213,
4137: 213,
4138: 213,
4139: 213,
4140: 213,
4141: 213,
4142: 213,
4143: 213,
4144: 213,
4145: 213,
4146: 213,
4147: 213,
4148: 213,
4149: 213,
4150: 213,
4151: 213,
4152: 213,
4153: 213,
4154: 213,
4155: 213,
4156: 213,
4157: 213,
4158: 213,
4159: 213,
4160: 213,
4161: 213,
4162: 213,
4163: 213,
4164: 214,
4165: 215,
4166: 216,
4167: 217,
4168: 218,
4169: 219,
4170: 220,
4171: 221,
4172: 222,
4173: 223,
4174: 224,
4175: 225,
4176: 226,
4177: 227,
4178: 228,
4179: 229,
4180: 230,
4181: 230,
4182: 230,
4183: 230,
4184: 230,
4185: 230,
4186: 230,
4187: 230,
4188: 230,
4189: 230,
4190: 230,
4191: 230,
4192: 230,
4193: 230,
4194: 230,
4195: 230,
4196: 230,
4197: 230,
4198: 230,
4199: 230,
4200: 230,
4201: 230,
4202: 230,
4203: 230,
4204: 230,
4205: 230,
4206: 230,
4207: 230,
4208: 230,
4209: 230,
4210: 230,
4211: 230,
4212: 230,
4213: 230,
4214: 230,
4215: 230,
4216: 230,
4217: 230,
4218: 230,
4219: 230,
4220: 230,
4221: 230,
4222: 230,
4223: 230,
4224: 230,
4225: 230,
4226: 230,
4227: 230,
4228: 230,
4229: 230,
4230: 230,
4231: 230,
4232: 230,
4233: 230,
4234: 230,
4235: 230,
4236: 230,
4237: 230,
4238: 230,
4239: 230,
4240: 230,
4241: 230,
4242: 230,
4243: 230,
4244: 231,
4245: 231,
4246: 231,
4247: 231,
4248: 231,
4249: 231,
4250: 231,
4251: 231,
4252: 231,
4253: 231,
4254: 231,
4255: 231,
4256: 231,
4257: 231,
4258: 231,
4259: 231,
4260: 231,
4261: 231,
4262: 231,
4263: 231,
4264: 231,
4265: 231,
4266: 231,
4267: 231,
4268: 231,
4269: 231,
4270: 231,
4271: 231,
4272: 231,
4273: 231,
4274: 231,
4275: 231,
4276: 231,
4277: 231,
4278: 231,
4279: 231,
4280: 231,
4281: 231,
4282: 231,
4283: 231,
4284: 231,
4285: 231,
4286: 231,
4287: 231,
4288: 231,
4289: 231,
4290: 231,
4291: 231,
4292: 231,
4293: 231,
4294: 231,
4295: 231,
4296: 231,
4297: 231,
4298: 231,
4299: 231,
4300: 231,
4301: 231,
4302: 231,
4303: 231,
4304: 231,
4305: 231,
4306: 231,
4307: 231,
4308: 232,
4309: 232,
4310: 232,
4311: 232,
4312: 232,
4313: 232,
4314: 232,
4315: 232,
4316: 232,
4317: 232,
4318: 232,
4319: 232,
4320: 232,
4321: 232,
4322: 232,
4323: 232,
4324: 232,
4325: 232,
4326: 232,
4327: 232,
4328: 232,
4329: 232,
4330: 232,
4331: 232,
4332: 232,
4333: 232,
4334: 232,
4335: 232,
4336: 232,
4337: 232,
4338: 232,
4339: 232,
4340: 232,
4341: 232,
4342: 232,
4343: 232,
4344: 232,
4345: 232,
4346: 232,
4347: 232,
4348: 232,
4349: 232,
4350: 232,
4351: 232,
4352: 232,
4353: 232,
4354: 232,
4355: 232,
4356: 232,
4357: 232,
4358: 232,
4359: 232,
4360: 232,
4361: 232,
4362: 232,
4363: 232,
4364: 232,
4365: 232,
4366: 232,
4367: 232,
4368: 232,
4369: 232,
4370: 232,
4371: 232,
4372: 233,
4373: 233,
4374: 233,
4375: 233,
4376: 233,
4377: 233,
4378: 233,
4379: 233,
4380: 233,
4381: 233,
4382: 233,
4383: 233,
4384: 233,
4385: 233,
4386: 233,
4387: 233,
4388: 233,
4389: 233,
4390: 233,
4391: 233,
4392: 233,
4393: 233,
4394: 233,
4395: 233,
4396: 233,
4397: 233,
4398: 233,
4399: 233,
4400: 233,
4401: 233,
4402: 233,
4403: 233,
4404: 233,
4405: 233,
4406: 233,
4407: 233,
4408: 233,
4409: 233,
4410: 233,
4411: 233,
4412: 233,
4413: 233,
4414: 233,
4415: 233,
4416: 233,
4417: 233,
4418: 233,
4419: 233,
4420: 233,
4421: 233,
4422: 233,
4423: 233,
4424: 233,
4425: 233,
4426: 233,
4427: 233,
4428: 233,
4429: 233,
4430: 233,
4431: 233,
4432: 233,
4433: 233,
4434: 233,
4435: 233,
4436: 234,
4437: 234,
4438: 234,
4439: 234,
4440: 234,
4441: 234,
4442: 234,
4443: 234,
4444: 234,
4445: 234,
4446: 234,
4447: 234,
4448: 234,
4449: 234,
4450: 234,
4451: 234,
4452: 234,
4453: 234,
4454: 234,
4455: 234,
4456: 234,
4457: 234,
4458: 234,
4459: 234,
4460: 234,
4461: 234,
4462: 234,
4463: 234,
4464: 234,
4465: 234,
4466: 234,
4467: 234,
4468: 234,
4469: 234,
4470: 234,
4471: 234,
4472: 234,
4473: 234,
4474: 234,
4475: 234,
4476: 234,
4477: 234,
4478: 234,
4479: 234,
4480: 234,
4481: 234,
4482: 234,
4483: 234,
4484: 234,
4485: 234,
4486: 234,
4487: 234,
4488: 234,
4489: 234,
4490: 234,
4491: 234,
4492: 234,
4493: 234,
4494: 234,
4495: 234,
4496: 234,
4497: 234,
4498: 234,
4499: 234,
4500: 235,
4501: 235,
4502: 235,
4503: 235,
4504: 235,
4505: 235,
4506: 235,
4507: 235,
4508: 235,
4509: 235,
4510: 235,
4511: 235,
4512: 235,
4513: 235,
4514: 235,
4515: 235,
4516: 235,
4517: 235,
4518: 235,
4519: 235,
4520: 235,
4521: 235,
4522: 235,
4523: 235,
4524: 235,
4525: 235,
4526: 235,
4527: 235,
4528: 235,
4529: 235,
4530: 235,
4531: 235,
4532: 235,
4533: 235,
4534: 235,
4535: 235,
4536: 235,
4537: 235,
4538: 235,
4539: 235,
4540: 235,
4541: 235,
4542: 235,
4543: 235,
4544: 235,
4545: 235,
4546: 235,
4547: 235,
4548: 235,
4549: 235,
4550: 235,
4551: 235,
4552: 235,
4553: 235,
4554: 235,
4555: 235,
4556: 235,
4557: 235,
4558: 235,
4559: 235,
4560: 235,
4561: 235,
4562: 235,
4563: 235,
4564: 236,
4565: 237,
4566: 238,
4567: 239,
4568: 240,
4569: 241,
4570: 242,
4571: 243,
4572: 244,
4573: 245,
4574: 246,
4575: 246,
4576: 246,
4577: 246,
4578: 246,
4579: 246,
4580: 246,
4581: 246,
4582: 246,
4583: 246,
4584: 246,
4585: 246,
4586: 246,
4587: 246,
4588: 246,
4589: 246,
4590: 246,
4591: 246,
4592: 246,
4593: 246,
4594: 246,
4595: 246,
4596: 246,
4597: 246,
4598: 246,
4599: 246,
4600: 246,
4601: 246,
4602: 246,
4603: 246,
4604: 246,
4605: 246,
4606: 246,
4607: 246,
4608: 246,
4609: 246,
4610: 246,
4611: 246,
4612: 246,
4613: 246,
4614: 246,
4615: 246,
4616: 246,
4617: 246,
4618: 246,
4619: 246,
4620: 246,
4621: 246,
4622: 246,
4623: 246,
4624: 246,
4625: 246,
4626: 246,
4627: 246,
4628: 246,
4629: 246,
4630: 246,
4631: 246,
4632: 246,
4633: 246,
4634: 246,
4635: 246,
4636: 246,
4637: 246,
4638: 247,
4639: 247,
4640: 247,
4641: 247,
4642: 247,
4643: 247,
4644: 247,
4645: 247,
4646: 247,
4647: 247,
4648: 247,
4649: 247,
4650: 247,
4651: 247,
4652: 247,
4653: 247,
4654: 247,
4655: 247,
4656: 247,
4657: 247,
4658: 247,
4659: 247,
4660: 247,
4661: 247,
4662: 247,
4663: 247,
4664: 247,
4665: 247,
4666: 247,
4667: 247,
4668: 247,
4669: 247,
4670: 247,
4671: 247,
4672: 247,
4673: 247,
4674: 247,
4675: 247,
4676: 247,
4677: 247,
4678: 247,
4679: 247,
4680: 247,
4681: 247,
4682: 247,
4683: 247,
4684: 247,
4685: 247,
4686: 247,
4687: 247,
4688: 247,
4689: 247,
4690: 247,
4691: 247,
4692: 247,
4693: 247,
4694: 247,
4695: 247,
4696: 247,
4697: 247,
4698: 247,
4699: 247,
4700: 247,
4701: 247,
4702: 248,
4703: 248,
4704: 248,
4705: 248,
4706: 248,
4707: 248,
4708: 248,
4709: 248,
4710: 248,
4711: 248,
4712: 248,
4713: 248,
4714: 248,
4715: 248,
4716: 248,
4717: 248,
4718: 248,
4719: 248,
4720: 248,
4721: 248,
4722: 248,
4723: 248,
4724: 248,
4725: 248,
4726: 248,
4727: 248,
4728: 248,
4729: 248,
4730: 248,
4731: 248,
4732: 248,
4733: 248,
4734: 248,
4735: 248,
4736: 248,
4737: 248,
4738: 248,
4739: 248,
4740: 248,
4741: 248,
4742: 248,
4743: 248,
4744: 248,
4745: 248,
4746: 248,
4747: 248,
4748: 248,
4749: 248,
4750: 248,
4751: 248,
4752: 248,
4753: 248,
4754: 248,
4755: 248,
4756: 248,
4757: 248,
4758: 248,
4759: 248,
4760: 248,
4761: 248,
4762: 248,
4763: 248,
4764: 248,
4765: 248,
4766: 249,
4767: 249,
4768: 249,
4769: 249,
4770: 249,
4771: 249,
4772: 249,
4773: 249,
4774: 249,
4775: 249,
4776: 249,
4777: 249,
4778: 249,
4779: 249,
4780: 249,
4781: 249,
4782: 249,
4783: 249,
4784: 249,
4785: 249,
4786: 249,
4787: 249,
4788: 249,
4789: 249,
4790: 249,
4791: 249,
4792: 249,
4793: 249,
4794: 249,
4795: 249,
4796: 249,
4797: 249,
4798: 250,
4799: 250,
4800: 250,
4801: 250,
4802: 250,
4803: 250,
4804: 251,
4805: 251,
4806: 251,
4807: 251,
4808: 251,
4809: 251,
4810: 251,
4811: 251,
4812: 251,
4813: 251,
4814: 251,
4815: 251,
4816: 251,
4817: 251,
4818: 251,
4819: 251,
4820: 251,
4821: 251,
4822: 251,
4823: 251,
4824: 251,
4825: 251,
4826: 251,
4827: 251,
4828: 251,
4829: 251,
4830: 251,
4831: 251,
4832: 251,
4833: 251,
4834: 251,
4835: 251,
4836: 252,
4837: 253,
4838: 253,
4839: 253,
4840: 253,
4841: 254,
4842: 254,
4843: 254,
4844: 254,
4845: 255,
4846: 255,
4847: 255,
4848: 255,
4849: 255,
4850: 255,
4851: 255,
4852: 255,
4853: 256,
4854: 256,
4855: 256,
4856: 256,
4857: 256,
4858: 256,
4859: 256,
4860: 256,
4861: 257,
4862: 257,
4863: 257,
4864: 257,
4865: 257,
4866: 257,
4867: 257,
4868: 257,
4869: 257,
4870: 257,
4871: 257,
4872: 257,
4873: 257,
4874: 257,
4875: 257,
4876: 257,
4877: 257,
4878: 257,
4879: 257,
4880: 257,
4881: 257,
4882: 257,
4883: 257,
4884: 257,
4885: 257,
4886: 257,
4887: 257,
4888: 257,
4889: 257,
4890: 257,
4891: 257,
4892: 257,
4893: 258,
4894: 258,
4895: 258,
4896: 258,
4897: 258,
4898: 258,
4899: 258,
4900: 258,
4901: 258,
4902: 258,
4903: 258,
4904: 258,
4905: 258,
4906: 258,
4907: 258,
4908: 258,
4909: 258,
4910: 258,
4911: 258,
4912: 258,
4913: 258,
4914: 258,
4915: 258,
4916: 258,
4917: 258,
4918: 258,
4919: 258,
4920: 258,
4921: 258,
4922: 258,
4923: 258,
4924: 258,
4925: 258,
4926: 258,
4927: 258,
4928: 258,
4929: 258,
4930: 258,
4931: 258,
4932: 258,
4933: 258,
4934: 258,
4935: 258,
4936: 258,
4937: 258,
4938: 258,
4939: 258,
4940: 258,
4941: 258,
4942: 258,
4943: 258,
4944: 258,
4945: 258,
4946: 258,
4947: 258,
4948: 258,
4949: 258,
4950: 258,
4951: 258,
4952: 258,
4953: 258,
4954: 258,
4955: 258,
4956: 258,
4957: 258,
4958: 258,
4959: 258,
4960: 258,
4961: 258,
4962: 258,
4963: 258,
4964: 258,
4965: 258,
4966: 258,
4967: 258,
4968: 258,
4969: 258,
4970: 258,
4971: 258,
4972: 258,
4973: 258,
4974: 258,
4975: 258,
4976: 258,
4977: 258,
4978: 258,
4979: 258,
4980: 258,
4981: 258,
4982: 258,
4983: 258,
4984: 258,
4985: 258,
4986: 258,
4987: 258,
4988: 258,
4989: 258,
4990: 258,
4991: 258,
4992: 258,
4993: 258,
4994: 258,
4995: 258,
4996: 258,
4997: 258,
4998: 258,
4999: 258,
5000: 258,
5001: 258,
5002: 258,
5003: 258,
5004: 258,
5005: 258,
5006: 258,
5007: 258,
5008: 258,
5009: 258,
5010: 258,
5011: 258,
5012: 258,
5013: 258,
5014: 258,
5015: 258,
5016: 258,
5017: 258,
5018: 258,
5019: 258,
5020: 258,
5021: 259,
5022: 259,
5023: 259,
5024: 259,
5025: 259,
5026: 259,
5027: 259,
5028: 259,
5029: 259,
5030: 259,
5031: 259,
5032: 259,
5033: 259,
5034: 259,
5035: 259,
5036: 259,
5037: 259,
5038: 259,
5039: 259,
5040: 259,
5041: 259,
5042: 259,
5043: 259,
5044: 259,
5045: 259,
5046: 259,
5047: 259,
5048: 259,
5049: 259,
5050: 259,
5051: 259,
5052: 259,
5053: 260,
5054: 260,
5055: 260,
5056: 260,
5057: 260,
5058: 260,
5059: 260,
5060: 260,
5061: 260,
5062: 260,
5063: 260,
5064: 260,
5065: 260,
5066: 260,
5067: 260,
5068: 260,
5069: 260,
5070: 260,
5071: 260,
5072: 260,
5073: 260,
5074: 260,
5075: 260,
5076: 260,
5077: 260,
5078: 260,
5079: 260,
5080: 260,
5081: 260,
5082: 260,
5083: 260,
5084: 260,
5085: 260,
5086: 260,
5087: 260,
5088: 260,
5089: 260,
5090: 260,
5091: 260,
5092: 260,
5093: 260,
5094: 260,
5095: 260,
5096: 260,
5097: 260,
5098: 260,
5099: 260,
5100: 260,
5101: 260,
5102: 260,
5103: 260,
5104: 260,
5105: 260,
5106: 260,
5107: 260,
5108: 260,
5109: 260,
5110: 260,
5111: 260,
5112: 260,
5113: 260,
5114: 260,
5115: 260,
5116: 260,
5117: 260,
5118: 260,
5119: 260,
5120: 260,
5121: 260,
5122: 260,
5123: 260,
5124: 260,
5125: 260,
5126: 260,
5127: 260,
5128: 260,
5129: 260,
5130: 260,
5131: 260,
5132: 260,
5133: 261,
5134: 261,
5135: 261,
5136: 261,
5137: 261,
5138: 261,
5139: 261,
5140: 261,
5141: 261,
5142: 261,
5143: 261,
5144: 261,
5145: 261,
5146: 261,
5147: 261,
5148: 261,
5149: 261,
5150: 261,
5151: 261,
5152: 261,
5153: 261,
5154: 261,
5155: 261,
5156: 261,
5157: 261,
5158: 261,
5159: 261,
5160: 261,
5161: 261,
5162: 261,
5163: 261,
5164: 261,
5165: 261,
5166: 261,
5167: 261,
5168: 261,
5169: 261,
5170: 261,
5171: 261,
5172: 261,
5173: 261,
5174: 261,
5175: 261,
5176: 261,
5177: 261,
5178: 261,
5179: 261,
5180: 261,
5181: 261,
5182: 261,
5183: 261,
5184: 261,
5185: 261,
5186: 261,
5187: 261,
5188: 261,
5189: 261,
5190: 261,
5191: 261,
5192: 261,
5193: 261,
5194: 261,
5195: 261,
5196: 261,
5197: 261,
5198: 261,
5199: 261,
5200: 261,
5201: 261,
5202: 261,
5203: 261,
5204: 261,
5205: 261,
5206: 261,
5207: 261,
5208: 261,
5209: 261,
5210: 261,
5211: 261,
5212: 261,
5213: 262,
5214: 262,
5215: 263,
5216: 264,
5217: 265,
5218: 265,
5219: 265,
5220: 265,
5221: 265,
5222: 265,
5223: 265,
5224: 265,
5225: 265,
5226: 265,
5227: 265,
5228: 265,
5229: 265,
5230: 265,
5231: 265,
5232: 265,
5233: 265,
5234: 265,
5235: 265,
5236: 265,
5237: 265,
5238: 265,
5239: 265,
5240: 265,
5241: 265,
5242: 265,
5243: 265,
5244: 265,
5245: 265,
5246: 265,
5247: 265,
5248: 265,
5249: 266,
5250: 266,
5251: 266,
5252: 266,
5253: 266,
5254: 266,
5255: 266,
5256: 266,
5257: 266,
5258: 266,
5259: 266,
5260: 266,
5261: 266,
5262: 266,
5263: 266,
5264: 266,
5265: 266,
5266: 266,
5267: 266,
5268: 266,
5269: 266,
5270: 266,
5271: 266,
5272: 266,
5273: 266,
5274: 266,
5275: 266,
5276: 266,
5277: 266,
5278: 266,
5279: 266,
5280: 266,
5281: 266,
5282: 266,
5283: 266,
5284: 266,
5285: 266,
5286: 266,
5287: 266,
5288: 266,
5289: 266,
5290: 266,
5291: 266,
5292: 266,
5293: 266,
5294: 266,
5295: 266,
5296: 266,
5297: 266,
5298: 266,
5299: 266,
5300: 266,
5301: 266,
5302: 266,
5303: 266,
5304: 266,
5305: 266,
5306: 266,
5307: 266,
5308: 266,
5309: 266,
5310: 266,
5311: 266,
5312: 266,
5313: 266,
5314: 266,
5315: 266,
5316: 266,
5317: 266,
5318: 266,
5319: 266,
5320: 266,
5321: 266,
5322: 266,
5323: 266,
5324: 266,
5325: 266,
5326: 266,
5327: 266,
5328: 266,
5329: 267,
5330: 267,
5331: 267,
5332: 267,
5333: 268,
5334: 269,
5335: 269,
5336: 269,
5337: 269,
5338: 269,
5339: 269,
5340: 269,
5341: 269,
5342: 270,
5343: 271,
5344: 271,
5345: 271,
5346: 272,
5347: 273,
5348: 273,
5349: 273,
5350: 274,
5351: 275,
5352: 275,
5353: 275,
5354: 275,
5355: 275,
5356: 275,
5357: 275,
5358: 275,
5359: 276,
5360: 277,
5361: 278,
5362: 278,
5363: 279,
5364: 279,
5365: 279,
5366: 279,
5367: 279,
5368: 279,
5369: 279,
5370: 279,
5371: 279,
5372: 279,
5373: 279,
5374: 279,
5375: 280,
5376: 280,
5377: 280,
5378: 280,
5379: 280,
5380: 280,
5381: 280,
5382: 280,
5383: 280,
5384: 280,
5385: 280,
5386: 280,
5387: 280,
5388: 280,
5389: 280,
5390: 280,
5391: 280,
5392: 280,
5393: 280,
5394: 280,
5395: 280,
5396: 280,
5397: 280,
5398: 280,
5399: 280,
5400: 280,
5401: 280,
5402: 280,
5403: 280,
5404: 280,
5405: 280,
5406: 280,
5407: 280,
5408: 280,
5409: 280,
5410: 280,
5411: 280,
5412: 280,
5413: 280,
5414: 280,
5415: 280,
5416: 280,
5417: 280,
5418: 280,
5419: 280,
5420: 280,
5421: 280,
5422: 280,
5423: 280,
5424: 280,
5425: 280,
5426: 280,
5427: 280,
5428: 280,
5429: 280,
5430: 280,
5431: 280,
5432: 280,
5433: 280,
5434: 280,
5435: 280,
5436: 280,
5437: 280,
5438: 280,
5439: 280,
5440: 280,
5441: 280,
5442: 280,
5443: 280,
5444: 280,
5445: 280,
5446: 280,
5447: 280,
5448: 280,
5449: 280,
5450: 280,
5451: 280,
5452: 280,
5453: 280,
5454: 280,
5455: 281,
5456: 282,
5457: 283,
5458: 283,
5459: 283,
5460: 283,
5461: 283,
5462: 283,
5463: 283,
5464: 283,
5465: 284,
5466: 284,
5467: 284,
5468: 284,
5469: 284,
5470: 284,
5471: 284,
5472: 284,
5473: 284,
5474: 284,
5475: 284,
5476: 284,
5477: 284,
5478: 284,
5479: 284,
5480: 284,
5481: 285,
5482: 285,
5483: 285,
5484: 285,
5485: 285,
5486: 285,
5487: 285,
5488: 285,
5489: 285,
5490: 285,
5491: 285,
5492: 285,
5493: 285,
5494: 285,
5495: 285,
5496: 285,
5497: 285,
5498: 285,
5499: 285,
5500: 285,
5501: 285,
5502: 285,
5503: 285,
5504: 285,
5505: 285,
5506: 285,
5507: 285,
5508: 285,
5509: 285,
5510: 285,
5511: 285,
5512: 285,
5513: 285,
5514: 285,
5515: 285,
5516: 285,
5517: 285,
5518: 285,
5519: 285,
5520: 285,
5521: 285,
5522: 285,
5523: 285,
5524: 285,
5525: 285,
5526: 285,
5527: 285,
5528: 285,
5529: 285,
5530: 285,
5531: 285,
5532: 285,
5533: 285,
5534: 285,
5535: 285,
5536: 285,
5537: 285,
5538: 285,
5539: 285,
5540: 285,
5541: 285,
5542: 285,
5543: 285,
5544: 285,
5545: 285,
5546: 285,
5547: 285,
5548: 285,
5549: 285,
5550: 285,
5551: 285,
5552: 285,
5553: 285,
5554: 285,
5555: 285,
5556: 285,
5557: 285,
5558: 285,
5559: 285,
5560: 285,
5561: 285,
5562: 285,
5563: 285,
5564: 285,
5565: 285,
5566: 285,
5567: 285,
5568: 285,
5569: 285,
5570: 285,
5571: 285,
5572: 285,
5573: 285,
5574: 285,
5575: 285,
5576: 285,
5577: 285,
5578: 285,
5579: 285,
5580: 285,
5581: 285,
5582: 285,
5583: 285,
5584: 285,
5585: 285,
5586: 285,
5587: 285,
5588: 285,
5589: 285,
5590: 285,
5591: 285,
5592: 285,
5593: 285,
5594: 285,
5595: 285,
5596: 285,
5597: 285,
5598: 285,
5599: 285,
5600: 285,
5601: 285,
5602: 285,
5603: 285,
5604: 285,
5605: 285,
5606: 285,
5607: 285,
5608: 285,
5609: 286,
5610: 287,
5611: 287,
5612: 287,
5613: 287,
5614: 287,
5615: 287,
5616: 287,
5617: 287,
5618: 287,
5619: 287,
5620: 287,
5621: 287,
5622: 287,
5623: 287,
5624: 287,
5625: 287,
5626: 287,
5627: 287,
5628: 287,
5629: 287,
5630: 287,
5631: 287,
5632: 287,
5633: 287,
5634: 287,
5635: 287,
5636: 287,
5637: 287,
5638: 287,
5639: 287,
5640: 287,
5641: 287,
5642: 287,
5643: 287,
5644: 287,
5645: 287,
5646: 287,
5647: 287,
5648: 287,
5649: 287,
5650: 287,
5651: 287,
5652: 287,
5653: 287,
5654: 287,
5655: 287,
5656: 287,
5657: 287,
5658: 287,
5659: 287,
5660: 287,
5661: 287,
5662: 287,
5663: 287,
5664: 287,
5665: 287,
5666: 287,
5667: 287,
5668: 287,
5669: 287,
5670: 287,
5671: 287,
5672: 287,
5673: 287,
5674: 287,
5675: 287,
5676: 287,
5677: 287,
5678: 287,
5679: 287,
5680: 287,
5681: 287,
5682: 287,
5683: 287,
5684: 287,
5685: 287,
5686: 287,
5687: 287,
5688: 287,
5689: 287,
5690: 288,
5691: 288,
5692: 288,
5693: 288,
5694: 288,
5695: 288,
5696: 288,
5697: 288,
5698: 288,
5699: 288,
5700: 288,
5701: 288,
5702: 288,
5703: 288,
5704: 288,
5705: 288,
5706: 288,
5707: 288,
5708: 288,
5709: 288,
5710: 288,
5711: 288,
5712: 288,
5713: 288,
5714: 288,
5715: 288,
5716: 288,
5717: 288,
5718: 288,
5719: 288,
5720: 288,
5721: 288,
5722: 288,
5723: 288,
5724: 288,
5725: 288,
5726: 288,
5727: 288,
5728: 288,
5729: 288,
5730: 288,
5731: 288,
5732: 288,
5733: 288,
5734: 288,
5735: 288,
5736: 288,
5737: 288,
5738: 288,
5739: 288,
5740: 288,
5741: 288,
5742: 288,
5743: 288,
5744: 288,
5745: 288,
5746: 288,
5747: 288,
5748: 288,
5749: 288,
5750: 288,
5751: 288,
5752: 288,
5753: 288,
5754: 288,
5755: 288,
5756: 288,
5757: 288,
5758: 288,
5759: 288,
5760: 288,
5761: 288,
5762: 288,
5763: 288,
5764: 288,
5765: 288,
5766: 288,
5767: 288,
5768: 288,
5769: 288,
5770: 289,
5771: 289,
5772: 289,
5773: 289,
5774: 289,
5775: 289,
5776: 289,
5777: 289,
5778: 289,
5779: 289,
5780: 289,
5781: 289,
5782: 289,
5783: 289,
5784: 289,
5785: 289,
5786: 289,
5787: 289,
5788: 289,
5789: 289,
5790: 289,
5791: 289,
5792: 289,
5793: 289,
5794: 289,
5795: 289,
5796: 289,
5797: 289,
5798: 289,
5799: 289,
5800: 289,
5801: 289,
5802: 289,
5803: 289,
5804: 289,
5805: 289,
5806: 289,
5807: 289,
5808: 289,
5809: 289,
5810: 289,
5811: 289,
5812: 289,
5813: 289,
5814: 289,
5815: 289,
5816: 289,
5817: 289,
5818: 289,
5819: 289,
5820: 289,
5821: 289,
5822: 289,
5823: 289,
5824: 289,
5825: 289,
5826: 289,
5827: 289,
5828: 289,
5829: 289,
5830: 289,
5831: 289,
5832: 289,
5833: 289,
5834: 289,
5835: 289,
5836: 289,
5837: 289,
5838: 289,
5839: 289,
5840: 289,
5841: 289,
5842: 289,
5843: 289,
5844: 289,
5845: 289,
5846: 289,
5847: 289,
5848: 289,
5849: 289,
5850: 290,
5851: 290,
5852: 290,
5853: 290,
5854: 290,
5855: 290,
5856: 290,
5857: 290,
5858: 290,
5859: 290,
5860: 290,
5861: 290,
5862: 291,
5863: 292,
5864: 292,
5865: 292,
5866: 292,
5867: 292,
5868: 292,
5869: 292,
5870: 292,
5871: 292,
5872: 292,
5873: 292,
5874: 292,
5875: 292,
5876: 292,
5877: 292,
5878: 292,
5879: 292,
5880: 292,
5881: 292,
5882: 292,
5883: 292,
5884: 292,
5885: 292,
5886: 292,
5887: 292,
5888: 292,
5889: 292,
5890: 292,
5891: 292,
5892: 292,
5893: 292,
5894: 292,
5895: 292,
5896: 292,
5897: 292,
5898: 292,
5899: 292,
5900: 292,
5901: 292,
5902: 292,
5903: 292,
5904: 292,
5905: 292,
5906: 292,
5907: 292,
5908: 292,
5909: 292,
5910: 292,
5911: 292,
5912: 292,
5913: 292,
5914: 292,
5915: 292,
5916: 292,
5917: 292,
5918: 292,
5919: 292,
5920: 292,
5921: 292,
5922: 292,
5923: 292,
5924: 292,
5925: 292,
5926: 292,
5927: 292,
5928: 292,
5929: 292,
5930: 292,
5931: 292,
5932: 292,
5933: 292,
5934: 292,
5935: 292,
5936: 292,
5937: 292,
5938: 292,
5939: 292,
5940: 292,
5941: 292,
5942: 292,
5943: 292,
5944: 292,
5945: 292,
5946: 292,
5947: 292,
5948: 292,
5949: 292,
5950: 292,
5951: 292,
5952: 292,
5953: 292,
5954: 292,
5955: 292,
5956: 292,
5957: 292,
5958: 292,
5959: 292,
5960: 292,
5961: 292,
5962: 292,
5963: 292,
5964: 292,
5965: 292,
5966: 292,
5967: 292,
5968: 292,
5969: 292,
5970: 292,
5971: 292,
5972: 292,
5973: 292,
5974: 292,
5975: 292,
5976: 292,
5977: 292,
5978: 292,
5979: 292,
5980: 292,
5981: 292,
5982: 292,
5983: 292,
5984: 292,
5985: 292,
5986: 292,
5987: 292,
5988: 292,
5989: 292,
5990: 292,
5991: 292,
5992: 292,
5993: 292,
5994: 292,
5995: 292,
5996: 292,
5997: 292,
5998: 292,
5999: 292,
6000: 292,
6001: 292,
6002: 292,
6003: 292,
6004: 292,
6005: 292,
6006: 292,
6007: 292,
6008: 292,
6009: 292,
6010: 292,
6011: 292,
6012: 292,
6013: 292,
6014: 292,
6015: 292,
6016: 292,
6017: 292,
6018: 292,
6019: 292,
6020: 292,
6021: 292,
6022: 292,
6023: 292,
6024: 292,
6025: 292,
6026: 292,
6027: 292,
6028: 292,
6029: 292,
6030: 292,
6031: 292,
6032: 292,
6033: 292,
6034: 292,
6035: 292,
6036: 292,
6037: 292,
6038: 292,
6039: 292,
6040: 292,
6041: 292,
6042: 292,
6043: 292,
6044: 292,
6045: 292,
6046: 292,
6047: 292,
6048: 292,
6049: 292,
6050: 292,
6051: 292,
6052: 292,
6053: 292,
6054: 292,
6055: 292,
6056: 292,
6057: 292,
6058: 292,
6059: 292,
6060: 292,
6061: 292,
6062: 292,
6063: 292,
6064: 292,
6065: 292,
6066: 292,
6067: 292,
6068: 292,
6069: 292,
6070: 292,
6071: 292,
6072: 292,
6073: 292,
6074: 292,
6075: 292,
6076: 292,
6077: 292,
6078: 292,
6079: 292,
6080: 292,
6081: 292,
6082: 292,
6083: 292,
6084: 292,
6085: 292,
6086: 292,
6087: 292,
6088: 292,
6089: 292,
6090: 292,
6091: 292,
6092: 292,
6093: 292,
6094: 292,
6095: 292,
6096: 292,
6097: 292,
6098: 292,
6099: 292,
6100: 292,
6101: 292,
6102: 292,
6103: 292,
6104: 292,
6105: 292,
6106: 292,
6107: 292,
6108: 292,
6109: 292,
6110: 292,
6111: 292,
6112: 292,
6113: 292,
6114: 292,
6115: 292,
6116: 292,
6117: 292,
6118: 292,
6119: 292,
6120: 292,
6121: 292,
6122: 292,
6123: 292,
6124: 292,
6125: 292,
6126: 292,
6127: 292,
6128: 292,
6129: 292,
6130: 292,
6131: 292,
6132: 292,
6133: 292,
6134: 292,
6135: 292,
6136: 292,
6137: 292,
6138: 292,
6139: 292,
6140: 292,
6141: 292,
6142: 292,
6143: 292,
6144: 292,
6145: 292,
6146: 292,
6147: 292,
6148: 292,
6149: 292,
6150: 292,
6151: 292,
6152: 292,
6153: 292,
6154: 292,
6155: 292,
6156: 292,
6157: 292,
6158: 292,
6159: 292,
6160: 292,
6161: 292,
6162: 292,
6163: 292,
6164: 292,
6165: 292,
6166: 292,
6167: 292,
6168: 292,
6169: 292,
6170: 292,
6171: 292,
6172: 292,
6173: 292,
6174: 292,
6175: 292,
6176: 292,
6177: 292,
6178: 292,
6179: 292,
6180: 292,
6181: 292,
6182: 292,
6183: 292,
6184: 292,
6185: 292,
6186: 292,
6187: 293,
6188: 293,
6189: 293,
6190: 293,
6191: 293,
6192: 293,
6193: 293,
6194: 293,
6195: 293,
6196: 293,
6197: 293,
6198: 293,
6199: 293,
6200: 293,
6201: 293,
6202: 293,
6203: 293,
6204: 293,
6205: 293,
6206: 293,
6207: 293,
6208: 293,
6209: 293,
6210: 293,
6211: 293,
6212: 293,
6213: 293,
6214: 293,
6215: 293,
6216: 293,
6217: 293,
6218: 293,
6219: 293,
6220: 293,
6221: 293,
6222: 293,
6223: 293,
6224: 293,
6225: 293,
6226: 293,
6227: 293,
6228: 293,
6229: 293,
6230: 293,
6231: 293,
6232: 293,
6233: 293,
6234: 293,
6235: 293,
6236: 293,
6237: 293,
6238: 293,
6239: 293,
6240: 293,
6241: 293,
6242: 293,
6243: 293,
6244: 293,
6245: 293,
6246: 293,
6247: 293,
6248: 293,
6249: 293,
6250: 293,
6251: 293,
6252: 293,
6253: 293,
6254: 293,
6255: 293,
6256: 293,
6257: 293,
6258: 293,
6259: 293,
6260: 293,
6261: 293,
6262: 293,
6263: 293,
6264: 293,
6265: 293,
6266: 293,
6267: 293,
6268: 293,
6269: 293,
6270: 293,
6271: 293,
6272: 293,
6273: 293,
6274: 293,
6275: 293,
6276: 293,
6277: 293,
6278: 293,
6279: 293,
6280: 293,
6281: 293,
6282: 293,
6283: 293,
6284: 293,
6285: 293,
6286: 293,
6287: 293,
6288: 293,
6289: 293,
6290: 293,
6291: 293,
6292: 293,
6293: 293,
6294: 293,
6295: 293,
6296: 293,
6297: 293,
6298: 293,
6299: 293,
6300: 293,
6301: 293,
6302: 293,
6303: 293,
6304: 293,
6305: 293,
6306: 293,
6307: 293,
6308: 293,
6309: 293,
6310: 293,
6311: 293,
6312: 293,
6313: 293,
6314: 293,
6315: 293,
6316: 293,
6317: 293,
6318: 293,
6319: 293,
6320: 293,
6321: 293,
6322: 293,
6323: 293,
6324: 293,
6325: 293,
6326: 293,
6327: 293,
6328: 293,
6329: 293,
6330: 293,
6331: 293,
6332: 293,
6333: 293,
6334: 293,
6335: 293,
6336: 293,
6337: 293,
6338: 293,
6339: 293,
6340: 293,
6341: 293,
6342: 293,
6343: 293,
6344: 293,
6345: 293,
6346: 293,
6347: 293,
6348: 293,
6349: 293,
6350: 293,
6351: 293,
6352: 293,
6353: 293,
6354: 293,
6355: 293,
6356: 293,
6357: 293,
6358: 293,
6359: 293,
6360: 293,
6361: 293,
6362: 293,
6363: 293,
6364: 293,
6365: 293,
6366: 293,
6367: 293,
6368: 293,
6369: 293,
6370: 293,
6371: 293,
6372: 293,
6373: 293,
6374: 293,
6375: 293,
6376: 293,
6377: 293,
6378: 293,
6379: 293,
6380: 293,
6381: 293,
6382: 293,
6383: 293,
6384: 293,
6385: 293,
6386: 293,
6387: 293,
6388: 293,
6389: 293,
6390: 293,
6391: 293,
6392: 293,
6393: 293,
6394: 293,
6395: 293,
6396: 293,
6397: 293,
6398: 293,
6399: 293,
6400: 293,
6401: 293,
6402: 293,
6403: 293,
6404: 293,
6405: 293,
6406: 293,
6407: 293,
6408: 293,
6409: 293,
6410: 293,
6411: 293,
6412: 293,
6413: 293,
6414: 293,
6415: 293,
6416: 293,
6417: 293,
6418: 293,
6419: 293,
6420: 293,
6421: 293,
6422: 293,
6423: 293,
6424: 293,
6425: 293,
6426: 293,
6427: 293,
6428: 293,
6429: 293,
6430: 293,
6431: 293,
6432: 293,
6433: 293,
6434: 293,
6435: 293,
6436: 293,
6437: 293,
6438: 293,
6439: 293,
6440: 293,
6441: 293,
6442: 293,
6443: 293,
6444: 293,
6445: 293,
6446: 293,
6447: 293,
6448: 293,
6449: 293,
6450: 293,
6451: 293,
6452: 293,
6453: 293,
6454: 293,
6455: 293,
6456: 293,
6457: 293,
6458: 293,
6459: 293,
6460: 293,
6461: 293,
6462: 293,
6463: 293,
6464: 293,
6465: 293,
6466: 293,
6467: 293,
6468: 293,
6469: 293,
6470: 293,
6471: 293,
6472: 293,
6473: 293,
6474: 293,
6475: 293,
6476: 293,
6477: 293,
6478: 293,
6479: 293,
6480: 293,
6481: 293,
6482: 293,
6483: 293,
6484: 293,
6485: 293,
6486: 293,
6487: 293,
6488: 293,
6489: 293,
6490: 293,
6491: 293,
6492: 293,
6493: 293,
6494: 293,
6495: 293,
6496: 293,
6497: 293,
6498: 293,
6499: 293,
6500: 293,
6501: 293,
6502: 293,
6503: 293,
6504: 293,
6505: 293,
6506: 293,
6507: 293,
6508: 293,
6509: 293,
6510: 293,
6511: 294,
6512: 295,
6513: 296,
6514: 297,
6515: 298,
6516: 299,
6517: 300,
6518: 301,
6519: 302,
6520: 303,
6521: 304,
6522: 305,
6523: 306,
6524: 307,
6525: 308,
6526: 309,
6527: 310,
6528: 311,
6529: 312,
6530: 313,
6531: 314,
6532: 315,
6533: 316,
6534: 317,
6535: 318,
6536: 319,
6537: 319,
6538: 319,
6539: 319,
6540: 319,
6541: 319,
6542: 319,
6543: 319,
6544: 320,
6545: 320,
6546: 320,
6547: 320,
6548: 320,
6549: 320,
6550: 320,
6551: 320,
6552: 321,
6553: 321,
6554: 321,
6555: 321,
6556: 321,
6557: 321,
6558: 321,
6559: 321,
6560: 321,
6561: 321,
6562: 321,
6563: 321,
6564: 321,
6565: 321,
6566: 321,
6567: 321,
6568: 321,
6569: 321,
6570: 321,
6571: 321,
6572: 321,
6573: 321,
6574: 321,
6575: 321,
6576: 322,
6577: 322,
6578: 322,
6579: 322,
6580: 322,
6581: 322,
6582: 322,
6583: 322,
6584: 322,
6585: 322,
6586: 322,
6587: 322,
6588: 322,
6589: 322,
6590: 322,
6591: 322,
6592: 322,
6593: 322,
6594: 322,
6595: 322,
6596: 322,
6597: 322,
6598: 322,
6599: 322,
6600: 323,
6601: 323,
6602: 323,
6603: 323,
6604: 323,
6605: 323,
6606: 323,
6607: 323,
6608: 323,
6609: 323,
6610: 323,
6611: 323,
6612: 323,
6613: 323,
6614: 323,
6615: 323,
6616: 323,
6617: 323,
6618: 323,
6619: 323,
6620: 323,
6621: 323,
6622: 323,
6623: 323,
6624: 324,
6625: 324,
6626: 324,
6627: 324,
6628: 324,
6629: 324,
6630: 324,
6631: 324,
6632: 324,
6633: 324,
6634: 324,
6635: 324,
6636: 324,
6637: 324,
6638: 324,
6639: 324,
6640: 324,
6641: 324,
6642: 324,
6643: 324,
6644: 324,
6645: 324,
6646: 324,
6647: 324,
6648: 325,
6649: 325,
6650: 325,
6651: 325,
6652: 325,
6653: 325,
6654: 325,
6655: 325,
6656: 325,
6657: 325,
6658: 325,
6659: 325,
6660: 325,
6661: 325,
6662: 325,
6663: 325,
6664: 325,
6665: 325,
6666: 325,
6667: 325,
6668: 325,
6669: 325,
6670: 325,
6671: 325,
6672: 326,
6673: 326,
6674: 326,
6675: 326,
6676: 326,
6677: 326,
6678: 326,
6679: 326,
6680: 326,
6681: 326,
6682: 326,
6683: 326,
6684: 326,
6685: 326,
6686: 326,
6687: 326,
6688: 326,
6689: 326,
6690: 326,
6691: 326,
6692: 326,
6693: 326,
6694: 326,
6695: 326,
6696: 327,
6697: 327,
6698: 327,
6699: 327,
6700: 327,
6701: 327,
6702: 327,
6703: 327,
6704: 327,
6705: 327,
6706: 327,
6707: 327,
6708: 327,
6709: 327,
6710: 327,
6711: 327,
6712: 328,
6713: 328,
6714: 328,
6715: 328,
6716: 329,
6717: 329,
6718: 329,
6719: 329,
6720: 329,
6721: 329,
6722: 329,
6723: 329,
6724: 329,
6725: 329,
6726: 329,
6727: 329,
6728: 329,
6729: 329,
6730: 329,
6731: 329,
6732: 330,
6733: 330,
6734: 330,
6735: 330,
6736: 331,
6737: 331,
6738: 331,
6739: 331,
6740: 331,
6741: 331,
6742: 331,
6743: 331,
6744: 331,
6745: 331,
6746: 331,
6747: 331,
6748: 331,
6749: 331,
6750: 331,
6751: 331,
6752: 332,
6753: 332,
6754: 332,
6755: 332,
6756: 333,
6757: 333,
6758: 333,
6759: 333,
6760: 333,
6761: 333,
6762: 333,
6763: 333,
6764: 333,
6765: 333,
6766: 333,
6767: 333,
6768: 333,
6769: 333,
6770: 333,
6771: 333,
6772: 334,
6773: 334,
6774: 334,
6775: 334,
6776: 335,
6777: 335,
6778: 335,
6779: 335,
6780: 335,
6781: 335,
6782: 335,
6783: 335,
6784: 335,
6785: 335,
6786: 335,
6787: 335,
6788: 335,
6789: 335,
6790: 335,
6791: 335,
6792: 336,
6793: 336,
6794: 336,
6795: 336,
6796: 337,
6797: 337,
6798: 337,
6799: 337,
6800: 337,
6801: 337,
6802: 337,
6803: 337,
6804: 337,
6805: 337,
6806: 337,
6807: 337,
6808: 337,
6809: 337,
6810: 337,
6811: 337,
6812: 338,
6813: 338,
6814: 338,
6815: 338,
6816: 339,
6817: 339,
6818: 339,
6819: 339,
6820: 340,
6821: 340,
6822: 340,
6823: 340,
6824: 341,
6825: 341,
6826: 341,
6827: 341,
6828: 342,
6829: 342,
6830: 342,
6831: 342,
6832: 342,
6833: 342,
6834: 342,
6835: 342,
6836: 342,
6837: 342,
6838: 342,
6839: 342,
6840: 342,
6841: 342,
6842: 342,
6843: 342,
6844: 342,
6845: 342,
6846: 342,
6847: 342,
6848: 342,
6849: 342,
6850: 342,
6851: 342,
6852: 343,
6853: 343,
6854: 343,
6855: 343,
6856: 343,
6857: 343,
6858: 343,
6859: 343,
6860: 343,
6861: 343,
6862: 343,
6863: 343,
6864: 343,
6865: 343,
6866: 343,
6867: 343,
6868: 344,
6869: 344,
6870: 344,
6871: 344,
6872: 344,
6873: 344,
6874: 344,
6875: 344,
6876: 344,
6877: 344,
6878: 344,
6879: 344,
6880: 344,
6881: 344,
6882: 344,
6883: 344,
6884: 345,
6885: 345,
6886: 345,
6887: 345,
6888: 345,
6889: 345,
6890: 345,
6891: 345,
6892: 345,
6893: 345,
6894: 345,
6895: 345,
6896: 345,
6897: 345,
6898: 345,
6899: 345,
6900: 346,
6901: 346,
6902: 346,
6903: 346,
6904: 346,
6905: 346,
6906: 346,
6907: 346,
6908: 346,
6909: 346,
6910: 346,
6911: 346,
6912: 346,
6913: 346,
6914: 346,
6915: 346,
6916: 346,
6917: 346,
6918: 346,
6919: 346,
6920: 346,
6921: 346,
6922: 346,
6923: 346,
6924: 346,
6925: 346,
6926: 346,
6927: 346,
6928: 346,
6929: 346,
6930: 346,
6931: 346,
6932: 347,
6933: 348,
6934: 349,
6935: 349,
6936: 349,
6937: 349,
6938: 349,
6939: 349,
6940: 349,
6941: 349,
6942: 349,
6943: 349,
6944: 350,
6945: 351,
6946: 352,
6947: 352,
6948: 352,
6949: 353,
6950: 353,
6951: 353,
6952: 353,
6953: 353,
6954: 353,
6955: 353,
6956: 353,
6957: 353,
6958: 353,
6959: 353,
6960: 353,
6961: 353,
6962: 353,
6963: 353,
6964: 353,
6965: 353,
6966: 353,
6967: 353,
6968: 353,
6969: 353,
6970: 353,
6971: 353,
6972: 353,
6973: 353,
6974: 353,
6975: 353,
6976: 353,
6977: 353,
6978: 353,
6979: 353,
6980: 353,
6981: 353,
6982: 353,
6983: 353,
6984: 353,
6985: 353,
6986: 353,
6987: 353,
6988: 353,
6989: 353,
6990: 353,
6991: 353,
6992: 353,
6993: 353,
6994: 353,
6995: 353,
6996: 353,
6997: 353,
6998: 353,
6999: 353,
7000: 353,
7001: 353,
7002: 353,
7003: 353,
7004: 353,
7005: 353,
7006: 353,
7007: 353,
7008: 353,
7009: 353,
7010: 353,
7011: 353,
7012: 353,
7013: 353,
7014: 353,
7015: 353,
7016: 353,
7017: 353,
7018: 353,
7019: 353,
7020: 353,
7021: 353,
7022: 353,
7023: 353,
7024: 353,
7025: 353,
7026: 353,
7027: 353,
7028: 353,
7029: 354,
7030: 354,
7031: 354,
7032: 354,
7033: 354,
7034: 354,
7035: 354,
7036: 354,
7037: 354,
7038: 354,
7039: 354,
7040: 354,
7041: 354,
7042: 354,
7043: 354,
7044: 354,
7045: 354,
7046: 354,
7047: 354,
7048: 354,
7049: 354,
7050: 354,
7051: 354,
7052: 354,
7053: 355,
7054: 355,
7055: 355,
7056: 355,
7057: 355,
7058: 355,
7059: 355,
7060: 355,
7061: 355,
7062: 355,
7063: 355,
7064: 355,
7065: 356,
7066: 357,
7067: 358,
7068: 359,
7069: 360,
7070: 361,
7071: 362,
7072: 363,
7073: 364,
7074: 365,
7075: 366,
7076: 367,
7077: 368,
7078: 369,
7079: 370,
7080: 371,
7081: 372,
7082: 372,
7083: 372,
7084: 372,
7085: 372,
7086: 372,
7087: 372,
7088: 372,
7089: 372,
7090: 372,
7091: 372,
7092: 372,
7093: 372,
7094: 372,
7095: 372,
7096: 372,
7097: 372,
7098: 372,
7099: 372,
7100: 372,
7101: 372,
7102: 372,
7103: 372,
7104: 372,
7105: 372,
7106: 372,
7107: 372,
7108: 372,
7109: 372,
7110: 372,
7111: 372,
7112: 372,
7113: 373,
7114: 373,
7115: 373,
7116: 373,
7117: 373,
7118: 373,
7119: 373,
7120: 373,
7121: 373,
7122: 373,
7123: 373,
7124: 373,
7125: 373,
7126: 373,
7127: 373,
7128: 373,
7129: 373,
7130: 373,
7131: 373,
7132: 373,
7133: 373,
7134: 373,
7135: 373,
7136: 373,
7137: 373,
7138: 373,
7139: 373,
7140: 373,
7141: 373,
7142: 373,
7143: 373,
7144: 373,
7145: 374,
7146: 374,
7147: 374,
7148: 374,
7149: 374,
7150: 374,
7151: 374,
7152: 374,
7153: 374,
7154: 374,
7155: 374,
7156: 374,
7157: 374,
7158: 374,
7159: 374,
7160: 374,
7161: 374,
7162: 374,
7163: 374,
7164: 374,
7165: 374,
7166: 374,
7167: 374,
7168: 374,
7169: 374,
7170: 374,
7171: 374,
7172: 374,
7173: 374,
7174: 374,
7175: 374,
7176: 374,
7177: 375,
7178: 375,
7179: 375,
7180: 375,
7181: 375,
7182: 375,
7183: 375,
7184: 375,
7185: 375,
7186: 375,
7187: 375,
7188: 375,
7189: 375,
7190: 375,
7191: 375,
7192: 375,
7193: 375,
7194: 375,
7195: 375,
7196: 375,
7197: 375,
7198: 375,
7199: 375,
7200: 375,
7201: 375,
7202: 375,
7203: 375,
7204: 375,
7205: 375,
7206: 375,
7207: 375,
7208: 375,
7209: 376,
7210: 376,
7211: 376,
7212: 376,
7213: 376,
7214: 376,
7215: 376,
7216: 376,
7217: 376,
7218: 376,
7219: 376,
7220: 376,
7221: 376,
7222: 376,
7223: 376,
7224: 376,
7225: 376,
7226: 376,
7227: 376,
7228: 376,
7229: 376,
7230: 376,
7231: 376,
7232: 376,
7233: 376,
7234: 376,
7235: 376,
7236: 376,
7237: 376,
7238: 376,
7239: 376,
7240: 376,
7241: 377,
7242: 377,
7243: 377,
7244: 377,
7245: 377,
7246: 377,
7247: 377,
7248: 377,
7249: 377,
7250: 377,
7251: 377,
7252: 377,
7253: 377,
7254: 377,
7255: 377,
7256: 377,
7257: 377,
7258: 377,
7259: 377,
7260: 377,
7261: 377,
7262: 377,
7263: 377,
7264: 377,
7265: 377,
7266: 377,
7267: 377,
7268: 377,
7269: 377,
7270: 377,
7271: 377,
7272: 377,
7273: 378,
7274: 378,
7275: 378,
7276: 378,
7277: 378,
7278: 378,
7279: 378,
7280: 378,
7281: 378,
7282: 378,
7283: 378,
7284: 378,
7285: 378,
7286: 378,
7287: 378,
7288: 378,
7289: 378,
7290: 378,
7291: 378,
7292: 378,
7293: 378,
7294: 378,
7295: 378,
7296: 378,
7297: 378,
7298: 378,
7299: 378,
7300: 378,
7301: 378,
7302: 378,
7303: 378,
7304: 378,
7305: 379,
7306: 379,
7307: 379,
7308: 379,
7309: 379,
7310: 379,
7311: 379,
7312: 379,
7313: 379,
7314: 379,
7315: 379,
7316: 379,
7317: 379,
7318: 379,
7319: 379,
7320: 379,
7321: 379,
7322: 379,
7323: 379,
7324: 379,
7325: 379,
7326: 379,
7327: 379,
7328: 379,
7329: 379,
7330: 379,
7331: 379,
7332: 379,
7333: 379,
7334: 379,
7335: 379,
7336: 379,
7337: 380,
7338: 380,
7339: 380,
7340: 380,
7341: 380,
7342: 380,
7343: 380,
7344: 380,
7345: 380,
7346: 380,
7347: 380,
7348: 380,
7349: 380,
7350: 380,
7351: 380,
7352: 380,
7353: 380,
7354: 380,
7355: 380,
7356: 380,
7357: 380,
7358: 380,
7359: 380,
7360: 380,
7361: 380,
7362: 380,
7363: 380,
7364: 380,
7365: 380,
7366: 380,
7367: 380,
7368: 380,
7369: 381,
7370: 381,
7371: 381,
7372: 381,
7373: 381,
7374: 381,
7375: 381,
7376: 381,
7377: 381,
7378: 381,
7379: 381,
7380: 381,
7381: 381,
7382: 381,
7383: 381,
7384: 381,
7385: 381,
7386: 381,
7387: 381,
7388: 381,
7389: 381,
7390: 381,
7391: 381,
7392: 381,
7393: 381,
7394: 381,
7395: 381,
7396: 381,
7397: 381,
7398: 381,
7399: 381,
7400: 381,
7401: 382,
7402: 382,
7403: 382,
7404: 382,
7405: 382,
7406: 382,
7407: 382,
7408: 382,
7409: 382,
7410: 382,
7411: 382,
7412: 382,
7413: 382,
7414: 382,
7415: 382,
7416: 382,
7417: 382,
7418: 382,
7419: 382,
7420: 382,
7421: 382,
7422: 382,
7423: 382,
7424: 382,
7425: 382,
7426: 382,
7427: 382,
7428: 382,
7429: 382,
7430: 382,
7431: 382,
7432: 382,
7433: 383,
7434: 383,
7435: 383,
7436: 383,
7437: 383,
7438: 383,
7439: 383,
7440: 383,
7441: 383,
7442: 383,
7443: 383,
7444: 383,
7445: 383,
7446: 383,
7447: 383,
7448: 383,
7449: 383,
7450: 383,
7451: 383,
7452: 383,
7453: 383,
7454: 383,
7455: 383,
7456: 383,
7457: 383,
7458: 383,
7459: 383,
7460: 383,
7461: 383,
7462: 383,
7463: 383,
7464: 383,
7465: 384,
7466: 384,
7467: 384,
7468: 384,
7469: 384,
7470: 384,
7471: 384,
7472: 384,
7473: 384,
7474: 384,
7475: 384,
7476: 384,
7477: 384,
7478: 384,
7479: 384,
7480: 384,
7481: 384,
7482: 384,
7483: 384,
7484: 384,
7485: 384,
7486: 384,
7487: 384,
7488: 384,
7489: 384,
7490: 384,
7491: 384,
7492: 384,
7493: 384,
7494: 384,
7495: 384,
7496: 384,
7497: 385,
7498: 385,
7499: 385,
7500: 385,
7501: 385,
7502: 385,
7503: 385,
7504: 385,
7505: 385,
7506: 385,
7507: 385,
7508: 385,
7509: 385,
7510: 385,
7511: 385,
7512: 385,
7513: 385,
7514: 385,
7515: 385,
7516: 385,
7517: 385,
7518: 385,
7519: 385,
7520: 385,
7521: 385,
7522: 385,
7523: 385,
7524: 385,
7525: 385,
7526: 385,
7527: 385,
7528: 385,
7529: 386,
7530: 386,
7531: 386,
7532: 386,
7533: 386,
7534: 386,
7535: 386,
7536: 386,
7537: 386,
7538: 386,
7539: 386,
7540: 386,
7541: 386,
7542: 386,
7543: 386,
7544: 386,
7545: 386,
7546: 386,
7547: 386,
7548: 386,
7549: 386,
7550: 386,
7551: 386,
7552: 386,
7553: 386,
7554: 386,
7555: 386,
7556: 386,
7557: 386,
7558: 386,
7559: 386,
7560: 386,
7561: 387,
7562: 387,
7563: 387,
7564: 387,
7565: 387,
7566: 387,
7567: 387,
7568: 387,
7569: 387,
7570: 387,
7571: 387,
7572: 387,
7573: 387,
7574: 387,
7575: 387,
7576: 387,
7577: 387,
7578: 387,
7579: 387,
7580: 387,
7581: 387,
7582: 387,
7583: 387,
7584: 387,
7585: 387,
7586: 387,
7587: 387,
7588: 387,
7589: 387,
7590: 387,
7591: 387,
7592: 387,
7593: 388,
7594: 388,
7595: 388,
7596: 388,
7597: 388,
7598: 388,
7599: 388,
7600: 388,
7601: 388,
7602: 388,
7603: 388,
7604: 388,
7605: 388,
7606: 388,
7607: 388,
7608: 388,
7609: 388,
7610: 388,
7611: 388,
7612: 388,
7613: 388,
7614: 388,
7615: 388,
7616: 388,
7617: 388,
7618: 388,
7619: 388,
7620: 388,
7621: 388,
7622: 388,
7623: 388,
7624: 388,
7625: 388,
7626: 388,
7627: 388,
7628: 388,
7629: 388,
7630: 388,
7631: 388,
7632: 388,
7633: 388,
7634: 388,
7635: 388,
7636: 388,
7637: 388,
7638: 388,
7639: 388,
7640: 388,
7641: 388,
7642: 388,
7643: 388,
7644: 388,
7645: 388,
7646: 388,
7647: 388,
7648: 388,
7649: 388,
7650: 388,
7651: 388,
7652: 388,
7653: 388,
7654: 388,
7655: 388,
7656: 388,
7657: 388,
7658: 388,
7659: 388,
7660: 388,
7661: 388,
7662: 388,
7663: 388,
7664: 388,
7665: 388,
7666: 388,
7667: 388,
7668: 388,
7669: 388,
7670: 388,
7671: 388,
7672: 388,
7673: 389,
7674: 389,
7675: 389,
7676: 389,
7677: 389,
7678: 389,
7679: 389,
7680: 389,
7681: 389,
7682: 389,
7683: 389,
7684: 389,
7685: 389,
7686: 389,
7687: 389,
7688: 389,
7689: 389,
7690: 389,
7691: 389,
7692: 389,
7693: 389,
7694: 389,
7695: 389,
7696: 389,
7697: 389,
7698: 389,
7699: 389,
7700: 389,
7701: 389,
7702: 389,
7703: 389,
7704: 389,
7705: 389,
7706: 389,
7707: 389,
7708: 389,
7709: 389,
7710: 389,
7711: 389,
7712: 389,
7713: 389,
7714: 389,
7715: 389,
7716: 389,
7717: 389,
7718: 389,
7719: 389,
7720: 389,
7721: 389,
7722: 389,
7723: 389,
7724: 389,
7725: 389,
7726: 389,
7727: 389,
7728: 389,
7729: 389,
7730: 389,
7731: 389,
7732: 389,
7733: 389,
7734: 389,
7735: 389,
7736: 389,
7737: 389,
7738: 389,
7739: 389,
7740: 389,
7741: 389,
7742: 389,
7743: 389,
7744: 389,
7745: 389,
7746: 389,
7747: 389,
7748: 389,
7749: 389,
7750: 389,
7751: 389,
7752: 389,
7753: 390,
7754: 391,
7755: 392,
7756: 392,
7757: 392,
7758: 392,
7759: 392,
7760: 392,
7761: 392,
7762: 392,
7763: 392,
7764: 392,
7765: 392,
7766: 392,
7767: 392,
7768: 392,
7769: 392,
7770: 392,
7771: 392,
7772: 392,
7773: 392,
7774: 392,
7775: 392,
7776: 392,
7777: 392,
7778: 392,
7779: 392,
7780: 392,
7781: 392,
7782: 392,
7783: 392,
7784: 392,
7785: 392,
7786: 392,
7787: 393,
7788: 393,
7789: 393,
7790: 393,
7791: 393,
7792: 393,
7793: 393,
7794: 393,
7795: 393,
7796: 393,
7797: 393,
7798: 393,
7799: 393,
7800: 393,
7801: 393,
7802: 393,
7803: 393,
7804: 393,
7805: 393,
7806: 393,
7807: 393,
7808: 393,
7809: 393,
7810: 393,
7811: 393,
7812: 393,
7813: 393,
7814: 393,
7815: 393,
7816: 393,
7817: 393,
7818: 393,
7819: 393,
7820: 393,
7821: 393,
7822: 393,
7823: 393,
7824: 393,
7825: 393,
7826: 393,
7827: 393,
7828: 393,
7829: 393,
7830: 393,
7831: 393,
7832: 393,
7833: 393,
7834: 393,
7835: 393,
7836: 393,
7837: 393,
7838: 393,
7839: 393,
7840: 393,
7841: 393,
7842: 393,
7843: 393,
7844: 393,
7845: 393,
7846: 393,
7847: 393,
7848: 393,
7849: 393,
7850: 393,
7851: 394,
7852: 395,
7853: 396,
7854: 397,
7855: 397,
7856: 397,
7857: 397,
7858: 397,
7859: 397,
7860: 397,
7861: 397,
7862: 397,
7863: 397,
7864: 397,
7865: 397,
7866: 397,
7867: 397,
7868: 397,
7869: 397,
7870: 397,
7871: 397,
7872: 397,
7873: 397,
7874: 397,
7875: 397,
7876: 397,
7877: 397,
7878: 397,
7879: 397,
7880: 397,
7881: 397,
7882: 397,
7883: 397,
7884: 397,
7885: 397,
7886: 397,
7887: 397,
7888: 397,
7889: 397,
7890: 397,
7891: 397,
7892: 397,
7893: 397,
7894: 397,
7895: 397,
7896: 397,
7897: 397,
7898: 397,
7899: 397,
7900: 397,
7901: 397,
7902: 397,
7903: 397,
7904: 397,
7905: 397,
7906: 397,
7907: 397,
7908: 397,
7909: 397,
7910: 397,
7911: 397,
7912: 397,
7913: 397,
7914: 397,
7915: 397,
7916: 397,
7917: 397,
7918: 397,
7919: 397,
7920: 397,
7921: 397,
7922: 397,
7923: 397,
7924: 397,
7925: 397,
7926: 397,
7927: 397,
7928: 397,
7929: 397,
7930: 397,
7931: 397,
7932: 397,
7933: 397,
7934: 398,
7935: 398,
7936: 398,
7937: 398,
7938: 398,
7939: 398,
7940: 398,
7941: 398,
7942: 398,
7943: 398,
7944: 398,
7945: 398,
7946: 398,
7947: 398,
7948: 398,
7949: 398,
7950: 398,
7951: 398,
7952: 398,
7953: 398,
7954: 398,
7955: 398,
7956: 398,
7957: 398,
7958: 398,
7959: 398,
7960: 398,
7961: 398,
7962: 398,
7963: 398,
7964: 398,
7965: 398,
7966: 398,
7967: 398,
7968: 398,
7969: 398,
7970: 398,
7971: 398,
7972: 398,
7973: 398,
7974: 398,
7975: 398,
7976: 398,
7977: 398,
7978: 398,
7979: 398,
7980: 398,
7981: 398,
7982: 398,
7983: 398,
7984: 398,
7985: 398,
7986: 398,
7987: 398,
7988: 398,
7989: 398,
7990: 398,
7991: 398,
7992: 398,
7993: 398,
7994: 398,
7995: 398,
7996: 398,
7997: 398,
7998: 398,
7999: 398,
8000: 398,
8001: 398,
8002: 398,
8003: 398,
8004: 398,
8005: 398,
8006: 398,
8007: 398,
8008: 398,
8009: 398,
8010: 398,
8011: 398,
8012: 398,
8013: 398,
8014: 399,
8015: 399,
8016: 399,
8017: 399,
8018: 399,
8019: 399,
8020: 399,
8021: 399,
8022: 399,
8023: 399,
8024: 399,
8025: 399,
8026: 399,
8027: 399,
8028: 399,
8029: 399,
8030: 399,
8031: 399,
8032: 399,
8033: 399,
8034: 399,
8035: 399,
8036: 399,
8037: 399,
8038: 399,
8039: 399,
8040: 399,
8041: 399,
8042: 399,
8043: 399,
8044: 399,
8045: 399,
8046: 399,
8047: 399,
8048: 399,
8049: 399,
8050: 399,
8051: 399,
8052: 399,
8053: 399,
8054: 399,
8055: 399,
8056: 399,
8057: 399,
8058: 399,
8059: 399,
8060: 399,
8061: 399,
8062: 399,
8063: 399,
8064: 399,
8065: 399,
8066: 399,
8067: 399,
8068: 399,
8069: 399,
8070: 399,
8071: 399,
8072: 399,
8073: 399,
8074: 399,
8075: 399,
8076: 399,
8077: 399,
8078: 399,
8079: 399,
8080: 399,
8081: 399,
8082: 399,
8083: 399,
8084: 399,
8085: 399,
8086: 399,
8087: 399,
8088: 399,
8089: 399,
8090: 399,
8091: 399,
8092: 399,
8093: 399,
8094: 400,
8095: 400,
8096: 400,
8097: 400,
8098: 400,
8099: 400,
8100: 401,
8101: 401,
8102: 401,
8103: 401,
8104: 401,
8105: 401,
8106: 402,
8107: 402,
8108: 402,
8109: 402,
8110: 402,
8111: 402,
8112: 403,
8113: 404,
8114: 404,
8115: 404,
8116: 405,
8117: 406,
8118: 407,
8119: 408,
8120: 409,
8121: 410,
8122: 411,
8123: 412,
8124: 413,
8125: 414,
8126: 415,
8127: 416,
8128: 417,
8129: 418,
8130: 419,
8131: 420,
8132: 421,
8133: 422,
8134: 423,
8135: 424,
8136: 424,
8137: 425,
8138: 425,
8139: 426,
8140: 426,
8141: 427,
8142: 427,
8143: 428,
8144: 428,
8145: 429,
8146: 429,
8147: 430,
8148: 430,
8149: 430,
8150: 430,
8151: 430,
8152: 430,
8153: 430,
8154: 430,
8155: 430,
8156: 430,
8157: 430,
8158: 430,
8159: 430,
8160: 430,
8161: 430,
8162: 430,
8163: 431,
8164: 431,
8165: 431,
8166: 431,
8167: 431,
8168: 431,
8169: 431,
8170: 431,
8171: 431,
8172: 431,
8173: 431,
8174: 431,
8175: 431,
8176: 431,
8177: 431,
8178: 431,
8179: 432,
8180: 432,
8181: 432,
8182: 432,
8183: 432,
8184: 432,
8185: 432,
8186: 432,
8187: 432,
8188: 432,
8189: 432,
8190: 432,
8191: 432,
8192: 432,
8193: 432,
8194: 432,
8195: 433,
8196: 433,
8197: 433,
8198: 433,
8199: 433,
8200: 433,
8201: 433,
8202: 433,
8203: 433,
8204: 433,
8205: 433,
8206: 433,
8207: 433,
8208: 433,
8209: 433,
8210: 433,
8211: 434,
8212: 434,
8213: 434,
8214: 434,
8215: 434,
8216: 434,
8217: 434,
8218: 434,
8219: 434,
8220: 434,
8221: 434,
8222: 434,
8223: 434,
8224: 434,
8225: 434,
8226: 434,
8227: 435,
8228: 435,
8229: 435,
8230: 435,
8231: 435,
8232: 435,
8233: 435,
8234: 435,
8235: 435,
8236: 435,
8237: 435,
8238: 435,
8239: 435,
8240: 435,
8241: 435,
8242: 435,
8243: 436,
8244: 436,
8245: 436,
8246: 436,
8247: 436,
8248: 436,
8249: 436,
8250: 436,
8251: 436,
8252: 436,
8253: 436,
8254: 436,
8255: 436,
8256: 436,
8257: 436,
8258: 436,
8259: 437,
8260: 437,
8261: 437,
8262: 437,
8263: 437,
8264: 437,
8265: 437,
8266: 437,
8267: 437,
8268: 437,
8269: 437,
8270: 437,
8271: 437,
8272: 437,
8273: 437,
8274: 437,
8275: 438,
8276: 438,
8277: 438,
8278: 438,
8279: 438,
8280: 438,
8281: 438,
8282: 438,
8283: 438,
8284: 438,
8285: 438,
8286: 438,
8287: 438,
8288: 438,
8289: 438,
8290: 438,
8291: 439,
8292: 439,
8293: 439,
8294: 439,
8295: 439,
8296: 439,
8297: 439,
8298: 439,
8299: 439,
8300: 439,
8301: 439,
8302: 439,
8303: 439,
8304: 439,
8305: 439,
8306: 439,
8307: 440,
8308: 440,
8309: 440,
8310: 440,
8311: 440,
8312: 440,
8313: 440,
8314: 440,
8315: 440,
8316: 440,
8317: 440,
8318: 440,
8319: 440,
8320: 440,
8321: 440,
8322: 440,
8323: 441,
8324: 441,
8325: 441,
8326: 441,
8327: 441,
8328: 441,
8329: 441,
8330: 441,
8331: 441,
8332: 441,
8333: 441,
8334: 441,
8335: 441,
8336: 441,
8337: 441,
8338: 441,
8339: 442,
8340: 442,
8341: 442,
8342: 442,
8343: 442,
8344: 442,
8345: 442,
8346: 442,
8347: 442,
8348: 442,
8349: 442,
8350: 442,
8351: 442,
8352: 442,
8353: 442,
8354: 442,
8355: 443,
8356: 443,
8357: 443,
8358: 443,
8359: 443,
8360: 443,
8361: 443,
8362: 443,
8363: 443,
8364: 443,
8365: 443,
8366: 443,
8367: 443,
8368: 443,
8369: 443,
8370: 443,
8371: 444,
8372: 444,
8373: 444,
8374: 444,
8375: 444,
8376: 444,
8377: 444,
8378: 444,
8379: 444,
8380: 444,
8381: 444,
8382: 444,
8383: 444,
8384: 444,
8385: 444,
8386: 444,
8387: 445,
8388: 445,
8389: 445,
8390: 445,
8391: 445,
8392: 445,
8393: 445,
8394: 445,
8395: 445,
8396: 445,
8397: 445,
8398: 445,
8399: 445,
8400: 445,
8401: 445,
8402: 445,
8403: 446,
8404: 446,
8405: 446,
8406: 446,
8407: 447,
8408: 447,
8409: 447,
8410: 447,
8411: 448,
8412: 448,
8413: 448,
8414: 448,
8415: 449,
8416: 449,
8417: 449,
8418: 449,
8419: 450,
8420: 450,
8421: 450,
8422: 450,
8423: 451,
8424: 451,
8425: 451,
8426: 451,
8427: 452,
8428: 452,
8429: 452,
8430: 452,
8431: 453,
8432: 453,
8433: 453,
8434: 453,
8435: 454,
8436: 454,
8437: 454,
8438: 454,
8439: 455,
8440: 455,
8441: 455,
8442: 455,
8443: 456,
8444: 456,
8445: 456,
8446: 456,
8447: 457,
8448: 457,
8449: 457,
8450: 457,
8451: 458,
8452: 458,
8453: 458,
8454: 458,
8455: 459,
8456: 459,
8457: 459,
8458: 459,
8459: 460,
8460: 460,
8461: 460,
8462: 460,
8463: 461,
8464: 461,
8465: 461,
8466: 461,
8467: 462,
8468: 463,
8469: 464,
8470: 465,
8471: 465,
8472: 465,
8473: 465,
8474: 465,
8475: 465,
8476: 465,
8477: 465,
8478: 465,
8479: 465,
8480: 465,
8481: 465,
8482: 465,
8483: 465,
8484: 465,
8485: 465,
8486: 465,
8487: 465,
8488: 465,
8489: 465,
8490: 465,
8491: 465,
8492: 465,
8493: 465,
8494: 465,
8495: 465,
8496: 465,
8497: 465,
8498: 465,
8499: 465,
8500: 465,
8501: 465,
8502: 465,
8503: 465,
8504: 465,
8505: 465,
8506: 465,
8507: 465,
8508: 465,
8509: 465,
8510: 465,
8511: 465,
8512: 465,
8513: 465,
8514: 465,
8515: 465,
8516: 465,
8517: 465,
8518: 465,
8519: 465,
8520: 465,
8521: 465,
8522: 465,
8523: 465,
8524: 465,
8525: 465,
8526: 465,
8527: 465,
8528: 465,
8529: 465,
8530: 465,
8531: 465,
8532: 465,
8533: 465,
8534: 465,
8535: 465,
8536: 465,
8537: 465,
8538: 465,
8539: 465,
8540: 465,
8541: 465,
8542: 465,
8543: 465,
8544: 465,
8545: 465,
8546: 465,
8547: 465,
8548: 465,
8549: 465,
8550: 466,
8551: 466,
8552: 466,
8553: 466,
8554: 466,
8555: 466,
8556: 467,
8557: 467,
8558: 467,
8559: 467,
8560: 467,
8561: 467,
8562: 468,
8563: 468,
8564: 468,
8565: 468,
8566: 468,
8567: 468,
8568: 469,
8569: 469,
8570: 469,
8571: 469,
8572: 469,
8573: 469,
8574: 470,
8575: 470,
8576: 470,
8577: 470,
8578: 470,
8579: 470,
8580: 471,
8581: 471,
8582: 471,
8583: 471,
8584: 471,
8585: 471,
8586: 472,
8587: 472,
8588: 472,
8589: 472,
8590: 472,
8591: 472,
8592: 473,
8593: 473,
8594: 473,
8595: 473,
8596: 473,
8597: 473,
8598: 474,
8599: 474,
8600: 474,
8601: 474,
8602: 474,
8603: 474,
8604: 475,
8605: 475,
8606: 475,
8607: 475,
8608: 475,
8609: 475,
8610: 476,
8611: 476,
8612: 476,
8613: 476,
8614: 476,
8615: 476,
8616: 477,
8617: 477,
8618: 477,
8619: 477,
8620: 477,
8621: 477,
8622: 478,
8623: 478,
8624: 478,
8625: 478,
8626: 478,
8627: 478,
8628: 479,
8629: 479,
8630: 479,
8631: 479,
8632: 479,
8633: 479,
8634: 480,
8635: 480,
8636: 480,
8637: 480,
8638: 480,
8639: 480,
8640: 481,
8641: 481,
8642: 481,
8643: 481,
8644: 481,
8645: 481,
8646: 482,
8647: 482,
8648: 482,
8649: 482,
8650: 482,
8651: 482,
8652: 483,
8653: 483,
8654: 483,
8655: 483,
8656: 483,
8657: 483,
8658: 484,
8659: 484,
8660: 484,
8661: 484,
8662: 484,
8663: 484,
8664: 485,
8665: 486,
8666: 487,
8667: 488,
8668: 489,
8669: 489,
8670: 489,
8671: 489,
8672: 489,
8673: 489,
8674: 489,
8675: 489,
8676: 489,
8677: 489,
8678: 489,
8679: 489,
8680: 489,
8681: 489,
8682: 489,
8683: 489,
8684: 489,
8685: 489,
8686: 489,
8687: 489,
8688: 489,
8689: 489,
8690: 489,
8691: 489,
8692: 489,
8693: 489,
8694: 489,
8695: 489,
8696: 489,
8697: 489,
8698: 489,
8699: 489,
8700: 490,
8701: 490,
8702: 490,
8703: 490,
8704: 490,
8705: 490,
8706: 490,
8707: 490,
8708: 490,
8709: 490,
8710: 490,
8711: 490,
8712: 490,
8713: 490,
8714: 490,
8715: 490,
8716: 490,
8717: 490,
8718: 490,
8719: 490,
8720: 490,
8721: 490,
8722: 490,
8723: 490,
8724: 490,
8725: 490,
8726: 490,
8727: 490,
8728: 490,
8729: 490,
8730: 490,
8731: 490,
8732: 491,
8733: 491,
8734: 491,
8735: 491,
8736: 491,
8737: 491,
8738: 491,
8739: 491,
8740: 491,
8741: 491,
8742: 491,
8743: 491,
8744: 491,
8745: 491,
8746: 491,
8747: 491,
8748: 491,
8749: 491,
8750: 491,
8751: 491,
8752: 491,
8753: 491,
8754: 491,
8755: 491,
8756: 491,
8757: 491,
8758: 491,
8759: 491,
8760: 491,
8761: 491,
8762: 491,
8763: 491,
8764: 492,
8765: 492,
8766: 492,
8767: 492,
8768: 492,
8769: 492,
8770: 492,
8771: 492,
8772: 492,
8773: 492,
8774: 492,
8775: 492,
8776: 492,
8777: 492,
8778: 492,
8779: 492,
8780: 492,
8781: 492,
8782: 492,
8783: 492,
8784: 492,
8785: 492,
8786: 492,
8787: 492,
8788: 492,
8789: 492,
8790: 492,
8791: 492,
8792: 492,
8793: 492,
8794: 492,
8795: 492,
8796: 493,
8797: 493,
8798: 493,
8799: 493,
8800: 493,
8801: 493,
8802: 493,
8803: 493,
8804: 493,
8805: 493,
8806: 493,
8807: 493,
8808: 493,
8809: 493,
8810: 493,
8811: 493,
8812: 493,
8813: 493,
8814: 493,
8815: 493,
8816: 493,
8817: 493,
8818: 493,
8819: 493,
8820: 493,
8821: 493,
8822: 493,
8823: 493,
8824: 493,
8825: 493,
8826: 493,
8827: 493,
8828: 494,
8829: 494,
8830: 494,
8831: 494,
8832: 494,
8833: 494,
8834: 494,
8835: 494,
8836: 494,
8837: 494,
8838: 494,
8839: 494,
8840: 494,
8841: 494,
8842: 494,
8843: 494,
8844: 494,
8845: 494,
8846: 494,
8847: 494,
8848: 494,
8849: 494,
8850: 494,
8851: 494,
8852: 494,
8853: 494,
8854: 494,
8855: 494,
8856: 494,
8857: 494,
8858: 494,
8859: 494,
8860: 495,
8861: 495,
8862: 495,
8863: 495,
8864: 495,
8865: 495,
8866: 495,
8867: 495,
8868: 495,
8869: 495,
8870: 495,
8871: 495,
8872: 495,
8873: 495,
8874: 495,
8875: 495,
8876: 495,
8877: 495,
8878: 495,
8879: 495,
8880: 495,
8881: 495,
8882: 495,
8883: 495,
8884: 495,
8885: 495,
8886: 495,
8887: 495,
8888: 495,
8889: 495,
8890: 495,
8891: 495,
8892: 496,
8893: 496,
8894: 496,
8895: 496,
8896: 496,
8897: 496,
8898: 496,
8899: 496,
8900: 496,
8901: 496,
8902: 496,
8903: 496,
8904: 496,
8905: 496,
8906: 496,
8907: 496,
8908: 496,
8909: 496,
8910: 496,
8911: 496,
8912: 496,
8913: 496,
8914: 496,
8915: 496,
8916: 496,
8917: 496,
8918: 496,
8919: 496,
8920: 496,
8921: 496,
8922: 496,
8923: 496,
8924: 497,
8925: 497,
8926: 497,
8927: 497,
8928: 497,
8929: 497,
8930: 497,
8931: 497,
8932: 497,
8933: 497,
8934: 497,
8935: 497,
8936: 497,
8937: 497,
8938: 497,
8939: 497,
8940: 497,
8941: 497,
8942: 497,
8943: 497,
8944: 497,
8945: 497,
8946: 497,
8947: 497,
8948: 497,
8949: 497,
8950: 497,
8951: 497,
8952: 497,
8953: 497,
8954: 497,
8955: 497,
8956: 498,
8957: 498,
8958: 498,
8959: 498,
8960: 498,
8961: 498,
8962: 498,
8963: 498,
8964: 498,
8965: 498,
8966: 498,
8967: 498,
8968: 498,
8969: 498,
8970: 498,
8971: 498,
8972: 498,
8973: 498,
8974: 498,
8975: 498,
8976: 498,
8977: 498,
8978: 498,
8979: 498,
8980: 498,
8981: 498,
8982: 498,
8983: 498,
8984: 498,
8985: 498,
8986: 498,
8987: 498,
8988: 499,
8989: 499,
8990: 499,
8991: 499,
8992: 499,
8993: 499,
8994: 499,
8995: 499,
8996: 499,
8997: 499,
8998: 499,
8999: 499,
9000: 499,
9001: 499,
9002: 499,
9003: 499,
9004: 499,
9005: 499,
9006: 499,
9007: 499,
9008: 499,
9009: 499,
9010: 499,
9011: 499,
9012: 499,
9013: 499,
9014: 499,
9015: 499,
9016: 499,
9017: 499,
9018: 499,
9019: 499,
9020: 499,
9021: 499,
9022: 499,
9023: 499,
9024: 499,
9025: 499,
9026: 499,
9027: 499,
9028: 499,
9029: 499,
9030: 499,
9031: 499,
9032: 499,
9033: 499,
9034: 499,
9035: 499,
9036: 499,
9037: 499,
9038: 499,
9039: 499,
9040: 499,
9041: 499,
9042: 499,
9043: 499,
9044: 499,
9045: 499,
9046: 499,
9047: 499,
9048: 499,
9049: 499,
9050: 499,
9051: 499,
9052: 500,
9053: 500,
9054: 500,
9055: 500,
9056: 500,
9057: 500,
9058: 500,
9059: 500,
9060: 500,
9061: 500,
9062: 500,
9063: 500,
9064: 500,
9065: 500,
9066: 500,
9067: 500,
9068: 500,
9069: 500,
9070: 500,
9071: 500,
9072: 500,
9073: 500,
9074: 500,
9075: 500,
9076: 500,
9077: 500,
9078: 500,
9079: 500,
9080: 500,
9081: 500,
9082: 500,
9083: 500,
9084: 500,
9085: 500,
9086: 500,
9087: 500,
9088: 500,
9089: 500,
9090: 500,
9091: 500,
9092: 500,
9093: 500,
9094: 500,
9095: 500,
9096: 500,
9097: 500,
9098: 500,
9099: 500,
9100: 500,
9101: 500,
9102: 500,
9103: 500,
9104: 500,
9105: 500,
9106: 500,
9107: 500,
9108: 500,
9109: 500,
9110: 500,
9111: 500,
9112: 500,
9113: 500,
9114: 500,
9115: 500,
9116: 501,
9117: 501,
9118: 501,
9119: 501,
9120: 501,
9121: 501,
9122: 501,
9123: 501,
9124: 501,
9125: 501,
9126: 501,
9127: 501,
9128: 501,
9129: 501,
9130: 501,
9131: 501,
9132: 501,
9133: 501,
9134: 501,
9135: 501,
9136: 501,
9137: 501,
9138: 501,
9139: 501,
9140: 501,
9141: 501,
9142: 501,
9143: 501,
9144: 501,
9145: 501,
9146: 501,
9147: 501,
9148: 501,
9149: 501,
9150: 501,
9151: 501,
9152: 501,
9153: 501,
9154: 501,
9155: 501,
9156: 501,
9157: 501,
9158: 501,
9159: 501,
9160: 501,
9161: 501,
9162: 501,
9163: 501,
9164: 501,
9165: 501,
9166: 501,
9167: 501,
9168: 501,
9169: 501,
9170: 501,
9171: 501,
9172: 501,
9173: 501,
9174: 501,
9175: 501,
9176: 501,
9177: 501,
9178: 501,
9179: 501,
9180: 502,
9181: 502,
9182: 502,
9183: 502,
9184: 502,
9185: 502,
9186: 502,
9187: 502,
9188: 502,
9189: 502,
9190: 502,
9191: 502,
9192: 502,
9193: 502,
9194: 502,
9195: 502,
9196: 502,
9197: 502,
9198: 502,
9199: 502,
9200: 502,
9201: 502,
9202: 502,
9203: 502,
9204: 502,
9205: 502,
9206: 502,
9207: 502,
9208: 502,
9209: 502,
9210: 502,
9211: 502,
9212: 502,
9213: 502,
9214: 502,
9215: 502,
9216: 502,
9217: 502,
9218: 502,
9219: 502,
9220: 502,
9221: 502,
9222: 502,
9223: 502,
9224: 502,
9225: 502,
9226: 502,
9227: 502,
9228: 502,
9229: 502,
9230: 502,
9231: 502,
9232: 502,
9233: 502,
9234: 502,
9235: 502,
9236: 502,
9237: 502,
9238: 502,
9239: 502,
9240: 502,
9241: 502,
9242: 502,
9243: 502,
9244: 503,
9245: 503,
9246: 503,
9247: 503,
9248: 503,
9249: 503,
9250: 503,
9251: 503,
9252: 503,
9253: 503,
9254: 503,
9255: 503,
9256: 503,
9257: 503,
9258: 503,
9259: 503,
9260: 503,
9261: 503,
9262: 503,
9263: 503,
9264: 503,
9265: 503,
9266: 503,
9267: 503,
9268: 503,
9269: 503,
9270: 503,
9271: 503,
9272: 503,
9273: 503,
9274: 503,
9275: 503,
9276: 503,
9277: 503,
9278: 503,
9279: 503,
9280: 503,
9281: 503,
9282: 503,
9283: 503,
9284: 503,
9285: 503,
9286: 503,
9287: 503,
9288: 503,
9289: 503,
9290: 503,
9291: 503,
9292: 503,
9293: 503,
9294: 503,
9295: 503,
9296: 503,
9297: 503,
9298: 503,
9299: 503,
9300: 503,
9301: 503,
9302: 503,
9303: 503,
9304: 503,
9305: 503,
9306: 503,
9307: 503,
9308: 504,
9309: 504,
9310: 504,
9311: 504,
9312: 504,
9313: 504,
9314: 505,
9315: 505,
9316: 505,
9317: 505,
9318: 505,
9319: 505,
9320: 505,
9321: 505,
9322: 505,
9323: 505,
9324: 505,
9325: 505,
9326: 505,
9327: 505,
9328: 505,
9329: 505,
9330: 505,
9331: 505,
9332: 505,
9333: 505,
9334: 505,
9335: 505,
9336: 505,
9337: 505,
9338: 505,
9339: 505,
9340: 505,
9341: 505,
9342: 505,
9343: 505,
9344: 505,
9345: 505,
9346: 505,
9347: 505,
9348: 505,
9349: 505,
9350: 505,
9351: 505,
9352: 505,
9353: 505,
9354: 505,
9355: 505,
9356: 505,
9357: 505,
9358: 505,
9359: 505,
9360: 505,
9361: 505,
9362: 505,
9363: 505,
9364: 505,
9365: 505,
9366: 505,
9367: 505,
9368: 505,
9369: 505,
9370: 505,
9371: 505,
9372: 505,
9373: 505,
9374: 505,
9375: 505,
9376: 505,
9377: 505,
9378: 506,
9379: 506,
9380: 506,
9381: 506,
9382: 506,
9383: 506,
9384: 507,
9385: 508,
9386: 508,
9387: 508,
9388: 509,
9389: 509,
9390: 509,
9391: 509,
9392: 509,
9393: 509,
9394: 509,
9395: 509,
9396: 509,
9397: 509,
9398: 509,
9399: 509,
9400: 509,
9401: 509,
9402: 509,
9403: 509,
9404: 509,
9405: 509,
9406: 509,
9407: 509,
9408: 509,
9409: 509,
9410: 509,
9411: 509,
9412: 509,
9413: 509,
9414: 509,
9415: 509,
9416: 509,
9417: 509,
9418: 509,
9419: 509,
9420: 509,
9421: 509,
9422: 509,
9423: 509,
9424: 509,
9425: 509,
9426: 509,
9427: 509,
9428: 509,
9429: 509,
9430: 509,
9431: 509,
9432: 509,
9433: 509,
9434: 509,
9435: 509,
9436: 509,
9437: 509,
9438: 509,
9439: 509,
9440: 509,
9441: 509,
9442: 509,
9443: 509,
9444: 509,
9445: 509,
9446: 509,
9447: 509,
9448: 509,
9449: 509,
9450: 509,
9451: 509,
9452: 509,
9453: 509,
9454: 509,
9455: 509,
9456: 509,
9457: 509,
9458: 509,
9459: 509,
9460: 509,
9461: 509,
9462: 509,
9463: 509,
9464: 509,
9465: 509,
9466: 509,
9467: 509,
9468: 510,
9469: 511,
9470: 511,
9471: 511,
9472: 511,
9473: 512,
9474: 513,
9475: 514,
9476: 514,
9477: 514,
9478: 514,
9479: 514,
9480: 514,
9481: 514,
9482: 514,
9483: 514,
9484: 514,
9485: 514,
9486: 514,
9487: 515,
9488: 515,
9489: 515,
9490: 515,
9491: 515,
9492: 515,
9493: 515,
9494: 515,
9495: 515,
9496: 515,
9497: 515,
9498: 515,
9499: 516,
9500: 516,
9501: 516,
9502: 516,
9503: 517,
9504: 518,
9505: 519,
9506: 520,
9507: 520,
9508: 520,
9509: 521,
9510: 522,
9511: 522,
9512: 522,
9513: 522,
9514: 522,
9515: 522,
9516: 522,
9517: 522,
9518: 522,
9519: 522,
9520: 522,
9521: 522,
9522: 523,
9523: 523,
9524: 523,
9525: 523,
9526: 523,
9527: 523,
9528: 524,
9529: 524,
9530: 524,
9531: 524,
9532: 524,
9533: 524,
9534: 525,
9535: 525,
9536: 525,
9537: 525,
9538: 525,
9539: 525,
9540: 526,
9541: 526,
9542: 526,
9543: 526,
9544: 526,
9545: 526,
9546: 527,
9547: 527,
9548: 527,
9549: 527,
9550: 527,
9551: 527,
9552: 528,
9553: 528,
9554: 528,
9555: 528,
9556: 528,
9557: 528,
9558: 529,
9559: 529,
9560: 529,
9561: 529,
9562: 529,
9563: 529,
9564: 530,
9565: 530,
9566: 530,
9567: 530,
9568: 530,
9569: 530,
9570: 531,
9571: 531,
9572: 531,
9573: 531,
9574: 531,
9575: 531,
9576: 532,
9577: 532,
9578: 532,
9579: 532,
9580: 532,
9581: 532,
9582: 533,
9583: 533,
9584: 533,
9585: 533,
9586: 533,
9587: 533,
9588: 534,
9589: 534,
9590: 534,
9591: 534,
9592: 534,
9593: 534,
9594: 535,
9595: 535,
9596: 535,
9597: 535,
9598: 535,
9599: 535,
9600: 536,
9601: 536,
9602: 536,
9603: 536,
9604: 536,
9605: 536,
9606: 537,
9607: 537,
9608: 537,
9609: 537,
9610: 537,
9611: 537,
9612: 538,
9613: 538,
9614: 538,
9615: 538,
9616: 538,
9617: 538,
9618: 539,
9619: 539,
9620: 539,
9621: 539,
9622: 539,
9623: 539,
9624: 540,
9625: 540,
9626: 540,
9627: 540,
9628: 541,
9629: 541,
9630: 541,
9631: 541,
9632: 542,
9633: 542,
9634: 542,
9635: 542,
9636: 543,
9637: 543,
9638: 543,
9639: 543,
9640: 544,
9641: 544,
9642: 544,
9643: 544,
9644: 545,
9645: 545,
9646: 545,
9647: 545,
9648: 546,
9649: 546,
9650: 546,
9651: 546,
9652: 547,
9653: 547,
9654: 547,
9655: 547,
9656: 548,
9657: 548,
9658: 548,
9659: 548,
9660: 549,
9661: 549,
9662: 549,
9663: 549,
9664: 550,
9665: 550,
9666: 550,
9667: 550,
9668: 551,
9669: 551,
9670: 551,
9671: 551,
9672: 552,
9673: 552,
9674: 552,
9675: 552,
9676: 553,
9677: 553,
9678: 553,
9679: 553,
9680: 554,
9681: 554,
9682: 554,
9683: 554,
9684: 555,
9685: 555,
9686: 555,
9687: 555,
9688: 556,
9689: 557,
9690: 558,
9691: 559,
9692: 560,
9693: 561,
9694: 562,
9695: 563,
9696: 564,
9697: 565,
9698: 566,
9699: 567,
9700: 568,
9701: 569,
9702: 570,
9703: 571,
9704: 572,
9705: 573,
9706: 574,
9707: 575,
9708: 576,
9709: 577,
9710: 578,
9711: 579,
9712: 580,
9713: 581,
9714: 582,
9715: 583,
9716: 584,
9717: 585,
9718: 586,
9719: 587,
9720: 588,
9721: 588,
9722: 588,
9723: 588,
9724: 588,
9725: 588,
9726: 588,
9727: 588,
9728: 588,
9729: 588,
9730: 588,
9731: 588,
9732: 588,
9733: 588,
9734: 588,
9735: 588,
9736: 588,
9737: 588,
9738: 588,
9739: 588,
9740: 588,
9741: 588,
9742: 588,
9743: 588,
9744: 588,
9745: 588,
9746: 589,
9747: 590,
9748: 591,
9749: 591,
9750: 591,
9751: 591,
9752: 591,
9753: 591,
9754: 591,
9755: 591,
9756: 591,
9757: 591,
9758: 591,
9759: 591,
9760: 592,
9761: 593,
9762: 594,
9763: 595,
9764: 596,
9765: 597,
9766: 598,
9767: 599,
9768: 600,
9769: 601,
9770: 602,
9771: 602,
9772: 603,
9773: 603,
9774: 604,
9775: 604,
9776: 605,
9777: 605,
9778: 606,
9779: 606,
9780: 607,
9781: 607,
9782: 608,
9783: 608,
9784: 609,
9785: 609,
9786: 610,
9787: 610,
9788: 611,
9789: 611,
9790: 612,
9791: 612,
9792: 613,
9793: 613,
9794: 614,
9795: 614,
9796: 615,
9797: 615,
9798: 616,
9799: 616,
9800: 617,
9801: 617,
9802: 618,
9803: 618,
9804: 619,
9805: 619,
9806: 620,
9807: 620,
9808: 621,
9809: 621,
9810: 622,
9811: 622,
9812: 622,
9813: 622,
9814: 622,
9815: 622,
9816: 622,
9817: 622,
9818: 623,
9819: 623,
9820: 623,
9821: 623,
9822: 623,
9823: 623,
9824: 623,
9825: 623,
9826: 624,
9827: 624,
9828: 624,
9829: 624,
9830: 624,
9831: 624,
9832: 624,
9833: 624,
9834: 625,
9835: 625,
9836: 625,
9837: 625,
9838: 625,
9839: 625,
9840: 625,
9841: 625,
9842: 626,
9843: 626,
9844: 626,
9845: 626,
9846: 626,
9847: 626,
9848: 626,
9849: 626,
9850: 627,
9851: 627,
9852: 627,
9853: 627,
9854: 627,
9855: 627,
9856: 627,
9857: 627,
9858: 628,
9859: 628,
9860: 628,
9861: 628,
9862: 628,
9863: 628,
9864: 628,
9865: 628,
9866: 629,
9867: 629,
9868: 629,
9869: 629,
9870: 629,
9871: 629,
9872: 629,
9873: 629,
9874: 630,
9875: 630,
9876: 630,
9877: 630,
9878: 630,
9879: 630,
9880: 630,
9881: 630,
9882: 631,
9883: 631,
9884: 631,
9885: 631,
9886: 631,
9887: 631,
9888: 631,
9889: 631,
9890: 632,
9891: 632,
9892: 632,
9893: 632,
9894: 632,
9895: 632,
9896: 632,
9897: 632,
9898: 633,
9899: 634,
9900: 634,
9901: 635,
9902: 636,
9903: 636,
9904: 636,
9905: 636,
9906: 636,
9907: 636,
9908: 636,
9909: 636,
9910: 636,
9911: 636,
9912: 636,
9913: 636,
9914: 637,
9915: 638,
9916: 639,
9917: 640,
9918: 640,
9919: 641,
9920: 641,
9921: 641,
9922: 641,
9923: 641,
9924: 641,
9925: 641,
9926: 641,
9927: 641,
9928: 641,
9929: 641,
9930: 641,
9931: 641,
9932: 641,
9933: 641,
9934: 641,
9935: 641,
9936: 641,
9937: 641,
9938: 641,
9939: 641,
9940: 641,
9941: 641,
9942: 641,
9943: 641,
9944: 641,
9945: 641,
9946: 641,
9947: 641,
9948: 641,
9949: 641,
9950: 641,
9951: 641,
9952: 641,
9953: 641,
9954: 641,
9955: 641,
9956: 641,
9957: 641,
9958: 641,
9959: 641,
9960: 641,
9961: 641,
9962: 641,
9963: 641,
9964: 641,
9965: 641,
9966: 641,
9967: 641,
9968: 641,
9969: 641,
9970: 641,
9971: 641,
9972: 641,
9973: 641,
9974: 641,
9975: 641,
9976: 641,
9977: 641,
9978: 641,
9979: 641,
9980: 641,
9981: 641,
9982: 641,
9983: 641,
9984: 641,
9985: 641,
9986: 641,
9987: 641,
9988: 641,
9989: 641,
9990: 641,
9991: 641,
9992: 641,
9993: 641,
9994: 641,
9995: 641,
9996: 641,
9997: 641,
9998: 641,
9999: 642,
10000: 642,
10001: 642,
10002: 642,
10003: 642,
10004: 642,
10005: 642,
10006: 642,
10007: 642,
10008: 642,
10009: 642,
10010: 642,
10011: 642,
10012: 642,
10013: 642,
10014: 642,
10015: 642,
10016: 642,
10017: 642,
10018: 642,
10019: 642,
10020: 642,
10021: 642,
10022: 642,
10023: 642,
10024: 642,
10025: 642,
10026: 642,
10027: 642,
10028: 642,
10029: 642,
10030: 642,
10031: 642,
10032: 642,
10033: 642,
10034: 642,
10035: 642,
10036: 642,
10037: 642,
10038: 642,
10039: 642,
10040: 642,
10041: 642,
10042: 642,
10043: 642,
10044: 642,
10045: 642,
10046: 642,
10047: 642,
10048: 642,
10049: 642,
10050: 642,
10051: 642,
10052: 642,
10053: 642,
10054: 642,
10055: 642,
10056: 642,
10057: 642,
10058: 642,
10059: 642,
10060: 642,
10061: 642,
10062: 642,
10063: 642,
10064: 642,
10065: 642,
10066: 642,
10067: 642,
10068: 642,
10069: 642,
10070: 642,
10071: 642,
10072: 642,
10073: 642,
10074: 642,
10075: 642,
10076: 642,
10077: 642,
10078: 642,
10079: 643,
10080: 643,
10081: 643,
10082: 643,
10083: 643,
10084: 643,
10085: 643,
10086: 643,
10087: 643,
10088: 643,
10089: 643,
10090: 643,
10091: 643,
10092: 643,
10093: 643,
10094: 643,
10095: 643,
10096: 643,
10097: 643,
10098: 643,
10099: 643,
10100: 643,
10101: 643,
10102: 643,
10103: 643,
10104: 643,
10105: 643,
10106: 643,
10107: 643,
10108: 643,
10109: 643,
10110: 643,
10111: 643,
10112: 643,
10113: 643,
10114: 643,
10115: 643,
10116: 643,
10117: 643,
10118: 643,
10119: 643,
10120: 643,
10121: 643,
10122: 643,
10123: 643,
10124: 643,
10125: 643,
10126: 643,
10127: 643,
10128: 643,
10129: 643,
10130: 643,
10131: 643,
10132: 643,
10133: 643,
10134: 643,
10135: 643,
10136: 643,
10137: 643,
10138: 643,
10139: 643,
10140: 643,
10141: 643,
10142: 643,
10143: 643,
10144: 643,
10145: 643,
10146: 643,
10147: 643,
10148: 643,
10149: 643,
10150: 643,
10151: 643,
10152: 643,
10153: 643,
10154: 643,
10155: 643,
10156: 643,
10157: 643,
10158: 643,
10159: 644,
10160: 644,
10161: 644,
10162: 644,
10163: 644,
10164: 644,
10165: 644,
10166: 644,
10167: 644,
10168: 644,
10169: 644,
10170: 644,
10171: 644,
10172: 644,
10173: 644,
10174: 644,
10175: 644,
10176: 644,
10177: 644,
10178: 644,
10179: 644,
10180: 644,
10181: 644,
10182: 644,
10183: 644,
10184: 644,
10185: 644,
10186: 644,
10187: 644,
10188: 644,
10189: 644,
10190: 644,
10191: 644,
10192: 644,
10193: 644,
10194: 644,
10195: 644,
10196: 644,
10197: 644,
10198: 644,
10199: 644,
10200: 644,
10201: 644,
10202: 644,
10203: 644,
10204: 644,
10205: 644,
10206: 644,
10207: 644,
10208: 644,
10209: 644,
10210: 644,
10211: 644,
10212: 644,
10213: 644,
10214: 644,
10215: 644,
10216: 644,
10217: 644,
10218: 644,
10219: 644,
10220: 644,
10221: 644,
10222: 644,
10223: 644,
10224: 644,
10225: 644,
10226: 644,
10227: 644,
10228: 644,
10229: 644,
10230: 644,
10231: 644,
10232: 644,
10233: 644,
10234: 644,
10235: 644,
10236: 644,
10237: 644,
10238: 644,
10239: 645,
10240: 645,
10241: 645,
10242: 645,
10243: 645,
10244: 645,
10245: 645,
10246: 645,
10247: 645,
10248: 645,
10249: 645,
10250: 645,
10251: 645,
10252: 645,
10253: 645,
10254: 645,
10255: 645,
10256: 645,
10257: 645,
10258: 645,
10259: 645,
10260: 645,
10261: 645,
10262: 645,
10263: 645,
10264: 645,
10265: 645,
10266: 645,
10267: 645,
10268: 645,
10269: 645,
10270: 645,
10271: 645,
10272: 645,
10273: 645,
10274: 645,
10275: 645,
10276: 645,
10277: 645,
10278: 645,
10279: 645,
10280: 645,
10281: 645,
10282: 645,
10283: 645,
10284: 645,
10285: 645,
10286: 645,
10287: 645,
10288: 645,
10289: 645,
10290: 645,
10291: 645,
10292: 645,
10293: 645,
10294: 645,
10295: 645,
10296: 645,
10297: 645,
10298: 645,
10299: 645,
10300: 645,
10301: 645,
10302: 645,
10303: 645,
10304: 645,
10305: 645,
10306: 645,
10307: 645,
10308: 645,
10309: 645,
10310: 645,
10311: 645,
10312: 645,
10313: 645,
10314: 645,
10315: 645,
10316: 645,
10317: 645,
10318: 645,
10319: 646,
10320: 646,
10321: 646,
10322: 646,
10323: 646,
10324: 646,
10325: 646,
10326: 646,
10327: 646,
10328: 646,
10329: 646,
10330: 646,
10331: 646,
10332: 646,
10333: 646,
10334: 646,
10335: 646,
10336: 646,
10337: 646,
10338: 646,
10339: 646,
10340: 646,
10341: 646,
10342: 646,
10343: 646,
10344: 646,
10345: 646,
10346: 646,
10347: 646,
10348: 646,
10349: 646,
10350: 646,
10351: 646,
10352: 646,
10353: 646,
10354: 646,
10355: 646,
10356: 646,
10357: 646,
10358: 646,
10359: 646,
10360: 646,
10361: 646,
10362: 646,
10363: 646,
10364: 646,
10365: 646,
10366: 646,
10367: 646,
10368: 646,
10369: 646,
10370: 646,
10371: 646,
10372: 646,
10373: 646,
10374: 646,
10375: 646,
10376: 646,
10377: 646,
10378: 646,
10379: 646,
10380: 646,
10381: 646,
10382: 646,
10383: 646,
10384: 646,
10385: 646,
10386: 646,
10387: 646,
10388: 646,
10389: 646,
10390: 646,
10391: 646,
10392: 646,
10393: 646,
10394: 646,
10395: 646,
10396: 646,
10397: 646,
10398: 646,
10399: 647,
10400: 647,
10401: 647,
10402: 647,
10403: 647,
10404: 647,
10405: 647,
10406: 647,
10407: 647,
10408: 647,
10409: 647,
10410: 647,
10411: 647,
10412: 647,
10413: 647,
10414: 647,
10415: 647,
10416: 647,
10417: 647,
10418: 647,
10419: 647,
10420: 647,
10421: 647,
10422: 647,
10423: 647,
10424: 647,
10425: 647,
10426: 647,
10427: 647,
10428: 647,
10429: 647,
10430: 647,
10431: 647,
10432: 647,
10433: 647,
10434: 647,
10435: 647,
10436: 647,
10437: 647,
10438: 647,
10439: 647,
10440: 647,
10441: 647,
10442: 647,
10443: 647,
10444: 647,
10445: 647,
10446: 647,
10447: 647,
10448: 647,
10449: 647,
10450: 647,
10451: 647,
10452: 647,
10453: 647,
10454: 647,
10455: 647,
10456: 647,
10457: 647,
10458: 647,
10459: 647,
10460: 647,
10461: 647,
10462: 647,
10463: 647,
10464: 647,
10465: 647,
10466: 647,
10467: 647,
10468: 647,
10469: 647,
10470: 647,
10471: 647,
10472: 647,
10473: 647,
10474: 647,
10475: 647,
10476: 647,
10477: 647,
10478: 647,
10479: 648,
10480: 648,
10481: 648,
10482: 648,
10483: 648,
10484: 648,
10485: 648,
10486: 648,
10487: 648,
10488: 648,
10489: 648,
10490: 648,
10491: 648,
10492: 648,
10493: 648,
10494: 648,
10495: 648,
10496: 648,
10497: 648,
10498: 648,
10499: 648,
10500: 648,
10501: 648,
10502: 648,
10503: 648,
10504: 648,
10505: 648,
10506: 648,
10507: 648,
10508: 648,
10509: 648,
10510: 648,
10511: 648,
10512: 648,
10513: 648,
10514: 648,
10515: 648,
10516: 648,
10517: 648,
10518: 648,
10519: 648,
10520: 648,
10521: 648,
10522: 648,
10523: 648,
10524: 648,
10525: 648,
10526: 648,
10527: 648,
10528: 648,
10529: 648,
10530: 648,
10531: 648,
10532: 648,
10533: 648,
10534: 648,
10535: 648,
10536: 648,
10537: 648,
10538: 648,
10539: 648,
10540: 648,
10541: 648,
10542: 648,
10543: 648,
10544: 648,
10545: 648,
10546: 648,
10547: 648,
10548: 648,
10549: 648,
10550: 648,
10551: 648,
10552: 648,
10553: 648,
10554: 648,
10555: 648,
10556: 648,
10557: 648,
10558: 648,
10559: 649,
10560: 649,
10561: 649,
10562: 649,
10563: 649,
10564: 649,
10565: 649,
10566: 649,
10567: 649,
10568: 649,
10569: 649,
10570: 649,
10571: 649,
10572: 649,
10573: 649,
10574: 649,
10575: 649,
10576: 649,
10577: 649,
10578: 649,
10579: 649,
10580: 649,
10581: 649,
10582: 649,
10583: 649,
10584: 649,
10585: 649,
10586: 649,
10587: 649,
10588: 649,
10589: 649,
10590: 649,
10591: 649,
10592: 649,
10593: 649,
10594: 649,
10595: 649,
10596: 649,
10597: 649,
10598: 649,
10599: 649,
10600: 649,
10601: 649,
10602: 649,
10603: 649,
10604: 649,
10605: 649,
10606: 649,
10607: 649,
10608: 649,
10609: 649,
10610: 649,
10611: 649,
10612: 649,
10613: 649,
10614: 649,
10615: 649,
10616: 649,
10617: 649,
10618: 649,
10619: 649,
10620: 649,
10621: 649,
10622: 649,
10623: 649,
10624: 649,
10625: 649,
10626: 649,
10627: 649,
10628: 649,
10629: 649,
10630: 649,
10631: 649,
10632: 649,
10633: 649,
10634: 649,
10635: 649,
10636: 649,
10637: 649,
10638: 649,
10639: 650,
10640: 650,
10641: 650,
10642: 650,
10643: 650,
10644: 650,
10645: 650,
10646: 650,
10647: 650,
10648: 650,
10649: 650,
10650: 650,
10651: 650,
10652: 650,
10653: 650,
10654: 650,
10655: 650,
10656: 650,
10657: 650,
10658: 650,
10659: 650,
10660: 650,
10661: 650,
10662: 650,
10663: 650,
10664: 650,
10665: 650,
10666: 650,
10667: 650,
10668: 650,
10669: 650,
10670: 650,
10671: 650,
10672: 650,
10673: 650,
10674: 650,
10675: 650,
10676: 650,
10677: 650,
10678: 650,
10679: 650,
10680: 650,
10681: 650,
10682: 650,
10683: 650,
10684: 650,
10685: 650,
10686: 650,
10687: 650,
10688: 650,
10689: 650,
10690: 650,
10691: 650,
10692: 650,
10693: 650,
10694: 650,
10695: 650,
10696: 650,
10697: 650,
10698: 650,
10699: 650,
10700: 650,
10701: 650,
10702: 650,
10703: 650,
10704: 650,
10705: 650,
10706: 650,
10707: 650,
10708: 650,
10709: 650,
10710: 650,
10711: 650,
10712: 650,
10713: 650,
10714: 650,
10715: 650,
10716: 650,
10717: 650,
10718: 650,
10719: 651,
10720: 651,
10721: 651,
10722: 651,
10723: 651,
10724: 651,
10725: 651,
10726: 651,
10727: 651,
10728: 651,
10729: 651,
10730: 651,
10731: 651,
10732: 651,
10733: 651,
10734: 651,
10735: 651,
10736: 651,
10737: 651,
10738: 651,
10739: 651,
10740: 651,
10741: 651,
10742: 651,
10743: 651,
10744: 651,
10745: 651,
10746: 651,
10747: 651,
10748: 651,
10749: 651,
10750: 651,
10751: 651,
10752: 651,
10753: 651,
10754: 651,
10755: 651,
10756: 651,
10757: 651,
10758: 651,
10759: 651,
10760: 651,
10761: 651,
10762: 651,
10763: 651,
10764: 651,
10765: 651,
10766: 651,
10767: 651,
10768: 651,
10769: 651,
10770: 651,
10771: 651,
10772: 651,
10773: 651,
10774: 651,
10775: 651,
10776: 651,
10777: 651,
10778: 651,
10779: 651,
10780: 651,
10781: 651,
10782: 651,
10783: 651,
10784: 651,
10785: 651,
10786: 651,
10787: 651,
10788: 651,
10789: 651,
10790: 651,
10791: 651,
10792: 651,
10793: 651,
10794: 651,
10795: 651,
10796: 651,
10797: 651,
10798: 651,
10799: 652,
10800: 652,
10801: 652,
10802: 652,
10803: 652,
10804: 652,
10805: 652,
10806: 652,
10807: 652,
10808: 652,
10809: 652,
10810: 652,
10811: 652,
10812: 652,
10813: 652,
10814: 652,
10815: 652,
10816: 652,
10817: 652,
10818: 652,
10819: 652,
10820: 652,
10821: 652,
10822: 652,
10823: 652,
10824: 652,
10825: 652,
10826: 652,
10827: 652,
10828: 652,
10829: 652,
10830: 652,
10831: 652,
10832: 652,
10833: 652,
10834: 652,
10835: 652,
10836: 652,
10837: 652,
10838: 652,
10839: 652,
10840: 652,
10841: 652,
10842: 652,
10843: 652,
10844: 652,
10845: 652,
10846: 652,
10847: 652,
10848: 652,
10849: 652,
10850: 652,
10851: 652,
10852: 652,
10853: 652,
10854: 652,
10855: 652,
10856: 652,
10857: 652,
10858: 652,
10859: 652,
10860: 652,
10861: 652,
10862: 652,
10863: 652,
10864: 652,
10865: 652,
10866: 652,
10867: 652,
10868: 652,
10869: 652,
10870: 652,
10871: 652,
10872: 652,
10873: 652,
10874: 652,
10875: 652,
10876: 652,
10877: 652,
10878: 652,
10879: 653,
10880: 653,
10881: 653,
10882: 653,
10883: 653,
10884: 653,
10885: 653,
10886: 653,
10887: 653,
10888: 653,
10889: 653,
10890: 653,
10891: 653,
10892: 653,
10893: 653,
10894: 653,
10895: 653,
10896: 653,
10897: 653,
10898: 653,
10899: 653,
10900: 653,
10901: 653,
10902: 653,
10903: 653,
10904: 653,
10905: 653,
10906: 653,
10907: 653,
10908: 653,
10909: 653,
10910: 653,
10911: 653,
10912: 653,
10913: 653,
10914: 653,
10915: 653,
10916: 653,
10917: 653,
10918: 653,
10919: 653,
10920: 653,
10921: 653,
10922: 653,
10923: 653,
10924: 653,
10925: 653,
10926: 653,
10927: 653,
10928: 653,
10929: 653,
10930: 653,
10931: 653,
10932: 653,
10933: 653,
10934: 653,
10935: 653,
10936: 653,
10937: 653,
10938: 653,
10939: 653,
10940: 653,
10941: 653,
10942: 653,
10943: 653,
10944: 653,
10945: 653,
10946: 653,
10947: 653,
10948: 653,
10949: 653,
10950: 653,
10951: 653,
10952: 653,
10953: 653,
10954: 653,
10955: 653,
10956: 653,
10957: 653,
10958: 653,
10959: 654,
10960: 654,
10961: 654,
10962: 654,
10963: 654,
10964: 654,
10965: 654,
10966: 654,
10967: 654,
10968: 654,
10969: 654,
10970: 654,
10971: 654,
10972: 654,
10973: 654,
10974: 654,
10975: 654,
10976: 654,
10977: 654,
10978: 654,
10979: 654,
10980: 654,
10981: 654,
10982: 654,
10983: 654,
10984: 654,
10985: 654,
10986: 654,
10987: 654,
10988: 654,
10989: 654,
10990: 654,
10991: 654,
10992: 654,
10993: 654,
10994: 654,
10995: 654,
10996: 654,
10997: 654,
10998: 654,
10999: 654,
11000: 654,
11001: 654,
11002: 654,
11003: 654,
11004: 654,
11005: 654,
11006: 654,
11007: 654,
11008: 654,
11009: 654,
11010: 654,
11011: 654,
11012: 654,
11013: 654,
11014: 654,
11015: 654,
11016: 654,
11017: 654,
11018: 654,
11019: 654,
11020: 654,
11021: 654,
11022: 654,
11023: 654,
11024: 654,
11025: 654,
11026: 654,
11027: 654,
11028: 654,
11029: 654,
11030: 654,
11031: 654,
11032: 654,
11033: 654,
11034: 654,
11035: 654,
11036: 654,
11037: 654,
11038: 654,
11039: 655,
11040: 655,
11041: 655,
11042: 655,
11043: 655,
11044: 655,
11045: 656,
11046: 656,
11047: 656,
11048: 656,
11049: 656,
11050: 656,
11051: 657,
11052: 657,
11053: 657,
11054: 657,
11055: 657,
11056: 657,
11057: 658,
11058: 658,
11059: 658,
11060: 658,
11061: 658,
11062: 658,
11063: 659,
11064: 659,
11065: 659,
11066: 659,
11067: 659,
11068: 659,
11069: 660,
11070: 660,
11071: 660,
11072: 660,
11073: 660,
11074: 660,
11075: 661,
11076: 661,
11077: 661,
11078: 661,
11079: 661,
11080: 661,
11081: 662,
11082: 662,
11083: 662,
11084: 662,
11085: 662,
11086: 662,
11087: 663,
11088: 663,
11089: 663,
11090: 663,
11091: 663,
11092: 663,
11093: 664,
11094: 664,
11095: 664,
11096: 664,
11097: 664,
11098: 664,
11099: 665,
11100: 665,
11101: 665,
11102: 665,
11103: 665,
11104: 665,
11105: 666,
11106: 666,
11107: 666,
11108: 666,
11109: 666,
11110: 666,
11111: 667,
11112: 667,
11113: 667,
11114: 667,
11115: 667,
11116: 667,
11117: 668,
11118: 668,
11119: 668,
11120: 668,
11121: 668,
11122: 668,
11123: 668,
11124: 668,
11125: 668,
11126: 668,
11127: 668,
11128: 668,
11129: 668,
11130: 668,
11131: 668,
11132: 668,
11133: 668,
11134: 668,
11135: 668,
11136: 668,
11137: 668,
11138: 668,
11139: 668,
11140: 668,
11141: 668,
11142: 668,
11143: 668,
11144: 668,
11145: 668,
11146: 668,
11147: 668,
11148: 668,
11149: 668,
11150: 668,
11151: 668,
11152: 668,
11153: 668,
11154: 668,
11155: 668,
11156: 668,
11157: 668,
11158: 668,
11159: 668,
11160: 668,
11161: 668,
11162: 668,
11163: 668,
11164: 668,
11165: 668,
11166: 668,
11167: 668,
11168: 668,
11169: 668,
11170: 668,
11171: 668,
11172: 668,
11173: 668,
11174: 668,
11175: 668,
11176: 668,
11177: 668,
11178: 668,
11179: 668,
11180: 668,
11181: 668,
11182: 668,
11183: 668,
11184: 668,
11185: 668,
11186: 668,
11187: 668,
11188: 668,
11189: 668,
11190: 668,
11191: 668,
11192: 668,
11193: 668,
11194: 668,
11195: 668,
11196: 668,
11197: 668,
11198: 668,
11199: 668,
11200: 668,
11201: 668,
11202: 668,
11203: 668,
11204: 668,
11205: 668,
11206: 668,
11207: 668,
11208: 668,
11209: 668,
11210: 668,
11211: 668,
11212: 668,
11213: 668,
11214: 668,
11215: 668,
11216: 668,
11217: 668,
11218: 668,
11219: 668,
11220: 668,
11221: 668,
11222: 668,
11223: 668,
11224: 668,
11225: 668,
11226: 668,
11227: 668,
11228: 668,
11229: 668,
11230: 668,
11231: 668,
11232: 668,
11233: 668,
11234: 668,
11235: 668,
11236: 668,
11237: 668,
11238: 668,
11239: 668,
11240: 668,
11241: 668,
11242: 668,
11243: 668,
11244: 668,
11245: 668,
11246: 668,
11247: 668,
11248: 668,
11249: 668,
11250: 668,
11251: 668,
11252: 668,
11253: 668,
11254: 668,
11255: 668,
11256: 668,
11257: 668,
11258: 668,
11259: 668,
11260: 668,
11261: 668,
11262: 668,
11263: 668,
11264: 668,
11265: 668,
11266: 668,
11267: 668,
11268: 668,
11269: 668,
11270: 668,
11271: 668,
11272: 668,
11273: 668,
11274: 668,
11275: 668,
11276: 668,
11277: 668,
11278: 668,
11279: 668,
11280: 668,
11281: 668,
11282: 668,
11283: 668,
11284: 668,
11285: 668,
11286: 668,
11287: 668,
11288: 668,
11289: 668,
11290: 668,
11291: 668,
11292: 668,
11293: 668,
11294: 668,
11295: 668,
11296: 668,
11297: 668,
11298: 668,
11299: 668,
11300: 668,
11301: 668,
11302: 668,
11303: 668,
11304: 668,
11305: 668,
11306: 668,
11307: 668,
11308: 668,
11309: 668,
11310: 668,
11311: 668,
11312: 668,
11313: 668,
11314: 668,
11315: 668,
11316: 668,
11317: 668,
11318: 668,
11319: 668,
11320: 668,
11321: 668,
11322: 668,
11323: 668,
11324: 668,
11325: 668,
11326: 668,
11327: 668,
11328: 668,
11329: 668,
11330: 668,
11331: 668,
11332: 668,
11333: 668,
11334: 668,
11335: 668,
11336: 668,
11337: 668,
11338: 668,
11339: 668,
11340: 668,
11341: 668,
11342: 668,
11343: 668,
11344: 668,
11345: 668,
11346: 668,
11347: 668,
11348: 668,
11349: 668,
11350: 668,
11351: 668,
11352: 668,
11353: 668,
11354: 668,
11355: 668,
11356: 668,
11357: 668,
11358: 668,
11359: 668,
11360: 668,
11361: 668,
11362: 668,
11363: 668,
11364: 668,
11365: 668,
11366: 668,
11367: 668,
11368: 668,
11369: 668,
11370: 668,
11371: 668,
11372: 668,
11373: 668,
11374: 668,
11375: 668,
11376: 668,
11377: 668,
11378: 668,
11379: 668,
11380: 668,
11381: 668,
11382: 668,
11383: 668,
11384: 668,
11385: 668,
11386: 668,
11387: 668,
11388: 668,
11389: 668,
11390: 668,
11391: 668,
11392: 668,
11393: 668,
11394: 668,
11395: 668,
11396: 668,
11397: 668,
11398: 668,
11399: 668,
11400: 668,
11401: 668,
11402: 668,
11403: 668,
11404: 668,
11405: 668,
11406: 668,
11407: 668,
11408: 668,
11409: 668,
11410: 668,
11411: 668,
11412: 668,
11413: 668,
11414: 668,
11415: 668,
11416: 668,
11417: 668,
11418: 668,
11419: 668,
11420: 668,
11421: 668,
11422: 668,
11423: 668,
11424: 668,
11425: 668,
11426: 668,
11427: 668,
11428: 668,
11429: 668,
11430: 668,
11431: 668,
11432: 668,
11433: 668,
11434: 668,
11435: 668,
11436: 668,
11437: 668,
11438: 668,
11439: 668,
11440: 668,
11441: 669,
11442: 669,
11443: 669,
11444: 669,
11445: 669,
11446: 669,
11447: 669,
11448: 669,
11449: 669,
11450: 669,
11451: 669,
11452: 669,
11453: 669,
11454: 669,
11455: 669,
11456: 669,
11457: 669,
11458: 669,
11459: 669,
11460: 669,
11461: 669,
11462: 669,
11463: 669,
11464: 669,
11465: 669,
11466: 669,
11467: 669,
11468: 669,
11469: 669,
11470: 669,
11471: 669,
11472: 669,
11473: 669,
11474: 669,
11475: 669,
11476: 669,
11477: 669,
11478: 669,
11479: 669,
11480: 669,
11481: 669,
11482: 669,
11483: 669,
11484: 669,
11485: 669,
11486: 669,
11487: 669,
11488: 669,
11489: 669,
11490: 669,
11491: 669,
11492: 669,
11493: 669,
11494: 669,
11495: 669,
11496: 669,
11497: 669,
11498: 669,
11499: 669,
11500: 669,
11501: 669,
11502: 669,
11503: 669,
11504: 669,
11505: 669,
11506: 669,
11507: 669,
11508: 669,
11509: 669,
11510: 669,
11511: 669,
11512: 669,
11513: 669,
11514: 669,
11515: 669,
11516: 669,
11517: 669,
11518: 669,
11519: 669,
11520: 669,
11521: 669,
11522: 669,
11523: 669,
11524: 669,
11525: 669,
11526: 669,
11527: 669,
11528: 669,
11529: 669,
11530: 669,
11531: 669,
11532: 669,
11533: 669,
11534: 669,
11535: 669,
11536: 669,
11537: 669,
11538: 669,
11539: 669,
11540: 669,
11541: 669,
11542: 669,
11543: 669,
11544: 669,
11545: 669,
11546: 669,
11547: 669,
11548: 669,
11549: 669,
11550: 669,
11551: 669,
11552: 669,
11553: 669,
11554: 669,
11555: 669,
11556: 669,
11557: 669,
11558: 669,
11559: 669,
11560: 669,
11561: 669,
11562: 669,
11563: 669,
11564: 669,
11565: 669,
11566: 669,
11567: 669,
11568: 669,
11569: 669,
11570: 669,
11571: 669,
11572: 669,
11573: 669,
11574: 669,
11575: 669,
11576: 669,
11577: 669,
11578: 669,
11579: 669,
11580: 669,
11581: 669,
11582: 669,
11583: 669,
11584: 669,
11585: 669,
11586: 669,
11587: 669,
11588: 669,
11589: 669,
11590: 669,
11591: 669,
11592: 669,
11593: 669,
11594: 669,
11595: 669,
11596: 669,
11597: 669,
11598: 669,
11599: 669,
11600: 669,
11601: 669,
11602: 669,
11603: 669,
11604: 669,
11605: 669,
11606: 669,
11607: 669,
11608: 669,
11609: 669,
11610: 669,
11611: 669,
11612: 669,
11613: 669,
11614: 669,
11615: 669,
11616: 669,
11617: 669,
11618: 669,
11619: 669,
11620: 669,
11621: 669,
11622: 669,
11623: 669,
11624: 669,
11625: 669,
11626: 669,
11627: 669,
11628: 669,
11629: 669,
11630: 669,
11631: 669,
11632: 669,
11633: 669,
11634: 669,
11635: 669,
11636: 669,
11637: 669,
11638: 669,
11639: 669,
11640: 669,
11641: 669,
11642: 669,
11643: 669,
11644: 669,
11645: 669,
11646: 669,
11647: 669,
11648: 669,
11649: 669,
11650: 669,
11651: 669,
11652: 669,
11653: 669,
11654: 669,
11655: 669,
11656: 669,
11657: 669,
11658: 669,
11659: 669,
11660: 669,
11661: 669,
11662: 669,
11663: 669,
11664: 669,
11665: 669,
11666: 669,
11667: 669,
11668: 669,
11669: 669,
11670: 669,
11671: 669,
11672: 669,
11673: 669,
11674: 669,
11675: 669,
11676: 669,
11677: 669,
11678: 669,
11679: 669,
11680: 669,
11681: 669,
11682: 669,
11683: 669,
11684: 669,
11685: 669,
11686: 669,
11687: 669,
11688: 669,
11689: 669,
11690: 669,
11691: 669,
11692: 669,
11693: 669,
11694: 669,
11695: 669,
11696: 669,
11697: 669,
11698: 669,
11699: 669,
11700: 669,
11701: 669,
11702: 669,
11703: 669,
11704: 669,
11705: 669,
11706: 669,
11707: 669,
11708: 669,
11709: 669,
11710: 669,
11711: 669,
11712: 669,
11713: 669,
11714: 669,
11715: 669,
11716: 669,
11717: 669,
11718: 669,
11719: 669,
11720: 669,
11721: 669,
11722: 669,
11723: 669,
11724: 669,
11725: 669,
11726: 669,
11727: 669,
11728: 669,
11729: 669,
11730: 669,
11731: 669,
11732: 669,
11733: 669,
11734: 669,
11735: 669,
11736: 669,
11737: 669,
11738: 669,
11739: 669,
11740: 669,
11741: 669,
11742: 669,
11743: 669,
11744: 669,
11745: 669,
11746: 669,
11747: 669,
11748: 669,
11749: 669,
11750: 669,
11751: 669,
11752: 669,
11753: 669,
11754: 669,
11755: 669,
11756: 669,
11757: 669,
11758: 669,
11759: 669,
11760: 669,
11761: 669,
11762: 669,
11763: 669,
11764: 669,
11765: 670,
11766: 670,
11767: 670,
11768: 670,
11769: 670,
11770: 670,
11771: 670,
11772: 670,
11773: 670,
11774: 670,
11775: 670,
11776: 670,
11777: 670,
11778: 670,
11779: 670,
11780: 670,
11781: 670,
11782: 670,
11783: 670,
11784: 670,
11785: 670,
11786: 670,
11787: 670,
11788: 670,
11789: 670,
11790: 670,
11791: 670,
11792: 670,
11793: 670,
11794: 670,
11795: 670,
11796: 670,
11797: 670,
11798: 670,
11799: 670,
11800: 670,
11801: 670,
11802: 670,
11803: 670,
11804: 670,
11805: 670,
11806: 670,
11807: 670,
11808: 670,
11809: 670,
11810: 670,
11811: 670,
11812: 670,
11813: 670,
11814: 670,
11815: 670,
11816: 670,
11817: 670,
11818: 670,
11819: 670,
11820: 670,
11821: 670,
11822: 670,
11823: 670,
11824: 670,
11825: 670,
11826: 670,
11827: 670,
11828: 670,
11829: 670,
11830: 670,
11831: 670,
11832: 670,
11833: 670,
11834: 670,
11835: 670,
11836: 670,
11837: 670,
11838: 670,
11839: 670,
11840: 670,
11841: 670,
11842: 670,
11843: 670,
11844: 670,
11845: 670,
11846: 670,
11847: 670,
11848: 670,
11849: 670,
11850: 670,
11851: 670,
11852: 670,
11853: 670,
11854: 670,
11855: 670,
11856: 670,
11857: 670,
11858: 670,
11859: 670,
11860: 670,
11861: 670,
11862: 670,
11863: 670,
11864: 670,
11865: 670,
11866: 670,
11867: 670,
11868: 670,
11869: 670,
11870: 670,
11871: 670,
11872: 670,
11873: 670,
11874: 670,
11875: 670,
11876: 670,
11877: 670,
11878: 670,
11879: 670,
11880: 670,
11881: 670,
11882: 670,
11883: 670,
11884: 670,
11885: 670,
11886: 670,
11887: 670,
11888: 670,
11889: 670,
11890: 670,
11891: 670,
11892: 670,
11893: 670,
11894: 670,
11895: 670,
11896: 670,
11897: 670,
11898: 670,
11899: 670,
11900: 670,
11901: 670,
11902: 670,
11903: 670,
11904: 670,
11905: 670,
11906: 670,
11907: 670,
11908: 670,
11909: 670,
11910: 670,
11911: 670,
11912: 670,
11913: 670,
11914: 670,
11915: 670,
11916: 670,
11917: 670,
11918: 670,
11919: 670,
11920: 670,
11921: 670,
11922: 670,
11923: 670,
11924: 670,
11925: 670,
11926: 670,
11927: 670,
11928: 670,
11929: 670,
11930: 670,
11931: 670,
11932: 670,
11933: 670,
11934: 670,
11935: 670,
11936: 670,
11937: 670,
11938: 670,
11939: 670,
11940: 670,
11941: 670,
11942: 670,
11943: 670,
11944: 670,
11945: 670,
11946: 670,
11947: 670,
11948: 670,
11949: 670,
11950: 670,
11951: 670,
11952: 670,
11953: 670,
11954: 670,
11955: 670,
11956: 670,
11957: 670,
11958: 670,
11959: 670,
11960: 670,
11961: 670,
11962: 670,
11963: 670,
11964: 670,
11965: 670,
11966: 670,
11967: 670,
11968: 670,
11969: 670,
11970: 670,
11971: 670,
11972: 670,
11973: 670,
11974: 670,
11975: 670,
11976: 670,
11977: 670,
11978: 670,
11979: 670,
11980: 670,
11981: 670,
11982: 670,
11983: 670,
11984: 670,
11985: 670,
11986: 670,
11987: 670,
11988: 670,
11989: 670,
11990: 670,
11991: 670,
11992: 670,
11993: 670,
11994: 670,
11995: 670,
11996: 670,
11997: 670,
11998: 670,
11999: 670,
12000: 670,
12001: 670,
12002: 670,
12003: 670,
12004: 670,
12005: 670,
12006: 670,
12007: 670,
12008: 670,
12009: 670,
12010: 670,
12011: 670,
12012: 670,
12013: 670,
12014: 670,
12015: 670,
12016: 670,
12017: 670,
12018: 670,
12019: 670,
12020: 670,
12021: 670,
12022: 670,
12023: 670,
12024: 670,
12025: 670,
12026: 670,
12027: 670,
12028: 670,
12029: 670,
12030: 670,
12031: 670,
12032: 670,
12033: 670,
12034: 670,
12035: 670,
12036: 670,
12037: 670,
12038: 670,
12039: 670,
12040: 670,
12041: 670,
12042: 670,
12043: 670,
12044: 670,
12045: 670,
12046: 670,
12047: 670,
12048: 670,
12049: 670,
12050: 670,
12051: 670,
12052: 670,
12053: 670,
12054: 670,
12055: 670,
12056: 670,
12057: 670,
12058: 670,
12059: 670,
12060: 670,
12061: 670,
12062: 670,
12063: 670,
12064: 670,
12065: 670,
12066: 670,
12067: 670,
12068: 670,
12069: 670,
12070: 670,
12071: 670,
12072: 670,
12073: 670,
12074: 670,
12075: 670,
12076: 670,
12077: 670,
12078: 670,
12079: 670,
12080: 670,
12081: 670,
12082: 670,
12083: 670,
12084: 670,
12085: 670,
12086: 670,
12087: 670,
12088: 670,
12089: 671,
12090: 671,
12091: 671,
12092: 671,
12093: 671,
12094: 671,
12095: 671,
12096: 671,
12097: 671,
12098: 671,
12099: 671,
12100: 671,
12101: 671,
12102: 671,
12103: 671,
12104: 671,
12105: 671,
12106: 671,
12107: 671,
12108: 671,
12109: 671,
12110: 671,
12111: 671,
12112: 671,
12113: 671,
12114: 671,
12115: 671,
12116: 671,
12117: 671,
12118: 671,
12119: 671,
12120: 671,
12121: 671,
12122: 671,
12123: 671,
12124: 671,
12125: 671,
12126: 671,
12127: 671,
12128: 671,
12129: 671,
12130: 671,
12131: 671,
12132: 671,
12133: 671,
12134: 671,
12135: 671,
12136: 671,
12137: 671,
12138: 671,
12139: 671,
12140: 671,
12141: 671,
12142: 671,
12143: 671,
12144: 671,
12145: 671,
12146: 671,
12147: 671,
12148: 671,
12149: 671,
12150: 671,
12151: 671,
12152: 671,
12153: 671,
12154: 671,
12155: 671,
12156: 671,
12157: 671,
12158: 671,
12159: 671,
12160: 671,
12161: 671,
12162: 671,
12163: 671,
12164: 671,
12165: 671,
12166: 671,
12167: 671,
12168: 671,
12169: 671,
12170: 671,
12171: 671,
12172: 671,
12173: 671,
12174: 671,
12175: 671,
12176: 671,
12177: 671,
12178: 671,
12179: 671,
12180: 671,
12181: 671,
12182: 671,
12183: 671,
12184: 671,
12185: 671,
12186: 671,
12187: 671,
12188: 671,
12189: 671,
12190: 671,
12191: 671,
12192: 671,
12193: 671,
12194: 671,
12195: 671,
12196: 671,
12197: 671,
12198: 671,
12199: 671,
12200: 671,
12201: 671,
12202: 671,
12203: 671,
12204: 671,
12205: 671,
12206: 671,
12207: 671,
12208: 671,
12209: 671,
12210: 671,
12211: 671,
12212: 671,
12213: 671,
12214: 671,
12215: 671,
12216: 671,
12217: 671,
12218: 671,
12219: 671,
12220: 671,
12221: 671,
12222: 671,
12223: 671,
12224: 671,
12225: 671,
12226: 671,
12227: 671,
12228: 671,
12229: 671,
12230: 671,
12231: 671,
12232: 671,
12233: 671,
12234: 671,
12235: 671,
12236: 671,
12237: 671,
12238: 671,
12239: 671,
12240: 671,
12241: 671,
12242: 671,
12243: 671,
12244: 671,
12245: 671,
12246: 671,
12247: 671,
12248: 671,
12249: 671,
12250: 671,
12251: 671,
12252: 671,
12253: 671,
12254: 671,
12255: 671,
12256: 671,
12257: 671,
12258: 671,
12259: 671,
12260: 671,
12261: 671,
12262: 671,
12263: 671,
12264: 671,
12265: 671,
12266: 671,
12267: 671,
12268: 671,
12269: 671,
12270: 671,
12271: 671,
12272: 671,
12273: 671,
12274: 671,
12275: 671,
12276: 671,
12277: 671,
12278: 671,
12279: 671,
12280: 671,
12281: 671,
12282: 671,
12283: 671,
12284: 671,
12285: 671,
12286: 671,
12287: 671,
12288: 671,
12289: 671,
12290: 671,
12291: 671,
12292: 671,
12293: 671,
12294: 671,
12295: 671,
12296: 671,
12297: 671,
12298: 671,
12299: 671,
12300: 671,
12301: 671,
12302: 671,
12303: 671,
12304: 671,
12305: 671,
12306: 671,
12307: 671,
12308: 671,
12309: 671,
12310: 671,
12311: 671,
12312: 671,
12313: 671,
12314: 671,
12315: 671,
12316: 671,
12317: 671,
12318: 671,
12319: 671,
12320: 671,
12321: 671,
12322: 671,
12323: 671,
12324: 671,
12325: 671,
12326: 671,
12327: 671,
12328: 671,
12329: 671,
12330: 671,
12331: 671,
12332: 671,
12333: 671,
12334: 671,
12335: 671,
12336: 671,
12337: 671,
12338: 671,
12339: 671,
12340: 671,
12341: 671,
12342: 671,
12343: 671,
12344: 671,
12345: 671,
12346: 671,
12347: 671,
12348: 671,
12349: 671,
12350: 671,
12351: 671,
12352: 671,
12353: 671,
12354: 671,
12355: 671,
12356: 671,
12357: 671,
12358: 671,
12359: 671,
12360: 671,
12361: 671,
12362: 671,
12363: 671,
12364: 671,
12365: 671,
12366: 671,
12367: 671,
12368: 671,
12369: 671,
12370: 671,
12371: 671,
12372: 671,
12373: 671,
12374: 671,
12375: 671,
12376: 671,
12377: 671,
12378: 671,
12379: 671,
12380: 671,
12381: 671,
12382: 671,
12383: 671,
12384: 671,
12385: 671,
12386: 671,
12387: 671,
12388: 671,
12389: 671,
12390: 671,
12391: 671,
12392: 671,
12393: 671,
12394: 671,
12395: 671,
12396: 671,
12397: 671,
12398: 671,
12399: 671,
12400: 671,
12401: 671,
12402: 671,
12403: 671,
12404: 671,
12405: 671,
12406: 671,
12407: 671,
12408: 671,
12409: 671,
12410: 671,
12411: 671,
12412: 671,
12413: 672,
12414: 672,
12415: 672,
12416: 672,
12417: 672,
12418: 672,
12419: 672,
12420: 672,
12421: 672,
12422: 672,
12423: 672,
12424: 672,
12425: 672,
12426: 672,
12427: 672,
12428: 672,
12429: 672,
12430: 672,
12431: 672,
12432: 672,
12433: 672,
12434: 672,
12435: 672,
12436: 672,
12437: 672,
12438: 672,
12439: 672,
12440: 672,
12441: 672,
12442: 672,
12443: 672,
12444: 672,
12445: 672,
12446: 672,
12447: 672,
12448: 672,
12449: 672,
12450: 672,
12451: 672,
12452: 672,
12453: 672,
12454: 672,
12455: 672,
12456: 672,
12457: 672,
12458: 672,
12459: 672,
12460: 672,
12461: 672,
12462: 672,
12463: 672,
12464: 672,
12465: 672,
12466: 672,
12467: 672,
12468: 672,
12469: 672,
12470: 672,
12471: 672,
12472: 672,
12473: 672,
12474: 672,
12475: 672,
12476: 672,
12477: 672,
12478: 672,
12479: 672,
12480: 672,
12481: 672,
12482: 672,
12483: 672,
12484: 672,
12485: 672,
12486: 672,
12487: 672,
12488: 672,
12489: 672,
12490: 672,
12491: 672,
12492: 672,
12493: 672,
12494: 672,
12495: 672,
12496: 672,
12497: 672,
12498: 672,
12499: 672,
12500: 672,
12501: 672,
12502: 672,
12503: 672,
12504: 672,
12505: 672,
12506: 672,
12507: 672,
12508: 672,
12509: 672,
12510: 672,
12511: 672,
12512: 672,
12513: 672,
12514: 672,
12515: 672,
12516: 672,
12517: 672,
12518: 672,
12519: 672,
12520: 672,
12521: 672,
12522: 672,
12523: 672,
12524: 672,
12525: 672,
12526: 672,
12527: 672,
12528: 672,
12529: 672,
12530: 672,
12531: 672,
12532: 672,
12533: 672,
12534: 672,
12535: 672,
12536: 672,
12537: 672,
12538: 672,
12539: 672,
12540: 672,
12541: 672,
12542: 672,
12543: 672,
12544: 672,
12545: 672,
12546: 672,
12547: 672,
12548: 672,
12549: 672,
12550: 672,
12551: 672,
12552: 672,
12553: 672,
12554: 672,
12555: 672,
12556: 672,
12557: 672,
12558: 672,
12559: 672,
12560: 672,
12561: 672,
12562: 672,
12563: 672,
12564: 672,
12565: 672,
12566: 672,
12567: 672,
12568: 672,
12569: 672,
12570: 672,
12571: 672,
12572: 672,
12573: 672,
12574: 672,
12575: 672,
12576: 672,
12577: 672,
12578: 672,
12579: 672,
12580: 672,
12581: 672,
12582: 672,
12583: 672,
12584: 672,
12585: 672,
12586: 672,
12587: 672,
12588: 672,
12589: 672,
12590: 672,
12591: 672,
12592: 672,
12593: 672,
12594: 672,
12595: 672,
12596: 672,
12597: 672,
12598: 672,
12599: 672,
12600: 672,
12601: 672,
12602: 672,
12603: 672,
12604: 672,
12605: 672,
12606: 672,
12607: 672,
12608: 672,
12609: 672,
12610: 672,
12611: 672,
12612: 672,
12613: 672,
12614: 672,
12615: 672,
12616: 672,
12617: 672,
12618: 672,
12619: 672,
12620: 672,
12621: 672,
12622: 672,
12623: 672,
12624: 672,
12625: 672,
12626: 672,
12627: 672,
12628: 672,
12629: 672,
12630: 672,
12631: 672,
12632: 672,
12633: 672,
12634: 672,
12635: 672,
12636: 672,
12637: 672,
12638: 672,
12639: 672,
12640: 672,
12641: 672,
12642: 672,
12643: 672,
12644: 672,
12645: 672,
12646: 672,
12647: 672,
12648: 672,
12649: 672,
12650: 672,
12651: 672,
12652: 672,
12653: 672,
12654: 672,
12655: 672,
12656: 672,
12657: 672,
12658: 672,
12659: 672,
12660: 672,
12661: 672,
12662: 672,
12663: 672,
12664: 672,
12665: 672,
12666: 672,
12667: 672,
12668: 672,
12669: 672,
12670: 672,
12671: 672,
12672: 672,
12673: 672,
12674: 672,
12675: 672,
12676: 672,
12677: 672,
12678: 672,
12679: 672,
12680: 672,
12681: 672,
12682: 672,
12683: 672,
12684: 672,
12685: 672,
12686: 672,
12687: 672,
12688: 672,
12689: 672,
12690: 672,
12691: 672,
12692: 672,
12693: 672,
12694: 672,
12695: 672,
12696: 672,
12697: 672,
12698: 672,
12699: 672,
12700: 672,
12701: 672,
12702: 672,
12703: 672,
12704: 672,
12705: 672,
12706: 672,
12707: 672,
12708: 672,
12709: 672,
12710: 672,
12711: 672,
12712: 672,
12713: 672,
12714: 672,
12715: 672,
12716: 672,
12717: 672,
12718: 672,
12719: 672,
12720: 672,
12721: 672,
12722: 672,
12723: 672,
12724: 672,
12725: 672,
12726: 672,
12727: 672,
12728: 672,
12729: 672,
12730: 672,
12731: 672,
12732: 672,
12733: 672,
12734: 672,
12735: 672,
12736: 672,
12737: 673,
12738: 673,
12739: 673,
12740: 673,
12741: 673,
12742: 673,
12743: 673,
12744: 673,
12745: 673,
12746: 673,
12747: 673,
12748: 673,
12749: 673,
12750: 673,
12751: 673,
12752: 673,
12753: 673,
12754: 673,
12755: 673,
12756: 673,
12757: 673,
12758: 673,
12759: 673,
12760: 673,
12761: 673,
12762: 673,
12763: 673,
12764: 673,
12765: 673,
12766: 673,
12767: 673,
12768: 673,
12769: 673,
12770: 673,
12771: 673,
12772: 673,
12773: 673,
12774: 673,
12775: 673,
12776: 673,
12777: 673,
12778: 673,
12779: 673,
12780: 673,
12781: 673,
12782: 673,
12783: 673,
12784: 673,
12785: 673,
12786: 673,
12787: 673,
12788: 673,
12789: 673,
12790: 673,
12791: 673,
12792: 673,
12793: 673,
12794: 673,
12795: 673,
12796: 673,
12797: 673,
12798: 673,
12799: 673,
12800: 673,
12801: 673,
12802: 673,
12803: 673,
12804: 673,
12805: 673,
12806: 673,
12807: 673,
12808: 673,
12809: 673,
12810: 673,
12811: 673,
12812: 673,
12813: 673,
12814: 673,
12815: 673,
12816: 673,
12817: 673,
12818: 673,
12819: 673,
12820: 673,
12821: 673,
12822: 673,
12823: 673,
12824: 673,
12825: 673,
12826: 673,
12827: 673,
12828: 673,
12829: 673,
12830: 673,
12831: 673,
12832: 673,
12833: 673,
12834: 673,
12835: 673,
12836: 673,
12837: 673,
12838: 673,
12839: 673,
12840: 673,
12841: 673,
12842: 673,
12843: 673,
12844: 673,
12845: 673,
12846: 673,
12847: 673,
12848: 673,
12849: 673,
12850: 673,
12851: 673,
12852: 673,
12853: 673,
12854: 673,
12855: 673,
12856: 673,
12857: 673,
12858: 673,
12859: 673,
12860: 673,
12861: 673,
12862: 673,
12863: 673,
12864: 673,
12865: 673,
12866: 673,
12867: 673,
12868: 673,
12869: 673,
12870: 673,
12871: 673,
12872: 673,
12873: 673,
12874: 673,
12875: 673,
12876: 673,
12877: 673,
12878: 673,
12879: 673,
12880: 673,
12881: 673,
12882: 673,
12883: 673,
12884: 673,
12885: 673,
12886: 673,
12887: 673,
12888: 673,
12889: 673,
12890: 673,
12891: 673,
12892: 673,
12893: 673,
12894: 673,
12895: 673,
12896: 673,
12897: 673,
12898: 673,
12899: 673,
12900: 673,
12901: 673,
12902: 673,
12903: 673,
12904: 673,
12905: 673,
12906: 673,
12907: 673,
12908: 673,
12909: 673,
12910: 673,
12911: 673,
12912: 673,
12913: 673,
12914: 673,
12915: 673,
12916: 673,
12917: 673,
12918: 673,
12919: 673,
12920: 673,
12921: 673,
12922: 673,
12923: 673,
12924: 673,
12925: 673,
12926: 673,
12927: 673,
12928: 673,
12929: 673,
12930: 673,
12931: 673,
12932: 673,
12933: 673,
12934: 673,
12935: 673,
12936: 673,
12937: 673,
12938: 673,
12939: 673,
12940: 673,
12941: 673,
12942: 673,
12943: 673,
12944: 673,
12945: 673,
12946: 673,
12947: 673,
12948: 673,
12949: 673,
12950: 673,
12951: 673,
12952: 673,
12953: 673,
12954: 673,
12955: 673,
12956: 673,
12957: 673,
12958: 673,
12959: 673,
12960: 673,
12961: 673,
12962: 673,
12963: 673,
12964: 673,
12965: 673,
12966: 673,
12967: 673,
12968: 673,
12969: 673,
12970: 673,
12971: 673,
12972: 673,
12973: 673,
12974: 673,
12975: 673,
12976: 673,
12977: 673,
12978: 673,
12979: 673,
12980: 673,
12981: 673,
12982: 673,
12983: 673,
12984: 673,
12985: 673,
12986: 673,
12987: 673,
12988: 673,
12989: 673,
12990: 673,
12991: 673,
12992: 673,
12993: 673,
12994: 673,
12995: 673,
12996: 673,
12997: 673,
12998: 673,
12999: 673,
13000: 673,
13001: 673,
13002: 673,
13003: 673,
13004: 673,
13005: 673,
13006: 673,
13007: 673,
13008: 673,
13009: 673,
13010: 673,
13011: 673,
13012: 673,
13013: 673,
13014: 673,
13015: 673,
13016: 673,
13017: 673,
13018: 673,
13019: 673,
13020: 673,
13021: 673,
13022: 673,
13023: 673,
13024: 673,
13025: 673,
13026: 673,
13027: 673,
13028: 673,
13029: 673,
13030: 673,
13031: 673,
13032: 673,
13033: 673,
13034: 673,
13035: 673,
13036: 673,
13037: 673,
13038: 673,
13039: 673,
13040: 673,
13041: 673,
13042: 673,
13043: 673,
13044: 673,
13045: 673,
13046: 673,
13047: 673,
13048: 673,
13049: 673,
13050: 673,
13051: 673,
13052: 673,
13053: 673,
13054: 673,
13055: 673,
13056: 673,
13057: 673,
13058: 673,
13059: 673,
13060: 673,
13061: 674,
13062: 674,
13063: 674,
13064: 674,
13065: 674,
13066: 674,
13067: 674,
13068: 674,
13069: 674,
13070: 674,
13071: 674,
13072: 674,
13073: 674,
13074: 674,
13075: 674,
13076: 674,
13077: 674,
13078: 674,
13079: 674,
13080: 674,
13081: 674,
13082: 674,
13083: 674,
13084: 674,
13085: 674,
13086: 674,
13087: 674,
13088: 674,
13089: 674,
13090: 674,
13091: 674,
13092: 674,
13093: 674,
13094: 674,
13095: 674,
13096: 674,
13097: 674,
13098: 674,
13099: 674,
13100: 674,
13101: 674,
13102: 674,
13103: 674,
13104: 674,
13105: 674,
13106: 674,
13107: 674,
13108: 674,
13109: 674,
13110: 674,
13111: 674,
13112: 674,
13113: 674,
13114: 674,
13115: 674,
13116: 674,
13117: 674,
13118: 674,
13119: 674,
13120: 674,
13121: 674,
13122: 674,
13123: 674,
13124: 674,
13125: 674,
13126: 674,
13127: 674,
13128: 674,
13129: 674,
13130: 674,
13131: 674,
13132: 674,
13133: 674,
13134: 674,
13135: 674,
13136: 674,
13137: 674,
13138: 674,
13139: 674,
13140: 674,
13141: 674,
13142: 674,
13143: 674,
13144: 674,
13145: 674,
13146: 674,
13147: 674,
13148: 674,
13149: 674,
13150: 674,
13151: 674,
13152: 674,
13153: 674,
13154: 674,
13155: 674,
13156: 674,
13157: 674,
13158: 674,
13159: 674,
13160: 674,
13161: 674,
13162: 674,
13163: 674,
13164: 674,
13165: 674,
13166: 674,
13167: 674,
13168: 674,
13169: 674,
13170: 674,
13171: 674,
13172: 674,
13173: 674,
13174: 674,
13175: 674,
13176: 674,
13177: 674,
13178: 674,
13179: 674,
13180: 674,
13181: 674,
13182: 674,
13183: 674,
13184: 674,
13185: 674,
13186: 674,
13187: 674,
13188: 674,
13189: 674,
13190: 674,
13191: 674,
13192: 674,
13193: 674,
13194: 674,
13195: 674,
13196: 674,
13197: 674,
13198: 674,
13199: 674,
13200: 674,
13201: 674,
13202: 674,
13203: 674,
13204: 674,
13205: 674,
13206: 674,
13207: 674,
13208: 674,
13209: 674,
13210: 674,
13211: 674,
13212: 674,
13213: 674,
13214: 674,
13215: 674,
13216: 674,
13217: 674,
13218: 674,
13219: 674,
13220: 674,
13221: 674,
13222: 674,
13223: 674,
13224: 674,
13225: 674,
13226: 674,
13227: 674,
13228: 674,
13229: 674,
13230: 674,
13231: 674,
13232: 674,
13233: 674,
13234: 674,
13235: 674,
13236: 674,
13237: 674,
13238: 674,
13239: 674,
13240: 674,
13241: 674,
13242: 674,
13243: 674,
13244: 674,
13245: 674,
13246: 674,
13247: 674,
13248: 674,
13249: 674,
13250: 674,
13251: 674,
13252: 674,
13253: 674,
13254: 674,
13255: 674,
13256: 674,
13257: 674,
13258: 674,
13259: 674,
13260: 674,
13261: 674,
13262: 674,
13263: 674,
13264: 674,
13265: 674,
13266: 674,
13267: 674,
13268: 674,
13269: 674,
13270: 674,
13271: 674,
13272: 674,
13273: 674,
13274: 674,
13275: 674,
13276: 674,
13277: 674,
13278: 674,
13279: 674,
13280: 674,
13281: 674,
13282: 674,
13283: 674,
13284: 674,
13285: 674,
13286: 674,
13287: 674,
13288: 674,
13289: 674,
13290: 674,
13291: 674,
13292: 674,
13293: 674,
13294: 674,
13295: 674,
13296: 674,
13297: 674,
13298: 674,
13299: 674,
13300: 674,
13301: 674,
13302: 674,
13303: 674,
13304: 674,
13305: 674,
13306: 674,
13307: 674,
13308: 674,
13309: 674,
13310: 674,
13311: 674,
13312: 674,
13313: 674,
13314: 674,
13315: 674,
13316: 674,
13317: 674,
13318: 674,
13319: 674,
13320: 674,
13321: 674,
13322: 674,
13323: 674,
13324: 674,
13325: 674,
13326: 674,
13327: 674,
13328: 674,
13329: 674,
13330: 674,
13331: 674,
13332: 674,
13333: 674,
13334: 674,
13335: 674,
13336: 674,
13337: 674,
13338: 674,
13339: 674,
13340: 674,
13341: 674,
13342: 674,
13343: 674,
13344: 674,
13345: 674,
13346: 674,
13347: 674,
13348: 674,
13349: 674,
13350: 674,
13351: 674,
13352: 674,
13353: 674,
13354: 674,
13355: 674,
13356: 674,
13357: 674,
13358: 674,
13359: 674,
13360: 674,
13361: 674,
13362: 674,
13363: 674,
13364: 674,
13365: 674,
13366: 674,
13367: 674,
13368: 674,
13369: 674,
13370: 674,
13371: 674,
13372: 674,
13373: 674,
13374: 674,
13375: 674,
13376: 674,
13377: 674,
13378: 674,
13379: 674,
13380: 674,
13381: 674,
13382: 674,
13383: 674,
13384: 674,
13385: 675,
13386: 675,
13387: 675,
13388: 675,
13389: 675,
13390: 675,
13391: 675,
13392: 675,
13393: 675,
13394: 675,
13395: 675,
13396: 675,
13397: 675,
13398: 675,
13399: 675,
13400: 675,
13401: 675,
13402: 675,
13403: 675,
13404: 675,
13405: 675,
13406: 675,
13407: 675,
13408: 675,
13409: 675,
13410: 675,
13411: 675,
13412: 675,
13413: 675,
13414: 675,
13415: 675,
13416: 675,
13417: 675,
13418: 675,
13419: 675,
13420: 675,
13421: 675,
13422: 675,
13423: 675,
13424: 675,
13425: 675,
13426: 675,
13427: 675,
13428: 675,
13429: 675,
13430: 675,
13431: 675,
13432: 675,
13433: 675,
13434: 675,
13435: 675,
13436: 675,
13437: 675,
13438: 675,
13439: 675,
13440: 675,
13441: 675,
13442: 675,
13443: 675,
13444: 675,
13445: 675,
13446: 675,
13447: 675,
13448: 675,
13449: 675,
13450: 675,
13451: 675,
13452: 675,
13453: 675,
13454: 675,
13455: 675,
13456: 675,
13457: 675,
13458: 675,
13459: 675,
13460: 675,
13461: 675,
13462: 675,
13463: 675,
13464: 675,
13465: 675,
13466: 675,
13467: 675,
13468: 675,
13469: 675,
13470: 675,
13471: 675,
13472: 675,
13473: 675,
13474: 675,
13475: 675,
13476: 675,
13477: 675,
13478: 675,
13479: 675,
13480: 675,
13481: 675,
13482: 675,
13483: 675,
13484: 675,
13485: 675,
13486: 675,
13487: 675,
13488: 675,
13489: 675,
13490: 675,
13491: 675,
13492: 675,
13493: 675,
13494: 675,
13495: 675,
13496: 675,
13497: 675,
13498: 675,
13499: 675,
13500: 675,
13501: 675,
13502: 675,
13503: 675,
13504: 675,
13505: 675,
13506: 675,
13507: 675,
13508: 675,
13509: 675,
13510: 675,
13511: 675,
13512: 675,
13513: 675,
13514: 675,
13515: 675,
13516: 675,
13517: 675,
13518: 675,
13519: 675,
13520: 675,
13521: 675,
13522: 675,
13523: 675,
13524: 675,
13525: 675,
13526: 675,
13527: 675,
13528: 675,
13529: 675,
13530: 675,
13531: 675,
13532: 675,
13533: 675,
13534: 675,
13535: 675,
13536: 675,
13537: 675,
13538: 675,
13539: 675,
13540: 675,
13541: 675,
13542: 675,
13543: 675,
13544: 675,
13545: 675,
13546: 675,
13547: 675,
13548: 675,
13549: 675,
13550: 675,
13551: 675,
13552: 675,
13553: 675,
13554: 675,
13555: 675,
13556: 675,
13557: 675,
13558: 675,
13559: 675,
13560: 675,
13561: 675,
13562: 675,
13563: 675,
13564: 675,
13565: 675,
13566: 675,
13567: 675,
13568: 675,
13569: 675,
13570: 675,
13571: 675,
13572: 675,
13573: 675,
13574: 675,
13575: 675,
13576: 675,
13577: 675,
13578: 675,
13579: 675,
13580: 675,
13581: 675,
13582: 675,
13583: 675,
13584: 675,
13585: 675,
13586: 675,
13587: 675,
13588: 675,
13589: 675,
13590: 675,
13591: 675,
13592: 675,
13593: 675,
13594: 675,
13595: 675,
13596: 675,
13597: 675,
13598: 675,
13599: 675,
13600: 675,
13601: 675,
13602: 675,
13603: 675,
13604: 675,
13605: 675,
13606: 675,
13607: 675,
13608: 675,
13609: 675,
13610: 675,
13611: 675,
13612: 675,
13613: 675,
13614: 675,
13615: 675,
13616: 675,
13617: 675,
13618: 675,
13619: 675,
13620: 675,
13621: 675,
13622: 675,
13623: 675,
13624: 675,
13625: 675,
13626: 675,
13627: 675,
13628: 675,
13629: 675,
13630: 675,
13631: 675,
13632: 675,
13633: 675,
13634: 675,
13635: 675,
13636: 675,
13637: 675,
13638: 675,
13639: 675,
13640: 675,
13641: 675,
13642: 675,
13643: 675,
13644: 675,
13645: 675,
13646: 675,
13647: 675,
13648: 675,
13649: 675,
13650: 675,
13651: 675,
13652: 675,
13653: 675,
13654: 675,
13655: 675,
13656: 675,
13657: 675,
13658: 675,
13659: 675,
13660: 675,
13661: 675,
13662: 675,
13663: 675,
13664: 675,
13665: 675,
13666: 675,
13667: 675,
13668: 675,
13669: 675,
13670: 675,
13671: 675,
13672: 675,
13673: 675,
13674: 675,
13675: 675,
13676: 675,
13677: 675,
13678: 675,
13679: 675,
13680: 675,
13681: 675,
13682: 675,
13683: 675,
13684: 675,
13685: 675,
13686: 675,
13687: 675,
13688: 675,
13689: 675,
13690: 675,
13691: 675,
13692: 675,
13693: 675,
13694: 675,
13695: 675,
13696: 675,
13697: 675,
13698: 675,
13699: 675,
13700: 675,
13701: 675,
13702: 675,
13703: 675,
13704: 675,
13705: 675,
13706: 675,
13707: 675,
13708: 675,
13709: 676,
13710: 676,
13711: 676,
13712: 676,
13713: 676,
13714: 676,
13715: 676,
13716: 676,
13717: 676,
13718: 676,
13719: 676,
13720: 676,
13721: 676,
13722: 676,
13723: 676,
13724: 676,
13725: 676,
13726: 676,
13727: 676,
13728: 676,
13729: 676,
13730: 676,
13731: 676,
13732: 676,
13733: 676,
13734: 676,
13735: 676,
13736: 676,
13737: 676,
13738: 676,
13739: 676,
13740: 676,
13741: 676,
13742: 676,
13743: 676,
13744: 676,
13745: 676,
13746: 676,
13747: 676,
13748: 676,
13749: 676,
13750: 676,
13751: 676,
13752: 676,
13753: 676,
13754: 676,
13755: 676,
13756: 676,
13757: 676,
13758: 676,
13759: 676,
13760: 676,
13761: 676,
13762: 676,
13763: 676,
13764: 676,
13765: 676,
13766: 676,
13767: 676,
13768: 676,
13769: 676,
13770: 676,
13771: 676,
13772: 676,
13773: 676,
13774: 676,
13775: 676,
13776: 676,
13777: 676,
13778: 676,
13779: 676,
13780: 676,
13781: 676,
13782: 676,
13783: 676,
13784: 676,
13785: 676,
13786: 676,
13787: 676,
13788: 676,
13789: 676,
13790: 676,
13791: 676,
13792: 676,
13793: 676,
13794: 676,
13795: 676,
13796: 676,
13797: 676,
13798: 676,
13799: 676,
13800: 676,
13801: 676,
13802: 676,
13803: 676,
13804: 676,
13805: 676,
13806: 676,
13807: 676,
13808: 676,
13809: 676,
13810: 676,
13811: 676,
13812: 676,
13813: 676,
13814: 676,
13815: 676,
13816: 676,
13817: 676,
13818: 676,
13819: 676,
13820: 676,
13821: 676,
13822: 676,
13823: 676,
13824: 676,
13825: 676,
13826: 676,
13827: 676,
13828: 676,
13829: 676,
13830: 676,
13831: 676,
13832: 676,
13833: 676,
13834: 676,
13835: 676,
13836: 676,
13837: 676,
13838: 676,
13839: 676,
13840: 676,
13841: 676,
13842: 676,
13843: 676,
13844: 676,
13845: 676,
13846: 676,
13847: 676,
13848: 676,
13849: 676,
13850: 676,
13851: 676,
13852: 676,
13853: 676,
13854: 676,
13855: 676,
13856: 676,
13857: 676,
13858: 676,
13859: 676,
13860: 676,
13861: 676,
13862: 676,
13863: 676,
13864: 676,
13865: 676,
13866: 676,
13867: 676,
13868: 676,
13869: 676,
13870: 676,
13871: 676,
13872: 676,
13873: 676,
13874: 676,
13875: 676,
13876: 676,
13877: 676,
13878: 676,
13879: 676,
13880: 676,
13881: 676,
13882: 676,
13883: 676,
13884: 676,
13885: 676,
13886: 676,
13887: 676,
13888: 676,
13889: 676,
13890: 676,
13891: 676,
13892: 676,
13893: 676,
13894: 676,
13895: 676,
13896: 676,
13897: 676,
13898: 676,
13899: 676,
13900: 676,
13901: 676,
13902: 676,
13903: 676,
13904: 676,
13905: 676,
13906: 676,
13907: 676,
13908: 676,
13909: 676,
13910: 676,
13911: 676,
13912: 676,
13913: 676,
13914: 676,
13915: 676,
13916: 676,
13917: 676,
13918: 676,
13919: 676,
13920: 676,
13921: 676,
13922: 676,
13923: 676,
13924: 676,
13925: 676,
13926: 676,
13927: 676,
13928: 676,
13929: 676,
13930: 676,
13931: 676,
13932: 676,
13933: 676,
13934: 676,
13935: 676,
13936: 676,
13937: 676,
13938: 676,
13939: 676,
13940: 676,
13941: 676,
13942: 676,
13943: 676,
13944: 676,
13945: 676,
13946: 676,
13947: 676,
13948: 676,
13949: 676,
13950: 676,
13951: 676,
13952: 676,
13953: 676,
13954: 676,
13955: 676,
13956: 676,
13957: 676,
13958: 676,
13959: 676,
13960: 676,
13961: 676,
13962: 676,
13963: 676,
13964: 676,
13965: 676,
13966: 676,
13967: 676,
13968: 676,
13969: 676,
13970: 676,
13971: 676,
13972: 676,
13973: 676,
13974: 676,
13975: 676,
13976: 676,
13977: 676,
13978: 676,
13979: 676,
13980: 676,
13981: 676,
13982: 676,
13983: 676,
13984: 676,
13985: 676,
13986: 676,
13987: 676,
13988: 676,
13989: 676,
13990: 676,
13991: 676,
13992: 676,
13993: 676,
13994: 676,
13995: 676,
13996: 676,
13997: 676,
13998: 676,
13999: 676,
14000: 676,
14001: 676,
14002: 676,
14003: 676,
14004: 676,
14005: 676,
14006: 676,
14007: 676,
14008: 676,
14009: 676,
14010: 676,
14011: 676,
14012: 676,
14013: 676,
14014: 676,
14015: 676,
14016: 676,
14017: 676,
14018: 676,
14019: 676,
14020: 676,
14021: 676,
14022: 676,
14023: 676,
14024: 676,
14025: 676,
14026: 676,
14027: 676,
14028: 676,
14029: 676,
14030: 676,
14031: 676,
14032: 676,
14033: 677,
14034: 677,
14035: 677,
14036: 677,
14037: 677,
14038: 677,
14039: 677,
14040: 677,
14041: 677,
14042: 677,
14043: 677,
14044: 677,
14045: 677,
14046: 677,
14047: 677,
14048: 677,
14049: 677,
14050: 677,
14051: 677,
14052: 677,
14053: 677,
14054: 677,
14055: 677,
14056: 677,
14057: 677,
14058: 677,
14059: 677,
14060: 677,
14061: 677,
14062: 677,
14063: 677,
14064: 677,
14065: 677,
14066: 677,
14067: 677,
14068: 677,
14069: 677,
14070: 677,
14071: 677,
14072: 677,
14073: 677,
14074: 677,
14075: 677,
14076: 677,
14077: 677,
14078: 677,
14079: 677,
14080: 677,
14081: 677,
14082: 677,
14083: 677,
14084: 677,
14085: 677,
14086: 677,
14087: 677,
14088: 677,
14089: 677,
14090: 677,
14091: 677,
14092: 677,
14093: 677,
14094: 677,
14095: 677,
14096: 677,
14097: 677,
14098: 677,
14099: 677,
14100: 677,
14101: 677,
14102: 677,
14103: 677,
14104: 677,
14105: 677,
14106: 677,
14107: 677,
14108: 677,
14109: 677,
14110: 677,
14111: 677,
14112: 677,
14113: 677,
14114: 677,
14115: 677,
14116: 677,
14117: 677,
14118: 677,
14119: 677,
14120: 677,
14121: 677,
14122: 677,
14123: 677,
14124: 677,
14125: 677,
14126: 677,
14127: 677,
14128: 677,
14129: 677,
14130: 677,
14131: 677,
14132: 677,
14133: 677,
14134: 677,
14135: 677,
14136: 677,
14137: 677,
14138: 677,
14139: 677,
14140: 677,
14141: 677,
14142: 677,
14143: 677,
14144: 677,
14145: 677,
14146: 677,
14147: 677,
14148: 677,
14149: 677,
14150: 677,
14151: 677,
14152: 677,
14153: 677,
14154: 677,
14155: 677,
14156: 677,
14157: 677,
14158: 677,
14159: 677,
14160: 677,
14161: 677,
14162: 677,
14163: 677,
14164: 677,
14165: 677,
14166: 677,
14167: 677,
14168: 677,
14169: 677,
14170: 677,
14171: 677,
14172: 677,
14173: 677,
14174: 677,
14175: 677,
14176: 677,
14177: 677,
14178: 677,
14179: 677,
14180: 677,
14181: 677,
14182: 677,
14183: 677,
14184: 677,
14185: 677,
14186: 677,
14187: 677,
14188: 677,
14189: 677,
14190: 677,
14191: 677,
14192: 677,
14193: 677,
14194: 677,
14195: 677,
14196: 677,
14197: 677,
14198: 677,
14199: 677,
14200: 677,
14201: 677,
14202: 677,
14203: 677,
14204: 677,
14205: 677,
14206: 677,
14207: 677,
14208: 677,
14209: 677,
14210: 677,
14211: 677,
14212: 677,
14213: 677,
14214: 677,
14215: 677,
14216: 677,
14217: 677,
14218: 677,
14219: 677,
14220: 677,
14221: 677,
14222: 677,
14223: 677,
14224: 677,
14225: 677,
14226: 677,
14227: 677,
14228: 677,
14229: 677,
14230: 677,
14231: 677,
14232: 677,
14233: 677,
14234: 677,
14235: 677,
14236: 677,
14237: 677,
14238: 677,
14239: 677,
14240: 677,
14241: 677,
14242: 677,
14243: 677,
14244: 677,
14245: 677,
14246: 677,
14247: 677,
14248: 677,
14249: 677,
14250: 677,
14251: 677,
14252: 677,
14253: 677,
14254: 677,
14255: 677,
14256: 677,
14257: 677,
14258: 677,
14259: 677,
14260: 677,
14261: 677,
14262: 677,
14263: 677,
14264: 677,
14265: 677,
14266: 677,
14267: 677,
14268: 677,
14269: 677,
14270: 677,
14271: 677,
14272: 677,
14273: 677,
14274: 677,
14275: 677,
14276: 677,
14277: 677,
14278: 677,
14279: 677,
14280: 677,
14281: 677,
14282: 677,
14283: 677,
14284: 677,
14285: 677,
14286: 677,
14287: 677,
14288: 677,
14289: 677,
14290: 677,
14291: 677,
14292: 677,
14293: 677,
14294: 677,
14295: 677,
14296: 677,
14297: 677,
14298: 677,
14299: 677,
14300: 677,
14301: 677,
14302: 677,
14303: 677,
14304: 677,
14305: 677,
14306: 677,
14307: 677,
14308: 677,
14309: 677,
14310: 677,
14311: 677,
14312: 677,
14313: 677,
14314: 677,
14315: 677,
14316: 677,
14317: 677,
14318: 677,
14319: 677,
14320: 677,
14321: 677,
14322: 677,
14323: 677,
14324: 677,
14325: 677,
14326: 677,
14327: 677,
14328: 677,
14329: 677,
14330: 677,
14331: 677,
14332: 677,
14333: 677,
14334: 677,
14335: 677,
14336: 677,
14337: 677,
14338: 677,
14339: 677,
14340: 677,
14341: 677,
14342: 677,
14343: 677,
14344: 677,
14345: 677,
14346: 677,
14347: 677,
14348: 677,
14349: 677,
14350: 677,
14351: 677,
14352: 677,
14353: 677,
14354: 677,
14355: 677,
14356: 677,
14357: 678,
14358: 678,
14359: 678,
14360: 678,
14361: 678,
14362: 678,
14363: 678,
14364: 678,
14365: 678,
14366: 678,
14367: 678,
14368: 678,
14369: 678,
14370: 678,
14371: 678,
14372: 678,
14373: 678,
14374: 678,
14375: 678,
14376: 678,
14377: 678,
14378: 678,
14379: 678,
14380: 678,
14381: 678,
14382: 678,
14383: 678,
14384: 678,
14385: 678,
14386: 678,
14387: 678,
14388: 678,
14389: 678,
14390: 678,
14391: 678,
14392: 678,
14393: 678,
14394: 678,
14395: 678,
14396: 678,
14397: 678,
14398: 678,
14399: 678,
14400: 678,
14401: 678,
14402: 678,
14403: 678,
14404: 678,
14405: 678,
14406: 678,
14407: 678,
14408: 678,
14409: 678,
14410: 678,
14411: 678,
14412: 678,
14413: 678,
14414: 678,
14415: 678,
14416: 678,
14417: 678,
14418: 678,
14419: 678,
14420: 678,
14421: 678,
14422: 678,
14423: 678,
14424: 678,
14425: 678,
14426: 678,
14427: 678,
14428: 678,
14429: 678,
14430: 678,
14431: 678,
14432: 678,
14433: 678,
14434: 678,
14435: 678,
14436: 678,
14437: 678,
14438: 678,
14439: 678,
14440: 678,
14441: 678,
14442: 678,
14443: 678,
14444: 678,
14445: 678,
14446: 678,
14447: 678,
14448: 678,
14449: 678,
14450: 678,
14451: 678,
14452: 678,
14453: 678,
14454: 678,
14455: 678,
14456: 678,
14457: 678,
14458: 678,
14459: 678,
14460: 678,
14461: 678,
14462: 678,
14463: 678,
14464: 678,
14465: 678,
14466: 678,
14467: 678,
14468: 678,
14469: 678,
14470: 678,
14471: 678,
14472: 678,
14473: 678,
14474: 678,
14475: 678,
14476: 678,
14477: 678,
14478: 678,
14479: 678,
14480: 678,
14481: 678,
14482: 678,
14483: 678,
14484: 678,
14485: 678,
14486: 678,
14487: 678,
14488: 678,
14489: 678,
14490: 678,
14491: 678,
14492: 678,
14493: 678,
14494: 678,
14495: 678,
14496: 678,
14497: 678,
14498: 678,
14499: 678,
14500: 678,
14501: 678,
14502: 678,
14503: 678,
14504: 678,
14505: 678,
14506: 678,
14507: 678,
14508: 678,
14509: 678,
14510: 678,
14511: 678,
14512: 678,
14513: 678,
14514: 678,
14515: 678,
14516: 678,
14517: 678,
14518: 678,
14519: 678,
14520: 678,
14521: 678,
14522: 678,
14523: 678,
14524: 678,
14525: 678,
14526: 678,
14527: 678,
14528: 678,
14529: 678,
14530: 678,
14531: 678,
14532: 678,
14533: 678,
14534: 678,
14535: 678,
14536: 678,
14537: 678,
14538: 678,
14539: 678,
14540: 678,
14541: 678,
14542: 678,
14543: 678,
14544: 678,
14545: 678,
14546: 678,
14547: 678,
14548: 678,
14549: 678,
14550: 678,
14551: 678,
14552: 678,
14553: 678,
14554: 678,
14555: 678,
14556: 678,
14557: 678,
14558: 678,
14559: 678,
14560: 678,
14561: 678,
14562: 678,
14563: 678,
14564: 678,
14565: 678,
14566: 678,
14567: 678,
14568: 678,
14569: 678,
14570: 678,
14571: 678,
14572: 678,
14573: 678,
14574: 678,
14575: 678,
14576: 678,
14577: 678,
14578: 678,
14579: 678,
14580: 678,
14581: 678,
14582: 678,
14583: 678,
14584: 678,
14585: 678,
14586: 678,
14587: 678,
14588: 678,
14589: 678,
14590: 678,
14591: 678,
14592: 678,
14593: 678,
14594: 678,
14595: 678,
14596: 678,
14597: 678,
14598: 678,
14599: 678,
14600: 678,
14601: 678,
14602: 678,
14603: 678,
14604: 678,
14605: 678,
14606: 678,
14607: 678,
14608: 678,
14609: 678,
14610: 678,
14611: 678,
14612: 678,
14613: 678,
14614: 678,
14615: 678,
14616: 678,
14617: 678,
14618: 678,
14619: 678,
14620: 678,
14621: 678,
14622: 678,
14623: 678,
14624: 678,
14625: 678,
14626: 678,
14627: 678,
14628: 678,
14629: 678,
14630: 678,
14631: 678,
14632: 678,
14633: 678,
14634: 678,
14635: 678,
14636: 678,
14637: 678,
14638: 678,
14639: 678,
14640: 678,
14641: 678,
14642: 678,
14643: 678,
14644: 678,
14645: 678,
14646: 678,
14647: 678,
14648: 678,
14649: 678,
14650: 678,
14651: 678,
14652: 678,
14653: 678,
14654: 678,
14655: 678,
14656: 678,
14657: 678,
14658: 678,
14659: 678,
14660: 678,
14661: 678,
14662: 678,
14663: 678,
14664: 678,
14665: 678,
14666: 678,
14667: 678,
14668: 678,
14669: 678,
14670: 678,
14671: 678,
14672: 678,
14673: 678,
14674: 678,
14675: 678,
14676: 678,
14677: 678,
14678: 678,
14679: 678,
14680: 678,
14681: 679,
14682: 679,
14683: 679,
14684: 679,
14685: 679,
14686: 679,
14687: 679,
14688: 679,
14689: 679,
14690: 679,
14691: 679,
14692: 679,
14693: 679,
14694: 679,
14695: 679,
14696: 679,
14697: 679,
14698: 679,
14699: 679,
14700: 679,
14701: 679,
14702: 679,
14703: 679,
14704: 679,
14705: 679,
14706: 679,
14707: 679,
14708: 679,
14709: 679,
14710: 679,
14711: 679,
14712: 679,
14713: 679,
14714: 679,
14715: 679,
14716: 679,
14717: 679,
14718: 679,
14719: 679,
14720: 679,
14721: 679,
14722: 679,
14723: 679,
14724: 679,
14725: 679,
14726: 679,
14727: 679,
14728: 679,
14729: 679,
14730: 679,
14731: 679,
14732: 679,
14733: 679,
14734: 679,
14735: 679,
14736: 679,
14737: 679,
14738: 679,
14739: 679,
14740: 679,
14741: 679,
14742: 679,
14743: 679,
14744: 679,
14745: 679,
14746: 679,
14747: 679,
14748: 679,
14749: 679,
14750: 679,
14751: 679,
14752: 679,
14753: 679,
14754: 679,
14755: 679,
14756: 679,
14757: 679,
14758: 679,
14759: 679,
14760: 679,
14761: 679,
14762: 679,
14763: 679,
14764: 679,
14765: 679,
14766: 679,
14767: 679,
14768: 679,
14769: 679,
14770: 679,
14771: 679,
14772: 679,
14773: 679,
14774: 679,
14775: 679,
14776: 679,
14777: 679,
14778: 679,
14779: 679,
14780: 679,
14781: 679,
14782: 679,
14783: 679,
14784: 679,
14785: 679,
14786: 679,
14787: 679,
14788: 679,
14789: 679,
14790: 679,
14791: 679,
14792: 679,
14793: 679,
14794: 679,
14795: 679,
14796: 679,
14797: 679,
14798: 679,
14799: 679,
14800: 679,
14801: 679,
14802: 679,
14803: 679,
14804: 679,
14805: 679,
14806: 679,
14807: 679,
14808: 679,
14809: 679,
14810: 679,
14811: 679,
14812: 679,
14813: 679,
14814: 679,
14815: 679,
14816: 679,
14817: 679,
14818: 679,
14819: 679,
14820: 679,
14821: 679,
14822: 679,
14823: 679,
14824: 679,
14825: 679,
14826: 679,
14827: 679,
14828: 679,
14829: 679,
14830: 679,
14831: 679,
14832: 679,
14833: 679,
14834: 679,
14835: 679,
14836: 679,
14837: 679,
14838: 679,
14839: 679,
14840: 679,
14841: 679,
14842: 679,
14843: 679,
14844: 679,
14845: 679,
14846: 679,
14847: 679,
14848: 679,
14849: 679,
14850: 679,
14851: 679,
14852: 679,
14853: 679,
14854: 679,
14855: 679,
14856: 679,
14857: 679,
14858: 679,
14859: 679,
14860: 679,
14861: 679,
14862: 679,
14863: 679,
14864: 679,
14865: 679,
14866: 679,
14867: 679,
14868: 679,
14869: 679,
14870: 679,
14871: 679,
14872: 679,
14873: 679,
14874: 679,
14875: 679,
14876: 679,
14877: 679,
14878: 679,
14879: 679,
14880: 679,
14881: 679,
14882: 679,
14883: 679,
14884: 679,
14885: 679,
14886: 679,
14887: 679,
14888: 679,
14889: 679,
14890: 679,
14891: 679,
14892: 679,
14893: 679,
14894: 679,
14895: 679,
14896: 679,
14897: 679,
14898: 679,
14899: 679,
14900: 679,
14901: 679,
14902: 679,
14903: 679,
14904: 679,
14905: 679,
14906: 679,
14907: 679,
14908: 679,
14909: 679,
14910: 679,
14911: 679,
14912: 679,
14913: 679,
14914: 679,
14915: 679,
14916: 679,
14917: 679,
14918: 679,
14919: 679,
14920: 679,
14921: 679,
14922: 679,
14923: 679,
14924: 679,
14925: 679,
14926: 679,
14927: 679,
14928: 679,
14929: 679,
14930: 679,
14931: 679,
14932: 679,
14933: 679,
14934: 679,
14935: 679,
14936: 679,
14937: 679,
14938: 679,
14939: 679,
14940: 679,
14941: 679,
14942: 679,
14943: 679,
14944: 679,
14945: 679,
14946: 679,
14947: 679,
14948: 679,
14949: 679,
14950: 679,
14951: 679,
14952: 679,
14953: 679,
14954: 679,
14955: 679,
14956: 679,
14957: 679,
14958: 679,
14959: 679,
14960: 679,
14961: 679,
14962: 679,
14963: 679,
14964: 679,
14965: 679,
14966: 679,
14967: 679,
14968: 679,
14969: 679,
14970: 679,
14971: 679,
14972: 679,
14973: 679,
14974: 679,
14975: 679,
14976: 679,
14977: 679,
14978: 679,
14979: 679,
14980: 679,
14981: 679,
14982: 679,
14983: 679,
14984: 679,
14985: 679,
14986: 679,
14987: 679,
14988: 679,
14989: 679,
14990: 679,
14991: 679,
14992: 679,
14993: 679,
14994: 679,
14995: 679,
14996: 679,
14997: 679,
14998: 679,
14999: 679,
15000: 679,
15001: 679,
15002: 679,
15003: 679,
15004: 679,
15005: 680,
15006: 680,
15007: 680,
15008: 680,
15009: 680,
15010: 680,
15011: 680,
15012: 680,
15013: 680,
15014: 680,
15015: 680,
15016: 680,
15017: 680,
15018: 680,
15019: 680,
15020: 680,
15021: 680,
15022: 680,
15023: 680,
15024: 680,
15025: 680,
15026: 680,
15027: 680,
15028: 680,
15029: 680,
15030: 680,
15031: 680,
15032: 680,
15033: 680,
15034: 680,
15035: 680,
15036: 680,
15037: 681,
15038: 681,
15039: 681,
15040: 681,
15041: 682,
15042: 682,
15043: 682,
15044: 682,
15045: 682,
15046: 682,
15047: 682,
15048: 682,
15049: 682,
15050: 682,
15051: 682,
15052: 682,
15053: 683,
15054: 683,
15055: 683,
15056: 683,
15057: 683,
15058: 683,
15059: 683,
15060: 683,
15061: 684,
15062: 684,
15063: 684,
15064: 684,
15065: 684,
15066: 684,
15067: 684,
15068: 684,
15069: 685,
15070: 686,
15071: 687,
15072: 687,
15073: 687,
15074: 687,
15075: 687,
15076: 687,
15077: 687,
15078: 687,
15079: 687,
15080: 687,
15081: 687,
15082: 687,
15083: 688,
15084: 688,
15085: 688,
15086: 688,
15087: 688,
15088: 688,
15089: 688,
15090: 688,
15091: 688,
15092: 688,
15093: 688,
15094: 688,
15095: 688,
15096: 688,
15097: 688,
15098: 688,
15099: 689,
15100: 690,
15101: 690,
15102: 690,
15103: 690,
15104: 691,
15105: 691,
15106: 691,
15107: 691,
15108: 691,
15109: 691,
15110: 691,
15111: 691,
15112: 691,
15113: 691,
15114: 691,
15115: 691,
15116: 691,
15117: 691,
15118: 691,
15119: 691,
15120: 691,
15121: 691,
15122: 691,
15123: 691,
15124: 691,
15125: 691,
15126: 691,
15127: 691,
15128: 691,
15129: 691,
15130: 691,
15131: 691,
15132: 691,
15133: 691,
15134: 691,
15135: 691,
15136: 692,
15137: 692,
15138: 692,
15139: 692,
15140: 693,
15141: 693,
15142: 693,
15143: 693,
15144: 694,
15145: 694,
15146: 694,
15147: 694,
15148: 694,
15149: 694,
15150: 694,
15151: 694,
15152: 694,
15153: 694,
15154: 694,
15155: 694,
15156: 694,
15157: 694,
15158: 694,
15159: 694,
15160: 694,
15161: 694,
15162: 694,
15163: 694,
15164: 694,
15165: 694,
15166: 694,
15167: 694,
15168: 694,
15169: 694,
15170: 694,
15171: 694,
15172: 694,
15173: 694,
15174: 694,
15175: 694,
15176: 695,
15177: 695,
15178: 695,
15179: 695,
15180: 695,
15181: 695,
15182: 695,
15183: 695,
15184: 695,
15185: 695,
15186: 695,
15187: 695,
15188: 695,
15189: 695,
15190: 695,
15191: 695,
15192: 695,
15193: 695,
15194: 695,
15195: 695,
15196: 695,
15197: 695,
15198: 695,
15199: 695,
15200: 695,
15201: 695,
15202: 695,
15203: 695,
15204: 695,
15205: 695,
15206: 695,
15207: 695,
15208: 696,
15209: 696,
15210: 696,
15211: 696,
15212: 697,
15213: 697,
15214: 697,
15215: 698,
15216: 698,
15217: 698,
15218: 699,
15219: 699,
15220: 699,
15221: 700,
15222: 700,
15223: 700,
15224: 701,
15225: 702,
15226: 703,
15227: 704,
15228: 705,
15229: 706,
15230: 706,
15231: 706,
15232: 707,
15233: 707,
15234: 707,
15235: 708,
15236: 708,
15237: 708,
15238: 709,
15239: 709,
15240: 709,
15241: 710,
15242: 711,
15243: 712,
15244: 713,
15245: 713,
15246: 713,
15247: 713,
15248: 713,
15249: 713,
15250: 713,
15251: 713,
15252: 713,
15253: 713,
15254: 713,
15255: 713,
15256: 713,
15257: 713,
15258: 713,
15259: 713,
15260: 713,
15261: 713,
15262: 713,
15263: 713,
15264: 713,
15265: 713,
15266: 713,
15267: 713,
15268: 713,
15269: 713,
15270: 714,
15271: 715,
15272: 715,
15273: 715,
15274: 715,
15275: 715,
15276: 715,
15277: 715,
15278: 715,
15279: 715,
15280: 715,
15281: 715,
15282: 715,
15283: 715,
15284: 715,
15285: 715,
15286: 715,
15287: 715,
15288: 715,
15289: 715,
15290: 715,
15291: 715,
15292: 715,
15293: 715,
15294: 715,
15295: 715,
15296: 715,
15297: 716,
15298: 717,
15299: 718,
15300: 719,
15301: 720,
15302: 720,
15303: 720,
15304: 720,
15305: 720,
15306: 720,
15307: 721,
15308: 721,
15309: 721,
15310: 721,
15311: 721,
15312: 721,
15313: 722,
15314: 722,
15315: 723,
15316: 723,
15317: 724,
15318: 724,
15319: 724,
15320: 724,
15321: 724,
15322: 724,
15323: 724,
15324: 724,
15325: 724,
15326: 724,
15327: 724,
15328: 724,
15329: 724,
15330: 724,
15331: 724,
15332: 724,
15333: 724,
15334: 724,
15335: 724,
15336: 724,
15337: 724,
15338: 724,
15339: 724,
15340: 724,
15341: 724,
15342: 724,
15343: 724,
15344: 724,
15345: 724,
15346: 724,
15347: 724,
15348: 724,
15349: 725,
15350: 725,
15351: 725,
15352: 725,
15353: 725,
15354: 725,
15355: 725,
15356: 725,
15357: 725,
15358: 725,
15359: 725,
15360: 725,
15361: 725,
15362: 725,
15363: 725,
15364: 725,
15365: 725,
15366: 725,
15367: 725,
15368: 725,
15369: 725,
15370: 725,
15371: 725,
15372: 725,
15373: 725,
15374: 725,
15375: 725,
15376: 725,
15377: 725,
15378: 725,
15379: 725,
15380: 725,
15381: 726,
15382: 726,
15383: 726,
15384: 726,
15385: 726,
15386: 726,
15387: 726,
15388: 726,
15389: 726,
15390: 726,
15391: 726,
15392: 726,
15393: 726,
15394: 726,
15395: 726,
15396: 726,
15397: 726,
15398: 726,
15399: 726,
15400: 726,
15401: 726,
15402: 726,
15403: 726,
15404: 726,
15405: 726,
15406: 726,
15407: 726,
15408: 726,
15409: 726,
15410: 726,
15411: 726,
15412: 726,
15413: 726,
15414: 726,
15415: 726,
15416: 726,
15417: 726,
15418: 726,
15419: 726,
15420: 726,
15421: 726,
15422: 726,
15423: 726,
15424: 726,
15425: 726,
15426: 726,
15427: 726,
15428: 726,
15429: 726,
15430: 726,
15431: 726,
15432: 726,
15433: 726,
15434: 726,
15435: 726,
15436: 726,
15437: 726,
15438: 726,
15439: 726,
15440: 726,
15441: 726,
15442: 726,
15443: 726,
15444: 726,
15445: 727,
15446: 727,
15447: 727,
15448: 727,
15449: 727,
15450: 727,
15451: 727,
15452: 727,
15453: 727,
15454: 727,
15455: 727,
15456: 727,
15457: 727,
15458: 727,
15459: 727,
15460: 727,
15461: 727,
15462: 727,
15463: 727,
15464: 727,
15465: 727,
15466: 727,
15467: 727,
15468: 727,
15469: 727,
15470: 727,
15471: 727,
15472: 727,
15473: 727,
15474: 727,
15475: 727,
15476: 727,
15477: 727,
15478: 727,
15479: 727,
15480: 727,
15481: 727,
15482: 727,
15483: 727,
15484: 727,
15485: 727,
15486: 727,
15487: 727,
15488: 727,
15489: 727,
15490: 727,
15491: 727,
15492: 727,
15493: 727,
15494: 727,
15495: 727,
15496: 727,
15497: 727,
15498: 727,
15499: 727,
15500: 727,
15501: 727,
15502: 727,
15503: 727,
15504: 727,
15505: 727,
15506: 727,
15507: 727,
15508: 727,
15509: 728,
15510: 728,
15511: 728,
15512: 728,
15513: 728,
15514: 728,
15515: 728,
15516: 728,
15517: 728,
15518: 728,
15519: 728,
15520: 728,
15521: 728,
15522: 728,
15523: 728,
15524: 728,
15525: 728,
15526: 728,
15527: 728,
15528: 728,
15529: 728,
15530: 728,
15531: 728,
15532: 728,
15533: 728,
15534: 728,
15535: 728,
15536: 728,
15537: 728,
15538: 728,
15539: 728,
15540: 728,
15541: 729,
15542: 729,
15543: 729,
15544: 729,
15545: 729,
15546: 729,
15547: 729,
15548: 729,
15549: 729,
15550: 729,
15551: 729,
15552: 729,
15553: 729,
15554: 729,
15555: 729,
15556: 729,
15557: 729,
15558: 729,
15559: 729,
15560: 729,
15561: 729,
15562: 729,
15563: 729,
15564: 729,
15565: 729,
15566: 729,
15567: 729,
15568: 729,
15569: 729,
15570: 729,
15571: 729,
15572: 729,
15573: 730,
15574: 730,
15575: 730,
15576: 730,
15577: 730,
15578: 730,
15579: 730,
15580: 730,
15581: 730,
15582: 730,
15583: 730,
15584: 730,
15585: 730,
15586: 730,
15587: 730,
15588: 730,
15589: 730,
15590: 730,
15591: 730,
15592: 730,
15593: 730,
15594: 730,
15595: 730,
15596: 730,
15597: 730,
15598: 730,
15599: 730,
15600: 730,
15601: 730,
15602: 730,
15603: 730,
15604: 730,
15605: 730,
15606: 730,
15607: 730,
15608: 730,
15609: 730,
15610: 730,
15611: 730,
15612: 730,
15613: 730,
15614: 730,
15615: 730,
15616: 730,
15617: 730,
15618: 730,
15619: 730,
15620: 730,
15621: 730,
15622: 730,
15623: 730,
15624: 730,
15625: 730,
15626: 730,
15627: 730,
15628: 730,
15629: 730,
15630: 730,
15631: 730,
15632: 730,
15633: 730,
15634: 730,
15635: 730,
15636: 730,
15637: 730,
15638: 730,
15639: 730,
15640: 730,
15641: 730,
15642: 730,
15643: 730,
15644: 730,
15645: 730,
15646: 730,
15647: 730,
15648: 730,
15649: 730,
15650: 730,
15651: 730,
15652: 730,
15653: 731,
15654: 731,
15655: 731,
15656: 731,
15657: 731,
15658: 731,
15659: 731,
15660: 731,
15661: 731,
15662: 731,
15663: 731,
15664: 731,
15665: 731,
15666: 731,
15667: 731,
15668: 731,
15669: 731,
15670: 731,
15671: 731,
15672: 731,
15673: 731,
15674: 731,
15675: 731,
15676: 731,
15677: 731,
15678: 731,
15679: 731,
15680: 731,
15681: 731,
15682: 731,
15683: 731,
15684: 731,
15685: 731,
15686: 731,
15687: 731,
15688: 731,
15689: 731,
15690: 731,
15691: 731,
15692: 731,
15693: 731,
15694: 731,
15695: 731,
15696: 731,
15697: 731,
15698: 731,
15699: 731,
15700: 731,
15701: 731,
15702: 731,
15703: 731,
15704: 731,
15705: 731,
15706: 731,
15707: 731,
15708: 731,
15709: 731,
15710: 731,
15711: 731,
15712: 731,
15713: 731,
15714: 731,
15715: 731,
15716: 731,
15717: 731,
15718: 731,
15719: 731,
15720: 731,
15721: 731,
15722: 731,
15723: 731,
15724: 731,
15725: 731,
15726: 731,
15727: 731,
15728: 731,
15729: 731,
15730: 731,
15731: 731,
15732: 731,
15733: 732,
15734: 732,
15735: 732,
15736: 732,
15737: 732,
15738: 732,
15739: 732,
15740: 732,
15741: 732,
15742: 732,
15743: 732,
15744: 732,
15745: 732,
15746: 732,
15747: 732,
15748: 732,
15749: 732,
15750: 732,
15751: 732,
15752: 732,
15753: 732,
15754: 732,
15755: 732,
15756: 732,
15757: 733,
15758: 733,
15759: 733,
15760: 733,
15761: 733,
15762: 733,
15763: 733,
15764: 733,
15765: 733,
15766: 733,
15767: 733,
15768: 733,
15769: 733,
15770: 733,
15771: 733,
15772: 733,
15773: 733,
15774: 733,
15775: 733,
15776: 733,
15777: 733,
15778: 733,
15779: 733,
15780: 733,
15781: 734,
15782: 734,
15783: 734,
15784: 734,
15785: 734,
15786: 734,
15787: 734,
15788: 734,
15789: 734,
15790: 734,
15791: 734,
15792: 734,
15793: 734,
15794: 734,
15795: 734,
15796: 734,
15797: 734,
15798: 734,
15799: 734,
15800: 734,
15801: 734,
15802: 734,
15803: 734,
15804: 734,
15805: 734,
15806: 734,
15807: 734,
15808: 734,
15809: 734,
15810: 734,
15811: 734,
15812: 734,
15813: 734,
15814: 734,
15815: 734,
15816: 734,
15817: 734,
15818: 734,
15819: 734,
15820: 734,
15821: 734,
15822: 734,
15823: 734,
15824: 734,
15825: 734,
15826: 734,
15827: 734,
15828: 734,
15829: 734,
15830: 734,
15831: 734,
15832: 734,
15833: 734,
15834: 734,
15835: 734,
15836: 734,
15837: 734,
15838: 734,
15839: 734,
15840: 734,
15841: 734,
15842: 734,
15843: 734,
15844: 734,
15845: 735,
15846: 735,
15847: 735,
15848: 735,
15849: 735,
15850: 735,
15851: 735,
15852: 735,
15853: 735,
15854: 735,
15855: 735,
15856: 735,
15857: 735,
15858: 735,
15859: 735,
15860: 735,
15861: 735,
15862: 735,
15863: 735,
15864: 735,
15865: 735,
15866: 735,
15867: 735,
15868: 735,
15869: 735,
15870: 735,
15871: 735,
15872: 735,
15873: 735,
15874: 735,
15875: 735,
15876: 735,
15877: 735,
15878: 735,
15879: 735,
15880: 735,
15881: 735,
15882: 735,
15883: 735,
15884: 735,
15885: 735,
15886: 735,
15887: 735,
15888: 735,
15889: 735,
15890: 735,
15891: 735,
15892: 735,
15893: 735,
15894: 735,
15895: 735,
15896: 735,
15897: 735,
15898: 735,
15899: 735,
15900: 735,
15901: 735,
15902: 735,
15903: 735,
15904: 735,
15905: 735,
15906: 735,
15907: 735,
15908: 735,
15909: 736,
15910: 736,
15911: 736,
15912: 736,
15913: 736,
15914: 736,
15915: 736,
15916: 736,
15917: 736,
15918: 736,
15919: 736,
15920: 736,
15921: 736,
15922: 736,
15923: 736,
15924: 736,
15925: 736,
15926: 736,
15927: 736,
15928: 736,
15929: 736,
15930: 736,
15931: 736,
15932: 736,
15933: 736,
15934: 736,
15935: 736,
15936: 736,
15937: 736,
15938: 736,
15939: 736,
15940: 736,
15941: 737,
15942: 737,
15943: 737,
15944: 737,
15945: 737,
15946: 737,
15947: 737,
15948: 737,
15949: 737,
15950: 737,
15951: 737,
15952: 737,
15953: 737,
15954: 737,
15955: 737,
15956: 737,
15957: 737,
15958: 737,
15959: 737,
15960: 737,
15961: 737,
15962: 737,
15963: 737,
15964: 737,
15965: 737,
15966: 737,
15967: 737,
15968: 737,
15969: 737,
15970: 737,
15971: 737,
15972: 737,
15973: 738,
15974: 738,
15975: 738,
15976: 738,
15977: 738,
15978: 738,
15979: 738,
15980: 738,
15981: 739,
15982: 739,
15983: 739,
15984: 739,
15985: 739,
15986: 739,
15987: 739,
15988: 739,
15989: 740,
15990: 740,
15991: 740,
15992: 740,
15993: 741,
15994: 741,
15995: 741,
15996: 741,
15997: 741,
15998: 741,
15999: 741,
16000: 741,
16001: 741,
16002: 741,
16003: 741,
16004: 741,
16005: 742,
16006: 742,
16007: 742,
16008: 742,
16009: 742,
16010: 742,
16011: 742,
16012: 742,
16013: 742,
16014: 743,
16015: 743,
16016: 743,
16017: 743,
16018: 743,
16019: 743,
16020: 743,
16021: 743,
16022: 743,
16023: 743,
16024: 743,
16025: 743,
16026: 743,
16027: 743,
16028: 743,
16029: 743,
16030: 744,
16031: 744,
16032: 744,
16033: 744,
16034: 744,
16035: 744,
16036: 744,
16037: 744,
16038: 744,
16039: 744,
16040: 744,
16041: 744,
16042: 744,
16043: 744,
16044: 744,
16045: 744,
16046: 744,
16047: 744,
16048: 744,
16049: 744,
16050: 744,
16051: 744,
16052: 744,
16053: 744,
16054: 745,
16055: 745,
16056: 745,
16057: 745,
16058: 745,
16059: 745,
16060: 745,
16061: 745,
16062: 745,
16063: 745,
16064: 745,
16065: 745,
16066: 745,
16067: 745,
16068: 745,
16069: 745,
16070: 745,
16071: 745,
16072: 745,
16073: 745,
16074: 745,
16075: 745,
16076: 745,
16077: 745,
16078: 746,
16079: 747,
16080: 748,
16081: 749,
16082: 750,
16083: 751,
16084: 751,
16085: 751,
16086: 751,
16087: 751,
16088: 752,
16089: 753,
16090: 754,
16091: 755,
16092: 756,
16093: 757,
16094: 758,
16095: 758,
16096: 758,
16097: 758,
16098: 758,
16099: 758,
16100: 758,
16101: 758,
16102: 758,
16103: 758,
16104: 758,
16105: 758,
16106: 758,
16107: 758,
16108: 758,
16109: 758,
16110: 758,
16111: 758,
16112: 758,
16113: 758,
16114: 758,
16115: 758,
16116: 758,
16117: 758,
16118: 758,
16119: 758,
16120: 758,
16121: 758,
16122: 758,
16123: 758,
16124: 758,
16125: 758,
16126: 758,
16127: 758,
16128: 758,
16129: 758,
16130: 758,
16131: 758,
16132: 758,
16133: 758,
16134: 758,
16135: 758,
16136: 758,
16137: 758,
16138: 758,
16139: 758,
16140: 758,
16141: 758,
16142: 758,
16143: 758,
16144: 758,
16145: 758,
16146: 758,
16147: 758,
16148: 758,
16149: 758,
16150: 758,
16151: 758,
16152: 758,
16153: 758,
16154: 758,
16155: 758,
16156: 758,
16157: 758,
16158: 758,
16159: 758,
16160: 758,
16161: 758,
16162: 758,
16163: 758,
16164: 758,
16165: 758,
16166: 758,
16167: 758,
16168: 758,
16169: 758,
16170: 758,
16171: 758,
16172: 758,
16173: 758,
16174: 759,
16175: 759,
16176: 759,
16177: 759,
16178: 759,
16179: 759,
16180: 759,
16181: 759,
16182: 759,
16183: 759,
16184: 759,
16185: 759,
16186: 759,
16187: 759,
16188: 759,
16189: 759,
16190: 759,
16191: 759,
16192: 759,
16193: 759,
16194: 759,
16195: 759,
16196: 759,
16197: 759,
16198: 759,
16199: 759,
16200: 759,
16201: 759,
16202: 759,
16203: 759,
16204: 759,
16205: 759,
16206: 759,
16207: 759,
16208: 759,
16209: 759,
16210: 759,
16211: 759,
16212: 759,
16213: 759,
16214: 759,
16215: 759,
16216: 759,
16217: 759,
16218: 759,
16219: 759,
16220: 759,
16221: 759,
16222: 759,
16223: 759,
16224: 759,
16225: 759,
16226: 759,
16227: 759,
16228: 759,
16229: 759,
16230: 759,
16231: 759,
16232: 759,
16233: 759,
16234: 759,
16235: 759,
16236: 759,
16237: 759,
16238: 759,
16239: 759,
16240: 759,
16241: 759,
16242: 759,
16243: 759,
16244: 759,
16245: 759,
16246: 759,
16247: 759,
16248: 759,
16249: 759,
16250: 759,
16251: 759,
16252: 759,
16253: 759,
16254: 759,
16255: 759,
16256: 759,
16257: 759,
16258: 759,
16259: 759,
16260: 759,
16261: 759,
16262: 759,
16263: 759,
16264: 759,
16265: 759,
16266: 759,
16267: 759,
16268: 759,
16269: 759,
16270: 759,
16271: 759,
16272: 759,
16273: 759,
16274: 759,
16275: 759,
16276: 759,
16277: 759,
16278: 759,
16279: 759,
16280: 759,
16281: 759,
16282: 759,
16283: 759,
16284: 759,
16285: 759,
16286: 759,
16287: 759,
16288: 759,
16289: 759,
16290: 759,
16291: 759,
16292: 759,
16293: 759,
16294: 759,
16295: 759,
16296: 759,
16297: 759,
16298: 759,
16299: 759,
16300: 759,
16301: 759,
16302: 759,
16303: 759,
16304: 759,
16305: 759,
16306: 759,
16307: 759,
16308: 759,
16309: 759,
16310: 759,
16311: 759,
16312: 759,
16313: 759,
16314: 759,
16315: 759,
16316: 759,
16317: 759,
16318: 759,
16319: 759,
16320: 759,
16321: 759,
16322: 759,
16323: 759,
16324: 759,
16325: 759,
16326: 759,
16327: 759,
16328: 759,
16329: 759,
16330: 759,
16331: 759,
16332: 759,
16333: 759,
16334: 759,
16335: 759,
16336: 759,
16337: 759,
16338: 759,
16339: 759,
16340: 759,
16341: 759,
16342: 759,
16343: 759,
16344: 759,
16345: 759,
16346: 759,
16347: 759,
16348: 759,
16349: 759,
16350: 759,
16351: 759,
16352: 759,
16353: 759,
16354: 759,
16355: 759,
16356: 759,
16357: 759,
16358: 759,
16359: 759,
16360: 759,
16361: 759,
16362: 759,
16363: 759,
16364: 759,
16365: 759,
16366: 759,
16367: 759,
16368: 759,
16369: 759,
16370: 759,
16371: 759,
16372: 759,
16373: 759,
16374: 759,
16375: 759,
16376: 759,
16377: 759,
16378: 759,
16379: 759,
16380: 759,
16381: 759,
16382: 759,
16383: 759,
16384: 759,
16385: 759,
16386: 759,
16387: 759,
16388: 759,
16389: 759,
16390: 759,
16391: 759,
16392: 759,
16393: 759,
16394: 759,
16395: 759,
16396: 759,
16397: 759,
16398: 759,
16399: 759,
16400: 759,
16401: 759,
16402: 759,
16403: 759,
16404: 759,
16405: 759,
16406: 759,
16407: 759,
16408: 759,
16409: 759,
16410: 759,
16411: 759,
16412: 759,
16413: 759,
16414: 759,
16415: 759,
16416: 759,
16417: 759,
16418: 759,
16419: 759,
16420: 759,
16421: 759,
16422: 759,
16423: 759,
16424: 759,
16425: 759,
16426: 759,
16427: 759,
16428: 759,
16429: 759,
16430: 759,
16431: 759,
16432: 759,
16433: 759,
16434: 759,
16435: 759,
16436: 759,
16437: 759,
16438: 759,
16439: 759,
16440: 759,
16441: 759,
16442: 759,
16443: 759,
16444: 759,
16445: 759,
16446: 759,
16447: 759,
16448: 759,
16449: 759,
16450: 759,
16451: 759,
16452: 759,
16453: 759,
16454: 759,
16455: 759,
16456: 759,
16457: 759,
16458: 759,
16459: 759,
16460: 759,
16461: 759,
16462: 759,
16463: 759,
16464: 759,
16465: 759,
16466: 759,
16467: 759,
16468: 759,
16469: 759,
16470: 759,
16471: 759,
16472: 759,
16473: 759,
16474: 759,
16475: 759,
16476: 759,
16477: 759,
16478: 759,
16479: 759,
16480: 759,
16481: 759,
16482: 759,
16483: 759,
16484: 759,
16485: 759,
16486: 759,
16487: 759,
16488: 759,
16489: 759,
16490: 759,
16491: 759,
16492: 759,
16493: 759,
16494: 759,
16495: 759,
16496: 759,
16497: 759,
16498: 760,
16499: 760,
16500: 760,
16501: 760,
16502: 760,
16503: 760,
16504: 761,
16505: 762,
16506: 763,
16507: 764,
16508: 765,
16509: 765,
16510: 765,
16511: 765,
16512: 765,
16513: 765,
16514: 766,
16515: 766,
16516: 766,
16517: 766,
16518: 766,
16519: 766,
16520: 766,
16521: 766,
16522: 766,
16523: 766,
16524: 766,
16525: 766,
16526: 766,
16527: 766,
16528: 766,
16529: 766,
16530: 766,
16531: 766,
16532: 766,
16533: 766,
16534: 766,
16535: 766,
16536: 766,
16537: 766,
16538: 766,
16539: 766,
16540: 766,
16541: 766,
16542: 766,
16543: 766,
16544: 766,
16545: 766,
16546: 766,
16547: 766,
16548: 766,
16549: 766,
16550: 766,
16551: 766,
16552: 766,
16553: 766,
16554: 766,
16555: 766,
16556: 766,
16557: 766,
16558: 766,
16559: 766,
16560: 766,
16561: 766,
16562: 766,
16563: 766,
16564: 766,
16565: 766,
16566: 766,
16567: 766,
16568: 766,
16569: 766,
16570: 766,
16571: 766,
16572: 766,
16573: 766,
16574: 766,
16575: 766,
16576: 766,
16577: 766,
16578: 766,
16579: 766,
16580: 766,
16581: 766,
16582: 766,
16583: 766,
16584: 766,
16585: 766,
16586: 766,
16587: 766,
16588: 766,
16589: 766,
16590: 766,
16591: 766,
16592: 766,
16593: 766,
16594: 767,
16595: 767,
16596: 767,
16597: 767,
16598: 767,
16599: 767,
16600: 767,
16601: 767,
16602: 767,
16603: 767,
16604: 767,
16605: 767,
16606: 767,
16607: 767,
16608: 767,
16609: 767,
16610: 767,
16611: 767,
16612: 767,
16613: 767,
16614: 767,
16615: 767,
16616: 767,
16617: 767,
16618: 767,
16619: 767,
16620: 767,
16621: 767,
16622: 767,
16623: 767,
16624: 767,
16625: 767,
16626: 767,
16627: 767,
16628: 767,
16629: 767,
16630: 767,
16631: 767,
16632: 767,
16633: 767,
16634: 767,
16635: 767,
16636: 767,
16637: 767,
16638: 767,
16639: 767,
16640: 767,
16641: 767,
16642: 767,
16643: 767,
16644: 767,
16645: 767,
16646: 767,
16647: 767,
16648: 767,
16649: 767,
16650: 767,
16651: 767,
16652: 767,
16653: 767,
16654: 767,
16655: 767,
16656: 767,
16657: 767,
16658: 767,
16659: 767,
16660: 767,
16661: 767,
16662: 767,
16663: 767,
16664: 767,
16665: 767,
16666: 767,
16667: 767,
16668: 767,
16669: 767,
16670: 767,
16671: 767,
16672: 767,
16673: 767,
16674: 767,
16675: 767,
16676: 767,
16677: 767,
16678: 767,
16679: 767,
16680: 767,
16681: 767,
16682: 767,
16683: 767,
16684: 767,
16685: 767,
16686: 767,
16687: 767,
16688: 767,
16689: 767,
16690: 767,
16691: 767,
16692: 767,
16693: 767,
16694: 767,
16695: 767,
16696: 767,
16697: 767,
16698: 767,
16699: 767,
16700: 767,
16701: 767,
16702: 767,
16703: 767,
16704: 767,
16705: 767,
16706: 767,
16707: 767,
16708: 767,
16709: 767,
16710: 767,
16711: 767,
16712: 767,
16713: 767,
16714: 767,
16715: 767,
16716: 767,
16717: 767,
16718: 767,
16719: 767,
16720: 767,
16721: 767,
16722: 767,
16723: 767,
16724: 767,
16725: 767,
16726: 767,
16727: 767,
16728: 767,
16729: 767,
16730: 767,
16731: 767,
16732: 767,
16733: 767,
16734: 767,
16735: 767,
16736: 767,
16737: 767,
16738: 767,
16739: 767,
16740: 767,
16741: 767,
16742: 767,
16743: 767,
16744: 767,
16745: 767,
16746: 767,
16747: 767,
16748: 767,
16749: 767,
16750: 767,
16751: 767,
16752: 767,
16753: 767,
16754: 767,
16755: 767,
16756: 767,
16757: 767,
16758: 767,
16759: 767,
16760: 767,
16761: 767,
16762: 767,
16763: 767,
16764: 767,
16765: 767,
16766: 767,
16767: 767,
16768: 767,
16769: 767,
16770: 767,
16771: 767,
16772: 767,
16773: 767,
16774: 767,
16775: 767,
16776: 767,
16777: 767,
16778: 767,
16779: 767,
16780: 767,
16781: 767,
16782: 767,
16783: 767,
16784: 767,
16785: 767,
16786: 767,
16787: 767,
16788: 767,
16789: 767,
16790: 767,
16791: 767,
16792: 767,
16793: 767,
16794: 767,
16795: 767,
16796: 767,
16797: 767,
16798: 767,
16799: 767,
16800: 767,
16801: 767,
16802: 767,
16803: 767,
16804: 767,
16805: 767,
16806: 767,
16807: 767,
16808: 767,
16809: 767,
16810: 767,
16811: 767,
16812: 767,
16813: 767,
16814: 767,
16815: 767,
16816: 767,
16817: 767,
16818: 767,
16819: 767,
16820: 767,
16821: 767,
16822: 767,
16823: 767,
16824: 767,
16825: 767,
16826: 767,
16827: 767,
16828: 767,
16829: 767,
16830: 767,
16831: 767,
16832: 767,
16833: 767,
16834: 767,
16835: 767,
16836: 767,
16837: 767,
16838: 767,
16839: 767,
16840: 767,
16841: 767,
16842: 767,
16843: 767,
16844: 767,
16845: 767,
16846: 767,
16847: 767,
16848: 767,
16849: 767,
16850: 767,
16851: 767,
16852: 767,
16853: 767,
16854: 767,
16855: 767,
16856: 767,
16857: 767,
16858: 767,
16859: 767,
16860: 767,
16861: 767,
16862: 767,
16863: 767,
16864: 767,
16865: 767,
16866: 767,
16867: 767,
16868: 767,
16869: 767,
16870: 767,
16871: 767,
16872: 767,
16873: 767,
16874: 767,
16875: 767,
16876: 767,
16877: 767,
16878: 767,
16879: 767,
16880: 767,
16881: 767,
16882: 767,
16883: 767,
16884: 767,
16885: 767,
16886: 767,
16887: 767,
16888: 767,
16889: 767,
16890: 767,
16891: 767,
16892: 767,
16893: 767,
16894: 767,
16895: 767,
16896: 767,
16897: 767,
16898: 767,
16899: 767,
16900: 767,
16901: 767,
16902: 767,
16903: 767,
16904: 767,
16905: 767,
16906: 767,
16907: 767,
16908: 767,
16909: 767,
16910: 767,
16911: 767,
16912: 767,
16913: 767,
16914: 767,
16915: 767,
16916: 767,
16917: 767,
16918: 768,
16919: 769,
16920: 769,
16921: 769,
16922: 769,
16923: 769,
16924: 769,
16925: 769,
16926: 769,
16927: 769,
16928: 769,
16929: 769,
16930: 769,
16931: 769,
16932: 769,
16933: 769,
16934: 769,
16935: 769,
16936: 769,
16937: 769,
16938: 769,
16939: 769,
16940: 769,
16941: 769,
16942: 769,
16943: 769,
16944: 769,
16945: 769,
16946: 769,
16947: 769,
16948: 769,
16949: 769,
16950: 769,
16951: 769,
16952: 769,
16953: 769,
16954: 769,
16955: 769,
16956: 769,
16957: 769,
16958: 769,
16959: 769,
16960: 769,
16961: 769,
16962: 769,
16963: 769,
16964: 769,
16965: 769,
16966: 769,
16967: 769,
16968: 769,
16969: 769,
16970: 769,
16971: 769,
16972: 769,
16973: 769,
16974: 769,
16975: 769,
16976: 769,
16977: 769,
16978: 769,
16979: 769,
16980: 769,
16981: 769,
16982: 769,
16983: 769,
16984: 769,
16985: 769,
16986: 769,
16987: 769,
16988: 769,
16989: 769,
16990: 769,
16991: 769,
16992: 769,
16993: 769,
16994: 769,
16995: 769,
16996: 769,
16997: 769,
16998: 769,
16999: 770,
17000: 770,
17001: 770,
17002: 770,
17003: 770,
17004: 770,
17005: 771,
17006: 771,
17007: 772,
17008: 772,
17009: 772,
17010: 772,
17011: 772,
17012: 772,
17013: 772,
17014: 772,
17015: 772,
17016: 772,
17017: 772,
17018: 772,
17019: 772,
17020: 772,
17021: 772,
17022: 772,
17023: 772,
17024: 772,
17025: 772,
17026: 772,
17027: 772,
17028: 772,
17029: 772,
17030: 772,
17031: 773,
17032: 773,
17033: 773,
17034: 773,
17035: 773,
17036: 773,
17037: 773,
17038: 773,
17039: 773,
17040: 773,
17041: 773,
17042: 773,
17043: 773,
17044: 773,
17045: 773,
17046: 773,
17047: 773,
17048: 773,
17049: 773,
17050: 773,
17051: 773,
17052: 773,
17053: 773,
17054: 773,
17055: 773,
17056: 773,
17057: 773,
17058: 773,
17059: 773,
17060: 773,
17061: 773,
17062: 773,
17063: 773,
17064: 773,
17065: 773,
17066: 773,
17067: 773,
17068: 773,
17069: 773,
17070: 773,
17071: 773,
17072: 773,
17073: 773,
17074: 773,
17075: 773,
17076: 773,
17077: 773,
17078: 773,
17079: 773,
17080: 773,
17081: 773,
17082: 773,
17083: 773,
17084: 773,
17085: 773,
17086: 773,
17087: 773,
17088: 773,
17089: 773,
17090: 773,
17091: 773,
17092: 773,
17093: 773,
17094: 773,
17095: 773,
17096: 773,
17097: 773,
17098: 773,
17099: 773,
17100: 773,
17101: 773,
17102: 773,
17103: 773,
17104: 773,
17105: 773,
17106: 773,
17107: 773,
17108: 773,
17109: 773,
17110: 773,
17111: 773,
17112: 773,
17113: 773,
17114: 773,
17115: 773,
17116: 773,
17117: 773,
17118: 773,
17119: 773,
17120: 773,
17121: 773,
17122: 773,
17123: 773,
17124: 773,
17125: 773,
17126: 773,
17127: 773,
17128: 773,
17129: 773,
17130: 773,
17131: 773,
17132: 773,
17133: 773,
17134: 773,
17135: 773,
17136: 773,
17137: 773,
17138: 773,
17139: 773,
17140: 773,
17141: 773,
17142: 773,
17143: 773,
17144: 773,
17145: 773,
17146: 773,
17147: 773,
17148: 773,
17149: 773,
17150: 773,
17151: 773,
17152: 773,
17153: 773,
17154: 773,
17155: 773,
17156: 773,
17157: 773,
17158: 773,
17159: 773,
17160: 773,
17161: 773,
17162: 773,
17163: 773,
17164: 773,
17165: 773,
17166: 773,
17167: 773,
17168: 773,
17169: 773,
17170: 773,
17171: 773,
17172: 773,
17173: 773,
17174: 773,
17175: 773,
17176: 773,
17177: 773,
17178: 773,
17179: 773,
17180: 773,
17181: 773,
17182: 773,
17183: 773,
17184: 773,
17185: 773,
17186: 773,
17187: 773,
17188: 773,
17189: 773,
17190: 773,
17191: 773,
17192: 773,
17193: 773,
17194: 773,
17195: 773,
17196: 773,
17197: 773,
17198: 773,
17199: 773,
17200: 773,
17201: 773,
17202: 773,
17203: 773,
17204: 773,
17205: 773,
17206: 773,
17207: 773,
17208: 773,
17209: 773,
17210: 773,
17211: 773,
17212: 773,
17213: 773,
17214: 773,
17215: 773,
17216: 773,
17217: 773,
17218: 773,
17219: 773,
17220: 773,
17221: 773,
17222: 773,
17223: 773,
17224: 773,
17225: 773,
17226: 773,
17227: 773,
17228: 773,
17229: 773,
17230: 773,
17231: 773,
17232: 773,
17233: 773,
17234: 773,
17235: 773,
17236: 773,
17237: 773,
17238: 773,
17239: 773,
17240: 773,
17241: 773,
17242: 773,
17243: 773,
17244: 773,
17245: 773,
17246: 773,
17247: 773,
17248: 773,
17249: 773,
17250: 773,
17251: 773,
17252: 773,
17253: 773,
17254: 773,
17255: 773,
17256: 773,
17257: 773,
17258: 773,
17259: 773,
17260: 773,
17261: 773,
17262: 773,
17263: 773,
17264: 773,
17265: 773,
17266: 773,
17267: 773,
17268: 773,
17269: 773,
17270: 773,
17271: 773,
17272: 773,
17273: 773,
17274: 773,
17275: 773,
17276: 773,
17277: 773,
17278: 773,
17279: 773,
17280: 773,
17281: 773,
17282: 773,
17283: 773,
17284: 773,
17285: 773,
17286: 773,
17287: 773,
17288: 773,
17289: 773,
17290: 773,
17291: 773,
17292: 773,
17293: 773,
17294: 773,
17295: 773,
17296: 773,
17297: 773,
17298: 773,
17299: 773,
17300: 773,
17301: 773,
17302: 773,
17303: 773,
17304: 773,
17305: 773,
17306: 773,
17307: 773,
17308: 773,
17309: 773,
17310: 773,
17311: 773,
17312: 773,
17313: 773,
17314: 773,
17315: 773,
17316: 773,
17317: 773,
17318: 773,
17319: 773,
17320: 773,
17321: 773,
17322: 773,
17323: 773,
17324: 773,
17325: 773,
17326: 773,
17327: 773,
17328: 773,
17329: 773,
17330: 773,
17331: 773,
17332: 773,
17333: 773,
17334: 773,
17335: 773,
17336: 773,
17337: 773,
17338: 773,
17339: 773,
17340: 773,
17341: 773,
17342: 773,
17343: 773,
17344: 773,
17345: 773,
17346: 773,
17347: 773,
17348: 773,
17349: 773,
17350: 773,
17351: 773,
17352: 773,
17353: 773,
17354: 773,
17355: 774,
17356: 775,
17357: 776,
17358: 777,
17359: 777,
17360: 777,
17361: 777,
17362: 777,
17363: 777,
17364: 777,
17365: 777,
17366: 777,
17367: 777,
17368: 777,
17369: 777,
17370: 777,
17371: 777,
17372: 777,
17373: 777,
17374: 778,
17375: 778,
17376: 778,
17377: 778,
17378: 778,
17379: 778,
17380: 778,
17381: 778,
17382: 778,
17383: 778,
17384: 778,
17385: 778,
17386: 778,
17387: 778,
17388: 778,
17389: 778,
17390: 779,
17391: 779,
17392: 779,
17393: 779,
17394: 779,
17395: 779,
17396: 779,
17397: 779,
17398: 779,
17399: 779,
17400: 779,
17401: 779,
17402: 779,
17403: 779,
17404: 779,
17405: 779,
17406: 780,
17407: 780,
17408: 780,
17409: 780,
17410: 780,
17411: 780,
17412: 780,
17413: 780,
17414: 780,
17415: 780,
17416: 780,
17417: 780,
17418: 780,
17419: 780,
17420: 780,
17421: 780,
17422: 781,
17423: 781,
17424: 781,
17425: 781,
17426: 781,
17427: 781,
17428: 781,
17429: 781,
17430: 781,
17431: 781,
17432: 781,
17433: 781,
17434: 781,
17435: 781,
17436: 781,
17437: 781,
17438: 782,
17439: 782,
17440: 782,
17441: 782,
17442: 782,
17443: 782,
17444: 782,
17445: 782,
17446: 782,
17447: 782,
17448: 782,
17449: 782,
17450: 782,
17451: 782,
17452: 782,
17453: 782,
17454: 783,
17455: 783,
17456: 783,
17457: 783,
17458: 783,
17459: 783,
17460: 783,
17461: 783,
17462: 783,
17463: 783,
17464: 783,
17465: 783,
17466: 783,
17467: 783,
17468: 783,
17469: 783,
17470: 784,
17471: 784,
17472: 784,
17473: 784,
17474: 784,
17475: 784,
17476: 784,
17477: 784,
17478: 784,
17479: 784,
17480: 784,
17481: 784,
17482: 784,
17483: 784,
17484: 784,
17485: 784,
17486: 785,
17487: 785,
17488: 785,
17489: 785,
17490: 785,
17491: 785,
17492: 785,
17493: 785,
17494: 785,
17495: 785,
17496: 785,
17497: 785,
17498: 785,
17499: 785,
17500: 785,
17501: 785,
17502: 786,
17503: 786,
17504: 786,
17505: 786,
17506: 786,
17507: 786,
17508: 786,
17509: 786,
17510: 786,
17511: 786,
17512: 786,
17513: 786,
17514: 786,
17515: 786,
17516: 786,
17517: 786,
17518: 787,
17519: 787,
17520: 787,
17521: 787,
17522: 787,
17523: 787,
17524: 787,
17525: 787,
17526: 787,
17527: 787,
17528: 787,
17529: 787,
17530: 787,
17531: 787,
17532: 787,
17533: 787,
17534: 788,
17535: 788,
17536: 788,
17537: 788,
17538: 788,
17539: 788,
17540: 788,
17541: 788,
17542: 788,
17543: 788,
17544: 788,
17545: 788,
17546: 788,
17547: 788,
17548: 788,
17549: 788,
17550: 789,
17551: 789,
17552: 789,
17553: 789,
17554: 789,
17555: 789,
17556: 789,
17557: 789,
17558: 789,
17559: 789,
17560: 789,
17561: 789,
17562: 789,
17563: 789,
17564: 789,
17565: 789,
17566: 790,
17567: 790,
17568: 790,
17569: 790,
17570: 790,
17571: 790,
17572: 790,
17573: 790,
17574: 790,
17575: 790,
17576: 790,
17577: 790,
17578: 790,
17579: 790,
17580: 790,
17581: 790,
17582: 791,
17583: 791,
17584: 791,
17585: 791,
17586: 791,
17587: 791,
17588: 791,
17589: 791,
17590: 791,
17591: 791,
17592: 791,
17593: 791,
17594: 791,
17595: 791,
17596: 791,
17597: 791,
17598: 792,
17599: 792,
17600: 792,
17601: 792,
17602: 792,
17603: 792,
17604: 792,
17605: 792,
17606: 792,
17607: 792,
17608: 792,
17609: 792,
17610: 792,
17611: 792,
17612: 792,
17613: 792,
17614: 793,
17615: 793,
17616: 793,
17617: 793,
17618: 793,
17619: 793,
17620: 793,
17621: 793,
17622: 793,
17623: 793,
17624: 793,
17625: 793,
17626: 793,
17627: 793,
17628: 793,
17629: 793,
17630: 794,
17631: 794,
17632: 795,
17633: 795,
17634: 796,
17635: 796,
17636: 797,
17637: 797,
17638: 798,
17639: 798,
17640: 799,
17641: 799,
17642: 800,
17643: 800,
17644: 801,
17645: 801,
17646: 802,
17647: 802,
17648: 803,
17649: 803,
17650: 804,
17651: 804,
17652: 805,
17653: 805,
17654: 806,
17655: 806,
17656: 807,
17657: 807,
17658: 808,
17659: 808,
17660: 809,
17661: 809,
17662: 810,
17663: 810,
17664: 811,
17665: 812,
17666: 813,
17667: 813,
17668: 813,
17669: 813,
17670: 813,
17671: 813,
17672: 813,
17673: 813,
17674: 813,
17675: 813,
17676: 813,
17677: 813,
17678: 814,
17679: 814,
17680: 814,
17681: 814,
17682: 814,
17683: 814,
17684: 814,
17685: 814,
17686: 814,
17687: 814,
17688: 814,
17689: 814,
17690: 815,
17691: 815,
17692: 815,
17693: 815,
17694: 815,
17695: 815,
17696: 815,
17697: 815,
17698: 815,
17699: 815,
17700: 815,
17701: 815,
17702: 816,
17703: 816,
17704: 816,
17705: 816,
17706: 816,
17707: 816,
17708: 816,
17709: 816,
17710: 816,
17711: 816,
17712: 816,
17713: 816,
17714: 817,
17715: 818,
17716: 819,
17717: 820,
17718: 821,
17719: 821,
17720: 821,
17721: 821,
17722: 821,
17723: 821,
17724: 821,
17725: 821,
17726: 821,
17727: 821,
17728: 821,
17729: 821,
17730: 821,
17731: 821,
17732: 821,
17733: 821,
17734: 821,
17735: 821,
17736: 821,
17737: 821,
17738: 821,
17739: 821,
17740: 821,
17741: 821,
17742: 821,
17743: 821,
17744: 821,
17745: 821,
17746: 821,
17747: 821,
17748: 821,
17749: 821,
17750: 821,
17751: 821,
17752: 821,
17753: 821,
17754: 821,
17755: 821,
17756: 821,
17757: 821,
17758: 821,
17759: 821,
17760: 821,
17761: 821,
17762: 821,
17763: 821,
17764: 821,
17765: 821,
17766: 821,
17767: 821,
17768: 821,
17769: 821,
17770: 821,
17771: 821,
17772: 821,
17773: 821,
17774: 821,
17775: 821,
17776: 821,
17777: 821,
17778: 821,
17779: 821,
17780: 821,
17781: 821,
17782: 821,
17783: 821,
17784: 821,
17785: 821,
17786: 821,
17787: 821,
17788: 821,
17789: 821,
17790: 821,
17791: 821,
17792: 821,
17793: 821,
17794: 821,
17795: 821,
17796: 821,
17797: 821,
17798: 821,
17799: 821,
17800: 821,
17801: 821,
17802: 821,
17803: 821,
17804: 821,
17805: 821,
17806: 821,
17807: 821,
17808: 821,
17809: 821,
17810: 821,
17811: 821,
17812: 821,
17813: 821,
17814: 822,
17815: 823,
17816: 824,
17817: 825,
17818: 826,
17819: 827,
17820: 828,
17821: 829,
17822: 830,
17823: 831,
17824: 832,
17825: 832,
17826: 832,
17827: 832,
17828: 832,
17829: 832,
17830: 832,
17831: 832,
17832: 832,
17833: 832,
17834: 832,
17835: 832,
17836: 832,
17837: 832,
17838: 832,
17839: 832,
17840: 832,
17841: 832,
17842: 832,
17843: 832,
17844: 832,
17845: 832,
17846: 832,
17847: 832,
17848: 832,
17849: 832,
17850: 832,
17851: 832,
17852: 832,
17853: 832,
17854: 832,
17855: 832,
17856: 832,
17857: 832,
17858: 832,
17859: 832,
17860: 832,
17861: 832,
17862: 832,
17863: 832,
17864: 832,
17865: 832,
17866: 832,
17867: 832,
17868: 832,
17869: 832,
17870: 832,
17871: 832,
17872: 832,
17873: 832,
17874: 832,
17875: 832,
17876: 832,
17877: 832,
17878: 832,
17879: 832,
17880: 832,
17881: 832,
17882: 832,
17883: 832,
17884: 832,
17885: 832,
17886: 832,
17887: 832,
17888: 832,
17889: 832,
17890: 832,
17891: 832,
17892: 832,
17893: 832,
17894: 832,
17895: 832,
17896: 832,
17897: 832,
17898: 832,
17899: 832,
17900: 832,
17901: 832,
17902: 832,
17903: 832,
17904: 833,
17905: 833,
17906: 833,
17907: 833,
17908: 833,
17909: 833,
17910: 833,
17911: 833,
17912: 833,
17913: 833,
17914: 833,
17915: 833,
17916: 833,
17917: 833,
17918: 833,
17919: 833,
17920: 833,
17921: 833,
17922: 833,
17923: 833,
17924: 833,
17925: 833,
17926: 833,
17927: 833,
17928: 833,
17929: 833,
17930: 833,
17931: 833,
17932: 833,
17933: 833,
17934: 833,
17935: 833,
17936: 833,
17937: 833,
17938: 833,
17939: 833,
17940: 833,
17941: 833,
17942: 833,
17943: 833,
17944: 833,
17945: 833,
17946: 833,
17947: 833,
17948: 833,
17949: 833,
17950: 833,
17951: 833,
17952: 833,
17953: 833,
17954: 833,
17955: 833,
17956: 833,
17957: 833,
17958: 833,
17959: 833,
17960: 833,
17961: 833,
17962: 833,
17963: 833,
17964: 833,
17965: 833,
17966: 833,
17967: 833,
17968: 833,
17969: 833,
17970: 833,
17971: 833,
17972: 833,
17973: 833,
17974: 833,
17975: 833,
17976: 833,
17977: 833,
17978: 833,
17979: 833,
17980: 833,
17981: 833,
17982: 833,
17983: 833,
17984: 834,
17985: 834,
17986: 834,
17987: 834,
17988: 834,
17989: 834,
17990: 834,
17991: 834,
17992: 834,
17993: 834,
17994: 834,
17995: 834,
17996: 834,
17997: 834,
17998: 834,
17999: 834,
18000: 834,
18001: 834,
18002: 834,
18003: 834,
18004: 834,
18005: 834,
18006: 834,
18007: 834,
18008: 834,
18009: 834,
18010: 834,
18011: 834,
18012: 834,
18013: 834,
18014: 834,
18015: 834,
18016: 834,
18017: 834,
18018: 834,
18019: 834,
18020: 834,
18021: 834,
18022: 834,
18023: 834,
18024: 834,
18025: 834,
18026: 834,
18027: 834,
18028: 834,
18029: 834,
18030: 834,
18031: 834,
18032: 834,
18033: 834,
18034: 834,
18035: 834,
18036: 834,
18037: 834,
18038: 834,
18039: 834,
18040: 834,
18041: 834,
18042: 834,
18043: 834,
18044: 834,
18045: 834,
18046: 834,
18047: 834,
18048: 834,
18049: 834,
18050: 834,
18051: 834,
18052: 834,
18053: 834,
18054: 834,
18055: 834,
18056: 834,
18057: 834,
18058: 834,
18059: 834,
18060: 834,
18061: 834,
18062: 834,
18063: 834,
18064: 835,
18065: 835,
18066: 835,
18067: 835,
18068: 835,
18069: 835,
18070: 835,
18071: 835,
18072: 835,
18073: 835,
18074: 835,
18075: 835,
18076: 835,
18077: 835,
18078: 835,
18079: 835,
18080: 835,
18081: 835,
18082: 835,
18083: 835,
18084: 835,
18085: 835,
18086: 835,
18087: 835,
18088: 835,
18089: 835,
18090: 835,
18091: 835,
18092: 835,
18093: 835,
18094: 835,
18095: 835,
18096: 835,
18097: 835,
18098: 835,
18099: 835,
18100: 835,
18101: 835,
18102: 835,
18103: 835,
18104: 835,
18105: 835,
18106: 835,
18107: 835,
18108: 835,
18109: 835,
18110: 835,
18111: 835,
18112: 835,
18113: 835,
18114: 835,
18115: 835,
18116: 835,
18117: 835,
18118: 835,
18119: 835,
18120: 835,
18121: 835,
18122: 835,
18123: 835,
18124: 835,
18125: 835,
18126: 835,
18127: 835,
18128: 835,
18129: 835,
18130: 835,
18131: 835,
18132: 835,
18133: 835,
18134: 835,
18135: 835,
18136: 835,
18137: 835,
18138: 835,
18139: 835,
18140: 835,
18141: 835,
18142: 835,
18143: 835,
18144: 836,
18145: 836,
18146: 836,
18147: 836,
18148: 836,
18149: 836,
18150: 837,
18151: 837,
18152: 837,
18153: 837,
18154: 837,
18155: 837,
18156: 838,
18157: 838,
18158: 838,
18159: 838,
18160: 838,
18161: 838,
18162: 839,
18163: 839,
18164: 839,
18165: 839,
18166: 839,
18167: 839,
18168: 840,
18169: 841,
18170: 842,
18171: 843,
18172: 844,
18173: 845,
18174: 846,
18175: 847,
18176: 848,
18177: 848,
18178: 848,
18179: 848,
18180: 848,
18181: 848,
18182: 848,
18183: 848,
18184: 848,
18185: 848,
18186: 848,
18187: 848,
18188: 848,
18189: 848,
18190: 848,
18191: 848,
18192: 848,
18193: 848,
18194: 848,
18195: 848,
18196: 848,
18197: 848,
18198: 848,
18199: 848,
18200: 848,
18201: 848,
18202: 848,
18203: 848,
18204: 848,
18205: 848,
18206: 848,
18207: 848,
18208: 848,
18209: 848,
18210: 848,
18211: 848,
18212: 848,
18213: 848,
18214: 848,
18215: 848,
18216: 848,
18217: 848,
18218: 848,
18219: 848,
18220: 848,
18221: 848,
18222: 848,
18223: 848,
18224: 848,
18225: 848,
18226: 848,
18227: 848,
18228: 848,
18229: 848,
18230: 848,
18231: 848,
18232: 848,
18233: 848,
18234: 848,
18235: 848,
18236: 848,
18237: 848,
18238: 848,
18239: 848,
18240: 848,
18241: 848,
18242: 848,
18243: 848,
18244: 848,
18245: 848,
18246: 848,
18247: 848,
18248: 848,
18249: 848,
18250: 848,
18251: 848,
18252: 848,
18253: 848,
18254: 848,
18255: 848,
18256: 849,
18257: 849,
18258: 849,
18259: 849,
18260: 849,
18261: 849,
18262: 849,
18263: 849,
18264: 849,
18265: 849,
18266: 849,
18267: 849,
18268: 849,
18269: 849,
18270: 849,
18271: 849,
18272: 849,
18273: 849,
18274: 849,
18275: 849,
18276: 849,
18277: 849,
18278: 849,
18279: 849,
18280: 849,
18281: 849,
18282: 849,
18283: 849,
18284: 849,
18285: 849,
18286: 849,
18287: 849,
18288: 849,
18289: 849,
18290: 849,
18291: 849,
18292: 849,
18293: 849,
18294: 849,
18295: 849,
18296: 849,
18297: 849,
18298: 849,
18299: 849,
18300: 849,
18301: 849,
18302: 849,
18303: 849,
18304: 849,
18305: 849,
18306: 849,
18307: 849,
18308: 849,
18309: 849,
18310: 849,
18311: 849,
18312: 849,
18313: 849,
18314: 849,
18315: 849,
18316: 849,
18317: 849,
18318: 849,
18319: 849,
18320: 849,
18321: 849,
18322: 849,
18323: 849,
18324: 849,
18325: 849,
18326: 849,
18327: 849,
18328: 849,
18329: 849,
18330: 849,
18331: 849,
18332: 849,
18333: 849,
18334: 849,
18335: 849,
18336: 850,
18337: 850,
18338: 850,
18339: 850,
18340: 850,
18341: 850,
18342: 850,
18343: 850,
18344: 850,
18345: 850,
18346: 850,
18347: 850,
18348: 850,
18349: 850,
18350: 850,
18351: 850,
18352: 850,
18353: 850,
18354: 850,
18355: 850,
18356: 850,
18357: 850,
18358: 850,
18359: 850,
18360: 850,
18361: 850,
18362: 850,
18363: 850,
18364: 850,
18365: 850,
18366: 850,
18367: 850,
18368: 850,
18369: 850,
18370: 850,
18371: 850,
18372: 850,
18373: 850,
18374: 850,
18375: 850,
18376: 850,
18377: 850,
18378: 850,
18379: 850,
18380: 850,
18381: 850,
18382: 850,
18383: 850,
18384: 850,
18385: 850,
18386: 850,
18387: 850,
18388: 850,
18389: 850,
18390: 850,
18391: 850,
18392: 850,
18393: 850,
18394: 850,
18395: 850,
18396: 850,
18397: 850,
18398: 850,
18399: 850,
18400: 850,
18401: 850,
18402: 850,
18403: 850,
18404: 850,
18405: 850,
18406: 850,
18407: 850,
18408: 850,
18409: 850,
18410: 850,
18411: 850,
18412: 850,
18413: 850,
18414: 850,
18415: 850,
18416: 851,
18417: 851,
18418: 851,
18419: 851,
18420: 851,
18421: 851,
18422: 851,
18423: 851,
18424: 851,
18425: 851,
18426: 851,
18427: 851,
18428: 851,
18429: 851,
18430: 851,
18431: 851,
18432: 851,
18433: 851,
18434: 851,
18435: 851,
18436: 851,
18437: 851,
18438: 851,
18439: 851,
18440: 851,
18441: 851,
18442: 851,
18443: 851,
18444: 851,
18445: 851,
18446: 851,
18447: 851,
18448: 851,
18449: 851,
18450: 851,
18451: 851,
18452: 851,
18453: 851,
18454: 851,
18455: 851,
18456: 851,
18457: 851,
18458: 851,
18459: 851,
18460: 851,
18461: 851,
18462: 851,
18463: 851,
18464: 851,
18465: 851,
18466: 851,
18467: 851,
18468: 851,
18469: 851,
18470: 851,
18471: 851,
18472: 851,
18473: 851,
18474: 851,
18475: 851,
18476: 851,
18477: 851,
18478: 851,
18479: 851,
18480: 851,
18481: 851,
18482: 851,
18483: 851,
18484: 851,
18485: 851,
18486: 851,
18487: 851,
18488: 851,
18489: 851,
18490: 851,
18491: 851,
18492: 851,
18493: 851,
18494: 851,
18495: 851,
18496: 852,
18497: 852,
18498: 852,
18499: 852,
18500: 852,
18501: 852,
18502: 853,
18503: 853,
18504: 853,
18505: 853,
18506: 853,
18507: 853,
18508: 854,
18509: 854,
18510: 854,
18511: 854,
18512: 854,
18513: 854,
18514: 855,
18515: 855,
18516: 855,
18517: 855,
18518: 855,
18519: 855,
18520: 856,
18521: 856,
18522: 856,
18523: 856,
18524: 856,
18525: 856,
18526: 856,
18527: 856,
18528: 856,
18529: 856,
18530: 856,
18531: 856,
18532: 856,
18533: 856,
18534: 856,
18535: 856,
18536: 856,
18537: 856,
18538: 856,
18539: 856,
18540: 856,
18541: 856,
18542: 856,
18543: 856,
18544: 857,
18545: 857,
18546: 857,
18547: 857,
18548: 857,
18549: 857,
18550: 857,
18551: 857,
18552: 857,
18553: 857,
18554: 857,
18555: 857,
18556: 857,
18557: 857,
18558: 857,
18559: 857,
18560: 857,
18561: 857,
18562: 857,
18563: 857,
18564: 858,
18565: 859,
18566: 859,
18567: 859,
18568: 859,
18569: 859,
18570: 859,
18571: 859,
18572: 859,
18573: 859,
18574: 859,
18575: 859,
18576: 859,
18577: 859,
18578: 859,
18579: 859,
18580: 859,
18581: 859,
18582: 859,
18583: 859,
18584: 859,
18585: 859,
18586: 859,
18587: 859,
18588: 859,
18589: 859,
18590: 859,
18591: 859,
18592: 859,
18593: 859,
18594: 859,
18595: 859,
18596: 859,
18597: 859,
18598: 859,
18599: 859,
18600: 859,
18601: 859,
18602: 859,
18603: 859,
18604: 859,
18605: 859,
18606: 859,
18607: 859,
18608: 859,
18609: 859,
18610: 859,
18611: 859,
18612: 859,
18613: 859,
18614: 859,
18615: 859,
18616: 859,
18617: 860,
18618: 860,
18619: 861,
18620: 862,
18621: 863,
18622: 864,
18623: 865,
18624: 866,
18625: 866,
18626: 866,
18627: 866,
18628: 866,
18629: 866,
18630: 866,
18631: 866,
18632: 866,
18633: 866,
18634: 866,
18635: 866,
18636: 866,
18637: 866,
18638: 866,
18639: 866,
18640: 866,
18641: 866,
18642: 866,
18643: 866,
18644: 866,
18645: 866,
18646: 866,
18647: 866,
18648: 866,
18649: 866,
18650: 866,
18651: 866,
18652: 866,
18653: 866,
18654: 866,
18655: 866,
18656: 867,
18657: 867,
18658: 867,
18659: 867,
18660: 867,
18661: 867,
18662: 867,
18663: 867,
18664: 868,
18665: 868,
18666: 868,
18667: 868,
18668: 868,
18669: 868,
18670: 868,
18671: 868,
18672: 868,
18673: 868,
18674: 868,
18675: 868,
18676: 868,
18677: 868,
18678: 868,
18679: 868,
18680: 869,
18681: 869,
18682: 870,
18683: 871,
18684: 871,
18685: 871,
18686: 872,
18687: 873,
18688: 873,
18689: 873,
18690: 873,
18691: 873,
18692: 873,
18693: 873,
18694: 873,
18695: 873,
18696: 873,
18697: 873,
18698: 873,
18699: 873,
18700: 873,
18701: 873,
18702: 873,
18703: 873,
18704: 873,
18705: 873,
18706: 873,
18707: 873,
18708: 873,
18709: 873,
18710: 873,
18711: 873,
18712: 873,
18713: 873,
18714: 873,
18715: 873,
18716: 873,
18717: 873,
18718: 873,
18719: 873,
18720: 873,
18721: 873,
18722: 873,
18723: 873,
18724: 873,
18725: 873,
18726: 873,
18727: 873,
18728: 873,
18729: 873,
18730: 873,
18731: 873,
18732: 873,
18733: 873,
18734: 873,
18735: 873,
18736: 873,
18737: 873,
18738: 873,
18739: 873,
18740: 873,
18741: 873,
18742: 873,
18743: 873,
18744: 873,
18745: 873,
18746: 873,
18747: 873,
18748: 873,
18749: 873,
18750: 873,
18751: 873,
18752: 873,
18753: 873,
18754: 873,
18755: 873,
18756: 873,
18757: 873,
18758: 873,
18759: 873,
18760: 873,
18761: 873,
18762: 873,
18763: 873,
18764: 873,
18765: 873,
18766: 873,
18767: 874,
18768: 874,
18769: 874,
18770: 874,
18771: 874,
18772: 874,
18773: 875,
18774: 875,
18775: 875,
18776: 875,
18777: 875,
18778: 875,
18779: 875,
18780: 875,
18781: 875,
18782: 875,
18783: 875,
18784: 875,
18785: 875,
18786: 875,
18787: 875,
18788: 875,
18789: 875,
18790: 875,
18791: 875,
18792: 875,
18793: 875,
18794: 875,
18795: 875,
18796: 875,
18797: 875,
18798: 875,
18799: 875,
18800: 875,
18801: 875,
18802: 875,
18803: 875,
18804: 875,
18805: 875,
18806: 875,
18807: 875,
18808: 875,
18809: 875,
18810: 875,
18811: 875,
18812: 875,
18813: 875,
18814: 875,
18815: 875,
18816: 875,
18817: 875,
18818: 875,
18819: 875,
18820: 875,
18821: 875,
18822: 875,
18823: 875,
18824: 875,
18825: 875,
18826: 875,
18827: 875,
18828: 875,
18829: 875,
18830: 875,
18831: 875,
18832: 875,
18833: 875,
18834: 875,
18835: 875,
18836: 875,
18837: 875,
18838: 875,
18839: 875,
18840: 875,
18841: 875,
18842: 875,
18843: 875,
18844: 875,
18845: 875,
18846: 875,
18847: 875,
18848: 875,
18849: 875,
18850: 875,
18851: 875,
18852: 875,
18853: 875,
18854: 875,
18855: 875,
18856: 875,
18857: 875,
18858: 875,
18859: 875,
18860: 875,
18861: 875,
18862: 875,
18863: 875,
18864: 875,
18865: 875,
18866: 875,
18867: 875,
18868: 875,
18869: 875,
18870: 875,
18871: 875,
18872: 875,
18873: 875,
18874: 875,
18875: 875,
18876: 875,
18877: 875,
18878: 875,
18879: 875,
18880: 875,
18881: 875,
18882: 875,
18883: 875,
18884: 875,
18885: 875,
18886: 875,
18887: 875,
18888: 875,
18889: 875,
18890: 875,
18891: 875,
18892: 875,
18893: 875,
18894: 875,
18895: 875,
18896: 875,
18897: 875,
18898: 875,
18899: 875,
18900: 875,
18901: 875,
18902: 875,
18903: 875,
18904: 875,
18905: 875,
18906: 875,
18907: 875,
18908: 875,
18909: 875,
18910: 875,
18911: 875,
18912: 875,
18913: 875,
18914: 875,
18915: 875,
18916: 875,
18917: 875,
18918: 875,
18919: 875,
18920: 875,
18921: 875,
18922: 875,
18923: 875,
18924: 875,
18925: 875,
18926: 875,
18927: 875,
18928: 875,
18929: 875,
18930: 875,
18931: 875,
18932: 875,
18933: 875,
18934: 875,
18935: 875,
18936: 875,
18937: 875,
18938: 875,
18939: 875,
18940: 875,
18941: 875,
18942: 875,
18943: 875,
18944: 875,
18945: 875,
18946: 875,
18947: 875,
18948: 875,
18949: 875,
18950: 875,
18951: 875,
18952: 875,
18953: 875,
18954: 875,
18955: 875,
18956: 875,
18957: 875,
18958: 875,
18959: 875,
18960: 875,
18961: 875,
18962: 875,
18963: 875,
18964: 875,
18965: 875,
18966: 875,
18967: 875,
18968: 875,
18969: 875,
18970: 875,
18971: 875,
18972: 875,
18973: 875,
18974: 875,
18975: 875,
18976: 875,
18977: 875,
18978: 875,
18979: 875,
18980: 875,
18981: 875,
18982: 875,
18983: 875,
18984: 875,
18985: 875,
18986: 875,
18987: 875,
18988: 875,
18989: 875,
18990: 875,
18991: 875,
18992: 875,
18993: 875,
18994: 875,
18995: 875,
18996: 875,
18997: 875,
18998: 875,
18999: 875,
19000: 875,
19001: 875,
19002: 875,
19003: 875,
19004: 875,
19005: 875,
19006: 875,
19007: 875,
19008: 875,
19009: 875,
19010: 875,
19011: 875,
19012: 875,
19013: 875,
19014: 875,
19015: 875,
19016: 875,
19017: 875,
19018: 875,
19019: 875,
19020: 875,
19021: 875,
19022: 875,
19023: 875,
19024: 875,
19025: 875,
19026: 875,
19027: 875,
19028: 875,
19029: 875,
19030: 875,
19031: 875,
19032: 875,
19033: 875,
19034: 875,
19035: 875,
19036: 875,
19037: 875,
19038: 875,
19039: 875,
19040: 875,
19041: 875,
19042: 875,
19043: 875,
19044: 875,
19045: 875,
19046: 875,
19047: 875,
19048: 875,
19049: 875,
19050: 875,
19051: 875,
19052: 875,
19053: 875,
19054: 875,
19055: 875,
19056: 875,
19057: 875,
19058: 875,
19059: 875,
19060: 875,
19061: 875,
19062: 875,
19063: 875,
19064: 875,
19065: 875,
19066: 875,
19067: 875,
19068: 875,
19069: 875,
19070: 875,
19071: 875,
19072: 875,
19073: 875,
19074: 875,
19075: 875,
19076: 875,
19077: 875,
19078: 875,
19079: 875,
19080: 875,
19081: 875,
19082: 875,
19083: 875,
19084: 875,
19085: 875,
19086: 875,
19087: 875,
19088: 875,
19089: 875,
19090: 875,
19091: 875,
19092: 875,
19093: 875,
19094: 875,
19095: 875,
19096: 875,
19097: 876,
19098: 877,
19099: 877,
19100: 877,
19101: 877,
19102: 877,
19103: 877,
19104: 877,
19105: 877,
19106: 877,
19107: 877,
19108: 877,
19109: 877,
19110: 877,
19111: 877,
19112: 877,
19113: 877,
19114: 877,
19115: 877,
19116: 877,
19117: 877,
19118: 877,
19119: 877,
19120: 877,
19121: 877,
19122: 877,
19123: 877,
19124: 877,
19125: 877,
19126: 877,
19127: 877,
19128: 877,
19129: 877,
19130: 877,
19131: 877,
19132: 877,
19133: 877,
19134: 877,
19135: 877,
19136: 877,
19137: 877,
19138: 877,
19139: 877,
19140: 877,
19141: 877,
19142: 877,
19143: 877,
19144: 877,
19145: 877,
19146: 877,
19147: 877,
19148: 877,
19149: 877,
19150: 877,
19151: 877,
19152: 877,
19153: 877,
19154: 877,
19155: 877,
19156: 877,
19157: 877,
19158: 877,
19159: 877,
19160: 877,
19161: 877,
19162: 877,
19163: 877,
19164: 877,
19165: 877,
19166: 877,
19167: 877,
19168: 877,
19169: 877,
19170: 877,
19171: 877,
19172: 877,
19173: 877,
19174: 877,
19175: 877,
19176: 877,
19177: 877,
19178: 878,
19179: 878,
19180: 878,
19181: 878,
19182: 878,
19183: 878,
19184: 879,
19185: 879,
19186: 879,
19187: 879,
19188: 879,
19189: 879,
19190: 879,
19191: 879,
19192: 879,
19193: 879,
19194: 879,
19195: 879,
19196: 879,
19197: 879,
19198: 879,
19199: 879,
19200: 879,
19201: 879,
19202: 879,
19203: 879,
19204: 879,
19205: 879,
19206: 879,
19207: 879,
19208: 879,
19209: 879,
19210: 879,
19211: 879,
19212: 879,
19213: 879,
19214: 879,
19215: 879,
19216: 879,
19217: 879,
19218: 879,
19219: 879,
19220: 879,
19221: 879,
19222: 879,
19223: 879,
19224: 879,
19225: 879,
19226: 879,
19227: 879,
19228: 879,
19229: 879,
19230: 879,
19231: 879,
19232: 879,
19233: 879,
19234: 879,
19235: 879,
19236: 879,
19237: 879,
19238: 879,
19239: 879,
19240: 879,
19241: 879,
19242: 879,
19243: 879,
19244: 879,
19245: 879,
19246: 879,
19247: 879,
19248: 879,
19249: 879,
19250: 879,
19251: 879,
19252: 879,
19253: 879,
19254: 879,
19255: 879,
19256: 879,
19257: 879,
19258: 879,
19259: 879,
19260: 879,
19261: 879,
19262: 879,
19263: 879,
19264: 879,
19265: 879,
19266: 879,
19267: 879,
19268: 879,
19269: 879,
19270: 879,
19271: 879,
19272: 879,
19273: 879,
19274: 879,
19275: 879,
19276: 879,
19277: 879,
19278: 879,
19279: 879,
19280: 879,
19281: 879,
19282: 879,
19283: 879,
19284: 879,
19285: 879,
19286: 879,
19287: 879,
19288: 879,
19289: 879,
19290: 879,
19291: 879,
19292: 879,
19293: 879,
19294: 879,
19295: 879,
19296: 879,
19297: 879,
19298: 879,
19299: 879,
19300: 879,
19301: 879,
19302: 879,
19303: 879,
19304: 879,
19305: 879,
19306: 879,
19307: 879,
19308: 879,
19309: 879,
19310: 879,
19311: 879,
19312: 879,
19313: 879,
19314: 879,
19315: 879,
19316: 879,
19317: 879,
19318: 879,
19319: 879,
19320: 879,
19321: 879,
19322: 879,
19323: 879,
19324: 879,
19325: 879,
19326: 879,
19327: 879,
19328: 879,
19329: 879,
19330: 879,
19331: 879,
19332: 879,
19333: 879,
19334: 879,
19335: 879,
19336: 879,
19337: 879,
19338: 879,
19339: 879,
19340: 879,
19341: 879,
19342: 879,
19343: 879,
19344: 879,
19345: 879,
19346: 879,
19347: 879,
19348: 879,
19349: 879,
19350: 879,
19351: 879,
19352: 879,
19353: 879,
19354: 879,
19355: 879,
19356: 879,
19357: 879,
19358: 879,
19359: 879,
19360: 879,
19361: 879,
19362: 879,
19363: 879,
19364: 879,
19365: 879,
19366: 879,
19367: 879,
19368: 879,
19369: 879,
19370: 879,
19371: 879,
19372: 879,
19373: 879,
19374: 879,
19375: 879,
19376: 879,
19377: 879,
19378: 879,
19379: 879,
19380: 879,
19381: 879,
19382: 879,
19383: 879,
19384: 879,
19385: 879,
19386: 879,
19387: 879,
19388: 879,
19389: 879,
19390: 879,
19391: 879,
19392: 879,
19393: 879,
19394: 879,
19395: 879,
19396: 879,
19397: 879,
19398: 879,
19399: 879,
19400: 879,
19401: 879,
19402: 879,
19403: 879,
19404: 879,
19405: 879,
19406: 879,
19407: 879,
19408: 879,
19409: 879,
19410: 879,
19411: 879,
19412: 879,
19413: 879,
19414: 879,
19415: 879,
19416: 879,
19417: 879,
19418: 879,
19419: 879,
19420: 879,
19421: 879,
19422: 879,
19423: 879,
19424: 879,
19425: 879,
19426: 879,
19427: 879,
19428: 879,
19429: 879,
19430: 879,
19431: 879,
19432: 879,
19433: 879,
19434: 879,
19435: 879,
19436: 879,
19437: 879,
19438: 879,
19439: 879,
19440: 879,
19441: 879,
19442: 879,
19443: 879,
19444: 879,
19445: 879,
19446: 879,
19447: 879,
19448: 879,
19449: 879,
19450: 879,
19451: 879,
19452: 879,
19453: 879,
19454: 879,
19455: 879,
19456: 879,
19457: 879,
19458: 879,
19459: 879,
19460: 879,
19461: 879,
19462: 879,
19463: 879,
19464: 879,
19465: 879,
19466: 879,
19467: 879,
19468: 879,
19469: 879,
19470: 879,
19471: 879,
19472: 879,
19473: 879,
19474: 879,
19475: 879,
19476: 879,
19477: 879,
19478: 879,
19479: 879,
19480: 879,
19481: 879,
19482: 879,
19483: 879,
19484: 879,
19485: 879,
19486: 879,
19487: 879,
19488: 879,
19489: 879,
19490: 879,
19491: 879,
19492: 879,
19493: 879,
19494: 879,
19495: 879,
19496: 879,
19497: 879,
19498: 879,
19499: 879,
19500: 879,
19501: 879,
19502: 879,
19503: 879,
19504: 879,
19505: 879,
19506: 879,
19507: 879,
19508: 880,
19509: 881,
19510: 881,
19511: 881,
19512: 881,
19513: 881,
19514: 881,
19515: 881,
19516: 881,
19517: 881,
19518: 881,
19519: 881,
19520: 881,
19521: 881,
19522: 881,
19523: 881,
19524: 881,
19525: 881,
19526: 881,
19527: 881,
19528: 881,
19529: 881,
19530: 881,
19531: 881,
19532: 881,
19533: 881,
19534: 881,
19535: 881,
19536: 881,
19537: 881,
19538: 881,
19539: 881,
19540: 881,
19541: 881,
19542: 881,
19543: 881,
19544: 881,
19545: 881,
19546: 881,
19547: 881,
19548: 881,
19549: 881,
19550: 881,
19551: 881,
19552: 881,
19553: 881,
19554: 881,
19555: 881,
19556: 881,
19557: 881,
19558: 881,
19559: 881,
19560: 881,
19561: 881,
19562: 881,
19563: 881,
19564: 881,
19565: 881,
19566: 881,
19567: 881,
19568: 881,
19569: 881,
19570: 881,
19571: 881,
19572: 881,
19573: 881,
19574: 881,
19575: 881,
19576: 881,
19577: 881,
19578: 881,
19579: 881,
19580: 881,
19581: 881,
19582: 881,
19583: 881,
19584: 881,
19585: 881,
19586: 881,
19587: 881,
19588: 881,
19589: 882,
19590: 882,
19591: 882,
19592: 882,
19593: 882,
19594: 882,
19595: 883,
19596: 883,
19597: 883,
19598: 883,
19599: 883,
19600: 883,
19601: 883,
19602: 883,
19603: 883,
19604: 883,
19605: 883,
19606: 883,
19607: 883,
19608: 883,
19609: 883,
19610: 883,
19611: 883,
19612: 883,
19613: 883,
19614: 883,
19615: 883,
19616: 883,
19617: 883,
19618: 883,
19619: 883,
19620: 883,
19621: 883,
19622: 883,
19623: 883,
19624: 883,
19625: 883,
19626: 883,
19627: 883,
19628: 883,
19629: 883,
19630: 883,
19631: 883,
19632: 883,
19633: 883,
19634: 883,
19635: 883,
19636: 883,
19637: 883,
19638: 883,
19639: 883,
19640: 883,
19641: 883,
19642: 883,
19643: 883,
19644: 883,
19645: 883,
19646: 883,
19647: 883,
19648: 883,
19649: 883,
19650: 883,
19651: 883,
19652: 883,
19653: 883,
19654: 883,
19655: 883,
19656: 883,
19657: 883,
19658: 883,
19659: 883,
19660: 883,
19661: 883,
19662: 883,
19663: 883,
19664: 883,
19665: 883,
19666: 883,
19667: 883,
19668: 883,
19669: 883,
19670: 883,
19671: 883,
19672: 883,
19673: 883,
19674: 883,
19675: 883,
19676: 883,
19677: 883,
19678: 883,
19679: 883,
19680: 883,
19681: 883,
19682: 883,
19683: 883,
19684: 883,
19685: 883,
19686: 883,
19687: 883,
19688: 883,
19689: 883,
19690: 883,
19691: 883,
19692: 883,
19693: 883,
19694: 883,
19695: 883,
19696: 883,
19697: 883,
19698: 883,
19699: 883,
19700: 883,
19701: 883,
19702: 883,
19703: 883,
19704: 883,
19705: 883,
19706: 883,
19707: 883,
19708: 883,
19709: 883,
19710: 883,
19711: 883,
19712: 883,
19713: 883,
19714: 883,
19715: 883,
19716: 883,
19717: 883,
19718: 883,
19719: 883,
19720: 883,
19721: 883,
19722: 883,
19723: 883,
19724: 883,
19725: 883,
19726: 883,
19727: 883,
19728: 883,
19729: 883,
19730: 883,
19731: 883,
19732: 883,
19733: 883,
19734: 883,
19735: 883,
19736: 883,
19737: 883,
19738: 883,
19739: 883,
19740: 883,
19741: 883,
19742: 883,
19743: 883,
19744: 883,
19745: 883,
19746: 883,
19747: 883,
19748: 883,
19749: 883,
19750: 883,
19751: 883,
19752: 883,
19753: 883,
19754: 883,
19755: 883,
19756: 883,
19757: 883,
19758: 883,
19759: 883,
19760: 883,
19761: 883,
19762: 883,
19763: 883,
19764: 883,
19765: 883,
19766: 883,
19767: 883,
19768: 883,
19769: 883,
19770: 883,
19771: 883,
19772: 883,
19773: 883,
19774: 883,
19775: 883,
19776: 883,
19777: 883,
19778: 883,
19779: 883,
19780: 883,
19781: 883,
19782: 883,
19783: 883,
19784: 883,
19785: 883,
19786: 883,
19787: 883,
19788: 883,
19789: 883,
19790: 883,
19791: 883,
19792: 883,
19793: 883,
19794: 883,
19795: 883,
19796: 883,
19797: 883,
19798: 883,
19799: 883,
19800: 883,
19801: 883,
19802: 883,
19803: 883,
19804: 883,
19805: 883,
19806: 883,
19807: 883,
19808: 883,
19809: 883,
19810: 883,
19811: 883,
19812: 883,
19813: 883,
19814: 883,
19815: 883,
19816: 883,
19817: 883,
19818: 883,
19819: 883,
19820: 883,
19821: 883,
19822: 883,
19823: 883,
19824: 883,
19825: 883,
19826: 883,
19827: 883,
19828: 883,
19829: 883,
19830: 883,
19831: 883,
19832: 883,
19833: 883,
19834: 883,
19835: 883,
19836: 883,
19837: 883,
19838: 883,
19839: 883,
19840: 883,
19841: 883,
19842: 883,
19843: 883,
19844: 883,
19845: 883,
19846: 883,
19847: 883,
19848: 883,
19849: 883,
19850: 883,
19851: 883,
19852: 883,
19853: 883,
19854: 883,
19855: 883,
19856: 883,
19857: 883,
19858: 883,
19859: 883,
19860: 883,
19861: 883,
19862: 883,
19863: 883,
19864: 883,
19865: 883,
19866: 883,
19867: 883,
19868: 883,
19869: 883,
19870: 883,
19871: 883,
19872: 883,
19873: 883,
19874: 883,
19875: 883,
19876: 883,
19877: 883,
19878: 883,
19879: 883,
19880: 883,
19881: 883,
19882: 883,
19883: 883,
19884: 883,
19885: 883,
19886: 883,
19887: 883,
19888: 883,
19889: 883,
19890: 883,
19891: 883,
19892: 883,
19893: 883,
19894: 883,
19895: 883,
19896: 883,
19897: 883,
19898: 883,
19899: 883,
19900: 883,
19901: 883,
19902: 883,
19903: 883,
19904: 883,
19905: 883,
19906: 883,
19907: 883,
19908: 883,
19909: 883,
19910: 883,
19911: 883,
19912: 883,
19913: 883,
19914: 883,
19915: 883,
19916: 883,
19917: 883,
19918: 883,
19919: 884,
19920: 885,
19921: 885,
19922: 885,
19923: 885,
19924: 885,
19925: 885,
19926: 885,
19927: 885,
19928: 885,
19929: 885,
19930: 885,
19931: 885,
19932: 885,
19933: 885,
19934: 885,
19935: 885,
19936: 885,
19937: 885,
19938: 885,
19939: 885,
19940: 885,
19941: 885,
19942: 885,
19943: 885,
19944: 885,
19945: 885,
19946: 885,
19947: 885,
19948: 885,
19949: 885,
19950: 885,
19951: 885,
19952: 885,
19953: 885,
19954: 885,
19955: 885,
19956: 885,
19957: 885,
19958: 885,
19959: 885,
19960: 885,
19961: 885,
19962: 885,
19963: 885,
19964: 885,
19965: 885,
19966: 885,
19967: 885,
19968: 885,
19969: 885,
19970: 885,
19971: 885,
19972: 885,
19973: 885,
19974: 885,
19975: 885,
19976: 885,
19977: 885,
19978: 885,
19979: 885,
19980: 885,
19981: 885,
19982: 885,
19983: 885,
19984: 885,
19985: 885,
19986: 885,
19987: 885,
19988: 885,
19989: 885,
19990: 885,
19991: 885,
19992: 885,
19993: 885,
19994: 885,
19995: 885,
19996: 885,
19997: 885,
19998: 885,
19999: 885,
20000: 886,
20001: 886,
20002: 886,
20003: 886,
20004: 886,
20005: 886,
20006: 887,
20007: 887,
20008: 887,
20009: 887,
20010: 887,
20011: 887,
20012: 887,
20013: 887,
20014: 887,
20015: 887,
20016: 887,
20017: 887,
20018: 887,
20019: 887,
20020: 887,
20021: 887,
20022: 887,
20023: 887,
20024: 887,
20025: 887,
20026: 887,
20027: 887,
20028: 887,
20029: 887,
20030: 887,
20031: 887,
20032: 887,
20033: 887,
20034: 887,
20035: 887,
20036: 887,
20037: 887,
20038: 887,
20039: 887,
20040: 887,
20041: 887,
20042: 887,
20043: 887,
20044: 887,
20045: 887,
20046: 887,
20047: 887,
20048: 887,
20049: 887,
20050: 887,
20051: 887,
20052: 887,
20053: 887,
20054: 887,
20055: 887,
20056: 887,
20057: 887,
20058: 887,
20059: 887,
20060: 887,
20061: 887,
20062: 887,
20063: 887,
20064: 887,
20065: 887,
20066: 887,
20067: 887,
20068: 887,
20069: 887,
20070: 887,
20071: 887,
20072: 887,
20073: 887,
20074: 887,
20075: 887,
20076: 887,
20077: 887,
20078: 887,
20079: 887,
20080: 887,
20081: 887,
20082: 887,
20083: 887,
20084: 887,
20085: 887,
20086: 887,
20087: 887,
20088: 887,
20089: 887,
20090: 887,
20091: 887,
20092: 887,
20093: 887,
20094: 887,
20095: 887,
20096: 887,
20097: 887,
20098: 887,
20099: 887,
20100: 887,
20101: 887,
20102: 887,
20103: 887,
20104: 887,
20105: 887,
20106: 887,
20107: 887,
20108: 887,
20109: 887,
20110: 887,
20111: 887,
20112: 887,
20113: 887,
20114: 887,
20115: 887,
20116: 887,
20117: 887,
20118: 887,
20119: 887,
20120: 887,
20121: 887,
20122: 887,
20123: 887,
20124: 887,
20125: 887,
20126: 887,
20127: 887,
20128: 887,
20129: 887,
20130: 887,
20131: 887,
20132: 887,
20133: 887,
20134: 887,
20135: 887,
20136: 887,
20137: 887,
20138: 887,
20139: 887,
20140: 887,
20141: 887,
20142: 887,
20143: 887,
20144: 887,
20145: 887,
20146: 887,
20147: 887,
20148: 887,
20149: 887,
20150: 887,
20151: 887,
20152: 887,
20153: 887,
20154: 887,
20155: 887,
20156: 887,
20157: 887,
20158: 887,
20159: 887,
20160: 887,
20161: 887,
20162: 887,
20163: 887,
20164: 887,
20165: 887,
20166: 887,
20167: 887,
20168: 887,
20169: 887,
20170: 887,
20171: 887,
20172: 887,
20173: 887,
20174: 887,
20175: 887,
20176: 887,
20177: 887,
20178: 887,
20179: 887,
20180: 887,
20181: 887,
20182: 887,
20183: 887,
20184: 887,
20185: 887,
20186: 887,
20187: 887,
20188: 887,
20189: 887,
20190: 887,
20191: 887,
20192: 887,
20193: 887,
20194: 887,
20195: 887,
20196: 887,
20197: 887,
20198: 887,
20199: 887,
20200: 887,
20201: 887,
20202: 887,
20203: 887,
20204: 887,
20205: 887,
20206: 887,
20207: 887,
20208: 887,
20209: 887,
20210: 887,
20211: 887,
20212: 887,
20213: 887,
20214: 887,
20215: 887,
20216: 887,
20217: 887,
20218: 887,
20219: 887,
20220: 887,
20221: 887,
20222: 887,
20223: 887,
20224: 887,
20225: 887,
20226: 887,
20227: 887,
20228: 887,
20229: 887,
20230: 887,
20231: 887,
20232: 887,
20233: 887,
20234: 887,
20235: 887,
20236: 887,
20237: 887,
20238: 887,
20239: 887,
20240: 887,
20241: 887,
20242: 887,
20243: 887,
20244: 887,
20245: 887,
20246: 887,
20247: 887,
20248: 887,
20249: 887,
20250: 887,
20251: 887,
20252: 887,
20253: 887,
20254: 887,
20255: 887,
20256: 887,
20257: 887,
20258: 887,
20259: 887,
20260: 887,
20261: 887,
20262: 887,
20263: 887,
20264: 887,
20265: 887,
20266: 887,
20267: 887,
20268: 887,
20269: 887,
20270: 887,
20271: 887,
20272: 887,
20273: 887,
20274: 887,
20275: 887,
20276: 887,
20277: 887,
20278: 887,
20279: 887,
20280: 887,
20281: 887,
20282: 887,
20283: 887,
20284: 887,
20285: 887,
20286: 887,
20287: 887,
20288: 887,
20289: 887,
20290: 887,
20291: 887,
20292: 887,
20293: 887,
20294: 887,
20295: 887,
20296: 887,
20297: 887,
20298: 887,
20299: 887,
20300: 887,
20301: 887,
20302: 887,
20303: 887,
20304: 887,
20305: 887,
20306: 887,
20307: 887,
20308: 887,
20309: 887,
20310: 887,
20311: 887,
20312: 887,
20313: 887,
20314: 887,
20315: 887,
20316: 887,
20317: 887,
20318: 887,
20319: 887,
20320: 887,
20321: 887,
20322: 887,
20323: 887,
20324: 887,
20325: 887,
20326: 887,
20327: 887,
20328: 887,
20329: 887,
20330: 888,
20331: 889,
20332: 890,
20333: 891,
20334: 891,
20335: 891,
20336: 892,
20337: 893,
20338: 894,
20339: 895,
20340: 896,
20341: 897,
} | data/block/block.go | 0.550124 | 0.453746 | block.go | starcoder |
package aggregator
import (
"fmt"
"github.com/Nextdoor/pg-bifrost.git/stats"
"math"
)
// aggregate type which keeps a unique Stat's metadata, a running count of it's value
// and calculated statistics.
type aggregate struct {
// What we aggregate on as a unique Stat.
component string // module from which the message is sent (e.g., filter)
statType stats.StatType // (e.g., count, timeLength)
statName string // what Stat is being reported (e.g., filtered_count)
unit string // (e.g., count, milliseconds)
// Running Statistics
value int64 // total of individual values received to form this aggregate
count int64 // number of Stat times received to form this aggregate
min int64
max int64
avg float64
// Metadata
timestamp int64 // timestamp in nanoseconds since epoch of when the aggregation occurred
}
// newAggregate returns an aggregate with certain initializations such as min and max.
func newAggregate(s stats.Stat, t int64) aggregate {
return aggregate{
component: s.Component,
statType: s.StatType,
statName: s.StatName,
unit: s.Unit,
min: math.MaxInt64,
max: math.MinInt64,
timestamp: t,
}
}
// createStat is a helper function to create a new stat based on this aggregate with a specific
// name and value.
func (a *aggregate) createStat(name string, value int64) stats.Stat {
return stats.Stat{
StatType: a.statType,
Component: a.component,
StatName: name,
Unit: a.unit,
Value: value,
Timestamp: a.timestamp}
}
// toStats turns an aggregate to a slice of stats that can be directly reported on.
// For stats which occur over a period of time, an aggregate is multiplexed into multiple stats,
// namespaced by statName.
func (a *aggregate) toStats() []stats.Stat {
sts := []stats.Stat{}
sts = append(sts, stats.Stat{
StatType: a.statType,
Component: a.component,
StatName: a.statName,
Unit: a.unit,
Value: a.value,
Timestamp: a.timestamp})
switch t := a.statType; t {
case stats.Count:
// Do nothing special.
case stats.Histogram:
sts = append(sts, a.createStat(fmt.Sprintf("%s_avg", a.statName), int64(a.avg)))
sts = append(sts, a.createStat(fmt.Sprintf("%s_max", a.statName), int64(a.max)))
sts = append(sts, a.createStat(fmt.Sprintf("%s_min", a.statName), int64(a.min)))
default:
panic("unrecognized statType")
}
return sts
}
// update function updates a running aggregate based on the type of Stat it is.
func (a *aggregate) update(s stats.Stat) {
a.value += s.Value
a.count += 1
switch t := a.statType; t {
case stats.Count:
// Do nothing special.
case stats.Histogram:
if s.Value < a.min {
a.min = s.Value
}
if s.Value > a.max {
a.max = s.Value
}
a.avg = float64(a.value) / float64(a.count)
default:
panic("unrecognized statType")
}
} | stats/aggregator/aggregate.go | 0.741674 | 0.4436 | aggregate.go | starcoder |
package goTernaryTree
import (
"errors"
"strings"
)
// Item represents a single object in the Node.
type Item interface{}
// Node represents a single object in the tree.
type Node struct {
c uint8
left, mid, right *Node
value Item
}
//Ternary Tree
type TernaryTree struct {
size int
root *Node
}
//Creates new instance of TernaryTree
func New() *TernaryTree {
return &TernaryTree{size: 0}
}
//Adds new key to the tree.
func (t *TernaryTree) Add(key string, value Item) {
if len(strings.TrimSpace(key)) > 1 {
if !t.contains(key) {
t.size++
t.root = insert(t.root, key, value, 0)
}
}
}
//Searches if tree contains key.
func (t *TernaryTree) contains(key string) bool {
node := search(t.root, key, 0)
if node == nil {
return false
}
return true
}
//Gets saved key from the tree.
func (t *TernaryTree) Get(key string) (Item, error) {
if len(strings.TrimSpace(key)) < 1 {
return nil, nil
}
node := search(t.root, key, 0)
if node == nil {
return nil, errors.New("Key not found.")
}
return node.value, nil
}
//Searches tree for keys with common prefix.
func (t *TernaryTree) PrefixMatch(prefix string) []Item {
if t.root == nil {
return nil
}
bucket := []Item{}
node := search(t.root, prefix, 0)
if node == nil {
return nil
}
if node.value != nil {
bucket = append(bucket, prefix)
}
collect(node.mid, prefix, &bucket)
return bucket
}
//Searches tree with a wild card to match keys.
func (t *TernaryTree) WildcardMatch(pattern string) []Item {
if t.root == nil {
return nil
}
bucket := []Item{}
collect2(t.root, "", 0, pattern, &bucket)
return bucket
}
func search(node *Node, key string, charIndex int) *Node {
if node == nil {
return nil
}
c := key[charIndex]
if c < node.c {
return search(node.left, key, charIndex)
} else if c > node.c {
return search(node.right, key, charIndex)
} else if charIndex < len(key)-1 {
return search(node.mid, key, charIndex+1)
} else {
return node
}
}
func insert(node *Node, key string, value Item, charIndex int) *Node {
ci := key[charIndex]
if node == nil {
node = &Node{c: ci}
}
if ci < node.c {
node.left = insert(node.left, key, value, charIndex)
} else if ci > node.c {
node.right = insert(node.right, key, value, charIndex)
} else if charIndex < len(key)-1 {
node.mid = insert(node.mid, key, value, charIndex+1)
} else {
node.value = value
}
return node
}
func collect(node *Node, prefix string, bucket *[]Item) {
if node == nil {
return
}
collect(node.left, prefix, bucket)
if node.value != nil {
*bucket = append(*bucket, prefix+string(node.c))
}
collect(node.mid, prefix+string(node.c), bucket)
collect(node.right, prefix, bucket)
}
func collect2(node *Node, prefix string, charIndex int, pattern string, bucket *[]Item) {
if node == nil {
return
}
ci := pattern[charIndex]
if ci == '.' || ci < node.c {
collect2(node.left, prefix, charIndex, pattern, bucket)
}
if ci == '.' || ci == node.c {
if charIndex == len(pattern)-1 && node.value != nil {
*bucket = append(*bucket, prefix+string(node.c))
}
if charIndex < len(pattern)-1 {
collect2(node.mid, prefix+string(node.c), charIndex+1, pattern, bucket)
}
}
if ci == '.' || ci > node.c {
collect2(node.right, prefix, charIndex, pattern, bucket)
}
} | ternaryTree.go | 0.767167 | 0.424472 | ternaryTree.go | starcoder |
package core
import (
"fmt"
"sort"
"strings"
)
type IndexElem interface {
Less(than IndexElem) bool
}
type Index interface {
Get(IndexElem) IndexElem
Put(IndexElem) bool
Remove(IndexElem) bool
}
type BTreeIndex struct {
root *bTreeNode
t uint
}
type bTreeNode struct {
elems []IndexElem
children []*bTreeNode
}
func NewBTreeIndex(t uint) *BTreeIndex {
if t == 0 {
panic("t must be not equal 0")
}
return &BTreeIndex{nil, t}
}
// Returns first index where element is less than the value at the index.
// If no such index is found, return len(n.elems).
func (n *bTreeNode) find(e IndexElem) uint {
i := sort.Search(len(n.elems), func(i int) bool {
return e.Less(n.elems[i])
})
if i < 0 {
panic(fmt.Sprintf("i cannot be < 0, got %d", i))
}
return uint(i)
}
func indexElemsEqual(a IndexElem, b IndexElem) bool {
return !a.Less(b) && !b.Less(a)
}
func (n *bTreeNode) get(e IndexElem) IndexElem {
i := n.find(e)
if i > 0 && indexElemsEqual(n.elems[i-1], e) {
return n.elems[i-1]
}
if n.children == nil {
// leaf node
return nil
}
return n.children[i].get(e)
}
type bTreeSplitResult struct {
mElem IndexElem
lNode *bTreeNode
rNode *bTreeNode
}
type bTreeSplitBias int
const (
bTreeLeftBias = bTreeSplitBias(1)
bTreeRightBias = bTreeSplitBias(0)
)
type bTreeRemoveResult int
const (
bTreeRemoveMissing = bTreeRemoveResult(0)
bTreeRemoveSuccess = bTreeRemoveResult(1)
bTreeRemoveRotate = bTreeRemoveResult(2)
)
func (n *bTreeNode) split(t uint, bias bTreeSplitBias) *bTreeSplitResult {
var lChildren, rChildren []*bTreeNode
if n.children == nil {
lChildren = nil
rChildren = nil
} else {
lChildren = n.children[:t]
rChildren = n.children[t:]
}
return &bTreeSplitResult{
mElem: n.elems[t-1],
lNode: &bTreeNode{
elems: n.elems[:t-1],
children: lChildren,
},
rNode: &bTreeNode{
elems: n.elems[t:],
children: rChildren,
},
}
}
func (n *bTreeNode) insertElemAt(e IndexElem, i uint) {
newElems := make([]IndexElem, len(n.elems)+1)
copy(newElems[:i], n.elems[:i])
copy(newElems[i+1:], n.elems[i:])
newElems[i] = e
n.elems = newElems
}
func (n *bTreeNode) insertChildrenAt(lNode *bTreeNode, rNode *bTreeNode, i uint) {
newChildren := make([]*bTreeNode, len(n.children)+1)
copy(newChildren[:i], n.children[:i])
copy(newChildren[i+2:], n.children[i+1:])
newChildren[i] = lNode
newChildren[i+1] = rNode
n.children = newChildren
}
func (n *bTreeNode) removeElemAt(i uint) {
newElems := make([]IndexElem, len(n.elems)-1)
copy(newElems[:i], n.elems[:i])
copy(newElems[i:], n.elems[i+1:])
n.elems = newElems
}
func (n *bTreeNode) put(e IndexElem, t uint) (*bTreeSplitResult, bool) {
i := n.find(e)
if i > 0 && indexElemsEqual(n.elems[i-1], e) {
return nil, false
}
var added bool
if n.children == nil {
// leaf node
n.insertElemAt(e, i)
added = true
} else {
var splitRes *bTreeSplitResult
splitRes, added = n.children[i].put(e, t)
if splitRes != nil {
n.insertElemAt(splitRes.mElem, i)
n.insertChildrenAt(splitRes.lNode, splitRes.rNode, i)
}
}
if uint(len(n.elems)) == 2*t {
// make sure that the node that was in the middle is the one promoted up
var bias bTreeSplitBias
if i < t {
bias = bTreeLeftBias
} else {
bias = bTreeRightBias
}
return n.split(t, bias), added
}
return nil, added
}
func (n *bTreeNode) remove(e IndexElem, t uint) bTreeRemoveResult {
i := n.find(e)
nKeys := uint(len(n.elems))
if i > 0 && indexElemsEqual(n.elems[i-1], e) {
if n.children == nil {
// leaf node
n.removeElemAt(i - 1)
if nKeys >= t {
return bTreeRemoveSuccess
} else {
return bTreeRemoveRotate
}
} else {
// branch node
}
}
if n.children == nil {
// leaf node and we didn't find the value
return bTreeRemoveMissing
}
res := n.children[i].remove(e, t)
if res == bTreeRemoveRotate {
if i == nKeys {
// borrow left
} else {
// borrow right
}
// rotate
return bTreeRemoveSuccess
}
return res
}
func (n *bTreeNode) traverseInOrder(depth uint, f func(IndexElem, uint)) {
for i := 0; i < len(n.elems)+1; i++ {
if n.children != nil {
n.children[i].traverseInOrder(depth+1, f)
}
if i < len(n.elems) {
f(n.elems[i], depth)
}
}
}
func (i *BTreeIndex) Get(e IndexElem) IndexElem {
if i.root == nil {
return nil
}
return i.root.get(e)
}
func (i *BTreeIndex) Put(e IndexElem) bool {
if i.root == nil {
i.root = &bTreeNode{elems: []IndexElem{e}, children: nil}
return true
}
splitRes, added := i.root.put(e, i.t)
if splitRes != nil {
i.root = &bTreeNode{
elems: []IndexElem{splitRes.mElem},
children: []*bTreeNode{splitRes.lNode, splitRes.rNode},
}
}
return added
}
func (i *BTreeIndex) Remove(e IndexElem) bool {
if i.root == nil {
return false
}
return i.root.remove(e, i.t) != bTreeRemoveMissing
}
func (i *BTreeIndex) TraverseInOrder(f func(IndexElem, uint)) {
if i.root == nil {
return
}
i.root.traverseInOrder(uint(0), f)
}
func (i *BTreeIndex) PrintInOrder() {
i.TraverseInOrder(func(e IndexElem, depth uint) {
fmt.Printf("%s%v\n", strings.Repeat("\t", int(depth)), e)
})
} | core/index.go | 0.619126 | 0.437463 | index.go | starcoder |
// Using the template, declare a set of concrete types that implement the set
// of predefined interface types. Then create values of these types and use
// them to complete a set of predefined tasks.
package main
import "fmt"
// administrator represents a person or other entity capable of administering
// hardware and software infrastructure.
type administrator interface {
administrate(system string)
}
// developer represents a person or other entity capable of writing software.
type developer interface {
develop(system string)
}
// =============================================================================
// adminlist represents a group of administrators.
type adminlist struct {
list []administrator
}
// Enqueue adds an administrator to the adminlist.
func (l *adminlist) Enqueue(a administrator) {
l.list = append(l.list, a)
}
// Dequeue removes an administrator from the adminlist.
func (l *adminlist) Dequeue() administrator {
a := l.list[0]
l.list = l.list[1:]
return a
}
// =============================================================================
// devlist represents a group of developers.
type devlist struct {
list []developer
}
// Enqueue adds a developer to the devlist.
func (l *devlist) Enqueue(d developer) {
l.list = append(l.list, d)
}
// Dequeue removes a developer from the devlist.
func (l *devlist) Dequeue() developer {
d := l.list[0]
l.list = l.list[1:]
return d
}
// =============================================================================
// Declare a concrete type named sysadmin with a name field of type string.
type sysadmin struct {
name string
}
// Declare a method named administrate for the sysadmin type, implementing the
// administrator interface. administrate should print out the name of the
// sysadmin, as well as the system they are administering.
func (s *sysadmin) administrate(system string) {
fmt.Printf("%s is administrating %s\n", s.name, system)
}
// Declare a concrete type named programmer with a name field of type string.
type programmer struct {
name string
}
// Declare a method named develop for the programmer type, implementing the
// developer interface. develop should print out the name of the
// programmer, as well as the system they are coding.
func (p *programmer) develop(system string) {
fmt.Printf("%s is developing %s\n", p.name, system)
}
// Declare a concrete type named company. Declare it as the composition of
// the administrator and developer interface types.
type company struct {
administrator
developer
}
// =============================================================================
func main() {
// Create a variable named admins of type adminlist.
var admins adminlist
// Create a variable named devs of type devlist.
var devs devlist
// Enqueue a new sysadmin onto admins.
admins.Enqueue(&sysadmin{"John"})
// Enqueue two new programmers onto devs.
devs.Enqueue(&programmer{"Alice"})
devs.Enqueue(&programmer{"David"})
// Create a variable named cmp of type company, and initialize it by
// hiring (dequeuing) an administrator from admins and a developer from devs.
cmp := company{
administrator: admins.Dequeue(),
developer: devs.Dequeue(),
}
// Enqueue the company value on both lists since the company implements
// each interface.
admins.Enqueue(&cmp)
devs.Enqueue(&cmp)
// A set of tasks for administrators and developers to perform.
tasks := []struct {
needsAdmin bool
system string
}{
{needsAdmin: false, system: "xenia"},
{needsAdmin: true, system: "pillar"},
{needsAdmin: false, system: "omega"},
}
// Iterate over tasks.
for _, task := range tasks {
// Check if the task needs an administrator else use a developer.
if task.needsAdmin {
// Dequeue an administrator value from the admins list and
// call the administrate method.
am := admins.Dequeue()
am.administrate(task.system)
continue
}
// Dequeue a developer value from the devs list and
// call the develop method.
dev := devs.Dequeue()
dev.develop(task.system)
}
}
// Outputs:
// David is developing xenia
// John is administrating pillar
// Alice is developing omega | content/docs/design/composition/exercises/exercise1/exercise1.go | 0.535827 | 0.416352 | exercise1.go | starcoder |
package zoekt
import (
"fmt"
"log"
"regexp"
"sort"
"strings"
"github.com/google/zoekt/query"
)
var _ = log.Println
// An expression tree coupled with matches
type matchTree interface {
// returns whether this matches, and if we are sure.
matches(known map[matchTree]bool) (match bool, sure bool)
// clears any per-document state of the matchTree, and
// prepares for evaluating the given doc. The argument is
// strictly increasing over time.
prepare(nextDoc uint32)
String() string
}
type andMatchTree struct {
children []matchTree
}
type orMatchTree struct {
children []matchTree
}
type notMatchTree struct {
child matchTree
}
type regexpMatchTree struct {
query *query.Regexp
regexp *regexp.Regexp
// If non-nil, must evaluate this on the final content too.
caseRegexp *regexp.Regexp
child matchTree
fileName bool
// mutable
reEvaluated bool
caseEvaluated bool
found []*candidateMatch
}
type substrMatchTree struct {
cands []*candidateMatch
coversContent bool
caseSensitive bool
fileName bool
// mutable
current []*candidateMatch
caseEvaluated bool
contEvaluated bool
}
type branchQueryMatchTree struct {
fileMasks []uint32
mask uint32
// mutable
docID uint32
}
// prepare
func (t *andMatchTree) prepare(doc uint32) {
for _, c := range t.children {
c.prepare(doc)
}
}
func (t *regexpMatchTree) prepare(doc uint32) {
t.found = t.found[:0]
t.reEvaluated = false
t.caseEvaluated = t.caseRegexp == nil
t.child.prepare(doc)
}
func (t *orMatchTree) prepare(doc uint32) {
for _, c := range t.children {
c.prepare(doc)
}
}
func (t *notMatchTree) prepare(doc uint32) {
t.child.prepare(doc)
}
func (t *substrMatchTree) prepare(nextDoc uint32) {
for len(t.cands) > 0 && t.cands[0].file < nextDoc {
t.cands = t.cands[1:]
}
i := 0
for ; i < len(t.cands) && t.cands[i].file == nextDoc; i++ {
}
t.current = t.cands[:i]
t.cands = t.cands[i:]
t.contEvaluated = false
t.caseEvaluated = false
}
func (t *branchQueryMatchTree) prepare(doc uint32) {
t.docID = doc
}
// String.
func (t *andMatchTree) String() string {
return fmt.Sprintf("and%v", t.children)
}
func (t *regexpMatchTree) String() string {
return fmt.Sprintf("re(%s,%s)", t.regexp, t.child)
}
func (t *orMatchTree) String() string {
return fmt.Sprintf("or%v", t.children)
}
func (t *notMatchTree) String() string {
return fmt.Sprintf("not(%v)", t.child)
}
func (t *substrMatchTree) String() string {
f := ""
if t.fileName {
f = "f"
}
return fmt.Sprintf("%ssubstr(%v)", f, t.current)
}
func (t *branchQueryMatchTree) String() string {
return fmt.Sprintf("branch(%x)", t.mask)
}
func collectAtoms(t matchTree, f func(matchTree)) {
switch s := t.(type) {
case *andMatchTree:
for _, ch := range s.children {
collectAtoms(ch, f)
}
case *orMatchTree:
for _, ch := range s.children {
collectAtoms(ch, f)
}
default:
f(t)
}
}
func collectPositiveSubstrings(t matchTree, f func(*substrMatchTree)) {
switch s := t.(type) {
case *andMatchTree:
for _, ch := range s.children {
collectPositiveSubstrings(ch, f)
}
case *orMatchTree:
for _, ch := range s.children {
collectPositiveSubstrings(ch, f)
}
case *regexpMatchTree:
collectPositiveSubstrings(s.child, f)
case *notMatchTree:
case *substrMatchTree:
f(s)
}
}
func collectRegexps(t matchTree, f func(*regexpMatchTree)) {
switch s := t.(type) {
case *andMatchTree:
for _, ch := range s.children {
collectRegexps(ch, f)
}
case *orMatchTree:
for _, ch := range s.children {
collectRegexps(ch, f)
}
case *regexpMatchTree:
f(s)
}
}
func visitMatches(t matchTree, known map[matchTree]bool, f func(matchTree)) {
switch s := t.(type) {
case *andMatchTree:
for _, ch := range s.children {
if known[ch] {
visitMatches(ch, known, f)
}
}
case *orMatchTree:
for _, ch := range s.children {
if known[ch] {
visitMatches(ch, known, f)
}
}
case *notMatchTree:
// don't collect into negative trees.
default:
f(s)
}
}
func visitSubtreeMatches(t matchTree, known map[matchTree]bool, f func(*substrMatchTree)) {
visitMatches(t, known, func(mt matchTree) {
st, ok := mt.(*substrMatchTree)
if ok {
f(st)
}
})
}
func visitRegexMatches(t matchTree, known map[matchTree]bool, f func(*regexpMatchTree)) {
visitMatches(t, known, func(mt matchTree) {
st, ok := mt.(*regexpMatchTree)
if ok {
f(st)
}
})
}
func (p *contentProvider) evalContentMatches(s *substrMatchTree) {
if !s.coversContent {
pruned := s.current[:0]
for _, m := range s.current {
if p.matchContent(m) {
pruned = append(pruned, m)
}
}
s.current = pruned
}
s.contEvaluated = true
}
func (p *contentProvider) evalRegexpMatches(s *regexpMatchTree) {
idxs := s.regexp.FindAllIndex(p.data(s.fileName), -1)
for _, idx := range idxs {
s.found = append(s.found, &candidateMatch{
offset: uint32(idx[0]),
matchSz: uint32(idx[1] - idx[0]),
fileName: s.fileName,
})
}
s.reEvaluated = true
}
func (p *contentProvider) evalRegexpMatchesCase(s *regexpMatchTree) {
if s.caseEvaluated {
return
}
trimmed := s.found[:0]
buf := make([]byte, 200)
for _, c := range s.found {
if cap(buf) < int(c.matchSz+8) {
buf = make([]byte, int(c.matchSz+8))
}
orig := toOriginal(buf, p.data(s.fileName), p.caseBits(s.fileName), int(c.offset),
int(c.offset+c.matchSz))
if s.caseRegexp.Match(orig) {
trimmed = append(trimmed, c)
}
}
s.found = trimmed
s.caseEvaluated = true
}
func (p *contentProvider) evalCaseMatches(s *substrMatchTree) {
if s.caseSensitive {
pruned := s.current[:0]
for _, m := range s.current {
if p.caseMatches(m) {
pruned = append(pruned, m)
}
}
s.current = pruned
}
s.caseEvaluated = true
}
func (t *andMatchTree) matches(known map[matchTree]bool) (bool, bool) {
sure := true
for _, ch := range t.children {
v, ok := evalMatchTree(known, ch)
if ok && !v {
return false, true
}
if !ok {
sure = false
}
}
return true, sure
}
func (t *orMatchTree) matches(known map[matchTree]bool) (bool, bool) {
matches := false
sure := true
for _, ch := range t.children {
v, ok := evalMatchTree(known, ch)
if ok {
// we could short-circuit, but we want to use
// the other possibilities as a ranking
// signal.
matches = matches || v
} else {
sure = false
}
}
return matches, sure
}
func (t *branchQueryMatchTree) matches(known map[matchTree]bool) (bool, bool) {
return t.fileMasks[t.docID]&t.mask != 0, true
}
func (t *regexpMatchTree) matches(known map[matchTree]bool) (bool, bool) {
v, ok := evalMatchTree(known, t.child)
if ok && !v {
return false, true
}
if !t.reEvaluated || !t.caseEvaluated {
return false, false
}
return len(t.found) > 0, true
}
func evalMatchTree(known map[matchTree]bool, mt matchTree) (bool, bool) {
if v, ok := known[mt]; ok {
return v, true
}
v, ok := mt.matches(known)
if ok {
known[mt] = v
}
return v, ok
}
func (t *notMatchTree) matches(known map[matchTree]bool) (bool, bool) {
v, ok := evalMatchTree(known, t.child)
return !v, ok
}
func (t *substrMatchTree) matches(known map[matchTree]bool) (bool, bool) {
if len(t.current) == 0 {
return false, true
}
sure := (!t.caseSensitive || t.caseEvaluated) && (t.coversContent || t.contEvaluated)
return true, sure
}
func (d *indexData) newMatchTree(q query.Q, sq map[*substrMatchTree]struct{}) (matchTree, error) {
switch s := q.(type) {
case *query.Regexp:
sz := ngramSize
if s.FileName {
sz = 1
}
subQ := query.RegexpToQuery(s.Regexp, sz)
subQ = query.Map(subQ, func(q query.Q) query.Q {
if sub, ok := q.(*query.Substring); ok {
sub.FileName = s.FileName
sub.CaseSensitive = s.CaseSensitive
}
return q
})
subMT, err := d.newMatchTree(subQ, sq)
if err != nil {
return nil, err
}
tr := ®expMatchTree{
regexp: regexp.MustCompile(query.LowerRegexp(s.Regexp).String()),
child: subMT,
fileName: s.FileName,
}
if s.CaseSensitive {
tr.caseRegexp = regexp.MustCompile(s.Regexp.String())
}
return tr, nil
case *query.And:
var r []matchTree
for _, ch := range s.Children {
ct, err := d.newMatchTree(ch, sq)
if err != nil {
return nil, err
}
r = append(r, ct)
}
return &andMatchTree{r}, nil
case *query.Or:
var r []matchTree
for _, ch := range s.Children {
ct, err := d.newMatchTree(ch, sq)
if err != nil {
return nil, err
}
r = append(r, ct)
}
return &orMatchTree{r}, nil
case *query.Not:
ct, err := d.newMatchTree(s.Child, sq)
return ¬MatchTree{
child: ct,
}, err
case *query.Substring:
iter, err := d.getDocIterator(s)
if err != nil {
return nil, err
}
st := &substrMatchTree{
caseSensitive: s.CaseSensitive,
coversContent: iter.coversContent(),
cands: iter.next(),
}
sq[st] = struct{}{}
return st, nil
case *query.Branch:
mask := uint32(0)
for nm, m := range d.branchIDs {
if strings.Contains(nm, s.Pattern) {
mask |= uint32(m)
}
}
return &branchQueryMatchTree{
mask: mask,
fileMasks: d.fileBranchMasks,
}, nil
case *query.Const:
if s.Value {
iter := d.matchAllDocIterator()
return &substrMatchTree{
coversContent: true,
caseSensitive: false,
fileName: true,
cands: iter.next(),
}, nil
} else {
return &substrMatchTree{}, nil
}
}
log.Panicf("type %T", q)
return nil, nil
}
func (d *indexData) simplify(in query.Q) query.Q {
eval := query.Map(in, func(q query.Q) query.Q {
if r, ok := q.(*query.Repo); ok {
return &query.Const{strings.Contains(d.repoName, r.Pattern)}
}
return q
})
return query.Simplify(eval)
}
func (o *SearchOptions) SetDefaults() {
if o.MaxMatchCount == 0 {
// We cap the total number of matches, so overly broad
// searches don't crash the machine.
o.MaxMatchCount = 100000
}
if o.MaxImportantMatch == 0 {
o.MaxImportantMatch = 10
}
}
func (d *indexData) Search(q query.Q, opts *SearchOptions) (*SearchResult, error) {
copyOpts := *opts
opts = ©Opts
opts.SetDefaults()
importantMatchCount := 0
var res SearchResult
q = d.simplify(q)
if c, ok := q.(*query.Const); ok && !c.Value {
return &res, nil
}
atoms := map[*substrMatchTree]struct{}{}
mt, err := d.newMatchTree(q, atoms)
if err != nil {
return nil, err
}
for st := range atoms {
res.Stats.NgramMatches += len(st.cands)
}
var positiveAtoms, fileAtoms []*substrMatchTree
collectPositiveSubstrings(mt, func(sq *substrMatchTree) {
positiveAtoms = append(positiveAtoms, sq)
})
var regexpAtoms []*regexpMatchTree
collectRegexps(mt, func(re *regexpMatchTree) {
regexpAtoms = append(regexpAtoms, re)
})
for st := range atoms {
if st.fileName {
fileAtoms = append(fileAtoms, st)
}
}
cp := contentProvider{
id: d,
stats: &res.Stats,
}
totalAtomCount := 0
collectAtoms(mt, func(t matchTree) { totalAtomCount++ })
nextFileMatch:
for {
var nextDoc uint32
nextDoc = maxUInt32
for _, st := range positiveAtoms {
if len(st.cands) > 0 && st.cands[0].file < nextDoc {
nextDoc = st.cands[0].file
}
}
if nextDoc == maxUInt32 {
break
}
res.Stats.FilesConsidered++
mt.prepare(nextDoc)
if res.Stats.MatchCount >= opts.MaxMatchCount ||
importantMatchCount >= opts.MaxImportantMatch {
res.Stats.FilesSkipped++
continue
}
cp.setDocument(nextDoc)
known := make(map[matchTree]bool)
if v, ok := evalMatchTree(known, mt); ok && !v {
continue nextFileMatch
}
// Files are cheap to match. Do them first.
if len(fileAtoms) > 0 {
for _, st := range fileAtoms {
cp.evalCaseMatches(st)
cp.evalContentMatches(st)
}
if v, ok := evalMatchTree(known, mt); ok && !v {
continue nextFileMatch
}
}
for st := range atoms {
cp.evalCaseMatches(st)
}
if v, ok := evalMatchTree(known, mt); ok && !v {
continue nextFileMatch
}
for st := range atoms {
// TODO - this may evaluate too much.
cp.evalContentMatches(st)
}
if len(regexpAtoms) > 0 {
if v, ok := evalMatchTree(known, mt); ok && !v {
continue nextFileMatch
}
for _, re := range regexpAtoms {
cp.evalRegexpMatches(re)
}
if v, ok := evalMatchTree(known, mt); ok && !v {
continue nextFileMatch
}
for _, re := range regexpAtoms {
cp.evalRegexpMatchesCase(re)
}
}
if v, ok := evalMatchTree(known, mt); !ok {
panic("did not decide")
} else if !v {
continue nextFileMatch
}
fileMatch := FileMatch{
Repo: d.repoName,
Name: string(d.fileName(nextDoc)),
// Maintain ordering of input files. This
// strictly dominates the in-file ordering of
// the matches.
Score: 10 * float64(nextDoc) / float64(len(d.boundaries)),
}
atomMatchCount := 0
visitMatches(mt, known, func(mt matchTree) {
atomMatchCount++
})
fileMatch.Score += float64(atomMatchCount) / float64(totalAtomCount) * scoreFactorAtomMatch
finalCands := gatherMatches(mt, known)
fileMatch.Matches = cp.fillMatches(finalCands)
maxFileScore := 0.0
for i := range fileMatch.Matches {
if maxFileScore < fileMatch.Matches[i].Score {
maxFileScore = fileMatch.Matches[i].Score
}
// Order by ordering in file.
fileMatch.Matches[i].Score += 1.0 - (float64(i) / float64(len(fileMatch.Matches)))
}
fileMatch.Score += maxFileScore
if fileMatch.Score > scoreImportantThreshold {
importantMatchCount++
}
fileMatch.Branches = d.gatherBranches(nextDoc, mt, known)
sortMatchesByScore(fileMatch.Matches)
if opts.Whole {
c := make([]byte, cp.fileSize+8)
fileMatch.Content = toOriginal(c, cp.data(false), cp.caseBits(false), 0, int(cp.fileSize))
}
res.Files = append(res.Files, fileMatch)
res.Stats.MatchCount += len(fileMatch.Matches)
res.Stats.FileCount++
}
sortFilesByScore(res.Files)
res.RepoURLs = map[string]string{
d.repoName: d.repoURL,
}
return &res, nil
}
func extractSubstringQueries(q query.Q) []*query.Substring {
var r []*query.Substring
switch s := q.(type) {
case *query.And:
for _, ch := range s.Children {
r = append(r, extractSubstringQueries(ch)...)
}
case *query.Or:
for _, ch := range s.Children {
r = append(r, extractSubstringQueries(ch)...)
}
case *query.Not:
r = append(r, extractSubstringQueries(s.Child)...)
case *query.Substring:
r = append(r, s)
}
return r
}
type sortByOffsetSlice []*candidateMatch
func (m sortByOffsetSlice) Len() int { return len(m) }
func (m sortByOffsetSlice) Swap(i, j int) { m[i], m[j] = m[j], m[i] }
func (m sortByOffsetSlice) Less(i, j int) bool {
return m[i].offset < m[j].offset
}
// Gather matches from this document. This never returns a mixture of
// filename/content matches: if there are content matches, all
// filename matches are trimmed from the result. The matches are
// returned in document order and are non-overlapping.
func gatherMatches(mt matchTree, known map[matchTree]bool) []*candidateMatch {
var cands []*candidateMatch
visitMatches(mt, known, func(mt matchTree) {
if smt, ok := mt.(*substrMatchTree); ok {
cands = append(cands, smt.current...)
}
if rmt, ok := mt.(*regexpMatchTree); ok {
cands = append(cands, rmt.found...)
}
})
foundContentMatch := false
for _, c := range cands {
if !c.fileName {
foundContentMatch = true
break
}
}
res := cands[:0]
for _, c := range cands {
if !foundContentMatch || !c.fileName {
res = append(res, c)
}
}
cands = res
// Merge adjacent candidates. This guarantees that the matches
// are non-overlapping.
sort.Sort((sortByOffsetSlice)(cands))
res = cands[:0]
for i, c := range cands {
if i == 0 {
res = append(res, c)
continue
}
last := res[len(res)-1]
lastEnd := last.offset + last.matchSz
end := c.offset + c.matchSz
if lastEnd >= c.offset {
if end > lastEnd {
last.matchSz = end - last.offset
}
continue
}
res = append(res, c)
}
return res
}
func (d *indexData) gatherBranches(docID uint32, mt matchTree, known map[matchTree]bool) []string {
foundBranchQuery := false
var branches []string
visitMatches(mt, known, func(mt matchTree) {
bq, ok := mt.(*branchQueryMatchTree)
if ok {
foundBranchQuery = true
branches = append(branches,
d.branchNames[uint(bq.mask)])
}
})
if !foundBranchQuery {
mask := d.fileBranchMasks[docID]
id := uint32(1)
for mask != 0 {
if mask&0x1 != 0 {
branches = append(branches, d.branchNames[uint(id)])
}
id <<= 1
mask >>= 1
}
}
return branches
}
func (d *indexData) List(q query.Q) (*RepoList, error) {
q = d.simplify(q)
c, ok := q.(*query.Const)
if !ok {
return nil, fmt.Errorf("List should receive Repo-only query.")
}
l := &RepoList{}
if c.Value {
l.Repos = append(l.Repos, d.repoName)
}
return l, nil
} | eval.go | 0.506836 | 0.400955 | eval.go | starcoder |
package posthog
import (
"reflect"
"strings"
)
// Imitate what what the JSON package would do when serializing a struct value,
// the only difference is we we don't serialize zero-value struct fields as well.
// Note that this function doesn't recursively convert structures to maps, only
// the value passed as argument is transformed.
func structToMap(v reflect.Value, m map[string]interface{}) map[string]interface{} {
t := v.Type()
n := t.NumField()
if m == nil {
m = make(map[string]interface{}, n)
}
for i := 0; i != n; i++ {
field := t.Field(i)
value := v.Field(i)
name, omitempty := parseJsonTag(field.Tag.Get("json"), field.Name)
if name != "-" && !(omitempty && isZeroValue(value)) {
m[name] = value.Interface()
}
}
return m
}
// Parses a JSON tag the way the json package would do it, returing the expected
// name of the field once serialized and if empty values should be omitted.
func parseJsonTag(tag string, defName string) (name string, omitempty bool) {
args := strings.Split(tag, ",")
if len(args) == 0 || len(args[0]) == 0 {
name = defName
} else {
name = args[0]
}
if len(args) > 1 && args[1] == "omitempty" {
omitempty = true
}
return
}
// Checks if the value given as argument is a zero-value, it is based on the
// isEmptyValue function in https://golang.org/src/encoding/json/encode.go
// but also checks struct types recursively.
func isZeroValue(v reflect.Value) bool {
switch v.Kind() {
case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
return v.Len() == 0
case reflect.Bool:
return !v.Bool()
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
return v.Int() == 0
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
return v.Uint() == 0
case reflect.Float32, reflect.Float64:
return v.Float() == 0
case reflect.Interface, reflect.Ptr:
return v.IsNil()
case reflect.Struct:
for i, n := 0, v.NumField(); i != n; i++ {
if !isZeroValue(v.Field(i)) {
return false
}
}
return true
case reflect.Invalid:
return true
}
return false
} | vendor/github.com/posthog/posthog-go/json.go | 0.735167 | 0.421671 | json.go | starcoder |
package morton
import "fmt"
type Morton64 struct {
dimensions uint64
bits uint64
masks []uint64
lshifts []uint64
rshifts []uint64
}
func Make64(dimensions uint64, bits uint64) *Morton64 {
if dimensions == 0 || bits == 0 || dimensions*bits > 64 {
panic(fmt.Sprintf("can't make morton64 with %d dimensions and %d bits", dimensions, bits))
}
mask := uint64((1 << bits) - 1)
shift := dimensions * (bits - 1)
shift |= shift >> 1
shift |= shift >> 2
shift |= shift >> 4
shift |= shift >> 8
shift |= shift >> 16
shift |= shift >> 32
shift -= shift >> 1
masks := make([]uint64, 0)
lshifts := make([]uint64, 0)
masks = append(masks, mask)
lshifts = append(lshifts, 0)
for shift > 0 {
mask = 0
shifted := uint64(0)
for bit := uint64(0); bit < bits; bit++ {
distance := (dimensions * bit) - bit
shifted |= shift & distance
mask |= 1 << bit << (((shift - 1) ^ uint64(0xffffffffffffffff)) & distance)
}
if shifted != 0 {
masks = append(masks, mask)
lshifts = append(lshifts, shift)
}
shift >>= 1
}
rshifts := make([]uint64, len(lshifts))
for i := 0; i < len(lshifts)-1; i++ {
rshifts[i] = lshifts[i+1]
}
rshifts[len(rshifts)-1] = 0
return &Morton64{dimensions: dimensions, bits: bits, masks: masks, lshifts: lshifts, rshifts: rshifts}
}
func (morton *Morton64) Pack(values ...uint64) int64 {
dimensions := uint64(len(values))
morton.dimensionsCheck(dimensions)
for i := uint64(0); i < dimensions; i++ {
morton.valueCheck(values[i])
}
code := uint64(0)
for i := uint64(0); i < dimensions; i++ {
code |= morton.split(values[i]) << i
}
return int64(code)
}
func (morton *Morton64) SPack(values ...int64) int64 {
uvalues := make([]uint64, len(values))
for i := 0; i < len(values); i++ {
uvalues[i] = morton.shiftSign(values[i])
}
return morton.Pack(uvalues...)
}
func (morton *Morton64) Unpack(code int64) []uint64 {
dimensions := morton.dimensions
values := make([]uint64, dimensions, dimensions)
for i := uint64(0); i < dimensions; i++ {
values[i] = morton.compact(uint64(code) >> i)
}
return values
}
func (morton *Morton64) SUnpack(code int64) []int64 {
uvalues := morton.Unpack(code)
values := make([]int64, len(uvalues), len(uvalues))
for i := 0; i < len(uvalues); i++ {
values[i] = morton.unshiftSign(uvalues[i])
}
return values
}
func (morton *Morton64) dimensionsCheck(dimensions uint64) {
if morton.dimensions != dimensions {
panic(fmt.Sprintf("morton64 with %d dimensions received %d values", morton.dimensions, dimensions))
}
}
func (morton *Morton64) valueCheck(value uint64) {
if value >= (1 << morton.bits) {
panic(fmt.Sprintf("morton64 with %d bits per dimension received %d to pack", morton.bits, value))
}
}
func (morton *Morton64) shiftSign(value int64) uint64 {
if value >= (1<<(morton.bits-1)) || value <= -(1<<(morton.bits-1)) {
panic(fmt.Sprintf("morton64 with %d bits per dimension received signed %d to pack", morton.bits, value))
}
if value < 0 {
value = -value
value |= 1 << (morton.bits - 1)
}
return uint64(value)
}
func (morton *Morton64) unshiftSign(value uint64) int64 {
sign := value & (1 << (morton.bits - 1))
value &= (1 << (morton.bits - 1)) - 1
svalue := int64(value)
if sign != 0 {
svalue = -svalue
}
return svalue
}
func (morton *Morton64) split(value uint64) uint64 {
for o := 0; o < len(morton.masks); o++ {
value = (value | (value << morton.lshifts[o])) & morton.masks[o]
}
return value
}
func (morton *Morton64) compact(code uint64) uint64 {
for o := len(morton.masks) - 1; o >= 0; o-- {
code = (code | (code >> morton.rshifts[o])) & morton.masks[o]
}
return code
} | morton64.go | 0.52829 | 0.505676 | morton64.go | starcoder |
package heraldry
import (
"fmt"
"github.com/ironarachne/world/pkg/grid"
"github.com/ironarachne/world/pkg/heraldry/charge"
"math/rand"
)
// Field is the field of a coat of arms
type Field struct {
Division
ChargeGroups []charge.Group
FieldType FieldType
}
// FieldType is a type of field
type FieldType struct {
CenterPoint grid.Coordinate
ImageWidth int
ImageHeight int
MaskWidth int
MaskHeight int
Name string
MaskFileName string
}
func allFieldTypes() []FieldType {
fieldTypes := []FieldType{
{
Name: "banner",
MaskFileName: "banner.png",
ImageWidth: 320,
ImageHeight: 450,
MaskWidth: 320,
MaskHeight: 450,
CenterPoint: grid.Coordinate{
X: 160,
Y: 225,
},
},
{
Name: "engrailed",
MaskFileName: "engrailed.png",
ImageWidth: 374,
ImageHeight: 450,
MaskWidth: 374,
MaskHeight: 450,
CenterPoint: grid.Coordinate{
X: 187,
Y: 215,
},
},
{
Name: "heater",
MaskFileName: "heater.png",
ImageWidth: 364,
ImageHeight: 436,
MaskWidth: 364,
MaskHeight: 436,
CenterPoint: grid.Coordinate{
X: 182,
Y: 200,
},
},
{
Name: "wedge",
MaskFileName: "wedge.png",
ImageWidth: 358,
ImageHeight: 450,
MaskWidth: 358,
MaskHeight: 450,
CenterPoint: grid.Coordinate{
X: 179,
Y: 215,
},
},
}
return fieldTypes
}
func fieldByName(name string) (Field, error) {
var fieldType FieldType
fieldTypes := allFieldTypes()
for _, t := range fieldTypes {
if t.Name == name {
fieldType = t
}
}
division, err := generateDivision()
if err != nil {
err = fmt.Errorf("Failed to generate heraldic field: %w", err)
return Field{}, err
}
chargeGroup, err := charge.RandomGroup(division.Variations[0].Tinctures[0])
if err != nil {
err = fmt.Errorf("Failed to generate heraldic field: %w", err)
return Field{}, err
}
chargeGroups := []charge.Group{
chargeGroup,
}
field := Field{
Division: division,
ChargeGroups: chargeGroups,
FieldType: fieldType,
}
return field, nil
}
func randomField() (Field, error) {
fieldType := randomFieldType()
division, err := generateDivision()
if err != nil {
err = fmt.Errorf("Failed to generate heraldic field: %w", err)
return Field{}, err
}
chargeGroup, err := charge.RandomGroup(division.Variations[0].Tinctures[0])
if err != nil {
err = fmt.Errorf("Failed to generate heraldic field: %w", err)
return Field{}, err
}
chargeGroups := []charge.Group{
chargeGroup,
}
field := Field{
Division: division,
ChargeGroups: chargeGroups,
FieldType: fieldType,
}
return field, nil
}
func randomFieldType() FieldType {
fieldTypes := allFieldTypes()
fieldType := fieldTypes[rand.Intn(len(fieldTypes))]
return fieldType
} | pkg/heraldry/fields.go | 0.58166 | 0.40489 | fields.go | starcoder |
package criticality
// Criticality is
type Criticality string
// criticality
var (
// EmptyCriticality is used to mark any invalid criticality, and the empty criticality will be parsed as the default criticality later.
EmptyCriticality = Criticality("")
// CriticalPlus is reserved for the most critical requests, those that will result in serious user-visible impact if they fail.
CriticalPlus = Criticality("CRITICAL_PLUS")
// Critical is the default value for requests sent from production jobs. These requests will result in user-visible impact, but the impact may be less severe than those of CRITICAL_PLUS. Services are expected to provision enough capacity for all expected CRITICAL and CRITICAL_PLUS traffic.
Critical = Criticality("CRITICAL")
// SheddablePlus is traffic for which partial unavailability is expected. This is the default for batch jobs, which can retry requests minutes or even hours later.
SheddablePlus = Criticality("SHEDDABLE_PLUS")
// Sheddable is traffic for which frequent partial unavailability and occasional full unavailability is expected.
Sheddable = Criticality("SHEDDABLE")
// higher is more critical
_criticalityEnum = map[Criticality]int{
CriticalPlus: 40,
Critical: 30,
SheddablePlus: 20,
Sheddable: 10,
}
_defaultCriticality = Critical
)
// Value is used to get criticality value, higher value is more critical.
func Value(in Criticality) int {
v, ok := _criticalityEnum[in]
if !ok {
return _criticalityEnum[_defaultCriticality]
}
return v
}
// Higher will compare the input criticality with self, return true if the input is more critical than self.
func (c Criticality) Higher(in Criticality) bool {
return Value(in) > Value(c)
}
// Parse will parse raw criticality string as valid critality. Any invalid input will parse as empty criticality.
func Parse(raw string) Criticality {
crtl := Criticality(raw)
if _, ok := _criticalityEnum[crtl]; ok {
return crtl
}
return EmptyCriticality
}
// Exist is used to check criticality is exist in several enumeration.
func Exist(c Criticality) bool {
_, ok := _criticalityEnum[c]
return ok
} | pkg/net/criticality/criticality.go | 0.641535 | 0.433742 | criticality.go | starcoder |
package gocoder
import (
"context"
"go/ast"
"go/token"
)
type GoType struct {
rootExpr *GoExpr
astExpr ast.Expr
strType string
node GoNode
parent ast.Node
funcs []*GoFunc
}
func newGoType(rootExpr *GoExpr, parent ast.Node, astType ast.Expr) *GoType {
g := &GoType{
rootExpr: rootExpr,
astExpr: astType,
parent: parent,
strType: astTypeToStringType(astType),
}
g.load()
return g
}
func (p *GoType) Node() GoNode {
return p.node
}
func (p *GoType) load() {
node := p.astExpr.(ast.Node)
switch expr := node.(type) {
case *ast.StructType:
{
spec, _ := p.parent.(*ast.TypeSpec)
p.node = newGoStruct(p.rootExpr, spec, expr)
}
case *ast.Ident:
{
p.node = newGoIdent(p.rootExpr, expr)
}
case *ast.ArrayType:
{
p.node = newGoArray(p.rootExpr, expr)
}
case *ast.MapType:
{
p.node = newGoMap(p.rootExpr, expr)
}
case *ast.InterfaceType:
{
p.node = newGoInterface(p.rootExpr, expr)
}
case *ast.StarExpr:
{
p.node = newGoStar(p.rootExpr, expr)
}
case *ast.SelectorExpr:
{
p.node = newGoSelector(p.rootExpr, expr)
}
}
typSpec, ok := p.parent.(*ast.TypeSpec)
if ok {
for i := 0; i < p.rootExpr.options.GoPackage.NumFuncs(); i++ {
if p.rootExpr.options.GoPackage.Func(i).Receiver() == typSpec.Name.Name {
p.funcs = append(p.funcs, p.rootExpr.options.GoPackage.Func(i))
}
}
}
}
func (p *GoType) MethodByName(name string) *GoFunc {
for i := 0; i < len(p.funcs); i++ {
if p.funcs[i].Name() == name {
return p.funcs[i]
}
}
return nil
}
func (p *GoType) Method(i int) *GoFunc {
return p.funcs[i]
}
func (p *GoType) NumMethods() int {
return len(p.funcs)
}
func (p *GoType) Inspect(f InspectFunc, ctx context.Context) {
inspectable, ok := p.node.(GoNodeInspectable)
if ok {
inspectable.Inspect(f, ctx)
}
}
func (p *GoType) IsArray() bool {
_, ok := p.astExpr.(*ast.ArrayType)
return ok
}
func (p *GoType) IsInterface() bool {
_, ok := p.astExpr.(*ast.InterfaceType)
return ok
}
func (p *GoType) IsMap() bool {
_, ok := p.astExpr.(*ast.MapType)
return ok
}
func (p *GoType) IsStruct() bool {
_, ok := p.astExpr.(*ast.StructType)
return ok
}
func (p *GoType) IsSelector() bool {
_, ok := p.astExpr.(*ast.SelectorExpr)
return ok
}
func (p *GoType) Position() (token.Position, token.Position) {
return p.rootExpr.astFileSet.Position(p.astExpr.Pos()), p.rootExpr.astFileSet.Position(p.astExpr.End())
}
func (p *GoType) Print() error {
return ast.Print(p.rootExpr.astFileSet, p.astExpr)
}
func (p *GoType) String() string {
return p.strType
}
func (p *GoType) goNode() {} | go_type.go | 0.50415 | 0.431165 | go_type.go | starcoder |
package rom
import (
"bytes"
"fmt"
"log"
)
// A Mutable is a memory data that can be changed by the randomizer.
type Mutable interface {
Mutate([]byte) error // change ROM bytes
Check([]byte) error // verify that the mutable matches the ROM
}
// A MutableRange is a length of mutable bytes starting at a given address.
type MutableRange struct {
Addrs []Addr
Old, New []byte
}
// MutableByte returns a special case of MutableRange with a range of a single
// byte.
func MutableByte(addr Addr, old, new byte) *MutableRange {
return &MutableRange{
Addrs: []Addr{addr},
Old: []byte{old},
New: []byte{new},
}
}
// MutableWord returns a special case of MutableRange with a range of a two
// bytes.
func MutableWord(addr Addr, old, new uint16) *MutableRange {
return &MutableRange{
Addrs: []Addr{addr},
Old: []byte{byte(old >> 8), byte(old)},
New: []byte{byte(new >> 8), byte(new)},
}
}
// MutableString returns a MutableRange constructed from the bytes in two
// strings.
func MutableString(addr Addr, old, new string) *MutableRange {
return &MutableRange{
Addrs: []Addr{addr},
Old: bytes.NewBufferString(old).Bytes(),
New: bytes.NewBufferString(new).Bytes(),
}
}
// MutableStrings returns a MutableRange constructed from the bytes in two
// strings, at multiple addresses.
func MutableStrings(addrs []Addr, old, new string) *MutableRange {
return &MutableRange{
Addrs: addrs,
Old: bytes.NewBufferString(old).Bytes(),
New: bytes.NewBufferString(new).Bytes(),
}
}
// Mutate replaces bytes in its range.
func (mr *MutableRange) Mutate(b []byte) error {
for _, addr := range mr.Addrs {
offset := addr.fullOffset()
for i, value := range mr.New {
b[offset+i] = value
}
}
return nil
}
// Check verifies that the range matches the given ROM data.
func (mr *MutableRange) Check(b []byte) error {
for _, addr := range mr.Addrs {
offset := addr.fullOffset()
for i, value := range mr.Old {
if b[offset+i] != value {
return fmt.Errorf("expected %x at %x; found %x",
mr.Old[i], offset+i, b[offset+i])
}
}
}
return nil
}
// SetMusic sets music on or off in the modified ROM.
func SetMusic(music bool) {
if music {
mut := codeMutables["no music call"].(*MutableRange)
mut.New = mut.Old
}
}
// SetTreewarp sets treewarp on or off in the modified ROM.
func SetTreewarp(treewarp bool) {
if !treewarp {
mut := codeMutables["tree warp jump"].(*MutableRange)
mut.New = mut.Old
}
}
// SetAnimal sets the flute type and Natzu region type based on a companion
// number 1 to 3.
func SetAnimal(companion int) {
varMutables["animal region"].(*MutableRange).New =
[]byte{byte(companion + 0x0a)}
// ages
if varMutables["flute palette"] != nil {
mut := varMutables["flute palette"].(*MutableRange)
mut.New[0] = byte(0x10*(4-companion) + 3)
}
}
// SetTunicColor sets Link's tunic color (green, blue, red, or gold; value from 0-3)
func SetTunicColor(color int) {
for i := 0; i <= 9; i++ { // Object palettes
var mut = varMutables["object tunic color " + fmt.Sprint(i)].(*MutableRange)
mut.New[0] = mut.Old[0] | byte(color)
}
for i := 0; i <= 21; i++ { // File select sprites
var mut = varMutables["file tunic color " + fmt.Sprint(i)].(*MutableRange)
mut.New[0] = mut.Old[0] | byte(color)
}
}
// these mutables have fixed addresses and don't reference other mutables. try
// to generally order them by address, unless a grouping between mutables in
// different banks makes more sense.
var fixedMutables map[string]Mutable
// like the item slots, these are (usually) no-ops until the randomizer touches
// them. these are also fixed, but generally need to have their values set
// elsewhere in order to do anything.
var varMutables map[string]Mutable
// get a collated map of all mutables
func getAllMutables() map[string]Mutable {
slotMutables := make(map[string]Mutable)
treasureMutables := make(map[string]Mutable)
for k, v := range ItemSlots {
if v.Treasure == nil {
log.Fatalf("treasure named %s for %s is nil", v.treasureName, k)
}
if v.Treasure.addr.offset != 0 {
treasureMutables[FindTreasureName(v.Treasure)] = v.Treasure
}
slotMutables[k] = v
}
mutableSets := []map[string]Mutable{
fixedMutables,
treasureMutables,
slotMutables,
varMutables,
codeMutables,
}
// initialize master map w/ adequate capacity
count := 0
for _, set := range mutableSets {
count += len(set)
}
allMutables := make(map[string]Mutable, count)
// add mutables to master map
for _, set := range mutableSets {
for k, v := range set {
if _, ok := allMutables[k]; ok {
log.Fatalf("duplicate mutable key: %s", k)
}
allMutables[k] = v
}
}
return allMutables
} | rom/mutables.go | 0.674265 | 0.411584 | mutables.go | starcoder |
package examples
import (
"encoding/hex"
"github.com/cockroachdb/cockroach/pkg/workload"
)
type intro struct{}
func init() {
workload.Register(introMeta)
}
var introMeta = workload.Meta{
Name: `intro`,
Description: `Intro contains a single table with a hidden message`,
Version: `1.0.0`,
New: func() workload.Generator { return intro{} },
}
// Meta implements the Generator interface.
func (intro) Meta() workload.Meta { return introMeta }
// Tables implements the Generator interface.
func (intro) Tables() []workload.Table {
return []workload.Table{
{
Name: `mytable`,
Schema: `(l INT PRIMARY KEY, v TEXT)`,
InitialRows: workload.Tuples(
len(mytableRows),
func(rowIdx int) []interface{} {
// The second datum in mytableRows is a hex encoded string, but
// we want to hand it back as bytes.
row := mytableRows[rowIdx]
bytes, err := hex.DecodeString(row[1].(string))
if err != nil {
panic(err)
}
return []interface{}{row[0], bytes}
},
),
},
}
}
var mytableRows = [...][]interface{}{
{0, `215F5F61616177776D716D716D7777776161732C2C5F20202020202020202E5F5F6161617777776D716D716D77776161612C2C`},
{2, `212256543F212222225E7E7E5E2222223F3F5424576D7161612C5F6175716D5742543F212222225E7E7E5E5E22223F3F59565E`},
{4, `212020202020202020202020202020202020202020223F23236D5723233F222D20202020202020202020202020202020202020`},
{6, `21202043204F204E2047205220412054205320205F616D235A3F3F41236D612C2020202020202020202020592020202020202020`},
{8, `2120202020202020202020202020202020205F756D6D5922202020202239236D612C2020202020202041202020202020202020`},
{10, `2120202020202020202020202020202020766D235A28202020202020202029586D6D7320202020592020202020202020202020`},
{12, `2120202020202020202020202020202E6A232323236D6D6D23232323236D6D236D2323362E2020202020202020202020202020`},
{14, `2120202057204F20572021202020206A6D6D2323236D6D2323232323236D236D6D6D2323362020202020202020202020202020`},
{16, `21202020202020202020202020205D236D652A586D236D236D6D23236D236D2323535823236320202020202020202020202020`},
{18, `2120202020202020202020202020646D237C7C2B2A2423236D236D6D236D235376766E23236D20202020202020202020202020`},
{20, `212020202020202020202020203A6D6D453D7C2B7C7C5323236D23236D23316E766E6E5823233B20202020204120202020202020`},
{22, `212020202020202020202020203A6D23682B7C2B2B2B3D586D6D236D23316E766E6E76646D6D3B20202020204D202020202020`},
{24, `212059202020202020202020202024236D3E2B7C2B7C7C7C23236D23316E766E6E6E6E6D6D2320202020202041202020202020`},
{26, `2120204F202020202020202020205D23237A2B7C2B7C2B7C33236D456E6E6E6E766E642323662020202020205A202020202020`},
{28, `212020205520204420202020202020342323637C2B7C2B7C5D6D236B766E766E6E6F2323502020202020202045202020202020`},
{30, `2120202020202020492020202020202034236D612B7C2B2B5D6D6D68766E6E7671232350602020202020202021202020202020`},
{32, `21202020202020202044204920202020203F242371252B7C646D6D6D766E6E6D23232120202020202020202020202020202020`},
{34, `2120202020202020202020205420202020202D3423237775236D6D237077232337272020202020202020202020202020202020`},
{36, `21202020202020202020202020202020202020202D3F2423236D23232323592720202020202020202020202020202020202020`},
{38, `21202020202020202020202020202121202020202020202259232359222D202020202020202020202020202020202020202020`},
{40, `21`},
{41, `215F5F61616177776D716D716D7777776161732C2C5F20202020202020202E5F5F6161617777776D716D716D77776161612C2C`},
{39, `212256543F212222225E7E7E5E2222223F3F5424576D7161612C5F6175716D5742543F212222225E7E7E5E5E22223F3F59565E`},
{37, `212020202020202020202020202020202020202020223F23236D5723233F222D20202020202020202020202020202020202020`},
{35, `21202043204F204E2047205220412054205320205F616D235A3F3F41236D612C2020202020202020202020592020202020202020`},
{33, `2120202020202020202020202020202020205F756D6D5922202020202239236D612C2020202020202041202020202020202020`},
{31, `2120202020202020202020202020202020766D235A28202020202020202029586D6D7320202020592020202020202020202020`},
{29, `2120202020202020202020202020202E6A232323236D6D6D23232323236D6D236D2323362E2020202020202020202020202020`},
{27, `2120202057204F20572021202020206A6D6D2323236D6D2323232323236D236D6D6D2323362020202020202020202020202020`},
{25, `21202020202020202020202020205D236D652A586D236D236D6D23236D236D2323535823236320202020202020202020202020`},
{23, `2120202020202020202020202020646D237C7C2B2A2423236D236D6D236D235376766E23236D20202020202020202020202020`},
{21, `212020202020202020202020203A6D6D453D7C2B7C7C5323236D23236D23316E766E6E5823233B20202020204120202020202020`},
{19, `212020202020202020202020203A6D23682B7C2B2B2B3D586D6D236D23316E766E6E76646D6D3B20202020204D202020202020`},
{17, `212059202020202020202020202024236D3E2B7C2B7C7C7C23236D23316E766E6E6E6E6D6D2320202020202041202020202020`},
{15, `2120204F202020202020202020205D23237A2B7C2B7C2B7C33236D456E6E6E6E766E642323662020202020205A202020202020`},
{13, `212020205520204420202020202020342323637C2B7C2B7C5D6D236B766E766E6E6F2323502020202020202045202020202020`},
{11, `2120202020202020492020202020202034236D612B7C2B2B5D6D6D68766E6E7671232350602020202020202021202020202020`},
{9, `21202020202020202044204920202020203F242371252B7C646D6D6D766E6E6D23232120202020202020202020202020202020`},
{7, `2120202020202020202020205420202020202D3423237775236D6D237077232337272020202020202020202020202020202020`},
{5, `21202020202020202020202020202020202020202D3F2423236D23232323592720202020202020202020202020202020202020`},
{3, `21202020202020202020202020202121202020202020202259232359222D202020202020202020202020202020202020202020`},
{1, `21`},
} | pkg/workload/examples/intro.go | 0.697712 | 0.49109 | intro.go | starcoder |
package collection
import (
"errors"
"fmt"
"reflect"
)
// Node type holds the data element and pointer to next and previous node in the linked list
type Node struct {
Val interface{}
Next *Node
Prev *Node
}
// Collection type, stores the Head and Tail. It represents a Collection of address with each Collection instantiated having a default nil.Head and Tail
type Collection struct {
Head *Node
Tail *Node
Length int
}
// Add Inserts the specified element at the specified position in this Collection. By default add to the end of Collection
func (c *Collection) Add(element interface{}, startIndexSlice ...int) error {
startIndex, err := getStartingIndex(c, startIndexSlice...)
if err != nil {
return err
}
slice := reflect.ValueOf(element)
if slice.Kind() != reflect.Slice {
n := &Node{Val: element}
if c.Head == nil {
c.Head = n
c.Tail = n
} else {
if startIndex == 0 {
HeadCopy := c.Head
c.Head = n
n.Next = HeadCopy
HeadCopy.Prev = c.Head
} else if startIndex != c.Length {
curr := c.Head
for i := 0; i < c.Length; i++ {
if i == startIndex-1 {
copyCurrent := curr
copyNext := curr.Next
curr.Next = n
n.Prev = copyCurrent
n.Next = copyNext
n.Next.Prev = n
break
}
curr = curr.Next
}
} else if startIndex == c.Length {
prevCopy := c.Tail
prevCopy.Next = n
n.Prev = prevCopy
c.Tail = n
} else {
c.Tail.Prev = n
}
}
c.Length++
} else {
elementsSlice := make([]interface{}, slice.Len())
for i := 0; i < slice.Len(); i++ {
elementsSlice[i] = slice.Index(i).Interface()
}
curr := c.Head
if startIndex == 0 {
for i := 0; i < slice.Len(); i++ {
err := c.Add(elementsSlice[i], startIndex)
if err != nil {
return err
}
startIndex++
}
} else if startIndex != c.Length {
for i := 0; i < c.Length; i++ {
if i == startIndex-1 {
nextCopy := curr.Next
for j := 0; j < slice.Len(); j++ {
innerNode := &Node{Val: elementsSlice[j]}
curr.Next = innerNode
currCopy := curr
curr = curr.Next
curr.Prev = currCopy
c.Length++
}
curr.Next = nextCopy
if nextCopy != nil {
nextCopy.Prev = curr
}
if i-1+startIndex == c.Length {
c.Tail = curr
}
break
}
curr = curr.Next
}
} else {
currTail := c.Tail
for i := 0; i < slice.Len(); i++ {
n := &Node{Val: elementsSlice[i]}
currTail.Next = n
currTail = currTail.Next
currTail.Prev = c.Tail
c.Tail = c.Tail.Next
c.Length++
}
}
}
return nil
}
// AddAll Inserts all of the elements in the specified collection into this Collection, starting at the specified position. or by default at the end
func (c *Collection) AddAll(elementsInterface interface{}, startIndexSlice ...int) error {
slice := reflect.ValueOf(elementsInterface)
if slice.Kind() != reflect.Slice {
return fmt.Errorf("A slice input is required for this function expected: Slice, got: %v", slice.Kind())
}
return c.Add(elementsInterface, startIndexSlice...)
}
// Clear Removes all of the elements from this Collection.
func (c *Collection) Clear() {
c.Head = nil
c.Tail = nil
c.Length = 0
}
// Contains Returns true if this Collection contains the specified element.
func (c *Collection) Contains(element interface{}) bool {
matchIndex, _ := Iterate(c, false, element, false, false)
return matchIndex != -1
}
// ContainsAll returns true if all the elements provided as input are present in the collection
func (c *Collection) ContainsAll(element interface{}) bool {
slice := reflect.ValueOf(element)
if slice.Kind() != reflect.Slice {
_, elementAtIndex := Iterate(c, false, element, false, false)
return elementAtIndex != nil
}
elementsSlice := make([]interface{}, slice.Len())
for i := 0; i < slice.Len(); i++ {
elementsSlice[i] = slice.Index(i).Interface()
}
for i := 0; i < slice.Len(); i++ {
_, elementAtIndex := Iterate(c, false, elementsSlice[i], false, false)
if elementAtIndex == nil {
return false
}
}
return true
}
// Equals check if all the element value in one list is equal to another list
func (c *Collection) Equals(newCollection Collection) bool {
return equalHelper(c, newCollection, false)
}
// IsEmpty checks if a collection is empty
func (c *Collection) IsEmpty() bool {
return c.Head == nil
}
// Iterator Returns a iterator of the elements in this collection (in proper sequence)
func (c *Collection) Iterator() *Node {
_, itrPointer := Iterate(c, false, 0, false, true)
return itrPointer
}
// Remove Retrieves and removes the Head (first element) of this Collection.
func (c *Collection) Remove(startIndexSlice ...int) (*Node, error) {
if c.Head == nil {
return nil, errors.New("list is not initialized")
}
if len(startIndexSlice) > 0 {
if startIndexSlice[0] < c.Length {
if startIndexSlice[0] == 0 {
return removeFromStartHelper(c)
}
if c.Length-1 == startIndexSlice[0] {
return removeFromEndHelper(c)
}
_, element := Iterate(c, false, startIndexSlice[0], false, true)
prevCopy := element.Prev
prevCopy.Next = element.Next
element.Next.Prev = prevCopy
c.Length--
return element, nil
}
return nil, fmt.Errorf("index %v can not be removed, because its greater than list Length", startIndexSlice[0])
}
return removeFromStartHelper(c)
}
// RemoveAll Removes all the values and pointers from the collection
func (c *Collection) RemoveAll() {
c.Head = nil
c.Tail = nil
c.Length = 0
}
// Size returns the Length of the collection
func (c *Collection) Size() int {
return c.Length
}
// ToArray Returns an array containing all of the elements in this collection in proper sequence (from first to last element)
func (c *Collection) ToArray() []interface{} {
listToArray := make([]interface{}, c.Length)
var i int
curr := c.Head
for curr != nil {
listToArray[i] = curr.Val
curr = curr.Next
i++
}
return listToArray
}
// DeepEquals checks if a collection is made from the clone of a list or not. For two collection to be deepEqual all pointers to next and previous must also be equal
func (c *Collection) DeepEquals(newCollection Collection) bool {
return equalHelper(c, newCollection, true)
}
// Print prints the collection element. optional debug argument as true or false can be provided
func (c *Collection) Print(debug ...bool) {
Iterate(c, true, nil, printHelper(debug...), false)
}
// PrintReverse prints the collection in reverse order. optional debug argument as true or false can be provided
func (c *Collection) PrintReverse(debug ...bool) {
ReverseIterate(c, true, nil, printHelper(debug...), false)
}
// PrintPretty prints the collection as a slice, so it is looks pretty on the screen
func (c *Collection) PrintPretty() {
fmt.Println(c.ToArray())
}
// Iterate function, iterates over the collection to perform either searching or printing. iteration is sequential
func Iterate(c *Collection, shouldPrint bool, searchKey interface{}, shouldDebug bool, searchByIndex bool) (int, *Node) {
curr := c.Head
var i int
for curr != nil {
if shouldPrint {
fmt.Print((*curr).Val)
if shouldDebug {
fmt.Printf("\t Index: %v \t Next: %p \t current: %p \t Prev: %p", i, curr.Next, curr, curr.Prev)
}
fmt.Println()
}
if searchKey != nil && searchKey == curr.Val && !searchByIndex {
return i, curr
}
if searchByIndex {
if i == searchKey {
return -1, curr
}
}
curr = curr.Next
i++
}
return -1, nil
}
// ReverseIterate function, iterates over the collection to perform either searching or printing. iteration is in reverse order
func ReverseIterate(c *Collection, shouldPrint bool, searchKey interface{}, shouldDebug bool, searchByIndex bool) (int, *Node) {
curr := c.Tail
counter := c.Length - 1
for curr != nil {
if shouldPrint {
fmt.Print((*curr).Val)
if shouldDebug {
fmt.Printf("\t Index: %v \t Next: %p \t current: %p \t Prev: %p", counter, curr.Next, curr, curr.Prev)
}
fmt.Println()
}
if searchKey != nil && searchKey == curr.Val && !searchByIndex {
return counter, nil
}
if searchByIndex {
if counter == searchKey {
return -1, curr
}
}
curr = curr.Prev
counter--
}
return -1, nil
}
// unexported and utility functions used by above functions
func getStartingIndex(c *Collection, startIndexSlice ...int) (int, error) {
if len(startIndexSlice) > 0 {
if len(startIndexSlice) > 2 {
return -1, fmt.Errorf("only one argument expected as start index, received %v", startIndexSlice)
} else if startIndexSlice[0] > c.Length {
return startIndexSlice[0], fmt.Errorf("starting index cant be greater than Length of list, expected a number less than %v, got %v", c.Length+1, startIndexSlice[0])
} else {
return startIndexSlice[0], nil
}
}
return c.Length, nil
}
func printHelper(debug ...bool) bool {
var shouldDebug bool
if len(debug) != 0 {
if debug[0] {
shouldDebug = true
}
}
return shouldDebug
}
func equalHelper(oldCollection *Collection, newCollection Collection, deepEqual bool) bool {
if oldCollection.Length != newCollection.Length {
return false
}
currHeadOfOldCollection := oldCollection.Head
currHeadOfNewCollection := newCollection.Head
for i := 0; i < oldCollection.Length; i++ {
if currHeadOfOldCollection.Val != currHeadOfNewCollection.Val || (deepEqual && (currHeadOfOldCollection.Next != currHeadOfNewCollection.Next ||
currHeadOfOldCollection.Prev != currHeadOfNewCollection.Prev)) {
return false
}
}
return true
}
func removeFromStartHelper(c *Collection) (*Node, error) {
if c.Head != nil {
HeadCopy := c.Head
if c.Head.Next == nil {
c.Head = nil
c.Length = 0
c.Tail = nil
return HeadCopy, nil
}
c.Head = c.Head.Next
c.Head.Prev = nil
c.Length--
return HeadCopy, nil
}
return nil, errors.New("list is not yet initialized")
}
func removeFromEndHelper(c *Collection) (*Node, error) {
if c.Head != nil {
tailCopy := c.Tail
if c.Tail.Prev == nil {
c.Head = nil
c.Length = 0
c.Tail = nil
return tailCopy, nil
}
c.Tail = c.Tail.Prev
c.Tail.Next = nil
c.Length--
return tailCopy, nil
}
return nil, errors.New("list is not yet initialized")
} | src/dataStructure/collection/collection.go | 0.658747 | 0.410461 | collection.go | starcoder |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Test switch statements.
package main
import "os"
func assert(cond bool, msg string) {
if !cond {
print("assertion fail: ", msg, "\n")
panic(1)
}
}
func main() {
i5 := 5
i7 := 7
hello := "hello"
switch true {
case i5 < 5:
assert(false, "<")
case i5 == 5:
assert(true, "!")
case i5 > 5:
assert(false, ">")
}
switch {
case i5 < 5:
assert(false, "<")
case i5 == 5:
assert(true, "!")
case i5 > 5:
assert(false, ">")
}
switch x := 5; true {
case i5 < x:
assert(false, "<")
case i5 == x:
assert(true, "!")
case i5 > x:
assert(false, ">")
}
switch x := 5; true {
case i5 < x:
assert(false, "<")
case i5 == x:
assert(true, "!")
case i5 > x:
assert(false, ">")
}
switch i5 {
case 0:
assert(false, "0")
case 1:
assert(false, "1")
case 2:
assert(false, "2")
case 3:
assert(false, "3")
case 4:
assert(false, "4")
case 5:
assert(true, "5")
case 6:
assert(false, "6")
case 7:
assert(false, "7")
case 8:
assert(false, "8")
case 9:
assert(false, "9")
default:
assert(false, "default")
}
switch i5 {
case 0, 1, 2, 3, 4:
assert(false, "4")
case 5:
assert(true, "5")
case 6, 7, 8, 9:
assert(false, "9")
default:
assert(false, "default")
}
switch i5 {
case 0:
case 1:
case 2:
case 3:
case 4:
assert(false, "4")
case 5:
assert(true, "5")
case 6:
case 7:
case 8:
case 9:
default:
assert(i5 == 5, "good")
}
switch i5 {
case 0:
dummy := 0
_ = dummy
fallthrough
case 1:
dummy := 0
_ = dummy
fallthrough
case 2:
dummy := 0
_ = dummy
fallthrough
case 3:
dummy := 0
_ = dummy
fallthrough
case 4:
dummy := 0
_ = dummy
assert(false, "4")
case 5:
dummy := 0
_ = dummy
fallthrough
case 6:
dummy := 0
_ = dummy
fallthrough
case 7:
dummy := 0
_ = dummy
fallthrough
case 8:
dummy := 0
_ = dummy
fallthrough
case 9:
dummy := 0
_ = dummy
fallthrough
default:
dummy := 0
_ = dummy
assert(i5 == 5, "good")
}
fired := false
switch i5 {
case 0:
dummy := 0
_ = dummy
fallthrough // tests scoping of cases
case 1:
dummy := 0
_ = dummy
fallthrough
case 2:
dummy := 0
_ = dummy
fallthrough
case 3:
dummy := 0
_ = dummy
fallthrough
case 4:
dummy := 0
_ = dummy
assert(false, "4")
case 5:
dummy := 0
_ = dummy
fallthrough
case 6:
dummy := 0
_ = dummy
fallthrough
case 7:
dummy := 0
_ = dummy
fallthrough
case 8:
dummy := 0
_ = dummy
fallthrough
case 9:
dummy := 0
_ = dummy
fallthrough
default:
dummy := 0
_ = dummy
fired = !fired
assert(i5 == 5, "good")
}
assert(fired, "fired")
count := 0
switch i5 {
case 0:
count = count + 1
fallthrough
case 1:
count = count + 1
fallthrough
case 2:
count = count + 1
fallthrough
case 3:
count = count + 1
fallthrough
case 4:
count = count + 1
assert(false, "4")
case 5:
count = count + 1
fallthrough
case 6:
count = count + 1
fallthrough
case 7:
count = count + 1
fallthrough
case 8:
count = count + 1
fallthrough
case 9:
count = count + 1
fallthrough
default:
assert(i5 == count, "good")
}
assert(fired, "fired")
switch hello {
case "wowie":
assert(false, "wowie")
case "hello":
assert(true, "hello")
case "jumpn":
assert(false, "jumpn")
default:
assert(false, "default")
}
fired = false
switch i := i5 + 2; i {
case i7:
fired = true
default:
assert(false, "fail")
}
assert(fired, "var")
// switch on nil-only comparison types
switch f := func() {}; f {
case nil:
assert(false, "f should not be nil")
default:
}
switch m := make(map[int]int); m {
case nil:
assert(false, "m should not be nil")
default:
}
switch a := make([]int, 1); a {
case nil:
assert(false, "m should not be nil")
default:
}
// switch on interface.
switch i := interface{}("hello"); i {
case 42:
assert(false, `i should be "hello"`)
case "hello":
assert(true, "hello")
default:
assert(false, `i should be "hello"`)
}
// switch on implicit bool converted to interface
// was broken: see issue 3980
switch i := interface{}(true); {
case i:
assert(true, "true")
case false:
assert(false, "i should be true")
default:
assert(false, "i should be true")
}
// switch on interface with constant cases differing by type.
// was rejected by compiler: see issue 4781
type T int
type B bool
type F float64
type S string
switch i := interface{}(float64(1.0)); i {
case nil:
assert(false, "i should be float64(1.0)")
case (*int)(nil):
assert(false, "i should be float64(1.0)")
case 1:
assert(false, "i should be float64(1.0)")
case T(1):
assert(false, "i should be float64(1.0)")
case F(1.0):
assert(false, "i should be float64(1.0)")
case 1.0:
assert(true, "true")
case "hello":
assert(false, "i should be float64(1.0)")
case S("hello"):
assert(false, "i should be float64(1.0)")
case true, B(false):
assert(false, "i should be float64(1.0)")
case false, B(true):
assert(false, "i should be float64(1.0)")
}
// switch on array.
switch ar := [3]int{1, 2, 3}; ar {
case [3]int{1, 2, 3}:
assert(true, "[1 2 3]")
case [3]int{4, 5, 6}:
assert(false, "ar should be [1 2 3]")
default:
assert(false, "ar should be [1 2 3]")
}
// switch on channel
switch c1, c2 := make(chan int), make(chan int); c1 {
case nil:
assert(false, "c1 did not match itself")
case c2:
assert(false, "c1 did not match itself")
case c1:
assert(true, "chan")
default:
assert(false, "c1 did not match itself")
}
// empty switch
switch {
}
// empty switch with default case.
fired = false
switch {
default:
fired = true
}
assert(fired, "fail")
// Default and fallthrough.
count = 0
switch {
default:
count++
fallthrough
case false:
count++
}
assert(count == 2, "fail")
// fallthrough to default, which is not at end.
count = 0
switch i5 {
case 5:
count++
fallthrough
default:
count++
case 6:
count++
}
assert(count == 2, "fail")
i := 0
switch x := 5; {
case i < x:
os.Exit(0)
case i == x:
case i > x:
os.Exit(1)
}
} | test/switch.go | 0.629775 | 0.516535 | switch.go | starcoder |
package shortestcompletingword
import "strings"
/**
* Given a string licensePlate and an array of strings words, find the shortest completing word in words.
* A completing word is a word that contains all the letters in licensePlate. Ignore numbers and spaces in licensePlate, and treat letters as case insensitive. If a letter appears more than once in licensePlate, then it must appear in the word the same number of times or more.
* For example, if licensePlate = "aBc 12c", then it contains letters 'a', 'b' (ignoring case), and 'c' twice. Possible completing words are "abccdef", "caaacab", and "cbca"
* Return the shortest completing word in words. It is guaranteed an answer exists. If there are multiple shortest completing words, return the first one that occurs in words.
*
* Input: licensePlate = "1s3 PSt", words = ["step","steps","stripe","stepple"]
* Output: "steps"
*
* @link https://leetcode.com/problems/shortest-completing-word/
*/
// ShortestCompletingWord ...
func ShortestCompletingWord(licensePlate string, words []string) string {
plateMap := map[string]int{}
for _, letterUnicode := range licensePlate {
char := string(letterUnicode)
if letterUnicode >= 65 && letterUnicode <= 90 {
char = strings.ToLower(char)
if _, ok := plateMap[char]; !ok {
plateMap[char] = 0
}
plateMap[char]++
}
if letterUnicode >= 97 && letterUnicode <= 122 {
if _, ok := plateMap[char]; !ok {
plateMap[char] = 0
}
plateMap[char]++
}
}
possibleWords := []string{}
for _, word := range words {
wordMap := map[string]int{}
for _, r := range word {
letter := string(r)
_, ok := wordMap[letter]
if !ok {
wordMap[letter] = 0
}
wordMap[letter]++
}
inc := true
for pLetter, pCount := range plateMap {
wCount, ok := wordMap[pLetter]
if !ok {
inc = false
break
}
if pCount > wCount {
inc = false
break
}
}
if inc == true {
possibleWords = append(possibleWords, word)
}
}
minWordLengthIndex := 0
minWordLength := 16
for i, word := range possibleWords {
if len(word) < minWordLength {
minWordLengthIndex = i
minWordLength = len(word)
}
}
return possibleWords[minWordLengthIndex]
} | shortestcompletingword/shortestcompletingword.go | 0.797281 | 0.544801 | shortestcompletingword.go | starcoder |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.