Skip to content

Instantly share code, notes, and snippets.

View abe4x4's full-sized avatar

Ibrahim Abouzeid abe4x4

View GitHub Profile
@abe4x4
abe4x4 / merkletree-solution.py
Created January 20, 2023 13:20 — forked from georgeRenard/merkletree-solution.py
Merkle Tree Implementation Solution
def build_root(self, iterable):
collection = list(iterable)
assert(len(collection) != 0)
if len(collection) % 2 != 0:
collection.append(collection[-1])
collection = [self.__Node(self.digest(x)) for x in collection]
return self.__build_root(collection)
def __build_root(self, collection):
size = len(collection)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract HotelRoom {
enum Statuses {
Vacant,
Occupied
}
Statuses public currentStatus;
## commands from terminal
mkdir my-app
cd my-app
npm init -y -- creates package.json file with default configurations
npm install react react-dom -- install react and react-dom dependencies
vim .gitignore -- creates gitigonre file
mkdir app --create app folder in your project folder
cd app
touch index.js index.css -- creates two files in app directory
npm install --save-dev @babel/core @babel/preset-env @babel/preset-react webpack webpack-cli webpack-dev-server babel-loader css-loader style-loader html-webpack-plugin -- adding all require depnendincies to the project

Keybase proof

I hereby claim:

  • I am abe4x4 on github.
  • I am drabe4x4 (https://keybase.io/drabe4x4) on keybase.
  • I have a public key ASC8BDwv6A8UihtavSSoL6u1giGhBRDp2uL7hMBxBjmZdQo

To claim this, I am signing this object: