[2]
1. Напиши всички четни числа от 0 до 9 включително.
2. Напиши всички нечетни числа от 10 до 19 включително.
3. Напиши всички четни числа от 20 до 99, в които присъства цифрата
а) 1
б) 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(associated_type_defaults)] | |
#![feature(generic_const_exprs)] | |
#[derive(Debug)] | |
struct Vector<const D: usize> { | |
v: [f32; D], | |
} | |
impl<const D: usize> Vector<D> { | |
fn new() -> Self { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# NODE=${BEACON_NODE:-http://127.0.0.1:3500} | |
NODE=${BEACON_NODE:-http://testing.mainnet.beacon-api.nimbus.team} | |
out() { printf "%s %s\n" "$1" "$2"; } | |
error() { out "==> ERROR:" "$@"; } >&2 | |
die() { error "$@"; exit 1; } | |
[ -z "$1" ] && die "usage: $0 <slot> <index>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
GENESIS_SLOT = 0 | |
GENESIS_TIME = 1606824023 | |
SECONDS_PER_SLOT = 12 | |
def compute_slot_at_timestamp(ts): | |
time_since_genesis = ts - GENESIS_TIME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
python -m venv env | |
source env/bin/activate | |
python -m pip install --upgrade pip | |
python -m pip install panoramix-decompiler | |
panoramix --verbose 0x608060405260043610601d5760003560e01c8063a7a0d53714602557005b36602357005b005b602b603d565b60405190815260200160405180910390f35b6000604b6001600260036050565b905090565b600081605b8486606b565b60639190606b565b949350505050565b8082018082111560a4577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9291505056fea2646970667358221220757c61a1eafd86a1b02f30444f0267f582a66d49df50078bc5c81528bcc144ac64736f6c63430008180033 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11c11 | |
< import "../interfaces/IPool.sol"; | |
--- | |
> import "../interfaces/IPool2.sol"; | |
19c19 | |
< contract Pool is IPool, OwnablePausableUpgradeable { | |
--- | |
> contract Pool2 is IPool2, OwnablePausableUpgradeable { | |
57a58,59 | |
> mapping(bytes32 => bool) public override credentialsWhitelist; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import numpy as np | |
from matplotlib import cm | |
from matplotlib import pyplot as plt | |
xs, ys = np.meshgrid( | |
np.linspace(1/1000, 1, 999), | |
np.linspace(1/1000, 1, 999), |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq *xs* '(1 (2 (3 (4 5 6) 7) 8 9 ) 10 11)) | |
(defun flatten (xs) | |
(unless (null xs) | |
(let ((head (car xs)) | |
(tail (cdr xs))) | |
;; (message "head=%s tail=%s" (car xs) (cdr xs)) | |
(if (atom head) | |
(cons head (flatten tail)) | |
(append (flatten head) (flatten tail)))))) |
NewerOlder