This file contains hidden or 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
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
This file contains hidden or 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
sudo snap install chromium | |
sudo snap install sublime-text --classic | |
sudo snap install pycharm-professional --classic | |
sudo snap install skype --classic | |
sudo snap install zoom-client | |
sudo snap install slack --classic | |
sudo apt install -y htop iotop build-essential python3-pip git curl | |
echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee -a /etc/apt/sources.list |
This file contains hidden or 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
set _comment "define constants" | |
set maxASize 10 | |
op mul maxASizeX2 maxASize 2 | |
set m 7 | |
set n 3 | |
set _comment "def aGetIndex" | |
op add aGetIndexLine @counter 1 | |
op add @counter @counter maxASizeX2 | |
set aGetResult a0 | |
set @counter aGetIndexCaller |
This file contains hidden or 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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.6.0; | |
contract SwapCheck { | |
function implementation1_0(uint256 x, uint256 y) public returns(uint256 xx, uint256 yy) { | |
// transaction cost: 22236 gas | |
// execution: 580 gas | |
assembly { |
This file contains hidden or 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
rabbitmq: | |
image: rabbitmq:3-management | |
hostname: rabbitmq | |
environment: | |
RABBITMQ_DEFAULT_VHOST: vhost | |
RABBITMQ_DEFAULT_USER: guest | |
RABBITMQ_DEFAULT_PASS: guest |
This file contains hidden or 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
from django.shortcuts import render | |
# def get_auctions | |
KM = 1000 | |
earth = 12742*KM | |
sun = 1.4 * 10**6 * KM | |
sun_dist = 150 * 10**6 * KM |
This file contains hidden or 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
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.1; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
contract Vesting { | |
IERC20 public immutable token; | |
struct Lock { | |
address receiver; |
This file contains hidden or 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
{"name": "Vova"} |
This file contains hidden or 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
// SPDX-License-Identifier: MIT | |
pragma solidity 0.6.12; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
import "@openzeppelin/contracts/math/SafeMath.sol"; | |
import '@openzeppelin/contracts/utils/EnumerableSet.sol'; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
import "@openzeppelin/contracts/utils/Address.sol"; | |
library DateTime { |
This file contains hidden or 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
// SPDX-License-Identifier: MIT | |
pragma solidity =0.6.12; | |
pragma experimental ABIEncoderV2; | |
interface IDexioLock { | |
function lock( | |
address owner, | |
address token, | |
uint256 amount, | |
uint256 unlockDate |