text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
# MNIST Image Classification with TensorFlow on Cloud AI Platform This notebook demonstrates how to implement different image models on MNIST using the [tf.keras API](https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/keras). ## Learning objectives 1. Understand how to build a Dense Neural Network (DNN) for ...
github_jupyter
## Advanced Housing Prices- Feature Engineering The main aim of this project is to predict the house price based on various features which we will discuss as we go ahead #### Dataset to downloaded from the below link https://www.kaggle.com/c/house-prices-advanced-regression-techniques/data We will be performing all ...
github_jupyter
<div class="alert alert-success"> ------- # XArray 101 🌍 ------- * Jupyter and Python Basics * __Numpy__ * Matplotlib * Pandas * Xarray Intro * Xarray Advanced * Vector Data * Remote Sensing * Visualization ------- </div> # Numpy **Note:** This is following along/ inspired by the Notebook of...
github_jupyter
# Lesson 07 ``` import PIL.ImageFilter as ImageFilter import bqplot ``` If the above doesn't work, try uncommenting below: ``` #!conda install -c conda-forge bqplot --yes import bqplot ``` You may have to do: ``` #!jupyter nbextension enable --py bqplot ### or instead #!jupyter nbextension enable --py widgetsnbex...
github_jupyter
# 816-JHU_COVID19_US **[Work in progress]** This notebook is a template for downloading an analysis-ready dataset of COVID-19 confirmed cases and deaths by the US county level from Johns Hopkins University. Data are presented in two formats 1. Original JHU format with each day as a separate column 2. Time series for...
github_jupyter
``` from datetime import datetime as dt from datetime import timedelta as td from math import ceil from time import sleep from dydx3 import Client from dydx3.constants import SYNTHETIC_ASSET_MAP import pandas as pd def get_all_dydx_markets(): all_markets = set(SYNTHETIC_ASSET_MAP.keys()) valid_markets = all_m...
github_jupyter
# Código de : https://www.programmersought.com/article/15123512271/;jsessionid=A57CEB2DDB13EF6F58B64DE905997C15 # Weka OneR: https://colab.research.google.com/github/kzafeiroudi/QuestRecommend/blob/master/TrainingOnQuora.ipynb # Classify Iris plant data with OneR algorithm ``` # Load our dataset import pandas as pd...
github_jupyter
Before you begin, execute this cell to import numpy and packages from the D-Wave Ocean suite, and all necessary functions for the gate-model framework you are going to use, whether that is the Forest SDK or Qiskit. In the case of Forest SDK, it also starts the qvm and quilc servers. ``` %run -i "assignment_helper.py" ...
github_jupyter
# How to debug a model There are various levels on which to debug a model. One of the simplest is to just print out the values that different variables are taking on. Because `PyMC3` uses `Theano` expressions to build the model, and not functions, there is no way to place a `print` statement into a likelihood functio...
github_jupyter
# Running Catalyst in Jupyter Notebook The [Jupyter Notebook](https://jupyter.org/) is a very powerful browser-based interface to a Python interpreter. As it is already the de-facto interface for most quantitative researchers, `catalyst` provides an easy way to run your algorithm inside the Notebook without requiring y...
github_jupyter
``` import RINEX import pos import math import time import datetime import pynmea2 import serial import pandas as pd import numpy as np import nvector as nv from geopy.distance import geodesic, great_circle import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D pd.set_option('display.max_rows', None) f...
github_jupyter
# Step 1 **Object Detection API configuration**: in this step, the model is downloaded to prepare the object detection methodology, also are registered some operations to leave the entire environment configured. ``` !git clone https://github.com/tensorflow/models.git !apt-get -qq install libprotobuf-java protobuf-comp...
github_jupyter
<a href="http://landlab.github.io"><img style="float: left" src="../media/landlab_header.png"></a> # The deAlmeida Overland Flow Component <hr> <small>For more Landlab tutorials, click here: <a href="https://landlab.readthedocs.io/en/latest/user_guide/tutorials.html">https://landlab.readthedocs.io/en/latest/user_guid...
github_jupyter
**[Intermediate Machine Learning Home Page](https://www.kaggle.com/learn/intermediate-machine-learning)** --- In this exercise, you will use your new knowledge to train a model with **gradient boosting**. # Setup The questions below will give you feedback on your work. Run the following cell to set up the feedback ...
github_jupyter
``` from mixed_state.qcircuit import * from mixed_state.utils import get_zero_state, getreal_denmat, getreal_vector import qiskit num_to_mix = 3 system_size = 2 zero_state = get_zero_state(system_size) input_state = list() angle = np.random.randint(1, 10, size=[num_to_mix, system_size, 3]) for i in range(num_to_mix): ...
github_jupyter
# Robust Linear Models ``` %matplotlib inline import matplotlib.pyplot as plt import numpy as np import statsmodels.api as sm ``` ## Estimation Load data: ``` data = sm.datasets.stackloss.load() data.exog = sm.add_constant(data.exog) ``` Huber's T norm with the (default) median absolute deviation scaling ``` hube...
github_jupyter
<table> <tr><td align="right" style="background-color:#ffffff;"> <img src="../images/logo.jpg" width="20%" align="right"> </td></tr> <tr><td align="right" style="color:#777777;background-color:#ffffff;font-size:12px;"> Abuzer Yakaryilmaz | April 27, 2019 (updated) </td></tr> <tr><td...
github_jupyter
<div class="alert alert-success" style = "border-radius:10px;border-width:3px;border-color:white;font-family:Verdana,sans-serif;font-size:16px;"> <h2>Modelling heterogeneous distributions with an Uncountable Mixture of Asymmetric Laplacians (UMAL) </h2></div> Code is made available under the [Apache Version 2.0 Licens...
github_jupyter
``` import cv2 import numpy as np # Collecting dataset # Load HAAR face classifier face_classifier = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') # Load functions def face_extractor(img): # Function detects faces and returns the cropped face # If no face detected, it returns the input image ...
github_jupyter
# Lista 08 - Comparando Regressões # Exercício 01: Analise o desempenho do kNN e de uma Regressão Linear Regularizada para **pelo menos um** dos conjuntos de dados disponível na [seção de regressão linear múltipla](http://college.cengage.com/mathematics/brase/understandable_statistics/7e/students/datasets/mlr/frames/...
github_jupyter
``` test_index = 0 ``` #### testing ``` from load_data import * # load_data() ``` ## Loading the data ``` from load_data import * X_train,X_test,y_train,y_test = load_data() len(X_train),len(y_train) len(X_test),len(y_test) ``` ## Test Modelling ``` import torch import torch.nn as nn import torch.optim as optim i...
github_jupyter
<img align="center" style="max-width: 1000px" src="banner.png"> <img align="right" style="max-width: 200px; height: auto" src="hsg_logo.png"> ### Lab 01 - "Introduction to the Lab Environment" GSERM'21 course "Deep Learning: Fundamentals and Applications", University of St. Gallen The lab environment of the "Deep ...
github_jupyter
``` # Imports import math import random import numpy as np import tensorflow as tf from matplotlib import pyplot as plt from sklearn.preprocessing import MinMaxScaler config = { 'x_low': -4, 'x_high': 4, 'encoder_dim': 100, 'batch_size': 100, 'latent_dim': 5, 'intermediate_dim': 10, 'order...
github_jupyter
``` import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import matplotlib.pyplot as plt #custom Kothadekh from data_dataloader import get_loaders from data_dekhabet import convertTokens2Dekhabet ``` # Bi-LSTM Component ``` #Bi-LSTM borrowed fom https://github.com/me...
github_jupyter
# Gaussian Mixtures Sometimes, our data look like they are generated by a "mixture" model. What do we mean by that? In statistics land, it means we believe that there are "mixtures" of subpopulations generating the data that we observe. A common activity, then, is to estimate the subpopulation parameters. Let's take ...
github_jupyter
# Hasicorp Vault CLI Installation ## DevOpsLab Example This package must be installed prior to execute any Hasicorp Vault CLi operation from the command line or calls form API python library ### Prerequisite tasks - Knowing admin user and password for the target hots ### Connect to target system ``` import getpass ...
github_jupyter
<!--BOOK_INFORMATION--> <img align="left" style="padding-right:10px;" src="figures/PDSH-cover-small.png"> *This notebook contains an excerpt from the [Python Data Science Handbook](http://shop.oreilly.com/product/0636920034919.do) by Jake VanderPlas; the content is available [on GitHub](https://github.com/jakevdp/Pytho...
github_jupyter
<table class="ee-notebook-buttons" align="left"> <td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Tutorials/Keiko/fire_australia.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td> <td><a target="_blank...
github_jupyter
``` import pandas as pd import numpy as np import os import boto3 import s3fs # for reading from S3FileSystem import json # for working with JSON files from datetime import datetime import matplotlib.pyplot as plt pd.set_option('max_colwidth', -1) import sys sys.path.append("/home/ec2-user/SageMaker/classify-stree...
github_jupyter
``` %%html <style> .output_wrapper, .output { height:auto !important; max-height:350px; /* your desired max-height here */ } .output_scroll { box-shadow:none !important; webkit-box-shadow:none !important; } </style> from IPython.core.interactiveshell import InteractiveShell InteractiveShell.ast_node_in...
github_jupyter
# Section: Encrypted Deep Learning - Lesson: Reviewing Additive Secret Sharing - Lesson: Encrypted Subtraction and Public/Scalar Multiplication - Lesson: Encrypted Computation in PySyft - Project: Build an Encrypted Database - Lesson: Encrypted Deep Learning in PyTorch - Lesson: Encrypted Deep Learning in Keras - Fina...
github_jupyter
# Generating a set of Total Field anomaly data for a model Notebook to open a dictionary with the Total Field Anomaly data for a set of geometrical objects. #### Import libraries ``` %matplotlib inline from IPython.display import Markdown as md from IPython.display import display as dp import string as st import sys...
github_jupyter
``` import os import random import itertools import numpy as np import pandas as pd import matplotlib.pyplot as plt import tensorflow as tf from tensorflow.keras.models import * from tensorflow.keras.layers import * from tensorflow.keras.callbacks import * from tensorflow.keras.optimizers import * from tensorflow.ker...
github_jupyter
``` # -- IMPORTS -- # from keras.applications.vgg16 import VGG16 from keras.applications.vgg16 import preprocess_input, decode_predictions from scipy.ndimage.filters import gaussian_filter, median_filter from keras.preprocessing import image as kerasImage from keras.layers import Dense from keras.models import Model fr...
github_jupyter
``` import matplotlib %matplotlib inline import numpy as np, matplotlib.pyplot as plt, yt from PreFRBLE.likelihood import * from PreFRBLE.physics import * from PreFRBLE.plot import * from time import time ``` ### Temporal Smearing $\tau$ Here we compute the $\tau$ in post-processing, for models that cannot provide $\t...
github_jupyter
## Data processing This notebook provides a code for basic manipulation of the QFlow lite dataset. It allows previewing the simulated data (Step 1), to convert the full NumPy files to `.csv` format (Step 2), to preview a sample sub-region (Step 3), and to convert sub-region files to `.csv` format (Step 4). ### Step ...
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="#Variables,-Strings,-and-Numbers" data-toc-modified-id="Variables,-Strings,-and-Numbers-1"><span class="toc-item-num">1&nbsp;&nbsp;</span>Variables, Strings, and Numbers</a></span></...
github_jupyter
## Questionário 31 (Q31) Orientações: - Registre suas respostas no questionário de mesmo nome no SIGAA. - O tempo de registro das respostas no questionário será de 10 minutos. Portanto, resolva primeiro as questões e depois registre-as. - Haverá apenas 1 (uma) tentativa de resposta. - Submeta seu arquivo-fonte (util...
github_jupyter
# Train a binary classification model In this tutorial, we walk through a simple binary classificaiton problem using PyCaret. ## Install required packages ``` !pip install --upgrade pycaret scikit-plot ``` ## Setup cloud tracking [Mlflow](https://github.com/mlflow/mlflow) is a great tool for local ML experimentati...
github_jupyter
``` import pandas as pd, numpy as np import matplotlib.pyplot as plt %matplotlib inline #load CPI cpi=pd.read_html('IPC_8_5_2015.xls',header=0)[0] cpi.columns=['Year']+range(5) cpi=cpi.drop(range(1,5),axis=1)[2:] cpi=cpi.set_index('Year') cpi.head() #load first part of labor data df=pd.read_csv('exportPivot_FOM103A.csv...
github_jupyter
# Using `pybind11` The package `pybind11` is provides an elegant way to wrap C++ code for Python, including automatic conversions for `numpy` arrays and the C++ `Eigen` linear algebra library. Used with the `cppimport` package, this provides a very nice work flow for integrating C++ and Python: - Edit C++ code - Run ...
github_jupyter
# Opsin spectra #### v1.1 | by Katrin Franke This script calculates opsin spectra as described in [Stockman and Sharpe (2000)](https://www.sciencedirect.com/science/article/pii/S0042698900000213). ``` import os import math import numpy as np import seaborn as sns import matplotlib as mpl import matplotlib.pyplot as p...
github_jupyter
``` import math import itertools from scipy import linalg import numpy as np import pandas as pd from sklearn.metrics.pairwise import cosine_similarity from scipy import sparse from sklearn.metrics import pairwise_distances from scipy.spatial.distance import cosine data = pd.read_json('./data/jobs.json', orient='record...
github_jupyter
<a href="https://colab.research.google.com/github/martin-fabbri/colab-notebooks/blob/master/nlp/seq-to-seq/seq_to_seq_arithmetic.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> <img src="https://github.com/martin-fabbri/colab-notebooks/raw/master/n...
github_jupyter
# Variational Bayes on Betabinomial mixture model for detecting mitochondria variants ``` import bbmix import numpy as np from scipy import sparse from scipy.io import mmread import matplotlib.pyplot as plt AD = mmread("../../../Downloads/params_top500variants_frombb/top500ad.mtx").tocsc() DP = mmread("../../../Downlo...
github_jupyter
<a href="https://colab.research.google.com/github/Laelapz/Some_Tests/blob/main/ML_Models.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # ***Imports*** ``` !pip install graphviz !apt-get install graphviz import graphviz import numpy as np import p...
github_jupyter
# WorkFlow ## Classes ## Load the data ## Test Modelling ## Modelling **<hr>** ## Classes ``` import os import cv2 import torch import numpy as np def load_data(img_size=112): data = [] index = -1 labels = {} for directory in os.listdir('./data/'): index += 1 labels[f'./data/{dire...
github_jupyter
``` #cell-width control from IPython.core.display import display, HTML display(HTML("<style>.container { width:80% !important; }</style>")) ``` # Imports ``` #packages import numpy import tensorflow as tf from tensorflow.core.example import example_pb2 #utils import os import random import pickle import struct impor...
github_jupyter
# ★ Ordinary Differential Equations ★ ``` # Import modules import math import numpy as np import scipy from scipy.integrate import ode from matplotlib import pyplot as plt ``` # 6.1 Initial Value Problem ## Euler's Method ``` def euler_method(f, a, b, y0, step=10): t = a w = y0 ws = np.zeros(step + 1) ...
github_jupyter
# Filtering Investigation This notebook investigates various averaging (filter) approaches for dealing with the raw data from the bluetooth speed and cadence sensors. This will be done by first defining a test "true" speed and cadence profile. From this "true" profile, quantized data that simulates the bluetooth sens...
github_jupyter
![Egeria Logo](https://raw.githubusercontent.com/odpi/egeria/master/assets/img/ODPi_Egeria_Logo_color.png) ### ODPi Egeria Hands-On Lab # Welcome to the Configuring Egeria Servers Lab ## Introduction ODPi Egeria is an open source project that provides open standards and implementation libraries to connect tools, cat...
github_jupyter
``` from bnlp import NLTKTokenizer bnltk = NLTKTokenizer() import pandas as pd import csv import string from sklearn.utils import shuffle pd.set_option('display.max_colwidth', 255) from collections import Counter from tqdm import tqdm from sklearn import model_selection from sklearn import metrics import numpy as np fr...
github_jupyter
``` # This allows multiple outputs from a single jupyter notebook cell: from IPython.core.interactiveshell import InteractiveShell InteractiveShell.ast_node_interactivity = "all" %matplotlib inline import pandas as pd ``` --- ## There will be three (or four) kwargs: - `hline=` ... specify one or a list of prices to ...
github_jupyter
# MNIST Dataset Notebook ![image](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT4EYJYMpjNOy07S_eYWqFT6qBTiYOzY_8ykOud1CsmEJ5TDU1Wvw) ___ ## [What is MNIST?](https://corochann.com/mnist-dataset-introduction-1138.html) The MNIST (Modified National Institute of Standards and Technology) database is a large datab...
github_jupyter
<a href="http://landlab.github.io"><img style="float: left" src="../../landlab_header.png"></a> # Comparison of FlowDirectors ## Introduction Landlab's topographic flow-routing capability directs flow and accumulates it using two types of components: **FlowDirectors** use the topography to determine how flow moves ...
github_jupyter
``` import numpy as np import pandas as pd ``` # Using Numpy ## Basic Operations NumPy is a Python library that is used to handle linear algebra operations. It does a couple amazing things under the hood that make certain operations lightning fast, and makes large scale data processing possible (like Pandas). NumPy...
github_jupyter
# Books on Tape In this project, we will attempt to classify audio books written by classic authors, Jane Austen and Charles Dickens. ## Prequisites and Preprocessing To begin, upload one each of an audio book by Austen and Dickens in MP3 format to an Amazon S3 bucket. The audio book MP3 files should be per chapter ...
github_jupyter
# Scalar and vector > Marcos Duarte > Laboratory of Biomechanics and Motor Control ([http://demotu.org/](http://demotu.org/)) > Federal University of ABC, Brazil Python handles very well all mathematical operations with numeric scalars and vectors and you can use [Sympy](http://sympy.org) for similar stuff but wi...
github_jupyter
``` from jupyterthemes import get_themes from jupyterthemes.stylefx import set_nb_theme themes = get_themes() set_nb_theme(themes[1]) # 1. magic for inline plot # 2. magic to print version # 3. magic so that the notebook will reload external python modules # 4. a ipython magic to enable retina (high resolution) plots #...
github_jupyter
# Parameter settings The following code imports the BD wrapper class and initializes it: ```python import BD_wrapper.BD_wrapper as bdw b = bdw.BayesianDistance() ``` In the following we list all possible parameter settings for the BD wrapper with their default settings. ### General settings ```python b.version = '...
github_jupyter
# Inspection of Gazebo models ## List all Gazebo models The library loads all Gazebo models in the * catkin workspace * `$HOME/.gazebo/models` * `/usr/share/gazebo-$GAZEBO_VERSION/models` ``` import warnings warnings.filterwarnings('ignore') import os from pcg_gazebo.simulation import get_gazebo_model_names, add_...
github_jupyter
# <center> Problem 1 </center> ## Using the following dictionaries, create a list called `students` that contains lloyd, alice, and tyler. ``` from gofer.ok import check lloyd = { "name": "Lloyd", "homework": [90.0, 97.0, 75.0, 92.0], "quizzes": [88.0, 40.0, 94.0], "tests": [75.0, 90.0] } alice = { ...
github_jupyter
## OTEANN with Transformers This notebook investigates the orthographic depth of some spelling systems. This is a new version of OTEANN, which is now implemented with a GPT model instead of a Seq2Seq. The code used in this pages mainly comes from https://github.com/karpathy/minGPT (under MIT licence) ``` # set up l...
github_jupyter
<table class="ee-notebook-buttons" align="left"> <td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Array/decorrelation_stretch.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td> <td><a target="_blank" ...
github_jupyter
``` from tqdm.auto import tqdm import itertools import random ``` ## load MRCONSO.RFF (and some basic preprocessing) ``` with open("2020AA/MRCONSO.RRF", "r") as f: lines = f.readlines() print (len(lines)) ``` ### use only English names ``` cleaned = [] count = 0 for l in tqdm(lines): lst = l.rstrip("\n").sp...
github_jupyter
# ルンゲ・クッタ法 ``` import numpy as np import matplotlib.pyplot as plt import seaborn as sns %matplotlib inline sns.set('notebook', 'whitegrid', 'dark', font_scale=2, rc={"lines.linewidth": 2, 'grid.linestyle': '-'}) ``` ## オイラー法 $x'=f(t,x)$の初期値問題に対して漸化式 $$ x_{n+1} = x_n + h f(t_n, x_n) $$ によって近似解を計算する ``` def Euler...
github_jupyter
# Library ``` %matplotlib inline import numpy as np import cv2 import matplotlib.pyplot as plt import pydicom import os ``` # Function ``` def ShowImage(title,img,ctype): plt.figure(figsize=(9, 9)) if ctype=='gray': plt.imshow(img,cmap='gray') elif ctype=='rgb': plt.imshow(img) else: raise Except...
github_jupyter
## Comprehensive Natural Language Processing with Python ### Quora Insincere Questions Classification Challenge ### Problem Statement Quora is a platform that empowers people to learn from each other. On Quora, people can ask questions and connect with others who contribute unique insights and quality answers. A k...
github_jupyter
<a href="https://colab.research.google.com/github/ReAlex1902/Pneumonia_Detection/blob/master/pneumonia_detection.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Run next scripts in colab to download data ``` !pip install kaggle ## upload your kag...
github_jupyter
# Quantum Volume The quantum volume is a holistic quantum computer performance measure [QVOL0, QVOL1, QVOL2]. Roughly the logarithm (base 2) of quantum volume $V_Q$, quantifies the largest random circuit of equal width and depth that the computer successfully implements and is certifiably quantum. So if you have 64...
github_jupyter
# QC, analysis of Gutenkunst three pop out of Africa Here, we would like to do a sanity check that our models are producing similar results to that found in Gutenkunst 2009. https://doi.org/10.1371/journal.pgen.1000695 ``` import msprime from stdpopsim import homo_sapiens import allel import numpy as np from matplot...
github_jupyter
# Train a Simple TensorFlow Lite for Microcontrollers model This notebook demonstrates the process of training a 2.5 kB model using TensorFlow and converting it for use with TensorFlow Lite for Microcontrollers. Deep learning networks learn to model patterns in underlying data. Here, we're going to train a network t...
github_jupyter
``` import os os.environ["CUDA_VISIBLE_DEVICES"]="1" from math import sqrt from numpy import concatenate from matplotlib import pyplot from pandas import read_csv from pandas import DataFrame from pandas import concat from sklearn.preprocessing import MinMaxScaler from sklearn.preprocessing import LabelEncoder from s...
github_jupyter
``` %matplotlib inline import os import re import random import numpy as np import matplotlib.pyplot as plt import jieba from gensim.models import KeyedVectors # 导入词向量 cn_word_vecs = KeyedVectors.load_word2vec_format( 'sgns.zhihu.bigram', binary=False) ebd_dim = cn_word_vecs[u'我'].shape[0] POS = os.path.join(os.get...
github_jupyter
<a href="https://colab.research.google.com/github/zerotodeeplearning/ztdl-masterclasses/blob/master/solutions_do_not_open/Word_Embeddings_solution.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ## Learn with us: www.zerotodeeplearning.com Copyrigh...
github_jupyter
``` import numpy as np import math %matplotlib inline import matplotlib.pyplot as plt # side-stepping mpl backend import matplotlib.gridspec as gridspec # subplots import warnings warnings.filterwarnings("ignore") class ListTable(list): """ Overridden list class which takes a 2-dimensional list of the f...
github_jupyter
# Continuous training pipeline with KFP and Cloud AI Platform **Learning Objectives:** 1. Learn how to use KF pre-build components (BiqQuery, CAIP training and predictions) 1. Learn how to use KF lightweight python components 1. Learn how to build a KF pipeline with these components 1. Learn how to compile, upload, an...
github_jupyter
## Homework 1 ### NLP Basics & NLP Pipelines Welcome to Homework 1! The homework contains several tasks. You can find the amount of points that you get for the correct solution in the task header. Maximum amount of points for each homework is _six_. The **grading** for each task is the following: - correct answer -...
github_jupyter
<a href="https://colab.research.google.com/github/puneat/Audio_Sentiment/blob/master/iemocap_preprocessing.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` from google.colab import drive drive.mount('/gdrive', force_remount=True) import re # fir...
github_jupyter
#Author : Vedanti Ekre #Email: vedantiekre@gmail.com ## Task 6 : Prediction using Decision Tree Algorithm ___ ## GRIP @ The Sparks Foundation ____ # Role : Data Science and Business Analytics [Batch May-2021] ## Table of Contents<br> > - 1. Introduction. - 2. Importing Libraries. - 3. Fetching and loading data. - 4....
github_jupyter
# 2 - Updated Sentiment Analysis In the previous notebook, we got the fundamentals down for sentiment analysis. In this notebook, we'll actually get decent results. We will use: - packed padded sequences - pre-trained word embeddings - different RNN architecture - bidirectional RNN - multi-layer RNN - regularization ...
github_jupyter
### 计算新闻传播学课程简介 *** *** # 数据科学的编程工具:大数据 *** *** 王成军 wangchengjun@nju.edu.cn 计算传播网 http://computational-communication.com # 关于大数据的图片 ![](./img/bigdata.png) # 数字 ![](./img/bignumber.png) # 网络 ![](./img/bignetwork.png) # 文本 ![](./img/bigword.png) > # Big data is like teenage sex: > # Everyone talks about ...
github_jupyter
# Data Warehousing and Data Mining ## Labs ### Prepared by Gilroy Gordon #### Contact Information SCIT ext. 3643 ggordonutech@gmail.com gilroy.gordon@utech.edu.jm ### Week 3 - Decision Trees in R Additional Reference Resources: Decision Trees: https://www.statmethods.net/advstats/cart.html Importing Differen...
github_jupyter
## Load libraries ``` !pip install -q -r requirements.txt import sys import os import numpy as np import pandas as pd from PIL import Image import torch import torch.nn as nn import torch.utils.data as D from torch.optim.lr_scheduler import ExponentialLR import torch.nn.functional as F from torch.autograd import Var...
github_jupyter
``` import geojson from glob import glob import json import os, sys, fnmatch from os import makedirs, path as op, listdir, system import shutil from PIL import Image import numpy as np import rasterio from shutil import copyfile import subprocess def find(pattern, path): result = [] for root, dirs, files in o...
github_jupyter
# Quantum Circuits Quantum computers can only use a specific set of gates (universal gate set). Given the entanglers and their amplitudes found in Step 3, one can find corresponding representation of these operators in terms of elementary gates using the following procedure. ``` from qiskit import IBMQ, Aer, execute I...
github_jupyter
# Monte Carlo Methods In this notebook, you will write your own implementations of many Monte Carlo (MC) algorithms. While we have provided some starter code, you are welcome to erase these hints and write your code from scratch. ### Part 0: Explore BlackjackEnv We begin by importing the necessary packages. ``` %...
github_jupyter
``` %matplotlib inline import pandas as pd PATH = 'data/' from glob import glob import os; import sys g = glob(PATH + f'planet*'); g f'HELLO DUDE'.split(' ') fname = g[0].split('/')[1]; fname def reload_content(): with open(PATH + fname) as f: content = f.readlines() return content reload_content(); co...
github_jupyter
# DAT257x: Reinforcement Learning Explained ## Lab 6: Function Approximation ### Exercise 6.1: Q-Learning Agent with Linear Function Approximation ``` import numpy as np import sys if "../" not in sys.path: sys.path.append("../") from lib.envs.simple_rooms import SimpleRoomsEnv from lib.simulation import Expe...
github_jupyter
``` import sys sys.path.append('/home/dgp_iwvi_gpflow2/') import gpflow import numpy as np import tensorflow as tf from typing import Tuple, Optional, List, Union import dgp_iwvi_gpflow2.layers as layers import attr import tensorflow_probability as tfp RegressionData = Tuple[tf.Tensor, tf.Tensor] AuxRegressionData = Tu...
github_jupyter
# Bank ``` import sage import pickle import numpy as np sage_values = sage.load('results/bank_sage.pkl') permutation = [] for i in range(512): filename = 'results/bank permutation_test {}.pkl'.format(i) with open(filename, 'rb') as f: permutation.append(pickle.load(f)['scores']) permutation = np.array(...
github_jupyter
# Emojify! Welcome to the second assignment of Week 2. You are going to use word vector representations to build an Emojifier. Have you ever wanted to make your text messages more expressive? Your emojifier app will help you do that. So rather than writing: >"Congratulations on the promotion! Let's get coffee and ...
github_jupyter
# RNA-Seq Workflow by @furkanmtorun ### [furkanmtorun@gmail.com](mailto:furkanmtorun@gmail.com) | GitHub: [@furkanmtorun](https://github.com/furkanmtorun) | [Google Scholar](https://scholar.google.com/citations?user=d5ZyOZ4AAAAJ) | [Personal Website](https://furkanmtorun.github.io/) ### Libraries , packages and req...
github_jupyter
``` %run startup.py %%javascript $.getScript('./assets/js/ipython_notebook_toc.js') ``` # A Decision Tree of Observable Operators ## Part 1: NEW Observables. > source: http://reactivex.io/documentation/operators.html#tree. > (transcribed to RxPY 1.5.7, Py2.7 / 2016-12, Gunther Klessinger, [axiros](http://www.axiro...
github_jupyter
``` import os base_path="/content/drive/MyDrive/Applied_Ai_Course/Datasets" images=os.path.sep.join([base_path,'images']) annotations=os.path.sep.join([base_path,'airplanes.csv']) # Lets Load Dataset # airplanes annotation is a Csv file thats why we can see through with rows rows= open(annotations).read().strip().sp...
github_jupyter
``` import torch import torch.nn as nn from torchinfo import summary # half a U-net? L-net? # this network is intended to predict only the radius of a single circle def build_circle_spotter(): circle_spotter = nn.Sequential( nn.Conv2d( in_channels=1, out_channels=8, kern...
github_jupyter
# Linear Combination In this notebook you will learn how to solve linear combination problems using the python package [NumPy](http://www.numpy.org/) and its linear algebra subpackage [linalg](https://docs.scipy.org/doc/numpy-1.13.0/reference/routines.linalg.html). This lab is provided to prepare you for the linear a...
github_jupyter
* IBM sample datasets https://www.kaggle.com/blastchar/telco-customer-churn * Demographic info: * Gender, SeniorCitizen, Partner, Dependents * Services subscribed: * PhoneService, MultipleLine, InternetService, OnlineSecurity, OnlineBackup, DeviceProtection, TechSupport, StreamingTV, StreamingMovies * Custom...
github_jupyter
``` import matplotlib.pyplot as plt import numpy as np # create some randomly ddistributed data: #data = np.random.randn(10000) data = np.loadtxt("second_flow_1Mbps.dat", skiprows=50) data10 = np.loadtxt("second_flow_10Mbps.dat", skiprows=50) data100 = np.loadtxt("second_flow_100Mbps.dat", skiprows=50) data200 = np.loa...
github_jupyter
# T005 · Compound clustering **Note:** This talktorial is a part of TeachOpenCADD, a platform that aims to teach domain-specific skills and to provide pipeline templates as starting points for research projects. Authors: - Gizem Spriewald, CADD Seminar, 2017, Charité/FU Berlin - Calvinna Caswara, CADD Seminar, 2018,...
github_jupyter