script stringlengths 113 767k |
|---|
import numpy as np
import pandas as pd
import os
BATCH_SIZE = 32
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
import tensorflow_addons as tfa
import matplotlib.pyplot as plt
import re
try:
from kaggle_datasets import KaggleDatasets
except:
pass
try:
tpu = tf.dis... |
# This R environment comes with many helpful analytics packages installed
# It is defined by the kaggle/rstats Docker image: https://github.com/kaggle/docker-rstats
# For example, here's a helpful package to load
library(tidyverse) # metapackage of all tidyverse packages
# Input data files are available in the read-on... |
# ## Keşifçi Veri Analizi | Becerileri Pekiştirme
# Aşağıda ihtiyacımız doğrultusunda kullanacağımız kütüphaneleri yükleyelim.
import numpy as np
import seaborn as sns
import pandas as pd
# Veri çerçevemizi bulunduğumuz dizinden yükleyelim ve bir veri çerçevesi haline getirerek df değişkenine atayalım. (pd.read_csv(..... |
# # TPS - Mar 2021 - EDA + Models
# /med241050-56a9f68a3df78cf772abc65f.jpg)
# Packages
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# Dataset for train
df_train = pd.read_c... |
import random
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.metrics import r2_score
from sklearn.datasets import load_diabetes
x, y = load_diabetes(return_X_y=True)
# # Batch Gradient Descent
class GD:
def __init__(self, lr=0.01, epochs=1000):
se... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
# # *Hey All!*
# # *This notebook is for ur reference to make submissions*
# # *1.Go to Code Section of the Competition Page*
# # *2.Click on 'Your Work'*
# # *3.Hit 'New Notebook' and get started*
# # *You can copy paste the code below for getting started with the Ps*
import pandas as pd
import numpy as np
train = pd... |
import numpy as np
import matplotlib.pyplot as plt
from keras.preprocessing.image import (
ImageDataGenerator,
load_img,
img_to_array,
array_to_img,
)
from keras.layers import Conv2D, Flatten, MaxPooling2D, Dense
from keras.models import Sequential
import glob, os, random
base_path = "../input/garbage ... |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split
from sklearn.metrics import roc_auc_score
# # Prepare data
#
df = pd.read_csv("/kaggle/input/playground-series-s3e12/trai... |
mylist = ["apple", "banana", "mango"]
mylist
mylist = [1, 2, 3]
mylist
mylist = [True, False, True]
mylist
mylist = ["apple", True, 1]
mylist
mylist = [True, False, True]
mylist2 = ["apple", "banana", "mango"]
mylist3 = [1, 2, 3]
mylist + mylist2 + mylist3
mylist = list(("apple", "banana", "mango"))
mylist[-1]
mylist =... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import re
# Read the file into a variable fifa_data
df1 = pd.read_csv("/kaggle/input/data-news/Fake.csv")
df1["label"] = 0
df1.shape
df1.head()
df2 = pd.read_csv("/kaggle/input/data-news/True.csv")
df2["label"]... |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
train_ = pd.read_csv("/kaggle/input/playground-series-s3e12/train.csv")
test_ = pd.read_csv("/kaggle/input/playground-series-s3e12/test.csv")
original = pd.read_csv(
"/kaggle/input/kidney-stone-prediction-based-on-urine-an... |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import cv2
from sklearn.neighbors import KNeighborsClassifier
from sklearn.linear_model import LogisticRegression
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.... |
# ## Import Modul
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.model_selection import StratifiedShuffleSplit, train_test_split
# ## Read Data
df = pd.read_csv("/kaggle/input/dataset-covid-19-2020-2021/data.csv")
df.tail(5)
target_column = "Province"
split = ... |
# Importing libraries
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
# Setting up the numbers of columns to show
pd.set_option("display.max_columns", 10)
# Importing the dataset
df = pd.read_csv("/kaggle/input/port-of-los-angeles/shipping_data.csv")
df
# Some names, are in... |
# # Intro to Python - DataCamp
# **Python** is the most powerful programming language for Data Science (**R** is another mentionable one).
# ## List Indexing
var_list = ["py", 2, "3rd", "last_element"]
# Subsetting list
# Calling 1st element
print(var_list[0]) # Python is a zero-indexed programming language
# Calling ... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split
from... |
# # Exp 꼴의 손실 함수
# ----------------------------------------
# 손실 함수가 음수 값이 나올 경우에, 가독성이 떨어지는 문제를 해결하기 위함.
# 밑이 자연대수(e)인 지수함수에 기존 손실값을 대입한 손실 함수와, 기존 손실 함수의 성능 비교.
from __future__ import print_function
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import ... |
from tqdm.auto import tqdm
from collections import defaultdict
import pandas as pd
import numpy as np
import os
import random
import gc
import cv2
import glob
gc.enable()
pd.set_option("display.max_columns", None)
# Visialisation
import matplotlib.pyplot as plt
# Image Aug
import albumentations
from albumentations.py... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
a = 8
print(a)
type(a)
c = 2.3
b = "abc123"
print(b)
type(c)
# Variabes With Number
# **Integer, Floating, Cpmlex number**
a = 234.5
print(a)
type(a)
a = 2 + 3j
print(a)
type(a)
# **"Working with multiple variable"**
Gross_profit = 15
Revenue = 100
Gross_Profit_Margin = (Gross_profit / Revenue) * 100
print(Gross_Prof... |
# # Import Packages
# Data Handling
import numpy as np
import pandas as pd
# Model Selection
from sklearn.model_selection import train_test_split
# Make and Compose Pipeline
from sklearn.pipeline import make_pipeline
from sklearn.compose import make_column_transformer
# Preprocessing
## Missing Values
from sklearn.i... |
# # Agenda of the meeting
# * How recent developments in AI could impact us as software engineers?
# * What exactly goes behind the scenes in a simple AI/ML Model? how does it work?
# * Intro to Natural Language Processing, what are LLMs, How ChatGPT works?
# # Recents Advancements in NLP
#
# * All of us have beein... |
# # InstructPix2Pix
# ## Change the runtime to GPU and install all the dependencies.
# ## Import all the installed required libraries and load the models.
import os
import glob
import tarfile
import shutil
import random
import requests
import torch
import PIL
from PIL import ImageOps
from IPython.display import displa... |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import random, os, glob, cv2, h5py
from keras.models import Model, model_from_json
from sklearn import svm
from sklearn.utils import shuffle
from sklearn.metrics import classification_report, accuracy_score, f1_score
from sklearn.pipeline import mak... |
# loading the library
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
# loading the datasets
train = pd.read_csv("/kaggle/input/playground-series-s3e12/train.csv", index_col=0)
test = pd.read_csv("/kaggle/input/playground-series-s3e12/test.csv", index_col=0)
submission_file... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
from sklearn.preprocessing import StandardScaler
from sklearn.metrics import roc_auc_score
from sklearn.model_selection import StratifiedKFold
from catboost import CatBoostClassifier
from functools import partia... |
NUM_SENTENCE = 4
import pandas as pd
df_train = pd.read_csv("/kaggle/input/mtsamples-v2/summ_train.tsv", sep="\t")
df_test = pd.read_csv("/kaggle/input/mtsamples-v2/summ_test_new.tsv", sep="\t")
# df = pd.concat([df_train, df_test], ignore_index = True)
df_train.shape, df_test.shape
df_train.sample(2)
from sumy.parser... |
# # Welcome to import land
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input direc... |
# # Import Library
# Data load
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from scipy import stats
# Preprocessing
from sklearn.feature_selection import SelectKBest, f_regression
from sklearn.preprocessing import MinMaxScaler, OrdinalEncoder
# Modeling
from sklearn.ens... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import matplotlib.pyplot as plt
# Input data files are available in the "../input/" directory.
# For example, running this (by clicking run or pressing Shift+Enter) will list the files in the input directory
# ... |
import numpy as np
import matplotlib.pyplot as plt
class Helper_functions:
def Acceleration(position, mass, G):
"""
Calculate the acceleration on each particle due to Newton's Law
pos is an N x 3 matrix of positions
mass is an N x 1 vector of masses
G is Newton's Gravitati... |
import tensorflow as tf
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import cv2
import random
import os
from tensorflow.keras import layers
from tensorflow.keras.layers import *
from tensorflow.keras.models import Sequential
print(tf.__version__)
gpus = tf.config.experim... |
# **Task**: It is your job to predict the sales price for each house. For each Id in the test set, you must predict the value of the SalePrice variable.
# **Evaluation**: Submissions are evaluated on Root-Mean-Squared-Error (RMSE) between the logarithm of the predicted value and the logarithm of the observed sales pric... |
import numpy as np
import pandas as pd
TRAIN_PATH = "/kaggle/input/titanic/train.csv"
CATEGORY_DELETE_BASESIZE = 20
train = pd.read_csv(TRAIN_PATH)
train.info()
# # 1.delete columns
len(train["Name"].value_counts())
len(train["Sex"].value_counts())
len(train["Cabin"].value_counts())
len(train["Embarked"].value_counts... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
# # Welcome to my Kernel !
# # Introduction
# This particular challenge is perfect for data scientists looking to get started with Natural Language Processing.
# Competition Description
# Twitter has become an important communication channel in times of emergency.
# The ubiquitousness of smartphones enables people to a... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
import seaborn as sns
# Reading the file
data = pd.read_csv("/kaggle/input/corona-virus-report/country_wise_latest.csv")
# **to display the data from csv file**
data
# **info() tells The information contains the number of columns, column lab... |
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
sns.set_palette("Set2")
from sklearn.model_selection import train_test_split
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"
pd.set_option("display.max_columns", None... |
# # What is about ?
# Analysis of the splicing related genes for the NIPS2021 CITE-seq data.
# # Preparations
import matplotlib.pyplot as plt
import seaborn as sns
import time
t0start = time.time()
import gc
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
#... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
from collections import Counter
import cv2
import os
import glob
import skimage
import numpy as np
import pandas as pd
import seaborn as sn
import preprocessing
from tqdm import tqdm
from PIL import Image
from os import listdir
import matplotlib.pyplot as plt
from skimage.transform import resize
from collections import... |
from pathlib import Path
import json
import math
import time
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
from torch.utils.data import Dataset, DataLoader
import torchinfo
from tqdm import tqdm
import onnx
import onnxruntime
import onnx_tf
import tensorflow as tf
import tflite_runtime.inter... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
import numpy as np
import scipy.io
import scipy
import numpy.matlib
import scipy.stats
from sklearn.decomposition import PCA
import sys
import scipy.sparse as sps
import time
import warnings
warnings.filterwarnings("ignore")
def Config(source=None, target=None):
"""Initiazation of necessary parametrs for compuat... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
# 克隆YLCLS项目并安装依赖包
# 使用wandb可视化展示,需要注册wandb账号
import wandb
from kaggle_secrets import UserSecretsClient
user_secrets = UserSecretsClient()
wandb_api = user_secrets.get_secret("wandb_key")
wandb.login(key=wandb_api)
import warnings
warnings.filterwarnings("ignore")
from ylcls import cifar10_clsconfig_dict, get_config, ... |
# # **Introduction**
# This is my first machine learning kernel. I used logistic regression.
# ## **Content:**
# 1. [Load and check data](#1)
# 1. [Variable Description](#2)
# 1. [Normalization](#3)
# 1. [Train Test Split](#4)
# 1. [Paramter Initialize and Sigmoid Function](#5)
# 1. [Forward and Backward Propagation](#... |
# Naive Bayes Classifier
# **Importing Important Libraries**
import pandas as pd
# **Reading CSV File**
df = pd.read_csv("/kaggle/input/titanic/train.csv")
df.head()
# **Removing unwanted Column's**
df.drop(
["PassengerId", "Name", "SibSp", "Parch", "Ticket", "Cabin", "Embarked"],
axis="columns",
inplace=... |
# #### 0) Import the numpy library. The most common name. You could choose not to name it, but you will need to type numpy for everything instead of np.
# 0
import numpy as np
# 1. 1) Create a 1d array, 20 elements, with your favorite number in it.
# 1
np.full(20, 3)
# 1. #### 2) Create a 2d array, 9 rows... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
# Welcome to this project. This is actually an excel project that I have decided to tackle with both Python and Excel. This part concerns the analysis of bike rides with Python.
# # Initializing Python packages
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
# # Importing t... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
# # 1 | Lasso Regression
# First of all lets understand what the hell is this `Regression`???
# **What** - `Regression` is just like the lost brother of `classification`. In `classification` we have `discrete` or `particular values`, that we want to `classify`, In `regression` we have `continuous values`, that we want ... |
import pandas as pd
from sklearn.model_selection import train_test_split
df = pd.read_csv("/kaggle/input/cleaned-mentalhealth/dataset.csv")
df = df.dropna(subset=["Sentence"])
df.Sentence = [str(text) for text in df.Sentence]
df = df.sample(n=300000, random_state=0)
df.shape
from sklearn import preprocessing
label_en... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
from google.colab import drive
drive.mount("/content/drive", force_remount=True)
# # **Aplicações de Redes complexas: Política**
# Neste trabalho, foram utilizados dados de votações da Câmara dos Deputados do Brasil para modelar deputados considerando seus posicionamentos na votação de proposições.
# Trabalho publica... |
import os
import glob
from collections import namedtuple
import functools
import csv
CandidateInfoTuple = namedtuple(
"CandidateInfoTuple",
"isNodule_bool, diameter_mm, series_uid, center_xyz",
)
# cache the results of func call in the memory
@functools.lru_cache()
def getCandidateInfoList(requireOnDisk_bool... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
sns.set()
import holidays
from datetime import datetime
from sklearn.feature_selection import f_regression
from sklearn.metrics import mean_squared_error
from sklearn.model_selection import KFold, TimeSeriesSplit
from xgboost ... |
# # 1. Introduction
# Name: Tomasz Abels and Jack Chen
# Username: JackChenXJ
# Score:
# Leaderbord rank:
# # 2. Data
# ### 2.1 Dataset
# In this section, we load and explore the dataset.
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import matplotlib.pyplo... |
import tensorflow as tf
import numpy as np
from sklearn.model_selection import train_test_split
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv("../input/diabetes-data/pima-indians-diabetes.csv")
df.columns
column_name = [
"Pregnancies",
"Glucose",
"BloodPressure",
"SkinThickness",... |
# <div style="color:#485053;
# display:fill;
# border-radius:0px;
# background-color:#86C2DE;
# font-size:200%;
# padding-left:40px;
# font-family:Verdana;
# font-weight:600;
# letter-spacing:0.5px;
# ">
# <p style="padding: 15px;
# color:white;
# text-align: center;">
# DATA WAREHOUSING AND MINING (CSE5021)
# ## Assig... |
# # Para Ilustração | Utilizado Originalmente Localmente com Jupyter Notebook
# import shutil
import os
# import glob
# import cv2
# import matplotlib.pyplot as plt
# import matplotlib.image as mpimg
# from PIL import Image
# import mahotas
import numpy as np
# import pandas as pd
from keras.preprocessing.image impor... |
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname, _, filenames in os.walk("/kaggle/input"):
for filename in filenames:
print(os.path.join(dirname,... |
# techgabyte.com
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
import matplotlib.pyplot as plt
# Input data files are available in... |
import os
import random
import numpy as np
import pandas as pd
import tensorflow as tf
from tensorflow import keras
data_dir = "/kaggle/input/preprocessed-brain-mri-images/brain-tumor/processed-images"
batch_size = 32
img_height = 224
img_width = 224
data = []
labels = []
for subdir in os.listdir(data_dir):
subdir... |
# * [Introduction](#chapter1)
# * [Theory](#chapter2)
# * [Importing Data & Libraries](#chapter3)
# * [Extracting Tweet Metadata](#chapter4)
# * [Cleaning Tweets](#chapter5)
# * [EDA](#chapter6)
# * [BERT Model](#chapter7)
# * [Building Model Architecture](#section_7_1)
# * [Defining Pre-Processing and Training ... |
# - author : Sitanan Damrongkaviriyapan
# - studentID : 6341223226
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) w... |
# # Prediction of Sales ( Based on advertisement cost ) EDA & ML modeling
# ## 1) Importing Dataset and Libraries
# ### 1- 1) Importing Libraries
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
# data processing
from sklearn.preprocessing import Normalizer, StandardScaler
... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
# # I had reached 96% accuracy with binary_classification using SVC algorithm
# # Gathering Data
# import liabraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.preprocessing import MinMaxScaler
from imblearn.over_sampling import SMOTE
from sklearn.model_sel... |
# Let's make all the csv files in our folder into a single dataframe.
import pandas as pd
import os
from os import listdir
from os.path import isfile, join
import glob
df = pd.concat(
map(
pd.read_csv,
glob.glob(
os.path.join(
"",
"../input/borsa-istanbul... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_csv("/kaggle/input/breast-cancer-wisconsin-data/data.csv")
df.head() # LEITURA DA BASE
df.columns[-1]
df.drop(
labels=df.columns[-1], axis=1, inplace=True
) # REMOÇÃO DE ÚLTIMA COLUNA COM VAL... |
# # The Relationship Between GDP and Life Expectancy
# ### Table of Contents
# * [Goals](#goals)
# * [Scoping](#scoping)
# * [Data](#data)
# * [Time Series Analysis](#tsa)
# - [Life Expectancy](#le)
# - [GDP](#gdp)
# - [Average GDP vs Life Expectancy](#gdp-le)
# * [Time Series Multivariate Analysis](#ts-ma)
# - [Zimbab... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
from glob import glob
from sklearn.model_selection import GroupKFold, StratifiedKFold
import cv2
from skimage import io
import torch
from torch import nn
import os
from datetime import datetime
import time
import random
import cv2
import torchvision
from torchvision import transforms
import pandas as pd
import numpy as... |
# ## Read Data
import numpy as np
import pandas as pd
train = pd.read_csv(
r"/kaggle/input/test-competition-2783456756923/airline_tweets_train.csv"
)
test = pd.read_csv(
r"/kaggle/input/test-competition-2783456756923/airline_tweets_test.csv"
)
# ## Feature Engineering
# * Feature Extraction
# * Data Cleaning ... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
warnings.filterwarnings("ignore")
df = pd.read_csv("Bengaluru_House_Data.csv")
df.head()
df.info()
df.shape
df.isnull().sum()
df.isnull().sum() / df.isnull().sum().sum() * 100
df.describe().T
# Dropping Societ... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
import numpy as np
import pandas as pd
from time import time
# import pytorch and set dgl backend to pytorch
import os
os.environ["DGLBACKEND"] = "pytorch"
import torch
import torch.nn as nn
import torch.nn.functional as F
try:
import dgl
except ModuleNotFoundError:
import dgl
import networkx as nx
import ma... |
# # Introduction
# The current data set includes details of the 500 people who have opted for loan. Also, the data mentions whether the person has paid back the loan or not and if paid, in how many days they have paid. In this project, we will try to draw few insights on sample Loan data.
# Please find the details of d... |
import pandas as pd
import numpy as np
from collections import Counter
import nltk
from nltk.corpus import stopwords
nltk.download("stopwords")
from nltk.tokenize import word_tokenize
import re
import matplotlib.pyplot as plt
from wordcloud import WordCloud, STOPWORDS
def plot_words(date="today"):
df = pd.read_c... |
# # Welcome to my first Model and my graduation project too.
# # This model is about classify child if he/she is normal child or he/she has any facial symptoms of any diseases.
# # Special Thanks to my friend Omar Salah for helping me in this model.
# # Let's Start with Importing classes.
# import modules
import pandas... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
# # 1. Introduction
# Name: Tomasz Abels and Jack Chen
# Username: JackChenXJ
# Score:
# Leaderbord rank:
# # 2. Data
# ### 2.1 Dataset
# In this section, we load and explore the dataset.
#
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import matplotlib.pyp... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
python_version = "3.9"
env_name = "name"
import os
old_path = os.environ["PATH"]
new_path = f"/opt/conda/envs/{env_name}/bin:{old_path}"
import sys
if __name__ == "__main__":
print(sys.path)
|
from numpy.random import randint
from numpy.random import rand
def objective(x):
return x[0] ** 2.0 + x[1] ** 2.0
def decode(bounds, n_bits, bitstring):
decoded = list()
largest = 2**n_bits
for i in range(len(bounds)):
# extract the substring
start, end = i * n_bits, (i * n_bits) + n... |
# Python Libraries
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Libraries for Visualization
import plotly.express as px
import matplotlib.pyplot as plt
# Library for splitting the data in Train and Test
from sklearn.model_selection import train_test_sp... |
from mpl_toolkits.mplot3d import Axes3D
from sklearn.preprocessing import StandardScaler
import matplotlib.pyplot as plt # plotting
import numpy as np # linear algebra
import os # accessing directory structure
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import torch
import torch.nn as nn
... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# Input data files are available in the read-only "../input/" directory
# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory
import os
for dirname... |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from tqdm import tqdm
import wordcloud
import re
sns.set_style("whitegrid")
data = pd.read_csv(
"/kaggle/input/protocols-texts/data_with_price_text_preprocessed.csv"
)
data = data.dropna(subset=["text"])
data.head()
# # D... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.