- No performance benchmark.
- Python ⟿
PEP-8 - Nim ⟿
NEP1 - Python ⟿
3.7 - Nim ⟿
0.19 - No Ofuscation, no Code-Golf.
This is to compare elegant, simple, expressive code.
| fork: tchaikovsky | |
| summary: Test vectors for BLS signature | |
| test_suite: bls | |
| title: BLS signature and aggregation tests | |
| version: 1.0 | |
| case01_message_hash_G2_uncompressed: | |
| - input: {domain: '0x00', message: '0x0000000000000000000000000000000000000000000000000000000000000000'} | |
| output: | |
| - ['0x091e0a8468302b0d77c06a2ef8eb7f333b742e10f0f0de240929a7afd2f59999c1d2f6eca9f44a0afe5da699578d416e', | |
| '0x09e340b0dd91932333cb24e8dbe7f440bd653ef6ec22b52162724f77a9f9effa75a3703b9ae9286275e6f9e2654b5e7c'] |
| /* Halide.h -- interface for the 'Halide' library. | |
| Copyright (c) 2012-2018 MIT CSAIL, Google Inc., and other contributors | |
| Developed by: | |
| The Halide team | |
| http://halide-lang.org | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of |
| date | |
| echo | |
| fortune | cowsay -f $(gls /usr/local/Cellar/cowsay/3.04/share/cows/ | gshuf -n1) | |
| echo | |
| if [ -f /etc/bash_completion ]; then | |
| . /etc/bash_completion | |
| fi | |
| if [ -f $HOME/.git-completion.bash ]; then |
| import | |
| deques, options, | |
| milagro_crypto, | |
| ./spec/[datatypes, crypto, digest, helpers, validator], extras, | |
| tables, hashes # For BeaconChainDB stub | |
| type | |
| AttestationCandidate* = object | |
| validator*: int | |
| data*: AttestationData |
| import algorithm | |
| func cumsum[T](x: openarray[T]): seq[T] = | |
| result = newSeq[T](x.len) | |
| result[0] = x[0] | |
| for i in 1 ..< x.len: | |
| result[i] = x[i] + result[i-1] | |
| func searchsorted[T](a, v: openarray[T], leftSide: static bool = true): seq[T] = | |
| result = newSeqUninitialized[T](v.len) |
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
| # Laser | |
| # Copyright (c) 2018 Mamy André-Ratsimbazafy | |
| # Distributed under the Apache v2 License (license terms are at http://www.apache.org/licenses/LICENSE-2.0). | |
| # This file may not be copied, modified, or distributed except according to those terms. | |
| import | |
| math | |
| const | |
| bits = 10 |
| # TODO debug multiplication with negative numbers | |
| # Laser | |
| # Copyright (c) 2018 Mamy André-Ratsimbazafy | |
| # Distributed under the Apache v2 License (license terms are at http://www.apache.org/licenses/LICENSE-2.0). | |
| # This file may not be copied, modified, or distributed except according to those terms. | |
| import ../../simd, math | |
| # ############################################################ |
| # Laser | |
| # Copyright (c) 2018 Mamy André-Ratsimbazafy | |
| # Distributed under the Apache v2 License (license terms are at http://www.apache.org/licenses/LICENSE-2.0). | |
| # This file may not be copied, modified, or distributed except according to those terms. | |
| # Generic microkernel for matrix multiplication | |
| import | |
| ./laser_gemm_tiling, ./laser_gemm_matrix, ./laser_gemm_utils, | |
| ../../../laser/[cpuinfo, compiler_optim_hints], |