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 requests | |
import json | |
# defining the api-endpoint | |
API_ENDPOINT = "https://entke6c4912e.x.pipedream.net" | |
predi = "{'data': 'awesome predication'}" | |
# data to be sent to api | |
data = json.dumps(predi) |
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 torch | |
import warnings | |
from pathlib import Path | |
from argparse import ArgumentParser | |
from pybert.train.losses import BCEWithLogLoss | |
from pybert.train.trainer import Trainer | |
from torch.utils.data import DataLoader | |
from pybert.io.bert_processor import BertProcessor | |
from pybert.common.tools import init_logger, logger | |
from pybert.common.tools import seed_everything |
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
ambari-server stop | |
ambari-agent stop | |
pkill -9 java | |
################################# | |
# Remove Packages | |
################################ | |
yum -y remove ambari-\* | |
yum -y remove hcatalog\* | |
yum -y remove hive\* |
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 random, string, urllib.request, json, getpass | |
#Generate root password | |
password = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(20)) | |
#Download ngrok | |
! wget -q -c -nc https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip | |
! unzip -qq -n ngrok-stable-linux-amd64.zip | |
#Setup sshd |