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
from feltlabs.model import load_model | |
# Load scikit-learn model | |
model = load_model("final-model-House Prices.json") | |
# Data shape must be: (number_of_samples, number_of_features) | |
data = [ | |
[1980, 2, 2, 2, 0, 0], | |
[1700, 3, 2, 3, 1, 1], | |
[2100, 3, 2, 3, 1, 0], |
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
1980 | 2 | 2 | 2 | 0 | 0 | 115900 | |
---|---|---|---|---|---|---|---|
1700 | 3 | 2 | 3 | 1 | 1 | 107500 | |
2100 | 3 | 2 | 3 | 1 | 0 | 151100 | |
1860 | 2 | 2 | 3 | 0 | 1 | 91100 | |
2150 | 2 | 3 | 4 | 0 | 1 | 117400 | |
2100 | 3 | 2 | 3 | 0 | 1 | 130800 | |
1650 | 3 | 2 | 3 | 0 | 1 | 81300 | |
1720 | 2 | 2 | 2 | 1 | 0 | 125700 | |
2190 | 3 | 2 | 3 | 1 | 0 | 140900 | |
2240 | 4 | 3 | 3 | 0 | 2 | 152300 |
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
1790 | 2 | 2 | 2 | 0 | 0 | 114300 | |
---|---|---|---|---|---|---|---|
2030 | 4 | 2 | 3 | 0 | 0 | 114200 | |
1740 | 3 | 2 | 1 | 0 | 0 | 114800 | |
1980 | 3 | 2 | 3 | 0 | 0 | 94700 | |
2130 | 3 | 3 | 3 | 0 | 0 | 119800 | |
1780 | 3 | 2 | 2 | 0 | 1 | 114600 | |
1830 | 3 | 3 | 3 | 1 | 2 | 151600 | |
2160 | 4 | 2 | 2 | 0 | 2 | 150700 | |
2110 | 4 | 2 | 3 | 0 | 0 | 119200 | |
1730 | 3 | 3 | 3 | 0 | 0 | 104000 |
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
SqFt | Bedrooms | Bathrooms | Offers | Brick | Neighborhood | Price | |
---|---|---|---|---|---|---|---|
1790 | 2 | 2 | 2 | 0 | 0 | 114300 | |
2030 | 4 | 2 | 3 | 0 | 0 | 114200 | |
1740 | 3 | 2 | 1 | 0 | 0 | 114800 | |
1980 | 3 | 2 | 3 | 0 | 0 | 94700 | |
2130 | 3 | 3 | 3 | 0 | 0 | 119800 | |
1780 | 3 | 2 | 2 | 0 | 1 | 114600 | |
1830 | 3 | 3 | 3 | 1 | 2 | 151600 | |
2160 | 4 | 2 | 2 | 0 | 2 | 150700 | |
2110 | 4 | 2 | 3 | 0 | 0 | 119200 |
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
// Empty alg file |
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
1 | 2 | 3 | |
---|---|---|---|
2 | 3 | 4 | |
2 | 3 | 4 | |
2 | 3 | 4 | |
2 | 3 | 4 | |
2 | 3 | 4 |
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 http.server | |
from pathlib import Path | |
# Get root directory | |
ROOT = Path(__file__).parent.parent | |
# Class for serving build directory | |
class Handler(http.server.SimpleHTTPRequestHandler): | |
def __init__(self, *args, **kwargs): |
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
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- "**.sol" | |
name: Deploy to testnet |
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
"""Module for encryption and decryption compatible with MetaMask.""" | |
from base64 import a85decode, a85encode | |
# PyNaCl==1.5.0 | |
from nacl.public import Box, PrivateKey, PublicKey | |
def _hex_to_bytes(hex: str) -> bytes: | |
return bytes.fromhex(hex[2:] if hex[:2] == "0x" else hex) |
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
const ascii85 = require('ascii85'); | |
async function decryptData(account: string, data: Buffer): Promise<Buffer> { | |
// Reconstructing the original object outputed by encryption | |
const structuredData = { | |
version: 'x25519-xsalsa20-poly1305', | |
ephemPublicKey: data.slice(0, 32).toString('base64'), | |
nonce: data.slice(32, 56).toString('base64'), | |
ciphertext: data.slice(56).toString('base64'), | |
}; |
NewerOlder