code stringlengths 2.5k 150k | kind stringclasses 1
value |
|---|---|
```
# change to root directory of project
import os
os.chdir('/home/tm/sciebo/corona/twitter_analysis/')
from bld.project_paths import project_paths_join as ppj
from IPython.display import display
import numpy as np
import pandas as pd
from sklearn.metrics import classification_report
from sklearn.metrics import conf... | github_jupyter |
# Table of Contents
<p><div class="lev2 toc-item"><a href="#Common-Layers" data-toc-modified-id="Common-Layers-01"><span class="toc-item-num">0.1 </span>Common Layers</a></div><div class="lev3 toc-item"><a href="#Convolution-Layers" data-toc-modified-id="Convolution-Layers-011"><span class="toc-item-num">0.... | github_jupyter |
# Machine Learning Engineer Nanodegree
## Unsupervised Learning
## Project 3: Creating Customer Segments
Welcome to the third project of the Machine Learning Engineer Nanodegree! In this notebook, some template code has already been provided for you, and it will be your job to implement the additional functionality ne... | github_jupyter |
```
import matplotlib.pyplot as plt
import os, glob, cv2, random
import seaborn as sns
import pandas as pd
from PIL import Image
import tensorflow as tf
from tensorflow import keras
import numpy as np
```
# Preview
```
path = "./dataset/"
# 학습 데이터 준비
filenames = os.listdir(path)
X=[]
y=[]
categories=[]
for filename... | github_jupyter |
```
import numpy as np # biblioteca utilizada para tratar com número/vetores/matrizes
import matplotlib.pyplot as plt # utilizada para plotar gráficos ao "estilo" matlab
import pandas as pd #biblioteca utilizada para realizar operações sobre dataframes
from google.colab import files #biblioteca do google colab utili... | github_jupyter |
# Twitter Sentiment Analysis for Indian Election 2019
**Abstract**<br>
The goal of this project is to do sentiment analysis for the Indian Elections. The data used is the tweets that are extracted from Twitter. The BJP and Congress are the two major political parties that will be contesting the election. The dataset w... | github_jupyter |
# Using geoprocessing tools
In ArcGIS API for Python, geoprocessing toolboxes and tools within them are represented as Python module and functions within that module. To learn more about this organization, refer to the page titled [Accessing geoprocessing tools](https://developers.arcgis.com/python/guide/accessing-geo... | github_jupyter |
### Creating Data Frames
documentation: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html
DataFrame is a 2-dimensional labeled data structure with columns of potentially different types. You can think of it
like a spreadsheet or SQL table, or a dict of Series objects.
You can create a data f... | github_jupyter |
# Chapter 10 - Predicting Continuous Target Variables with Regression Analysis
### Overview
- [Introducing a simple linear regression model](#Introducing-a-simple-linear-regression-model)
- [Exploring the Housing Dataset](#Exploring-the-Housing-Dataset)
- [Visualizing the important characteristics of a dataset](#Vi... | github_jupyter |
420-A52-SF - Algorithmes d'apprentissage supervisé - Hiver 2020 - Spécialisation technique en Intelligence Artificielle<br/>
MIT License - Copyright (c) 2020 Mikaël Swawola
<br/>

<br/>
**Objectif:** cette séance de travaux pratiques ... | github_jupyter |
<a href="https://colab.research.google.com/github/alastra32/DS-Unit-2-Applied-Modeling/blob/master/module4/assignment_applied_modeling_4.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
Lambda School Data Science, Unit 2: Predictive Modeling
# Appli... | github_jupyter |
```
from keras.models import Sequential
from keras.layers import Dense, Input, Reshape
from keras.models import Model
from keras.layers.core import Activation
from keras.layers.normalization import BatchNormalization
from keras.layers.convolutional import UpSampling2D
from keras.layers.convolutional import Conv2D, MaxP... | github_jupyter |
# Loss Functions
This python script illustrates the different loss functions for regression and classification.
We start by loading the ncessary libraries and resetting the computational graph.
```
import matplotlib.pyplot as plt
import tensorflow as tf
from tensorflow.python.framework import ops
ops.reset_default_g... | github_jupyter |
# Academic Integrity Statement
As a matter of Departmental policy, **we are required to give you a 0** unless you **type your name** after the following statement:
> *I certify on my honor that I have neither given nor received any help, or used any non-permitted resources, while completing this evaluation.*
\[TYPE... | github_jupyter |
```
import pandas as pd
import ast
from collections import Counter
import csv
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer, TfidfTransformer
from factor_analyzer.factor_analyzer import calculate_kmo
import numpy as np
from sklearn.decomposition import PCA
from sklearn.preprocessing impo... | github_jupyter |
<a href="https://colab.research.google.com/github/MasakazuNaganuma/WhirlwindTourOfPython/blob/master/08-Defining-Functions.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
<!--BOOK_INFORMATION-->
<img align="left" style="padding-right:10px;" src="htt... | github_jupyter |
graded = 9/9
# Homework assignment #3
These problem sets focus on using the Beautiful Soup library to scrape web pages.
## Problem Set #1: Basic scraping
I've made a web page for you to scrape. It's available [here](http://static.decontextualize.com/widgets2016.html). The page concerns the catalog of a famous [wid... | 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 |
# About
This kernel applies the techniques from [fastai's deep learning for coders](http://course.fast.ai) course to the dogbreed dataset
The resulting Kaggle score is **0.22623** which roughly translates to a position in the top 30%.
# Setup
```
%reload_ext autoreload
%autoreload 2
%matplotlib inline
import numpy a... | github_jupyter |
### Entrepreneurial Competency Analysis and Predict
```
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib as mat
import matplotlib.pyplot as plt
import warnings
warnings.filterwarnings("ignore")
data = pd.read_csv('entrepreneurial competency.csv')
data.head()
data.describe()
data.corr()
li... | github_jupyter |
# Mean Shift using Standard Scaler
This Code template is for the Cluster analysis using a simple Mean Shift(Centroid-Based Clustering using a flat kernel) Clustering algorithm along with feature scaling using Standard Scaler and includes 2D and 3D cluster visualization of the Clusters.
### Required Packages
```
!pip... | github_jupyter |
```
import pickle
import matplotlib.pyplot as plt
from scipy.stats.mstats import gmean
import seaborn as sns
from statistics import stdev
from math import log
import numpy as np
from scipy import stats
%matplotlib inline
price_100c = pickle.load(open("total_price_non.p","rb"))
price_100 = pickle.load(open("C:\\Users\\y... | github_jupyter |
# Learning a LJ potential [](https://colab.research.google.com/github/Teoroo-CMC/PiNN/blob/master/docs/notebooks/Learn_LJ_potential.ipynb)
This notebook showcases the usage of PiNN with a toy problem of learning a Lennard-Jones
potential with a... | github_jupyter |
<h1><center>Assessmet 5 on Advanced Data Analysis using Pandas</center></h1>
## **Project 2: Correlation Between the GDP Rate and Unemployment Rate (2019)**
```
import warnings
warnings.simplefilter('ignore', FutureWarning)
import pandas as pd
pip install pandas_datareader
```
# Getting the Datasets
We got the tw... | github_jupyter |
# T1557.001 - LLMNR/NBT-NS Poisoning and SMB Relay
By responding to LLMNR/NBT-NS network traffic, adversaries may spoof an authoritative source for name resolution to force communication with an adversary controlled system. This activity may be used to collect or relay authentication materials.
Link-Local Multicast N... | github_jupyter |
# Use scikit-learn to recognize hand-written digits with `ibm-watson-machine-learning`
This notebook contains steps and code to demonstrate how to persist and deploy locally trained scikit-learn model in Watson Machine Learning Service. This notebook contains steps and code to work with [ibm-watson-machine-learning](... | github_jupyter |
### Introduction
This notebook contains a working example to show usage of the API for visual saliency map generation for image blackbox classifiers.
This example will follow an application-like use-case where we define a functionally rigid process that transforms an input image into a number of saliency heat-maps bas... | github_jupyter |
<a href="https://colab.research.google.com/github/yohanesnuwara/66DaysOfData/blob/main/D01_PCA.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Principal Component Analysis
```
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd... | 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 pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn import preprocessing
import xgboost as xgb
from sklearn.metrics import mean_absolute_error
from datetime import date
import warnings
warnings.filterwarnings(action='ignore')
# set the seed of random number generator, which is useful... | github_jupyter |
# Lecture 10 - eigenvalues and eigenvectors
An eigenvector $\boldsymbol{x}$ and corrsponding eigenvalue $\lambda$ of a square matrix $\boldsymbol{A}$ satisfy
$$
\boldsymbol{A} \boldsymbol{x} = \lambda \boldsymbol{x}
$$
Rearranging this expression,
$$
\left( \boldsymbol{A} - \lambda \boldsymbol{I}\right) \boldsymbol... | github_jupyter |
<a href="http://landlab.github.io"><img style="float: left" src="../../../landlab_header.png"></a>
# Components for modeling overland flow erosion
*(G.E. Tucker, July 2021)*
There are two related components that calculate erosion resulting from surface-water flow, a.k.a. overland flow: `DepthSlopeProductErosion` an... | github_jupyter |
```
import numpy as np
import pandas as pd
from pathlib import Path
from sklearn.preprocessing import LabelEncoder
from sklearn.linear_model import LogisticRegression
from sklearn.ensemble import RandomForestClassifier
from sklearn.preprocessing import StandardScaler
train_df = pd.read_csv(Path('Resources/2019loans.csv... | github_jupyter |
# Transfer Learning
Most of the time you won't want to train a whole convolutional network yourself. Modern ConvNets training on huge datasets like ImageNet take weeks on multiple GPUs. Instead, most people use a pretrained network either as a fixed feature extractor, or as an initial network to fine tune. In this not... | github_jupyter |
```
from pymongo import MongoClient
import re, string, nltk, csv
from wordcloud import WordCloud, STOPWORDS
import matplotlib.pyplot as plt
print("Connecting to MongoDB ...")
client = MongoClient('localhost:27017')
db = client['comments']
rawComments = db['rawComments'].find()
def translate_numbers(word):
word = w... | github_jupyter |
# Evolution of CRO disclosure over time
```
import sys
import math
from datetime import date
from dateutil.relativedelta import relativedelta
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.dates
from matplotlib.ticker import MaxNLocator
import seaborn as sns
sys.path.append... | github_jupyter |
# Lesson 3. Coordinate Reference Systems (CRS) & Map Projections
Building off of what we learned in the previous notebook, we'll get to understand an integral aspect of geospatial data: Coordinate Reference Systems.
- 3.1 California County Shapefile
- 3.2 USA State Shapefile
- 3.3 Plot the Two Together
- 3.4 Coordina... | github_jupyter |
**Chapter 5 – Support Vector Machines**
_This notebook contains all the sample code and solutions to the exercises in chapter 5._
<table align="left">
<td>
<a target="_blank" href="https://colab.research.google.com/github/jtao/handson-ml2/blob/master/05_support_vector_machines.ipynb"><img src="https://www.tenso... | github_jupyter |
[](https://www.pythonista.io)
# Cliente de la API con requests.
En esta notebook se encuentra el código de un cliente capaz de consumir los servicios de los servidores creado en este curso.
Es necesario que el servidor en la notebook se encuentre en ejecución.
```
!pip install reque... | github_jupyter |
**Estimación puntual**
```
import numpy as np
import pandas as pd
import scipy.stats as stats
import matplotlib.pyplot as plt
import random
import math
np.random.seed(2020)
population_ages_1 = stats.poisson.rvs(loc = 18, mu = 35, size = 1500000)
population_ages_2 = stats.poisson.rvs(loc = 18, mu = 10, size = 1000000)
... | github_jupyter |
```
from urllib.request import urlopen
html=urlopen('http://pythonscraping.com/pages/page1.html')
print(html.read())
from bs4 import BeautifulSoup
html = urlopen("http://www.pythonscraping.com/pages/page1.html")
bs = BeautifulSoup(html.read())
print(bs)
print(bs.h1)
print(bs.html.body.h1)
print(bs.body.h1)
html = url... | github_jupyter |
# Approximate q-learning
In this notebook you will teach a lasagne neural network to do Q-learning.
__Frameworks__ - we'll accept this homework in any deep learning framework. For example, it translates to TensorFlow almost line-to-line. However, we recommend you to stick to theano/lasagne unless you're certain about... | github_jupyter |
均线定投
```
import pandas as pd
from datetime import datetime
import trdb2py
import numpy as np
isStaticImg = False
width = 960
height = 768
pd.options.display.max_columns = None
pd.options.display.max_rows = None
trdb2cfg = trdb2py.loadConfig('./trdb2.yaml')
# 具体基金
asset = 'jqdata.000300_XSHG|1d'
# baselineasset = 'j... | github_jupyter |
<a href="https://colab.research.google.com/github/dhruvsheth-ai/hydra-openvino-sensors/blob/master/hydra_openvino_pi.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
**Install the latest OpenVino for Raspberry Pi OS package from Intel OpenVino Distri... | github_jupyter |
<a href="https://colab.research.google.com/github/RichardFreedman/CRIM_Collab_Notebooks/blob/main/CRIM_Data_Search.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
import requests
import pandas as pd
```
# Markdown for descriptive text
## level ... | github_jupyter |
```
import pandas as pd
import numpy as np
import datetime
import os
import glob, os
import time
```
O que vou fazer amanhã:
- Abrir todos os bancos do granular activity/opens com o código que gera uma coluna com o nome do arquivo.
- Ordenar por data e dropar duplicados, assim estimarei a data de envio do email (com ... | github_jupyter |
```
import pandas as pd
import numpy as np
import requests
import bs4 as bs
import urllib.request
```
## Extracting features of 2020 movies from Wikipedia
```
link = "https://en.wikipedia.org/wiki/List_of_American_films_of_2020"
source = urllib.request.urlopen(link).read()
soup = bs.BeautifulSoup(source,'lxml')
table... | github_jupyter |
# Importing the libraries
```
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
from sklearn.metrics import roc_curve, auc
from sklearn.metrics import roc_auc_score,recall_score, precision_score, f1_score
from sklearn.metrics import accuracy_score, confusion_matrix, clas... | github_jupyter |
```
# default_exp callback.PredictionDynamics
```
# PredictionDynamics
> Callback used to visualize model predictions during training.
This is an implementation created by Ignacio Oguiza (timeseriesAI@gmail.com) based on a [blog post](http://localhost:8888/?token=83bca9180c34e1c8991886445942499ee8c1e003bc0491d0) by ... | github_jupyter |
# Identifying special matrices
## Instructions
In this assignment, you shall write a function that will test if a 4×4 matrix is singular, i.e. to determine if an inverse exists, before calculating it.
You shall use the method of converting a matrix to echelon form, and testing if this fails by leaving zeros that can’t... | github_jupyter |
# Label Roads
For machine learning, a set of road labels are needed for the downloaded aerial images. That is, for each aerial image, a mask image the same size is needed with each pixel having value 1 or 0 to indicate the prescense or abscense of a road.
<table><tr><td><img src='/img/notebook/label_example_img.png... | github_jupyter |
# Homework03: Topic Modeling with Latent Semantic Analysis
Latent Semantic Analysis (LSA) is a method for finding latent similarities between documents treated as a bag of words by using a low rank approximation. It is used for document classification, clustering and retrieval. For example, LSA can be used to search ... | github_jupyter |
# Pytorch Basics - Regressão Linear
> Tutorial de como realizar um modelo de regressão linear no Pytorch.
- toc: false
- badges: true
- comments: true
- categories: [pytorch, regressaolinear]
- image: images/pytorch.png
O objetivo desse breve trabalho é apresentar como é realizado um modelo de regressão linear utili... | github_jupyter |
```
## Import dependencies
import numpy as np
import pandas as pd
from pathlib import Path
from getpass import getpass
from sqlalchemy import create_engine
import psycopg2
from sklearn.preprocessing import LabelEncoder
## Load the data
file_path = Path("Resources/DisneylandReviews.csv")
disney_raw_df = pd.read_csv(fil... | github_jupyter |
```
from bs4 import BeautifulSoup
import requests
class stock:
def __init__(self,*stock_num):
from bs4 import BeautifulSoup
import requests
import pymysql
import openpyxl
from openpyxl.styles import Font
import gspread
from oauth2client.service_account import ServiceAccountCredentials
from selenium import webdriver... | github_jupyter |
# Introduction to Kubernetes
**Learning Objectives**
* Create GKE cluster from command line
* Deploy an application to your cluster
* Cleanup, delete the cluster
## Overview
Kubernetes is an open source project (available on [kubernetes.io](kubernetes.io)) which can run on many different environments, from laptops... | github_jupyter |
<a href="https://colab.research.google.com/github/ipavlopoulos/toxic_spans/blob/master/ToxicSpans_SemEval21.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Download the data and the code
```
from ast import literal_eval
import pandas as pd
import... | github_jupyter |
# Counts, Frequencies, and Ngram Models
Before you proceed, make sure to run the cell below.
This will once again read in the cleaned up text files and store them as tokenized lists in the variables `hamlet`, `faustus`, and `mars`.
If you get an error, make sure that you did the previous notebook and that this noteboo... | github_jupyter |
# Model import using the Petab format
In this notebook, we illustrate how to use [pyPESTO](https://github.com/icb-dcm/pypesto.git) together with [PEtab](https://github.com/petab-dev/petab.git) and [AMICI](https://github.com/icb-dcm/amici.git). We employ models from the [benchmark collection](https://github.com/benchma... | github_jupyter |
```
import numpy as np
import torch
from torch import nn
from torch.nn import functional as F
from torchvision import transforms, datasets
```
**NOTE**: it is recommended to watch [this link](https://drive.google.com/file/d/1jARX0gjNZwpkcMloOnE8HmngIYDQ6sIB/view?usp=sharing) about "Intoduction of how to code in Pytorc... | github_jupyter |
# Top Charts Exploratory Data Analysis
## Loading Dependencies
```
import pandas as pd
from collections import Counter
import altair as alt
import nltk
import regex as re
```
## Loading in Data
```
df = pd.read_csv('cleaned_data/all_top_songs_with_genres_nolist.csv')
# preview of dataframe
df.head()
```
## Cleanin... | github_jupyter |
# Quickstart
A quick introduction on how to use the OQuPy package to compute the dynamics of a quantum system that is possibly strongly coupled to a structured environment. We illustrate this by applying the TEMPO method to the strongly coupled spin boson model.
**Contents:**
* Example - The spin boson model
* 1.... | github_jupyter |
```
import jieba
import matplotlib.pyplot as plt
import pandas as pd
from wordcloud import (WordCloud, get_single_color_func,STOPWORDS)
import re
class SimpleGroupedColorFunc(object):
"""Create a color function object which assigns EXACT colors
to certain words based on the color to words mapping
"""
... | github_jupyter |
<img src='./img/EU-Copernicus-EUM_3Logos.png' alt='Logo EU Copernicus EUMETSAT' align='right' width='50%'></img>
<br>
<br>
<a href="./index_ltpy.ipynb"><< Index</a><span style="float:right;"><a href="./12_ltpy_WEkEO_harmonized_data_access_api.ipynb">12 - WEkEO Harmonized Data Access API >></a></span>
# 1.1 Atmospher... | github_jupyter |
```
from erddapy import ERDDAP
import pandas as pd
import numpy as np
## settings (move to yaml file for routines)
server_url = 'http://akutan.pmel.noaa.gov:8080/erddap'
maxdepth = 0 #keep all data above this depth
site_str = 'M8'
region = 'bs'
substring = ['bs8','bs8'] #search substring useful for M2
prelim=[]
#this... | github_jupyter |
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import tensorflow as tf
from utils.plotting import plot_dataset
from tensorflow.keras import layers
from sklearn.model_selection import train_test_split
# Load Dataset
df = pd.read_csv('data/ex.csv')
dataset = df.copy()
X = datase... | github_jupyter |
### Plot Comulative Distribution Of Sportive Behavior Over Time
```
%load_ext autoreload
%autoreload 2
%matplotlib notebook
from sensible_raw.loaders import loader
from world_viewer.cns_world import CNSWorld
from world_viewer.synthetic_world import SyntheticWorld
from world_viewer.glasses import Glasses
import matplot... | github_jupyter |
# Finding Conserved Patterns Across Two Time Series
## AB-Joins
This tutorial is adapted from the [Matrix Profile I](https://www.cs.ucr.edu/~eamonn/PID4481997_extend_Matrix%20Profile_I.pdf) paper and replicates Figures 9 and 10.
Previously, we had introduced a concept called [time series motifs](https://stumpy.read... | github_jupyter |
# PCMark benchmark on Android
The goal of this experiment is to run benchmarks on a Pixel device running Android with an EAS kernel and collect results. The analysis phase will consist in comparing EAS with other schedulers, that is comparing *sched* governor with:
- interactive
- performance
- powersave
... | github_jupyter |
```
import numpy as numpy
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
train = pd.read_csv('titanic_train.csv')
train.head()
```
### Missing Data
```
train.isnull()
sns.heatmap(train.isnull(),yticklabels=False,cbar=False,cmap='viridis')
```
Roughly 20 percent of the Ag... | github_jupyter |
```
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
from sklearn.cluster import KMeans
from sklearn.metrics import adjusted_rand_score
documents = ['This is the first sentence.',
'This one is the second sentence.',
'And this is the third one.',
'Is th... | github_jupyter |
## Exercise 3
In the videos you looked at how you would improve Fashion MNIST using Convolutions. For your exercise see if you can improve MNIST to 99.8% accuracy or more using only a single convolutional layer and a single MaxPooling 2D. You should stop training once the accuracy goes above this amount. It should happ... | github_jupyter |
# Distributing standardized COMBINE archives with Tellurium
<div align='center'><img src="https://raw.githubusercontent.com/vporubsky/tellurium-libroadrunner-tutorial/master/tellurium-and-libroadrunner.png" width="60%" style="padding: 20px"></div>
<div align='center' style='font-size:100%'>
Veronica L. Porubsky, BS
<d... | 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 |
```
%matplotlib inline
import pandas as pd
import numpy as np
import os
from plotnine import *
```
## Overview
* select 5'UTRs longer than 80 nt
* count reads aligned to these UTRs (pysam)
* plot utr reads -bcm vs utr reads + bcm
* select UTRs with increased number of reads upon addition of BCM (clustering?)
* compar... | github_jupyter |
```
# LSTM for Human Activity Recognition
Human activity recognition using smartphones dataset and an LSTM RNN. Classifying the type of movement amongst six categories:
- WALKING,
- WALKING_UPSTAIRS,
- WALKING_DOWNSTAIRS,
- SITTING,
- STANDING,
- LAYING.
## Video dataset overview
Follow this link to see a video of ... | github_jupyter |
# Build Clause Clusters with Book Boundaries
```
from tf.app import use
bhsa = use('bhsa')
F, E, T, L = bhsa.api.F, bhsa.api.E, bhsa.api.T, bhsa.api.L
from pathlib import Path
# divide texts evenly into slices of 50 clauses
def cluster_clauses(N):
clusters = []
for book in F.otype.s('book'):
... | github_jupyter |
# 转置卷积
:label:`sec_transposed_conv`
到目前为止,我们所见到的卷积神经网络层,例如卷积层( :numref:`sec_conv_layer`)和汇聚层( :numref:`sec_pooling`),通常会减少下采样输入图像的空间维度(高和宽)。
然而如果输入和输出图像的空间维度相同,在以像素级分类的语义分割中将会很方便。
例如,输出像素所处的通道维可以保有输入像素在同一位置上的分类结果。
为了实现这一点,尤其是在空间维度被卷积神经网络层缩小后,我们可以使用另一种类型的卷积神经网络层,它可以增加上采样中间层特征图的空间维度。
在本节中,我们将介绍
*转置卷积*(transposed conv... | github_jupyter |
### Analysis
1. From the tested treatments, Capomulina and Ramican show the largest reduction in tumor volume. Given how similar both treatments performed, further testing is necessary to determine which regimen will work the best.
2. The correlation coefficient for mouse weight and average tumor volume is approxima... | github_jupyter |
## TODO
* Add O2C and C2O seasonality
* Look at diff symbols
* Look at fund flows
## Key Takeaways
* ...
In the [first post](sell_in_may.html) of this short series, we covered several seasonality patterns for large cap equities (i.e, SPY), most of which continue to be in effect.
The findings of that exercise spar... | github_jupyter |
# JWT based authentification
In the API world, authentification is a process where we want to authenticate a user. In real world applications, only authenticated users can access the API. Additionaly, we may want to track how much does a specific user query an API.
To solve the complex issue of authentification, th... | github_jupyter |
<a href="https://colab.research.google.com/github/yarengozutok/HU-BBY162-2022/blob/main/Python_101-2022.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
#Bölüm 00: Python'a Giriş
## Yazar Hakkında
Yaren Gözütok
##Çalışma Defteri Hakkında
Bu çalış... | github_jupyter |
## AI for Medicine Course 1 Week 1 lecture exercises
<a name="densenet"></a>
# Densenet
In this week's assignment, you'll be using a pre-trained Densenet model for image classification.
Densenet is a convolutional network where each layer is connected to all other layers that are deeper in the network
- The first l... | github_jupyter |
# Set Up
The first 5 lines are importing libraries that will be needed later in the notebook. The next lines are setting up the connection to the google service account.
# Getting a Google Service Account
Here is another great tutorial on using Google Sheets and in the begining it shows the steps to create a google se... | github_jupyter |
Simple testing of FBT in Warp. Just transform beam in a drift. No solenoid included and no inverse transform.
```
%matplotlib notebook
import sys
del sys.argv[1:]
from warp import *
from warp.data_dumping.openpmd_diag import particle_diag
import numpy as np
import os
from copy import deepcopy
import matplotlib.pyplot ... | github_jupyter |
```
import pandas as pd
import numpy as np
import seaborn as sns
import os
from matplotlib import pyplot as plt
import numpy as np
from sklearn import linear_model
from sklearn.model_selection import train_test_split
from matplotlib.mlab import PCA as mlabPCA
from sklearn.preprocessing import StandardScaler
from sklear... | github_jupyter |
### Deep learning for identifying the orientation Scanned images
First we will load the train and test data and create a CTF file
```
import os
from PIL import Image
import numpy as np
import itertools
import random
import time
import matplotlib.pyplot as plt
import cntk as C
def split_line(line):
splits = lin... | github_jupyter |
# Adversarial Attacks Example in PyTorch
## Import Dependencies
This section imports all necessary libraries, such as PyTorch.
```
from __future__ import print_function
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torchvision
from torchvision import datasets, ... | github_jupyter |
[**Blueprints for Text Analysis Using Python**](https://github.com/blueprints-for-text-analytics-python/blueprints-text)
Jens Albrecht, Sidharth Ramachandran, Christian Winkler
**If you like the book or the code examples here, please leave a friendly comment on [Amazon.com](https://www.amazon.com/Blueprints-Text-Ana... | github_jupyter |
```
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import quandl
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import time
import datetime
from datetime import datetime
#selected = ['WALMEX', 'GRUMAB', 'PE&OLES']
# get adjusted closing prices of 5 selected companies with Quandl
quandl.ApiConfig.... | github_jupyter |
<img src='../img/dust_banner.png' alt='Training school and workshop on dust' align='center' width='100%'></img>
<br>
# Day 2 - Assignment
### About
> So far, we analysed Aerosol Optical Depth from different types of data (satellite, model-based and ground-based observations) for a single dust event. Let us now broa... | github_jupyter |
# PixelCNN
**Author:** [ADMoreau](https://github.com/ADMoreau)<br>
**Date created:** 2020/05/17<br>
**Last modified:** 2020/05/23<br>
**Description:** PixelCNN implemented in Keras.
## Introduction
PixelCNN is a generative model proposed in 2016 by van den Oord et al.
(reference: [Conditional Image Generation with P... | github_jupyter |
# 批量规范化
:label:`sec_batch_norm`
训练深层神经网络是十分困难的,特别是在较短的时间内使他们收敛更加棘手。
在本节中,我们将介绍*批量规范化*(batch normalization) :cite:`Ioffe.Szegedy.2015`,这是一种流行且有效的技术,可持续加速深层网络的收敛速度。
再结合在 :numref:`sec_resnet`中将介绍的残差块,批量规范化使得研究人员能够训练100层以上的网络。
## 训练深层网络
为什么需要批量规范化层呢?让我们来回顾一下训练神经网络时出现的一些实际挑战。
首先,数据预处理的方式通常会对最终结果产生巨大影响。
回想一下我们应用多层感知机来预测房... | github_jupyter |
# "Poleval 2021 through wav2vec2"
> "Trying for pronunciation recovery"
- toc: false
- branch: master
- comments: true
- hidden: true
- categories: [wav2vec2, poleval, colab]
```
%%capture
!pip install gdown
!gdown https://drive.google.com/uc?id=1b6MyyqgA9D1U7DX3Vtgda7f9ppkxjCXJ
%%capture
!tar zxvf poleval_wav.train... | github_jupyter |
<a href="https://colab.research.google.com/github/wel51x/DS-Unit-4-Sprint-4-Deep-Learning/blob/master/My_LS_DS_441_RNN_and_LSTM_Assignment.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Lambda School Data Science - Recurrent Neural Networks and L... | github_jupyter |
# Coase and Property
> Coase, R. H. 1960. “The Problem of Social Cost.” *The Journal of Law and Economics* 3:1–44.
> Coase, Ronald H. 1937. “The Nature of the Firm.” *Economica* 4 (16):386–405.
**Slideshow mode**: this notebook can be viewed as a slideshow by pressing Alt-R if run on a server.
## Coase (1960) The P... | github_jupyter |
# Tune a CNN on MNIST
This tutorial walks through using Ax to tune two hyperparameters (learning rate and momentum) for a PyTorch CNN on the MNIST dataset trained using SGD with momentum.
```
import torch
import numpy as np
from ax.plot.contour import plot_contour
from ax.plot.trace import optimization_trace_single_... | github_jupyter |
```
#import sys
#!{sys.executable} -m pip install --user alerce
```
# light_transient_matching
## Matches DESI observations to ALERCE and DECAM ledger objects
This code predominately takes in data from the ALERCE and DECAM ledger brokers and identifies DESI observations within 2 arcseconds of those objects, suspected... | github_jupyter |
```
%matplotlib inline
```
# Cascade decomposition
This example script shows how to compute and plot the cascade decompositon of
a single radar precipitation field in pysteps.
```
from matplotlib import cm, pyplot as plt
import numpy as np
import os
from pprint import pprint
from pysteps.cascade.bandpass_filters i... | github_jupyter |
##### Copyright 2021 The TF-Agents 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 a... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.