text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
# Data visualization of iris Dataset
this is exploration of iris dataset using python visualizing modules
for more info :- https://en.wikipedia.org/wiki/Iris_(plant)
```
# importing dapendent libraries
import numpy as np
import pandas as pd
#The subprocess module allows you to spawn new processes, connect to their i... | github_jupyter |
# Masakhane - Reverse Machine Translation for African Languages (Using JoeyNMT)
> ## NB
>### - The purpose of this Notebook is to build models that translate African languages(target language) *into* English(source language). This will allow us to in future be able to make translations from one African language to the... | github_jupyter |
<a href="https://www.bigdatauniversity.com"><img src = "https://ibm.box.com/shared/static/jvcqp2iy2jlx2b32rmzdt0tx8lvxgzkp.png" width = 300, align = "center"></a>
<h1 align=center><font size = 5> RESTRICTED BOLTZMANN MACHINES</font></h1>
### Introduction
__Restricted Boltzmann Machine (RBM):__ RBMs are shallow neura... | github_jupyter |
```
import pandas as pd
import numpy as np
from scipy import stats
import math
import matplotlib as mpl
import matplotlib.pyplot as plt
import pylab as pl
%matplotlib inline
from scipy.stats import kde
import seaborn as sns
import gdal
import os
print('All packages imported succesfully')
# Define the year
year = '201... | github_jupyter |
<a href="https://colab.research.google.com/github/chemaar/python-programming-course/blob/master/Lab_5b_Data_Structures_Tuples_Sets_Dictionaries.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Lab 5b: Data structures: Tuples, Sets and Dictionaries
... | github_jupyter |
## Plot Scoreboard Using Python and Plotly
##### ABOUT THE AUTHOR:
This notebook was contributed by [Plotly user Emilia Petrisor](https://plot.ly/~empet). You can follow Emilia on Twitter [@mathinpython](https://twitter.com/mathinpython) or [Github](https://github.com/empet).
### Two Scoreboards for Republican Pres... | github_jupyter |
# Your first neural network
In this project, you'll build your first neural network and use it to predict daily bike rental ridership. We've provided some of the code, but left the implementation of the neural network up to you (for the most part). After you've submitted this project, feel free to explore the data and... | github_jupyter |
I want to make two files that will allow me to build a model that is ready for the data on the MRNet collab. This means that one file will contain a list of image locations:
```
MRNet-v1.0/valid/sagittal/1130.npy
MRNet-v1.0/valid/coronal/1130.npy
MRNet-v1.0/valid/axial/1130.npy
MRNet-v1.0/valid/sagittal/1131.npy
MRNet... | github_jupyter |
# Estimating Free Parking
This notebook illustrates how to re-estimate a single model component for ActivitySim. This process
includes running ActivitySim in estimation mode to read household travel survey files and write out
the estimation data bundles used in this notebook. To review how to do so, please visit th... | github_jupyter |
## RIHAD VARIAWA, Data Scientist - Who has fun LEARNING, EXPLORING & GROWING
## Polynomials
Some of the equations we've looked at so far include expressions that are actually *polynomials*; but what *is* a polynomial, and why should you care?
A polynomial is an algebraic expression containing one or more *terms* that ... | github_jupyter |
# Visualizing The Dataset
```
!wget = 'https://raw.githubusercontent.com/Doodies/Github-Stars-Predictor/master/dataset/data.csv'
!ls
# Ignore warnings
import warnings
warnings.filterwarnings('ignore')
# Handle table-like data and matrices
import numpy as np
import pandas as pd
# Visualisation
import matplotlib as mp... | github_jupyter |
# COVID-19 Open Research Dataset (CORD-19)
- https://pages.semanticscholar.org/coronavirus-research
- https://www.kaggle.com/acmiyaguchi/cord-19-citation-network-with-deduping/output
- https://lg-covid-19-hotp.cs.duke.edu/
### Stats
Papers in CORD-19:
- has valid DOI
External papers cited by CORD-19 papers:
- total... | github_jupyter |
```
import sys, os
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from scipy.stats import bayes_mvs as bayesest
import time
from PyEcoLib.simulator import Simulator
%matplotlib inline
mean_size = 1 # femto liter
doubling_time = 18 #min
tmax = 180 #min
sample_time = 2 #min
div_steps = 10
... | github_jupyter |
```
import _init_paths
from IPython.display import Image
```
# Step 1: Browse the Ocean Marketplace Using the Graphical User Interface
To work with Ocean Protocol you need to set up a digital wallet. First, create a metamask account. There are many guides for doing this available online (e.g. [here](https://docs.ocea... | github_jupyter |
```
from pathlib import Path
from datetime import date , datetime
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
from scipy.optimize import curve_fit
from sqlalchemy import create_engine, text
warnings.filterwarnings("ignore")
#Creando la conexión con las ba... | github_jupyter |
## AUC in CatBoost
[](https://colab.research.google.com/github/catboost/catboost/tree/master/catboost/tutorial/metrics/AUC_tutorial.ipynb)
The tutorial is dedicated to The Area Under the Receiver Operating Characteristic (ROC) Curve (AUC) and i... | github_jupyter |
<a href="https://colab.research.google.com/github/jeffheaton/t81_558_deep_learning/blob/master/t81_558_class_08_1_kaggle_intro.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# T81-558: Applications of Deep Neural Networks
**Module 8: Kaggle Data Se... | github_jupyter |
## Dependencies
```
import json
from tweet_utility_scripts import *
from transformers import TFDistilBertModel, DistilBertConfig
from tokenizers import BertWordPieceTokenizer
from tensorflow.keras.models import Model
from tensorflow.keras import optimizers, metrics, losses
from tensorflow.keras.callbacks import EarlyS... | github_jupyter |
# Creating Keras DNN model
**Learning Objectives**
1. Create input layers for raw features
1. Create feature columns for inputs
1. Create DNN dense hidden layers and output layer
1. Build DNN model tying all of the pieces together
1. Train and evaluate
## Introduction
In this notebook, we'll be using Keras to crea... | github_jupyter |
# Introduction
Here we show how to calculate the merger rate density of systems
merging at a single redshift z. By now we assume you understand the indiviual pipelines of;
ClassCOMPAS:
-- (handling the (mock) data needed)
ClassMSSFR:
-- defining the model for metallicity specific SFR
selection_eff... | github_jupyter |
# Voice Recognition
Using a triplet loss model, output an encoding that represents signatures of voices.
## Imports & Setup
```
from multiprocessing.pool import ThreadPool
import os
import time
import h5py
import numpy as np
import pandas as pd
import tensorflow as tf
from tensorflow import keras
import tensorflow_da... | github_jupyter |
# Classifying Fashion-MNIST
Now it's your turn to build and train a neural network. You'll be using the [Fashion-MNIST dataset](https://github.com/zalandoresearch/fashion-mnist), a drop-in replacement for the MNIST dataset. MNIST is actually quite trivial with neural networks where you can easily achieve better than 9... | github_jupyter |
# Control and Flow
## Turing completeness
Now that we understand how we can use objects to store and model our data, we only need to be able to control the flow of our
program in order to have a program that can, in principle, do anything!
Specifically we need to be able to:
* Control whether a program statement sh... | github_jupyter |
# Data Science - Python and Pandas
## Table of Content
1. [Introduction](#introduction)<br>
1.1. [Series and DataFrames](#series)<br>
1.2. [Data Selection](#selection)<br>
2. [Transform data](#transform)<br>
2.1. [Adding and deleting columns](#columns)<br>
2.2. [Cleaning Data](#cleaning)<br>
2.3. [Merging Data](#mer... | github_jupyter |
**author**: lukethompson@gmail.com<br>
**date**: 8 Oct 2017<br>
**language**: Python 3.5<br>
**license**: BSD3<br>
## sequence_prevalence.ipynb
```
import pandas as pd
import numpy as np
import locale
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
locale.setlocale(locale.LC_ALL, 'en_US')
def... | 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/us_lithology.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 |
## Project:7 Reduce Data Dimensionality for the House Dataset Attribute
### Problem Statement
When the number of features is very large relative to the number of observations in your dataset, certain algorithms struggle to train effective models.
Dimensionality reduction is the process of reducing the number of ran... | github_jupyter |
# ATMOSPHERIC DATA ANALYSIS WITH DASK AND XARRAY
In this tutorial, we will provide an introduction to the Xarray and Dask packages and provide examples of how to use them for the analysis of atmospheric data. We have broken the tutorial into topical sections, each with its own Jupyter Notebook. In this notebook, we'll... | github_jupyter |
### continuing where I left in the `sckitlearnNB.ipynb` notebook.
Will be creating a voting system to increase our accuracy in predicting
```
import nltk
import random
from nltk.corpus import movie_reviews
import pickle
from nltk.classify import ClassifierI
from statistics import mode
## defing the voteclassifier c... | github_jupyter |
# Deep Reinforcement Learning using AlphaZero methodology
Please see https://applied-data.science/blog/how-to-build-your-own-alphazero-ai-using-python-and-keras/ for further notes on the codebase
## 1. First load the core libraries
```
# -*- coding: utf-8 -*-
# %matplotlib inline
import numpy as np
np.set_printopti... | github_jupyter |
In this lesson, I'll be talking about **imports** in Python, giving some tips for working with unfamiliar libraries (and the objects they return), and digging into the guts of Python just a bit to talk about **operator overloading**.
## Imports
So far we've talked about types and functions which are built-in to the l... | github_jupyter |
**This notebook is an exercise in the [Data Cleaning](https://www.kaggle.com/learn/data-cleaning) course. You can reference the tutorial at [this link](https://www.kaggle.com/alexisbcook/parsing-dates).**
---
In this exercise, you'll apply what you learned in the **Parsing dates** tutorial.
# Setup
The questions b... | github_jupyter |
# Data Preprocessing
:label:`sec_pandas`
So far we have introduced a variety of techniques for manipulating data that are already stored in tensors.
To apply deep learning to solving real-world problems,
we often begin with preprocessing raw data, rather than those nicely prepared data in the tensor format.
Among popu... | github_jupyter |
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
# Gremlin examples using the air-routes data set

## Introduction
In this Notebook we examine various Gremlin queries that explore a property graph that contains a model of the wor... | github_jupyter |
##### Copyright 2019 The TensorFlow Authors.
```
#@title Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | github_jupyter |
```
import os
from dotenv import load_dotenv
load_dotenv()
import sys
sys.path.insert(1, '../src/')
import dhs_data as dd
import matplotlib.pyplot as plt
%matplotlib qt
dhs_geo_file = os.environ.get("DHS_DATA_DIR") + "/IAGE71FL_geographic_data/IAGE71FL.shp"
dhs_geo_data = dd.DHSGeographicData(dhs_geo_file)
dhs_geo_da... | github_jupyter |
# Decorators 101
```
def deco(func):
def inner():
print('running inner()')
return inner
@deco
def target():
print('running target()')
target()
```
# When Python Executes Decorators
```
registry= []
def register(func):
print('running register(%s)' % func)
registry.append(func)
return ... | github_jupyter |
```
#hide
#skip
! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab
#hide
#all_slow
```
To use `fastai.medical.imaging` you'll need to:
```bash
conda install pyarrow
pip install pydicom kornia opencv-python scikit-image
```
To run this tutorial on Google Colab, you'll need to uncomment the follow... | github_jupyter |
```
import requests
from bs4 import BeautifulSoup
import re
import os
import time
# URL
url = 'http://www.slmpd.org/CrimeReport.aspx'
# Path to save location
path = 'raw_data/'
def get_filename(headers):
"""Parses out the filename from a response header."""
return headers['content-disposition'].split('=')[1]
`... | github_jupyter |
## Load libraries
```
!pip install -q -r requirements.txt
!git clone https://github.com/davidtvs/pytorch-lr-finder.git && mv pytorch-lr-finder lrfinder
!pip install -q -r lrfinder/requirements.txt
import sys
import os
import numpy as np
import pandas as pd
from PIL import Image
import torch
import torch.nn as nn
imp... | github_jupyter |
# collections module
```
# some utilities
import pprint
from data_utils import get_article_items
pp = pprint.PrettyPrinter(indent=4)
```
# OrderedDict
```
# A type of dictionary that keeps track of the order of the keys as they are added.
# dictionaries in python <=3.5, in python 3.6 and up order is kept by defa... | github_jupyter |
## In the last chapter, you learned how to graphically explore data. In this chapter, you will compute useful summary statistics, which serve to concisely describe salient features of a data set with a few numbers.
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sk... | github_jupyter |
⊕ [Tutorial: Python in 10 Minutes - ArangoDB database](https://www.arangodb.com/tutorials/tutorial-python/)
```
from pyArango.connection import *
conn = Connection(username="root", password="")
```
When this code executes, it initializes the server connection on the conn variable. By default, pyArango attempts to est... | github_jupyter |
# Machine Learning artifacts management
This notebook contains steps and code to demonstrate how to manage and clean up Watson Machine Learning instance. This notebook contains steps and code to work with [ibm-watson-machine-learning](https://pypi.python.org/pypi/ibm-watson-machine-learning) library available in PyPI ... | github_jupyter |
# Multiple linear regression model
### Let's mimic the process of building our trading model of SPY, base on the historical data of different stock markets
```
import pandas as pd
import statsmodels.formula.api as smf
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
import warnings
warnings.filter... | github_jupyter |
```
import tensorflow as tf
class Alexnet:
def __init__(self, input_size, output_dimension, learning_rate):
self.X = tf.placeholder(tf.float32, (None, input_size, input_size, 3))
self.Y = tf.placeholder(tf.float32, (None, output_dimension))
kernel = tf.Variable(tf.truncated_normal([11, 11, ... | github_jupyter |
# Generation of exome coverage projection model from FFPE samples
---
## Background:
DNA extracted from limited amounts of formalin-fixed and paraffin-embedded (FFPE) archived tissue is variable in quality and quantity, resulting in low exome library complexity and leads to reduced coverage depth and experimental fai... | github_jupyter |
# Brython-Radiant
A Brython Framework for Web Apps development.




sys.path.append('../input/umaplearn/umap')
import os
os.m... | 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 |
# Adversarial Robustness - CIFAR-10 - Robustified Classifier via the Convex Outer Adversarial Polytope
---
In this notebook, two state-of-the-art CNNs of 4 convolutional layers prior to the fully-connected part (trained on the CIFAR-10 normally and robustly using the the "Convex Outer Adversarial Polytope" described i... | github_jupyter |
# Installation
- Run these commands
- git clone https://github.com/Tessellate-Imaging/Monk_Object_Detection.git
- cd Monk_Object_Detection/3_mxrcnn/installation
- Select the right requirements file and run
- cat requirements_cuda9.0.txt | xargs -n 1 -L 1 pip install
# About the Ne... | github_jupyter |
# Imports and Simulation Parameters
```
import numpy as np
import math
import cmath
import scipy
import scipy.integrate
import sys
import matplotlib
import matplotlib.pyplot as plt
%matplotlib inline
hbar = 1.0 / (2.0 * np.pi)
ZERO_TOLERANCE = 10**-6
MAX_VIBRATIONAL_STATES = 200
STARTING_GROUND_STATES = 5
START... | github_jupyter |
# Chunking strategies for a Wide-ResNet
This tutorial shows how to utilize a hypernet container [HContainer](../hnets/hnet_container.py) and class [StructuredHMLP](../hnets/structured_mlp_hnet.py) (a certain kind of hypernetwork that allows *smart* chunking) in combination with a Wide-ResNet [WRN](../mnets/wide_resnet... | github_jupyter |
```
%matplotlib inline
from NewsFlow import *
from VisualTools import *
%load_ext autoreload
%autoreload 2
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"
from matplotlib.patches import Patch
from matplotlib.lines import Line2D
from matplotlib.colors import... | github_jupyter |
[exercises](recording.ipynb)
```
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
def ab_delays(beta, d, c=343):
"""Calculate delays for AB stereophony.
beta: angle of incidence in degree, can be a scalar or a sequence
d: distance between microphones in metres
c: speed of soun... | github_jupyter |
```
# 코드로 형식 지정됨
```
#StyleGAN3 Reactive Audio
By Derrick Schultz for the StyleGAN2 Deep Dive class.
This notebook shows one basic example of how to alter your StyleGAN2 vectors with audio. There are lots of different techniques to explore in this, but this is one simple way.
Big thanks to Robert Luxemburg who pr... | github_jupyter |
# Jeu de dés
Dans ce notebook, nous reprenons l'exemple vu en cours d'un jeu de $ndes$ dés dont on contraint la somme totale sur les faces. En cours nous avions pris 3 dés et contraint la somme à être égale à 8 ce qui amenait à 21 cas possibles, parmi lesquels 6 ont la face "1" pour le dé 1, 5 ont la face "2" pour le ... | github_jupyter |
# Enrichment Analysis on LCI Predictions
Analyzes the enrichment of proteins predicted by LCI
```
%load_ext autoreload
%autoreload 2
import sys, os
import json
import pickle
import numpy as np
import matplotlib.pyplot as plt
import torch
import seaborn as sns
import numpy as np
from scipy.stats import pearsonr
imp... | github_jupyter |
# Imports
```
import re
import nltk
import os
import logging
import torch
import torch.nn as nn
import torch.nn.functional as F
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
from sklearn.model_selection import train_test_split
from torchtext.data import Field, BucketIterator... | github_jupyter |
## Approximate Inference over a BN using Belief Propagation
Consider the following joint probability distribution:
\begin{align}
p(x_1,x2,x3)=p(x_1)p(x_2|x_1)p(x_3|x_1,x_2)p(x_4|x_2)
\end{align}
where $x_1\in\{0,1\}$, $x_2\in\{0,1\}$, $x_3\in\{0,1,2\}$ and $x_4\in\{0,1,2,3\}$
The values of the CPD factors are know. ... | github_jupyter |
# Extract time series from a published figure
Scott Cole
29 July 2016
## Summary
Sometimes we might be interested in obtaining a precise estimate of the results published in a figure. Instead of zooming in a ton on the figure and manually taking notes, here we use some simple image processing to extract the data th... | github_jupyter |

**[MiCMOR](https://micmor.kit.edu) [SummerSchool "Environmental Data Science: From Data Exploration to Deep Learning"](https://micmor.kit.edu/sites/default/files/MICMoR%20Summer%20School%202019%20Flyer.pdf)**
IMK-IFU KIT Campus Alpin, Sept. 4 - 13 2019, Garmisch-Pa... | github_jupyter |
[View in Colaboratory](https://colab.research.google.com/github/whongyi/openrec/blob/master/tutorials/Youtube_Recommender_example.ipynb)
<p align="center">
<img src ="https://recsys.acm.org/wp-content/uploads/2017/07/recsys-18-small.png" height="40" /> <font size="4">Recsys 2018 Tutorial</font>
</p>
<p align="center... | github_jupyter |
# Welcome to the Interactive User Guide for KALMUS (GUI)!
In this notebook, I will introduce:
1. **Installation of KALMUS package**
2. **What is KALMUS for**
- Extract color information from film frames or brightness information from monochrome film frames using different color metrics and image sampling methods... | github_jupyter |
```
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import tensorflow as tf
from tensorflow.keras import utils, regularizers, callbacks, backend
from tensorflow.keras.layers import Input, Dense, Activation, ZeroPadding1D, BatchNormalization, Flatten, Reshape, Conv1D, MaxPooling1D, Dropout, ... | github_jupyter |
Filter pipelines
================
This example shows how to use the `pymia.filtering` package to set up image filter pipeline and apply it to an image.
The pipeline consists of a gradient anisotropic diffusion filter followed by a histogram matching. This pipeline will be applied to a T1-weighted MR image and a T2-wei... | github_jupyter |
```
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
from tqdm import tqdm_notebook as tqdm
file_path = 'Mendelian.train.tsv'
df=pd.read_csv(file_path, sep='\t')
metrics = df.columns.tolist()
POSITIVES_NUMBER = 356
from scipy.stats import norm, beta, gamma, expon, exponweib
distributions = {
... | github_jupyter |
# Amazon SageMaker Multi-Model Endpoints using Scikit Learn
*이 노트북은 [Amazon SageMaker Multi-Model Endpoints using Scikit Learn (영문 원본)](https://github.com/awslabs/amazon-sagemaker-examples/blob/master/advanced_functionality/multi_model_sklearn_home_value/sklearn_multi_model_endpoint_home_value.ipynb) 의 한국어 번역입니다.*
고객... | github_jupyter |
# Análise Financeira com Python
### Objetivo:
Vamos dividir essa mentoria em 2 etapas:
Etapa 1 - Usar o Python para puxar dados da Web de cotação de qualquer ação e analisar o resultado de uma carteira
Etapa 2 - Puxar indicadores de empresas diferentes e fazer a comparação entre elas para escolhar "qual a melhor em... | github_jupyter |
# Generate drift trajectories according to Intoy & Rucci, 2020.
Brownian motion simulation code downloaded from: https://people.sc.fsu.edu/~jburkardt/py_src/brownian_motion_simulation/brownian_motion_simulation.html
Assuming stationary brownian motion with different diffusion constatnt for the different conditions (... | github_jupyter |
# Training HOG-based AU detectors
*written by Tiankang Xie*
In the tutorial we will demonstrate how to train the HOG-based AU models as described in our paper.
The tutorial is split into 3 parts, where the first part demonstrates how to extract hog features from the dataset,
and the second part demonstrates how to ... | github_jupyter |
# Import libraries
We will make extensive use of `pandas` and `LightGBM` throughout this demo. `pickle` will be used to save and load model files
```
import lightgbm as lgb
import pandas as pd
import numpy as np
import csv
import pickle
from sklearn.metrics import mean_squared_error
import matplotlib
%matplotlib inli... | github_jupyter |
```
import numpy as np
import scipy as sp
import pandas as pd
from scipy.stats import norm
from scipy.stats import bernoulli
from scipy.stats import dirichlet
import seaborn as sns
import matplotlib.pyplot as plt
from statsmodels.nonparametric.kernel_density import KDEMultivariate
from tqdm.notebook import tqdm
%reloa... | github_jupyter |
# Project 3: Smart Beta Portfolio and Portfolio Optimization
## Overview
Smart beta has a broad meaning, but we can say in practice that when we use the universe of stocks from an index, and then apply some weighting scheme other than market cap weighting, it can be considered a type of smart beta fund. A Smart Bet... | github_jupyter |
# Boltzmann Wealth Model
```
from mesa import Agent, Model
from mesa.time import RandomActivation #activation order of agents matters but
#there are 3 implementations - Random, Simultaneous
%matplotlib inline
import matplotlib.pyplot as plt
import random
#import seaborn as sns
from mesa.space import MultiGrid
from m... | github_jupyter |
# Behringer X-Touch Mini
This notebook can be downloaded [here](https://github.com/jupyter-widgets/midicontrols/blob/master/examples/Example.ipynb).
Because Chrome is the only browser that implements the [Web MIDI API](https://developer.mozilla.org/en-US/docs/Web/API/MIDIAccess), this package only works in Chrome. Fi... | github_jupyter |
# PyTorch Image Captioning model for time series
This notebook demonstrates how to use an image-captioning model for time-series prediction. The data set is based on the NASDAQ 100 data provided in "[A Dual-Stage Attention-Based Recurrent Neural Network for Time Series Prediction](https://arxiv.org/pdf/1704.02971.pd... | github_jupyter |
```
# -*- coding: utf-8 -*-
"""
This program makes learning ev-gmm.
"""
# __future__ module make compatible python2 and python3
from __future__ import division, print_function
# basic modules
import os
import os.path
import time
# for warning ignore
import warnings
#warning.filterwarnings('ignore')
# for file syste... | github_jupyter |
# My First Neural Network, Part 2. Bias and CE Loss
> Bias and cross-entropy loss
- toc: true
- branch: master
- badges: true
- comments: true
- metadata_key1: metadata_value1
- metadata_key2: metadata_value2
- image: https://i.imgur.com/5CbsjVW.png
- description: Bias and cross-entropy loss
- redirect_to: https://drs... | github_jupyter |
# Instaquery
In this notebook, we'll define an `instaquery()` function that lets you:
1. define a renderer (plot, table, print, etc.)
2. filter the data using `pandas.query` syntax
3. specify a column to group-by
This tiny function can be handy for quick, throwaway exploration that you do not want captured permanent... | github_jupyter |
```
# Copyright 2020 Google LLC
#
# 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 writi... | github_jupyter |
For this problem set, we'll be using the Jupyter notebook:

---
## Part A (2 points)
Write a function that returns a list of numbers, such that $x_i=i^2$, for $1\leq i \leq n$. Make sure it handles the case where $n<1$ by raising a `ValueError`.
```
def squares(n):
"""Compute the squares of numb... | github_jupyter |
## Data access for all data sets
The Visualize and Analyze Data notebook utilized an Amazon s3 location for staged data that were only available during the live tutorial session. This notebook can be run as an alternative to the staged data location. After inputting your Earthdata login username and associated email ... | github_jupyter |
# MAT281 - Laboratorio N°11
<a id='p1'></a>
## I.- Problema 01
Lista de actos delictivos registrados por el Service de police de la Ville de Montréal (SPVM).
<img src="http://henriquecapriles.com/wp-content/uploads/2017/02/femina_detenida-1080x675.jpg" width="480" height="360" align="center"/>
El conjunto de datos... | github_jupyter |
# Vacinação Geral no Brasil

# Sumário
- [1 Introdução](#intro)
- [2 Dados](#dados)
- [3 Importação das Bibliotecas & Configurações](#import)
- [4 Limpeza dos Dados](#clean)
- [5 Pan... | github_jupyter |
```
import pandas as pd
import numpy as np
import gzip
from collections import defaultdict
from keras.utils.np_utils import to_categorical
import matplotlib.pyplot as plt
from keras.layers import Dense, LSTM, Embedding
from keras.models import Sequential
from keras.preprocessing.text import Tokenizer,text_to_word_seque... | github_jupyter |
# MUR SST Benchmark tests using consolidated metadata versus individual netcdf
NASA JPL PODAAC has put the entire [MUR SST](https://podaac.jpl.nasa.gov/dataset/MUR-JPL-L4-GLOB-v4.1) dataset on AWS cloud as individual netCDF files, **but all ~7000 of them are netCDF files.**\ Accessing one file works well, but accessi... | github_jupyter |
```
import os
os.environ['CUDA_VISIBLE_DEVICES'] = "-1"
import tensorflow as tf
tf.compat.v1.disable_eager_execution()
import gin
import numpy as np
import torch
import torch.nn as nn
from matplotlib import pyplot as plt
from tqdm import tqdm
import seaborn as sns
from vectorincrement.vectorincrementenv import SparseMa... | github_jupyter |
# Diseño de software para cómputo científico
----
## Unidad 3: Persistencia de datos.
### Agenda de la Unidad 3
---
#### Clase 1
- Lectura y escritura de archivos.
- Persistencia de binarios en Python (pickle).
- Archivos INI/CFG, CSV, JSON, XML y YAML
#### Clase 2
- Bases de datos relacionales y SQL.
### Clase ... | github_jupyter |
# geotiff2csv
Extraire une portion de GeoTiff en utilisant la librairie Gdal.
## Introduction
Le **GeoTiff** est un format d'image fréquemment utilisé pour stocker des **données géo-référencées**.
Le format GeoTiff est, par exemple, utilisé pour la mise à disposition de [Corine Land Cover](https://land.copernicus... | github_jupyter |
# Code Katas
Keep your skills sharp by implementing fundamental (and sometimes tricky) algorithms and data structures over and over again.
## White Belt
*Easy peasy lemon squeezy*
### Palindrome String
Check if input string is a palindrome. Try to only use constant extra space.
```
def palindrome(string):
"""Che... | github_jupyter |
# T81-558: Applications of Deep Neural Networks
**Module 7: Convolutional 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... | github_jupyter |
```
import numpy as np
from keras.models import Model
from keras.layers import Input
from keras.layers.recurrent import SimpleRNN
from keras import backend as K
import json
from collections import OrderedDict
def format_decimal(arr, places=6):
return [round(x * 10**places) / 10**places for x in arr]
DATA = OrderedD... | github_jupyter |
<h1>Model Evaluation and Selection</h1>
**Agenda**
- **Regression Evaluation**
- What is the usage of **classification accuracy**?
- How does a **confusion matrix** describe the performance of a classifier?
- **Precision, Recall, F1-score** and **Fb-Score**
- **ROC, AUC curve**
- Evaluation measures for **multi-class... | github_jupyter |
# Train VAE
```
%load_ext autoreload
%autoreload 2
import os
import sys
import ast
import pandas as pd
import numpy as np
import random
import warnings
warnings.filterwarnings(action='ignore')
sys.path.append("../")
from functions import vae
from numpy.random import seed
randomState = 123
seed(randomState)
# Create... | github_jupyter |
# To evaluta the network of classifer, we trained the model on GTSRB dataset
Thanks for the great selfless tutorial: https://chsasank.github.io/keras-tutorial.html
```
import numpy as np
from skimage import io, color, exposure, transform
from sklearn.cross_validation import train_test_split
import os
import glob
imp... | github_jupyter |
```
import requests
from bs4 import BeautifulSoup
import random
import re
import json
import copy
from collections import defaultdict
import time
from tqdm import tqdm
import numpy as np
import nltk
from nltk.tokenize import word_tokenize
from nltk.corpus import stopwords
import torch
import torch.nn as nn
import torch... | github_jupyter |
### Import Numpy & Math libraries
```
import numpy as np
import math
```
### Assuming a 200 Layer Neural Network
#### Let's see what happens to the Mean and Std-Dev at the end of 200 layer computations when we randomly initialize from a standard distribution (Using np.random.randn)
```
x = np.random.randn(256)
for ... | github_jupyter |
# 準ニュートン法
引き続き、非線形最適化の手法について学習していきましょう。
今回は、ニュートン法においてその計算が必要であったヘッセ行列(の逆行列) の近似を、計算の過程で並行して求めることで、ニュートン法のような高速な収束性を、より少ない計算量で行うことのできる、**準ニュートン法**について扱います。
準ニュートン法に於けるヘッセ行列(の逆行列) の近似公式はいくつも知られていますが、ここではAnaconda に標準で添付されているSciPy において提供される、BFGS(Broyden-Fletcher-Goldfarb-Shanno) 公式による準ニュートン法について、その生成点列の挙動を確認しましょう。
```
im... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.