Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Aditya Soni AdityaSoni19031997

🎯
Focusing
Block or report user

Report or block AdityaSoni19031997

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View av_sig.md

1.251.423.0 1.279.441.0 1.257.387.0 1.275.1078.0 1.249.88.0 1.275.1080.0 1.257.401.0 1.275.1744.0 1.275.1346.0 1.249.715.0

View analyze_stack_python.py
#!/usr/bin/env python
# encoding: utf-8
import sys
def trace_calls_and_returns(frame, event, arg):
co = frame.f_code
func_name = co.co_name
if func_name == 'write':
# Ignore write() calls from print statements
View kaggle_av_nlp_preprocess.py
#from my repo
#https://github.com/AdityaSoni19031997/Machine-Learning/blob/master/AV/AV_Enigma_NLP_functional_api.ipynb
def preprocess_word(word):
# Remove punctuation
word = word.strip('\'"?!,.():;')
# Convert more than 2 letter repetitions to 2 letter
# funnnnny --> funny
word = re.sub(r'(.)\1+', r'\1\1', word)
# Remove - & '
View VisualRandomForests.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View sample.r
# Importing dataset
dataset <- read.csv('ASD.csv')
# Taking care of missing data
# Fixing ethnicity
dataset[dataset == "?"] <- NA
summary(dataset)
#install.packages('DescTools')
library(DescTools)
View kaggle_target.py
# This way we have randomness and are able to reproduce the behaviour within this cell.
np.random.seed(13)
def impact_coding(data, feature, target='y'):
'''
In this implementation we get the values and the dictionary as two different steps.
This is just because initially we were ignoring the dictionary as a result variable.
In this implementation the KFolds use shuffling. If you want reproducibility the cv
could be moved to a parameter.
View json.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AdityaSoni19031997
AdityaSoni19031997 / kaggle.py
Last active Apr 4, 2019
Kaggle Helper Scripts
View kaggle.py
import seaborn as sns
from sklearn import preprocessing, ensemble
from scipy.stats import kendalltau
import pandas as pd
import random
#todo change module name
from tqdm import tqdm
import numpy as np
import pandas as pd
You can’t perform that action at this time.