Skip to content

Instantly share code, notes, and snippets.

View mohit-sinha's full-sized avatar

Mohit Sinha mohit-sinha

View GitHub Profile
@mohit-sinha
mohit-sinha / yt_transcribe_n8n.json
Last active December 16, 2025 14:08
YouTube Transcribe n8n workflow
{
"name": "YouTube to PDF (via PDFShift)",
"nodes": [
{
"parameters": {},
"id": "d71f19df-2737-445f-aaa2-71284ddd9836",
"name": "When clicking ‘Execute workflow’",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
@mohit-sinha
mohit-sinha / xgb_bo.py
Created June 29, 2018 11:54
Bayesian Optimisation for XGBoost
from bayes_opt import BayesianOptimization
from sklearn.cross_validation import KFold
import xgboost as xgb
import numpy
def xgbCv(train, features, numRounds, eta, gamma, maxDepth, minChildWeight, subsample, colSample):
# prepare xgb parameters
params = {
"objective": "binary:logistic",
"booster" : "gbtree",
@mohit-sinha
mohit-sinha / lgb_bo.py
Created June 27, 2018 11:51
Use this for LightGBM parameter optimisation by Bayesian optimisation.
import pandas as pd;
import numpy as np;
import lightgbm as lgb
from bayes_opt import BayesianOptimization
from sklearn.model_selection import cross_val_score
def lgb_evaluate(
numLeaves,
maxDepth,
scaleWeight,