Download the following debian packages either by navigating to the url or by doing a wget
Post Download install the packages by using a software installer or using the
$ sudo dpkg -i | import math | |
| import os | |
| import json | |
| import pandas as pd | |
| import requests | |
| from tqdm import tqdm | |
| import os | |
| import json | |
| import tempfile | |
| from datetime import datetime as dt |
Download the following debian packages either by navigating to the url or by doing a wget
Post Download install the packages by using a software installer or using the
$ sudo dpkg -i | import math | |
| import pandas as pd | |
| import numpy as np | |
| from typing import List, Tuple, Union, Dict | |
| from scipy.stats import skew, kurtosis | |
| from .errors import StepSizeError, StepTypeError, SeriesError | |
| class Statistics: | |
| """ | |
| Methods to calculate statistics all or one at a time |
| series = [1,2,3,4,5] | |
| stats = Statistics(series) | |
| mean = stats.mean() | |
| dev = stats.dev() |
I hereby claim:
I am sakethramanujam on github.
I am perceptiveproton (https://keybase.io/perceptiveproton) on keybase.
I have a public key ASCuTkJ0KbN0EWGMZtesm1qkfdmLW5kXp8n8clZMHjMhKQo
| import argparse | |
| import re | |
| from typing import Dict | |
| def args(): | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument( | |
| '-f', '--file', help='Name of file to count words from') | |
| parser.add_argument('-n', '--N', help='Number of top items', type=int) |
| # !usr/bin/env python3 | |
| import requests | |
| from bs4 import BeautifulSoup | |
| if __name__ == '__main__': | |
| url = 'https://www.who.int/countries/en/' | |
| content = requests.get(url).content | |
| soup = BeautifulSoup(content,'html5lib') | |
| divs = soup.findAll('div', attrs={'class':'largebox'}) |
| from matplotlib.lines import Line2D | |
| from matplotlib.patches import Patch | |
| def charmap(label): | |
| SUB = str.maketrans("0123456789", "₀₁₂₃₄₅₆₇₈₉") | |
| mu = chr(956) | |
| sigma = chr(963) | |
| beta = chr(946) | |
| cmap = {'mean_x': mu+'$_{\ x}$','mean_y':mu+'$_{\ y}$','mean_sum': mu+'$_{\ I}$','mean_mag': mu+'$_{\ mag}$','mean_dir':mu+'$_{\ dir}$', | |
| 'std_x':sigma+'$_{\ x}$','std_y':sigma+'$_{\ y}$','std_sum':sigma+'$_{\ I}$','std_mag':sigma+'$_{\ mag}$','std_dir':sigma+'$_{\ dir}$', |
The above code can be used as follows
path_to_save_fi = 'your/path/'
save_importances(model,y_test.columns)
| import pickle | |
| def save_pickle(model): | |
| name=input('Name of the model: ') | |
| with open(f'{name}.pickle','wb') as model: | |
| pickle.dump(rf_model,model) | |
| print('Model Saved.') | |
| def load_pickle(filename): | |
| file = open(filename,'rb') | |
| model = pickle.load(file) |