text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
# Predicting Boston Housing Prices
## Using XGBoost in SageMaker (Hyperparameter Tuning)
_Deep Learning Nanodegree Program | Deployment_
---
As an introduction to using SageMaker's High Level Python API for hyperparameter tuning, we will look again at the [Boston Housing Dataset](https://www.cs.toronto.edu/~delve/d... | github_jupyter |
# Noise Estimation using Correlation Methods
In this tutorial, we will demonstrate how to use 2-channel and 3-channel correlation methods,`kontrol.spectral.two_channel_correlation()` and `kontrol.spectral.three_channel_correlation()`, to estimate sensor self noise. Library reference is available [here](https://kontrol.... | github_jupyter |
<img src="NotebookAddons/blackboard-banner.png" width="100%" />
<font face="Calibri">
<br>
<font size="5"> <b>Volcano Source Modeling Using InSAR</b> </font>
<br>
<font size="4"> <b> Franz J Meyer; University of Alaska Fairbanks </b> <br>
</font>
<img style="padding: 7px" src="NotebookAddons/UAFLogo_A_647.png" width... | github_jupyter |
# EuroSciPy 2019 - 3D image processing with scikit-image
* Support material for the tutorial _3D image processing with scikit-image_.
This tutorial will introduce how to analyze three dimensional stacked and volumetric images in Python, mainly using scikit-image. Here we will learn how to:
* pre-process data using f... | github_jupyter |
# 19-05-16 Notes:

I was attempting to generate PDB files for my model's predictions (including sidechains), but I found out that my backbone reconstruction is poor to begin with. In this notebook, I'll use `prody` and `matplotlib` to try to root out the issue.
`... | github_jupyter |
```
#Setup
%matplotlib inline
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import scipy
from scipy import stats
plt.rcParams["figure.figsize"] = (20,15)
```
## Homework 5
The purpose of this homework is to work carefully through a numeric/simulted solution to Bayes' Theorem. Bayes' Theorem read... | github_jupyter |
```
# importamos las librerías necesarias
%matplotlib inline
import random
import tsfresh
import os
import math
from scipy import stats
from scipy.spatial.distance import pdist
from math import sqrt, log, floor
from fastdtw import fastdtw
import ipywidgets as widgets
import matplotlib.pyplot as plt
import matplotlib.cm... | github_jupyter |
```
import sys
import gc
#sys.path
sys.path.insert(0, '../')
sys.path
import pandas as pd
from Data_cleaning import get_clean_data
from Data_cleaning import get_merged_data_frame
```
### Load Data
we now load the data using Alfred's framework.
```
df_merged = get_merged_data_frame(user_argv=10, isbn_argv=10, path='... | github_jupyter |
<br />
<div style="text-align: center;">
<span style="font-weight: bold; color:#6dc; font-family: 'Arial Narrow'; font-size: 3.5em;">Global Snow Cover</span>
</div>
<span style="color:#333; font-family: 'Arial'; font-size: 1.1em;"> Data Taken from: ftp://neoftp.sci.gsfc.nasa.gov/geotiff/MOD10C1_M_SNOW/<br />
<br /... | github_jupyter |
```
import json
import os
import _jsonnet
import os
from seq2struct.commands.infer import Inferer
from seq2struct.datasets.spider import SpiderItem
from seq2struct.utils import registry
import torch
exp_config = json.loads(
_jsonnet.evaluate_file(
"experiments/spider-configs/spider-mBART50MtoM-large-en-pt-e... | github_jupyter |
# PRMT-2324 Run top level table for first 2 weeks of August 2021
## Context
In our July data we saw a significant increase in GP2GP failures. We want to understand if these were blips, perhaps caused by something that happening during July, or whether these failures are continuing. We don’t want to wait until we have ... | github_jupyter |
```
import jieba
```
## 分词
```
# 结巴中文分词的基本操作
# 全模式: 所有可能构成词语的无向图连接而成. 缺点: 不能解决歧义问题 例如:北京大学/北京 大学
seg_list = jieba.cut('我来到北京的北京大学', cut_all=True)
print("Full Mode:"+','.join(seg_list))
# 精确分词模式, 适合做文本分析
seg_list = jieba.cut('我来到北京的北京大学', cut_all=False)
print("Default Mode:"+'/'.join(seg_list))
# 搜索引擎模式, 对长词再次切分, 提高召回... | github_jupyter |
# Model Evaluation and Refinement
---------------------------------
This notebook will discuss some techniques on how to evaluate models and a way to refine the Linear Regression Models.
After creating a model, it is vital to evaluate it for correctness and refine if necessary. There are various ways to do so.
We wo... | github_jupyter |
# Pilatus on a goniometer at ID28
Nguyen Thanh Tra who was post-doc at ESRF-ID28 enquired about a potential bug in pyFAI in October 2016: he calibrated 3 images taken with a Pilatus-1M detector at various detector angles: 0, 17 and 45 degrees.
While everything looked correct, in first approximation, one peak did not ... | github_jupyter |
# Convergence and Stability of Gradient Descent for Linear Regression Problems
## (I) Gradient Descent
Consider the following problem:
$\min_{\alpha,\beta} \hat{Q}(\alpha,\beta) \equiv \min_{\alpha,\beta} \frac{1}{N} \sum_{i=1}^N \big(y_i - \alpha - \beta x_i\big)^2 $
The gradinet of $\hat{Q}$ can be written as :... | github_jupyter |
# Building interactive plots using `bqplot` and `ipywidgets`
* `bqplot` is built on top of the `ipywidgets` framework
* `ipwidgets` and `bqplot` widgets can be seamlessly integrated to build interactive plots
* `bqplot` figure widgets can be stacked with UI controls available in `ipywidgets` by using `Layout` classes ... | github_jupyter |
# Pandas
<img src="https://raw.githubusercontent.com/GokuMohandas/practicalAI/master/images/logo.png" width=150>
In this notebook, we'll learn the basics of data analysis with the Python Pandas library.
<img src="https://raw.githubusercontent.com/GokuMohandas/practicalAI/master/images/pandas.png" width=500>
# Uploa... | github_jupyter |
# Experiments on the COMPAS Dataset
Install ```AIF360``` with minimum requirements:
```
!pip install aif360
```
Install packages that we will use:
```
import numpy as np
import matplotlib.pyplot as plt
import pickle
from aif360.algorithms.preprocessing.optim_preproc_helpers.data_preproc_functions \
import load... | github_jupyter |
# Temperature forecast for the general public (MAELSTROM-Yr dataset)
This dataset contains temperature weather forecast for the Nordic region, and are used to produce public weather forecasts on the weather app Yr (www.yr.no). The goal of the prediction task is to generate a deterministic temperature forecast together... | github_jupyter |
# Compare Hankel and Fourier Transforms
This will compare the forward and inverse transforms for both Hankel and Fourier by either computing partial derivatives of solving a parital differential equation.
This notebook focuses on the Laplacian operator in the case of radial symmetry.
Consider two 2D circularly-symm... | github_jupyter |
# Uniform quantization in frequency domain
```
import numpy as np
import matplotlib.pyplot as plt
from scipy import fftpack
from scipy.misc import bytescale
import matplotlib.image as mpimg
# loading image
img = bytescale(mpimg.imread('i/super_mario_head.png'))
choosen_y_x = 90
resolution = 128
img_slice = img[choose... | github_jupyter |
# Introduction to Chinook with Graphene
In the following exercise, we'll get a feeling for building and characterizing tight-binding models in chinook, in addition to some calculation of the associated ARPES intensity. I'll use graphene for this exercise.
I'll start by importing the requisite python libraries -- inc... | github_jupyter |
<img src="../../images/brownbear.png" width="400">
## A financial tool that can analyze and maximize investment portfolios on a risk adjusted basis
Description: This notebook is useful for examining potfolios comprised of stocks from the Dow Jones Industrial Average. Construct portfolios from the 30 stocks in th... | github_jupyter |
<h1 id="CWPK-#20:-Basic-Knowledge-Graph-Management---I">CWPK #20: Basic Knowledge Graph Management - I</h1>
<h2 id="It's-Time-to-Learn-How-to-Do-Some-Productive-Work">It's Time to Learn How to Do Some Productive Work</h2>
<div style="float: left; width: 305px; margin-right: 10px;"><img title="Cooking with KBpedia" src=... | github_jupyter |
```
import numpy as np
from scipy.io import loadmat
from sklearn.linear_model import LogisticRegression as LR
import matplotlib.pyplot as plt
%matplotlib inline
# Theano imports
import theano
theano.config.floatX = 'float32'
import theano.tensor as T
# Plotting utility
from utils import tile_raster_images as tri
```
... | github_jupyter |
# Power Law Transformation
Normally the quality of an image is improved by enhancing contrast and sharpness.
Power law transformations or piece-wise linear transformation functions require lot of user input. In the former case one has to choose the exponent
appearing in the transformation function, while in the latte... | github_jupyter |
# Week 2 - Classical ML Models - Part I
## 3. Classification
As it has been mentioned in the previous week, in the classification problems we have a set of inputs that belong to 2 or more categories and we have to train model to assign new set of inputs to corresponding categories.
Although there are many existing c... | github_jupyter |
```
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from tqdm import tqdm as tqdm
%matplotlib inline
import torch
import torchvision
import torchvision.transforms as transforms
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import random
transform = trans... | github_jupyter |
# Dense Sentiment Classifier
classifying IMDB reviews by sentiment.
#### Load dependencies
```
import keras
from keras.datasets import imdb
from keras.preprocessing.sequence import pad_sequences
from keras.models import Sequential
from keras.layers import Dense, Flatten, Dropout
from keras.layers import Embedding
fr... | github_jupyter |
# Using DALI in PyTorch
### Overview
This example shows how to use DALI in PyTorch.
This example uses CaffeReader.
See other [examples](../../index.rst) for details on how to use different data formats.
Let us start from defining some global constants
`DALI_EXTRA_PATH` environment variable should point to the plac... | github_jupyter |
## Applying Neural Networks on Material Science dataset
The given dataset contains certain microstructurual properties like Yield Strength, Oxygen content, percentage of reheated microstructure and fraction of acicular ferrite. Since the number of features is just 4 and the dataset as only 59 datapoints, it is tough to... | github_jupyter |
```
import numpy as np
import json
import warnings
import operator
import h5py
from keras.models import model_from_json
from keras import backend as K
from keras.utils import get_custom_objects
warnings.filterwarnings("ignore")
size_title = 18
size_label = 14
n_pred = 2
def read_file(file_path):
with open(file... | github_jupyter |
```
import matplotlib.pyplot as plt
import math
class Polygon_b:
def __init__ (self, xlist,ylist,col):
self.xlist=xlist
self.ylist=ylist
self.col=col
def display(self):
plt.fill(self.xlist,self.ylist,c=self.col)
#swiss flag
plt.figure(figsize=(4,4))
plt.axis('equal')
bg=Polygon... | github_jupyter |
<a href="https://colab.research.google.com/github/NidhiChaurasia/LGMVIP-DataScience/blob/main/Stock_Prediction_Using_Linear_Regression_and_DecisionTree_Regression_Model.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
Decision Tree is used in practic... | github_jupyter |
### Generative Adversarial Networks
Jay Urbain, Phd
Credits:
- https://github.com/eriklindernoren/Keras-GAN
- The network architecture has been found by, and optimized by, many contributors, including the authors of the DCGAN paper and people like Erik Linder-Norén, who’s excellent collection of GAN implementati... | github_jupyter |
Earlier we trained a model to predict the ratings users would give to movies using a network with embeddings learned for each movie and user. Embeddings are powerful! But how do they actually work?
Previously, I claimed that embeddings capture the 'meaning' of the objects they represent, and discover useful latent st... | github_jupyter |
```
# default_exp model_evaluation
```
# Model Evaluation 📈
```
#export
from tensorflow.keras.models import load_model
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from sklearn.metrics import average_precision_score,precision_recall_curve
from funcsigs import signature
from sklearn.metrics ... | 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 |
<div style='background-image: url("../../share/images/header.svg") ; padding: 0px ; background-size: cover ; border-radius: 5px ; height: 250px'>
<div style="float: right ; margin: 50px ; padding: 20px ; background: rgba(255 , 255 , 255 , 0.7) ; width: 50% ; height: 150px">
<div style="position: relative ; ... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
from genomic_benchmarks.loc2seq.with_biopython import _fastagz2dict
from genomic_benchmarks.seq2loc import fasta2loc
from sklearn.model_selection import train_test_split
import pandas as pd
from tqdm.notebook import tqdm
from pathlib import Path
import yaml
import tarfile
```
## ... | github_jupyter |
<!--COURSE_INFORMATION-->
<img align="left" style="padding-right:10px;" src="https://user-images.githubusercontent.com/16768318/73986808-75b3ca00-4936-11ea-90f1-3a6c352766ce.png" width=10% >
<img align="right" style="padding-left:10px;" src="https://user-images.githubusercontent.com/16768318/73986811-764c6080-4936-11ea... | github_jupyter |
# 1. Quaternion rate를 누적한 자세 추정
- 지구 회전을 고려하지 않을 경우 사용가능 다음과 같이 quaternion rate는 다음과 같이 단순화 하여 표현가능
$$
\begin{aligned}
{\dot q} &= \frac{1}{2}Q\tilde\omega^b\\\\
\begin{bmatrix}
\dot q_1\\
\dot q_2\\
\dot q_3\\
\dot q_4\\
\end{bmatrix}
&=
\frac{1}{2}
\begin{bmatrix}
q_1& -q_2& -q_3& -q_4\\
q_2& q_1& -q_4& q_3\\
q_3& ... | github_jupyter |
<a href="https://colab.research.google.com/github/clemencia/ML4PPGF_UERJ/blob/master/Amostragem_e_integracao_MC.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
## Amostragem de Monte Carlo pelo Método da Inversão
### Exemplo 1: ***A distribuição... | github_jupyter |
```
# default_exp batchbald
# hide
import blackhc.project.script
from nbdev.showdoc import *
```
# BatchBALD Algorithm
> Greedy algorithm and score computation
First, we will implement two helper classes to compute conditional entropies $H[y_i|w]$ and entropies $H[y_i]$.
Then, we will implement BatchBALD and BALD.
... | github_jupyter |
# Handwritten Number Recognition with TFLearn and MNIST
In this notebook, we'll be building a neural network that recognizes handwritten numbers 0-9.
This kind of neural network is used in a variety of real-world applications including: recognizing phone numbers and sorting postal mail by address. To build the netwo... | github_jupyter |
This notebook is the reproduction of an exercise found at http://people.ku.edu/~gbohling/cpe940/Kriging.pdf
```
import sys
sys.path.append('..')
sys.path.append('../geostatsmodels')
from geostatsmodels import utilities, variograms, model, kriging, geoplot
import matplotlib.pyplot as plt
import numpy as np
import panda... | github_jupyter |
## relation extraction 实践
> Tutorial作者:余海阳(yuhaiyang@zju.edu.cn)
在这个演示中,我们使用 `gcn ` 模型实现中文关系抽取。
希望在这个demo中帮助大家了解知识图谱构建过程中,三元组抽取构建的原理和常用方法。
本demo使用 `python3` 运⾏。
### 数据集
在这个示例中,我们采样了一些中文文本,抽取其中的三元组。
sentence|relation|head|tail
:---:|:---:|:---:|:---:
孔正锡在2005年以一部温馨的爱情电影《长腿叔叔》敲开电影界大门。|导演|长腿叔叔|孔正锡
《伤心的树》是吴宗宪的音乐作品,收录在《... | github_jupyter |
# Algorithms blind tasting wines
*In this study we present a simple application of Natural Language Processing to classifying grape types based on semi-professional text based description of a glass of wine. We build a classifier model with pipelines and test it through two different datasets. A part of one of the dat... | github_jupyter |
```
"""
You can run either this notebook locally (if you have all the dependencies and a GPU) or on Google Colab.
Instructions for setting up Colab are as follows:
1. Open a new Python 3 notebook.
2. Import this notebook from GitHub (File -> Upload Notebook -> "GITHUB" tab -> copy/paste GitHub URL)
3. Connect to an in... | github_jupyter |
```
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import matplotlib.patheffects as path_effects
import tabulate
# Set plotting style
plt.style.use('seaborn-white')
current_palette = sns.color_palette()
COLOR_MAP = {
"Male": current_palette[0],
"Female"... | github_jupyter |
##### Copyright 2020 Google LLC.
Licensed under the Apache License, Version 2.0 (the "License");
```
#@title Default title text
# 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... | github_jupyter |
# Load Accession Numbers Mappings
**[Work in progress]**
This notebook downloads and standardizes accession numbers from life science and biological databases textmined from PubMedCentral full text articles by [Europe PMC](https://europepmc.org/) for ingestion into a Knowledge Graph.
Data source: [ftp site](ftp://ftp... | github_jupyter |
```
import os
import subprocess
import pandas as pd
import time
import seaborn as sns
sns.set(style='whitegrid')
sns.set(rc={'figure.figsize':(11.7, 8.27)})
def run_experiment(exp_name: str, rps=100, duration_sec=5, handler='sleep50', silent=True) -> str:
dump_file = f'/tmp/{exp_name}.bin'
run_vegeta = f"echo ... | github_jupyter |
# Lecture 25: Beta-Gamma (bank-post office), order statistics, conditional expectation, two envelope paradox
## Stat 110, Prof. Joe Blitzstein, Harvard University
----
## Connecting the Gamma and Beta Distributions
Say you have to visit both the bank and the post office today. What can we say about the total times... | github_jupyter |
# MARATONA BEHIND THE CODE 2020
## DESAFIO 6 - ANAHUAC
### Introducción
En este desafio, usted usará herramientas de IBM como Watson Studio (o Cloud Pak for Data) para construir un modelo baseado en Machine Learning capaz de preveer si un estudante irá continuar o abandonará su curso.
<hr>
## Installing Libs
```
... | github_jupyter |
## Experiments approximating the posterior with diagonal Gaussians from noisy-Adam samples
We start by building the model and showing the basic inference procedure and calculation of the performance on the MNIST classification and the outlier detection task. Then perform multiple runs of the model with different numbe... | github_jupyter |
# Data Cleaning and Preprocessing for Sentiment Analysis
> Copyright 2019 Dave Fernandes. All Rights Reserved.
>
> 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
>
> http://www.apache.org/lice... | github_jupyter |
```
import os
import json
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
plt.style.use("seaborn")
DATA_ROOT = '../../results'
data = {env: {} for env in os.listdir(DATA_ROOT)}
for env in data:
for training in os.listdir(f'{DATA_ROOT}/{env}'):
if training.endswi... | github_jupyter |
```
from cache import cache
from collections import defaultdict
from decimal import Decimal
import httpx
import json
import pandas as pd
from pprint import pprint
import sys
from tabulate import tabulate
import time
from web3 import Web3
from IPython.display import display, HTML
# Gas Price - we could use web3 but thi... | github_jupyter |
<a id="title"></a>
<a id="toc"></a>

<div style="margin-top: 9px; background-color: #efefef; padding-top:10px; padding-bottom:10px;margin-bottom: 9px;box-shadow: 5px 5px 5px 0px rgba(87, 87, 87, 0.2);">
<center>
<h2>Table of Contents</h2>
</center>
<ol>
<li><a href... | github_jupyter |
# Visualization Code for Machine Learning the Warm Rain Process
David John Gagne
This notebook contains the code for generating some of the figures and tables in Machine Learning the Warm Rain Process.
```
%matplotlib inline
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from glob import glob
... | github_jupyter |
# Preprocessing
MolecularGraph.jl version: 0.10.0
Your chemical structure data may have some inconsistency in molecular graph notation that comes from difference in input data format. Also preferable molecular graph model should be selected according to the application. `MolecularGraph.jl` offers preprocessing metho... | github_jupyter |
# tensorflow2.0教程-文本分类
我们将构建一个简单的文本分类器,并使用IMDB进行训练和测试
```
from __future__ import absolute_import, division, print_function
import tensorflow as tf
from tensorflow import keras
import numpy as np
print(tf.__version__)
```
## 1.IMDB数据集
下载
```
imdb=keras.datasets.imdb
(train_x, train_y), (test_x, text_y)=keras.data... | 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 |
# A Brief Introduction to NumPy
### "...the fundamental package for scientific computing with Python." - numpy.org
In this notebook, we will cover the basics of NumPy, a package that is the basis for many other libraries in the data science ecosystem. Let's get started.
```
import numpy as np
from IPython.display imp... | github_jupyter |
```
import re
import math
#UNK is used for unseen words in training vocabulary
UNK= None
#sentence start and end
sent_start= "<s>"
send_end= "</s>"
def read_sentences_from_file(path):
with open(path, "r") as f:
#string.rstrip("\n") removes string portion after \n or new line
#re.split( arg1, arg2): ... | github_jupyter |
# Conceitos básicos de estatística
Esse notebook é composto por exercícios que te ajudarão a entender conceitos básicos de estatística.
A estatística nos ajuda a responder perguntas que queremos fazer aos dados. Esse ano, 2022, celebramos 90 anos da conquista do voto feminino, ou seja, apenas em 1932 nós mulheres co... | github_jupyter |
```
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
a = np.random.random(10)
def make_viz(arr):
def showit(width, height, cast_as, global_bounds = False):
v = arr.view(cast_as)[:width*height].reshape((width, height))
plt.clf()
if global_bounds == Tru... | github_jupyter |
The code below produces a basic boxplot using the `boxplot()` function of seaborn. When you look at the graph, it is easy to conclude that the ‘C’ group has a higher value than the others. However, we cannot see what is the **underlying distribution** of dots in each group, neither the **number of observations** for ea... | github_jupyter |
# The atoms of computation
## Introduction
Programming a quantum computer is now something that anyone can do in the comfort of their own home. But what to create? What is a quantum program anyway? In fact, what is a quantum computer?
These questions can be answered by making comparisons to traditional digital compu... | github_jupyter |
```
import os
import cv2
import time
import mediapipe as mp
import numpy as np
from matplotlib import pyplot as plt
mp_holistic = mp.solutions.holistic
mp_drawing = mp.solutions.drawing_utils
def mediapipe_detection(image, model):
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
image.flags.writeable = False
... | github_jupyter |
<small><i>This notebook was put together by [Jake Vanderplas](http://www.vanderplas.com). Source and license info is on [GitHub](https://github.com/jakevdp/sklearn_tutorial/).</i></small>
# Density Estimation: Gaussian Mixture Models
Here we'll explore **Gaussian Mixture Models**, which is an unsupervised clustering ... | github_jupyter |
```
import glob
import matplotlib.pyplot as plt
import numpy as np
import os
import pickle
import sys
sys.path.append("..")
from demo_2_awac import och_2_awac
DATA_DIR = '/usr/local/google/home/bkinman/proj/rpl_reset_free/20201005_slider_play_reprocessed'
def create_awac_dict_from_demo_pkls(data_dir):
full_awac_... | github_jupyter |
# Solving the heat equation
[AMath 586, Spring Quarter 2019](http://staff.washington.edu/rjl/classes/am586s2019/) at the University of Washington. For other notebooks, see [Index.ipynb](Index.ipynb) or the [Index of all notebooks on Github](https://github.com/rjleveque/amath586s2019/blob/master/notebooks/Index.ipynb)... | github_jupyter |
# Publishing packages as web layers
Packages in ArcGIS bundle maps, data, tools and cartographic information. ArcGIS lets you [create a variety of packages](http://pro.arcgis.com/en/pro-app/help/sharing/overview/introduction-to-sharing-packages.htm) such as map (.mpkx), layer (.lpkx), map tile (.tpk), vector tile (.vt... | github_jupyter |
# Word2Vec
**Learning Objectives**
1. Compile all steps into one function
2. Prepare training data for Word2Vec
3. Model and Training
4. Embedding lookup and analysis
## Introduction
Word2Vec is not a singular algorithm, rather, it is a family of model architectures and optimizations that can be used to learn wo... | github_jupyter |
# Working with Datastores
Although it's fairly common for data scientists to work with data on their local file system, in an enterprise environment it can be more effective to store the data in a central location where multiple data scientists can access it. In this lab, you'll store data in the cloud, and use an Azu... | github_jupyter |
<a href="https://colab.research.google.com/github/satyajitghana/TSAI-DeepVision-EVA4.0/blob/master/05_CodingDrill/EVA4S5F9.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Import Libraries
```
from __future__ import print_function
import torch
imp... | github_jupyter |
# ML 101
## Evaluation (Classification)
The metrics that you choose to evaluate your machine learning algorithms are very important.
Choice of metrics influences how the performance of machine learning algorithms is measured and compared. They influence how you weight the importance of different characteristics in t... | github_jupyter |
<div class="alert block alert-info alert">
# <center> Introductory Python3 Examples
## <center>Karl N. Kirschner<br>Bonn-Rhein-Sieg University of Applied Sciences<br>Sankt Augustin, Germany
## <center> Demo of Jupyter Notebook / Colaboratory
<hr style="border:2px solid gray"> </hr>
## What might I consider good cod... | github_jupyter |
# E-news Express
## Import all the necessary libraries
```
import warnings
warnings.filterwarnings('ignore') # ignore warnings and do not display them
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
%matplotlib inline
import seaborn as sns
```
## 1. Explore the dataset and extract insight... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
import grAdapt
from grAdapt.surrogate import NoModel, NoGradient
from grAdapt.optimizer import GradientDescentBisection, GradientDescent, Adam, AdamBisection, AMSGrad, AMSGradBisection
from grAdapt.models import Sequential
# data types
from grAdapt.space.datatype... | github_jupyter |
# Distributed Compute
This is a heart of Fugue. In the previous sections, we went over how to use Fugue in the form of extensions and basic data operations such as joins. In this section, we'll talk about how those Fugue extensions scale.
## Partition and Presort
One of the most fundamental distributed compute conce... | github_jupyter |
# Scatterplots
Scatterplots are used to examine the relationship between two variables.
```
# import seaborn, matplotlib
# set up inline figures
# load iris and preview the data
```
Say we want to look at the relationship between `sepal_length` and `sepal_width` within our dataset. We'll use the `sns.scatterplot` f... | github_jupyter |
# DML and Partitioning
As part of this section we will continue understanding further concepts related to DML and also get into the details related to partitioning tables. With respect to DML, earlier we have seen how to use LOAD command, now we will see how to use INSERT command primarily to get query results copied ... | github_jupyter |
## Домашнее задание по программированию.
## Производные. Частные производные. Градиент. Градиентный спуск.
Нам понадобится библиотека **numpy** - о ней было рассказано на первой лекции. Если ничего не помните, то можно обратиться к следующим ресурсам:
1. http://pyviy.blogspot.com/2009/09/numpy.html
2. https://pythonw... | github_jupyter |
## SWEPUB - ORCID
version 0.8
* This [notebook](https://github.com/salgo60/open-data-examples/blob/master/SWEPUB%20-%20ORCID.ipynb)
* SWEPUB
* [Kundo question](https://kundo.se/org/swepub/d/api-for-amnesklassificering/#c3571837) were they recommend download the ZIP file to access data in SWEPUB --> JSON 10.81 Gbyte ... | github_jupyter |
## Setup
```
import sys
import os
madminer_src_path = "/home/shomiller/madminer"
sys.path.append(madminer_src_path)
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import numpy as np
import math
import matplotlib
from matplotlib import pyplot as plt
from scipy.optimi... | github_jupyter |
```
""" Ingest MAPSPAM 2010 data into earthengine
-------------------------------------------------------------------------------
Author: Rutger Hofste
Date: 20190617
Kernel: python36
Docker: rutgerhofste/gisdocker:ubuntu16.04
"""
TESTING = 0
SCRIPT_NAME = "Y2019M06D17_RH_Ingest_MAPSPAM_EE_V01"
OUTPUT_VERSION = 2
N... | github_jupyter |
# Pix2Pix implementation
* `Image-to-Image Translation with Conditional Adversarial Networks`, arXiv:1611.07004
* Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, Alexei A. Efros
* This code is a modified version of [tensorflow pix2pix exmaple code](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/e... | github_jupyter |
```
import re
import nltk
from sklearn.feature_extraction.text import CountVectorizer
text_pos = []
labels_pos = []
with open("./pos_tweets.txt") as f:
for i in f:
text_pos.append(i)
labels_pos.append('pos')
text_neg = []
labels_neg = []
with open("./neg_tweets.txt") as f:
for i in f:
... | github_jupyter |
<a href="https://colab.research.google.com/github/MarvelAmazon/ReadStataFile/blob/main/NLP_job.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
## Kouman ou ka dekri domenn yon dyòb deskripsyon avèk NLP.
### 1.Entwodiksyon
An Ayiti Chache yon dyò... | github_jupyter |
## Probability distributions
Probability distribution is the backbone of uncertainty quantification.
Creating a probability distribution in `chaospy` is done by as follows:
```
import chaospy
normal = chaospy.Normal(mu=2, sigma=2)
normal
```
The distribution have a few methods that the user can used, which has name... | github_jupyter |
# Factorization
Factorization is the process of restating an expression as the *product* of two expressions (in other words, expressions multiplied together).
For example, you can make the value **16** by performing the following multiplications of integer numbers:
- 1 x 16
- 2 x 8
- 4 x 4
Another way of saying this ... | github_jupyter |
# Matplotlib
## Introduction
- matplotlib is probably the single most used Python package for 2D-graphics
- it also provides good capablities to creade 3D-graphics
- quick way to visualize data from python in publication-quality
- for further information: https://matplotlib.org/
## Creating First Plots
### 1. Import... | github_jupyter |
```
# default_exp custom_tf_training
```
# Custom Tensorflow Training
> Extending tf.keras for custom training functionality
```
# export
import os
from nbdev.showdoc import *
from fastcore.test import *
import tensorflow as tf
import sklearn
import numpy as np
from sklearn.datasets import fetch_california_housing... | github_jupyter |
```
from __future__ import division
import os, sys, time, random
import math
import scipy
from scipy import constants
import torch
from torch import nn, optim
from torch import autograd
from torch.autograd import grad
import autograd.numpy as np
from torch.utils.data import Dataset, DataLoader
from torch.autograd.varia... | github_jupyter |
## PyBEAM Tutorial 3: Parameter inference.
In this tutorial, we discuss how to run PyBEAM's parameter inference tool. If you have not done so already, look at the Tutorial 1 and 2 notebooks since we will be using tools introduced in those here.
Once you have done this, import PyBEAM's default sub-module.
```
# impor... | github_jupyter |
# Plotting with pandas
In this chapter, we learn how to plot directly from pandas DataFrames or Series. Internally, pandas uses matplotlib to do all of its plotting. Let's begin by reading in the stocks dataset.
```
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
stocks = pd... | github_jupyter |
# DD-Pose getting started
This jupyter notebook shows you how to access the raw data and annotations of the DD-Pose dataset
```
from dd_pose.dataset import Dataset
from dd_pose.dataset_item import DatasetItem
from dd_pose.image_decorator import ImageDecorator
from dd_pose.jupyter_helpers import showimage
from dd_pose.... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.