text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
```
%matplotlib inline
import gym
import itertools
import matplotlib
import numpy as np
import sys
import tensorflow as tf
import collections
if "../" not in sys.path:
sys.path.append("../")
from lib.envs.cliff_walking import CliffWalkingEnv
from lib import plotting
matplotlib.style.use('ggplot')
env = CliffWalki... | github_jupyter |
### Rare event or Unbalanced data set
Providing equal sample of positive and negative instances to the classification algorithm will result in optimal result. Dataset which are highly skewed towards one or more classes have proven to be a challenge.
Resampling is a common practice of addressing this issue. Although t... | github_jupyter |
Code for **"Flash/No Flash"** figure.
# Import libs
```
from __future__ import print_function
import matplotlib.pyplot as plt
%matplotlib inline
import os
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
import numpy as np
from models import *
import torch
import torch.optim
from torch.autograd import Variable
from uti... | github_jupyter |
Chapter 5 stuff
From Chapter 5
Deutsch algorithm
```
import numpy as np
import random
import cirq
from cirq import H, X, CNOT, measure
q0, q1 = cirq.LineQubit.range(2)
secret_function = [random.randint(0,1) for _ in range(2)]
def make_oracle(a, b, c):
if c[0]:
yield [CNOT(a,b), X(b)]
if c[1]:
... | github_jupyter |
```
import numpy as np
import pandas as pd
```
## a)
```
df_a = pd.read_csv('correctedDiabetes.csv')
df_a
df_a.replace(np.NaN,9999,inplace=True)
df_a
```
## b)
```
df_b = pd.read_csv('correctedDiabetes.csv')
df_b
df_b['Pregnancies'].replace(np.NaN,0,inplace=True)
df_b['Glucose'].replace(np.NaN,800.0,inplace=True)
d... | github_jupyter |
# An Introduction to Graph Neural Networks
By Payal Chandak, on 20 June 2020
<br> <br>
Graphs in the real world, such as social networks, chemical molecules and biological knowledge graphs, are rich with information that cannot be found in individual entities. A method for learning graph representations or node classi... | github_jupyter |
```
%%markdown
# Sequential SuperLU Traces
The traces share the following properties:
* CFD Problems
* 100% Pattern symmetry
* <100% Numeric symmetry
* Full rank
This trace is from `EXAMPLE/ditersol`, which ships with SuperLU.
We have slightly modified it to accept matrices as command line arguments,
as opposed ... | github_jupyter |
<a href="https://colab.research.google.com/github/deepchatterjeevns/Pytorch-Udacity-Challenge/blob/master/intro-to-pytorch/Part%201%20-%20Tensors%20in%20PyTorch%20(Exercises%20Solved).ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
import sys
tr... | github_jupyter |
# Arduino Joystick Shield Example
This example shows how to use the [Sparkfun Joystick](https://www.sparkfun.com/products/9760)
on the board. The Joystick shield contains an analog joystick which is
connected to A0 and A1 analog channels of the Arduino connector. It also
contains four push buttons connected at D3-D... | github_jupyter |
<h1>CS4618: Artificial Intelligence I</h1>
<h1>Error Estimation</h1>
<h2>
Derek Bridge<br>
School of Computer Science and Information Technology<br>
University College Cork
</h2>
<h1>Initialization</h1>
$\newcommand{\Set}[1]{\{#1\}}$
$\newcommand{\Tuple}[1]{\langle#1\rangle}$
$\newcommand{\v}[1]{\pmb{#1}... | github_jupyter |
Para entrar no modo apresentação, execute a seguinte célula e pressione `-`
```
%reload_ext slide
```
<span class="notebook-slide-start"/>
# IPython
Este notebook apresenta os seguintes tópicos:
- [Mágicas do IPython](#%22M%C3%A1gicas%22-do-IPython)
- [Como definir Mágicas](#Registrando-novas-magics)
- [Exercício ... | github_jupyter |
```
import pandas as pd
import krisk.plot as kk
# Use this when you want to nbconvert the notebook (used by nbviewer)
from krisk import init_notebook; init_notebook()
```
Before we added talk about each of these features. There's something in common, the way the element position themselves, this are position (`x_pos`,... | github_jupyter |
# Transform In Transformer 介绍
**TNT(Transform In Transformer)** 是继ViT 和 DeiT之后的优异vision transformer(视觉transformer)。在视觉任务上有较好性能。
整体上来说,TNT较以前的模型在transformer处理上有更多的细节上的提升。
提升点:
1. **patch-level + pixel-level** 两级结合,即利用Attention特性对patch-level上图像的**全局特征**进行高质量提取,同时又利用pixel-level对全局下的**局部特征**进行进一步提取,保证了图片的较为完整空间关系。
... | github_jupyter |
# Unsupervised Dictionary Methods
```
import pandas as pd
import numpy as np
from nltk import *
import string
import pickle
import re
from nltk.corpus import wordnet
from sklearn.model_selection import train_test_split
# Load our data and try
with open('modified_data/just_tags.txt', 'rb') as f:
just_tags = pickle.... | github_jupyter |
---
_You are currently looking at **version 1.0** 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-machine-learning/resources/bANLa) course resource._
---
## Assignment 4 - ... | github_jupyter |
# Attribute Inference Attack (AIA) Dataset E
```
#import libraries
import warnings
warnings.filterwarnings("ignore")
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
import seaborn as sns
import os
print('Libraries imported!!')
#define directory of functions and actual directory
HOME_PATH = ... | github_jupyter |
```
from google.colab import drive
drive.mount('/content/drive')
!pip install -q tensorflow_text
import numpy as np
import typing
from typing import Any, Tuple
import tensorflow as tf
from tensorflow.keras.layers.experimental import preprocessing
import tensorflow_text as tf_text
import matplotlib.pyplot as plt
imp... | github_jupyter |
# Radiopadre Tutorial
O. Smirnov <o.smirnov@ru.ac.za>, January 2018
Radiopadre is a framework, built on the Jupyter notebook, for browsing and visualizing data reduction products. It is particularly useful for visualizing data products on remote servers, ... | github_jupyter |
# The Spinning Effective One-Body Initial Condition Solver
## Author: Tyler Knowles
## This module documents the reduced spinning effective one-body initial condition solver as numerically implemented in LALSuite's SEOBNRv3 gravitational waveform approximant. That is, we follow Section IV A of [Buonanno, Chen, and D... | github_jupyter |
**Tools - pandas**
*The `pandas` library provides high-performance, easy-to-use data structures and data analysis tools. The main data structure is the `DataFrame`, which you can think of as an in-memory 2D table (like a spreadsheet, with column names and row labels). Many features available in Excel are available pro... | github_jupyter |
## Installation
H2O offers an R package that can be installed from CRAN and a python package that can be installed from PyPI.Also you may want to look at the [documentation](http://docs.h2o.ai/h2o/latest-stable/h2o-docs/downloading.html) for complete details.
### Pre-requisites
* Python
* Java 7 or later, which you ... | github_jupyter |
```
import numpy as np
import tensorflow as tf
from sklearn.utils import shuffle
import re
import time
import collections
import os
def build_dataset(words, n_words, atleast=1):
count = [['PAD', 0], ['GO', 1], ['EOS', 2], ['UNK', 3]]
counter = collections.Counter(words).most_common(n_words)
counter = [i for... | github_jupyter |
# Introduction to geospatial vector data in Python
```
%matplotlib inline
import pandas as pd
import geopandas
```
## Importing geospatial data
Geospatial data is often available from specific GIS file formats or data stores, like ESRI shapefiles, GeoJSON files, geopackage files, PostGIS (PostgreSQL) database, ...
... | github_jupyter |
**Exercise set 2**
==================
>The goal of this exercise is to perform **least squares regression**
>and to see how we can evaluate our regression.
**Exercise 2.1:**
Multiple linear regression solves the equation $\mathbf{Y} = \mathbf{X}\mathbf{B}$ with
$\mathbf{B} = (\mathbf{X}^\mathrm{T} \mathbf{X})^{-1... | github_jupyter |
# Logistic Regression(3)
```
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(666)
X = np.random.normal(0, 1, size=(200, 2))
y = np.array(X[:, 0]**2 + X[:, 1]**2 < 1.5, dtype='int')
plt.scatter(X[y==0, 0], X[y==0, 1])
plt.scatter(X[y==1, 0], X[y==1, 1])
```
### 1. 使用逻辑回归
```
from LogisticReg.Logisti... | github_jupyter |
```
#default_exp labelsmoothing
```
This notebook is based on IssacFlath blog post https://isaac-flath.github.io/fastblog/neural%20networks/noisy%20data/2020/12/15/PseudoLabelingDataCleaning.html .
Here we use the same way of injecting random noise to the data. But instead of performing cross validation, we treat the... | github_jupyter |
## What's New
### Summary
Brought to you by popular demand, this edition of `made-with-gs-quant` will showcase some of our newest features and capabilities. Going forward, look out for a `What's New` section in `made_with_gs_quant` that will highlight new additions.
The content of this notebook is split into:
* [1 ... | github_jupyter |
```
import os
import pandas
dir_path = './Data_RNN'
df = pandas.DataFrame()
for file_name in os.listdir(dir_path):
file_path = os.path.join(dir_path, file_name)
if not os.path.isdir(file_path):
ext = os.path.splitext(file_path)[-1]
if ext == '.txt':
print(file_path)
... | github_jupyter |
# Simple Stock Date
## This tutorial is about date and how to manipulate date in dataframe.
```
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import warnings
warnings.filterwarnings("ignore")
# fix_yahoo_finance is used to fetch data
import fix_yahoo_finance as yf
yf.pdr_override()
# input... | github_jupyter |
# Создание датасета обучения
Данный документ предназначен для обработки и анализа предобработанных данных и построении пригодных для обучения данных
```
import pandas as pd
import numpy as np
import os
import gc
import seaborn as sns
from tqdm import tqdm, tqdm_notebook
import matplotlib.pyplot as plt
%matplotlib in... | github_jupyter |
<a href="https://colab.research.google.com/github/scsanjay/ml_from_scratch/blob/main/03.%20Naive%20Bayes/MultinomialNaiveBayes.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Implementation of Multinomial Naive Bayes
```
import numpy as np
class ... | github_jupyter |
# Tutorial: Hand gesture classification with EMG data using Riemannian metrics
In this notebook we are using EMG time series collected by 8 electrodes placed on the arm skin. We are going to show how to:
- Process these kind of signal into covariance matrices that we can manipulate with geomstats tools.
- How to appl... | github_jupyter |
```
from keras.layers import Dense, Activation, Dropout, Reshape, concatenate, ReLU, Input
from keras.models import Model, Sequential
from keras.regularizers import l2, l1_l2
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint
from keras.layers.normalization import BatchNormalization
from kera... | github_jupyter |
# Intro to Pyro models
This is Part I of the time series tutorial https://pyro.ai/time
See also [Part II](https://pyro.ai/time/part_ii_inference.ipynb) and
[Part III](https://pyro.ai/time/part_iii_custom.ipynb).
## Setup
First install Pyro
```sh
pip install pyro-ppl
```
and import Pyro and PyTorch
```
import math
i... | github_jupyter |
### Dependencies
```
from utillity_script_cloud_segmentation import *
seed = 0
seed_everything(seed)
warnings.filterwarnings("ignore")
```
### Load data
```
train = pd.read_csv('../input/understanding_cloud_organization/train.csv')
hold_out_set = pd.read_csv('../input/clouds-data-split/hold-out.csv')
X_train = hol... | github_jupyter |
# T81-558: Applications of Deep Neural Networks
**Module 11: Natural Language Processing and Speech Recognition**
* Instructor: [Jeff Heaton](https://sites.wustl.edu/jeffheaton/), McKelvey School of Engineering, [Washington University in St. Louis](https://engineering.wustl.edu/Programs/Pages/default.aspx)
* For more i... | github_jupyter |
<div align="right"><a href="http://norvig.com">Peter Norvig</a><br><a href="https://github.com/norvig/pytudes">pytudes</a><br>March 2019</div>
# Dice Baseball
The [538 Riddler for March 22, 2019](https://fivethirtyeight.com/features/can-you-turn-americas-pastime-into-a-game-of-yahtzee/) asks us to simulate baseball u... | github_jupyter |
# Learning Objectives
- What is Generator in Python, why do we need it
- Learn about Abstract Method, Class Method and Static Method
- Learn about functional programming and decorators in Python
## Iterator - Generator
- Any function that uses the ‘yield’ statement is the generator
- Each yield temporarily suspen... | github_jupyter |
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Datasets/Terrain/canada_dem.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 |
# Brain Tumor Classification with PyTorch⚡Lightning & EfficientNet 3D
The goal of this challenge is to Predict the status of a genetic biomarker important for brain cancer treatment.
All the code is refered from public repository: https://github.com/Borda/kaggle_brain-tumor-3D
Any nice contribution is welcome!
```
!... | github_jupyter |
Find the markdown blocks that say interaction required! The notebook should take care of the rest!
# Import libs
```
import sys
import os
from eflow.foundation import DataPipeline,DataFrameTypes
# from eflow.model_analysis import ClassificationAnalysis
from eflow.utils.modeling_utils import optimize_model_grid
from ... | github_jupyter |
# GW Example
## v2 -- Refactor with localization
## v3 -- Refactor with PATH
```
%matplotlib notebook
# imports
from importlib import reload
import os
from pkg_resources import resource_filename
import numpy as np
import healpy as hp
import pandas
from astropy.io import fits
from astropy.table import Table
from ast... | github_jupyter |
##### Copyright 2021 The TF-Agents 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 a... | github_jupyter |
# VARMAX models
This is a brief introduction notebook to VARMAX models in Statsmodels. The VARMAX model is generically specified as:
$$
y_t = \nu + A_1 y_{t-1} + \dots + A_p y_{t-p} + B x_t + \epsilon_t +
M_1 \epsilon_{t-1} + \dots M_q \epsilon_{t-q}
$$
where $y_t$ is a $\text{k_endog} \times 1$ vector.
```
%matplot... | github_jupyter |
# PETs/TETs – Hyperledger Aries / PySyft – City (Relying Party) 🏙️
---
⚠️ <span style='background : yellow'>**Warning:**</span>
The `SyMPC` package is still in beta-verion and therefore very buggy. At the time of the development of this project, the function `.reconstruct()` (see Step ???) does not function with rem... | github_jupyter |
# Advanced Tutorial 11: Model Calibration
## Overview
In this tutorial, we will discuss the following topics:
* [Calculating Calibration Error](#ta11error)
* [Generating and Applying a Model Calibrator](#ta11calibrator)
We'll start by getting the imports out of the way:
```
import tempfile
import os
import fastesti... | github_jupyter |
*Sebastian Raschka*
last modified: 03/31/2014
<hr>
I am really looking forward to your comments and suggestions to improve and extend this tutorial! Just send me a quick note
via Twitter: [@rasbt](https://twitter.com/rasbt)
or Email: [bluewoodtree@gmail.com](mailto:bluewoodtree@gmail.com)
<hr>
### Problem Cate... | github_jupyter |
```
!pip install d2l==0.14.3
import torch
import torchvision
from torch import nn
from d2l import torch as d2l
d2l.DATA_HUB['pokemon'] = (d2l.DATA_URL + 'pokemon.zip',
'c065c0e2593b8b161a2d7873e42418bf6a21106c')
data_dir = d2l.download_extract('pokemon')
batch_size = 256
transformer = torchvi... | github_jupyter |
# RANS Airfoil Flows with Bayesian Neural Nets
## Overview
We are now considering the same setup as in the notebook {doc}`supervised-airfoils`: A turbulent airflow around wing profiles, for which we'd like to know the average motion
and pressure distribution around this airfoil for different Reynolds numbers and angl... | github_jupyter |
The `poetpy` library is a Python wrapper for the [PoetryDB API](https://github.com/thundercomb/poetrydb). The library provides a Pythonic interface for interacting with and extracting information from the PoetryDB database to explore nearly 130 poets and more than 3,200 poems. In this introductory notebook, we will exp... | github_jupyter |
# Publications markdown generator for academicpages
Takes a set of bibtex of publications and converts them for use with [academicpages.github.io](academicpages.github.io). This is an interactive Jupyter notebook ([see more info here](http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/what_is_jupyter.html... | github_jupyter |
```
import os
import sys
module_path = os.path.abspath(os.path.join('..'))
if module_path not in sys.path:
sys.path.append(module_path)
import torch
import numpy as np
import matplotlib.pylab as plt
from os.path import join
from pathlib import Path
from models.VQVAE import VectorQuantizerEMA, Encoder, Decoder
i... | github_jupyter |
## Seal detection API demo
In areas with limited tree cover and large wildlife, aerial wildlife population surveys are often more efficient than surveys using camera traps or "boots on the ground". The downside of aerial surveys is that even in areas dense with wildlife, the *vast* majority of images are empty, which... | github_jupyter |
## If fetching data from Google Drive
My model
```
from google.colab import drive
drive.mount('/content/gdrive')
```
# Dataset
```
%%time
!unzip -qq '/content/gdrive/My Drive/modest_museum_dataset/modest_museum_dataset.zip' -d .
```
# Imports
```
import torch
import torch.nn as nn
import torch.nn.functional as F
... | github_jupyter |
# Fitting a Polynomial
In this tutorial, we will show how to use the generic curve fitting class `kontrol.curvefit.CurveFit` to fit a polynomial.
`kontrol.curvefit.CurveFit` is a low-level class for curve fitting.
It uses optimization to minimize a cost function, e.g. mean squared error, to fit a curve.
It requires ... | github_jupyter |
```
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import pymc3 as pm
import langevin
from scipy.stats import pearsonr
from scipy.optimize import minimize_scalar
import theano.tensor as tt
SMALL_SIZE = 16
MEDIUM_SIZE = 18
BIGGER_SIZE = 20
plt.rc('font', size=SMALL_SIZE) ... | github_jupyter |
# RUL estimation Nasa Randomized dataset
```
import numpy as np
import pandas as pd
import scipy.io
import math
import os
import ntpath
import sys
import logging
import time
import sys
import random
from importlib import reload
import plotly.graph_objects as go
import tensorflow as tf
from tensorflow import keras
fr... | github_jupyter |
```
%config Completer.use_jedi = False
import networkx as nx
import community as c
import pandas as pd
import matplotlib.pyplot as plt
import os as os
import numpy as np
import random
import seaborn as sns
import time
import operator
from plotly.offline import download_plotlyjs, init_notebook_mode, iplot
import p... | github_jupyter |
```
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = 'all' # default is ‘last_expr'
%load_ext autoreload
%autoreload 2
import json
import os
from collections import Counter
import io
from random import sample
from tqdm import tqdm
import azure.cosmos.cosmos_client ... | github_jupyter |
# Building predictive models classifier partition by cases no dates
## Generic library methods
```
import pandas as pd
import os
import numpy as np
from sklearn.metrics import accuracy_score, confusion_matrix, precision_score, recall_score, plot_confusion_matrix
from sklearn.utils.multiclass import unique_labels
from... | github_jupyter |
```
#@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 agreed to in writing, software
# distributed u... | github_jupyter |
# Values and Variables
**CS1302 Introduction to Computer Programming**
___
```
%reload_ext mytutor
```
## Integers
**How to enter an [integer](https://docs.python.org/3/reference/lexical_analysis.html#integer-literals) in a program?**
```
15 # an integer in decimal
0b1111 # a binary number
0xF # hexadecimal (ba... | github_jupyter |
# Realization of Non-Recursive Filters
*This jupyter notebook is part of a [collection of notebooks](../index.ipynb) on various topics of Digital Signal Processing.
## Segmented Convolution
In many applications one of the signals of a convolution is much longer than the other. For instance when filtering a speech si... | github_jupyter |
# Quick Review of scikit-learn
<a href="https://colab.research.google.com/github/thomasjpfan/ml-workshop-intermediate-1-of-2/blob/master/notebooks/00-review-sklearn.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open in Colab" title="Open and Execute in Google Colaboratory"></a>
```
#... | github_jupyter |
# Hands-on notebook for OpenSky Workshop 2019
<div class='alert alert-warning'>
<b>Warning:</b> This notebook is intended to be executed on Google Colab.<br/>
You may prefer a clean installation of the package if you run this notebook locally.
</div>
```
import sys
import warnings
# Most warnings are not re... | github_jupyter |
# Introduction to Data Science – Relational Databases
*COMP 5360 / MATH 4100, University of Utah, http://datasciencecourse.net/*
Up to now, we've mainly used flat tables to store and process data. Most structured data in the real world, however, is stored in databases, and specifically in [relational databases](https... | github_jupyter |
# AquaCrop-OSPy: Bridging the gap between research and practice in crop-water modelling
<a href="https://colab.research.google.com/github/thomasdkelly/aquacrop/blob/master/tutorials/AquaCrop_OSPy_Notebook_1.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open in Colab"/... | github_jupyter |
# <center>LECTURE OVERVIEW </center>
---
# <center> What we've learned so far...</center>
- What are `if` statements useful for
- How to write simple and multiple condition `if` statements
## By the end of the day you will be able to:
- write `for` loops to iterate over containers
- write `for` loops to iterate a g... | github_jupyter |
### K Means
K means is the easiest form of unsupervised learning. Unsupervised learning is a type of self-organized learning that helps find previously unknown patterns in data set without pre-existing labels. Supervised learning is trying to find a boundary to separate data with different properties. Unsuperv... | github_jupyter |
```
import timeit
import tqdm
import pprint
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
plt.rcParams['text.usetex'] = True
plt.rcParams['axes.labelsize'] = 16
plt.rcParams['font.size'] = 16
plt.rcParams['legend.fontsize'] = 'large'
import pyquaternion # pip install pyquaternion --user
im... | github_jupyter |
# Explicit Feedback Neural Recommender Systems
Goals:
- Understand recommender data
- Build different models architectures using Keras
- Retrieve Embeddings and visualize them
- Add metadata information as input to the model
```
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
import os.path as o... | github_jupyter |
```
import matplotlib.pyplot as plt
import numpy as np
import pickle
import seaborn as sns
from scipy.stats import norm, skewnorm
from pwass.spline import SplineBasis, MonotoneQuadraticSplineBasis
from pwass.distributions import Distribution
from pwass.dimsensionality_reduction.geodesic_pca import GeodesicPCA
from pwa... | github_jupyter |
# RadarCOVID-Report
## Data Extraction
```
import datetime
import json
import logging
import os
import shutil
import tempfile
import textwrap
import uuid
import matplotlib.pyplot as plt
import matplotlib.ticker
import numpy as np
import pandas as pd
import pycountry
import retry
import seaborn as sns
%matplotlib in... | github_jupyter |
This notebook is part of the $\omega radlib$ documentation: https://docs.wradlib.org.
Copyright (c) $\omega radlib$ developers.
Distributed under the MIT License. See LICENSE.txt for more info.
# xarray IRIS backend
In this example, we read IRIS (sigmet) data files using the wradlib `iris` xarray backend.
```
impor... | github_jupyter |
# INTRODUCTION
> Ever heard of the terminologies like used car, a pre-owned vehicle or a second hand car? <br>
>
> Used cars are sold through a varirty of outlets, including franchise, independent car dealers and rental car companies.Have you ever wondered how their prices are evaluated for sale?
>
> You cannot ta... | github_jupyter |
# Course 2 week 1 lecture notebook Exercise 04
# Concordance index
In this week's graded assignment, you will implement the concordance index (c-index). To get some practice with what you've seen in lecture, and to prepare for this week's assignment, you will write code to find permissible pairs, concordant pairs, an... | github_jupyter |
##### Copyright 2020 The TensorFlow IO 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 ... | github_jupyter |
# Neural Machine Translation
Welcome to your first programming assignment for this week!
You will build a Neural Machine Translation (NMT) model to translate human readable dates ("25th of June, 2009") into machine readable dates ("2009-06-25"). You will do this using an attention model, one of the most sophisticate... | github_jupyter |
# Description
Some tests on simulating brownian motion evolution
## brownian motion model:
> dX(t) = sigma * d * B(t)
* sigma = standard deviation
* B = random noise
* t = time
```
import dendropy
from scipy.stats import norm
def brownian(x0, n, dt, delta):
for i in xrange(n):
x0 += np.random.normal(sc... | github_jupyter |
# Funciones: Cómo encapsular código
Algunas tareas que deseamos realizar requieren de muchas líneas de código, lo que dificulta su lectura. Uno de los pilares del lenguaje Python es que podamos escribir código que podamos leer y entender rápidamente.
Muchas veces estas tareas no las realizaremos una única vez, sino q... | github_jupyter |
```
import keras
from keras.models import Sequential, Model, load_model
from keras.layers import Dense, Dropout, Activation, Flatten, Input, Lambda
from keras.layers import Conv2D, MaxPooling2D, AveragePooling2D, Conv1D, MaxPooling1D, LSTM, ConvLSTM2D, GRU, CuDNNLSTM, CuDNNGRU, BatchNormalization, LocallyConnected2D, ... | github_jupyter |
<a href="https://colab.research.google.com/github/KordingLab/ENGR344/blob/master/tutorials/W4D1_How_do_we_know_how_certain_we_should_be/TA/W4D1_Tutorial2.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Tutorial 2: Confidence intervals and bootstra... | github_jupyter |
```
import pandas as pd
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfVectorizer
from nltk.corpus import stopwords
```
### Reading the text data
```
text_data_sentence = pd.read_csv('textdatanew.csv', encoding='ISO-8859-1')
text_data_se... | github_jupyter |
# A/B Testing with Amazon SageMaker
In production ML workflows, data scientists and data engineers frequently try to improve their models in various ways, such as by performing [Perform Automatic Model Tuning](https://docs.aws.amazon.com/sagemaker/latest/dg/automatic-model-tuning.html), training on additional or more-... | github_jupyter |
```
import forge
from puzzle.puzzlepedia import puzzlepedia
puzzle = puzzlepedia.parse("""
model.disable_constraints()
model.disable_inference()
woman in {wA, wB, wC, wD, wE, wF, wG}
concealer in {bigger, burning, bye, enthusiastic, makeup, married, shapely}
(kinds, colors) in ({eye, lip}, {CA, ER, EU, FI, GR, HE, ID... | github_jupyter |
# Mapboxgl Python Library for location data visualizaiton
https://github.com/mapbox/mapboxgl-jupyter
### Requirements
These examples require the installation of the following python modules
```
pip install mapboxgl
pip install pandas
```
```
import pandas as pd
import os
from mapboxgl.utils import *
from mapboxgl.... | github_jupyter |
# Tabulation API Example: Nonadiabatic Flamelet Models
_This demo is part of Spitfire, with [licensing and copyright info here.](https://github.com/sandialabs/Spitfire/blob/master/license.md)_
_Highlights_
- using `build_nonadiabatic*` methods in Spitfire to build nonadiabatic equilibrium, Burke-Schumann, and SLFM mo... | github_jupyter |
```
%%html
<style>
.output_wrapper, .output {
height:auto !important;
max-height:700px; /* your desired max-height here */
}
.output_scroll {
box-shadow:none !important;
webkit-box-shadow:none !important;
}
</style>
```
### Import modules
```
from IPython.core.interactiveshell import InteractiveShell... | github_jupyter |
<h1> 2. Creating a sampled dataset </h1>
This notebook illustrates:
<ol>
<li> Sampling a BigQuery dataset to create datasets for ML
<li> Preprocessing with Pandas
</ol>
```
# change these to try this notebook out
BUCKET = 'cloud-training-demos-ml'
PROJECT = 'cloud-training-demos'
REGION = 'us-central1'
import os
os.e... | github_jupyter |
```
%load_ext load_style
%load_style talk.css
```
# Power Spectral Density
## Introduction
* Methods
> This notebook consists of two methods to carry Spectral Analysis.
> The first one is based on covariance called **pcovar**, which comes from Spectrum: a Spectral Analysis Library in Python. This library that cont... | github_jupyter |
# Implementing logistic regression from scratch
The goal of this notebook is to implement your own logistic regression classifier. You will:
* Extract features from Amazon product reviews.
* Convert an SFrame into a NumPy array.
* Implement the link function for logistic regression.
* Write a function to compute ... | github_jupyter |
# Введение в численные методы оптимизации (Ю. Е. Нестеров Введение в выпуклую оптимизацию, гл. 1 $\S$ 1.1)
1. Обзор материала весеннего семестра
2. Постановка задачи
3. Общая схема решения
4. Сравнение методов оптимизации
5. Методы одномерной минимизации
## Обзор материала весеннего семестра
Также на [странице ... | github_jupyter |
# Colorbot
**Special thanks @MarkDaoustthat helped us with this material**
In order to have a better experience follow these steps:
1. Read all the notebook, try to understand what each part of the code is doing and get familiar with the implementation;
2. For each exercise in this notebook make a copy of this noteb... | github_jupyter |
```
import pandas as pd, numpy as np
import kendo_romania
```
Read data
```
matches={2018:{},2017:{},2016:{},2015:{},2014:{}}
filename='rawdata/2018/CR/CR25 - Public.xlsx'
sheetname='List of matches'
column_keys={'match_type':2,'aka':{'name':5,'hansoku':6,'point1':7,'point2':8,'point3':9},
'shiro':{'name... | github_jupyter |
```
class RandomForest():
def __init__(self, x, y, n_trees, n_features, sample_sz, depth=10, min_leaf=5):
np.random.seed(12)
if n_features == 'sqrt':
self.n_features = int(np.sqrt(x.shape[1]))
elif n_features == 'log2':
self.n_features = int(np.log2(x.shape[1]))
... | github_jupyter |

# Predicting Loan Repayment with Automated Feature Engineering in Featuretools
Feature engineering is the process of creating new features (also called predictors or explanatory variables) out of an existing dataset. Traditionally, this process is done by hand using domain knowledge to... | github_jupyter |
# Worksheet 0.0.2: Getting comfortable with the terminal
<div class="alert alert-block alert-warning">
<p>This activity only works if we're in our JupyterLab environment. If you haven't finished the <a href = '1_week-0-worksheet-github-clone.md'>"Cloning" a repository</a> worksheet, please do so now.
</div>
We'l... | github_jupyter |
# Kaggle Titanic survival - logistic regression model
In this notebook we repeat our basic logistic regression model as previously described:
https://github.com/MichaelAllen1966/1804_python_healthcare/blob/master/titanic/02_logistic_regression.ipynb
We will extend the model to report a range of accuracy measures, as... | github_jupyter |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.

# Train and expl... | github_jupyter |
# Neural Networks - Part 1
2016-06-17, Josh Montague
Motivation, a little history, a naive implementation, and a discussion of neural networks.
## Logistic regression
Recap of the structural pillars of logistic regression for classification ([previous RST](https://github.com/DrSkippy/Data-Science-45min-Intros/blob... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.