code stringlengths 2.5k 150k | kind stringclasses 1
value |
|---|---|
# <font color=green> PYTHON PARA DATA SCIENCE - PANDAS
---
# <font color=green> 1. INTRODUÇÃO AO PYTHON
---
# 1.1 Introdução
> Python é uma linguagem de programação de alto nível com suporte a múltiplos paradigmas de programação. É um projeto *open source* e desde seu surgimento, em 1991, vem se tornando uma das lin... | github_jupyter |
<a href="https://colab.research.google.com/github/google/applied-machine-learning-intensive/blob/master/content/03_regression/04_polynomial_regression/colab.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
#### Copyright 2020 Google LLC.
```
# Licen... | github_jupyter |
# Portfolio Variance
```
import sys
!{sys.executable} -m pip install -r requirements.txt
import numpy as np
import pandas as pd
import time
import os
import quiz_helper
import matplotlib.pyplot as plt
%matplotlib inline
plt.style.use('ggplot')
plt.rcParams['figure.figsize'] = (14, 8)
```
### data bundle
```
import o... | github_jupyter |
# Unit Testing ML Code: Hands-on Exercise (Data Engineering)
## In this notebook we will explore unit tests for data engineering
#### We will use a classic toy dataset: the Iris plants dataset, which comes included with scikit-learn
Dataset details: https://scikit-learn.org/stable/datasets/index.html#iris-plants-data... | github_jupyter |
<a href="https://colab.research.google.com/github/abdurahman02/AcademicContent/blob/master/FederatedCF011.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
import matplotlib.pyplot as plt
from pathlib import Path
import pandas as pd
import numpy a... | github_jupyter |
```
### Human Motion Prediction Example ###
# state-of-the-art approaches use recusive encoders and decoders.
# this is meant to be a gentle introduction, not the "best" approach
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
### Autoencoder Model ###
... | github_jupyter |
# Exploring Weather Trends
### by Phone Thiri Yadana
In this project, we will analyze Gobal vs Singapore weather data across 10 Years Moving Average.
[<img src="./new24397338.png"/>](https://www.vectorstock.com/royalty-free-vector/kawaii-world-and-thermometer-cartoon-vector-24397338)
-------------
```
import pandas... | github_jupyter |
##### Copyright © 2019 The TensorFlow Authors.
```
#@title Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | github_jupyter |
# Getting Started with BlazingSQL
In this notebook, we will cover:
- How to set up [BlazingSQL](https://blazingsql.com) and the [RAPIDS AI](https://rapids.ai/) suite.
- How to read and query csv files with cuDF and BlazingSQL.
 | **1: Introduction to xarray** | [2: Daymet data access](gridded_data_tutorial_2.ipynb) | [3: Investigating SWE at Mt. Rainier with Daymet](gridded_data_tutorial_3.ipynb)
# Notebook 1: Introduction to xarray
Waterhackweek 2020 | Steven Pestana (spestana@uw.edu... | github_jupyter |
```
%matplotlib inline
from ipywidgets import interact, FloatSlider, HTML
from IPython.display import display
import matplotlib.pyplot as plt
import matplotlib
matplotlib.rc('font',size=18)
import matplotlib.ticker as plticker
import matplotlib.patches as patches
import numpy as np
import warnings
import os.path
from... | github_jupyter |
"""Which Classifier is Should I Choose?
This is one of the most import questions to ask when approaching a machine learning
problem.I find it easier to just test them all at once. """
```
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
def warn(*args, **kwargs): pass
impor... | github_jupyter |
# Import key libraries
```
import numpy as np
import pandas as pd
import scipy
import bt
import ffn
import jhtalib as jhta
import datetime
# import matplotlib as plt
import seaborn as sns
sns.set()
import datetime
import matplotlib.pyplot as plt
%matplotlib inline
```
# Import the datareader with fix
```
st... | github_jupyter |
# Big Query Connector - Quick Start
The BigQuery connector enables you to read/write data within BigQuery with ease and integrate it with YData's platform.
Reading a dataset from BigQuery directly into a YData's `Dataset` allows its usage for Data Quality, Data Synthetisation and Preprocessing blocks.
## Storage and ... | github_jupyter |
# Developing a Pretrained Alexnet model using ManufacturingNet
###### To know more about the manufacturingnet please visit: http://manufacturingnet.io/
```
import ManufacturingNet
import numpy as np
```
First we import manufacturingnet. Using manufacturingnet we can create deep learning models with greater ease.
I... | github_jupyter |
# d_logisticRegression
----
Written in the Python 3.7.9 Environment with the following package versions
* joblib 1.0.1
* numpy 1.19.5
* pandas 1.3.1
* scikit-learn 0.24.2
* tensorflow 2.5.0
By Nicole Lund
This Jupyter Notebook tunes a Logistic Regression model for Exoplanet classif... | github_jupyter |
```
# reload packages
%load_ext autoreload
%autoreload 2
```
### Choose GPU (this may not be needed on your computer)
```
%env CUDA_DEVICE_ORDER=PCI_BUS_ID
%env CUDA_VISIBLE_DEVICES=''
```
### load packages
```
from tfumap.umap import tfUMAP
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt... | github_jupyter |
```
import tensorflow as tf
label_dict={"with_mask":0, "without_mask":1} #dictionary
categories=["with_mask","without_mask"] #list
label=[0,1]
data_path="C:\\Users\\anush\\Documents\\dataset"
import cv2,os
data=[]
target=[] #empty lists
for category in categories:
folder_path=os.path.join(data_path,cat... | github_jupyter |
# Power Production Project for *Fundamentals of Data Analysis* at GMIT
by Radek Wojtczak G00352936<br>
**Instructions:**
>In this project you must perform and explain simple linear regression using Python
on the powerproduction dataset. The goal is to accurately predict wind turbine power output from wind speed va... | github_jupyter |
# Building a Machine Learning model to detect spam in SMS
> Building a machine learing model to predict that a SMS messages is spam or not
- toc: true
- badges: true
- comments: true
- categories: [jupyter]
In this notebook, we'll show how to build a simple machine learning model to predict that a SMS is spam or not... | github_jupyter |
```
import random
import torch.nn as nn
import torch
import pickle
import pandas as pd
from pandas import Series, DataFrame
from pandarallel import pandarallel
pandarallel.initialize(progress_bar=False)
from sklearn.metrics import roc_auc_score, roc_curve, accuracy_score, matthews_corrcoef, f1_score, precision_score, r... | github_jupyter |
# SEIRHVD model example
## Work in progress (equations not ready)
\begin{align}
\dot{S} & = S_f - \alpha\beta\frac{SI}{N+k_I I+k_R R} + r_{R\_S} R\\
\dot{E} & = E_f + \alpha\beta\frac{SI}{N+k_I I+k_R R} - E\frac{1}{t_{E\_I}} \\
\dot{I} & = I_f + E\frac{1}{t_{E\_I}} - I\frac{1}{t_{I\_R}} \\
\dot{R} & = R_f + I\frac{1}{t... | github_jupyter |
# Neural networks with PyTorch
Deep learning networks tend to be massive with dozens or hundreds of layers, that's where the term "deep" comes from. You can build one of these deep networks using only weight matrices as we did in the previous notebook, but in general it's very cumbersome and difficult to implement. Py... | github_jupyter |
```
#pip install python-binance
from binance import Client
import pandas as pd
import matplotlib.pyplot as plt
import time
with open('access.txt') as f:
acc = f.readlines()
api = acc[0].strip()
key = acc[1].strip()
client = Client(api,key)
def get_interval_data(currency, interval, lookback):
interval_data = pd.... | github_jupyter |
# Tigergraph<>Graphistry Fraud Demo: Raw REST
Accesses Tigergraph's fraud demo directly via manual REST calls
```
#!pip install graphistry
import pandas as pd
import graphistry
import requests
#graphistry.register(key='MY_API_KEY', server='labs.graphistry.com', api=2)
TIGER = "http://MY_TIGER_SERVER:9000"
#curl -X... | github_jupyter |
# Project 1
- **Team Members**: Chika Ozodiegwu, Kelsey Wyatt, Libardo Lambrano, Kurt Pessa

### Data set used:
* https://open-fdoh.hub.arcgis.com/datasets/florida-covid19-case-line-data
```
import requests
import pandas as pd
import io
import datetime as dt
import numpy as np
imp... | github_jupyter |
# Benchmark NumPyro in large dataset
This notebook uses `numpyro` and replicates experiments in references [1] which evaluates the performance of NUTS on various frameworks. The benchmark is run with CUDA 10.1 on a NVIDIA RTX 2070.
```
import time
import numpy as np
import jax.numpy as jnp
from jax import random
i... | github_jupyter |
```
import pandas as pd
df = pd.read_csv(r'C:\Users\rohit\Documents\Flight Delay\flightdata.csv')
df.head()
df.shape
df.isnull().values.any()
df.isnull().sum()
df = df.drop('Unnamed: 25', axis=1)
df.isnull().sum()
df = pd.read_csv(r'C:\Users\rohit\Documents\Flight Delay\flightdata.csv')
df = df[["MONTH", "DAY_OF_MONTH... | github_jupyter |
<a href="https://colab.research.google.com/github/cindyhfls/NMA_DL_2021_project/blob/main/DifferentRegionsCorrelatedLatents/restandmove.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Focus on what matters: inferring low-dimensional dynamics from ... | github_jupyter |
```
import pymongo
import pandas as pd
import numpy as np
from pymongo import MongoClient
from bson.objectid import ObjectId
import datetime
import matplotlib.pyplot as plt
from collections import defaultdict
%matplotlib inline
import json
plt.style.use('ggplot')
import seaborn as sns
from math import log10, fl... | github_jupyter |
# Imports
```
import pandas as pd
from sqlalchemy import create_engine
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('ggplot')
%matplotlib inline
np.set_printoptions(suppress=True)
```
Goal: Use use SQLAlchemy to investigate the NBA data set.
```
#This setting allows us to see... | github_jupyter |
<h1 align='center'> 8.2 Combining and Merging Datasets
<b>Database-Style DataFrame Joins
```
import pandas as pd
import numpy as np
df1 = pd.DataFrame({'key': ['b', 'b', 'a', 'c', 'a', 'a', 'b'],
'data1': range(7)})
df1
df2 = pd.DataFrame({'key': ['a', 'b', 'd'],
'data2': rang... | github_jupyter |
# Python Dictionaries
## Dictionaries
* Collection of Key - Value pairs
* also known as associative array
* unordered
* keys unique in one dictionary
* storing, extracting
```
emptyd = {}
len(emptyd)
type(emptyd)
tel = {'jack': 4098, 'sape': 4139}
print(tel)
tel['guido'] = 4127
print(tel.keys())
print(tel.values())
... | github_jupyter |
# Chapter 1 - Softmax from First Principles
## Language barriers between humans and autonomous systems
If our goal is to help humans and autnomous systems communicate, we need to speak in a common language. Just as humans have verbal and written languages to communicate ideas, so have we developed mathematical langua... | github_jupyter |
---
_You are currently looking at **version 1.1** of this notebook. To download notebooks and datafiles, as well as get help on Jupyter notebooks in the Coursera platform, visit the [Jupyter Notebook FAQ](https://www.coursera.org/learn/python-text-mining/resources/d9pwm) course resource._
---
# Assignment 1
In this... | github_jupyter |
# Predicting Boston Housing Prices
## Using XGBoost in SageMaker (Batch Transform)
_Deep Learning Nanodegree Program | Deployment_
---
As an introduction to using SageMaker's High Level Python API we will look at a relatively simple problem. Namely, we will use the [Boston Housing Dataset](https://www.cs.toronto.ed... | github_jupyter |
# Imports
```
import torch
from torch.autograd import Variable
from torch.utils.data import DataLoader
import matplotlib.pyplot as plt
import numpy as np
import sys
sys.path.insert(0, "lib/")
from utils.preprocess_sample import preprocess_sample
from utils.collate_custom import collate_custom
from utils.utils import... | github_jupyter |
<h1>Table of Contents<span class="tocSkip"></span></h1>
<div class="toc" style="margin-top: 1em;"><ul class="toc-item"><li><span><a href="#Queries" data-toc-modified-id="Queries-1"><span class="toc-item-num">1 </span>Queries</a></span><ul class="toc-item"><li><span><a href="#All-Videos" data-toc-modified-id=... | github_jupyter |
##### Copyright 2019 The TensorFlow Authors.
```
#@title Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | github_jupyter |
# Check Cell Count
## Libraries
```
import pandas
import MySQLdb
import numpy as np
import pickle
import os
```
## Functions and definitions
```
# - - - - - - - - - - - - - - - - - - - -
# Define Experiment
table = 'IsabelCLOUPAC_Per_Image'
# - - - - - - - - - - - - - - - - - - - -
def ensure_dir(file_path):
... | github_jupyter |
# Fluorescence per phase
This module allows a calculations for a second fluorescence channel, based on cells that have been binned into cell cycle phases. There is also an option to ignore the phase information.
```
import os
import re
import string
import pandas as pd
import numpy as np
import matplotlib.pyplot as p... | github_jupyter |
```
# Binary Tree Basic Implimentations
# For harder questions and answers, refer to:
# https://github.com/volkansonmez/Algorithms-and-Data-Structures-1/blob/master/Binary_Tree_All_Methods.ipynb
import numpy as np
np.random.seed(0)
class BST():
def __init__(self, root = None):
self.root = root
... | github_jupyter |
# Machine Learning Trading Bot
In this Challenge, you’ll assume the role of a financial advisor at one of the top five financial advisory firms in the world. Your firm constantly competes with the other major firms to manage and automatically trade assets in a highly dynamic environment. In recent years, your firm has... | github_jupyter |
# SVI Part II: Conditional Independence, Subsampling, and Amortization
## The Goal: Scaling SVI to Large Datasets
For a model with $N$ observations, running the `model` and `guide` and constructing the ELBO involves evaluating log pdf's whose complexity scales badly with $N$. This is a problem if we want to scale to ... | github_jupyter |
# Students Scores Prediction
Predicting the percentage of an student based on the no. of study hours using a simple linear regressor.
### Data Importing
First, we need to import our data to our environment using read_csv() method from pandas library.
```
# import pandas under alias pd
import pandas as pd
# read our ... | github_jupyter |
# How to Create NBA Shot Charts in Python #
In this post I go over how to extract a player's shot chart data and then plot it using matplotlib and seaborn .
```
%matplotlib inline
import requests
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import json
```
## Getting the data ##
Getting ... | github_jupyter |
```
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0' # specify GPUs locally
package_paths = [
'./input/pytorch-image-models/pytorch-image-models-master', #'../input/efficientnet-pytorch-07/efficientnet_pytorch-0.7.0'
'./input/pytorch-gradual-warmup-lr-master'
]
import sys;
for pth in package_paths:
sys.... | github_jupyter |
<a href="https://colab.research.google.com/github/temiafeye/Colab-Projects/blob/master/Fraud_Detection_Algorithm(Using_SOMs).ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
!pip install numpy
#Build Hybrid Deep Learning Model
import numpy as np... | github_jupyter |
```
import pandas as pd
import numpy as np
from sklearn.svm import SVR
import matplotlib.pyplot as plt
plt.style.use('fivethirtyeight')
df = pd.read_csv('../doge_v1.csv')
df = df.set_index(pd.DatetimeIndex(df['Date'].values))
df
df = df.resample('D').ffill()
df.Close.plot(figsize=(16, 2), color="red", label='Close pri... | github_jupyter |
```
# THIS SCRIPT IS TO GENERATE AGGREGATIONS OF EXPLANATIONS for interesting FINDINGS
%load_ext autoreload
%autoreload 2
import os
import json
import numpy as np
from matplotlib.colors import LinearSegmentedColormap
import torch.nn.functional as F
import torchvision
from torchvision import models
from torchvision imp... | github_jupyter |
# Ejercicios de agua subterránea
```
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
%matplotlib inline
plt.style.use('dark_background')
#plt.style.use('seaborn-whitegrid')
```
## <font color=steelblue>Ejercicio 1 - Infiltración. Método de Green-Ampt
<font color=steelblue>Usando el mode... | github_jupyter |
```
import numpy as np
'''
Convolution class using no padding
param func - activation function
param d_func - derivative of activation function
param last_layer - point to last layer, which pass the value over
param input_num - numbers of input feature maps/images
param input_size - input feature maps/images size
par... | github_jupyter |
```
%matplotlib inline
```
Training a Classifier
=====================
This is it. You have seen how to define neural networks, compute loss and make
updates to the weights of the network.
Now you might be thinking,
What about data?
----------------
Generally, when you have to deal with image, text, audio or vide... | github_jupyter |
```
#from nbdev import *
%load_ext autoreload
%autoreload 2
#%nbdev_hide
#import sys
#sys.path.append("..")
```
# Examples
> Examples of the PCT library in use.
```
import gym
render=False
runs=1
#gui
render=True
runs=2000
```
## Cartpole
Cartpole is an Open AI gym environment for the inverted pendulum problem. T... | github_jupyter |
A notebook to visualize some of the test systems in the C++ test code in `Code/GraphMol/RGroupDecomposition/testRGroupDecomp.cpp`
```
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem.Draw import IPythonConsole
IPythonConsole.ipython_useSVG=True
from rdkit.Chem.rdRGroupDecomposition import RGroupDe... | github_jupyter |
# Getting Started with NumPy
<h1>Table of Contents<span class="tocSkip"></span></h1>
<div class="toc"><ul class="toc-item"><li><span><a href="#Getting-Started-with-NumPy" data-toc-modified-id="Getting-Started-with-NumPy-1"><span class="toc-item-num">1 </span>Getting Started with NumPy</a></span><ul class="t... | github_jupyter |
RMedian : Phase 3 / Clean Up Phase
```
import math
import random
import statistics
```
Testfälle :
```
# User input
testcase = 3
# Automatic
X = [i for i in range(101)]
cnt = [0 for _ in range(101)]
# ------------------------------------------------------------
# Testcase 1 : Det - max(sumL, sumR) > n/2
# Unlaban... | github_jupyter |
# CS229: Problem Set 1
## Problem 3: Gaussian Discriminant Analysis
**C. Combier**
This iPython Notebook provides solutions to Stanford's CS229 (Machine Learning, Fall 2017) graduate course problem set 1, taught by Andrew Ng.
The problem set can be found here: [./ps1.pdf](ps1.pdf)
I chose to write the solutions to... | github_jupyter |
# Images
```
import pathlib
import tensorflow as tf
import matplotlib.pyplot as plt
dataset_url = "https://storage.googleapis.com/download.tensorflow.org/example_images/flower_photos.tgz"
data_dir = tf.keras.utils.get_file(origin=dataset_url,
fname='flower_photos',
... | github_jupyter |
# Debug centering issue
```
# Imports
import os
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
%matplotlib inline
from astropy.io import fits
import astropy.units as u
import hcipy as hc
from hcipy.optics.segmented_mirror import SegmentedMirror
os.chdir('../../pastis/')
impor... | github_jupyter |
# Some fun with functions and fractals (Informatics II)
author: Tsjerk Wassenaar
The topic of this tutorial is advanced functions in Python. This consists of several aspects:
* Functions with variable arguments lists (\*args and \*\*kwargs)
* Recursive functions
* Functions as objects
* Functions returning functions... | github_jupyter |
```
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
%matplotlib inline
import astropy.coordinates as coord
from astropy.table import Table
import astropy.units as u
import gala.coordinates as gc
import gala.dynamics as gd
from gala.dynamics import mockstream
import gala.potential as gp
fro... | github_jupyter |
```
import arviz as az
import pystan
import numpy as np
import ujson as json
with open("radon.json", "rb") as f:
radon_data = json.load(f)
key_renaming = {"x": "floor_idx", "county": "county_idx", "u": "uranium"}
radon_data = {
key_renaming.get(key, key): np.array(value) if isinstance(value, list) else value
... | github_jupyter |
# Variable Distribution Type Tests (Gaussian)
- Shapiro-Wilk Test
- D’Agostino’s K^2 Test
- Anderson-Darling Test
```
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
sns.set(font_scale=2, palette= "viridis")
from scipy import stats
data = pd.read_csv('../data/pulse_data.... | github_jupyter |
```
#data manipulation
from pathlib import Path
import numpy as np
from numpy import percentile
from datetime import datetime, timedelta
import xarray as xr
import pandas as pd
import statsmodels.api as sm
from statsmodels.sandbox.regression.predstd import wls_prediction_std
from sklearn.model_selection import train_te... | github_jupyter |
# Collaboration and Competition
---
In this notebook, you will learn how to use the Unity ML-Agents environment for the third project of the [Deep Reinforcement Learning Nanodegree](https://www.udacity.com/course/deep-reinforcement-learning-nanodegree--nd893) program.
### 1. Start the Environment
We begin by import... | github_jupyter |
# PAOO5: High Value Customer Identification (Insiders)
## Planejamento da solução (IoT)
### Input
1. Problema de negocio
* selecionar os clientes mais valiosos para integrar um programa de fidelizacao.
2. Conjunto de dados
* Vendas de um e-commerce online, durante o periodo de um ano.
### Output
1. A indi... | github_jupyter |
# K-Nearest Neighbours
Let’s build a K-Nearest Neighbours model from scratch.
First, we will define some generic `KNN` object. In the constructor, we pass three parameters:
- The number of neighbours being used to make predictions
- The distance measure we want to use
- Whether or not we want to use weighted distanc... | github_jupyter |
<a href="https://cocl.us/Data_Science_with_Scalla_top"><img src = "https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/SC0103EN/adds/Data_Science_with_Scalla_notebook_top.png" width = 750, align = "center"></a>
<br/>
<a><img src="https://ibm.box.com/shared/static/ugcqz6ohbvff804xp84y4kqnvv... | github_jupyter |
```
import pandas as pd
import numpy as np
import json
from cold_start import get_cold_start_rating
import pyspark
spark = pyspark.sql.SparkSession.builder.getOrCreate()
sc = spark.sparkContext
ratings_df = spark.read.json('data/ratings.json').toPandas()
metadata = pd.read_csv('data/movies_metadata.csv')
request_df = s... | github_jupyter |
```
import os
import sys
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from torchsummary import summary
sys.path.append('../')
sys.path.append('../src/')
from src import utils
from src import generators
import imp
os.environ['CUD... | github_jupyter |
```
import math
import torch
from d2l.torch import load_data_nmt
from torch import nn
from d2l import torch as d2l
x = torch.randint(1,4,size=(3,3),dtype=torch.float)
x.dim()
x.reshape(-1)
torch.repeat_interleave(x.reshape(-1),repeats=2,dim=0)
#@save
def sequence_mask(X, valid_len, value=0):
"""在序列中屏蔽不相关的项"""
m... | github_jupyter |
```
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import matplotlib
matplotlib.rcParams['figure.figsize'] = [12.0, 8.0]
def plot_project_data(data_x, data_list_y, plt_range_min_x, plt_range_max_x,
short_colors = ['b', 'g', 'r'],
labels = ['mapreduce',... | github_jupyter |
```
import random
import time
import os
print()
print('''Bienvenido a la máquina tragamonedas
Comenzarás con $ 50 pesos. Se te preguntará si quieres jugar.
Responda con sí / no. también puedes usar y / n
No hay sensibilidad de mayúsculas, escríbela como quieras!
Para ganar debes obtener una de las siguientes combinacio... | github_jupyter |
Corrigir versao de scipy para Inception
```
pip install scipy==1.3.3
```
Importar bibliotecas
```
from __future__ import division, print_function
from torchvision import datasets, models, transforms
import copy
import matplotlib.pyplot as plt
import numpy as np
import os
import shutil
import time
import torch
import... | github_jupyter |
# WorkFlow
### Imports
### Load the data
### Cleanning
### FE
### Data.corr()
### Analytics
### Preproccessing
### Decomposition
### Feature Selection
### Modelling
### Random Search
### Gird Search
## Imports
```
import random
import seaborn as sns
import pandas as pd
import numpy as np
import matplotlib.pyplot as p... | github_jupyter |
<a href="https://colab.research.google.com/github/flych3r/IA025_2022S1/blob/main/ex04/matheus_xavier/IA025_A04.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Regressão Softmax com dados do MNIST utilizando gradiente descendente estocástico por mi... | github_jupyter |
```
%matplotlib notebook
import sys
sys.path.insert(1, '../../../script/')
import math
import numpy as np
import pandas as pd
import scipy.stats as stats
import matplotlib.pyplot as plt
import seaborn as sns
#import missingno as msno
from scipy.stats import mode
from scipy.spatial.distance import pdist
from scipy.clust... | github_jupyter |
# Science User Case - Inspecting a Candidate List
Ogle et al. (2016) mined the NASA/IPAC Extragalactic Database (NED) to identify a new type of galaxy: Superluminous Spiral Galaxies. Here's the paper:
Here's the paper: https://ui.adsabs.harvard.edu//#abs/2016ApJ...817..109O/abstract
Table 1 lists the positions of th... | github_jupyter |
### Importing Libraries
```
import tensorflow as tf
from keras.preprocessing.image import ImageDataGenerator
tf.__version__
```
### Data Preprocessing
#### Preprocessing trainingset
- preprocessing training set helps prevent overfitting
- generatig new images with feature scaling (rescale param)
- data augmentation ... | github_jupyter |

<font size=3 color="midnightblue" face="arial">
<h1 align="center">Escuela de Ciencias Básicas, Tecnología e Ingeniería</h1>
</font>
<font size=3 color="navy" face="arial">
<h1 align="center">ECBTI</h1>
</font>
<font size=2 color="darkor... | github_jupyter |
```
import pandas as pd
import numpy as np
import skbio
from collections import Counter
import seaborn as sns
import matplotlib.pyplot as plt
from scipy import stats
from statsmodels.formula.api import ols
import researchpy as rp
luminescence_means = "../../data/luminescence/to_be_sorted/24.11.19/output_means.csv"
lumi... | github_jupyter |
# Ordinary Differential Equations Exercise 1
## Imports
```
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
from scipy.integrate import odeint
from IPython.html.widgets import interact, fixed
```
## Euler's method
[Euler's method](http://en.wikipedia.org/wiki/Euler_method... | github_jupyter |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
# Deploying a web service to Azure Kubernetes Service (AKS)
This notebook shows the steps for deploying a service: registering a model, creating an image, provisioning a cluster (one time action), and deploying a service to it. ... | github_jupyter |
##### Copyright 2020 The TensorFlow Authors.
```
#@title Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | github_jupyter |
Introduction to Spark
====
This lecture is an introduction to the Spark framework for distributed computing, the basic data and control flow abstractions, and getting comfortable with the functional programming style needed to write a Spark application.
- What problem does Spark solve?
- SparkContext and the master c... | github_jupyter |
# Analyzing Street Trees: Diversity Indices and the 10/20/30 Rule
This notebook analyzes the diversity indices of the street trees inside and outside the city center you've selected, and then check the tree inventory according to the 10/20/30 rule, discussed below.
```
# library import
import pandas as pd
import geop... | github_jupyter |
<img src='./img/intel-logo.jpg' width=30%>
<font size=7><div align='left'>판다스 기초강의<br>
<br>
<font size=6><div align='left'>04. 데이터 합치기<br>
<font size=3><div align='right'>
<div align='right'>성 민 석 (Minsuk Sung)</div>
<div align='right'>류 회 성 (Hoesung Ryu)</div>
<div align='right'>이 인 구 (Ike Lee)</div>... | github_jupyter |
```
import sqlite3
from urllib.parse import urlparse, urlsplit
from hashlib import sha256 as hash
sqlite_file = 'D:/data/sqlite3/url_kb.sqlite3'
batch_size = 10000
with sqlite3.connect(sqlite_file) as conn:
cur = conn.cursor()
cur.execute("SELECT * FROM raw_url;")
while True:
all = cur.fetc... | github_jupyter |
<a href="https://colab.research.google.com/github/Homedepot5/DataScience/blob/deeplearning/GradientDescent.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
import numpy as np
import tensorflow as tf
from tensorflow import keras
import pandas as p... | github_jupyter |
```
##### import modules #####
from os.path import join as opj
from nipype.interfaces.ants import ApplyTransforms
from nipype.interfaces.utility import IdentityInterface
from nipype.interfaces.freesurfer import FSCommand, MRIConvert
from nipype.interfaces.io import SelectFiles, DataSink, FreeSurferSource
from nipype.p... | github_jupyter |
# Linear Regression
---
- Author: Diego Inácio
- GitHub: [github.com/diegoinacio](https://github.com/diegoinacio)
- Notebook: [regression_linear.ipynb](https://github.com/diegoinacio/machine-learning-notebooks/blob/master/Machine-Learning-Fundamentals/regression_linear.ipynb)
---
Overview and implementation of *Linear ... | github_jupyter |
## Gaussian Process Latent Variable Model
The [Gaussian Process Latent Variable Model](https://en.wikipedia.org/wiki/Nonlinear_dimensionality_reduction#Gaussian_process_latent_variable_models) (GPLVM) is a dimensionality reduction method that uses a Gaussian process to learn a low-dimensional representation of (potent... | github_jupyter |
```
import sys
sys.path.append('../src')
import csv
import yaml
import tqdm
import math
import pickle
import numpy as np
import pandas as pd
import itertools
import operator
from operator import concat, itemgetter
from pickle_wrapper import unpickle, pickle_it
import matplotlib.pyplot as plt
import dask
from dask.distr... | github_jupyter |
# Clusters as Knowledge Areas of Annotators
```
# import required packages
import sys
sys.path.append("../..")
import warnings
warnings.filterwarnings('ignore')
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from annotlib import ClusterBasedAnnot
from sklearn.datasets import make_classi... | github_jupyter |
**This notebook is an exercise in the [Introduction to Machine Learning](https://www.kaggle.com/learn/intro-to-machine-learning) course. You can reference the tutorial at [this link](https://www.kaggle.com/dansbecker/your-first-machine-learning-model).**
---
## Recap
So far, you have loaded your data and reviewed it... | github_jupyter |
```
from six.moves import cPickle as pickle
import keras
from keras.models import Sequential
from keras.layers import Conv1D, MaxPooling1D, Flatten, Dense, Dropout
from keras.callbacks import ModelCheckpoint
from google.colab import drive
drive.mount('/content/drive')
data_dir = '/content/drive/My Drive/Colab Notebooks... | github_jupyter |
<a href="https://colab.research.google.com/github/VitoriaCampos/Super-Computador-Projeto-C125/blob/main/Laboratorio1.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Laboratório #1
### Instruções
1. Para cada um dos exercícios a seguir, faça o se... | github_jupyter |
# Creating your own dataset from Google Images
*by: Francisco Ingham and Jeremy Howard. Inspired by [Adrian Rosebrock](https://www.pyimagesearch.com/2017/12/04/how-to-create-a-deep-learning-dataset-using-google-images/)*
```
!pip install fastai
#!pip install -upgrade pip
#!pip install -q fastai —upgrade pip
```
In t... | github_jupyter |
# Meet in the Middle Attack
- Given prime `p`
- then `Zp* = {1, 2, 3, ..., p-1}`
- let `g` and `h` be elements in `Zp*` such that
- such that `h mod p = g^x mod p` where ` 0 < x < 2^40`
- find `x` given `h`, `g`, and `p`
# Idea
- let `B = 2^20` then `B^2 = 2^40`
- then `x= xo * B + x1` where `xo` and `x1` are in `{0,... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.