text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
## Libraries
```
import pandas as pd
import numpy as np
import scipy.stats as stat
from math import sqrt
from mlgear.utils import show, display_columns
from surveyweights import normalize_weights, run_weighting_iteration
def margin_of_error(n=None, sd=None, p=None, type='proportion', interval_size=0.95):
z_look... | github_jupyter |
# Live Twitter Sentiments for Cryptocurrencies
Plot the evolution in time of the tweets sentiment for a cryptocurrency. We will use the *tweepy*'s streaming to see the live evolution of the Twitter sentiments for the cryptocurrencies.
* *Inputs*: currency keywords to seach in Twitter, number of tweets to analyse the ... | github_jupyter |
### AD470 - Module 7 Introduction to Deep LearningProgramming Assignment
#### Andrew Boyer
#### Brandan Owens
```
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import scipy.io
from sklearn.preprocessing import StandardScaler
import tensorflow
from tensorflow import keras... | github_jupyter |
```
#IMPORT SEMUA LIBARARY
#IMPORT LIBRARY PANDAS
import pandas as pd
#IMPORT LIBRARY UNTUK POSTGRE
from sqlalchemy import create_engine
import psycopg2
#IMPORT LIBRARY CHART
from matplotlib import pyplot as plt
from matplotlib import style
#IMPORT LIBRARY BASE PATH
import os
import io
#IMPORT LIBARARY PDF
from fpdf im... | github_jupyter |
# Jupyter UX Survey 2015 - Initial Sandbox
* Goal: Start looking at how we can surface insights from the data.
* Description: https://github.com/jupyter/surveys/tree/master/surveys/2015-12-notebook-ux
* Data: https://raw.githubusercontent.com/jupyter/surveys/master/surveys/2015-12-notebook-ux/20160115235816-SurveyExpo... | github_jupyter |
<a href="https://colab.research.google.com/github/Nadda1004/Intro_Machine_learning/blob/main/W1_D1_ML_HeuristicModel.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Predicting Rain in Seattle
Seattle is one of the rainiest places in the world. Ev... | github_jupyter |
## UCI SMS Spam Collection Dataset
* **Input**: sms textual content. **Target**: ham or spam
* **data representation**: each sms is repesented with a **fixed-length vector of word indexes**. A word index lookup is generated from the vocabulary list.
* **words embedding**: A word embedding (dense vector) is learnt for ... | github_jupyter |
# $\lambda$对CMA性能影响研究
<link rel="stylesheet" href="http://yandex.st/highlightjs/6.2/styles/googlecode.min.css">
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script src="http://yandex.st/highlightjs/6.2/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script type="... | github_jupyter |
# Graphing network packets
This notebook currently relies on HoloViews 1.9 or above. Run `conda install -c ioam/label/dev holoviews` to install it.
## Preparing data
The data source comes from a publicly available network forensics repository: http://www.netresec.com/?page=PcapFiles. The selected file is https://dow... | github_jupyter |
```
# Copyright 2021 Google LLC
# Use of this source code is governed by an MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.
# Notebook authors: Kevin P. Murphy (murphyk@gmail.com)
# and Mahmoud Soliman (mjs@aucegypt.edu)
# This notebook reproduces figures for chap... | github_jupyter |
**Introduction to Python**<br/>
Prof. Dr. Jan Kirenz <br/>
Hochschule der Medien Stuttgart
<h1>Table of Contents<span class="tocSkip"></span></h1>
<div class="toc"><ul class="toc-item"><li><span><a href="#Import-data" data-toc-modified-id="Import-data-1"><span class="toc-item-num">1 </span>Import data</a></... | github_jupyter |
## Series
```
import pandas as pd
import numpy as np
import random
first_series = pd.Series([1,2,3, np.nan ,"hello"])
first_series
series = pd.Series([1,2,3, np.nan ,"hello"], index = ['A','B','C','Unknown','String'])
series
#indexing the Series with custom values
dict = {"Python": "Fun", "C++": "Outdated","Coding":"H... | github_jupyter |
# [Module 2.2] 세이지 메이커 인퍼런스
본 워크샵의 모든 노트북은 `conda_python3` 추가 패키지를 설치하고 모두 이 커널 에서 작업 합니다.
- 1. 배포 준비
- 2. 로컬 앤드포인트 생성
- 3. 로컬 추론
---
이전 노트북에서 인퍼런스 테스트를 완료한 티펙트를 가져옵니다.
```
%store -r artifact_path
```
# 1. 배포 준비
```
print("artifact_path: ", artifact_path)
import sagemaker
sagemaker_session = sagemaker.Session... | github_jupyter |
```
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from plotnine import *
```
Leitura e visualização dos dados:
```
#carregar os dados no dataframe
df = pd.read_csv('movie_metadata.csv')
df.head()
df.shape
df.dtypes
list(df.columns)
```
Análise Exploratória
```
df['color'].value_counts()
... | github_jupyter |
# 使用PyNative进行神经网络的训练调试体验
[](https://gitee.com/mindspore/docs/blob/master/docs/notebook/mindspore_debugging_in_pynative_mode.ipynb)
## 概述
在神经网络训练过程中,数据是否按照自己设计的神经网络运行,是使用者非常关心的事情,如何去查看数据是怎样经过神经网络,并产生变化的呢?这时候需要AI框架提供一个功能,方便使用者将计算图中的... | github_jupyter |
<a href="https://colab.research.google.com/github/RachitBansal/AppliancePower_TimeSeries/blob/master/ARIMA_Ukdale.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
from google.colab import drive
drive.mount('/content/drive',force_remount=True)
fro... | github_jupyter |
```
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed und... | github_jupyter |
```
import numpy as np
import sklearn
import os
import pandas as pd
import scipy
from sklearn.linear_model import LinearRegression
import sklearn
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
import torch.nn.functional as F
import random
from torchvision import datasets, transforms
import copy
#!pi... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
import warnings
warnings.filterwarnings('ignore')
```
## Introduction
```
from IPython.display import YouTubeVideo
YouTubeVideo(id="BYOK12I9vgI", width="100%")
```
In this chapter, we will look at bipartite grap... | github_jupyter |
# Predict Model
The aim of this notebook is to assess how well our [logistic regression classifier](../models/LR.csv) generalizes to unseen data. We will accomplish this by using the Matthew's Correlation Coefficient (MCC) to evaluate it's predictive performance on the test set. Following this, we will determine which... | github_jupyter |
```
from kbc_pul.project_info import project_dir as kbc_e_metrics_project_dir
import os
from typing import List, Dict, Set, Optional
import numpy as np
import pandas as pd
from artificial_bias_experiments.evaluation.confidence_comparison.df_utils import ColumnNamesInfo
from artificial_bias_experiments.known_prop_sc... | github_jupyter |
```
# %gui qt
import numpy as np
import mne
import pickle
import sys
import os
# import matplotlib
from multiprocessing import Pool
from tqdm import tqdm
import matplotlib.pyplot as plt
# import vispy
# print(vispy.sys_info())
# BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# sys.path.append(B... | github_jupyter |
# Hyperparameter Optimization [xgboost](https://github.com/dmlc/xgboost)
What the options there're for tuning?
* [GridSearch](http://scikit-learn.org/stable/modules/grid_search.html)
* [RandomizedSearch](http://scikit-learn.org/stable/modules/generated/sklearn.grid_search.RandomizedSearchCV.html)
All right!
Xgboost h... | github_jupyter |
##### Copyright 2020 The TensorFlow Hub 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... | github_jupyter |
# Open, Re-usable Deep Learning Components on the Web
## Learning objectives
- Use [ImJoy](https://imjoy.io/#/) web-based imaging components
- Create a JavaScript-based ImJoy plugin
- Create a Python-based ImJoy plugin
*See also:* the [I2K 2020 Tutorial: ImJoying Interactive Bioimage Analysis
with Deep Learning, Im... | github_jupyter |
# Autonomous driving - Car detection
Welcome to your week 3 programming assignment. You will learn about object detection using the very powerful YOLO model. Many of the ideas in this notebook are described in the two YOLO papers: Redmon et al., 2016 (https://arxiv.org/abs/1506.02640) and Redmon and Farhadi, 2016 (htt... | github_jupyter |
<a href="https://colab.research.google.com/github/Aditya-Singla/Banknote-Authentication/blob/master/Banknote_authentication.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
**Importing the libraries**
```
import pandas as pd
import numpy as np
```
... | github_jupyter |
# A Char-RNN Implementation in Tensorflow
*This notebook is slightly modified from https://colab.research.google.com/drive/13Vr3PrDg7cc4OZ3W2-grLSVSf0RJYWzb, with the following changes:*
* Main parameters defined at the start instead of middle
* Run all works, because of the added upload_custom_data parameter
* Traini... | 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 |
(tune-mnist-keras)=
# Using Keras & TensorFlow with Tune
```{image} /images/tf_keras_logo.jpeg
:align: center
:alt: Keras & TensorFlow Logo
:height: 120px
:target: https://keras.io
```
```{contents}
:backlinks: none
:local: true
```
## Example
```
import argparse
import os
from filelock import FileLock
from tenso... | github_jupyter |
#### Implementation of Distributional paper for 1-dimensional games, such as Cartpole.
- https://arxiv.org/abs/1707.06887
<br>
Please note: The 2 dimensional image state requires a lot of memory capacity (~50GB) due to the buffer size of 1,000,000 as in DQN paper.
So, one might want to train an a... | github_jupyter |
# RadarCOVID-Report
## Data Extraction
```
import datetime
import logging
import os
import shutil
import tempfile
import textwrap
import uuid
import dataframe_image as dfi
import matplotlib.ticker
import numpy as np
import pandas as pd
import seaborn as sns
%matplotlib inline
sns.set()
matplotlib.rcParams['figure.f... | github_jupyter |
```
import tensorflow as tf
from tensorflow.keras.preprocessing.image import load_img, img_to_array
from tensorflow.keras.models import Sequential, load_model
from tensorflow.keras.layers import Dense, Flatten, Conv2D, MaxPooling2D
from tensorflow.keras.callbacks import ModelCheckpoint, EarlyStopping
import os
import n... | github_jupyter |
<img align="right" src="images/tf-small.png" width="128"/>
<img align="right" src="images/phblogo.png" width="128"/>
<img align="right" src="images/dans.png"/>
---
Start with [convert](https://nbviewer.jupyter.org/github/annotation/banks/blob/master/programs/convert.ipynb)
---
# Getting data from online repos
We sh... | github_jupyter |
# Text Mining DocSouth Slave Narrative Archive
---
*Note:* This is the first in [a series of documents and notebooks](https://jeddobson.github.io/textmining-docsouth/) that will document and evaluate various machine learning and text mining tools for use in literary studies. These notebooks form the practical and crit... | github_jupyter |
## 1. The NIST Special Publication 800-63B
<p>If you – 50 years ago – needed to come up with a secret password you were probably part of a secret espionage organization or (more likely) you were pretending to be a spy when playing as a kid. Today, many of us are forced to come up with new passwords <em>all the time</em... | 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 |
```
from torchvision import transforms
from torch.utils.data import Dataset, DataLoader
import torch
from torch import optim
from torch.autograd import Variable
import numpy as np
import os
import math
from torch import nn
from sklearn.metrics import confusion_matrix
import matplotlib.pyplot as plt
import itertools
i... | 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 |
# Simple Use Cases
Simulus is a discrete-event simulator in Python. This document is to demonstrate how to run simulus via a few examples. This is not a tutorial. For that, use [Simulus Tutorial](simulus-tutorial.ipynb). All the examples shown in this guide can be found under the `examples/demos` directory in the simu... | 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 |
```
%matplotlib inline
import adaptive
import matplotlib.pyplot as plt
import pycqed as pq
import numpy as np
from pycqed.measurement import measurement_control
import pycqed.measurement.detector_functions as det
from qcodes import station
station = station.Station()
```
## Setting up the mock device
Measurements are... | github_jupyter |
```
import numpy as np
import pandas as pd
import time
import psutil
import matplotlib.pyplot as plt
import numpy as np
# We create a very simple data set with 5 data items in it.
size= 5
# mu, sigma = 100, 5000 # mean and standard deviation
# error=np.random.normal(mu, sigma, size)
x1 = np.arange(0, size)
# x2 = n... | github_jupyter |
## Purpose: Get the stats for pitching per year (1876-2019).
```
# import dependencies.
import time
import pandas as pd
from splinter import Browser
from bs4 import BeautifulSoup as bs
!which chromedriver
# set up driver.
executable_path = {"executable_path": "/usr/local/bin/chromedriver"}
browser = Browser("chrome", ... | github_jupyter |
<div class="alert alert-block alert-info">
<font size="6"><b><center> Section 2</font></center>
<br>
<font size="6"><b><center> Fully-Connected, Feed-Forward Neural Network Examples </font></center>
</div>
# Example 1: A feedforward network with one hidden layer using torch.nn and simulated data
In developing (and tr... | github_jupyter |
# Exploring datastructures for dataset
A Pandas exploration. Find the best datastructure to explore and transform the dataset (both training and test dataframes). Use case:
- find all numerical features (filtering)
- transform all numerical features (e.g. take square)
- replace NaN values for a numerical feature
- plot... | github_jupyter |
## 10.4 딥러닝 기반 Q-Learning을 이용하는 강화학습
- 관련 패키지 불러오기
```
# 기본 패키지
import numpy as np
import random
from collections import deque
import matplotlib.pyplot as plt
# 강화학습 환경 패키지
import gym
# 인공지능 패키지: 텐서플로, 케라스
# 호환성을 위해 텐스플로에 포함된 케라스를 불러옴
import tensorflow as tf # v2.4.1 at 7/25/2021
from tensorflow import keras # v2.4... | github_jupyter |
# **Swin Transformer: Hierarchical Vision Transformer using Shifted Windows**
**Swin Transformer (ICCV 2021 best paper award (Marr Prize))**
**Authors {v-zeliu1,v-yutlin,yuecao,hanhu,v-yixwe,zhez,stevelin,bainguo}@microsoft.com**
**Official Github**: https://github.com/microsoft/Swin-Transformer
---
**Edited By Su... | github_jupyter |
```
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '2'
import pickle
import numpy as np
import pandas as pd
import skimage.io as io
import matplotlib.pyplot as plt
%matplotlib inline
import tensorflow as tf
import keras
from keras.applications import ResNet50
from keras.applications.resnet50 import preprocess_input
fr... | github_jupyter |
```
import os
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = '/home/husein/t5/prepare/mesolitica-tpu.json'
os.environ['CUDA_VISIBLE_DEVICES'] = ''
from bigbird import modeling
from bigbird import utils
import tensorflow as tf
import numpy as np
import sentencepiece as spm
vocab = '/home/husein/b2b/sp10m.cased.t5.mode... | github_jupyter |
# Objective
Import the FAF freight matrices provided with FAF into AequilibraE's matrix format
## Input data
* FAF: https://faf.ornl.gov/fafweb/
* Matrices: https://faf.ornl.gov/fafweb/Data/FAF4.4_HiLoForecasts.zip
* Zones System: http://www.census.gov/econ/cfs/AboutGeographyFiles/CFS_AREA_shapefile_010215.zip
* FAF ... | github_jupyter |
```
%matplotlib widget
import os
import sys
sys.path.insert(0, os.getenv('HOME')+'/pycode/MscThesis/')
import pandas as pd
from amftrack.util import get_dates_datetime, get_dirname, get_plate_number, get_postion_number,get_begin_index
import ast
from amftrack.plotutil import plot_t_tp1
from scipy import sparse
fro... | github_jupyter |
# Data Labelling Analysis (DLA) Dataset C
```
#import libraries
import warnings
warnings.filterwarnings("ignore")
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
import os
print('Libraries imported!!')
#define directory of functions and actual directory
HOME_PATH = '' #home path of the proj... | github_jupyter |
# Validation
This notebook contains examples of some of the simulations that have been used to validate Disimpy's functionality by comparing the simulated signals to analytical solutions and signals generated by other simulators. Here, we simulate free diffusion and restricted diffusion inside cylinders and spheres.
... | github_jupyter |
## Dependencies
```
import json, warnings, shutil
from jigsaw_utility_scripts import *
from transformers import TFXLMRobertaModel, XLMRobertaConfig
from tensorflow.keras.models import Model
from tensorflow.keras import optimizers, metrics, losses, layers
from tensorflow.keras.callbacks import EarlyStopping, ModelCheck... | github_jupyter |
```
from __future__ import division, print_function
import os
import sys
from collections import OrderedDict
# Third-party
import astropy.coordinates as coord
import astropy.units as u
import matplotlib as mpl
import matplotlib.pyplot as pl
import numpy as np
pl.style.use('apw-notebook')
%matplotlib inline
# Custom
i... | github_jupyter |
## Basic core
This module contains all the basic functions we need in other modules of the fastai library (split with [`torch_core`](/torch_core.html#torch_core) that contains the ones requiring pytorch). Its documentation can easily be skipped at a first read, unless you want to know what a given function does.
```
... | github_jupyter |
<a href="https://colab.research.google.com/github/denikn/Machine-Learning-MIT-Assignment/blob/main/Week%2002%20-%20Perceptrons/Week02_Homework_02.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
#MIT 6.036 Spring 2019: Homework 2#
This colab noteboo... | github_jupyter |
```
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
```
## PIN computation
To compute the PIN of a given day, we need to optimize the product of the likelihood computed on each time interval in the day.
In particular we fix a time interval of 5 minutes to discretize time, and since we are deali... | github_jupyter |
```
import cartopy.crs as ccrs
import xarray as xr
import matplotlib.pyplot as plt
import numpy as np
from itertools import product
import pandas as pd
import os
import time
from datetime import timedelta
import rasterio.warp as rasteriowarp
SATELLITE_DATA_PATH = os.path.expanduser('~/data/EUMETSAT/reprojected_subsette... | github_jupyter |
# Stochastic Volatility model
## Imports & Settings
```
import warnings
warnings.filterwarnings('ignore')
%matplotlib inline
from pathlib import Path
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter
import seaborn as sns
import pymc3 as pm
from pym... | github_jupyter |
<h1>Table of Contents<span class="tocSkip"></span></h1>
<div class="toc"><ul class="toc-item"><li><span><a href="#Explainability-with-Amazon-SageMaker-Debugger" data-toc-modified-id="Explainability-with-Amazon-SageMaker-Debugger-1">Explainability with Amazon SageMaker Debugger</a></span><ul class="toc-item"><li><span><... | github_jupyter |
# Метод сопряжённых градиентов (Conjugate gradient method): гадкий утёнок
## На прошлом занятии...
1. Методы спуска
2. Направление убывания
3. Градиентный метод
4. Правила выбора шага
5. Теоремы сходимости
6. Эксперименты
## Система линейных уравнений vs. задача безусловной минимизации
Рассмотрим задачу
$$
\min_{x ... | github_jupyter |
# Reading Data
## Connect to store (using sina local file)
First let's create an empty database with you as a single user
In a real application only admin user should have write permission to the file
```
import os
import sys
import shlex
from subprocess import Popen, PIPE
import kosh
kosh_example_sql_file = "kosh... | github_jupyter |
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.datasets import fetch_openml
data = fetch_openml(data_id=1590, as_frame=True)
X = pd.get_dummies(data.data)
y_true = (data.target == '>50K') * 1
sex = data.data[['sex', 'race']]
sex.value_counts()
from fairlearn.metrics import group... | github_jupyter |
#### New to Plotly?
Plotly's Python library is free and open source! [Get started](https://plotly.com/python/getting-started/) by downloading the client and [reading the primer](https://plotly.com/python/getting-started/).
<br>You can set up Plotly to work in [online](https://plotly.com/python/getting-started/#initiali... | github_jupyter |
# **PARAMETER FITTING DETAILED EXAMPLE**
This provides a detailed example of parameter fitting using the python-based tool ``SBstoat``.
Details about the tool can be found at in this [github repository](https://github.com/sys-bio/SBstoat).
# Preliminaries
```
IS_COLAB = True
if IS_COLAB:
!pip install -q SBstoat... | github_jupyter |
```
"""
Script of petro-inversion of gravity over TKC
Notes:
This version of the script uses data with less noises
but still invert with a higher assumed noise level.
This is equivalent to increase the chi-factor.
This has been needed in order to fit both geophysical
and petrophysical data set.
"""
# Script of petro... | github_jupyter |
<a href="https://colab.research.google.com/github/mrdbourke/tensorflow-deep-learning/blob/main/07_food_vision_milestone_project_1.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# 07. Milestone Project 1: 🍔👁 Food Vision Big™
In the previous noteb... | github_jupyter |
# CPSC 330 hw7
```
import numpy as np
import pandas as pd
### BEGIN SOLUTION
from sklearn.impute import SimpleImputer
from sklearn.compose import ColumnTransformer
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler, OrdinalEncoder, OneHotEncoder
from sklearn.linear_model import Rid... | github_jupyter |
# Candlestick Hanging Man
https://www.investopedia.com/articles/active-trading/040914/understanding-hanging-man-optimistic-candlestick-pattern.asp
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import talib
import warnings
warnings.filterwarnings("ignore")
# yahoo finance is used to fetc... | github_jupyter |
# Clonamos el repositorio para obtener los dataSet
```
!git clone https://github.com/joanby/ia-course.git
```
# Damos acceso a nuestro Drive
```
from google.colab import drive
drive.mount('/content/drive')
```
# Test it
```
!ls '/content/drive/My Drive'
```
#Google colab tools
```
from google.colab import files ... | github_jupyter |
# Inferential Statistics III - Bayesian
## Introduction
In the last two subunits, you've encountered two schools for performing inference from samples. The Frequentist school calls upon a body of theory established over the past couple of centuries or so. Under certain assumptions and conditions, this allows us to ca... | github_jupyter |
# Gated PixelCNN receptive fields
Hi everybody!
In this notebook, we will analyse the Gated PixelCNN's block receptive field. Diferent of the original PixelCNN, we expect that the blocks of the Gated PixelCNN do not create blind spots that limit the information flow of the previous pixel in order to model the density ... | github_jupyter |
<img src='https://certificate.tpq.io/quantsdev_banner_color.png' width="250px" align="right">
# Reinforcement Learning
© Dr Yves J Hilpisch | The Python Quants GmbH
[quants@dev Discord Server](https://discord.gg/uJPtp9Awaj) | [@quants_dev](https://twitter.com/quants_dev) | <a href="mailto:qd@tpq.io">qd@tpq.io</... | github_jupyter |
# The importance of constraints
Constraints determine which potential adversarial examples are valid inputs to the model. When determining the efficacy of an attack, constraints are everything. After all, an attack that looks very powerful may just be generating nonsense. Or, perhaps more nefariously, an attack may ge... | github_jupyter |
```
import os
import glob
import pandas as pd
import numpy as np
from tqdm import tqdm
import pickle
from copy import copy
sources_with_data_text = os.path.join('data', 'sources_with_data.txt')
with open (sources_with_data_text, mode='r') as f:
lines = f.readlines()
#check we closed the file
assert f.closed
... | 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>
# `GiRaFFE_NRPy`: Main Driver
## Author: Patrick Nelson
<... | github_jupyter |
```
# Visualization of the KO Gold Standard from:
# Miraldi et al. (2018) "Leveraging chromatin accessibility data for transcriptional regulatory network inference in Th17 Cells"
# TO START: In the menu above, choose "Cell" --> "Run All", and network + heatmap will load
# NOTE: Default limits networks to TF-TF edges i... | github_jupyter |
# SMIB system as in Milano's book example 8.1
```
%matplotlib widget
import numpy as np
import matplotlib.pyplot as plt
import scipy.optimize as sopt
import ipywidgets
from pydae import ssa
import json
```
## Import system module
```
from smib_milano_ex8p1_4ord_avr import smib_milano_ex8p1_4ord_avr_class
```
## Ins... | github_jupyter |
# Week 2 - Data handling
The Python modules `pandas` and `numpy` are useful libraries to handle datasets and apply basic operations on them.
Some of the things we learnt in week 1 using native Python (e.g. accessing, working with and writing data files, and performing operations on them) can be easily achieved using... | github_jupyter |
```
import numpy as np
import pandas as pd
import os
import matplotlib.pyplot as plt
from fastai.vision import *
import torch
#from mrnet_orig import *
from mrnet_itemlist import *
#from ipywidgets import interact, Dropdown, IntSlider
%matplotlib notebook
plt.style.use('grayscale')
# run tree on my data to see its ... | github_jupyter |
Sascha Spors,
Professorship Signal Theory and Digital Signal Processing,
Institute of Communications Engineering (INT),
Faculty of Computer Science and Electrical Engineering (IEF),
University of Rostock, Germany
# Tutorial Digital Signal Processing
**Correlation**,
Winter Semester 2021/22 (Course #24505)
- lecture:... | github_jupyter |

<h2 align='center'>Data Literacy through Sports Analytics</h2>
<h3 align='center'>Southern Alberta Teachers' Convention 2021</h3>
<h3 align='center'>Tina Leard (Cybera)<br>
Michael Lamoureux ... | github_jupyter |
# Prepare Superresolution Training Data with eo-learn
There are many examples and resources for training superresolution networks on (satellite) imagery:
- [MDL4EO](https://mdl4eo.irstea.fr/2019/03/29/enhancement-of-sentinel-2-images-at-1-5m/)
- [ElementAI HighRes-Net](https://github.com/ElementAI/HighRes-net)
- [Fast... | github_jupyter |
**Chapter 6 – Decision Trees**
_This notebook contains all the sample code and solutions to the exercises in chapter 6._
<table align="left">
<td>
<a target="_blank" href="https://colab.research.google.com/github/ageron/handson-ml/blob/master/06_decision_trees.ipynb"><img src="https://www.tensorflow.org/images/... | github_jupyter |
# Train DynUNet on Decathlon datasets
This tutorial shows how to train 3D segmentation tasks on all the 10 decathlon datasets with `DynUNet`.
Refer to papers:
`Automated Design of Deep Learning Methods for Biomedical Image Segmentation <https://arxiv.org/abs/1904.08128>`
`nnU-Net: Self-adapting Framework for U-Net-B... | github_jupyter |
##### Function "print" for prints the specified message to the screen, or other standard output device
```
print(5+5)
print("Hello World")
print(TRUE)
----------------------
```
##### R is case sensitive
```
print("Me")
#Not same with
print("ME")
print("01")
#Not same with
print("1")
----------------------
```
###... | github_jupyter |
##### Copyright 2019 The TensorFlow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
```
#@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.o... | github_jupyter |
# Managing Throwing and Catching and Exceptions
In this workbook, we're going to work with a sample that describes a cashier's till at a store. We'll look at what happens when the cashier makes change for orders, the exceptions thrown and the danger they create.
First, let's describe the `Till` class
```
public cla... | github_jupyter |
# Consume deployed webservice via REST
Demonstrates the usage of a deployed model via plain REST.
REST is language-agnostic, so you should be able to query from any REST-capable programming language.
## Configuration
```
from environs import Env
env = Env(expand_vars=True)
env.read_env("foundation.env")
env.read_... | github_jupyter |
# Calculate China-Z Index (CZI) with Python
China Z-Index (CZI) is extensively used by National Climate Centre (NCC) of China to monitor drought conditions throughout
the country (Wu et al., 2001; Dogan et al., 2012). CZI assumes that precipitation data follow the Pearson Type III distribution and is related to Wilson... | github_jupyter |
```
import os
import sys
sys.path.append(f'{os.environ["HOME"]}/Projects/planckClusters/catalogs')
from load_catalogs import load_PSZcatalog
from tqdm import tqdm_notebook
data = load_PSZcatalog()
PS1_dir = f'{os.environ["HOME"]}/Projects/planckClusters/data/extern/PS1'
SDSS_dir = f'{os.environ["HOME"]}/Projects/planc... | github_jupyter |
# Keras mnist LeNet-5 v2
**此项目为测试修改版的LeNet-5**
- 目前达到$0.9929$的准确率
```
%matplotlib inline
import os
import PIL
import pickle
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import tensorflow as tf
import keras
from IPython import display
from functools import partial
from sklearn.preprocessing ... | github_jupyter |
<a href="https://colab.research.google.com/github/krmiddlebrook/intro_to_deep_learning/blob/master/machine_learning/lesson%203%20-%20Neural%20Networks/intro-to-neural-networks.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Intro to Neural Network... | github_jupyter |
# Building your Deep Neural Network: Step by Step
Welcome to your week 4 assignment (part 1 of 2)! You have previously trained a 2-layer Neural Network (with a single hidden layer). This week, you will build a deep neural network, with as many layers as you want!
- In this notebook, you will implement all the functio... | github_jupyter |
<img align="center" style="max-width: 1000px" src="banner.png">
<img align="right" style="max-width: 200px; height: auto" src="hsg_logo.png">
## Lab 02 - "Artificial Neural Networks"
Machine Learning, University of St. Gallen, Spring Term 2022
The lab environment of the "Coding and Artificial Intelligence" IEMBA c... | 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 |
# SVR with Scale & Quantile Transformer
This Code template is for regression analysis using the SVR Regressor where rescaling method used is Scale and feature transformation is done via Quantile Transformer.
### Required Packages
```
import warnings
import numpy as np
import pandas as pd
import matplotlib.pyplot a... | github_jupyter |
```
%matplotlib inline
from matplotlib import style
style.use('fivethirtyeight')
import matplotlib.pyplot as plt
from datetime import datetime
import numpy as np
import pandas as pd
import datetime as dt
```
# Reflect Tables into SQLAlchemy ORM
```
# Python SQL toolkit and Object Relational Mapper
import sqlalchemy
f... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.