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
# Load model with best rMse and make prediction | |
fileName = "results/" + "bestRegressionModel_" + str(LineaReggressionMetrics.ROOT_MEAN_SQUARED_ERROR.name) + ".sav" | |
bestRegression = joblib.load(fileName) | |
#Example ICO | |
#Format - price_usd,price_btc,total_supply,market_cap_usd,available_supply,usd_raised,eth_price_launch,btc_price_launch,ico_duration,month,day,country | |
example_x = np.array([1.71456,0.00019931,1000000000,905793616,528295082,24000000,297.63,3420.4,7,8,9,182]) | |
y_pred = makePrediction(bestRegression,example_x) | |
print("Predicted value of example ICO after six months: ",y_pred ) |
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
# Function which will be called to make a prediction | |
def makePrediction(model,example_to_predict): | |
# One-hot encode the example to match the data it was trained on. | |
encoded_x = encodeSingleElement(x,example_to_predict) | |
y_pred = model.predict(encoded_x.reshape(1, -1)) | |
return y_pred | |
# Load model with best rMse and make prediction | |
fileName = "results/" + "bestRegressionModel_" + str(LineaReggressionMetrics.ROOT_MEAN_SQUARED_ERROR.name) + ".sav" |
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
#!/bin/bash | |
MONGO_DATABASE="your_db_name" | |
APP_NAME="your_app_name" | |
HOST_NAME="host_name_or_localhost" | |
USERNAME="username_database" | |
PASSWORD="password_database" | |
MONGO_HOST="127.0.0.1" | |
MONGO_PORT="27017" |
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
import numpy as np | |
#This function retrieves all subsets in a set recursively. | |
def findSubsets(allSubsets,subset,currentIndex,maxSubsetSize): | |
if(len(subset) == currentIndex): | |
return allSubsets | |
newSet = [] | |
for i in range(0,len(allSubsets)): | |
if(len(allSubsets[i]) < maxSubsetSize): |
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
#!/bin/bash | |
chosenVPNServer=za8.nordvpn.com.udp.ovpn | |
cd /etc/openvpn | |
cd ovpn_udp | |
ls -al | |
sudo openvpn $chosenVPNServer |
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
#!/bin/bash | |
sudo apt-get install openvpn | |
cd /etc/openvpn | |
sudo wget https://downloads.nordcdn.com/configs/archives/servers/ovpn.zip | |
sudo apt-get install ca-certificates | |
sudo apt-get install unzip | |
sudo unzip ovpn.zip | |
sudo rm zip |