text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
# Introduction
Try writing some **SELECT** statements of your own to explore a large dataset of air pollution measurements.
Run the cell below to set up the feedback system.
```
# Set up feedback system
from learntools.core import binder
binder.bind(globals())
from learntools.sql.ex2 import *
print("Setup Complete")... | github_jupyter |
```
import numpy as np
import pandas as pd
import json
import shap
import matplotlib.pyplot as plt
from matplotlib import rc
from colour import Color
from matplotlib.colors import ListedColormap, LinearSegmentedColormap
import collections
import pickle
colors = ['#3f7f93','#da3b46','#F6AE2D', '#98b83b', '#825FC3']
cmp... | 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"> SVM (Support Vector Machines)</font></h1>
In this notebook, you will use SVM (Support Vector Machines) to build and train a mod... | github_jupyter |
# Use Spark to predict credit risk with `ibm-watson-machine-learning`
This notebook introduces commands for model persistance to Watson Machine Learning repository, model deployment, and scoring.
Some familiarity with Python is helpful. This notebook uses Python 3.6 and Apache® Spark 2.4.
You will use **German Credi... | github_jupyter |
```
%pylab inline
import pandas as pd
import numpy as np
import pickle,itertools,sys,pdb
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import graphviz
from ultron.factor.genetic.accumulators import mutated_pool, cross_pool
from ultron.sentry.Analysis.SecurityValueHolders import SecurityValueHo... | github_jupyter |
```
import sys
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from astropy import constants as const
# remove this line if you installed platypos with pip
sys.path.append('/work2/lketzer/work/gitlab/platypos_group/platypos/')
import platypos
from platypos import Planet_LoFo14
from pla... | github_jupyter |
### Prepare the Dataset for Building a Predictive Model
As a first step we will build a graph convolution model predict ERK2 activity. We will train the model to distinguish a set of ERK2 active compounds from a set of decoy compounds. The active and decoy compounds are derived from the DUD-E database. In order to g... | github_jupyter |
```
import cv2
import numpy as np
from matplotlib import pyplot as plt
import os
import xlsxwriter
import pandas as pd # Excel
import struct # Binary writing
import scipy.io as sio # Read .mat files
import h5py
import time
from grading__old import *
from ipywidgets import FloatProgress
from IPython.display import d... | github_jupyter |
# Exercises
## Simple array manipulation
Investigate the behavior of the statements below by looking
at the values of the arrays a and b after assignments:
```
a = np.arange(5)
b = a
b[2] = -1
b = a[:]
b[1] = -1
b = a.copy()
b[0] = -1
```
Generate a 1D NumPy array containing numbers from -2 to 2
in increments of 0.2... | github_jupyter |
<a href="https://colab.research.google.com/github/Tessellate-Imaging/monk_v1/blob/master/study_roadmaps/2_transfer_learning_roadmap/3_effect_of_number_of_classes_in_dataset/3)%20Understand%20transfer%20learning%20and%20the%20role%20of%20number%20of%20dataset%20classes%20in%20it%20-%20Keras.ipynb" target="_parent"><img ... | github_jupyter |
```
import swat
import pandas as pd
import os
from sys import platform
import riskpy
from os.path import join as path
if "CASHOST" in os.environ:
# Create a session to the CASHOST and CASPORT variables set in your environment
conn = riskpy.SessionContext(session=swat.CAS(),
cas... | github_jupyter |
# Semantic Function Species (part 2)
```
from scripts.imports import *
out = Exporter(
paths['outdir'],
'semantics'
)
from IPython.display import HTML, display
df.columns
```
# Miscellaneous Functions
```
df[df.funct_type == 'secondary'].function.value_counts()
funct2names = {
'purposive_ext':['purpext... | github_jupyter |
TSG108 - View the controller upgrade config map
===============================================
Description
-----------
When running a Big Data Cluster upgrade using `azdata bdc upgrade`:
`azdata bdc upgrade --name <namespace> --tag <tag>`
It may fail with:
> Upgrading cluster to version 15.0.4003.10029\_2
>
> NOT... | github_jupyter |
```
# These are all the modules we'll be using later. Make sure you can import them
# before proceeding further.
from __future__ import print_function
import os
import numpy as np
import random
import math
import string
import tensorflow as tf
import zipfile
from six.moves import range
from six.moves.urllib.request imp... | github_jupyter |
## February and April 2020 precipitation anomalies
In this notebook, we will analyze precipitation anomalies of February and April 2020, which seemed to be very contrasting in weather. We use the EOBS dataset.
### Import packages
```
##This is so variables get printed within jupyter
from IPython.core.interactiveshel... | github_jupyter |
# Collaboration Patterns By Year (International, Domestic, Internal)
Using the count capability of the API, Dimensions allows you to quickly identify international, domestic, and inernal Collaboration
This notebook shows how to quickly identify international, domestic, and internal collaboration using the [Organizati... | github_jupyter |
```
import warnings
warnings.filterwarnings("ignore")
import sys
import itertools
from keras.layers import Input, Dense, Reshape, Flatten
from keras import layers, initializers
from keras.models import Model, load_model
import keras.backend as K
import numpy as np
from seqtools import SequenceTools as ST
from gfp_gp i... | github_jupyter |
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Datasets/Terrain/srtm_landforms.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a target="_blan... | github_jupyter |
```
from bokeh.io import output_notebook, show, reset_output
import numpy as np
output_notebook()
from IPython.display import IFrame
IFrame('https://demo.bokehplots.com/apps/sliders', width=900, height=500)
```
### Basic scatterplot
```
from bokeh.io import output_notebook, show
from bokeh.plotting import figure
# cr... | github_jupyter |
```
%matplotlib notebook
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from astropy.time import Time
def convert_to_ap_Time(df, key):
print(key)
df[key] = pd.to_datetime(df[key])
df[key] = Time([t1.astype(str) for t1 in df[key].values], format="isot")
return df
def convert_ti... | github_jupyter |
```
%reload_ext autoreload
%autoreload 2
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
from sklearn.datasets import load_digits, load_iris
from sklearn.model_selection import train_test_split
from pca import pca as MyPCA
```
# Load Digit Dataset
```
digits... | github_jupyter |
```
import util
import jax
import jax.numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import numpy as base_np
from epiweeks import Week, Year
start = '2020-03-15'
forecast_start = '2020-04-19'
num_weeks = 8
data = util.load_state_data()
places = sorted(list(data.keys()))
#places = ['AK', 'AL']
allQ... | github_jupyter |
# Estimating the biomass of terrestrial arthropods
To estimate the biomass of terrestrial arthropods, we rely on two parallel methods - a method based on average biomass densities of arthropods extrapolated to the global ice-free land surface, and a method based on estimates of the average carbon content of a character... | github_jupyter |
# Pandas Exercise
```
import matplotlib.pyplot as plt
import numpy as np
np.random.seed(0)
import pandas as pd
def df_info(df: pd.DataFrame) -> None:
return df.head(n=20).style
```
## Cars Auction Dataset
| Feature | Type | Description ... | github_jupyter |
## inference in simple model using synthetic data
population size 10^6, inference window 2x4 = 8 days, to be compared with ``-win5`` analogous notebook
```
%env OMP_NUM_THREADS=1
%matplotlib inline
import numpy as np
import os
import pickle
import pprint
import time
import pyross
import matplotlib.pyplot as plt
impor... | github_jupyter |
```
'''
Notebook to specifically study correlations between ELG targets and Galactic foregrounds
Much of this made possible and copied from script shared by Anand Raichoor
Run in Python 3; install pymangle, fitsio, healpy locally: pip install --user fitsio; pip install --user healpy; git clone https://github.com/eshe... | github_jupyter |
# Swish-based classifier with data augmentation and stochastic weght-averaging
- Swish activation, 4 layers, 100 neurons per layer
- Data is augmentaed via phi rotations, and transvers and longitudinal flips
- Model uses a running average of previous weights
- Validation score use ensemble of 10 models weighted by loss... | github_jupyter |
```
import csv
import numpy as np
import os
import pandas as pd
import scipy.interpolate
import sklearn.metrics
import sys
sys.path.append("../src")
import localmodule
if sys.version_info[0] < 3:
from StringIO import StringIO
else:
from io import StringIO
from matplotlib import pyplot as plt
%matplotlib in... | github_jupyter |
# Skip-gram Word2Vec
In this notebook, I'll lead you through using PyTorch to implement the [Word2Vec algorithm](https://en.wikipedia.org/wiki/Word2vec) using the skip-gram architecture. By implementing this, you'll learn about embedding words for use in natural language processing. This will come in handy when dealin... | github_jupyter |
# Problem Statement
Customer churn and engagement has become one of the top issues for most banks. It costs significantly more to acquire new customers than retain existing. It is of utmost important for a bank to retain its customers.
We have a data from a MeBank (Name changed) which has a data of 7124 customers. ... | github_jupyter |
# **Lab Session : Feature extraction II**
Author: Vanessa Gómez Verdejo (http://vanessa.webs.tsc.uc3m.es/)
Updated: 27/02/2017 (working with sklearn 0.18.1)
In this lab session we are going to work with some of the kernelized extensions of most well-known feature extraction techniques: PCA, PLS and CCA.
As in the p... | github_jupyter |
Practical 1: Sentiment Detection of Movie Reviews
========================================
This practical concerns sentiment detection of movie reviews.
In [this file](https://gist.githubusercontent.com/bastings/d47423301cca214e3930061a5a75e177/raw/5113687382919e22b1f09ce71a8fecd1687a5760/reviews.json) (80MB) you will... | github_jupyter |
```
from keras.models import Sequential
from keras.layers import Dense, Activation
from keras.layers import LSTM
from keras.optimizers import RMSprop
from keras.utils.data_utils import get_file
import numpy as np
import random
import sys
path = get_file('nietzsche.txt', origin='https://s3.amazonaws.com/text-datasets/ni... | github_jupyter |
- 广发证券之《深度学习之股指期货日内交易策略》
- 《宽客人生》
- 《主动投资组合管理》
-
-------------------------------------------------------
量化研报只是应付客户而做的产物,对于实际交易用处不大
策略对于市场的参数时刻都在变化
策略+相应的参数调整才是完整的
策略本身也需要非常强的主观调整 ----------周杰
拿到一个静态的策略并不是一个万能钥匙,对于细节处没多大用处,挣钱完全是靠细节
世界不存在一种一成不变的交易体系能让你永远的挣钱
---------------------------------... | github_jupyter |
## Passing Messages to Processes
As with threads, a common use pattern for multiple processes is to divide a job up among several workers to run in parallel. Effective use of multiple processes usually requires some communication between them, so that work can be divided and results can be aggregated. A simple way to ... | github_jupyter |
# Random Forest Project
For this project we will be exploring publicly available data from [LendingClub.com](www.lendingclub.com). Lending Club connects people who need money (borrowers) with people who have money (investors). Hopefully, as an investor you would want to invest in people who showed a profile of having... | github_jupyter |
# Chainer MNIST Model Deployment
* Wrap a Chainer MNIST python model for use as a prediction microservice in seldon-core
* Run locally on Docker to test
* Deploy on seldon-core running on minikube
## Dependencies
* [Helm](https://github.com/kubernetes/helm)
* [Minikube](https://github.com/kubernetes/miniku... | github_jupyter |
# An Introduction to SageMaker LDA
***Finding topics in synthetic document data using Spectral LDA algorithms.***
---
1. [Introduction](#Introduction)
1. [Setup](#Setup)
1. [Training](#Training)
1. [Inference](#Inference)
1. [Epilogue](#Epilogue)
# Introduction
***
Amazon SageMaker LDA is an unsupervised learning ... | github_jupyter |
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.linear_model import LinearRegression
from functions import *
%matplotlib inline
```
Per trovare i materiali che compongono i cluster scegliamo di **non eseguire un fit su ogni spettro all'interno di un determinato cluster**, ma **p... | github_jupyter |
# Teste para Duas Médias - ANOVA (Analysis of Variance)
Análise de variância é a técnica estatística que permite avaliar afirmações sobre as médias de populações. A análise visa, fundamentalmente, verificar se existe uma diferença significativa entre as médias e se os fatores exercem influência em alguma variável depe... | github_jupyter |
# Import development libraries
```
import bw2data as bd
import bw2calc as bc
import bw_processing as bwp
import numpy as np
import matrix_utils as mu
```
# Create new project
```
bd.projects.set_current("Multifunctionality")
```
Our existing implementation allows us to distinguish activities and prodducts, though n... | github_jupyter |
___
<a href='http://www.pieriandata.com'><img src='../Pierian_Data_Logo.png'/></a>
___
<center><em>Copyright Pierian Data</em></center>
<center><em>For more information, visit us at <a href='http://www.pieriandata.com'>www.pieriandata.com</a></em></center>
# DataFrames
DataFrames are the workhorse of pandas and are ... | github_jupyter |
```
# general tools
import warnings
import requests
import pickle
import math
import re
# visualization tools
import matplotlib.pyplot as plt
from tqdm.auto import tqdm
import seaborn as sns
# data preprocessing tools
import pandas as pd
from shapely.geometry import Point
import numpy as np
from scipy.spatial.distanc... | github_jupyter |
## Ensembl to RefSeq Mapping
The constraint table from gnomAD has duplicate gene ID's - in the example of TUBB3 one gene ID is missannotated. Given out analysis is by transcript, it is probably better to use the transcript table from gnomAD. Howver, gnomAD used ENSEMBL transcripts and we used RefSeq Transcripts. Can m... | github_jupyter |
练习 1:求n个随机整数均值的平方根,整数范围在m与k之间。
```
import random, math
def test():
i = 0
total = 0
average = 0
number = random.randint(m, k)
while i < n:
i += 1
total += number
number = random.randint(m, k)
print('随机数是:', number)
average = int(total/n)
ret... | github_jupyter |
# Locality Sensitive Hashing
```
import numpy as np
import pandas as pd
from scipy.sparse import csr_matrix
from sklearn.metrics.pairwise import pairwise_distances
import time
from copy import copy
import matplotlib.pyplot as plt
%matplotlib inline
'''compute norm of a sparse vector
Thanks to: Jaiyam Sharma'''
def... | github_jupyter |
# Classification
```
from nltk.corpus import reuters
import spacy
import re
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.preprocessing import MultiLabelBinarizer
from sklearn.svm import LinearSVC
from sklearn.multiclass import OneVsRestClassifier
from sklearn.metrics imp... | github_jupyter |
```
import torch
import torch.utils.data
from torch.autograd import Variable
import torch.nn as nn
import torch.optim as optim
import numpy as np
import h5py
from data_utils import get_data
import matplotlib.pyplot as plt
from solver_pytorch import Solver
# Load data from all .mat files, combine them, eliminate EOG sig... | github_jupyter |
Rossler performance experiments
```
import numpy as np
import torch
import sys
sys.path.append("../")
import utils as utils
import NMC as models
import importlib
```
## SVAM
```
# LiNGAM / SVAM performance with sparse data
import warnings
warnings.filterwarnings("ignore")
for p in [10, 50]:
perf = []
for i... | 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 |
# CME Smart Stream on Google Cloud Platform Tutorials
## Getting CME Binary Data from CME Smart Stream on Google Cloud Platform (GCP)
This workbook demonstrates the ability to quickly use the CME Smart Stream on GCP solution. Through the examples, we will
- Authenticate using GCP IAM information
- Configure which CM... | github_jupyter |
```
from __future__ import division
%matplotlib inline
import sys
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import scipy.io as io
import pickle
import scipy.stats
SBJ = 'colin_test2'
prj_dir = '/Volumes/hoycw_clust/PRJ_Error_eeg/'#'/Users/sheilasteiner/Desk... | github_jupyter |
#### _Speech Processing Labs 2021: SIGNALS 1: Digital Signals: Sampling and Superposition_
```
## Run this first!
%matplotlib inline
import sys
import matplotlib.pyplot as plt
import numpy as np
import cmath
from matplotlib.animation import FuncAnimation
from IPython.display import HTML
plt.style.use('ggplot')
from ... | github_jupyter |
<img src="../../img/logo_amds.png" alt="Logo" style="width: 128px;"/>
# AmsterdamUMCdb - Freely Accessible ICU Database
version 1.0.2 March 2020
Copyright © 2003-2020 Amsterdam UMC - Amsterdam Medical Data Science
## Sequential Organ Failure Assessment (SOFA)
The sequential organ failure assessment score (SOF... | github_jupyter |
<a href="https://colab.research.google.com/github/aubricot/computer_vision_with_eol_images/blob/master/object_detection_for_image_cropping/chiroptera/chiroptera_train_tf2_ssd_rcnn.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Train Tensorflow Fa... | github_jupyter |
## **Yolov3 Algorithm**
```
import struct
import numpy as np
import pandas as pd
import os
from keras.layers import Conv2D
from keras.layers import Input
from keras.layers import BatchNormalization
from keras.layers import LeakyReLU
from keras.layers import ZeroPadding2D
from keras.layers import UpSampling2D
from kera... | github_jupyter |
```
################################ NOTES ##############################ex
# Lines of code that are to be excluded from the documentation are #ex
# marked with `#ex` at the end of the line. #ex
# #ex
# To ensure ... | github_jupyter |
# Recognize named entities on Twitter with LSTMs
In this assignment, you will use a recurrent neural network to solve Named Entity Recognition (NER) problem. NER is a common task in natural language processing systems. It serves for extraction such entities from the text as persons, organizations, locations, etc. In t... | github_jupyter |
# TV Script Generation
In this project, you'll generate your own [Seinfeld](https://en.wikipedia.org/wiki/Seinfeld) TV scripts using RNNs. You'll be using part of the [Seinfeld dataset](https://www.kaggle.com/thec03u5/seinfeld-chronicles#scripts.csv) of scripts from 9 seasons. The Neural Network you'll build will ge... | github_jupyter |
# The Perceptron
```
import mxnet as mx
from mxnet import nd, autograd
import matplotlib.pyplot as plt
import numpy as np
mx.random.seed(1)
```
## A Separable Classification Problem
```
# generate fake data that is linearly separable with a margin epsilon given the data
def getfake(samples, dimensions, epsilon):
... | github_jupyter |
```
import pandas as pd
import numpy as np
HUES64_rep1_tfxn1_fs = ["../../../data/02__mpra/01__counts/07__HUES64_rep6_lib1_BARCODES.txt",
"../../../data/02__mpra/01__counts/07__HUES64_rep6_lib2_BARCODES.txt"]
HUES64_rep1_tfxn2_fs = ["../../../data/02__mpra/01__counts/08__HUES64_rep7_lib1_BARCODE... | github_jupyter |
# Building our operators: the Face Divergence
The divergence is the integral of a flux through a closed surface as that enclosed volume shrinks to a point. Since we have discretized and no longer have continuous functions, we cannot fully take the limit to a point; instead, we approximate it around some (finite!) volu... | github_jupyter |
# Synthetic seismogram
This notebook looks at the convolutional model of a seismic trace.
For a fuller example, see [Bianco, E (2004)](https://github.com/seg/tutorials-2014/blob/master/1406_Make_a_synthetic/how_to_make_synthetic.ipynb) in *The Leading Edge*.
First, the usual preliminaries.
```
import numpy as np
im... | github_jupyter |
<a href="https://colab.research.google.com/github/Serbeld/RX-COVID-19/blob/master/Detection5C_NormNew_v2.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
!pip install lime
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from t... | github_jupyter |
# RidgeRegression with Scale & Power Transformer
This Code template is for the regression analysis using simple Ridge Regression with Feature Rescaling technique Scale and Feature Transformation technique PowerTransformer in a pipeline. Ridge Regression is also known as Tikhonov regularization.
### Required Packages... | github_jupyter |
# Understanding Principal Component Analysis
**Outline**
* [Introduction](#intro)
* [Assumption and derivation](#derive)
* [PCA Example](#example)
* [PCA Usage](#usage)
```
%load_ext watermark
%matplotlib inline
# %config InlineBackend.figure_format='retina'
from matplotlib import pyplot as plt
import pandas as pd
... | github_jupyter |
# Chatbot using Seq2Seq LSTM models
In this notebook, we will assemble a seq2seq LSTM model using Keras Functional API to create a working Chatbot which would answer questions asked to it.
Chatbots have become applications themselves. You can choose the field or stream and gather data regarding various questions. We c... | github_jupyter |
```
from config import *
import mPyPl as mp
from mPyPl.utils.flowutils import *
from mpyplx import *
from pipe import Pipe
from functools import partial
import numpy as np
import cv2
import itertools
from moviepy.editor import *
import pickle
import functools
from config import *
test_names = (
from_json(os.path.... | github_jupyter |
# Find \*.tifs with no matching \*.jpg
#### Created on Cinco de Mayo in 2020 by Jeremy Moore and David Armstrong to identify \*.tif images that don't have a matching \*.jpg image for the Asian Art Museum of San Francisco
1. Manually set root_dir_path to the full path of the directory containing your *all_jpgs* and *a... | github_jupyter |
# Computer Vision Nanodegree
## Project: Image Captioning
---
In this notebook, you will learn how to load and pre-process data from the [COCO dataset](http://cocodataset.org/#home). You will also design a CNN-RNN model for automatically generating image captions.
Note that **any amendments that you make to this no... | github_jupyter |
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import operator
df_Confirmed=pd.read_csv('/content/drive/My Drive/datasets/Tensorflow community challenge /Datasets /time_series_2019-ncov-Confirmed (1).csv')
df_Confirmed.head()
draft=df_Confirmed.copy()
df_Confirmed.keys... | github_jupyter |
# Introduction
A mass on a spring experiences a force described by Hookes law.
For a displacment $x$, the force is
$$F=-kx,$$
where $k$ is the spring constant with units of N/m.
The equation of motion is
$$ F = ma $$
or
$$ -k x = m a .$$
Because acceleration is the second derivative of displacment, this is
a differ... | github_jupyter |
A **Deep Q Network** implementation in tensorflow with target network & random
experience replay. The code is tested with Gym's discrete action space
environment, CartPole-v0 on Colab.
---
## Notations:
Model network = $Q_{\theta}$
Model parameter = $\theta$
Model network Q value = $Q_{\theta}$ (s, a)
Target netw... | github_jupyter |
# Using PS GPIO with PYNQ
## Goal
The aim of this notebook is to show how to use the Zynq PS GPIO from PYNQ. The PS GPIO are simple wires from the PS, and don't need a controller in the programmable logic.
Up to 96 input, output and tri-state PS GPIO are available via the EMIO in the Zynq Ultrascale+. They can be u... | github_jupyter |
# Example 1d: Spin-Bath model, fitting of spectrum and correlation functions
### Introduction
The HEOM method solves the dynamics and steady state of a system and its environment, the latter of which is encoded in a set of auxiliary density matrices.
In this example we show the evolution of a single two-level system... | github_jupyter |
<a href="https://colab.research.google.com/github/Tessellate-Imaging/Monk_Object_Detection/blob/master/example_notebooks/4_efficientdet/train%20-%20with%20validation%20dataset.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Installation
- Run th... | github_jupyter |
# Generating conditional probability tables subject to constraints
```
import os
from pathlib import Path
from itertools import product
import numpy as np
import pandas as pd
from fake_data_for_learning.fake_data_for_learning import (
BayesianNodeRV, FakeDataBayesianNetwork, SampleValue
)
from fake_data_for_lea... | github_jupyter |
# Spatiotemporal distribution of AxFUCCI cells
```
# Required libraries
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
import scipy
import os
import seaborn as sns
from pyabc import (Distribution, History)
# Experimental data
outgrowth_df = pd.read_csv('./outgrowth.csv')
out... | github_jupyter |
# Set up Azure ML Automated Machine Learning on SQL Server 2019 CTP 2.4 big data cluster
\# Prerequisites:
\# - An Azure subscription and resource group
\# - An Azure Machine Learning workspace
\# - A SQL Server 2019 CTP 2.4 big data cluster with Internet access and a database named 'automl'
\# - Azure C... | github_jupyter |
```
#Note: You need to reset the kernel for the keras installation to take place
#Todo: Remove this line once it is installed, reset the kernel: Menu > Kernel > Reset & Clear Output
!git clone https://github.com/fchollet/keras.git && cd keras && python setup.py install --user
import keras
from keras.applications.incept... | github_jupyter |
# Depression Detection in Social Media Posts
#### Imports
```
import warnings
warnings.filterwarnings("ignore")
import ftfy
import matplotlib.pyplot as plt
import nltk
import numpy as np
import pandas as pd
import re
from math import exp
from numpy import sign
from sklearn.metrics import classification_report, con... | github_jupyter |
# Feldman and Cousins intervals with asymptotics.
This is a copy of `FC_interval_freq.ipynb` using the asymptotic formulae instead of toys.
```
import numpy as np
import matplotlib.pyplot as plt
import os
import time
import zfit
from zfit.loss import UnbinnedNLL
from zfit.minimize import Minuit
zfit.settings.set_see... | github_jupyter |
```
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import xarray as xr
import cartopy.crs as ccrs
import glob
import os
import scipy.stats
from matplotlib import cm
import seaborn as sns
import dask
import pickle
from datetime import datetime
import ast
from dask.distributed import Client, Local... | github_jupyter |
```
%load_ext watermark
%watermark -p torch,pytorch_lightning,torchvision,torchmetrics,matplotlib
%load_ext pycodestyle_magic
%flake8_on --ignore W291,W293,E703
```
<a href="https://pytorch.org"><img src="https://raw.githubusercontent.com/pytorch/pytorch/master/docs/source/_static/img/pytorch-logo-dark.svg" width="90"... | github_jupyter |
## Drawing Edgeworth Box
```
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
%matplotlib inline
def Edgeworth_box(u1, u2, util1, util2, MRS1, MRS2, ttl, ttl_margin= 1, top=0.7, fname=None):
l1 = 0.00000001
x1 = np.arange(l1, u1, 0.01)
x2 = np.arange(l1, u2, 0.01)... | github_jupyter |
#### ΠΡΟΣΟΧΗ:
Τα joblib dumps των τελικών `corpus_tf_idf.pkl` και `som.pkl` δεν περιέχονται στο zip file καθώς είχαν απαγορευτικά μεγάλο μέγεθος. Αυτό ΔΕΝ οφείλεται σε δική μας ελλιπή υλοποίηση, αλλά σε μια ιδιομορφία του corpus που μας αντιστοιχεί και αναγκάζει ορισμένους πίνακες να αντιστοιχίζονται αχρείαστα σε float... | github_jupyter |
### Abstract
This is an example to show to use use the basic API of TensorFlow, to construct a linear regression model.
This notebook is an exercise adapted from [the Medium.com blog](https://medium.com/@saxenarohan97/intro-to-tensorflow-solving-a-simple-regression-problem-e87b42fd4845).
Note that recent version of... | github_jupyter |
# [Module 2.1] 세이지 메이커 로컬 모드 및 스크립트 모드로 훈련
본 워크샵의 모든 노트북은 **<font color="red">conda_tensorflow2_p36</font>** 를 사용합니다.
이 노트북은 아래와 같은 작업을 합니다.
- 1. 기본 환경 세팅
- 2. 노트북에서 세이지 메이커 스크립트 모드 스타일로 코드 변경
- 3. 세이지 메이커 로컬 모드로 훈련
- 4. 세이지 메이커의 호스트 모드로 훈련
- 5. 모델 아티펙트 경로 저장
---
# 1. 기본 환경 세팅
사용하는 패키지는 import 시점에 다시 재로딩 합니다.
``... | github_jupyter |
**This notebook is an exercise in the [AI Ethics](https://www.kaggle.com/learn/ai-ethics) course. You can reference the tutorial at [this link](https://www.kaggle.com/alexisbcook/ai-fairness).**
---
In the tutorial, you learned about different ways of measuring fairness of a machine learning model. In this exercise... | github_jupyter |
# Parsing Text and the LDA output
## a.1) Opening pdfs and extracting their text
Under the material for Lecture 3 I have added a folder called FOMC_pdf. This folder contains the transcripts of all the meetings that took place during the [Greenspan](https://en.wikipedia.org/wiki/Alan_Greenspan) era (August 11, 1987 to... | github_jupyter |
## 03 Intro to PyTorch
*special thanks to YSDA team for provided materials*
What comes today:
- Introduction to PyTorch
- Automatic gradient computation
- Logistic regression (it's a neural network, actually ;) )

__This notebook__ will teach you to... | github_jupyter |
<a href="https://colab.research.google.com/github/yukinaga/lecture_pytorch/blob/master/lecture4/cnn.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# CNNの実装
PyTorchを使って、畳み込みニューラルネットワーク(CNN)を実装します。
CNN自体はCNNの層を追加するのみで実装可能なのですが、今回はデータ拡張とドロップアウトの実装も行... | github_jupyter |

# YES BANK DATATHON
## Machine Learning Challenge Round 3 - EDA
### Data Description
The data given is of credit records of individuals with certain attributes.
```
import numpy as np
import pandas as pd
import seaborn as sns
%matplotlib inline
import matplotlib.pyplot as plt
t... | github_jupyter |
Week 5 Notebook: Building a Deep Learning Model
===============================================================
Now, we'll look at a deep learning model based on low-level track features.
```
import tensorflow.keras as keras
import numpy as np
from sklearn.metrics import roc_curve, auc
import matplotlib.pyplot as plt... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from tqdm import tqdm
from astropy.table import Table
import astropy.units as u
import os
# Using `batman` to create & fit fake transit
import batman
# Using astropy BLS and scipy curve_fit to fit transit
from astropy.timeseries import BoxLeas... | github_jupyter |
##### Copyright 2018 The TensorFlow Authors.
```
#@title Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | github_jupyter |
# Import Dependencies
```
import warnings
warnings.filterwarnings('ignore')
import keras
import matplotlib.pyplot as plt
```
## Define Types
```
from typing import Tuple
ImageShape = Tuple[int, int]
GrayScaleImageShape = Tuple[int, int, int]
```
# MNIST Sandbox Baseline Example
This sandbox example is meant mostly... | github_jupyter |
# Creating a Sentiment Analysis Web App
## Using PyTorch and SageMaker
_Deep Learning Nanodegree Program | Deployment_
---
Now that we have a basic understanding of how SageMaker works we will try to use it to construct a complete project from end to end. Our goal will be to have a simple web page which a user can u... | github_jupyter |
\title{Digital Latches with myHDL}
\author{Steven K Armour}
\maketitle
# Refs
@book{brown_vranesic_2014, place={New York, NY}, edition={3}, title={Fundamentals of digital logic with Verilog design}, publisher={McGraw-Hill}, author={Brown, Stephen and Vranesic, Zvonko G}, year={2014} },
@book{lameres_2017, title={Intro... | github_jupyter |
```
%%capture
# { display-mode: 'form' }
# @title PyTTI-Tools [EzMode]: VQGAN
# @markdown ## Setup
# @markdown This may take a few minutes.
## 1. Install stuff
try:
import pytti
except ImportError:
!pip install kornia pytorch-lightning transformers
!pip install jupyter loguru einops PyGLM ftfy regex ... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.