code stringlengths 2.5k 150k | kind stringclasses 1
value |
|---|---|
# Mentoria Evolution - Exercícios Python
https://minerandodados.com.br
* Para executar uma célula digite **Control + enter** ou clique em **Run**.
* As celulas para rodar script Python devem ser do tipo code.
* Crie células abaixo das celulas que foram escrito o enunciado das questões com as respostas.
**Obs**: Caso... | github_jupyter |
# Lecture 14
### Wednesday, October 25th 2017
## Last time:
* Iterators and Iterables
* Trees, Binary trees, and BSTs
## This time:
* BST Traversal
* Generators
* Memory layouts
* Heaps?
# BST Traversal
* We've stored our data in a BST
* This seemed like a good idea at the time because BSTs have some nice properti... | github_jupyter |
```
# Initial imports
import pandas as pd
import hvplot.pandas
from path import Path
import plotly.express as px
from sklearn.preprocessing import StandardScaler, MinMaxScaler
from sklearn.decomposition import PCA
from sklearn.cluster import KMeans
# Load the crypto_data.csv dataset.
file_path = "crypto_data.csv"
df_cr... | github_jupyter |
# Federated learning: pretrained model
In this notebook, we provide a simple example of how to perform an experiment in a federated environment with the help of the Sherpa.ai Federated Learning framework. We are going to use a popular dataset and a pretrained model.
## The data
The framework provides some functions f... | github_jupyter |
# Tutorial: optimal binning with binary target under uncertainty
The drawback of performing optimal binning given only expected event rates is that variability of event rates in different periods is not taken into account. In this tutorial, we show how scenario-based stochastic programming allows incorporating uncerta... | github_jupyter |
## Using Isolation Forest to Detect Criminally-Linked Properties
The goal of this notebook is to apply the Isolation Forest anomaly detection algorithm to the property data. The algorithm is particularly good at detecting anomalous data points in cases of extreme class imbalance. After normalizing the data and splitti... | github_jupyter |
```
%reset -f
## PFLOTRAN
import jupypft.model as mo
import jupypft.parameter as pm
import jupypft.attachmentRateCFT as arCFT
import jupypft.plotBTC as plotBTC
```
# Build the Case Directory
```
## Temperatures
Ref,Atm,Tin = pm.Real(tag="<initialTemp>",value=10.,units="C",mathRep="$$T_{0}$$"),\
pm.Real... | github_jupyter |
## GAN (Pytorch)
### Terminal : tensorboard --logdir=./GAN
Reference : https://github.com/aladdinpersson/Machine-Learning-Collection/blob/master/ML/Pytorch/GANs/1.%20SimpleGAN/fc_gan.py
$$
\underset{\theta_{g}}min \underset{\theta_{d}}max[E_{x\sim P_{data}}logD_{\theta_{d}}(x) + E_{z\sim P_{z}}log(1-D_{\theta_{d}}(G... | github_jupyter |
```
from math import sin, cos, log, ceil
import numpy
from matplotlib import pyplot
%matplotlib inline
from matplotlib import rcParams
rcParams['font.family'] = 'serif'
rcParams['font.size']=16
# model parameters:
g= 9.8 #[m/s^2]
v_t = 20.0 #[m/s] trim velocity
C_D = 1/40 #drag coef.
C_L = 1 #coefficient of lift... | github_jupyter |
<img src="../images/aeropython_logo.png" alt="AeroPython" style="width: 300px;"/>
# Secciones de arrays
_Hasta ahora sabemos cómo crear arrays y realizar algunas operaciones con ellos, sin embargo, todavía no hemos aprendido cómo acceder a elementos concretos del array_
## Arrays de una dimensión
```
# Accediendo a... | github_jupyter |
# Transfer Learning Template
```
%load_ext autoreload
%autoreload 2
%matplotlib inline
import os, json, sys, time, random
import numpy as np
import torch
from torch.optim import Adam
from easydict import EasyDict
import matplotlib.pyplot as plt
from steves_models.steves_ptn import Steves_Prototypical_Network
... | github_jupyter |
# Anna KaRNNa
In this notebook, we'll build a character-wise RNN trained on Anna Karenina, one of my all-time favorite books. It'll be able to generate new text based on the text from the book.
This network is based off of Andrej Karpathy's [post on RNNs](http://karpathy.github.io/2015/05/21/rnn-effectiveness/) and [... | github_jupyter |
```
import pandas as pd
from scipy.spatial.distance import pdist
from scipy.cluster.hierarchy import *
from matplotlib import pyplot as plt
from matplotlib import rc
import numpy as np
from sklearn.cluster import KMeans
import seaborn as sns
from scipy.cluster.hierarchy import dendrogram, linkage
from scipy.cluster imp... | github_jupyter |
<a href="https://colab.research.google.com/github/NeuromatchAcademy/course-content/blob/master/tutorials/W1D1_ModelTypes/W1D1_Tutorial2.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Neuromatch Academy: Week 1, Day 1, Tutorial 2
# Model Types: "... | github_jupyter |
## A quick Gender Recognition model
Grabbed from [nlpforhackers](https://nlpforhackers.io/introduction-machine-learning/) webpage.
1. Firstly convert the dataset into a numpy array to keep only gender and names
2. Set the feature parameters which takes in different parameters
3. Vectorize the parametes
4. Get varied tr... | github_jupyter |
# Get started
<a href="https://mybinder.org/v2/gh/tinkoff-ai/etna/master?filepath=examples/get_started.ipynb">
<img src="https://mybinder.org/badge_logo.svg" align='left'>
</a>
This notebook contains the simple examples of time series forecasting pipeline
using ETNA library.
**Table of Contents**
* [Creating T... | github_jupyter |
# Refitting NumPyro models with ArviZ (and xarray)
ArviZ is backend agnostic and therefore does not sample directly. In order to take advantage of algorithms that require refitting models several times, ArviZ uses `SamplingWrappers` to convert the API of the sampling backend to a common set of functions. Hence, functi... | github_jupyter |
```
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pickle
import functools as ft
X = x_train[1]
X
not ft.reduce(lambda old, new: old == new,X >= 0)
```
## XOR
```
def xor(X):
if not ft.reduce(lambda old, new: old == new,X >= 0):
return 1
else:
... | github_jupyter |
# <div align="center">What is a Tensor</div>
---------------------------------------------------------------------
you can Find me on Github:
> ###### [ GitHub](https://github.com/lev1khachatryan)
***Tensors are not generalizations of vectors***. It’s very slightly more understandable to say that tensors are gene... | github_jupyter |
# Pytorch : Classification Problem - Diabetics with NN
```
#import necessary libraries
#describe reason for import each libraries
import numpy as np # converting data from pandas to torch
import torch
import torch.nn as nn #main library to define the architecture of the neural network
import pandas as pd # to read t... | github_jupyter |
# Image Classifier
## Dataset : 28x28 pixel Low Res Images
```
import tensorflow as tf
from tensorflow import keras
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import os
tf.logging.set_verbosity(tf.logging.ERROR)
pd.options.display.max_rows = 7
CATEGORIES = ['T-shirt/t... | github_jupyter |
Dependencies and starter code
Observations:
1. The number of data points per drug regimen group were not equal. Capomulin and Ramicane had the most amount of data points and they were also a part of the top four most promising treatment regimens. Their inclusion in this category may be because there was a larger data ... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
import numpy as np
np.set_printoptions(precision=2)
import matplotlib.pyplot as plt
import copy as cp
import sys, json, pickle
PROJECT_PATHS = ['/home/nbuckman/Dropbox (MIT)/DRL/2020_01_cooperative_mpc/mpc-multiple-vehicles/', '/Users/noambuckman/mpc-multiple-vehicles/']
for p in ... | github_jupyter |
# Stock Prediction Research Proposal
### Introduction
The main purpose of this research project is to create a Stock-prediction application to be used as a day-trading application to support investment decisions for beginners. The Target Audience for the project would be a tech company to whom I would be selling my ... | github_jupyter |
# Classification example 2 using Health Data with PyCaret
```
#Code from https://github.com/pycaret/pycaret/
# check version
from pycaret.utils import version
version()
```
# 1. Data Repository
```
import pandas as pd
url = 'https://raw.githubusercontent.com/davidrkearney/colab-notebooks/main/datasets/strokes_traini... | github_jupyter |
<a href="https://colab.research.google.com/github/patil-suraj/question_generation/blob/master/question_generation.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
!pip install -U transformers==3.0.0
!python -m nltk.downloader punkt
!pip3 install ... | github_jupyter |
## Bias and Variance
For the sake of this discussion, let's assume we are looking at a regression problem. For values of
$x$ in the interval $[-1,1]$ there is a function $f(x)$ so that
$$
Y = f(x)+\epsilon
$$
where $\epsilon$ is a noise term -- say, normally distributed with mean zero and variance $\sigma^2$.
We ha... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
import sys
sys.path.append("..")
import numpy as np
import pandas as pd
pd.set_option('display.max_columns', 100)
# viz
import matplotlib.pyplot as plt
import seaborn as sns
sns.set(rc={'figure.figsize':(12.7,10.27)})
# notebook settings
from IPython.core.intera... | github_jupyter |
# Finviz Analytics
### What is Finviz?
FinViz aims to make market information accessible and provides a lot of data in visual snapshots, allowing traders and investors to quickly find the stock, future or forex pair they are looking for. The site provides advanced screeners, market maps, analysis, comparative tools a... | github_jupyter |
# Logistic regression example
### Dr. Tirthajyoti Sarkar, Fremont, CA 94536
---
This notebook demonstrates solving a logistic regression problem of predicting Hypothyrodism with **Scikit-learn** and **Statsmodels** libraries.
The dataset is taken from UCI ML repository.
<br>Here is the link: https://archive.ics.uci.... | github_jupyter |
```
import pandas as pd
import numpy as np
import tensorflow as tf
from datetime import datetime
import matplotlib.pyplot as plt
import seaborn as sns
features = pd.read_csv('../Data/training_set_features.csv')
labels = pd.read_csv('../Data/training_set_labels.csv')
df = pd.merge(features, labels, on='respondent_id', h... | github_jupyter |
## Automatic Ticket Assignment
One of the key activities of any IT function is to ensure there is no
impact to the Business operations. <b>IT leverages Incident Management process to achieve the
above Objective.</b> An incident is something that is unplanned interruption to an IT service or
reduction in the quality of ... | github_jupyter |
# Keras Functional API
```
# sudo pip3 install --ignore-installed --upgrade tensorflow
import keras
import tensorflow as tf
print(keras.__version__)
print(tf.__version__)
# To ignore keep_dims warning
tf.logging.set_verbosity(tf.logging.ERROR)
```
Let’s start with a minimal example that shows side by side a simple Se... | github_jupyter |
# Basic Init
**Imports**
```
import nibabel as nib
import matplotlib.pyplot as plt
import numpy as np
from random import randint
import tensorflow as tf
import glob
import pickle
import os
from keras.layers import Input, Dense, Conv3D, MaxPooling3D, UpSampling3D, Conv3DTranspose
from keras.models import Model, load_... | github_jupyter |
```
# Libraries for R^2 visualization
from ipywidgets import interactive, IntSlider, FloatSlider
from math import floor, ceil
from sklearn.base import BaseEstimator, RegressorMixin
# Libraries for model building
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_absolute_error, mean_squ... | github_jupyter |
<div>
<img src="https://drive.google.com/uc?export=view&id=1vK33e_EqaHgBHcbRV_m38hx6IkG0blK_" width="350"/>
</div>
#**Artificial Intelligence - MSc**
##ET5003 - MACHINE LEARNING APPLICATIONS
###Instructor: Enrique Naredo
###ET5003_NLP_SpamClasiffier-2
### Spam Classification
[Spamming](https://en.wikipedia.org/w... | github_jupyter |
Lambda School Data Science
*Unit 2, Sprint 1, Module 4*
---
# Logistic Regression
## Overview
We'll begin with the **majority class baseline.**
[Will Koehrsen](https://twitter.com/koehrsen_will/status/1088863527778111488)
> A baseline for classification can be the most common class in the training dataset.
[*Da... | github_jupyter |
# Vector-space models: dimensionality reduction
```
__author__ = "Christopher Potts"
__version__ = "CS224u, Stanford, Spring 2020"
```
## Contents
1. [Overview](#Overview)
1. [Set-up](#Set-up)
1. [Latent Semantic Analysis](#Latent-Semantic-Analysis)
1. [Overview of the LSA method](#Overview-of-the-LSA-method)
1.... | github_jupyter |
<a href="https://colab.research.google.com/github/jarek-pawlowski/machine-learning-applications/blob/main/ecg_classification.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Heart beats classification problem
A typical task for applied Machine Lear... | github_jupyter |
```
import matplotlib.pyplot as plt
import numpy as np
from pymongo import MongoClient
import tldextract
import math
import re
import pickle
from tqdm import tqdm_notebook as tqdm
import spacy
from numpy import dot
from numpy.linalg import norm
import csv
import random
import statistics
import copy
import itertools
fro... | github_jupyter |
<a href="https://colab.research.google.com/github/amathsow/wolof_speech_recognition/blob/master/Speech_recognition_project.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
!pip3 install torch
!pip3 install torchvision
!pip3 install torchaudio
!pi... | github_jupyter |
# A Brief Overview of Network Data Science
Networks are extremely rich data structures which admit a wide variety of insightful data analysis tasks. In this set of notes, we'll consider two of the fundamental tasks in network data science: centrality and clustering. We'll also get a bit more practice with network visu... | github_jupyter |
<a href="https://colab.research.google.com/github/lmcanavals/algorithmic_complexity/blob/main/05_01_UCS_dijkstra.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Breadth First Search
BFS para los amigos
```
import graphviz as gv
import numpy as n... | github_jupyter |
# Distributed DeepRacer RL training with SageMaker and RoboMaker
---
## Introduction
In this notebook, we will train a fully autonomous 1/18th scale race car using reinforcement learning using Amazon SageMaker RL and AWS RoboMaker's 3D driving simulator. [AWS RoboMaker](https://console.aws.amazon.com/robomaker/home#... | github_jupyter |
```
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
```
# EDA
<hr>
## Table infos
```
infos = pd.read_csv('infos.csv', sep = '|')
infos.head()
infos.dtypes
infos.shape
len(infos) - infos.count()
infos['promotion'].unique()
```
## Table items
```
items = pd.read_csv('items.csv', sep = '|')
it... | github_jupyter |
# [Introduction to Data Science: A Comp-Math-Stat Approach](https://lamastex.github.io/scalable-data-science/as/2019/)
## YOIYUI001, Summer 2019
©2019 Raazesh Sainudiin. [Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/)
# 08. Pseudo-Random Numbers, Simulating from Some Dis... | github_jupyter |
Jeremy Thaller - Aug. 2021
*Write a quick summary of the project here. For example: CNN to predict MSD values from XANES spectra.*
```
import numpy as np
import pandas as pd
import datetime
import seaborn as sns
sns.set_style('whitegrid')
import matplotlib.pyplot as plt
import tensorflow as tf
from tensorflow... | github_jupyter |
```
%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import glob
import pickle as pkl
from scipy import stats
import random
import time
import utility_funcs as uf
```
### The following Hurst function was taken in part from <a href = "https://www.quantstart.com/articles/Basics-... | github_jupyter |
```
import os
import numpy as np
import pandas as pd
import spikeextractors as se
import spiketoolkit as st
import spikewidgets as sw
import tqdm.notebook as tqdm
from scipy.signal import periodogram, spectrogram
import matplotlib.pyplot as plt
# %matplotlib inline
# %config InlineBackend.figure_format='retina'
imp... | github_jupyter |
<a href="https://colab.research.google.com/github/ginttone/test_visuallization/blob/master/2_autompg_linearregression.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# 머신러닝
- 정보(데이터)단계<br>
dropna:info(), describe()<br>
fillna, replace:describe(), v... | github_jupyter |
# Convolutional Neural Networks: Application
Welcome to Course 4's second assignment! In this notebook, you will:
- Implement helper functions that you will use when implementing a TensorFlow model
- Implement a fully functioning ConvNet using TensorFlow
**After this assignment you will be able to:**
- Build and t... | github_jupyter |
# k-Nearest Neighbor (kNN) implementation
*Credits: this notebook is deeply based on Stanford CS231n course assignment 1. Source link: http://cs231n.github.io/assignments2019/assignment1/*
The kNN classifier consists of two stages:
- During training, the classifier takes the training data and simply remembers it
- D... | github_jupyter |
# Run Modes
Running MAGICC in different modes can be non-trivial. In this notebook we show how to set MAGICC's config flags so that it will run as desired for a few different cases.
```
# NBVAL_IGNORE_OUTPUT
from os.path import join
import datetime
import dateutil
from copy import deepcopy
import numpy as np
import... | github_jupyter |
<img src="https://raw.githubusercontent.com/EdsonAvelar/auc/master/molecular_banner.png" width=1900px height=400px />
# Predicting Molecular Properties
<h3 style="color:red">If this kernel helps you, up vote to keep me motivated 😁<br>Thanks!</h3>
<h3> Can you measure the magnetic interactions between a pair of atom... | github_jupyter |
```
import pandas as pd
import numpy as np
import os
from matplotlib.pyplot import *
from IPython.display import display, HTML
import glob
import scanpy as sc
import pandas as pd
import seaborn as sns
import scipy.stats
%matplotlib inline
file = '/nfs/leia/research/stegle/dseaton/hipsci/singlecell_neuroseq/data/ipsc_s... | github_jupyter |
<a href="https://colab.research.google.com/github/hnishi/jupyterbook-hnishi/blob/colab-dev/pca.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# 主成分分析 (主成分解析、Principal component analysis : PCA)
## 概要
- 主成分分析は、教師なし線形変換法の1つ
- データセットの座標軸を、データの分散が最大... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
```
# Generate images
```
from pathlib import Path
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
SMALL_SIZE = 15
MEDIUM_SIZE = 20
BIGGER_SIZE = 25
plt.rc("font", size=SMALL_SIZE)
plt.rc("axes", titlesize=SMALL_SIZE)
plt.rc("axes", labelsize=MEDIUM_SIZ... | github_jupyter |
# Predict when statistics need to be collected
## Connect to Vantage
```
#import the teradataml package for Vantage access
from teradataml import *
import getpass
from teradataml import display
#display.print_sqlmr_query=True
from sqlalchemy.sql.expression import select, case as case_when, func
from sqlalchemy import... | github_jupyter |
# Processing Milwaukee Label (~3K labels)
Building on `2020-03-24-EDA-Size.ipynb`
Goal is to prep a standard CSV that we can update and populate
```
import pandas as pd
import numpy as np
import os
import s3fs # for reading from S3FileSystem
import json # for working with JSON files
import matplotlib.pyplot as pl... | github_jupyter |
```
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import xgboost
```
Data preprocessing
```
#load dataset
data = pd.read_csv("pima-diabetes.csv")
data.head(10)
# mapping True diabetes prediction to 1
# mapping False diabetes prediction to 0
diabetes_map= {True:1, False:0}
data['diabetes']=dat... | github_jupyter |
```
import plotly.express as px
from plotly import graph_objects as go
import pandas as pd
#import chart_studio.tools as tls
df_gp = pd.read_csv('/Users/muhammad-faaiz.shanawas/Documents/GitHub/SystemHierarchies/data/gp-reg-pat-prac-map.csv')
list_of_ccgs = df_gp['CCG_CODE'].unique()
num_of_ccgs = len(list_of_ccgs)
lis... | github_jupyter |
```
!nvidia-smi
# unrar x "/content/drive/MyDrive/IDC_regular_ps50_idx5.rar" "/content/drive/MyDrive/"
# !unzip "/content/drive/MyDrive/base_dir/train_dir/b_idc.zip" -d "/content/drive/MyDrive/base_dir/train_dir"
import os
! pip install -q kaggle
from google.colab import files
files.upload()
! mkdir ~/.kaggle
! cp kag... | github_jupyter |
# Usage of py_simple_report
This library is intended to be developed for creating elements of a report.
Why element? We want to have titles, legends, labels. However, if you try to obtain all of them, simultaneously, it's a increadible task, and requires a higher graphical knowledge. Then, I take an alternative stra... | github_jupyter |
# Security Master Analysis
by @marketneutral
```
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import plotly.plotly as py
from plotly.offline import init_notebook_mode, iplot
import plotly.graph_objs as go
import cufflinks as cf
init_notebook_mode(connected=False)
cf.set_config_file(offline=T... | github_jupyter |
```
#Import Dependencies
import re
import numpy as np
import pandas as pd
from sqlalchemy import create_engine
```
```
##Source = https://aca5.accela.com/bcc/customization/bcc/cap/licenseSearch.aspx
#California_Cannabis_Distributer_Data
california_data = "../ETL_project/california_data.csv"
california_data_df = pd.rea... | github_jupyter |
**Chapter 5 – Support Vector Machines**
_This notebook contains all the sample code and solutions to the exercises in chapter 5._
# Setup
First, let's make sure this notebook works well in both python 2 and 3, import a few common modules, ensure MatplotLib plots figures inline and prepare a function to save the figu... | github_jupyter |
```
import numpy
%pylab inline
pwd #import crap with this
import numpy
import matplotlib.pyplot as pl
import scipy
from scipy import integrate
from pylab import *
import numpy as np
from numpy import zeros, array, asarray, dot, linspace, size, sin, cos, tan, pi, exp, random, linalg
import scipy as sci
from scipy impor... | github_jupyter |
# Introduction to Biomechanics
> Marcos Duarte
> Laboratory of Biomechanics and Motor Control ([http://demotu.org/](http://demotu.org/))
> Federal University of ABC, Brazil
## Biomechanics @ UFABC
```
from IPython.display import IFrame
IFrame('http://demotu.org', width='100%', height=500)
```
## Biomechanics
T... | github_jupyter |
# Keras Exercise
## Predict political party based on votes
As a fun little example, we'll use a public data set of how US congressmen voted on 17 different issues in the year 1984. Let's see if we can figure out their political party based on their votes alone, using a deep neural network!
For those outside the Unit... | github_jupyter |
```
if 'google.colab' in str(get_ipython()):
!pip install -q condacolab
import condacolab
condacolab.install()
"""
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... | github_jupyter |
# 6. External Libraries
<a href="https://colab.research.google.com/github/chongsoon/intro-to-coding-with-python/blob/main/6-External-Libraries.ipynb" target="_parent">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a>
Up till now, we have been using what ever is availab... | github_jupyter |
<a href="http://landlab.github.io"><img style="float: left" src="../../../landlab_header.png"></a>
# The Implicit Kinematic Wave Overland Flow Component
<hr>
<small>For more Landlab tutorials, click here: <a href="https://landlab.readthedocs.io/en/latest/user_guide/tutorials.html">https://landlab.readthedocs.io/en/la... | github_jupyter |
# Robot Class
In this project, we'll be localizing a robot in a 2D grid world. The basis for simultaneous localization and mapping (SLAM) is to gather information from a robot's sensors and motions over time, and then use information about measurements and motion to re-construct a map of the world.
### Uncertainty
A... | github_jupyter |
# SageMaker Debugger Profiling Report
SageMaker Debugger auto generated this report. You can generate similar reports on all supported training jobs. The report provides summary of training job, system resource usage statistics, framework metrics, rules summary, and detailed analysis from each rule. The graphs and tab... | github_jupyter |
# Overview
This lab has been adapted from the angr [motivating example](https://github.com/angr/angr-doc/tree/master/examples/fauxware). It shows the basic lifecycle and capabilities of the angr framework.
Note this lab (and other notebooks running angr) should be run with the Python 3 kernel!
Look at fauxware.c! T... | github_jupyter |
```
from bs4 import BeautifulSoup as soup
from urllib.request import urlopen as ureq
from selenium import webdriver
import time
import re
url = 'https://programs.usask.ca/engineering/first-year/index.php#Year14144creditunits'
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--ignore-certificate-e... | github_jupyter |
```
pip install mlxtend --upgrade --no-deps
import mlxtend
print(mlxtend.__version__)
from google.colab import drive
drive.mount('/content/gdrive')
import cv2
import skimage
import keras
import tensorflow
import numpy as np
import matplotlib.pyplot as plt
import p... | github_jupyter |
<a href="https://colab.research.google.com/github/NeuromatchAcademy/course-content/blob/master/tutorials/W3D1_RealNeurons/W3D1_Tutorial2.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Neuromatch Academy: Week 3, Day 1, Tutorial 2
# Real Neurons: ... | github_jupyter |
# Fundamental types in Python
# Integers
Integer literals are created by any number without a decimal or complex component.
```
x = 1
print(x)
y=5
print(y)
z="Test"
print(z)
```
# Lets check if a number is integer or not
```
isinstance(x, int)
```
# Floats
Float literals can be created by adding a decimal componen... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
import molsysmt as msm
```
# Convert
The meaning of molecular system 'form', in the context of MolSysMT, has been described previously in the section XXX. There is in MolSysMT a method to convert a form into other form: `molsysmt.convert()`. This method is the keystone of this l... | github_jupyter |
# Практическое задание к уроку 1 (2 неделя).
## Линейная регрессия: переобучение и регуляризация
В этом задании мы на примерах увидим, как переобучаются линейные модели, разберем, почему так происходит, и выясним, как диагностировать и контролировать переобучение.
Во всех ячейках, где написан комментарий с инструкция... | github_jupyter |
# Initialize a game
```
from ConnectN import ConnectN
game_setting = {'size':(6,6), 'N':4, 'pie_rule':True}
game = ConnectN(**game_setting)
% matplotlib notebook
from Play import Play
gameplay=Play(ConnectN(**game_setting),
player1=None,
player2=None)
```
# Define our policy
Please ... | github_jupyter |
# Interpolation
```
import numpy as np
import matplotlib.pyplot as plt
```
### Linear Interpolation
Suppose we are given a function $f(x)$ at just two points, $x=a$ and $x=b$, and you want to know the function at another point in between. The simplest way to find an estimate of this value is using linear interpolati... | github_jupyter |
# Cleaning Your Data
Let's take a web access log, and figure out the most-viewed pages on a website from it! Sounds easy, right?
Let's set up a regex that lets us parse an Apache access log line:
```
import re
format_pat= re.compile(
r"(?P<host>[\d\.]+)\s"
r"(?P<identity>\S*)\s"
r"(?P<user>\S*)\s"
r... | github_jupyter |
# CORDIS FP7
```
import json
import re
import urllib
from titlecase import titlecase
import pandas as pd
pd.set_option('display.max_columns', 50)
```
## Read in Data
```
all_projects = pd.read_excel('input/fp7/cordis-fp7projects.xlsx')
all_projects.shape
all_organizations = pd.read_excel('input/fp7/cordis-fp7organ... | github_jupyter |
# Plotting
Figures to plot:
1. Merit order plots showing:
1. how emissions intensive plant move down the merit order as the permit price increases (subplot a), and the net liability faced by different generators if dispatched (subplot b);
2. short-run marginal costs of generators under a REP scheme and a carbo... | github_jupyter |
# Dataset Downloaded from Kaggle : https://www.kaggle.com/jessemostipak/hotel-booking-demand
3 Questions that may help the hotel to improve their business by reducing cancellation rate:
1. What is the cancellation rate over the years for different hotel categories?
2. Are we able to predict booking cancellation?
3. ... | github_jupyter |
```
import numpy as np
from numpy import ones
from numpy_sugar import ddot
import os
import sys
import pandas as pd
from pandas_plink import read_plink1_bin
from numpy.linalg import cholesky
from numpy_sugar.linalg import economic_svd
import xarray as xr
from struct_lmm2 import StructLMM2
from limix.qc import quantile_... | github_jupyter |
```
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import os
pd.set_option('display.max_colwidth', 1000)
pd.set_option('display.max_rows', 500)
from sklearn import svm
import re
from shutil import copyfile
import matplotlib.pyplot as plt
import pydicom
from tqdm import tqdm
import nibabel as ni... | github_jupyter |
# Anomaly detection using Facebook Prophet:
**Medical background:**
In the last decades, the miniaturization of wearable sensors and development of data transmission technologies have allowed to collect medically relevant data called digital biomarkers. This data is revolutionising our modern Medicine by offering new... | github_jupyter |
```
import re
import nltk
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize
import spacy
from nltk.tokenize.toktok import ToktokTokenizer
import en_core_web_sm
from pattern.en import suggest
import pandas as pd
#nltk.download('stopwords')
#nltk.download('punkt')
nlp = spacy.load('en_core_web_sm'... | github_jupyter |
Version 1.1.0
# Mean encodings
In this programming assignment you will be working with `1C` dataset from the final competition. You are asked to encode `item_id` in 4 different ways:
1) Via KFold scheme;
2) Via Leave-one-out scheme;
3) Via smoothing scheme;
4) Via expanding mean scheme.
**You will... | github_jupyter |
# Step 2: Building GTFS graphs and merging it with a walking graph
We heavily follow Kuan Butts's Calculating Betweenness Centrality with GTFS blog post: https://gist.github.com/kuanb/c54d0ae7ee353cac3d56371d3491cf56
### The peartree (https://github.com/kuanb/peartree) source code was modified. Until code is merged yo... | github_jupyter |
<a href="https://colab.research.google.com/github/mengwangk/dl-projects/blob/master/04_02_auto_ml_2.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Automated ML
```
COLAB = True
if COLAB:
!sudo apt-get install git-lfs && git lfs install
!rm -... | github_jupyter |
# Print Compact Transitivity Tables
```
import qualreas as qr
import os
import json
path = os.path.join(os.getenv('PYPROJ'), 'qualreas')
```
## Algebras from Original Files
## Algebras from Compact Files
```
alg = qr.Algebra(os.path.join(path, "Algebras/Misc/Linear_Interval_Algebra.json"))
alg.summary()
alg.check_... | github_jupyter |

# Python Basics I
Bienvenido a tu primer asalto con Python. En este notebook encontrarás los primeros pasos para empezar a familiarizarte con este lenguaje.
1. [Variables](#1.-Variables)
2. [Print](#2.-Print)
3. [Comentarios](#3.-Comentarios)
4. [Flujos de ejecución](#4.-Flujos-de-ejecución... | github_jupyter |
# Logistic Regression With Linear Boundary Demo
> ☝Before moving on with this demo you might want to take a look at:
> - 📗[Math behind the Logistic Regression](https://github.com/trekhleb/homemade-machine-learning/tree/master/homemade/logistic_regression)
> - ⚙️[Logistic Regression Source Code](https://github.com/tre... | github_jupyter |
# Working with Tensorforce to Train a Reinforcement-Learning Agent
This notebook serves as an educational introduction to the usage of Tensorforce using a gym-electric-motor (GEM) environment. The goal of this notebook is to give an understanding of what tensorforce is and how to use it to train and evaluate a reinfor... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
p = plt.rcParams.find_all(pattern='size')
#plt.rcParams['font.size'] = 14
p
def scale_text(scale='bigger',fig_adj=False):
if isinstance(scale,str):
if scale=='bigger':
scale = 1.25
elif scale=='smaller':
... | github_jupyter |
<a href="https://colab.research.google.com/github/martin-fabbri/colab-notebooks/blob/master/deeplearning.ai/nlp/c3_w1_03_trax_intro_2.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Trax : Ungraded Lecture Notebook
In this notebook you'll get to ... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.