text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
# 3์žฅ. ์‚ฌ์ดํ‚ท๋Ÿฐ์„ ํƒ€๊ณ  ๋– ๋‚˜๋Š” ๋จธ์‹  ๋Ÿฌ๋‹ ๋ถ„๋ฅ˜ ๋ชจ๋ธ ํˆฌ์–ด **์•„๋ž˜ ๋งํฌ๋ฅผ ํ†ตํ•ด ์ด ๋…ธํŠธ๋ถ์„ ์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ ๋ทฐ์–ด(nbviewer.jupyter.org)๋กœ ๋ณด๊ฑฐ๋‚˜ ๊ตฌ๊ธ€ ์ฝ”๋žฉ(colab.research.google.com)์—์„œ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.** <table class="tfo-notebook-buttons" align="left"> <td> <a target="_blank" href="https://nbviewer.jupyter.org/github/rickiepark/python-machine-learning-book-2nd-edition/blob...
github_jupyter
## Importing Necessary Libraries and Functions The first thing we need to do is import the necessary functions and libraries that we will be working with throughout the topic. We should also go ahead and upload all the of the necessary data sets here instead of loading them as we go. We will be using energy production...
github_jupyter
``` import numpy as np import json import re from collections import defaultdict import spacy import matplotlib.pyplot as plt %matplotlib inline annotation_file = '../vqa-dataset/Annotations/mscoco_%s_annotations.json' annotation_sets = ['train2014', 'val2014'] question_file = '../vqa-dataset/Questions/OpenEnded_mscoco...
github_jupyter
``` %matplotlib inline ``` # Spectral clustering for image segmentation In this example, an image with connected circles is generated and spectral clustering is used to separate the circles. In these settings, the `spectral_clustering` approach solves the problem know as 'normalized graph cuts': the image is seen ...
github_jupyter
<center> <img src="img/scikit-learn-logo.png" width="40%" /> <br /> <h1>Robust and calibrated estimators with Scikit-Learn</h1> <br /><br /> Gilles Louppe (<a href="https://twitter.com/glouppe">@glouppe</a>) <br /><br /> New York University </center> ``` # Global imports and settings # Mat...
github_jupyter
``` import importlib import pathlib import os import sys from datetime import datetime, timedelta import pandas as pd module_path = os.path.abspath(os.path.join('../..')) if module_path not in sys.path: sys.path.append(module_path) datetime.now() ticker="GME" report_name=f"{ticker}_{datetime.now().strftime('%Y%m%d_...
github_jupyter
# Segmented deformable mirrors We will use segmented deformable mirrors and simulate the PSFs that result from segment pistons and tilts. We will compare this functionality against Poppy, another optical propagation package. First we'll import all packages. ``` import os import numpy as np import matplotlib.pyplot a...
github_jupyter
``` import pandas as pd import numpy as np import matplotlib.pyplot as plt df = pd.read_csv('austin_weather.csv') df.head() df.info() ``` <h2>Visualisasi Scatter Plot Perbandingan Kuantitatif</h2> Pada tugas kali ini kita akan mengamati nilai DewPointAvg (F) dengan mengamati nilai HumidityAvg (%), TempAvg (F), dan ...
github_jupyter
# Convolutional Neural Networks: Step by Step Welcome to Course 4's first assignment! In this assignment, you will implement convolutional (CONV) and pooling (POOL) layers in numpy, including both forward propagation and (optionally) backward propagation. **Notation**: - Superscript $[l]$ denotes an object of the $l...
github_jupyter
# Mapboxgl Python Library for location data visualizaiton https://github.com/mapbox/mapboxgl-jupyter ### Requirements These examples require the installation of the following python modules ``` pip install mapboxgl pip install pandas ``` ``` import pandas as pd import os from mapboxgl.utils import * from mapboxgl....
github_jupyter
# ARC Tools ## Coordinates conversions Below, `xyz` and `zmat` refer to Cartesian and internal coordinates, respectively ``` from arc.species.converter import (zmat_to_xyz, xyz_to_str, zmat_from_xyz, zmat_to_str, ...
github_jupyter
# Course Outline * Step 0: ่ผ‰ๅ…ฅๅฅ—ไปถไธฆไธ‹่ผ‰่ชžๆ–™ * Step 1: ๅฐ‡่ชžๆ–™่ฎ€้€ฒไพ† * Step 2: Contingency table ๅ’Œ keyness ่จˆ็ฎ—ๅ…ฌๅผ * Step 3: ่จˆ็ฎ—่ฉž้ ป * Step 4: ่จˆ็ฎ— keyness * Step 5: ๆ‰พๅ‡บ PTT ๅ…ฉๆฟ็š„ keywords * Step 6: ่ฆ–่ฆบๅŒ– # Step 0: ่ผ‰ๅ…ฅๅฅ—ไปถไธฆไธ‹่ผ‰่ชžๆ–™ ``` import re # ๅพ…ๆœƒๆœƒไฝฟ็”จ regular expression import math # ็”จไพ†่จˆ็ฎ— log import pandas as pd # ็”จไพ†่ฃฝไฝœ่กจๆ ผ import matplot...
github_jupyter
The most common analytical task is to take a bunch of numbers in dataset and summarise it with fewer numbers, preferably a single number. Enter the 'average', sum all the numbers and divide by the count of the numbers. In mathematical terms this is known as the 'arithmetic mean', and doesn't always summarise a dataset ...
github_jupyter
``` import tensorflow as tf import numpy as np import matplotlib.pyplot as plt import seaborn as sns import pandas as pd from sklearn.preprocessing import MinMaxScaler import model from datetime import datetime from datetime import timedelta sns.set() df = pd.read_csv('/home/husein/space/Stock-Prediction-Comparison/dat...
github_jupyter
``` import pandas as pd import geopandas as gpd import matplotlib.pyplot as plt import numpy as np from shapely.geometry import Point from sklearn.neighbors import KNeighborsRegressor import rasterio as rst from rasterstats import zonal_stats %matplotlib inline path = r"[CHANGE THIS PATH]\Wales\\" data = pd.read_csv(p...
github_jupyter
``` import json import os import tqdm import pandas as pd ``` ## I. convert emails text (both training and testing) into appropriate jsonl file format ### 6088 entries in training set ( 2000+ machine generated, the rest are human-written) #### 4000+ are from email corpus, 2000+ are from gtp-2 generated and the ENRON ...
github_jupyter
# Overview This Jupyter Notebook takes in data from a Google Sheet that contains line change details and their associated high level categories and outputs a JSON file for the MyBus tool. The output file is used by the MyBus tool's results page and contains the Line-level changes that are displayed there. Run all ce...
github_jupyter
# Region Based Data Analysis The following notebook will go through prediction analysis for region based Multiple Particle Tracking (MPT) using OGD severity datasets for non-treated (NT) hippocampus, ganglia, thalamus, cortex, and striatum. ## Table of Contents [1. Load Data](#1.-load-data)<br /> [2. Analys...
github_jupyter
# Lab 3: Tables Welcome to lab 3! This week, we'll learn about *tables*, which let us work with multiple arrays of data about the same things. Tables are described in [Chapter 6](https://www.inferentialthinking.com/chapters/06/Tables) of the text. First, set up the tests and imports by running the cell below. ``` ...
github_jupyter
``` %matplotlib inline import arviz as az import matplotlib.pyplot as plt import numpy as np import pandas as pd import pymc as pm import scipy as sp import seaborn as sns sns.set(context='notebook', font_scale=1.2, rc={'figure.figsize': (12, 5)}) plt.style.use(['seaborn-colorblind', 'seaborn-darkgrid']) RANDOM_SEED...
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
``` import warnings warnings.filterwarnings('ignore') %matplotlib notebook import pandas as pd import numpy as np from util import * from sklearn.model_selection import train_test_split from sklearn import metrics from skater.core.global_interpretation.interpretable_models.brlc import BRLC from skater.core.global_inte...
github_jupyter
``` # This Python 3 environment comes with many helpful analytics libraries installed # It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python # For example, here's several helpful packages to load import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O...
github_jupyter
# ResNet-101 on CIFAR-10 ### Imports ``` import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torchvision import datasets from torchvision import transforms from torch.utils.data import DataLoader if torch.cuda.is_available(): torch.backends.cudnn.deterministic = True ``` #...
github_jupyter
``` import sys sys.path.append("..") # Adds higher directory to python modules path. from pathlib import Path import glob import numpy as np import tensorflow as tf import pickle import matplotlib.pyplot as plt import random import pickle import os import config import data import random from natsort import natsorted i...
github_jupyter
# Optimization of CNN - TPE In this notebook, we will optimize the hyperparameters of a CNN using the define-by-run model from Optuna. ``` # For reproducible results. # See: # https://keras.io/getting_started/faq/#how-can-i-obtain-reproducible-results-using-keras-during-development import os os.environ['PYTHONHASHS...
github_jupyter
# QCoDeS Example with Tektronix Keithley 7510 Multimeter In this example we will show how to use a few basic functions of the Keithley 7510 DMM. We attached the 1k Ohm resistor to the front terminals, with no source current or voltage. For more detail about the 7510 DMM, please see the User's Manual: https://www.tek....
github_jupyter
# Applying Customizations ``` import pandas as pd import numpy as np import holoviews as hv from holoviews import opts hv.extension('bokeh', 'matplotlib') ``` As introduced in the [Customization](../getting_started/2-Customization.ipynb) section of the 'Getting Started' guide, HoloViews maintains a strict separation ...
github_jupyter
# Reading outputs from E+ ``` # some initial set up # if you have not installed epp, and only downloaded it # you will need the following lines import sys # pathnameto_eppy = 'c:/eppy' pathnameto_eppy = '../' sys.path.append(pathnameto_eppy) ``` ## Using titletable() to get at the tables So far we have been making c...
github_jupyter
# Applying the Expected Context Framework to the Switchboard Corpus ### Using `DualContextWrapper` This notebook demonstrates how our implementation of the Expected Context Framework can be applied to the Switchboard dataset. See [this dissertation](https://tisjune.github.io/research/dissertation) for more details ab...
github_jupyter
``` #python packages pd import numpy as np import matplotlib.pyplot as plt #machine learning packages import tensorflow as tf import keras from keras.models import Sequential from keras.layers import Dense, Embedding, LSTM, SpatialDropout1D, Bidirectional, Dropout from keras.layers import CuDNNLSTM from keras.utils....
github_jupyter
# Underfitting and Overfitting demo using KNN ``` import pandas as pd import numpy as np import matplotlib.pyplot as plt %matplotlib inline data = pd.read_csv('data_knn_classification_cleaned_titanic.csv') data.head() x = data.drop(['Survived'], axis=1) y = data['Survived'] #Scaling the data from sklearn.preprocessin...
github_jupyter
# [ATM 623: Climate Modeling](../index.ipynb) [Brian E. J. Rose](http://www.atmos.albany.edu/facstaff/brose/index.html), University at Albany # Lecture 17: Ice albedo feedback in the EBM ### About these notes: This document uses the interactive [`IPython notebook`](http://ipython.org/notebook.html) format (now also c...
github_jupyter
# Neural networks with PyTorch Next I'll show you how to build a neural network with PyTorch. ``` # Import things like usual %matplotlib inline %config InlineBackend.figure_format = 'retina' import numpy as np import torch import helper import matplotlib.pyplot as plt from torchvision import datasets, transforms ...
github_jupyter
# Example: CanvasXpress boxplot Chart No. 11 This example page demonstrates how to, using the Python package, create a chart that matches the CanvasXpress online example located at: https://www.canvasxpress.org/examples/boxplot-11.html This example is generated using the reproducible JSON obtained from the above pag...
github_jupyter
# Partial Dependence Plot ## Summary Partial dependence plots visualize the dependence between the response and a set of target features (usually one or two), marginalizing over all the other features. For a perturbation-based interpretability method, it is relatively quick. PDP assumes independence between the featu...
github_jupyter
# A - Using TorchText with Your Own Datasets In this series we have used the IMDb dataset included as a dataset in TorchText. TorchText has many canonical datasets included for classification, language modelling, sequence tagging, etc. However, frequently you'll be wanting to use your own datasets. Luckily, TorchText ...
github_jupyter
## Data Analysis ``` import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt %matplotlib inline np.random.seed(1) # load data df = pd.read_csv('../input_data/heartdisease_data.csv',sep= ',') df[0:10] ``` The data contains 13 features:<br/> 0) age: Age (years) --> discrete <br/> 1...
github_jupyter
# Single Qubit Gates In the previous section we looked at all the possible states a qubit could be in. We saw that qubits could be represented by 2D vectors, and that their states are limited to the form: $$ |q\rangle = \cos{(\tfrac{\theta}{2})}|0\rangle + e^{i\phi}\sin{\tfrac{\theta}{2}}|1\rangle $$ Where $\theta$ ...
github_jupyter
``` from __future__ import absolute_import import sys import os try: from dotenv import find_dotenv, load_dotenv except: pass import argparse try: sys.path.append(os.path.join(os.path.dirname(__file__), '../src')) except: sys.path.append(os.path.join(os.getcwd(), '../src')) import pandas as pd ...
github_jupyter
# Amazon SageMaker Experiment Trials for Distirbuted Training of Mask-RCNN This notebook is a step-by-step tutorial on Amazon SageMaker Experiment Trials for distributed tranining of [Mask R-CNN](https://arxiv.org/abs/1703.06870) implemented in [TensorFlow](https://www.tensorflow.org/) framework. Concretely, we will...
github_jupyter
# Training on Multiple GPUs :label:`sec_multi_gpu` So far we discussed how to train models efficiently on CPUs and GPUs. We even showed how deep learning frameworks allow one to parallelize computation and communication automatically between them in :numref:`sec_auto_para`. We also showed in :numref:`sec_use_gpu` how ...
github_jupyter
``` # Copyright 2021 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
<a href="https://qworld.net" target="_blank" align="left"><img src="../qworld/images/header.jpg" align="left"></a> $ \newcommand{\bra}[1]{\langle #1|} $ $ \newcommand{\ket}[1]{|#1\rangle} $ $ \newcommand{\braket}[2]{\langle #1|#2\rangle} $ $ \newcommand{\dot}[2]{ #1 \cdot #2} $ $ \newcommand{\biginner}[2]{\left\langle...
github_jupyter
# Introduction to the Quantum Bit ### Where we'll explore: * **Quantum Superposition** * **Quantum Entanglement** * **Running experiments on a laptop-hosted simulator** * **Running experiments on a real quantum computer** ### Brandon Warren ### SDE, Zonar Systems github.com/brandonwarren/intro-to-qubit contains this J...
github_jupyter
1. Split into train and test data 2. Train model on train data normally 3. Take test data and duplicate into test prime 4. Drop first visit from test prime data 5. Get predicted delta from test prime data. Compare to delta from test data. We know the difference (epsilon) because we dropped actual visits. What percent ...
github_jupyter
``` import numpy as np import pandas as pd import xarray as xr import zarr import math import glob import pickle import statistics import scipy.stats as stats from sklearn.neighbors import KernelDensity import dask import seaborn as sns import matplotlib.pyplot as plt import cartopy.crs as ccrs def get_files(): mod...
github_jupyter
<a href="https://colab.research.google.com/github/gordicaleksa/get-started-with-JAX/blob/main/Tutorial_3_JAX_Neural_Network_from_Scratch_Colab.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # MLP training on MNIST ``` import numpy as np import jax...
github_jupyter
# Plots One of the most amazing feature of hist is it's powerful plotting family. Here you can see how to plot Hist. ``` from hist import Hist import hist h = Hist( hist.axis.Regular(50, -5, 5, name="S", label="s [units]", flow=False), hist.axis.Regular(50, -5, 5, name="W", label="w [units]", flow=False), ) i...
github_jupyter
# Hands-on Federated Learning: Image Classification In their recent (and exteremly thorough!) review of the federated learning literature [*Kairouz, et al (2019)*](https://arxiv.org/pdf/1912.04977.pdf) define federated learning as a machine learning setting where multiple entities (clients) collaborate in solving a ma...
github_jupyter
``` import pandas as pd from unidecode import unidecode import nltk from nltk.corpus import stopwords from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.feature_extraction.text import CountVectorizer nltk.download('stopwords') df = pd.read_csv('../base/review.csv',encoding='latin-1') df.head() im...
github_jupyter
## ๆœ€ๅฐไบŒไน˜ๆณ• ``` import numpy as np import matplotlib.pyplot as plt from scipy.optimize import leastsq Xi = np.array( [157, 162, 169, 176, 188, 200, 211, 220, 230, 237, 247, 256, 268, 287, 285, 290, 301, 311, 326, 335, 337, 345, 348, 358, 384, 396, 409, 415, 432, 440, 448, 449, 461, 467, 478, 493], dtype=np.floa...
github_jupyter
##### Copyright 2020 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 warnings warnings.filterwarnings('ignore') # ๅฎŸ่กŒใซๅฝฑ้Ÿฟใฎใชใ„ใ€€warninigใ€€ใ‚’้ž่กจ็คบใซใ—ใพใ™. ้žๆŽจๅฅจ. ``` # Chapter 5: ๆฉŸๆขฐๅญฆ็ฟ’ ๅ›žๅธฐๅ•้กŒ ## 5-1. ๅ›žๅธฐๅ•้กŒใ‚’ Pythonใง่งฃใ„ใฆใฟใ‚ˆใ† 1. ใƒ‡ใƒผใ‚ฟใ‚ปใƒƒใƒˆใฎ็”จๆ„ 2. ใƒขใƒ‡ใƒซๆง‹็ฏ‰ ### 5-1-1. ใƒ‡ใƒผใ‚ฟใ‚ปใƒƒใƒˆใฎ็”จๆ„ ไปŠๅ›žใฏwine-quality datasetใ‚’็”จใ„ใ‚‹. wine-quality dataset ใฏใƒฏใ‚คใƒณใฎใ‚ขใƒซใ‚ณใƒผใƒซๆฟƒๅบฆใ‚„ๅ“่ณชใชใฉใฎ12่ฆ็ด ใฎๆ•ฐๅ€คใƒ‡ใƒผใ‚ฟ. ่ตคใƒฏใ‚คใƒณใจ็™ฝใƒฏใ‚คใƒณไธกๆ–นใ‚ใ‚Šใพใ™ใ€‚่ตคใƒฏใ‚คใƒณใฎๅซใพใ‚Œใ‚‹ใƒ‡ใƒผใ‚ฟๆ•ฐใฏ1600ใปใฉ. ใพใšใฏใƒ‡...
github_jupyter
## Conditional Probability - Conditional probability has many applications, we learn it by mentioning its application in text analysis - Assume this small dataset is given: <img src="spam_ham_data_set.png" width="600" height="600"> ## Question: What is the probability that an email be spam? What is the probability ...
github_jupyter
# Chapter 12 - Principal Components Analysis with scikit-learn This notebook contains code accompanying Chapter 12 Principal Components Analysis with scikit-learn in *Practical Discrete Mathematics* by Ryan T. White and Archana Tikayat Ray. ## Eigenvalues and eigenvectors, orthogonal bases ### Example: Pizza nutriti...
github_jupyter
<a href="https://qworld.net" target="_blank" align="left"><img src="../qworld/images/header.jpg" align="left"></a> $ \newcommand{\bra}[1]{\langle #1|} $ $ \newcommand{\ket}[1]{|#1\rangle} $ $ \newcommand{\braket}[2]{\langle #1|#2\rangle} $ $ \newcommand{\dot}[2]{ #1 \cdot #2} $ $ \newcommand{\biginner}[2]{\left\langle...
github_jupyter
``` import numpy as np import torch use_cuda = torch.cuda.is_available() device = torch.device("cuda:0" if use_cuda else "cpu") device import torchvision from torchvision import models from torchvision import transforms import os import glob from PIL import Image from torch.utils.data import Dataset, DataLoader import...
github_jupyter
# Global Imports ``` %matplotlib inline import matplotlib.pyplot as plt from matplotlib.pyplot import subplots ``` ### External Package Imports ``` import os as os import pickle as pickle import pandas as pd ``` ### Module Imports Here I am using a few of my own packages, they are availible on Github under [__thea...
github_jupyter
# Advanced usage This notebook shows some more advanced features of `skorch`. More examples will be added with time. <table align="left"><td> <a target="_blank" href="https://colab.research.google.com/github/skorch-dev/skorch/blob/master/notebooks/Advanced_Usage.ipynb"> <img src="https://www.tensorflow.org/images...
github_jupyter
<a href="https://colab.research.google.com/github/lakshit2808/Machine-Learning-Notes/blob/master/ML_Models/Classification/KNearestNeighbor/KNN_first_try.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # K-Nearest Neighbor **K-Nearest Neighbors** is ...
github_jupyter
``` %matplotlib inline %config InlineBackend.figure_format = 'svg' import scqubits as scq import scqubits.legacy.sweep_plotting as splot from scqubits import HilbertSpace, InteractionTerm, ParameterSweep import numpy as np ``` .. note:: This describes a legacy version of the `HilbertSpace` class which is depreca...
github_jupyter
# RDD basics This notebook will introduce **three basic but essential Spark operations**. Two of them are the transformations map and filter. The other is the action collect. At the same time we will introduce the concept of persistence in Spark. ## Getting the data and creating the RDD We will use the reduced datas...
github_jupyter
#### Copyright IBM All Rights Reserved. #### SPDX-License-Identifier: Apache-2.0 # Db2 Sample For Scikit-Learn In this code sample, we will show how to use the Db2 Python driver to import data from our Db2 database. Then, we will use that data to create a machine learning model with scikit-learn. Many wine connoisse...
github_jupyter
# Taylor problem 3.23 last revised: 04-Jan-2020 by Dick Furnstahl [furnstahl.1@osu.edu] **This notebook is almost ready to go, except that the initial conditions and $\Delta v$ are different from the problem statement and there is no statement to print the figure. Fix these and you're done!** This is a conservatio...
github_jupyter
``` import os from pprint import pprint import torch import torch.nn as nn from transformers import BertForTokenClassification, BertTokenizer from transformers import AdamW from torch.utils.data import TensorDataset, DataLoader, RandomSampler, SequentialSampler from sklearn.model_selection import train_test_split impo...
github_jupyter
# Flux.pl The `Flux.pl` Perl script takes four input parameters: `Flux.pl [input file] [output file] [bin width (s)] [geometry base directory]` or, as invoked from the command line, `$ perl ./perl/Flux.pl [input file] [output file] [bin width (s)] [geometry directory]` ## Input Parameters * `[input file]` `Flux....
github_jupyter
# Character-level recurrent sequence-to-sequence model **Author:** [fchollet](https://twitter.com/fchollet)<br> **Date created:** 2017/09/29<br> **Last modified:** 2020/04/26<br> **Description:** Character-level recurrent sequence-to-sequence model. ## Introduction This example demonstrates how to implement a basic ...
github_jupyter
**Note**: There are multiple ways to solve these problems in SQL. Your solution may be quite different from mine and still be correct. **1**. Connect to the SQLite3 database at `data/faculty.db` in the `notebooks` folder using the `sqlite` package or `ipython-sql` magic functions. Inspect the `sql` creation statement ...
github_jupyter
# Frequent opiate prescriber ``` import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import preprocessors as pp sns.set(style="darkgrid") data = pd.read_csv('../data/prescriber-info.csv') data.head() ``` ## Variable Separation ``` uniq_cols = ['NPI'] cat_cols = list(data....
github_jupyter
# The Shared Library with GCC When your program is linked against a shared library, only a small table is created in the executable. Before the executable starts running, **the operating system loads the machine code needed for the external functions** - a process known as **dynamic linking.** * Dynamic linkin...
github_jupyter
# Searching the UniProt database and saving fastas: This notebook is really just to demonstrate how Andrew finds the sequences for the datasets. <br> If you do call it from within our github repository, you'll probably want to add the fastas to the `.gitignore` file. ``` # Import bioservices module, to run remote U...
github_jupyter
# Introduction In this post,we will talk about some of the most important papers that have been published over the last 5 years and discuss why theyโ€™re so important.We will go through different CNN Architectures (LeNet to DenseNet) showcasing the advancements in general network architecture that made these architectu...
github_jupyter
## Probalistic Confirmed COVID19 Cases- Denmark **Jorge: remember to reexecute the cell with the photo.** ### Table of contents [Initialization](#Initialization) [Data Importing and Processing](#Data-Importing-and-Processing) 1. [Kalman Filter Modeling: Case of Denmark Data](#1.-Kalman-Filter-Modeling:-Case-of-Denm...
github_jupyter
## Dependencies ``` import json, warnings, shutil, glob from jigsaw_utility_scripts import * from scripts_step_lr_schedulers import * from transformers import TFXLMRobertaModel, XLMRobertaConfig from tensorflow.keras.models import Model from tensorflow.keras import optimizers, metrics, losses, layers SEED = 0 seed_ev...
github_jupyter
``` import pandas as pd import numpy as np import matplotlib as plt from shapely.geometry import Point, Polygon from sklearn.linear_model import LogisticRegression from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import KFold import zipfile import requests import os import shutil ...
github_jupyter
# Advanced RNNs <img src="https://raw.githubusercontent.com/GokuMohandas/practicalAI/master/images/logo.png" width=150> In this notebook we're going to cover some advanced topics related to RNNs. 1. Conditioned hidden state 2. Char-level embeddings 3. Encoder and decoder 4. Attentional mechanisms 5. Implementation ...
github_jupyter
<a href="https://colab.research.google.com/github/NeuromatchAcademy/course-content/blob/master/tutorials/W1D5_DimensionalityReduction/student/W1D5_Tutorial3.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Neuromatch Academy: Week 1, Day 5, Tutoria...
github_jupyter
**Instructions:** 1. **For all questions after 10th, Please only use the data specified in the note given just below the question** 2. **You need to add answers in the same file i.e. PDS_UberDriveProject_Questions.ipynb' and rename that file as 'Name_Date.ipynb'.You can mention the date on which you will be uploading...
github_jupyter
# Robust Scaler - Experimento Este รฉ um componante que dimensiona atributos usando estatรญsticas robustas para outliers. Este Scaler remove a mediana e dimensiona os dados de acordo com o intervalo quantil (o padrรฃo รฉ Amplitude interquartil). Amplitude interquartil รฉ o intervalo entre o 1ยบ quartil (25ยบ quantil) e o 3ยบ ...
github_jupyter
<a href="https://colab.research.google.com/github/ralsouza/python_fundamentos/blob/master/src/05_desafio/05_missao05.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ## **Missรฃo: Analisar o Comportamento de Compra de Consumidores.** ### Nรญvel de Difi...
github_jupyter
# Criminology in Portugal (2011) ## Introduction > In this _study case_, it will be analysed the **_crimes occurred_** in **_Portugal_**, during the civil year of **_2011_**. It will analysed all the _categories_ or _natures_ of this **_crimes_**, _building some statistics and making some filtering of data related to...
github_jupyter
##### Copyright 2021 The Cirq Developers ``` #@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 agre...
github_jupyter
<a href="https://colab.research.google.com/github/Shubham0Rajput/Feature-Detection-with-AKAZE/blob/master/AKAZE_code.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` #IMPORT FILES import matplotlib.pyplot as plt import cv2 #matplotlib inline #MO...
github_jupyter
# Entities Recognition <div class="alert alert-info"> This tutorial is available as an IPython notebook at [Malaya/example/entities](https://github.com/huseinzol05/Malaya/tree/master/example/entities). </div> <div class="alert alert-warning"> This module only trained on standard language structure, so it is no...
github_jupyter
# Shallow regression for vector data This script reads zip code data produced by **vectorDataPreparations** and creates different machine learning models for predicting the average zip code income from population and spatial variables. It assesses the model accuracy with a test dataset but also predicts the number to...
github_jupyter
# RNN Sentiment Classifier In this notebook, we use an RNN to classify IMDB movie reviews by their sentiment. [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/the-deep-learners/deep-learning-illustrated/blob/master/notebooks/rnn_sentiment_classifier...
github_jupyter
# Intro to Jupyter Notebooks ### `Jupyter` is a project for developing open-source software ### `Jupyter Notebooks` is a `web` application to create scripts ### `Jupyter Lab` is the new generation of web user interface for Jypyter ### But it is more than that #### It lets you insert and save text, equations & visuali...
github_jupyter
# Introduction to geospatial vector data in Python ``` %matplotlib inline import pandas as pd import geopandas pd.options.display.max_rows = 10 ``` ## Importing geospatial data Geospatial data is often available from specific GIS file formats or data stores, like ESRI shapefiles, GeoJSON files, geopackage files, P...
github_jupyter
## Computer Vision Learner [`vision.learner`](/vision.learner.html#vision.learner) is the module that defines the [`cnn_learner`](/vision.learner.html#cnn_learner) method, to easily get a model suitable for transfer learning. ``` from fastai.gen_doc.nbdoc import * from fastai.vision import * ``` ## Transfer learning...
github_jupyter
# Trax : Ungraded Lecture Notebook In this notebook you'll get to know about the Trax framework and learn about some of its basic building blocks. ## Background ### Why Trax and not TensorFlow or PyTorch? TensorFlow and PyTorch are both extensive frameworks that can do almost anything in deep learning. They offer a...
github_jupyter
<h1>Data Exploration</h1> <p>In this notebook we will perform a broad data exploration on the <code>Hitters</code> data set. Note that the aim of this exploration is not to be completely thorough; instead we would like to gain quick insights to help develop a first prototype. Upon analyzing the output of the prototype,...
github_jupyter
<a href="https://colab.research.google.com/github/choderalab/pinot/blob/master/scripts/adlala_mol_graph.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # import ``` ! rm -rf pinot ! git clone https://github.com/choderalab/pinot.git ! pip install dg...
github_jupyter
# Data Loading Tutorial ``` cd ../.. save_path = 'data/' from scvi.dataset import LoomDataset, CsvDataset, Dataset10X, AnnDataset import urllib.request import os from scvi.dataset import BrainLargeDataset, CortexDataset, PbmcDataset, RetinaDataset, HematoDataset, CbmcDataset, BrainSmallDataset, SmfishDataset ``` ## G...
github_jupyter
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-59152712-8"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-59152712-8'); </script> # Indexed Expressions: Representing and manipulating tensor...
github_jupyter
``` %matplotlib inline # Importing standard Qiskit libraries and configuring account from qiskit import QuantumCircuit, execute, Aer, IBMQ from qiskit.compiler import transpile, assemble from qiskit.tools.jupyter import * from qiskit.visualization import * # Loading your IBM Q account(s) provider = IBMQ.load_account() ...
github_jupyter
``` import wget, json, os, math from pathlib import Path from string import capwords from pybtex.database import parse_string import pybtex.errors from mpcontribs.client import Client from bravado.exception import HTTPNotFound from pymatgen.core import Structure from pymatgen.ext.matproj import MPRester from tqdm.noteb...
github_jupyter
# DeepDreaming with TensorFlow >[Loading and displaying the model graph](#loading) >[Naive feature visualization](#naive) >[Multiscale image generation](#multiscale) >[Laplacian Pyramid Gradient Normalization](#laplacian) >[Playing with feature visualzations](#playing) >[DeepDream](#deepdream) This notebook demo...
github_jupyter
``` # reload packages %load_ext autoreload %autoreload 2 ``` ### Choose GPU ``` %env CUDA_DEVICE_ORDER=PCI_BUS_ID %env CUDA_VISIBLE_DEVICES=3 import tensorflow as tf gpu_devices = tf.config.experimental.list_physical_devices('GPU') if len(gpu_devices)>0: tf.config.experimental.set_memory_growth(gpu_devices[0], Tr...
github_jupyter
``` import sys sys.path.append('../scripts/') from robot import * from scipy.stats import multivariate_normal import random #่ฟฝๅŠ  import copy class Particle: def __init__(self, init_pose, weight): self.pose = init_pose self.weight = weight def motion_update(self, nu, omega, time, noise_...
github_jupyter