text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
```
import sys
sys.path.append("..")
import numpy as np
np.seterr(divide="ignore")
import logging
import pickle
import glob
from sklearn.metrics import roc_curve
from sklearn.metrics import roc_auc_score
from sklearn.preprocessing import RobustScaler
from sklearn.utils import check_random_state
from scipy import inte... | github_jupyter |
```
import numpy as np
from keras.models import Model
from keras.layers import Input
from keras.layers.pooling import AveragePooling3D
from keras import backend as K
import json
from collections import OrderedDict
def format_decimal(arr, places=6):
return [round(x * 10**places) / 10**places for x in arr]
DATA = Ord... | github_jupyter |
# Debugging strategies
In this notebook, we'll talk about what happens when you get an error message (it will happen often!) and some steps you can take to resolve them.
Run the code in the next cell.
```
x = 10
if x > 20
print(f'{x} is greater than 20!')
```
The "traceback" message shows you a couple of usefu... | github_jupyter |
```
import subprocess
try:
import dgl
except:
subprocess.check_call(["python", '-m', 'pip', 'install', 'dgl-cu110'])
import dgl
import os
import dgl.data
from dgl.data import DGLDataset
import torch
import torch.nn as nn
import torch.nn.functional as F
import pandas as pd
import numpy as np
import tqdm
from sklea... | 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 |
<h1 style="text-align:center;text-decoration: underline">Stream Analytics Tutorial</h1>
<h1>Overview</h1>
<p>Welcome to the stream analytics tutorial for EpiData. In this tutorial we will perform near real-time stream analytics on sample weather data acquired from a simulated wireless sensor network.</p>
<h2>Package a... | github_jupyter |
```
import geemap
geemap.show_youtube('OwjSJnGWKJs')
```
## Update the geemap package
If you run into errors with this notebook, please uncomment the line below to update the [geemap](https://github.com/giswqs/geemap#installation) package to the latest version from GitHub.
Restart the Kernel (Menu -> Kernel -> Resta... | github_jupyter |
```
# Copyright © 2020, Johan Vonk
# SPDX-License-Identifier: MIT
%matplotlib inline
import numpy as np
import pandas as pd
import math
import matplotlib.pyplot as plt
from sklearn.manifold import MDS
from sklearn.metrics import pairwise_distances
import paho.mqtt.client as mqtt
from threading import Timer
import json
... | github_jupyter |
##### Copyright 2019 The TensorFlow Hub Authors.
Licensed under the Apache License, Version 2.0 (the "License");
```
# Copyright 2019 The TensorFlow Hub Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
... | github_jupyter |
**Chapter 16 – Reinforcement Learning**
This notebook contains all the sample code and solutions to the exercices in chapter 16.
# 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 figur... | github_jupyter |
[](http://rpi.analyticsdojo.com)
<center><h1>Basic Text Feature Creation in Python</h1></center>
<center><h3><a href = 'http://rpi.analyticsdojo.com'>rpi.analyticsdojo.com</a></h3></center>
# Basic Text F... | github_jupyter |
<a href="https://colab.research.google.com/github/NeuromatchAcademy/course-content/blob/master/tutorials/W1D5_DimensionalityReduction/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, Tutorial 3
# Di... | github_jupyter |
# Quick Start
**A tutorial on Renormalized Mutual Information**
We describe in detail the implementation of RMI estimation in the very simple case of a Gaussian distribution.
Of course, in this case the optimal feature is given by the Principal Component Analysis
```
import numpy as np
# parameters of the Gaussian ... | github_jupyter |
# UPDATE
This notebook is no longer being used. Please look at the most recent version, NLSS_V2 found in the same directory.
My project looks at the Northernlion Live Super Show, a thrice a week Twitch stream which has been running since 2013. Unlike a video service like Youtube, the live nature of Twitch allows for ... | github_jupyter |
# Boltzmann Machines
Notebook ini berdasarkan kursus __Deep Learning A-Z™: Hands-On Artificial Neural Networks__ di Udemy. [Lihat Kursus](https://www.udemy.com/deeplearning/).
## Informasi Notebook
- __notebook name__: `taruma_udemy_boltzmann`
- __notebook version/date__: `1.0.0`/`20190730`
- __notebook server__: Goo... | github_jupyter |
As a demonstration, create an ARMA22 model drawing innovations from there different distributions, a bernoulli, normal and inverse normal. Then build a keras/tensorflow model for the 1-d scattering transform to create "features", use these features to classify which model for the innovations was used.
```
from blusky.... | github_jupyter |
# Generating an ROC Curve
This notebook is meant to be be an introduction to generating an ROC curve for multi-class prediction problems and the code comes directly from an [Scikit-Learn demo](http://scikit-learn.org/stable/auto_examples/model_selection/plot_roc.html). Please issue a comment on my Github account if ... | github_jupyter |
# CH. 8 - Market Basket Analysis
## Activities
#### Activity 8.01: Load and Prep Full Online Retail Data
```
import matplotlib.pyplot as plt
import mlxtend.frequent_patterns
import mlxtend.preprocessing
import numpy
import pandas
online = pandas.read_excel(
io="./Online Retail.xlsx",
sheet_name="Online Retai... | github_jupyter |
# Welcome to Jupyter Notebooks!
Author: Shelley Knuth
Date: 23 August 2019
Purpose: This is a general purpose tutorial to designed to provide basic information about Jupyter notebooks
## Outline
1. General information about notebooks
1. Formatting text in notebooks
1. Formatting mathematics in notebooks
1... | github_jupyter |
<a href="https://colab.research.google.com/github/DingLi23/s2search/blob/pipelining/pipelining/pdp-exp1/pdp-exp1_cslg-rand-5000_plotting.ipynb" target="_blank"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
### Experiment Description
Produce PDP for a randomly picked dat... | github_jupyter |
# Alzhippo Pr0gress
##### Possible Tasks
- **Visualizing fibers** passing through ERC and hippo, for both ipsi and contra cxns (4-figs) (GK)
- **Dilate hippocampal parcellations**, to cover entire hippocampus by nearest neighbour (JV)
- **Voxelwise ERC-to-hippocampal** projections + clustering (Both)
## Visulaizating... | github_jupyter |
# Course introduction
## A. Overview
### Am I ready to take this course?
Yes. Probably. Some programming experience will help, but is not required. If you have no programming experience, I strongly encourage you to go through the first handful of modules on the [Codecademy Python course](https://www.codecademy.com/l... | github_jupyter |
```
import re
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
from Bio.Alphabet import IUPAC
from Bio.SeqFeature import SeqFeature, FeatureLocation
#first 6 aas of each domain
#from uniprot: NL63 (Q6Q1S2), 229e(P15423), oc43 (P36334), hku1 (Q0ZME7)
#nl63 s1 domain definition: https://w... | github_jupyter |
<h1><center>How to export 🤗 Transformers Models to ONNX ?<h1><center>
[ONNX](http://onnx.ai/) is open format for machine learning models. It allows to save your neural network's computation graph in a framework agnostic way, which might be particulary helpful when deploying deep learning models.
Indeed, businesses m... | github_jupyter |
# Example 1: Detecting an obvious outlier
```
import numpy as np
from isotree import IsolationForest
### Random data from a standard normal distribution
np.random.seed(1)
n = 100
m = 2
X = np.random.normal(size = (n, m))
### Will now add obvious outlier point (3, 3) to the data
X = np.r_[X, np.array([3, 3]).reshape(... | github_jupyter |
# 决策树
-----
```
# 准备工作
# Common imports
import numpy as np
import os
# to make this notebook's output stable across runs
np.random.seed(42)
# To plot pretty figures
%matplotlib inline
import matplotlib
import matplotlib.pyplot as plt
plt.rcParams['axes.labelsize'] = 14
plt.rcParams['xtick.labelsize'] = 12
plt.rcPar... | github_jupyter |
```
%matplotlib inline
```
Creating Extensions Using numpy and scipy
=========================================
**Author**: `Adam Paszke <https://github.com/apaszke>`_
**Updated by**: `Adam Dziedzic <https://github.com/adam-dziedzic>`_
In this tutorial, we shall go through two tasks:
1. Create a neural network laye... | github_jupyter |
##### Copyright 2018 The TensorFlow Authors.
Licensed under the Apache License, Version 2.0 (the "License");
```
#@title Licensed under the Apache License, Version 2.0 (the "License"); { display-mode: "form" }
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at... | github_jupyter |
# SageMaker Pipelines to Train a BERT-Based Text Classifier
In this lab, we will do the following:
* Define a set of Workflow Parameters that can be used to parametrize a Workflow Pipeline
* Define a Processing step that performs cleaning and feature engineering, splitting the input data into train and test data sets
... | github_jupyter |
```
#These dictionaries describe the local hour of the satellite
local_times = {"aquaDay":"13:30",
"terraDay":"10:30",
"terraNight":"22:30",
"aquaNight":"01:30"
}
# and are used to load the correct file for dealing with the date-line.
min_hours = {"aquaDay":2,
... | github_jupyter |
#### New to Plotly?
Plotly's Python library is free and open source! [Get started](https://plot.ly/python/getting-started/) by downloading the client and [reading the primer](https://plot.ly/python/getting-started/).
<br>You can set up Plotly to work in [online](https://plot.ly/python/getting-started/#initialization-fo... | github_jupyter |
### Name: Anjum Rohra
# Overview

Being a popular finance journalist of Europe, everyone is waiting for the IT Salary Survey report you release every 3 years. The IT Sector is booming and the younger aspirants keep themselves updated with the trends by the beautiful visu... | github_jupyter |
```
%matplotlib inline
import glob
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
import tensorflow.contrib.learn as skflow
from sklearn import metrics
datadir='/home/bonnin/dev/cifar-10-batches-bin/'
plt.ion()
G = glob.glob (datadir + '*.bin')
A = np.fromfile(G[0],dtype=np.uint8).reshape(... | github_jupyter |
# Dask Overview
Dask is a flexible library for parallel computing in Python that makes scaling out your workflow smooth and simple. On the CPU, Dask uses Pandas (NumPy) to execute operations in parallel on DataFrame (array) partitions.
Dask-cuDF extends Dask where necessary to allow its DataFrame partitions to be pro... | github_jupyter |
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/FeatureCollection/distance.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a target="_blank" h... | github_jupyter |
# Hypothesis: Are digitised practices causing more failures?
## Hypothesis
We believe that practices undergoing Lloyd Gerge digitisation have an increased failure rate.
We will know this to be true when we look at their data for the last three months, and see that either their failures have increased, or that in gen... | github_jupyter |
# Data Collection Using Web Scraping
## To solve this problem we will need the following data :
● List of neighborhoods in Pune.
● Latitude and Longitudinal coordinates of those neighborhoods.
● Venue data for each neighborhood.
## Sources
● For the list of neighborhoods, I used
(https://en.wikipedia.org/wiki/Cat... | github_jupyter |
# Tabulate results
```
import os
import sys
from typing import Tuple
import pandas as pd
from tabulate import tabulate
from tqdm import tqdm
sys.path.append('../src')
from read_log_file import read_log_file
LOG_HOME_DIR = os.path.join('../logs_v1/')
assert os.path.isdir(LOG_HOME_DIR)
MODEL_NAMES = ['logistic_regressio... | github_jupyter |
<a href="https://colab.research.google.com/github/PacktPublishing/Hands-On-Computer-Vision-with-PyTorch/blob/master/Chapter15/Handwriting_transcription.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
!wget https://www.dropbox.com/s/l2ul3upj7dkv4... | github_jupyter |
## Dependencies
```
import json, glob
from tweet_utility_scripts import *
from tweet_utility_preprocess_roberta_scripts_aux import *
from transformers import TFRobertaModel, RobertaConfig
from tokenizers import ByteLevelBPETokenizer
from tensorflow.keras import layers
from tensorflow.keras.models import Model
```
# L... | github_jupyter |
```
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
import statsmodels.formula.api as smf
import statsmodels.api as sm
from statsmodels.graphics.regressionplots import influence_plot
import sklearn
startup=pd.read_csv("50_Startups.csv")
startup
startup.describe()
startup.hea... | github_jupyter |
## Importing Modules
```
#%matplotlib notebook
from tqdm import tqdm
%matplotlib inline
#Module to handle regular expressions
import re
#manage files
import os
#Library for emoji
import emoji
#Import pandas and numpy to handle data
import pandas as pd
import numpy as np
#import libraries for accessing the database
im... | github_jupyter |
## Load Estonian weather service
- https://www.ilmateenistus.ee/teenused/ilmainfo/ilmatikker/
```
import requests
import datetime
import xml.etree.ElementTree as ET
import pandas as pd
from pandas.api.types import is_string_dtype
from pandas.api.types import is_numeric_dtype
import geopandas as gpd
import fiona
fr... | github_jupyter |
<a href="https://colab.research.google.com/github/john-s-butler-dit/Numerical-Analysis-Python/blob/master/Chapter%2008%20-%20Heat%20Equations/801_Heat%20Equation-%20FTCS.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# The Explicit Forward Time Cen... | github_jupyter |
## DS/CMPSC 410 MiniProject #3
### Spring 2021
### Instructor: John Yen
### TA: Rupesh Prajapati and Dongkuan Xu
### Learning Objectives
- Be able to apply thermometer encoding to encode numerical variables into binary variable format.
- Be able to apply k-means clustering to the Darknet dataset based on both thermome... | github_jupyter |
<a href="https://cognitiveclass.ai/">
<img src="https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/PY0101EN/Ad/CCLog.png" width="200" align="center">
</a>
<h1>Dictionaries in Python</h1>
<p><strong>Welcome!</strong> This notebook will teach you about the dictionaries in the Python Pr... | github_jupyter |
# Stochastic Variational GP Regression
## Overview
In this notebook, we'll give an overview of how to use SVGP stochastic variational regression ((https://arxiv.org/pdf/1411.2005.pdf)) to rapidly train using minibatches on the `3droad` UCI dataset with hundreds of thousands of training examples. This is one of the mo... | github_jupyter |
# MRCA estimation
-------
You can access your data via the dataset number. For example, ``handle = open(get(42), 'r')``.
To save data, write your data to a file, and then call ``put('filename.txt')``. The dataset will then be available in your galaxy history.
Notebooks can be saved to Galaxy by clicking the large gree... | github_jupyter |
<div style="width:1000 px">
<div style="float:right; width:98 px; height:98px;">
<img src="https://raw.githubusercontent.com/Unidata/MetPy/master/metpy/plots/_static/unidata_150x150.png" alt="Unidata Logo" style="height: 98px;">
</div>
<h1>Introduction to Pandas</h1>
<h3>Unidata Python Workshop</h3>
<div style="clea... | github_jupyter |
# Simulation iteration
Let $A$ be an $m \times m$ real symmetric matrix with eigenvalue decomposition: $\newcommand{\ffrac}{\displaystyle \frac} \newcommand{\Tran}[1]{{#1}^{\mathrm{T}}}A = Q \Lambda \Tran{Q}$, where the eigenvalues of $A$ ar ordered as $\left| \lambda_1 \right| > \left| \lambda_2 \right| > \left| \lamb... | github_jupyter |
# Bias Removal
Climate models can have biases relative to different verification datasets. Commonly, biases are removed by postprocessing before verification of forecasting skill. `climpred` provides convenience functions to do so.
```
import climpred
import xarray as xr
import matplotlib.pyplot as plt
from climpred ... | github_jupyter |
<a href="https://colab.research.google.com/github/yukinaga/minnano_ai/blob/master/section_7/ml_libraries.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# 機械学習ライブラリ
機械学習ライブラリ、KerasとPyTorchのコードを紹介します。
今回はコードの詳しい解説は行いませんが、実装の大まかな流れを把握しましょう。
## ● Ke... | github_jupyter |
```
import tqdm
from tqdm import tqdm_notebook
import time
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import mpl_toolkits.mplot3d.axes3d as axes3d
import matplotlib.ticker as ticker
# import warnings
# warnings.filterwarnings('ignore')
import pandas as pd
import matplotlib.pyplot as plt
imp... | github_jupyter |
# Least-squares technique
## References
- Statistics in geography: https://archive.org/details/statisticsingeog0000ebdo/
## Imports
```
from functools import partial
import numpy as np
from scipy.stats import multivariate_normal, t
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from ipywi... | github_jupyter |
# Callin Switzer
## Modifications to TLD code for ODE system
___
```
from matplotlib import pyplot as plt
%matplotlib inline
from matplotlib import cm
import numpy as np
import os
import scipy.io
import seaborn as sb
import matplotlib.pylab as pylab
# forces plots to appear in the ipython notebook
%matplotlib inline
f... | github_jupyter |
```
from IPython.display import display, HTML
from pyspark.sql import SparkSession
from pyspark import StorageLevel
import pandas as pd
from pyspark.sql.types import StructType, StructField,StringType, LongType, IntegerType, DoubleType, ArrayType
from pyspark.sql.functions import regexp_replace
from sedona.register imp... | github_jupyter |
# Stepper Motors
* [How to use a stepper motor with the Raspberry Pi Pico](https://www.youngwonks.com/blog/How-to-use-a-stepper-motor-with-the-Raspberry-Pi-Pico)
* [Control 28BYJ-48 Stepper Motor with ULN2003 Driver & Arduino](https://lastminuteengineers.com/28byj48-stepper-motor-arduino-tutorial/) Description of the ... | github_jupyter |
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Image/image_smoothing.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a target="_blank" href="... | github_jupyter |
```
import numpy as np
arr = np.arange(0,11)
arr
# Simplest way to pick an element or some of the elements from an array is similar to indexing in a python list.
arr[8] # Gives value at the index 8
# Slice Notations [start:stop]
arr[1:5] # 1 inclusive and 5 exclusive
# Another Example of Slicing
arr[0:5]
# To have e... | github_jupyter |
# NumPy, Pandas and Matplotlib with ICESat
UW Geospatial Data Analysis
CEE498/CEWA599
David Shean
## Objectives
1. Solidify basic skills with NumPy, Pandas, and Matplotlib
2. Learn basic data manipulation, exploration, and visualizatioin with a relatively small, clean point dataset (65K points)
3. Learn a bit m... | github_jupyter |
```
import os
import couchdb
from lib.genderComputer.genderComputer import GenderComputer
server = couchdb.Server(url='http://127.0.0.1:15984/')
db = server['tweets']
gc = GenderComputer(os.path.abspath('./data/nameLists'))
date_list = []
for row in db.view('_design/analytics/_view/conversation-date-breakdown', reduce=... | github_jupyter |
### Natural Language Processing, a look at distinguishing subreddit categories by analyzing the text of the comments and posts
**Matt Paterson, hello@hiremattpaterson.com**
General Assembly Data Science Immersive, July 2020
### Abstract
**HireMattPaterson.com has been (fictionally) contracted by Virgin Galactic’s ma... | github_jupyter |
<a href="https://colab.research.google.com/github/vitutorial/exercises/blob/master/LatentFactorModel/LatentFactorModel.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
%matplotlib inline
import os
import re
import urllib.request
import numpy as ... | github_jupyter |
# AU Fundamentals of Python Programming-W10X
## Topic 1(主題1)-字串和print()的參數
### Step 1: Hello World with 其他參數
sep = "..." 列印分隔 end="" 列印結尾
* sep: string inserted between values, default a space.
* end: string appended after the last value, default a newline.
```
print('Hello World!') #'Hello World!' is the same a... | github_jupyter |
## Topic Modelling (joint plots by quality band)
Shorter notebook just for Figures 9 and 10 in the paper.
```
%matplotlib inline
import matplotlib.pyplot as plt
# magics and warnings
%load_ext autoreload
%autoreload 2
import warnings; warnings.simplefilter('ignore')
import os, random
from tqdm import tqdm
import pa... | github_jupyter |
+ This notebook is part of lecture 7 *Solving Ax=0, pivot variables, and special solutions* in the OCW MIT course 18.06 by Prof Gilbert Strang [1]
+ Created by me, Dr Juan H Klopper
+ Head of Acute Care Surgery
+ Groote Schuur Hospital
+ University Cape Town
+ <a href="mailto:juan.klopper@uct.ac.za">Ema... | github_jupyter |
```
# !pip install simplejson
from pymongo import MongoClient
from pathlib import Path
from tqdm.notebook import tqdm
import numpy as np
import simplejson as json
import itertools
from functools import cmp_to_key
import networkx as nx
from IPython.display import display, Image, JSON
from ipywidgets import widgets, Ima... | github_jupyter |
<a href="https://colab.research.google.com/github/mees/calvin/blob/main/RL_with_CALVIN.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
<h1>Reinforcement Learning with CALVIN</h1>
The **CALVIN** simulated benchmark is perfectly suited for training a... | github_jupyter |
# Polish phonetic comparison
> "Transcript matching for E2E ASR with phonetic post-processing"
- toc: false
- branch: master
- hidden: true
- categories: [asr, polish, phonetic, todo]
```
from difflib import SequenceMatcher
import icu
plipa = icu.Transliterator.createInstance('pl-pl_FONIPA')
```
The errors in E2E m... | github_jupyter |
This notebook compares the email activities and draft activites of an IETF working group.
Import the BigBang modules as needed. These should be in your Python environment if you've installed BigBang correctly.
```
import bigbang.mailman as mailman
from bigbang.parse import get_date
#from bigbang.functions import *
fr... | github_jupyter |
# Fastpages Notebook Blog Post
> A tutorial of fastpages for Jupyter notebooks.
- toc: true
- badges: true
- comments: true
- categories: [jupyter]
- image: images/chart-preview.png
# About
This notebook is a demonstration of some of capabilities of [fastpages](https://github.com/fastai/fastpages) with notebooks.
... | github_jupyter |
# Coupling to Ideal Loads
In this notebook, we investigate the WEST ICRH antenna behaviour when the front-face is considered as the combination of ideal (and independant) loads made of impedances all equal to $Z_s=R_c+j X_s$, where $R_c$ corresponds to the coupling resistance and $X_s$ is the strap reactance.
<img s... | github_jupyter |
# 数组基础
## 创建一个数组
```
import numpy as np
import pdir
pdir(np)
import numpy as np
a1 = np.array([0, 1, 2, 3, 4])#将列表转换为数组,可以传递任何序列(类数组),而不仅仅是常见的列表(list)数据类型。
a2 = np.array((0, 1, 2, 3, 4))#将元组转换为数组
print 'a1:',a1,type(a1)
print 'a2:',a2,type(a2)
b = np.arange(5) #python内置函数range()的数组版,返回的是numpy ndarrays数组对象,而不是列表
print... | github_jupyter |
# A Scientific Deep Dive Into SageMaker LDA
1. [Introduction](#Introduction)
1. [Setup](#Setup)
1. [Data Exploration](#DataExploration)
1. [Training](#Training)
1. [Inference](#Inference)
1. [Epilogue](#Epilogue)
# Introduction
***
Amazon SageMaker LDA is an unsupervised learning algorithm that attempts to describe ... | github_jupyter |
<a href="https://colab.research.google.com/github/totti0223/deep_learning_for_biologists_with_keras/blob/master/notebooks/PlantDisease_tutorial.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Training a Plant Disease Diagnosis Model with PlantVill... | github_jupyter |
# Single-stepping the `logictools` Pattern Generator
* This notebook will show how to use single-stepping mode with the pattern generator
* Note that all generators in the _logictools_ library may be **single-stepped**
### Visually ...
#### The _logictools_ library on the Zynq device on the PYNQ board

Concept map:

#### Notebook setup
```
# loading Python modules
import math
impo... | github_jupyter |
## Compare built-in Sagemaker classification algorithms for a binary classification problem using Iris dataset
In the notebook tutorial, we build 3 classification models using HPO and then compare the AUC on test dataset on 3 deployed models
IRIS is perhaps the best known database to be found in the pattern recogniti... | github_jupyter |
## This Notebook - Goals - FOR EDINA
**What?:**
- Standard classification method example/tutorial
**Who?:**
- Researchers in ML
- Students in computer science
- Teachers in ML/STEM
**Why?:**
- Demonstrate capability/simplicity of core scipy stack.
- Demonstrate common ML concept known to learners and used by resear... | github_jupyter |
## Dependencies
```
!nvidia-smi
!jupyter notebook list
%env CUDA_VISIBLE_DEVICES=3
%matplotlib inline
%load_ext autoreload
%autoreload 2
import time
from pathlib import Path
import numpy as np
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
import torch.optim as optim
import torchvision
import tor... | github_jupyter |
```
from os import listdir
from numpy import array
from keras.preprocessing.text import Tokenizer, one_hot
from keras.preprocessing.sequence import pad_sequences
from keras.models import Model, Sequential, model_from_json
from keras.utils import to_categorical
from keras.layers.core import Dense, Dropout, Flatten
from ... | github_jupyter |
# Programación lineal
<img style="float: right; margin: 0px 0px 15px 15px;" src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/0c/Linear_Programming_Feasible_Region.svg/2000px-Linear_Programming_Feasible_Region.svg.png" width="400px" height="125px" />
> La programación lineal es el campo de la optimización m... | github_jupyter |
<a href="https://www.bigdatauniversity.com"><img src="https://ibm.box.com/shared/static/cw2c7r3o20w9zn8gkecaeyjhgw3xdgbj.png" width=400 align="center"></a>
<h1 align="center"><font size="5"> Logistic Regression with Python</font></h1>
In this notebook, you will learn Logistic Regression, and then, you'll create a mod... | github_jupyter |
```
%matplotlib inline
import matplotlib.pylab as plt
import numpy as np
from keras import objectives
from keras import backend as K
from keras import losses
import tensorflow as tf
import interactions_results
import train_interactions
OBJ_IDS = ['1', '2']
COLUMNS_MAP = [('x', 'ant%s_x'),
('y', 'ant%s_y'),
... | github_jupyter |
> Developed by [Yeison Nolberto Cardona Álvarez](https://github.com/yeisonCardona)
> [Andrés Marino Álvarez Meza, PhD.](https://github.com/amalvarezme)
> César Germán Castellanos Dominguez, PhD.
> _Digital Signal Processing and Control Group_ | _Grupo de Control y Procesamiento Digital de Señales ([GCPDS](https:... | github_jupyter |
##### Copyright 2019 The TensorFlow Authors.
```
#@title Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
%config InlineBackend.figure_format = "retina"
# print(plt.style.available)
plt.style.use("ggplot")
# plt.style.use("fivethirtyeight")
plt.style.use("seaborn-talk")
from tqdm import tnrange, tqdm_notebook
def uniform_linear_array(n_mics, spacing... | github_jupyter |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
... | github_jupyter |
# Setup
```
%load_ext rpy2.ipython
import os
from json import loads as jloads
from glob import glob
import pandas as pd
import datetime
%%R
library(gplots)
library(ggplot2)
library(ggthemes)
library(reshape2)
library(gridExtra)
library(heatmap.plus)
ascols = function(facs, pallette){
facs = facs[,1]
ffacs =... | github_jupyter |
```
import cv2
import os
import numpy
from PIL import Image
import matplotlib.pyplot as plt
# !tar -xf EnglishHnd.tgz
# !mv English/Hnd ./
# !rm -rf Hnd/Trj/
# !mv Hnd/Img/* Hnd/
# !rm -rf Hnd/Img
# !rm -rf English
# !rm -rf Hnd
label_list = ['0','1','2','3','4','5','6','7','8','9', 'A','B','C','D','E','F','G','H', 'I'... | github_jupyter |
```
!pip install datasets -q
!pip install sagemaker -U -q
!pip install s3fs==0.4.2 -U -q
```
### Load dataset and have a peak:
This cell is required in SageMaker Studio, otherwise the download of the dataset will throw an error.
After running this cell, the kernel needs to be restarted. After restarting tthe kernel, ... | github_jupyter |
# IllusTrip: Text to Video 3D
Part of [Aphantasia](https://github.com/eps696/aphantasia) suite, made by Vadim Epstein [[eps696](https://github.com/eps696)]
Based on [CLIP](https://github.com/openai/CLIP) + FFT/pixel ops from [Lucent](https://github.com/greentfrapp/lucent).
3D part by [deKxi](https://twitter.com/deK... | github_jupyter |
```
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | github_jupyter |
<img src="http://akhavanpour.ir/notebook/images/srttu.gif" alt="SRTTU" style="width: 150px;"/>
[](https://notebooks.azure.com/import/gh/Alireza-Akhavan/class.vision)
# <div style="direction:rtl;text-align:right;font-family:B Lotus, B Nazanin, Tahoma"> تولید مت... | github_jupyter |
# Getting to know LSTMs better
Created: September 13, 2018
Author: Thamme Gowda
Goals:
- To get batches of *unequal length sequences* encoded correctly!
- Know how the hidden states flow between encoders and decoders
- Know how the multiple stacked LSTM layers pass hidden states
Example: a simple bi-directional... | github_jupyter |
## Differential Privacy - Simple Database Queries
The database is going to be a VERY simple database with only one boolean column. Each row corresponds to a person. Each value corresponds to whether or not that person has a certain private attribute (such as whether they have a certain disease, or whether they are abo... | github_jupyter |
# Lesson 9 Practice: Supervised Machine Learning
Use this notebook to follow along with the lesson in the corresponding lesson notebook: [L09-Supervised_Machine_Learning-Lesson.ipynb](./L09-Supervised_Machine_Learning-Lesson.ipynb).
## Instructions
Follow along with the teaching material in the lesson. Throughout the ... | github_jupyter |
# Time handling
Last year in this course, people asked: "how do you handle times?" That's a good question...
## Exercise
What is the ambiguity in these cases?
1. Meet me for lunch at 12:00
2. The meeting is at 14:00
3. How many hours are between 01:00 and 06:00 (in the morning)
4. When does the new year start?
Lo... | github_jupyter |
### Hyper Parameter Tuning
One of the primary objective and challenge in machine learning process is improving the performance score, based on data patterns and observed evidence. To achieve this objective, almost all machine learning algorithms have specific set of parameters that needs to estimate from dataset which... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.