text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
```
%load_ext autoreload
%autoreload 2
# default_exp tmlt
```
# Training Pipeline
> An API to create super fast training pipeline for machine learning models based on tabular or strucuture data
> It comes with model parallelism and cutting edge hyperparameter tuning techniques.
```
#hide
from nbdev.showdoc import *... | github_jupyter |
# Sequence to Sequence Classification by RNN
- Creating the **data pipeline** with `tf.data`
- Preprocessing word sequences (variable input sequence length) using `padding technique` by `user function (pad_seq)`
- Using `tf.nn.embedding_lookup` for getting vector of tokens (eg. word, character)
- Training **many to ma... | github_jupyter |
# Think Bayes
This notebook presents example code and exercise solutions for Think Bayes.
Copyright 2018 Allen B. Downey
MIT License: https://opensource.org/licenses/MIT
```
# Configure Jupyter so figures appear in the notebook
%matplotlib inline
# Configure Jupyter to display the assigned value after an assignmen... | github_jupyter |
# An Adventure In Packaging: An exercise in research software engineering.
In this exercise, you will convert the already provided solution to the programming challenge defined in this Jupyter notebook, into a proper Python package.
The code to actually solve the problem is already given, but as roughly sketched out ... | github_jupyter |
<img src="https://raw.githubusercontent.com/brazil-data-cube/code-gallery/master/img/logo-bdc.png" align="right" width="64"/>
# <span style="color:#336699">Introduction to the SpatioTemporal Asset Catalog (STAC)</span>
<hr style="border:2px solid #0077b9;">
<div style="text-align: left;">
<a href="https://nbviewe... | github_jupyter |
# GLM: Robust Linear Regression
This tutorial first appeard as a post in small series on Bayesian GLMs on:
1. [The Inference Button: Bayesian GLMs made easy with PyMC3](http://twiecki.github.com/blog/2013/08/12/bayesian-glms-1/)
2. [This world is far from Normal(ly distributed): Robust Regression in PyMC3](http:/... | github_jupyter |
# Open-Ended Dataset (Covid-19 India)
```
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from matplotlib import style
plt.style.use(['dark_background'])
sns.set(color_codes=True)
import urllib.request
import json
url = "https://api.covid19india.org/states_daily.json"
url... | github_jupyter |
> **How to run this notebook (command-line)?**
1. Install the `ReinventCommunity` environment:
`conda env create -f environment.yml`
2. Activate the environment:
`conda activate ReinventCommunity`
3. Execute `jupyter`:
`jupyter notebook`
4. Copy the link to a browser
# `REINVENT 2.0`: reinforcement learning explorati... | github_jupyter |
<a href="https://colab.research.google.com/github/fastai-energetic-engineering/ashrae/blob/master/_notebooks/2021-07-23_tabular1online-presentation.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# ASHRAE Energy Prediction
> by Energetic Engineering... | github_jupyter |
# Performance Ratio Prediction using Machine Learning Tehcniques - Ganesh Ram Guruajan
### Project Description: Here we have a filtered dataset obtained from WMS, and uploaded by a user on Kaggle, this data contains a few columns along with performance ratio for each row of data. Hence we use machine learning to predi... | github_jupyter |
# T81-558: Applications of Deep Neural Networks
* Instructor: [Jeff Heaton](https://sites.wustl.edu/jeffheaton/), School of Engineering and Applied Science, [Washington University in St. Louis](https://engineering.wustl.edu/Programs/Pages/default.aspx)
* For more information visit the [class website](https://sites.wust... | github_jupyter |
# Vectors
Informally, we think of a vector as an object that has magnitude and direction. More formally, we think of an $n$-dimensional vector as an ordered tuple of numbers $(x_1, x_2, \ldots, x_n)$ that follows the rules of scalar multiplication and vector addition.
```
%matplotlib inline
import numpy as np
import ... | github_jupyter |
## Integer Encoding
Integer encoding consist in replacing the categories by digits from 1 to n (or 0 to n-1, depending the implementation), where n is the number of distinct categories of the variable.
The numbers are assigned arbitrarily. This encoding method allows for quick benchmarking of machine learning models.... | github_jupyter |
##### Copyright 2018 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 |
# Use OSMnx to calculate street network indicators
Author: [Geoff Boeing](https://geoffboeing.com/)
- [Overview of OSMnx](http://geoffboeing.com/2016/11/osmnx-python-street-networks/)
- [GitHub repo](https://github.com/gboeing/osmnx)
- [Examples, demos, tutorials](https://github.com/gboeing/osmnx-examples)
- ... | github_jupyter |
# load the package
```
# This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python
# For example, here's several helpful packages to load in
import numpy as np # linear algebra
import pandas as pd # data ... | github_jupyter |
# Beginner's Python—Session Seven and Eight Finance/Economics Answers
## Elf Corporation Ltd.
As Christmas approaches, Elf Corporation Ltd. is struggling to make ends meet with their gift producing operations. Things also got a LOT harder when a system failure wiped out a bunch of their data. Your task is to help the... | github_jupyter |
Jupyter Notebooks
==================
* You can run a cell by pressing ``[shift] + [Enter]`` or by pressing the "play" button in the menu.

* You can get help on a function or object by pressing ``[shift] + [tab]`` after the opening parenthesis ``function(``
:
!wget -q https://raw.githubusercontent.com/yandexdataschool/Practical_RL/spring20/setup_colab.sh -O- | bash
!wget -q https://raw.githubusercontent.com/yandexdataschool/Practical_RL/coursera/grading.py -O ../grading.p... | github_jupyter |
```
url = '''
https://t.tiktok.com/api/post/item_list/?aid=1988&app_name=tiktok_web&device_platform=web&referer=&root_referer=&user_agent=Mozilla%2F5.0+(Macintosh%3B+Intel+Mac+OS+X+10_15_5)+AppleWebKit%2F537.36+(KHTML,+like+Gecko)+Chrome%2F88.0.4324.146+Safari%2F537.36&cookie_enabled=true&screen_width=2560&screen_heigh... | github_jupyter |
# bar charts
with Formula 1 data from https://ergast.com/mrd/db
```
%autosave 0
from tools import *
f1 = ErgastZIP(ERGAST_ZIP)
plot = Plot()
points = (
f1.team_results
.loc[lambda df: df['points'].gt(0)]
.join(f1.races['season round race'.split()], on='id_race')
.join(f1.teams['team'], on='id_team')
... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
%matplotlib inline
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.cluster import KMeans
from sklearn.svm import SVC
from sklearn import metrics
from mlxtend.plotting import plot_decision_regions
from sklearn import preprocessing
from skl... | github_jupyter |
# KOM Final Project - Kyle - Median Age at Death
### Introduction
Using the dataset provided by the WPRDC, I decided to evaluate Pittsburgh's neighborhoods based on their median age of death from 2011-2015.
In terms of our group metric, evaluating the best neighborhood based on suitability to raise a family, median ... | github_jupyter |
```
%%bash
# move over urls with a 0.7/0.3 split
if ! [ -f svms-data/url.train.svm ]; then
cp urls-data/all00.svm svms-data/url.train.svm
fi
if ! [ -f svms-data/url.test.svm ]; then
cp urls-data/all01.svm svms-data/url.test.svm
fi
%%bash
# kdda
if ! [ -f svms-data/kdda.train.svm ]; then
wget -q -O /tmp/kdda.b... | github_jupyter |
**Chapter 12 – Custom Models and Training with TensorFlow**
_This notebook contains all the sample code in chapter 12._
<table align="left">
<td>
<a target="_blank" href="https://colab.research.google.com/github/ageron/handson-ml2/blob/master/12_custom_models_and_training_with_tensorflow.ipynb"><img src="https:... | github_jupyter |
# Import Modules
First, we are going to load the relevant libraries into the notebook
```
from __future__ import print_function
import keras
from keras.datasets import cifar10
from keras import backend as K
import numpy as np
from keras.preprocessing.image import ImageDataGenerator
from keras.models import Sequential... | github_jupyter |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.

# Re... | github_jupyter |
# EXERCISE — Simple synthetic
This notebook looks at the convolutional model of a seismic trace.
For a fuller example, see [Bianco, E (2004)](https://github.com/seg/tutorials-2014/blob/master/1406_Make_a_synthetic/how_to_make_synthetic.ipynb) in *The Leading Edge*.
First, the usual preliminaries.
```
import numpy a... | github_jupyter |
# Double 7's (Short Term Trading Strategies that Work)
1. The SPY is above its 200-day moving average
2. The SPY closes at a X-day low, buy some shares.
If it falls further, buy some more, etc...
3. If the SPY closes at a X-day high, sell your entire long position.
(Scaling in)
```
# use f... | github_jupyter |
# Identifying the Industry Collaborators of an Academic Institution
Dimensions uses [GRID](https://grid.ac/) identifiers for institutions, hence you can take advantage of the GRID metadata with Dimensions queries.
In this tutorial we identify all organizations that have an `industry` type.
This list of organizatio... | github_jupyter |
# Utiliser le chargeur et le cube de Vector
Cette suite d'exemples va te montrer comment utiliser le chargeur et le cube de Vector.
Ce document contient des cellules grises pour le code et des instructions.
Pour lancer les programmes dans les cellules grises, il faut
- sélectionner la cellule avec la souris (une ba... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
from scipy.signal import find_peaks
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
from sklearn.model_selection import train_test_split
import qiskit.pulse as pulse
import qiskit.pulse.library as pulse_l... | github_jupyter |
```
# demo and evaluate
import os
import numpy as np
import time
import datetime
from tqdm import tqdm
import cv2
import models
import torch
from torch.utils.data import DataLoader
from torchvision import datasets
import torchvision.transforms as transforms
from torch.autograd import Variable
from datasets import *
... | github_jupyter |

https://www.kaggle.com/danofer/sarcasm
<div class="markdown-converter__text--rendered"><h3>Context</h3>
<p>This dataset contains 1.3 million Sarcastic comments from the Internet commentary website Reddit. The dataset was generated by scrap... | github_jupyter |
# Time Series Prediction
**Objectives**
1. Build a linear, DNN and CNN model in keras to predict stock market behavior.
2. Build a simple RNN model and a multi-layer RNN model in keras.
3. Combine RNN and CNN architecture to create a keras model to predict stock market behavior.
In this lab we will build a custom... | github_jupyter |
# Interval based time series classification in sktime
Interval based approaches look at phase dependant intervals of the full series, calculating summary statistics from selected subseries to be used in classification.
Currently 5 univariate interval based approaches are implemented in sktime. Time Series Forest (TSF... | github_jupyter |
##### Copyright 2018 The TensorFlow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
```
#@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.o... | github_jupyter |
```
'''Extract mass and metallicity history from Dusty-SAGE output'''
%pylab inline
import h5py
from random import sample, seed
import copy
from matplotlib.colors import LogNorm
import matplotlib.cm as cm
from astropy.cosmology import FlatLambdaCDM
cosmo = FlatLambdaCDM(H0=73, Om0=0.25)
import matplotlib.patheffects as... | github_jupyter |
## Introduction
In this chapter, we will introduce you to the NetworkX API.
This will allow you to create and manipulate graphs in your computer memory,
thus giving you a language
to more concretely explore graph theory ideas.
Throughout the book, we will be using different graph datasets
to help us anchor ideas.
In... | github_jupyter |
# _Modeling of Qubit Chain_
<img src="images/line_qubits.png" alt="Qubit Chain">
### Contributor
Alexander Yu. Vlasov
***
The model may be illustrated using images from composer.
First image is for one step of quantum walk.
Each step uses two partitions described earlier.
For five qubits each partition includes two... | github_jupyter |
<center>
<a href="https://github.com/nebuly-ai/nebullvm#how-nebullvm-works" target="_blank" style="text-decoration: none;"> How Nebullvm Works </a> •
<a href="https://github.com/nebuly-ai/nebullvm#tutorials" target="_blank" style="text-decoration: none;"> Tutorials </a> •
<a href="https://github.com/nebuly... | github_jupyter |
<h1>Table of Contents<span class="tocSkip"></span></h1>
<div class="toc"><ul class="toc-item"><li><span><a href="#Goal" data-toc-modified-id="Goal-1"><span class="toc-item-num">1 </span>Goal</a></span></li><li><span><a href="#Var" data-toc-modified-id="Var-2"><span class="toc-item-num">2 </span>Va... | github_jupyter |
# Introduction
In this set of exercises, you'll create new features from the existing data. Again you'll compare the score lift for each new feature compared to a baseline model. First off, run the cells below to set up a baseline dataset and model.
```
import numpy as np
import pandas as pd
from sklearn import prepr... | github_jupyter |
# Generates the readout's coefficients
## It uses the simulation output from created in the notebook: BEE_Simulator_ArmControl_VREP_LSM_DATA-GENERATOR.ipynb
```
# Makes possible to show the output from matplotlib inline
%matplotlib inline
import matplotlib.pyplot as plt
# Makes the figures in the PNG format:
# For ... | github_jupyter |
# <center>Python 3.10 — **Structural Pattern Matching**</center>
References:
- [PEP 622 Structural Pattern Matching](https://www.python.org/dev/peps/pep-0622/)
- [PEP 635 Structural Pattern Matching: Motivation and Rationale](https://www.python.org/dev/peps/pep-0635/)
- [PEP 636 Structural Pattern Matching: Tutorial]... | github_jupyter |
```
import pandas as pd
import finterstellar as fs
```
데이터 로딩
```
path = './data/'
cd = 'KOSPI 200'
#cd = 'S&P 500'
# define portfolio universe
portfolio = {
'World indices' : ['KOSPI 200', 'S&P 500', 'Nikkei 225', 'CSI 300']
} # 포트폴리오를 딕셔너리 형태로 저장
p_name = 'World indices' # 포트폴리오 집합 중 분석대상 포트폴리오의 이름 입력
p_c... | github_jupyter |
# <font color=navy> Basic Intro to Python Using Notebooks</font>

image from maxpixel.net
## <font color=navy> Introduction to Python Coding using Notebooks </font>
This exercise will assume you have little to no experience using Python or Jup... | github_jupyter |
```
import numpy as np
import sys
sys.path.append('../../')
# Each Function are at different Part
import imregpoc
import cv2
import math
import VideoStiching
vobj =VideoStiching.VideoStiching('../../../../videoreader/1228/1228.avi')
vobj.load_data()
vobj.Optimization()
vobj.show_stitched('output_POC.mp4')
vobj =VideoSt... | github_jupyter |
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Filter/filter_range_contains.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 |
# Plotting: histograms
In this notebook, we illustrate the possibilities of plotting 1D and 2D histograms.
Note that Osyris's plotting functions are wrapping Matplotlib's plotting functions,
and forwards most Matplotlib arguments to the underlying function.
```
import osyris
import numpy as np
import matplotlib.pypl... | github_jupyter |
# INTRODUCTION
1. This tutorial introduces *trade-based metrics* for hyperparameter optimization of FinRL models.
2. As the name implies, trade-based metrics are associated with the trade activity that FinRL captures in its actions tables. In general, a trade is represented by an entry in an actions file.
2. Such metri... | github_jupyter |
**Objective:**
In this tutorial we will create a simple gravity problem from scratch using the SimPEG framework.
The relation between density and the gravity field is well known, thanks to the classic work of Newton in 1686. Since we generally only measure the vertical component of the field, this relationship can b... | github_jupyter |
```
import math
from rdkit import Chem
from rdkit.Chem import Draw
from rdkit.Chem.Draw import IPythonConsole
from rdkit.Chem.MolStandardize import rdMolStandardize
IPythonConsole.drawOptions.comicMode=True
from rdkit import RDLogger
RDLogger.DisableLog('rdApp.info')
import rdkit
print(rdkit.__version__)
```
# MolStan... | github_jupyter |
```
import pandas as pd
import numpy as np
import random
import re
from scipy import sparse
from sklearn import preprocessing
from sklearn import utils
from sklearn import linear_model
from sklearn.model_selection import cross_val_predict
import luigi
def readin_train(path) :
"""read the csv file in
Args :... | github_jupyter |
[](https://colab.research.google.com/github/guilbera/colorizing/blob/main/notebooks/keras_implementation/autoencoder_keras.ipynb)
```
import tensorflow as tf
import numpy as np
from tensorflow.python.keras.layers import Conv2D, UpSampling2D, Inp... | github_jupyter |
<a href="https://colab.research.google.com/github/korobool/hlll_course/blob/master/topics/02_Introduction.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
| **hillel, DS 2019** | 
import cleaningtool as ct
from helpers import *
from model import *
from data impo... | github_jupyter |
<a href="http://cocl.us/pytorch_link_top">
<img src="https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/DL0110EN/notebook_images%20/Pytochtop.png" width="750" alt="IBM Product " />
</a>
<img src="https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/DL0110EN... | github_jupyter |
## Data Experiment 1
```
# load all images in a directory into memory
def load_images(path, size=(256, 512)):
src_list, tar_list = list(), list()
# enumerate filenames in directory, assume all are images
for filename in listdir(path):
# load and resize the image
pixels = load_img(path + fil... | github_jupyter |
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Filter/filter_range_contains.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 |
# Analyze a large dataset with Google BigQuery
**Learning Objectives**
In this lab, you use BigQuery to:
- Access an ecommerce dataset
- Look at the dataset metadata
- Remove duplicate entries
- Write and execute queries
## Introduction
BigQuery is Google's fully managed, NoOps, low cost analytics database. With Bi... | github_jupyter |
# Traffic Sign Recognition
## Data Set Summary & Exploration
### Basic summary
The dataset include 34799, 4410, and 12630 images in the training, validation and test set respectively. There are in total 43 unique classes/labels in the dataset.
### Exploratory visualization of the dataset
The following three visuali... | github_jupyter |
# Data visualization
Chapter 16 of Py4E covers a few tools for data visualization, and this is a good thing to look over, but I think `matplotlib` is by far the most commonly used and robust tool for data visualization.
This notebook is heavly based on the excellent coverage of this topic in Jake VanderPlas' [Python ... | github_jupyter |
```
#========================================================================
# Copyright 2019 Science Technology Facilities Council
# Copyright 2019 University of Manchester
#
# This work is part of the Core Imaging Library developed by Science Technology
# Facilities Council and University of Manchester
#
# Licensed... | github_jupyter |
## Load libraries
```
import specpy.mtspec as mtspec
import specpy.mtcross as mtcross
import numpy as np
import matplotlib.pyplot as plt
```
## Sediment Core data
```
#------------------------------------------------
# Define desired parameters
#------------------------------------------------
nw = 3.5
kspec = 5 ... | github_jupyter |
<table border="0">
<tr>
<td>
<img src="https://ictd2016.files.wordpress.com/2016/04/microsoft-research-logo-copy.jpg" style="width 30px;" />
</td>
<td>
<img src="https://www.microsoft.com/en-us/research/wp-content/uploads/2016/12/MSR-ALICE-HeaderGraphic-1920x720_... | github_jupyter |
# Shapelets and the Shapelet Transform with sktime
Introduced in [1], a shapelet is a time series subsequences that is identified as being representative of class membership. Shapelets are a powerful approach for measuring _phase-independent_ similarity between time series; they can occur at any point within a series ... | github_jupyter |
```
# Erasmus+ ICCT project (2018-1-SI01-KA203-047081)
# Toggle cell visibility
from IPython.display import HTML
tag = HTML('''<script>
code_show=true;
function code_toggle() {
if (code_show){
$('div.input').hide()
} else {
$('div.input').show()
}
code_show = !code_show
}
$( document... | github_jupyter |
# Load dependencies
```
import cobra
import libsbml
import lxml
models_directory = '/media/sf_Shared/Systems_biology/Metabolic_models/'
OB3b_directory = '/media/sf_Shared/GEM_OB3b/'
memote_directory = '/home/ensakz/Desktop/memote_m_trichosporium/'
fastas_directory = '/media/sf_Shared/Systems_biology/Fastas_and_annotat... | github_jupyter |
```
import warnings
warnings.simplefilter('ignore')
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import graphviz
from sklearn import tree
from sklearn.tree import DecisionTreeClassifier
from sklearn.preprocessing import LabelEncoder
%matplotlib inline
```
# Load Datas... | github_jupyter |
```
import re, sys, math, json, os, urllib.request
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from IPython.display import Image
from IPython.display import display
from time impo... | github_jupyter |
# Introduction to Probability
## Mini-Lab: Basic Probability, Bayes' Rule, Decision Making
Welcome to your next mini-lab! Go ahead an run the following cell to get started. You can do that by clicking on the cell and then clickcing `Run` on the top bar. You can also just press `Shift` + `Enter` to run the cell.
```
i... | github_jupyter |
# End-To-End Example: Data Analysis of iSchool Classes
In this end-to-end example we will perform a data analysis in Python Pandas we will attempt to answer the following questions:
- What percentage of the schedule are undergrad (course number 500 or lower)?
- What undergrad classes are on Friday? or at 8AM?
Things... | github_jupyter |
Modeling distributions
=================
Copyright 2015 Allen Downey
License: [Creative Commons Attribution 4.0 International](http://creativecommons.org/licenses/by/4.0/)
```
from __future__ import print_function, division
import analytic
import brfss
import nsfg
import thinkstats2
import thinkplot
import pandas... | github_jupyter |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
We support installing AML SDK as library from GUI. When attaching a library follow this https://docs.databricks.com/user-guide/libraries.html and add the below string as your PyPi package. You can select the option to attach the... | github_jupyter |
# Demonstration of Basic Sentence Markup with pyConTextNLP
pyConTextNLP uses NetworkX directional graphs to represent the markup: nodes in the graph will be the concepts that are identified in the sentence and edges in the graph will be the relationships between those concepts.
```
import pyConTextNLP.pyConTextGraph ... | github_jupyter |
```
from PIL import Image
import sys
import os
import urllib
import tensorflow.contrib.tensorrt as trt
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import tensorflow as tf
import numpy as np
import time
from tf_trt_models.detection import download_detectio... | github_jupyter |
## Better retrieval via "Dense Passage Retrieval"
### Importance of Retrievers
The Retriever has a huge impact on the performance of our overall search pipeline.
### Different types of Retrievers
#### Sparse
Family of algorithms based on counting the occurences of words (bag-of-words) resulting in very sparse vect... | github_jupyter |
# Netmiko & Diffing
```
HOST = '192.75.232.222'
PORT_NC = 830
PORT_SSH = 22
USER = 'cisco'
PASS = 'cisco'
PLATFORM = 'cisco_xr'
```
## Connect both netmiko and ncclient
```
from netmiko import ConnectHandler
from ncclient import manager
from lxml import etree
def pretty_print(retval):
print(etree.tostring(retv... | github_jupyter |
```
import pandas as pd
import numpy as np
following = pd.read_json("json_data/lucid_table_following.json")
notifications = pd.read_json("json_data/lucid_table_notifications.json")
posts = pd.read_json("json_data/lucid_table_posts.json")
users = pd.read_json("json_data/lucid_table_users.json")
#Dropping irrevelant colu... | github_jupyter |
<a href="https://colab.research.google.com/github/whobbes/fastai/blob/master/lesson2.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
## Fast AI setup
```
# Check python version
import sys
print(sys.version)
# Get libraries
!pip install fastai==0.7... | github_jupyter |
# [Angle closure Glaucoma Evaluation Challenge](https://age.grand-challenge.org/Details/)
## Scleral spur localization Baseline (ResNet50+UNet)
- To keep model training stable, images with coordinate == -1, were removed.
- For real inference, you MIGHT keep all images in val_file_path file.
## Result Visualization
... | github_jupyter |
# Going deeper with Tensorflow
В этом семинаре мы начнем изучать [Tensorflow](https://www.tensorflow.org/) для построения _deep learning_ моделей.
Для установки tf на свою машину:
* `pip install tensorflow` **cpu-only** TF для Linux & Mac OS
* для установки tf с автомагической поддержкой GPU смотри [TF install page](... | github_jupyter |
# How to run this program
First, please make sure that you have **python3** installed (preferably **Anaconda** package).
Then use **jupyter notebook** to run the **.ipynb** file.
If you have any missing python modules, please install them using **pip install**.
```
import numpy as np
import pandas as pd
from sklearn... | github_jupyter |
# How to identify low GPU utilization due to small batch size
In this notebook, we demonstrate how the profiling functionality of Amazon SageMaker Debugger can be used to identify under-utilization of the GPU resource, resulting from a low training batch size. We will demonstrate this using TensorFlow, on a ResNet50 m... | github_jupyter |
# AI Explanations: Explaining a tabular data model
## Overview
In this tutorial we will perform the following steps:
1. Build and train a Keras model.
1. Export the Keras model as a TF 1 SavedModel and deploy the model on Cloud AI Platform.
1. Compute explainations for our model's predictions using Explainable AI on... | github_jupyter |
# Optimization Methods
Until now, you've always used Gradient Descent to update the parameters and minimize the cost. In this notebook, you will learn more advanced optimization methods that can speed up learning and perhaps even get you to a better final value for the cost function. Having a good optimization algorit... | github_jupyter |
# Intro
In this guided project, we're going to study the practical side of the algorithm by building a spam filter for SMS messages.
To classify messages as spam or non-spam the computer:
- Learns how humans classify messages.
- Uses that human knowledge to estimate probabilities for new messages — probabilities f... | github_jupyter |
```
import pandas as pd
from pathlib import Path
from scipy import stats
from sklearn.ensemble import RandomForestRegressor
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
from sklearn.model_selection import learning_curve,RepeatedKFold
from sklearn.pipeline import make_pipeline
from yellowbr... | github_jupyter |
# Linear Regression
In this lesson we will learn about linear regression. We will understand the basic math behind it, implement it in just NumPy and then in [PyTorch](https://pytorch.org/).
# Overview
Our goal is to learn a linear model $\hat{y}$ that models $y$ given $X$.
$\hat{y} = XW + b$
* $\hat{y}$ = predict... | github_jupyter |
NBEATS EXAMPLE
https://datamarket.com/data/set/22ox/monthly-milk-production-pounds-per-cow-jan-62-dec-75#!ds=22ox&display=line
It's a toy example to show how to do time series forecasting using N-Beats.
```
%matplotlib inline
import os
import matplotlib.pyplot as plt
import torch
from torch import optim
from torch.n... | github_jupyter |
## Product and activity names
So the point is how to separate between the name of a product (e.g. _electricity, low voltage_) and the name of the activity producing it (e.g. _electricity production_).
I don't think there is a good way to do this but let's see.
```
import brightway2 as bw
bw.projects
bw.projects.set_... | github_jupyter |
## **Imports and configurations**
```
%reload_ext autoreload
%autoreload 2
import os
import time
import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import plotly.graph_objs as go
from IPython.display import IFrame
from plotly.offline import init_notebook_mode
init_notebook_mode(... | github_jupyter |
# Creating a Sentiment Analysis Web App
## Using PyTorch and SageMaker
_Deep Learning Nanodegree Program | Deployment_
---
Now that we have a basic understanding of how SageMaker works we will try to use it to construct a complete project from end to end. Our goal will be to have a simple web page which a user can u... | github_jupyter |
<a href="https://www.bigdatauniversity.com"><img src="https://ibm.box.com/shared/static/cw2c7r3o20w9zn8gkecaeyjhgw3xdgbj.png" width="400" align="center"></a>
<h1><center>Polynomial Regression</center></h1>
<h4>About this Notebook</h4>
In this notebook, we learn how to use scikit-learn for Polynomial regression. We do... | github_jupyter |
# 训练神经网络
我们在上个部分构建的神经网络其实不太成熟,它还不能识别任何数字。具有非线性激活函数的神经网络就像通用函数逼近器一样。某些函数会将输入映射到输出。例如,将手写数字图像映射到类别概率。神经网络的强大之处是我们可以训练网络以逼近这个函数,基本上只要提供充足的数据和计算时间,任何函数都可以逼近。
<img src="assets/function_approx.png" width=500px>
一开始网络很朴素,不知道将输入映射到输出的函数。我们通过向网络展示实际数据样本训练网络,然后调整网络参数,使其逼近此函数。
要得出这些参数,我们需要了解网络预测真实输出的效果如何。为此,我们将计算**损失函数**(也称为成... | github_jupyter |
<table align="left" width="100%"> <tr>
<td style="background-color:#ffffff;">
<a href="http://qworld.lu.lv" target="_blank"><img src="..\images\qworld.jpg" width="35%" align="left"> </a></td>
<td style="background-color:#ffffff;vertical-align:bottom;text-align:right;">
prepared... | github_jupyter |
<a href="https://colab.research.google.com/github/google-research/text-to-text-transfer-transformer/blob/master/notebooks/t5-trivia.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
##### Copyright 2019 The T5 Authors
Licensed under the Apache Licen... | github_jupyter |
```
import warnings
warnings.filterwarnings('ignore')
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split,cross_val_score,GridSearchCV,KFold
from sklearn.preprocessing import OneHotEncoder,StandardScaler
from sklearn.compose import make_column_tra... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.