- White paper link: Bitcoin: A Peer-to-Peer Electronic Cash System
- Medium article: Bitcoin: Delving into the whitepaper
- White paper link: Ethereum Whitepaper
- Medium article: Ethereum: Delving into the whitepaper
var path = require('path'); | |
var solc = require('solc'); | |
var fs = require('fs-extra'); | |
const buildPath = path.resolve(__dirname, 'build'); | |
fs.removeSync(buildPath); | |
fs.mkdirSync(buildPath); | |
fs.readdir(path.resolve(__dirname, 'contracts'), function (err, files) { | |
//listing all files using forEach |
const Web3 = require('web3'); | |
const compiledContract = require('./../build/MyContract.json'); | |
const rpcEndpoint = 'rpc-END-POINT'; | |
// you will get from ganache-GUI | |
// Setting up the provider | |
const provider = new Web3.providers.HttpProvider(rpcEndpoint); | |
const web3 = new Web3(provider); |
import matplotlib.pyplot as plt | |
import numpy as np | |
import time | |
from random import randint | |
n = 10 | |
x = [] | |
y = [] | |
plt.ion() |
import matplotlib.pyplot as plt | |
from random import randint, uniform | |
plt.rcParams['figure.figsize'] = [10, 6] | |
n = 20 | |
x = [uniform(0, 100) for i in range(n)] # x axis position | |
y = [uniform(0, 100) for i in range(n)] # y axis position | |
rad = [uniform(0, 1000) for i in range(n)] # radius of the circle | |
cat = [randint(1, 5) for i in range(n)] # category |
from time import time | |
n = 10**4 | |
arr = [i for i in range(n)] | |
def test_fun(i): | |
# some compuatations | |
a =0 | |
b =0 | |
a+=arr[i]*arr[i]*arr[i]*arr[i]*arr[i]*arr[i] | |
b+=arr[i]+arr[i]+arr[i]+arr[i]+arr[i]+arr[i] |
drop database if exists db; | |
create database db; | |
use db; | |
drop table if exists a,b; | |
create table a(attr1 varchar(50), score int(10)); | |
insert into a (attr1, score)values | |
("info1", 1), ("info2", 2); |
SET GLOBAL validate_password.length = 4; | |
SET GLOBAL validate_password.mixed_case_count = 0; | |
SET GLOBAL validate_password.number_count = 0; | |
SET GLOBAL validate_password.policy = LOW; | |
SET GLOBAL validate_password.special_char_count = 0; | |
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test'; |
import numpy as np | |
import cv2 | |
img = cv2.imread(img_path, cv2.IMREAD_GRAYSCALE) | |
img = cv2.resize(img, (20, 20)) | |
img = np.array(img).ravel() | |
img = img.reshape(-1) | |
print(img) |
def vlog(s): | |
s = str(s) | |
from gtts import gTTS | |
from os import system | |
language = 'en' | |
output = gTTS(text=s, lang=language, slow=False) | |
system("mkdir -p .vlogs") | |
output.save("./.vlogs/output.mp3") | |
system("ffplay -nodisp -autoexit ./.vlogs/output.mp3 >/dev/null 2>&1") |