Skip to content

Instantly share code, notes, and snippets.

View NeyoxDrago's full-sized avatar
🏠
Working from home

NeyoxDrago

🏠
Working from home
View GitHub Profile
df = pd.read_csv("file.csv")
df.drop_duplicates([features_here],inplace=True)
@NeyoxDrago
NeyoxDrago / custom_RMSLE_metric_catboost.py
Last active October 24, 2020 06:15
Custom eval metric for training regression model with catboost.
class RmsleMetric(object):
def get_final_error(self, error, weight):
return np.sqrt(error / (weight + 1e-38))
def is_max_optimal(self):
return False
def evaluate(self, approxes, target, weight):
assert len(approxes) == 1
assert len(target) == len(approxes[0])
import logging
from flask import Flask, request
from telegram.ext import Updater, CommandHandler , MessageHandler , Filters, Dispatcher
from telegram import Bot , Update
#enable logging
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s %(message)s',
level= logging.INFO)
logger = logging.getLogger(__name__)
TOKEN = "1363998583:AAHSEmA8H0-YDELz3CEABNmcUrYhiaMtsOo"