Skip to content

Instantly share code, notes, and snippets.

View Mohan1387's full-sized avatar
🎯
Focusing

Mohan Mohan1387

🎯
Focusing
View GitHub Profile
@Tsangares
Tsangares / instructions.md
Last active April 3, 2024 05:45
Install RedisJSON on CentOS (CentOS Stream)

DISCLAIMER

Please if this install works or you find it helpful, make a comment and star so that this gist can propogate to help others.

Installation

We are going to install rust, clang and the latest redis, along with additional utilities described below.

Dependencies

Updating

from keras.layers import Input, Dense, BatchNormalization
from keras.models import Model
from keras.callbacks import EarlyStopping
# set input layer
inputs = Input(shape=(X_train.shape[1],), name='input')
# normalized the batches
x = BatchNormalization(name='input_bn')(inputs)
import lime
import lime.lime_tabular
import pandas as pd
import numpy as np
import lightgbm as lgb
# For converting textual categories to integer labels
from sklearn.preprocessing import LabelEncoder
@nikhilkumarsingh
nikhilkumarsingh / real_time.ipynb
Created August 19, 2018 20:04
Plotting real time data using Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@frenzy2106
frenzy2106 / map_at_k.py
Last active December 22, 2021 07:17
Mean Average Precision @ K
def apk(actual, predicted, k=3):
"""
Computes the average precision at k.
This function computes the average prescision at k between two lists of
items.
Parameters
----------
actual : list
A list of elements that are to be predicted (order doesn't matter)
predicted : list
@benadaba
benadaba / K-Means Cluster Analysis - Python Code.py
Created March 20, 2016 10:09
K-Means Cluster Analysis - Python Code
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 17 00:50:16 2016
@author: Bernard
"""
from pandas import Series, DataFrame
import pandas as pd
import numpy as np