text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
```
import numpy as np
from collections import OrderedDict
import logging
from IPython.display import display
%matplotlib inline
from astropy.io import fits
import astropy.wcs
from astropy import coordinates
import astropy.units as apu
from astropy import table
import warnings
from astropy.utils.exceptions import As... | github_jupyter |
# Neural network in Keras
```
import tensorflow as tf
import keras
import numpy as np
from keras_experiments import test_model
from speech2phone.preprocessing.TIMIT.phones import get_data
from speech2phone.preprocessing.filters import mel
import matplotlib.pyplot as plt
%matplotlib inline
print(tf.__version__)
print... | github_jupyter |
```
import os
import sys
import time
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.metrics import classification_report , accuracy_score , confusion_matrix , precision_score , f1_score
import networkx as nx
import torch
from torch.nn import Linear
import to... | github_jupyter |
---
_You are currently looking at **version 1.0** of this notebook. To download notebooks and datafiles, as well as get help on Jupyter notebooks in the Coursera platform, visit the [Jupyter Notebook FAQ](https://www.coursera.org/learn/python-text-mining/resources/d9pwm) course resource._
---
# Assignment 4 - Docume... | github_jupyter |
```
import model
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from scipy.interpolate import griddata
from PyAstronomy import pyasl
from scipy.spatial import Delaunay
import os
model_path = model.KURUCZ_download(5750, 5.0, 0)
model.KURUCZ_convert(model_path)
model_df_1 = pd.read_csv('/home/ming... | github_jupyter |
# Notebook 1: Bayes's Theorem
[Bayesian Decision Analysis](https://allendowney.github.io/BayesianDecisionAnalysis/)
Copyright 2021 Allen B. Downey
License: [Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
```
import numpy as np
import pan... | github_jupyter |
```
import pandas as pd
import numpy as np
from os import path
from CSVUtils import *
import ta
import matplotlib.pyplot as plt
import seaborn as sn
import calendar
from pprint import pprint
import pickle
DIR = "./from github/Stock-Trading-Environment/data"
nameList = ["^BVSP", "^TWII", "^IXIC"]
df_list = []
startDate ... | github_jupyter |
<a href="https://githubtocolab.com/giswqs/geemap/blob/master/examples/notebooks/11_export_image.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open in Colab"/></a>
Uncomment the following line to install [geemap](https://geemap.org) if needed.
```
# !pip install geema... | github_jupyter |
```
# This has to go in its own cell or it screws up the defaults we'll set later
%matplotlib inline
import numpy as np
import musictoys
import musictoys.audiofile
import musictoys.analysis
import musictoys.spectral
from scrapbook import plot
filedata, filerate = musictoys.audiofile.read("audio_files/kronfeld-dreamatic... | github_jupyter |
The copy module includes two functions, copy() and deepcopy(), for duplicating existing objects.
# Shallow Copy
```
import copy
import functools
@functools.total_ordering
class MyClass:
def __init__(self, name):
self.name = name
def __eq__(self, other):
return self.name == other.name
... | github_jupyter |
```
import os
import sys
import pandas as pd
import csv
import sklearn
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import math
from xgboost import XGBRegressor,plot_importance
from sklearn.model_selection import train_test_split, GridSearchCV, StratifiedKFold
from sklearn.metrics import acc... | github_jupyter |
# Compare to velocities of the entire Kepler sample.
Load the data
```
%matplotlib inline
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import tqdm
import astropy.stats as aps
import aviary
plotpar = {'axes.labelsize': 30,
'font.size': 30,
'legend.fontsize': 15,
... | github_jupyter |
<a href="https://colab.research.google.com/github/michelucci/zhaw-dlcourse-spring2019/blob/master/Week%205%20-%20Fully%20Connected%20Networks/Week%205%20-%20Zalando%20dataset.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Neural Networks and Deep... | github_jupyter |
## Accessing ICESat-2 Data
### Software Development Notebook
This notebook outlines and begins development for functionality to ease ICESat-2 data access and download from the NASA NSIDC DAAC (NASA National Snow and Ice Data Center Distributed Active Archive Center). This space is meant to be transient and serve as a s... | github_jupyter |
# Assignment 3: Combustor Design
## Introduction
The global desire to reduce greenhouse gas emissions is the main reason for the interest in the use of hydrogen for power generation.
Although hydrogen shows to be a promising solution, there are many challenges that need to be solved.
One of the challenges focuses on... | github_jupyter |
### Geodetic to NED
```
# First import the utm and numpy packages
import utm
import numpy
```
To convert a GPS position (_longitude_, _latitude_, _altitude_) to a local position (_north_, _east_, _down_) you need to define a global home position as the origin of your NED coordinate frame. In general this might be the... | github_jupyter |
# Linked Data and Music
## SPARQL Exercises: Exploring unknown datasets
This Jupyter notebook aims to support a basic understanding of how to explore unknown Linked Data datasets with the query language SPARQL (https://www.w3.org/TR/rdf-sparql-query/).
The Notebook is created by [@musicenfanthen](https://github.com/m... | github_jupyter |
```
%matplotlib inline
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style("whitegrid")
plt.rcParams["figure.figsize"] = (20, 20)
import re
import os
import io
import nltk
import numpy as np
import pandas as pd
from bs4 import BeautifulSoup
from tqdm import tqdm_notebook as tqdm
from nltk import word_... | github_jupyter |
```
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets, transforms
from torch.utils.data import DataLoader, Dataset
import syft as sy
import copy
import numpy as np
import time
import importlib
importlib.import_module('FLDataset')
from FLData... | github_jupyter |
# Interpreting Nodes and Edges by Saliency Maps in GAT
This demo shows how to use integrated gradients in graph attention networks to obtain accurate importance estimations for both the nodes and edges. The notebook consists of three parts:
setting up the node classification problem for Cora citation network
training... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
%matplotlib inline
# Add a line to import the SVC/SVM pieces
```
<img src="http://www.nature.com/article-assets/npg/srep/2015/150825/srep13285/images/w926/srep13285-f4.jpg" width="300" height="300" />
From this article in [Scientific Reports... | github_jupyter |
# Vertex pipelines
**Learning Objectives:**
Use components from `google_cloud_pipeline_components` to create a Vertex Pipeline which will
1. train a custom model on Vertex AI
1. create an endpoint to host the model
1. upload the trained model, and
1. deploy the uploaded model to the endpoint for serving
##... | github_jupyter |
```
s = '1234567890'
print('s =', s)
print('isdecimal:', s.isdecimal())
print('isdigit:', s.isdigit())
print('isnumeric:', s.isnumeric())
s = '1234567890'
print('s =', s)
print('isdecimal:', s.isdecimal())
print('isdigit:', s.isdigit())
print('isnumeric:', s.isnumeric())
s = '\u00B2'
print('s =', s)
print('isdecimal:',... | github_jupyter |
```
!gdown --id 1Y8EOFLIRCcKpe_e0pO03yCAosTRjRMtC
!unzip -q /content/UTKFace.zip -d data
# To download checkpoints, Keras models, TFLite models
from google.colab import files
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import os
import datetime
n = len(os.listdir('/content/data/UTKFace'))... | github_jupyter |
# Continuous Control
---
Congratulations for completing the second project of the [Deep Reinforcement Learning Nanodegree](https://www.udacity.com/course/deep-reinforcement-learning-nanodegree--nd893) program! In this notebook, you will learn how to control an agent in a more challenging environment, where the goal ... | github_jupyter |
# Datasets
```
from torchhk.datasets import *
import torchvision.transforms as transforms
```
## 1. w/o Validation Set
```
mnist = Datasets("MNIST", root='./data',
transform_train=transforms.ToTensor(),
transform_test=transforms.ToTensor())
train_data, test_data = mnist.get_data()
... | github_jupyter |
# Collection of experiments for basic statistics as features
In an effort to find out if basic statistics like estimated noise to signal ratio or simpler standard deviation or other statistics from processed signals like the Hilbert envelope etc., Can be used for anomaly detection, this notebook will spotcheck on diff... | github_jupyter |
```
# AVG ALL SET
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
import os
os.environ["CUDA_VISIBLE_DEVICES"]="0,1,2,3"
cd /media/datastorage/Phong/cassava/cv/1
#3 Models
# Set 5
#0.9368
import numpy as np
import os
mean_pred5 = np.load(os.path.join('pred_npy','Cassava_NonGrp_S... | github_jupyter |
```
%matplotlib inline
import seaborn as sns
import matplotlib.pyplot as plt
sns.set_style('whitegrid')
```
## MNIST
```
import numpy as np
from sklearn import manifold
from sklearn import datasets
digits = datasets.load_digits(n_class=6)
X = digits.data / 255.
y = digits.target
n_samples, n_features = X.shape
n_nei... | github_jupyter |
```
import pandas as pd
import numpy as np
from sklearn import preprocessing
from sklearn.feature_selection import RFE
from sklearn.svm import SVC
from sklearn.ensemble import RandomForestRegressor
df = pd.read_csv("数据.csv" , encoding = 'gbk')
df.head(5)
# 设置哑变量
df = df.join(pd.get_dummies(df['温度3'] , prefix = 'dum温度')... | github_jupyter |
# MNIST using Self Normalizing Neural Networks
```
import pandas as pd
train_data = pd.read_csv('train.csv')
print(train_data.head())
from matplotlib import pyplot as plt
%matplotlib inline
import numpy as np
def visualize_digits(i):
pixel_value_i = train_data.ix[i][1:]
pixel_value_i = pixel_value_i.values.res... | github_jupyter |
# Initialize a game
```
from ConnectN import ConnectN
game_setting = {'size':(6,6), 'N':4, 'pie_rule':True}
game = ConnectN(**game_setting)
% matplotlib notebook
from Play import Play
gameplay=Play(ConnectN(**game_setting),
player1=None,
player2=None)
```
# Define our policy
Please ... | github_jupyter |
```
from time import time
from random import random, choice
import numpy as np
import pandas as pd
from sklearn.metrics import accuracy_score, f1_score
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from torch.nn import init
from torch.autograd import Variable
from tor... | github_jupyter |
<a href="https://colab.research.google.com/github/probml/pyprobml/blob/master/notebooks/prior_post_predictive_binomial.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
Plot rior and posterior predctiive for beta binomial distribution.
Based on fig 1... | github_jupyter |
##### Copyright 2020 The TensorFlow Authors.
```
#@title Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | github_jupyter |
# Foundations of Computational Economics #7
by Fedor Iskhakov, ANU
<img src="_static/img/dag3logo.png" style="width:256px;">
## Python essentials: object-oriented programming
<img src="_static/img/lecture.png" style="width:64px;">
<img src="_static/img/youtube.png" style="width:65px;">
[https://youtu.be/mwplVDkfV... | github_jupyter |
### Real-time human hearing preference acquisition
```
#=================================================
# User's hearing preference data collection (main)
# Author: Nasim Alamdari
# Date: Dec. 2020
#=================================================
import math
import argparse
import sys
from PyQt5.QtGui import *
... | github_jupyter |
<a href="https://colab.research.google.com/github/letianzj/QuantResearch/blob/master/notebooks/python.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
Some advanced topics of Python
- [Numpy](#numpy)
- [Pandas](#pandas)
- [Other](#other)
- [Referenc... | github_jupyter |
```
import numpy as np
import numpy.random as rnd
from scipy.stats import norm
import matplotlib.pyplot as plt
%matplotlib inline
plt.style.use('ggplot')
population_N = 200
population_scale = 100
population = rnd.exponential(population_scale, population_N)
fig, axs = plt.subplots(nrows=3, ncols=1, figsize=(11, 4), sh... | github_jupyter |
<a href="https://colab.research.google.com/github/AI4Finance-Foundation/FinRL/blob/master/FinRL_StockTrading_NeurIPS_2018.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Deep Reinforcement Learning for Stock Trading from Scratch: Multiple Stock Tr... | github_jupyter |
```
from IPython.display import HTML
# Cell visibility - COMPLETE:
tag = HTML('''<style>
div.input {
display:none;
}
</style>''')
display(tag)
# #Cell visibility - TOGGLE:
# tag = HTML('''<script>
# code_show=true;
# function code_toggle() {
# if (code_show){
# $('div.input').hide()
# } else {
# ... | 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>Classes and Objects in Python</h1>
<p>
<strong>Welcome!</strong>
Objects in programming are like objects in real lif... | github_jupyter |
# Experiment Initialization
Here, I define the terms of my experiment, among them the location of the files in S3 (bucket and folder name), and each of the video prefixes (everything before the file extension) that I want to track.
Note that these videos should be similar-ish: while we can account for differences in... | github_jupyter |
## Loading the data
## Clean the data
## Feature Enginnering
## Modelling
## Save model
<hr>
```
## Load the data
import pandas as pd
data = pd.read_csv('./data.csv')
data.sample(frac=1)
## Clean the data
data.columns
data.drop(['sqft_living','sqft_lot','waterfront','view','condition','sqft_above','sqft_basement','st... | github_jupyter |
# Introduction
<div class="alert alert-block alert-info">In this tutorial we will go through a full cycle of model tuning and evaluation to perform a fair comparison of recommendation algorithms with Polara.</div>
This will include 2 phases: grid-search for finding (almost) optimal values of hyper-parameters and ver... | github_jupyter |
# Intro to TensorFlow
https://www.youtube.com/watch?v=q5iL3XYFv2M
## Backpropagation on zero hidden layer classification case
Suppose we are required to learn the function that maps $x$ (the inputs) to $y$ (the outputs). In this particular instance we restrict ourselves to the case that $y=\sigma(Wx)$. The maths behi... | github_jupyter |
<a href="https://colab.research.google.com/github/agemagician/CodeTrans/blob/main/prediction/transfer%20learning%20fine-tuning/function%20documentation%20generation/java/small_model.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
**<h3>Predict the d... | github_jupyter |
```
#Thèmes possibles: chesterish, grade3, gruvboxd, gruvboxl, monokai, oceans16, onedork, solarizedd, solarizedl
#Thèmes préférés: clair: grade3, foncés: chesterish
#-T: toolbar
# !jt -r :reset de tout
!jt -t chesterish -T -N -kl -fs 15 -nfs 15 -tfs 15 -dfs 15 -cellw 80%
!jt -r
def print_dimensions(file):
print('G... | github_jupyter |
## Topic Modeling with LDA
### Abstract
Latent Dirichlet Allocation (LDA) is generative probabilitistic model dealing with collections of data such as corpus. Based on the assumption of `bag of word` and exchangeability, each document in corpus is modeled as random mixture over latent topics and each topic is modeled ... | github_jupyter |
<table class="ee-notebook-buttons" align="left">
<td><a target="_parent" href="https://github.com/giswqs/geemap/tree/master/tutorials/ImageCollection/04_mapping_over_image_collection.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a tar... | github_jupyter |
## Model Layers
This module contains many layer classes that we might be interested in using in our models. These layers complement the default [Pytorch layers](https://pytorch.org/docs/stable/nn.html) which we can also use as predefined layers.
```
from fastai.vision import *
from fastai.gen_doc.nbdoc import *
```
... | github_jupyter |
```
import matplotlib.pyplot as plt
%matplotlib widget
import numpy as np
import scipy as sp
import sklearn
import matplotlib as mpl
import matplotlib.pyplot as plt
import chemiscope
from widget_code_input import WidgetCodeInput
from ipywidgets import Textarea
from iam_utils import *
import ase
import functools
import ... | github_jupyter |
# Tree Search Algorithms
**The Problem** - Companies have attempted to streamline the process of customer care for a long time. Interactive voice response (IVR) systems first appeared in the 1970's and used dial tones to direct customer calls to various cumster care teams or automated responses. While IVR has become p... | github_jupyter |
# T81-558: Applications of Deep Neural Networks
**Module 13: Advanced/Other Topics**
* Instructor: [Jeff Heaton](https://sites.wustl.edu/jeffheaton/), McKelvey School of Engineering, [Washington University in St. Louis](https://engineering.wustl.edu/Programs/Pages/default.aspx)
* For more information visit the [class w... | github_jupyter |
# Schelling Segregation Model
## Background
The Schelling (1971) segregation model is a classic of agent-based modeling, demonstrating how agents following simple rules lead to the emergence of qualitatively different macro-level outcomes. Agents are randomly placed on a grid. There are two types of agents, one const... | github_jupyter |
# Create a Vertex AI Feature Store Using the SDK
## Learning objectives
In this notebook, you learn how to:
1. Create feature store, entity type, and feature resources.
2. Import your features into Vertex AI Feature Store.
3. Serve online prediction requests using the imported features.
4. Access imported features ... | github_jupyter |
# Descripción general del Laboratorio de control de tempratura BYU
Este modelo representa el [Laboratorio de control de temperatura de BYU](http://apmonitor.com/pdc/index.php/Main/ArduinoTemperatureControl). El laboratorio de control de temperatura es una aplicación de control con un Arduino, un LED, dos calentadores ... | github_jupyter |
# Convolutional Networks
So far we have worked with deep fully-connected networks, using them to explore different optimization strategies and network architectures. Fully-connected networks are a good testbed for experimentation because they are very computationally efficient, but in practice all state-of-the-art resu... | github_jupyter |
```
library(magrittr)
library(ISLR)
library(MASS)
library(ggplot2)
library(grid)
```
Reading the data
```
auto_df <- Auto
head(auto_df)
```
Understanding the data types in the dataset
```
str(auto_df)
summary(auto_df)
```
Ploting `Horsepower` against `mpg`
```
ggplot(auto_df) +
geom_point(aes(x=mpg, y=horsepowe... | github_jupyter |
```
from jupyterthemes import get_themes
from jupyterthemes.stylefx import set_nb_theme
themes = get_themes()
set_nb_theme(themes[1])
%load_ext watermark
%watermark -a 'Ethen' -d -t -v -p jupyterthemes
```
Following the online book, [Problem Solving with Algorithms and Data Structures](http://interactivepython.org/run... | github_jupyter |
```
# Uncomment the next lines if running in Google Colab
# !pip install clinicadl==0.2.1
# !/bin/bash -c "$(curl -k https://aramislab.paris.inria.fr/files/software/scripts/install_conda_ants.sh)"
# from os import environ
# environ['ANTSPATH']="/usr/local/bin"
```
# Prepare your neuroimaging data
Different steps to p... | github_jupyter |
```
import pandas as pd
import json
import numpy as np
from ast import literal_eval
import scipy.io as sio
from scipy.stats import norm
from datetime import datetime, timedelta
#SQL
import psycopg2 as pg2
#Plots
import matplotlib.pyplot as plt
import seaborn as sns
#Helpers
from pre_processing import *
#Others
impor... | github_jupyter |
# Hovercraft
This is an example usage of the skydy package.
This object can move in two-dimensions and rotate about its centre of mass. It has one input force, along the body x-axis, and an input torque about the centre of mass.
```
import skydy
from skydy.connectors import DOF, Connection, Joint
from skydy.multibod... | github_jupyter |
```
import numpy as np
import pandas as pd
from statsmodels.tsa.stattools import grangercausalitytests
from matplotlib import pyplot as plt
%matplotlib inline
a = np.random.random(10)
b = np.arange(5, 15)
# b = np.random.random(10)
matrix = np.array([b, a]).T
grangercausalitytests(matrix, maxlag=2, verbose=True)
_ = p... | github_jupyter |
```
from tmilib import *
from reconstruct_focus_times_common import *
from reconstruct_focus_times import ReconstructFocusTimesBaseline
from session_tracker import get_focused_tab
'''
for user in list_users():
ordered_visits = get_history_ordered_visits_for_user(user)
if len(ordered_visits) == 0:
continue
las... | github_jupyter |
```
"""
XSA Python buildpack app example
Author: Andrew Lunde
"""
```
Import other python libs
```
import os
import json
```
Import the Cloud Foundry Environment library.
This makes it easier to get info from the application's environment.
https://pypi.org/project/cfenv/ for details.
```
from cfenv import AppEnv
... | 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 |
```
from matplotlib import pyplot as plt
import seaborn as sns
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
sns.set_style('whitegrid')
plt.rcParams['figure.figsize'] = (12, 10)
# Input data files are available in the read-only "../dataset/" directory
# Fo... | github_jupyter |
<a href="https://colab.research.google.com/github/thapaliya123/cat_dog_predictions/blob/master/optimizers.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
#gradient_descent_update_rule
def update_parameters(parameters, grads, learning_rate):
... | github_jupyter |
```
"""
Name : Aman Jha
Lab : Deep Learning
Date : 25-03-2021
Title : Positive and Negative sentance classifier using random forest tree classifier
"""
import numpy as np, re, nltk, pickle
from sklearn.datasets import load_files
nltk.download('stopwords')
from nltk.corpus import stopwords
movie_data = load_files("/co... | github_jupyter |
# Detrending, Stylized Facts and the Business Cycle
In an influential article, Harvey and Jaeger (1993) described the use of unobserved components models (also known as "structural time series models") to derive stylized facts of the business cycle.
Their paper begins:
"Establishing the 'stylized facts' associat... | github_jupyter |
# FairMOT Training in Amazon SageMaker
This notebook demonstrates how to train a [FairMOT](https://arxiv.org/abs/2004.01888) model with SageMaker and tune hyper-parameters with [SageMaker Hyperparameter tuning job](https://docs.aws.amazon.com/sagemaker/latest/dg/automatic-model-tuning.html).
## 1. SageMaker Initializ... | github_jupyter |
# Percolation analysis
### Set up
```
from os import path
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from networkx import edge_boundary, nx
from scipy.interpolate import make_interp_spline, interpolate
import config
from config import LEVELS
from create_full_graph_with_single_query impo... | github_jupyter |
```
import numpy as np
import json
import os
import glob
import sys
from pprint import pprint
from matplotlib import pyplot as plt
from domainbed.lib import misc, reporting
from domainbed import datasets
from domainbed import algorithms
from domainbed.lib.query import Q
from domainbed.model_selection import IIDAccurac... | github_jupyter |
```
%matplotlib inline
```
# Libsvm GUI
A simple graphical frontend for Libsvm mainly intended for didactic
purposes. You can create data points by point and click and visualize
the decision region induced by different kernels and parameter settings.
To create positive examples click the left mouse button; to crea... | github_jupyter |
# Federated Deep Learning on Vertically Partitioned SGCP Dataset
By Xiaochen Zhu
## Background
This notebook is an implementation of `vFedCCE` which is a private deep learning method using categorical cross entropy loss and gradient optimization to solve multi-category classfication problem in vertically partitioned... | github_jupyter |
```
import tensorflow as tf
import numpy as np
from PIL import Image
from scipy.stats import norm
SSD_GRAPH_FILE = 'frozen_models/ssd_inception_v2_coco_2017_11_17/frozen_inference_graph.pb'
confidence_cutoff = 0.3 # confidence to detect object and edge
padx = 10 # the padding from the boundary
pady = 10 # the pad... | github_jupyter |
# Building, training and deploying fastai models on SageMaker example
With Amazon SageMaker, you can package your own algorithms that can then be trained and deployed in the SageMaker environment. This notebook guides you through an example on how to build a custom container for SageMaker training and deployment using... | github_jupyter |
#### Copyright 2017 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 writin... | github_jupyter |
```
from IPython.display import Image,display,clear_output
from IPython.core.display import HTML
import ipywidgets as widgets
from ipywidgets import interact, interactive,fixed, IntSlider, HBox, Layout, Output, VBox, HTML,HTMLMath, FloatSlider
import matplotlib.pyplot as plt
from numpy import *
from scipy import inte... | github_jupyter |
```
%matplotlib inline
```
강화 학습 (DQN) 튜토리얼
=====================================
**Author**: `Adam Paszke <https://github.com/apaszke>`_
**번역**: `황성수 <https://github.com/adonisues>`_
이 튜토리얼에서는 `OpenAI Gym <https://gym.openai.com/>`__
CartPole-v0 태스크의 DQN (Deep Q Learning) 에이전트를 학습하는데
PyTorch를 사용하는 방법을 보여드립니다.
... | github_jupyter |
```
# Import required libraries
import os
import requests
import json
import pandas as pd
import hvplot.pandas
from dotenv import load_dotenv
import alpaca_trade_api as tradeapi
import datetime
import numpy as np
import numpy.random as rnd
import requests
from MCForecastTools import MCSimulation
import ipywidgets as wi... | github_jupyter |
# Getting Started with OpenACC
In this lab you will learn the basics of using OpenACC to parallelize a simple application to run on multicore CPUs and GPUs. This lab is intended for Fortran programmers. If you prefer to use C/C++, click [this link.](../../C/jupyter_notebook/openacc_c_lab1.ipynb)
---
Let's execute the... | github_jupyter |
## `011`: Classification in `scikit-learn`
Goals:
* Practice with the `fit` and `predict` interface of sklearn models
* Compare and contrast regression and classification as machine learning tasks
## Setup
Much of this setup is the same as `010`.
Let's import necessary modules: Pandas and NumPy for data wrangling,... | github_jupyter |
<h2>Glossary</h2>
1. **problem solving:** The process of formulating a problem, finding a solution, and expressing the solution.
2. **high-level language:** A programming language like Python that is designed to be easy for humans to read and write.
3. **low-level language:** A programming language that is designed to... | github_jupyter |
# Ensemble regression
With an ensemble of regressors, the standard deviation of the predictions at a given point can be thought of as a measure of disagreement. This can be used for active regression. In the following example, we are going to see how can it be done using the CommitteeRegressor class.
The executable sc... | github_jupyter |
# Snow Detection Using Spark
## Introduction
In this Jupyter notebook, we will build an SVM classifier for Snow/Ice detection using Spark for the Proba-V 100m Top Of Atmosphere (TOA) Radiometry data.
## Data
### Radiometry Data
The Radiometry file is contained in a GeoTIFF file format. The file contains 4 raster b... | github_jupyter |
# Examples how the Superstatistics functions can be applied to air pollution (q-exponential and local exponentials) or power grid frequency (q-Gaussians and local Gaussians)
```
import numpy as np
import matplotlib.pyplot as plt
from scipy import stats
from scipy.stats import kurtosis
from scipy.integrate import odein... | github_jupyter |
# Make dataset
This notebook contains the code to analyse content of the PubMedCentral Author Manuscript Collection. \
See: https://www.ncbi.nlm.nih.gov/pmc/about/mscollection/
Files can be downloaded here: https://ftp.ncbi.nlm.nih.gov/pub/pmc/manuscript/ \
**Please ensure** that files are downloaded into `~/pmc_data... | github_jupyter |
# Step 1: Creating graph from Osmium
### This notebook will take in an OpenStreetMap file and Mapbox traffic data as inputs. It will assign traffic data to edges where traffic data exist. It will convert the data to a NetworkX graph data structure. It will also clean up the graph, getting rid of in-between nodes where ... | github_jupyter |
<a href="http://landlab.github.io"><img style="float: left" src="../../landlab_header.png"></a>
# How to write a Landlab component
<hr>
<small>For more Landlab tutorials, click here: <a href="https://landlab.readthedocs.io/en/latest/user_guide/tutorials.html">https://landlab.readthedocs.io/en/latest/user_guide/tutori... | github_jupyter |
<a href="https://colab.research.google.com/github/NiallJeffrey/MomentNetworks/blob/master/marginal_delfi_example.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
## Show marginal delfi estimation
## Question: think about correct prior to use?
## Summ... | github_jupyter |
# Machine Learning in Python
The content for this notebook was copied from The Deep Learning Machine Learning in Python lab.
This demo shows prediction of flight delays between airport pairs based on the day of the month using a random forest.
The demo concludes by visualizing the probability of on-time arrival betwee... | github_jupyter |
<a href="https://colab.research.google.com/github/JeffreyW2468/LACC_work/blob/main/JW_LR_example.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Before you start
**First downloaded the USA_Housing.csv and checker.py from github, link is:** https:... | github_jupyter |
#### Clase 9, 1-10-2021: 1er. parcial Matemática III - 2do.cuat-2021
Nombre y apellido: Marina Andrea Nieto
# Datos
```
# En una zona del país, se realizó una encuesta de opinión a 1000 personas sobre 3 (tres)
# categorías: Economía, Educación y Seguridad, y otras sub-categorías especificadas
# sólo para Economía. L... | github_jupyter |

Hi, in this project we will classifying news on wheather it is reliable(0) or unreliable(1) using Fake News Dataset from [kaggle](https://www.kaggle.com/c/fake-news/data?select=train.csv)
## **Let's start by ins... | github_jupyter |
# How to use EBI Metagenomics API
The EMG REST API https://www.ebi.ac.uk/metagenomics/api/latest/ provides an easy-to-use set of top level resources, such as studies, samples, runs, experiment-types, biomes and annotations, that let user access metagenomics data in simple JSON format (JSON object formatted data struct... | github_jupyter |
> This is one of the 100 recipes of the [IPython Cookbook](http://ipython-books.github.io/), the definitive guide to high-performance scientific computing and data science in Python.
# 14.6. Manipulating geospatial data with Shapely and basemap
In order to run this recipe, you will need the following packages:
* [GD... | github_jupyter |
# Adversairal training
Exercise shows how to increase robustness of model by adversarial training.
```
from utils import load_news20
from sklearn.feature_extraction.text import TfidfVectorizer
import numpy as np
from wildnlp.aspects import *
from wildnlp.aspects.utils import compose
import pandas as pd
```
# Download... | github_jupyter |
# 3: Multivariate Analysis
In this lesson we will use 'Multivariate Analysis' to improve the signal significance of our data sample. This involves training a Boosted Decision Tree (**BDT**) which can distinguish between signal-like and background-like events. The BDT takes a number of input variables and makes a predi... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.