text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
# Deep $Q$-learning
In this notebook, we'll build a neural network that can learn to play games through reinforcement learning. More specifically, we'll use $Q$-learning to train an agent to play a game called [Cart-Pole](https://gym.openai.com/envs/CartPole-v0). In this game, a freely swinging pole is attached to a c... | github_jupyter |
# Model Optimization with an Image Classification Example
1. [Introduction](#Introduction)
2. [Prerequisites and Preprocessing](#Prequisites-and-Preprocessing)
3. [Train the model](#Train-the-model)
4. [Optimize trained model using SageMaker Neo and Deploy](#Optimize-trained-model-using-SageMaker-Neo-and-Deploy)
5. [Re... | github_jupyter |
<a href="https://colab.research.google.com/github/jeffheaton/t81_558_deep_learning/blob/master/manual_setup.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
**Manual Python Setup**
* Instructor: [Jeff H... | github_jupyter |
```
pickle_file = '../dataset/color_pickle.pickle'
from six.moves import cPickle as pickle
import matplotlib.pyplot as plt
with open(pickle_file, 'rb') as f:
save = pickle.load(f)
labels = save['labels']
images = save['images']
del save
X = images
y = labels
y = np_utils.to_categorical(y... | github_jupyter |
#### 여기서는 Tutorial에서 배운 개념을 이용하여 간단하게 ReplayBuffer를 분산 환경에서 활용해보겠습니다. <br> 아래와 같은 작업을 수행합니다. <br>
1. 여럿의 agent(혹은 actor)가 공유 Replay Buffer에 경험데이터를 넣는다.
2. Learner는 batch만큼 그 공유 ReplayBuffer에서 load한 후 원하는 작업을 수행한다.
#### 질문 <br>
1. Class의 method는 공유가 잘 되는데, class 안에 있는 __init__ 에서 선언된 variable은 불러올 수가 없었... | github_jupyter |
# BLU01 - Exercises Notebook
**Important Note**
Attention Windows users: The grader will run on Linux, and using power shell statements will not work.
```
import chardet
import hashlib # for grading purposes
import math
import numpy as np
import csv
import pandas as pd
import random
```
## Q1: Use a shell command t... | 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 |
# Resampling methods
> In this chapter, we will get a brief introduction to resampling methods and their applications. We will get a taste of bootstrap resampling, jackknife resampling, and permutation testing. After completing this chapter, students will be able to start applying simple resampling methods for data ana... | github_jupyter |
# Running custom model training on Vertex AI Pipelines
In this lab, you will learn how to run a custom model training job using the Kubeflow Pipelines SDK on Vertex AI Pipelines.
## Learning objectives
* Use the Kubeflow Pipelines SDK to build scalable ML pipelines.
* Create and containerize a custom Scikit-learn mo... | github_jupyter |
# IMDB Movie Reviews Sentiment Classification
\* This project was inspired by a book 'Deep Learning with Python' by François Chollet.
- Internet Movie Database로부터 가져온 양극단의 리뷰 5만개로 이루어진 IMDB dataset을 사용. 이 dataset은 training data 25,000개와 test data 25,000개로 나뉘어 있고, 각각 50%는 부정, 50%는 긍정리뷰로 구성되어 있음
- 리뷰 텍스트를 기반으로 영화 리뷰를 긍... | github_jupyter |
## Diffusion MRI Data
In this notebook, we will download some diffusion data from the [Stanford Digital Repository](https://sdr.stanford.edu/collections/druid:qd500xn1572).
This is a test-retest data-set with high angular resolution diffusion imaging (HARDI), collected at 2 mm isotropic resolution, also used in Rok... | github_jupyter |
# Facial Keypoint Detection
This project will be all about defining and training a convolutional neural network to perform facial keypoint detection, and using computer vision techniques to transform images of faces. The first step in any challenge like this will be to load and visualize the data you'll be working ... | github_jupyter |
# Working with code cells
In this notebook you'll get some experience working with code cells.
First, run the cell below. As I mentioned before, you can run the cell by selecting it the click the "run cell" button above. However, it's easier to run it by pressing **Shift + Enter** so you don't have to take your hands... | github_jupyter |
```
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline
import numpy as np
filter_difficulty = [col for col in class_df.columns if col.startswith("How difficult")]
print(filter_difficulty)
filter_usefulness = [col for col in class_df.columns if col.startswith("How useful did")]... | github_jupyter |
```
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from matplotlib.ticker import ScalarFormatter
from gchp_log_parser import timing_from_log, timing_from_multi_logs
```
# Read logs
```
ls logs/
df_nas = timing_from_multi_logs([6, 12, 24, 48], 24, './logs/Pleiades/N{0}n{1}_... | github_jupyter |
<h2>Reflections</h2>
[Watch Lecture](https://youtu.be/nzj7kw1Ycms)
_We use certain tools from python library "<b>matplotlib.pyplot</b>" for drawing. Check the notebook [Python: Drawing](../python/Python06_Drawing.ipynb) for the list of these tools._
We start with a very basic reflection.
<h3> Z-gate (operator) </h3... | github_jupyter |
# How to create STAC Catalogs
## STAC Community Sprint, Arlington, November 7th 2019
This notebook runs through some of the basics of using PySTAC to create a static STAC. It was part of a 30 minute presentation at the [community STAC sprint](https://github.com/radiantearth/community-sprints/tree/master/11052019-arli... | github_jupyter |
# Tabulate results
```
import os
import sys
from typing import Tuple
import pandas as pd
from tabulate import tabulate
from tqdm import tqdm
sys.path.append('../src')
from read_log_file import read_log_file
LOG_HOME_DIR = os.path.join('../logs')
assert os.path.isdir(LOG_HOME_DIR)
MODEL_NAMES = ['bert-base-uncased', '... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
import sys
sys.path.append('..')
import tensorflow as tf
import numpy as np
from build_model import interaction_model
from path_explain import utils
utils.set_up_environment(visible_devices='1')
model = interaction_model(num_features=5,
num_layers=2,
... | github_jupyter |
<a href="https://colab.research.google.com/github/VishnuGupta5883/appliedai/blob/master/pandas_basics_practice.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
**Consider the following Python dictionary data and Python list labels:**
data = {'birds'... | 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 |
# SLU11 | String & File Handling: Exercise Notebook
***
Now we're going to test how well you understood the learning notebook.
Also, this notebook is often going to require some **googling skills**.
It's very important to learn **`how to google anything you don't remember or don't know how to do.`**
## Start by i... | github_jupyter |
```
import sys, getopt
import csv
import json
import googlemaps
# load the file
data_file = open('trade.csv')
raw_data = csv.reader(data_file)
data = list(raw_data)
# load google geocoder
gmaps = googlemaps.Client(key='AIzaSyCNzsn4lSKkC8kcSiJ7MHCrmkqGO0q8uRc')
# get a unique set of countries
origin_countries = set()
de... | github_jupyter |
```
# Copyright 2019 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 |
```
import pandas as pd
import os
import numpy as np
from preprocessing.lab_preprocessing.lab_preprocessing import preprocess_labs
from data_visualisation.plot_labs import plot_patient_lab
import matplotlib.pyplot as plt
data_path = '/Users/jk1/stroke_datasets/stroke_unit_dataset/per_value/Extraction_20211110'
lab_file... | github_jupyter |
# Safari Challenge
In this challenge, you must use what you've learned to train a convolutional neural network model that classifies images of animals you might find on a safari adventure.
## Explore the data
The training images you must use are in the **/safari/training** folder. Run the cell below to see an exampl... | github_jupyter |
```
import numpy as np
timesteps = 100
input_features = 32
output——feature = 64
import keras
keras.__version__
```
# Understanding recurrent neural networks
This notebook contains the code samples found in Chapter 6, Section 2 of [Deep Learning with Python](https://www.manning.com/books/deep-learning-with-python?a_ai... | github_jupyter |
<h1>Data exploration, preprocessing and feature engineering</h1>
In this and the following notebooks we will demonstrate how you can build your ML Pipeline leveraging Spark Feature Transformers and SageMaker XGBoost algorithm & after the model is trained, deploy the Pipeline (Feature Transformer and XGBoost) as a Sage... | github_jupyter |
<a href="https://colab.research.google.com/github/kalz2q/mycolabnotebooks/blob/master/chainer16trainer.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# トレーナとエクステンション
[前章](https://tutorials.chainer.org/ja/15_Advanced_Usage_of_Chainer.html)までは、訓練ループ... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
# default_exp indexers.facerecognition.photo
```
# Photo
This file contains many convenience functions and classes to work with photos in the context of importing data from external sources and machine learning. It contains functions for reading, plotting, resizing, etc.
```
# ... | github_jupyter |
```
import numpy as np
import tensorflow as tf
import matplotlib
import matplotlib.pyplot as plt
from IPython import display
%matplotlib inline
# Sample from a ring
def sample_data_ring(r = 1, n = 1024, sigma = 0.1):
theta = np.random.uniform(low=0.0, high=2*np.pi, size=(n,))
radius = np.random.randn(n) * sigm... | github_jupyter |
<div align="center">
<img src='./img/header.png'/>
</div>
## [Global Ice Velocities](https://its-live.jpl.nasa.gov/)
The Inter-mission Time Series of Land Ice Velocity and Elevation (ITS_LIVE) project facilitates ice sheet, ice shelf and glacier research by providing a globally comprehensive and temporally dense... | github_jupyter |
```
#Prepare libraries
import tensorflow as tf
import numpy as np
import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
import time
import datetime
import data_helpers
from text_cnn import TextCNN
from tensorflow.contrib import learn
# Parameters
# Data loading params
tf.flags.DEFINE_float("dev_sample_percentage", .2, "Per... | github_jupyter |
# Accessing DC2 data in PostgreSQL at NERSC part 2
Owner: **Joanne Bogart [@jrbogart](https://github.com/LSSTDESC/DC2-analysis/issues/new?body=@jrbogart)**
Last Verified to Run: **2020-08-03**
This notebook introduces some additional features of the PostgreSQL database at NERSC.
__Learning objectives__:
After ... | github_jupyter |
# Trigonometric time series model
```
%pylab inline
import pymc3 as pm
import theano.tensor as tt
t = np.linspace(0., 10., 1000)
# 3.5Hz sine wave
func = lambda a, b, omega: a*np.sin(2*np.pi*omega*t)+b*np.cos(2*np.pi*omega*t)
y = func(1., 0., 3.5)
data = y + np.random.normal(size = t.shape[0])
_, ax = plt.subplots(1,... | github_jupyter |
<p style="z-index: 101;background: #fde073;text-align: center;line-height: 2.5;overflow: hidden;font-size:22px;">Please <a href="https://www.pycm.ir/doc/#Cite" target="_blank">cite us</a> if you use the software</p>
# Example-8 (Confidence interval)
## Install matplotlib
```
import sys
!{sys.executable} -m pip -q -... | github_jupyter |
# Driving a skyrmion with spin-polarised current
**Author:** Weiwei Wang (2014)
**Edited:** Marijan Beg (2016)
The implemented equation in finmag with STT is [1,2],
\begin{equation}
\frac{\partial \mathbf{m}}{\partial t} = - \gamma \mathbf{m} \times \mathbf{H} + \alpha \mathbf{m} \times \frac{\partial \mathbf{m}}{... | github_jupyter |
# Python session - 3.1
## Functions and modules
## Functions
Functions are reusable blocks of code that you can name and execute any number of times from different parts of your script(s). This reuse is known as "calling" the function. Functions are important building blocks of a software.
There are several built-i... | github_jupyter |
# Create data generators
This notebook aims at showing the data generator creation process.
As denoted in [other notebooks](./1a_mapillary-dataset-presentation.ipynb), one can easily generate datasets. This is a way to preprocess data offline, apart from any machine learning algorithm, in order to guarantee data pers... | github_jupyter |
```
# import the required packages
from keras.models import Sequential
from keras.layers import Dense
from keras.wrappers.scikit_learn import KerasRegressor
from sklearn.model_selection import KFold, cross_val_score
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import make_pipeline
import numpy... | github_jupyter |
# Bulgarian Personal Numbers
## Introduction
The function `clean_bg_pnf()` cleans a column containing Bulgarian personal number of a foreigner, and standardizes them in a given format. The function `validate_bg_pnf()` validates either a single PNF strings, a column of PNF strings or a DataFrame of PNF strings, return... | github_jupyter |
### Get the list of all games with its id number and ouput a file at `/data/game_id.csv`
As of 11/8/2019. There are 345727 games. More information about the API can be found here https://rawg.io/apidocs and its endpoints can be found here https://api.rawg.io/docs/
```
import json
import requests
from pprint import ppr... | github_jupyter |
## Arrays and images
resource used: http://learningtensorflow.com/lesson3/
#### 1: Read an image
```
import os
import matplotlib.image as mpimg
dir_path = os.getcwd()
filename = dir_path + "\\MarshOrchid.jpg"
image = mpimg.imread(filename)
```
#### 2. Shape of an image
```
print(image.shape)
```
#### 3. View the... | github_jupyter |
This notebook contains code that demonstrates linear regression. Uncomment lines to learn more.
```
# Import tensorflow and other libraries.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import numpy as np
import math
%matplotlib... | 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 |
```
%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.decomposition import PCA
from sklearn import metrics
# from mlxtend.plotting import plot_decision_regions
from... | github_jupyter |
<a href="https://colab.research.google.com/github/chavgova/My-AI/blob/master/emotion_recognition_02.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
IMPORT
```
#this is the copy of another projecct and ill make changes to see how i can make it bette... | github_jupyter |
# read jsons from file
```
import json
indir = '/Volumes/backup_128G/z_repository/PTC_data/DADH_2019/0_方志/data'
inName = 'processed_json_20190929.json'
inJson = '{0}/{1}'.format(indir, inName)
with open(inJson, 'r') as f:
INdict = json.load(f)
# INdict
```
## filtering special characters
```
specialWords = ['卷... | github_jupyter |
```
from google.colab import drive
drive.mount('/content/drive')
```
# Twitter Developer Account
In order to use Twitter’s API, we have to create a developer account on the Twitter apps site.
* Log in or make a Twitter account at https://apps.twitter.com/.
* Create a new app (button on the top right)
<img src=http... | github_jupyter |
```
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = 'all' # default is ‘last_expr’
%load_ext autoreload
%autoreload 2
import sys
sys.path.append('/data/home/marmot/camtrap/PyCharm/CameraTraps-benchmark')
import json
import os
from collections import OrderedDict, de... | github_jupyter |
## Project Details
The tasks in this project are as follows:
* Data wrangling, which consists of:
* Gathering data (downloadable file in the Resources tab in the left most panel of your classroom and linked in step 1 below).
* Assessing data
* Cleaning data
* Storing, analyzing, and visualizing your wr... | github_jupyter |
# PyTorch (Lightning) integration
This package includes an integration with PyTorch that allows you to convert an `ImageSequence` into a PyTorch `Dataset` in a single line of code. This can then be used to train models using PyTorch and derived frameworks, such als [PyTorch Lightning](https://github.com/PyTorchLightni... | github_jupyter |
```
import sys
import collections
import mxnet as mx
from mxnet import autograd, gluon, init, metric, nd
from mxnet.gluon import loss as gloss, nn, rnn
from mxnet.contrib import text
import os
import random
import zipfile
from sklearn.model_selection import train_test_split
import spacy
import time
from time import str... | github_jupyter |
```
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem.rdMolAlign import AlignMol
from rdkit.Chem.rdmolops import RemoveHs
```
The molecule that will define the fixed piece
```
ref_buff = """ref_ligand
3D
Schrodinger Suite 2019-4.
23 23 0 0 1 0 999 V2000
13.8... | github_jupyter |
# Ciclos
Patrón que permite la ejecución de un conjunto de instrucciones cierta cantidad de veces.
Dentro de un ciclo podemos implementar o especificar una cantidad arbitrar de instrucciones (órdenes).
En el lenguaje de programación Python existen dos tipos de ciclos:
1. `for`
2. `while`
## Ciclo `for`
Permite ej... | github_jupyter |
<center>
<img src="https://gitlab.com/ibm/skills-network/courses/placeholder101/-/raw/master/labs/module%201/images/IDSNlogo.png" width="300" alt="cognitiveclass.ai logo" />
</center>
# **Hands-on Lab : Web Scraping**
Estimated time needed: **30 to 45** minutes
## Objectives
In this lab you will perform the fo... | github_jupyter |
```
import json
import pathlib
import random
import numpy as np
import matplotlib.pyplot as plt
from IPython import display
import tensorflow as tf
# Makes it so any changes in pymedphys is automatically
# propagated into the notebook without needing a kernel reset.
from IPython.lib.deepreload import reload
%load_ext... | github_jupyter |
# Deep Q-Learning
Deep Q-Learning uses a neural network to approximate $Q$ functions. Hence, we usually refer to this algorithm as DQN (for *deep Q network*).
The parameters of the neural network are denoted by $\theta$.
* As input, the network takes a state $s$,
* As output, the network returns $Q(s, a, \theta... | github_jupyter |
MeshNet architecture based on https://arxiv.org/pdf/1612.00940.pdf
"End-to-end learning of brain tissue segmentation
from imperfect labeling"
Jun 2017
Alex Fedorov∗†, Jeremy Johnson‡
, Eswar Damaraju∗†, Alexei Ozerin§
, Vince Calhoun∗†, Sergey Plis∗†
# Libraries and Global Parameters
```
import os
import cv2
import ... | github_jupyter |
# TRAVELING SALESMAN PROBLEM
The traveling salesman problem (also called the traveling salesperson problem or TSP) asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?"
... | github_jupyter |
<a href="https://colab.research.google.com/github/EvenSol/NeqSim-Colab/blob/master/notebooks/process/GasCompressors.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
#@title Gas compressors
#@markdown A compressor is a mechanical device that incre... | github_jupyter |
# Nozzles (part I)
```
# Necessary modules to solve problems
import numpy as np
from scipy.optimize import root_scalar
# Pint gives us some helpful unit conversion
from pint import UnitRegistry
ureg = UnitRegistry()
Q_ = ureg.Quantity # We will use this to construct quantities (value + unit)
%matplotlib inline
from ... | github_jupyter |
This dataset is created using the template for creating a dataset from scratch as in: https://cookiecutter-easydata.readthedocs.io/en/latest/New-Dataset-Template/.
```
# Basic utility functions
import logging
import os
import pathlib
from pprint import pprint
from src.log import logger
from src import paths
from src.... | github_jupyter |
```
import numpy as np
import pandas as pd
from elsapy.elsclient import ElsClient
from elsapy.elsprofile import ElsAuthor, ElsAffil
from elsapy.elsdoc import FullDoc, AbsDoc
from elsapy.elssearch import ElsSearch
import os
from nltk.parse import stanford
import json
import shutil
import multiprocessing
def load_journal... | github_jupyter |
```
import schemdraw
from schemdraw import elements as elm
%load_ext autoreload
%autoreload 2
d = schemdraw.Drawing()
D1 = d.add(elm.Ic(pins=[elm.IcPin(name='A', side='t', slot='1/4'),
elm.IcPin(name='B', side='t', slot='2/4'),
elm.IcPin(name='C', side='t', slot='3/4'),
... | github_jupyter |
```
# MLP for the IMDB problem
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import tensorflow
from keras.datasets import imdb
from keras.models import Sequential, Model
from keras.layers import Dense, Dropout, Flatten, Conv2D, MaxPooling2D
from keras.layers import LSTM, Input, TimeDistributed
... | github_jupyter |
<a href="https://colab.research.google.com/github/mlvlab/COSE474/blob/master/2_MNIST_Tutorial%20(CNN).ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
## MNIST_Tutorial (CNN) in PyTorch
### Reference
* [PyTorch Tutorial MNIST](https://github.com/Gun... | github_jupyter |
<a href="https://colab.research.google.com/github/shalabh147/Brain-Tumor-Segmentation-and-Survival-Prediction-using-Deep-Neural-Networks/blob/master/2d_axis1_results_2class.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
import random
import pan... | github_jupyter |
# Iceberg Drift Models
Most iceberg drift models are written in the form:
\begin{equation}
M \frac{d\mathbf{v}_i}{dt} = -Mf\hat{\mathbf{k}} \times \mathbf{v}_i + F_p + F_w + F_r + F_i
\end{equation}
where $M$ is the mass of the iceberg, $\mathbf{v}_i$ is the iceberg velocity, $f$ is the Coriolis parameter, $F_p$ is t... | github_jupyter |
# Jetson TX1 x AWS NEO Image Classification Example
1. [Introduction](#Introduction)
2. [Compile model using NEO](#Compile-model-using-NEO)
3. [Inference on device](#Inference-on-device)
## Introduction
This notebook will demo how to compile pretrained resnet50_v1 model from gluon imagenet classifier model zoo using... | github_jupyter |
<center>
<h1>Cultural Analytics</h1><br>
<h2>ENGL64.05 Fall 2019</h2>
</center>
----
# Introduction to the Jupyter Notebook and all about Strings
<center><pre>Rev: 08/20/2019</pre></center>
```
# This is Jupyter code cell. This line is a comment; comments are not executed by the interpreter.
# Here we are ... | github_jupyter |
# <center>Тема 1. Первичный анализ данных с Pandas</center>
## <center>Часть 1. Обзор библиотеки Pandas</center>
**Pandas** - это библиотека Python, предоставляющая широкие возможности для анализа данных. С ее помощью очень удобно загружать, обрабатывать и анализировать табличные данные с помощью SQL-подобных запросов... | github_jupyter |


```
import tensorflow as tf
import os
import time
import numpy as np
import pathlib
from matplotlib import pyplot as plt
from IPython import display
BUFFER_SIZE = 400
EPOCH... | github_jupyter |
**Srayan Gangopadhyay**
*17th May 2020*
# Testing Runge-Kutta method for 2nd-order ODEs
## Introducing the code
**1. Docstring, importing required modules, and info about correct form of ODE**
To solve a second-order differential equation using the Runge-Kutta method, we first need to rewrite it as two first-order ... | github_jupyter |

---
<table class="tfo-notebook-buttons" align="left"><tr><td>
<a href="https://colab.research.google.com/github/adf-telkomuniv/CV2020_Exercises/blob/main/CV2020 - 09 - Keras Model.ipynb" source="blank" ><img src="https://colab.research.google.com/assets/colab-badg... | github_jupyter |

**COVID19 - Análise do Surto Brasileiro**
# Modelo Epidemiológico Clássico: SEIR
Neste documento investigamos a dinâmica epidemiológica da COVID19 empregando um modelo cĺássico conhecido como SEIR e algumas variações imediatas. Uma vez definido o modelo, empregamos dados his... | github_jupyter |
# Synthesizing a Wind Speed Time Series
[Florian Roscheck](https://www.linkedin.com/in/florianroscheck/), 2020-03-07
In this notebook, we use meteorological reference data from public sources to come up with artifical wind speed data for a ficitous measurement mast. The fictuous data is used only to show what measurem... | github_jupyter |
<a href="https://colab.research.google.com/github/NeuromatchAcademy/course-content/blob/pehf-patch-1/tutorials/W1D4_MachineLearning/student/W1D4_Tutorial1.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Neuromatch Academy: Week 1, Day 4, Tutorial ... | github_jupyter |
<h1>Table of Contents<span class="tocSkip"></span></h1>
<div class="toc"><ul class="toc-item"><li><span><a href="#Setup" data-toc-modified-id="Setup-1"><span class="toc-item-num">1 </span>Setup</a></span></li><li><span><a href="#Budget-set" data-toc-modified-id="Budget-set-2"><span class="toc-item-num">2&nbs... | github_jupyter |
# Developing an AI application
Going forward, AI algorithms will be incorporated into more and more everyday applications. For example, you might want to include an image classifier in a smart phone app. To do this, you'd use a deep learning model trained on hundreds of thousands of images as part of the overall appli... | github_jupyter |
# Machine Learning Exercise 3 - Multi-Class Classification
This notebook covers a Python-based solution for the third programming exercise of the machine learning class on Coursera. Please refer to the [exercise text](https://github.com/jdwittenauer/ipython-notebooks/blob/master/exercises/ML/ex3.pdf) for detailed des... | github_jupyter |
# Examples for Kinetica API
The following steps will test:
1. Saving of a Pandas Dataframe to a Kinetica table
1. saving of a Pandas Dataframe to a table with shard key and column properties.
1. Loading of a Kinetica table to a Pandas dataframe
Also See:
* [Kinetica Python Guide](https://www.kinetica.com/docs/6.2/tu... | github_jupyter |
# <u>Spotify Hit Predictor Model for 60's Dataset</u>
### Importing Libraries
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
import tensorflow as tf
from tensorflow import keras
%matpl... | github_jupyter |
<table>
<tr align=left><td><img align=left src="./images/CC-BY.png">
<td>Text provided under a Creative Commons Attribution license, CC-BY. All code is made available under the FSF-approved MIT license. (c) Kyle T. Mandli</td>
</table>
```
from __future__ import print_function
%matplotlib inline
import os
import n... | github_jupyter |
# Simulations Lab
```
%matplotlib inline
import numpy as np
import scipy.stats
from matplotlib import pyplot as plt
```
## Practice
+ If you want to build a collection of things, keeping track of their order, but do not know how many things you will have, should you use a `dict`, `list`, or `array`?
+ If you want t... | github_jupyter |
### Prepare storage and get Data
```
!wget -O data.zip http://hck.re/TT3Xkb
!unzip data.zip
```
### Remove Useless features found in EDA and feature selection
```
import pickle
with open('useless_features', 'rb') as f:
useless_features = pickle.load(f)
print(f"Number of removable features are {len(useless_featu... | github_jupyter |
# Predict a car's market price using its attributes
Using fundamental machine learning k nearest neighbor regression technique.
Date May 15, 2018
Reference --> http://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsRegressor.html
About the Data --> http://archive.ics.uci.edu/ml/datasets/Automo... | github_jupyter |
```
import cv2
import numpy as np
import math
import cv2
import random
import time
import sys
import operator
import os
from numpy import zeros, newaxis
import re
import sys
import matplotlib.pyplot as plt
import glob
import skimage
import skimage.io
import scipy.io as scp
from sklearn.utils import shuffle
from __futu... | github_jupyter |
```
## This can leave open processes if you don't keep track of them, be sure to clean up after
import numpy as np
import torch
import gym
import pybullet_envs
import os
import sys
from pathlib import Path
sys.path.append(str(Path().resolve().parent))
import utils
import TD3
from numpngw import write_apng
from gym.env... | github_jupyter |
# Linear models for regression problems

## Ordinary least squares
Linear regression models the **output**, or **target** variable $y \in \mathrm{R}$ as a linear combination of the $P$-dimensional input $\mathbf{x} \in \mathbb{R}^{P}$. Let $\mathbf{X}$ be the $N \tim... | github_jupyter |
<a href="https://colab.research.google.com/github/RoseSarlake/Computer-Vision/blob/main/CV_Assignment0.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# 1.OpenCV_basic.txt
Reading, displaying and writing an image
```
from google.colab import d... | github_jupyter |
```
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
df = pd.read_csv("https://raw.githubusercontent.com/alexeygrigorev/datasets/master/AB_NYC_2019.csv")
df
features = ['neighbourhood_group',
'room_type',
'latitude',
'longitude',
'price',
'minimum_nights',
'number_of_reviews'... | github_jupyter |
# 字典和集合
> 字典这个数据结构活跃在所有 Python 程序的背后,即便你的源码里并没有直接用到它。
> ——A. M. Kuchling
`dict` 是 Python 语言的基石。
可散列对象需要实现 `__hash__` 和 `__eq__` 函数。
如果两个可散列对象是相等的,那么它们的散列值一定是一样的。
## 范映射类型
collections.abc 模块中有 Mapping 和 MutableMapping 两个抽象基类,起作用是为 dict 和其他类似的类型定义形式接口。
//pic
但非抽象映射类型一般不会直接继承这些抽象基类,而是直接对 dict 或 collections.User... | github_jupyter |
<h1>Table of Contents<span class="tocSkip"></span></h1>
<div class="toc"><ul class="toc-item"><li><span><a href="#Find-correlation-between-params" data-toc-modified-id="Find-correlation-between-params-1"><span class="toc-item-num">1 </span>Find correlation between params</a></span></li></ul></div>
```
%cd .... | github_jupyter |
This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/interactive-coding-challenges).
# Challenge Notebook
## Problem: Implement a binary search tree with an insert method.
* [Constraints](#Constraints)
* [Test Cases](#Test... | github_jupyter |
<!--NOTEBOOK_HEADER-->
*This notebook contains material from [CBE40455-2020](https://jckantor.github.io/CBE40455-2020);
content is available [on Github](https://github.com/jckantor/CBE40455-2020.git).*
<!--NAVIGATION-->
< [2.4 Linear Analysis of Campus Reopening](https://jckantor.github.io/CBE40455-2020/02.04-Linear-A... | github_jupyter |
Notes:
- Uppercase count good distinction
- Count of bad words good distinction (rises sharply only after a certain point, probably too sensitive for badness)
- Count of length seems to have a small difference with shorter texts more likely to be toxic
- Count of typos looks like a good distinction, but surprisingly in... | github_jupyter |
```
import os
import tensorflow as tf
import numpy as np
from matplotlib import pyplot as plt
np.random.seed(333)
tf.random.set_seed(333)
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
assert tf.__version__.startswith('2.'), "TensorFlow Version Below 2.0"
(x_train, y_train), (x_test, y_test) = tf.keras.datasets.fashion... | github_jupyter |
## <small>
Copyright (c) 2017-21 Andrew Glassner
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ... | github_jupyter |
```
import pandas as pd
import numpy as np
import datetime as dt
# define basic date functions and weather function
def year(row):
date = dt.datetime.strptime(row['date'], "%Y-%m-%d")
return date.year
def month(row):
date = dt.datetime.strptime(row['date'], "%Y-%m-%d")
return date.month
def day(row):
... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.