text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
# Experiments on `ibmq_armonk`
```
import warnings
warnings.filterwarnings('ignore')
from src.calibration_utils import *
```
In this notebook, we will test the pulses calibrated in [ibmq_armonk_calibration.ipynb](./ibmq_bogota_calibration.ipynb).
Ultimately, we hope to use these pulses to predict the properties of t... | github_jupyter |
# Preparation
If you installed Kubeflow via [kfctl](https://www.kubeflow.org/docs/gke/customizing-gke/#common-customizations), you may already prepared GPU enviroment and can skip this section.
If you installed Kubeflow Pipelines via [Google Cloud AI Platform Pipelines UI](https://console.cloud.google.com/ai-platform... | github_jupyter |
# Imports
```
!pip install rawpy
# download the 'align' module
!wget https://raw.githubusercontent.com/martin-marek/hdr-plus-pytorch/main/align.py
import torch
import torchvision
import numpy as np
import align
import rawpy
import imageio
from glob import glob
import matplotlib.pyplot as plt
import zipfile
device = to... | github_jupyter |
```
# Delete this cell to re-enable tracebacks
import sys
ipython = get_ipython()
def hide_traceback(exc_tuple=None, filename=None, tb_offset=None,
exception_only=False, running_compiled_code=False):
etype, value, tb = sys.exc_info()
value.__cause__ = None # suppress chained exceptions
... | github_jupyter |
```
from sklearn.metrics import accuracy_score
from sklearn.model_selection import train_test_split
from sklearn.metrics import classification_report,confusion_matrix, f1_score
from sklearn.linear_model import LogisticRegression
from sklearn.ensemble import RandomForestClassifier
from sklearn.naive_bayes import Gaussia... | github_jupyter |
<table class="ee-notebook-buttons" align="left">
<td><a target="_parent" href="https://github.com/giswqs/geemap/tree/master/tutorials/Image/01_image_overview.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a target="_parent" href="http... | github_jupyter |
# 006_dictionaries
[Source](https://github.com/send2manoo/Python-TheNoTheoryGuide/)
```
# Simple Dictionary
# Dictionary allows to have key:value pairs
d1 = {"Jennifer":8, 'A':65, 66:'B', 9.45:"Decimals"}
print (d1["Jennifer"])
print (d1['A'])
print (d1[66])
print (d1[9.45])
# Adding new kay:value pairs
d1 = {"Jenni... | github_jupyter |
# Genomic Grammar Data Visualization
## Imports
```
import os
import numpy as np
import Bio
from Bio import SeqIO
import seaborn as sns
import pandas as pd
import Bio.motifs
%matplotlib inline
from sklearn import model_selection
import seaborn as sns
from matplotlib import pyplot as plt
import sklearn
from IPython.di... | github_jupyter |
<a href="https://colab.research.google.com/github/partha1189/machine_learning/blob/master/RNNTime_series.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
print(tf.__versio... | github_jupyter |
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import sklearn as sk
from sklearn import datasets
from sklearn import svm
from sklearn import metrics
from sklearn.metrics import classification_report
from sklearn.model_selection import cross_validate
```
### Make data
```
numcat = 2
categor... | github_jupyter |
<a href="https://colab.research.google.com/github/ShinAsakawa/2019seminar_info/blob/master/notebooks/2019si_kmnist_exercise002.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
<center>
<h1>[Python で 超実習ディープラーニング](https://www.seminar-info.jp/entry/sem... | github_jupyter |
# Quality control of data analysis output
When dealing with proteomics data, it is recommended to check the results for inconsistencies and correct application of the data analysis parameters.
### Pre-requisite: mass spectrometry basics
In this workshop, we will focus on mass spectrometry (MS)-based proteomics, whic... | github_jupyter |
# ML: Supervised Learning
## Import required libraries
```
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
warnings.simplefilter(action='ignore', category=FutureWarning)
warnings.simplef... | github_jupyter |
```
!pip3 install pandas
import pandas as pd
funders_disease = pd.read_csv("cooccur.csv")
html_string = '''
<html>
<head><title>HTML Pandas Dataframe with CSS</title></head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xip... | github_jupyter |
# Comparing f_up verses a t-statistic
```
import NotebookImport
from Imports import *
matched_rna = pd.read_hdf(RNA_SUBREAD_STORE, 'matched_tn')
matched_rna = matched_rna.ix[ti((matched_rna == -3).sum(1) !=
len(matched_rna.columns))]
n = len(matched_rna.columns.levels[0])
dx_rna = bino... | github_jupyter |
## 9-2. 量子エラー
量子ビットに生じるエラーの根本的な要因自体は実は古典ビットとそれほど違いはない。
一つは、外部との環境の相互作用によって一定のレートで外部に情報が漏れ出てしまうことで生じるエラーである。
特に物質を量子ビットとして光やマイクロ波などの電磁波で情報を読み書きする場合、電磁波を注入する経路を確保せねばならず、そこから一定量の情報が漏れ出てしまう。
また、希釈冷凍機で実験をしていてもマイクロ波はエネルギースケールが環境温度と近いため、熱雑音の影響を大きく受けてしまい、これも定常的なノイズの原因となる。
一方、イオンや中性原子のようなトラップを用いて作成する物質の場合、デコヒーレンスに加えて物質がトラップから... | github_jupyter |
# Feature: Distances Between Co-Occurrence Matrix Rows
This is a "magic" (leaky) approach used by [Stanislav Semenov](https://www.kaggle.com/stasg7) in the [Avito Duplicate Ads Detection competition](https://www.kaggle.com/c/avito-duplicate-ads-detection).
We'll populate a sparse binary co-occurrence matrix $C \in \{... | github_jupyter |
```
'''importing required libraries'''
from PIL import Image
import matplotlib.pyplot as plt
import os
import numpy as np
from sklearn.model_selection import train_test_split
try:
import cPickle as pickle
except ImportError:
import pickle
'''resizing images from a folder
taking path of folder and size i.e.... | github_jupyter |
## Hypothesize tutorial
This notebook provides a few examples of how to use Hypothesize with a few common statistical designs. There are many more functions that could work for these designs but hopefully this helps to get you started.
```
!pip install hypothesize
from hypothesize.utilities import create_example_data... | github_jupyter |
# Run and get results
## Get results from an anonymous simulation : `anon_runandget`
Sometimes you want to run a simulation on an idf and get a particular result. There is no single function in `eppy` which can do that. In this experimental section we are exploring functions that will achieve this objectives.
So wha... | github_jupyter |
# Adding to the API Documentation
Documentation is an integral part of every collaborative software project. Good documentation not only encourages users of the package to try out different functionalities, but it also makes maintaining and expanding code significantly easier. Every code contribution to the package mu... | github_jupyter |
# Monitor a Model
When you've deployed a model into production as a service, you'll want to monitor it to track usage and explore the requests it processes. You can use Azure Application Insights to monitor activity for a model service endpoint.
## Connect to your workspace
To get started, connect to your workspace.... | github_jupyter |
# Arrays
Credits: Forked from [tensorflow-basic-tutorials](https://github.com/tuanavu/tensorflow-basic-tutorials) by Tuan Vu
> This work comes from [LearningTensorFlow.com](http://learningtensorflow.com/), developed by [dataPipeline](http://datapipeline.co.au/), with whom the copyright remains.
For more tutorials a... | github_jupyter |
## Set Up Environment
```
# Cell 0
# If at all possible please test locally or on the private tbears server. The Testnet
# is becoming cluttered with many deployments of Balanced contracts.
# Note that running on the private tbears server will require the number of top P-Reps
# be set to 4 in the staking contract or ... | github_jupyter |
<a href="https://colab.research.google.com/github/open-mmlab/mmpose/blob/main/demo/MMPose_Tutorial.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# MMPose Tutorial
Welcome to MMPose colab tutorial! In this tutorial, we will show you how to
- perfo... | github_jupyter |
- model1 : eff2020
- model2 : eff2019+2020
- model3 : reg2020
- model4 : reg2019+2020
- model5 : eff(seed:720)
- model6 : reg distillation
```
package_paths = [
'../input/pytorch-image-models/pytorch-image-models-master', #'../input/efficientnet-pytorch-07/efficientnet_pytorch-0.7.0'
'../input/adamp-optimizer/... | github_jupyter |
<a href="https://colab.research.google.com/github/DeepInsider/playground-data/blob/master/docs/articles/deeplearning1g1t_lesson08.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
##### Copyright 2018 Digital Advantage - Deep Insider.
```
#@title Lic... | github_jupyter |
<img align="left" src="./img/lu.png" hspace="20"/> <img align="right" src="./img/midlands+.png"/>
<br/><br/><br/><br/><br/><br/><br/>
------
## SciPy
[SciPy](https://docs.scipy.org/doc/scipy/reference/) that is a Python standard scientific-computing library built on top of NumPy contains various toolboxes (similar t... | github_jupyter |
# Ray Crash Course - Why Ray?
© 2019-2021, Anyscale. All Rights Reserved

The first two lessons explored using Ray for task and actor concurrency. This lesson takes a step back and explains the challenges that led to the creation of Ray and the Ray ecosystem. The... | github_jupyter |
# Crime mapping, visualization and predictive analysis
# Data Preparation
The Hoston Police department shares historical crime statistics at http://www.houstontx.gov/police/cs/crime-stats-archives.htm that we'll be using for our analysis.
<img src="images/hpd.png" width="750"/>
## Fetch data
```
import pandas as pd... | github_jupyter |
# Approximate q-learning
In this notebook you will teach a __tensorflow__ 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 ce... | github_jupyter |
<a href="https://colab.research.google.com/github/ak9250/mellotron/blob/master/Mellotroninferencecolab.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
!git clone https://github.com/NVIDIA/mellotron.git
cd mellotron/
!git submodule init
!git subm... | github_jupyter |
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/ImageCollection/expression_map.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a target="_blank... | github_jupyter |
```
import numpy as np
import json
import itertools
## We import the T/I group acting on pitch classes from Opycleid
from opycleid.musicmonoids import TI_Group_PC
TI_group = TI_Group_PC()
## Additionally, we need a dictionary translating pitch class numbers to pitch class names
dict_pc_to_name = {9:'A', 0:'C', 11:'... | github_jupyter |
# Bagging-based estimator
```
# temporary fix to avoid spurious warning raised in scikit-learn 1.0.0
# it will be solved in scikit-learn 1.0.1
import warnings
warnings.filterwarnings("ignore", message="X has feature names.*")
warnings.filterwarnings("ignore", message="X does not have valid feature names.*")
```
## Ba... | github_jupyter |
```
import os, sys
try:
from synapse.lib.jupyter import *
except ImportError as e:
# Insert the root path of the repository to sys.path.
# This assumes the notebook is located three directories away
# From the root synapse directory. It may need to be varied
synroot = os.path.abspath('../../../')
... | github_jupyter |
# FTE/BTE Experiment for food-101
The progressive learning package utilizes representation ensembling algorithms to sequentially learn a representation for each task and ensemble both old and new representations for all future decisions.
Here, a representation ensembling algorithm based on decision forests (SynF) de... | github_jupyter |
```
""" # google colab
!pip install rasterio
!pip install rioxarray
!pip install geopandas
"""
""" # google colab
import rasterio
import geopandas as gpd
import rioxarray
from rasterio.plot import show
from pyproj import CRS
from google.colab import drive
import os
import numpy as np
import math
import fiona
from sha... | github_jupyter |
```
import nltk, nltk.classify.util, nltk.metrics
# nltk.download('movie_reviews')
from nltk.classify import MaxentClassifier
from nltk.collocations import BigramCollocationFinder
from nltk.metrics import BigramAssocMeasures
from nltk.probability import FreqDist, ConditionalFreqDist
from sklearn.model_selection import ... | github_jupyter |
```
# Erasmus+ ICCT project (2018-1-SI01-KA203-047081)
# Toggle cell visibility
from IPython.display import HTML
tag = HTML('''<script>
code_show=true;
function code_toggle() {
if (code_show){
$('div.input').hide()
} else {
$('div.input').show()
}
code_show = !code_show
}
$( document... | github_jupyter |
```
import pandas as pd
import re
emails = pd.read_csv('../data/mail_tbl -- most recent.csv')
#emails = pd.read_csv('../data/mail_tbl.csv')
emails.Body = emails.Body.fillna("")
print(len(emails))
#emails.head()
```
## Filtering Emails
---
1. Need something to keep track of thread ID (keep list of all thread IDs?)
2.... | github_jupyter |
Below is code with a link to a happy or sad dataset which contains 80 images, 40 happy and 40 sad.
Create a convolutional neural network that trains to 100% accuracy on these images, which cancels training upon hitting training accuracy of >.999
Hint -- it will work best with 3 convolutional layers.
```
import tens... | github_jupyter |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
 contains all the code used for the preprocessing pipeline, including data strucure managements, transformations of data, creations ... | github_jupyter |
# Auditing MHC-peptide binding and drug-target bioactivity prediction applications
Auditing PPI prediction applications, we learned that, in the absence of informative features, ML models can learn biases in the biological data. For the PPI case, the bias lies in the node degree representation imbalance for each prote... | github_jupyter |
[](http://rpi.analyticsdojo.com)
<center><h1>Introduction to Map Reduce</h1></center>
<center><h3><a href = 'http://rpi.analyticsdojo.com'>rpi.analyticsdojo.com</a></h3></center>
Adopted from work by Stev... | github_jupyter |
<a href="https://colab.research.google.com/github/intel-analytics/analytics-zoo/blob/master/docs/docs/colab-notebook/chronos/chronos_autots_nyc_taxi.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>

[2 Gaussian Jordan 消元法](#2-Gaussian-Jordan-消元法)
[3 线性回归](#3-线性回归)
```
# 任意选一个你喜欢的整数,这能帮你得到稳定的结果
seed = 42
```
# 1 矩阵运算
## 1.... | github_jupyter |
# PyQGIS: Expanding QGIS's functionality with Python.
# Day 1 – Basics of PyQGIS
The core application and libraries of QGIS are programmed in C++. However, Python is integrated into every nook and cranny of QGIS. All external plugins are written in Python; pretty much everything that can be done in the UI can be done... | github_jupyter |
```
import numpy as np
```
# Predicting credit default
This dataset includes 30000 observations and whether or not they defaulted on their credit card. Observations include data such as credit limit, age, sex, highest education reached, and marital status. The dataset was obtained from the Tests section of Yellowbrick... | github_jupyter |
# Fixing Conflicts in the geoNetwork Attributes
```
import numpy as np
import pandas as pd
import random
import re
from sklearn.preprocessing import OneHotEncoder
from sklearn.ensemble import RandomForestClassifier
```
In this notebook, we will investigate the data accuracy and consistency issues in the geoNetwork a... | github_jupyter |
This Jupyter notebook shows performance of the sharing capability for supply driven facilities. Sources and reactors are deployed to support the deployment of reactors.
# Case 8
Flow: Source -(sourceout)-> Reactor -(reactorout)-> Sink
The facilities 'sink' are supply driven deployed. Two prototypes of sink facilitie... | github_jupyter |
Probabilistic Programming
=====
and Bayesian Methods for Hackers
========
##### Version 0.1
`Original content created by Cam Davidson-Pilon`
`Ported to Python 3 and PyMC3 by Max Margenot (@clean_utensils) and Thomas Wiecki (@twiecki) at Quantopian (@quantopian)`
___
Welcome to *Bayesian Methods for Hackers*. The ... | github_jupyter |
```
#!/usr/bin/python3
# coding: utf-8
# Hokkaido
from datetime import datetime as dt
import sys
import numpy as np
import os
import pandas as pd
import plotly
import plotly.express as px
#import plotly.tools as tls
import plotly.graph_objects as go
#import plotly.io as pio
import plotly.offline as offline
import sys
i... | github_jupyter |
## Working with Landsat 8 and NDVI
In this exercise, we will be analyzing the Landsat 8 data. The layer
we will be using is an ingested subset of the Landsat on AWS data,
which contains data over 2016, over the continental US, and with
30% or less cloud cover.
There are 3 objectives in this exercise:
- __Objective ... | github_jupyter |
# Lesson 3 Demo 4: Using the WHERE Clause
<img src="images/cassandralogo.png" width="250" height="250">
### In this exercise we are going to walk through the basics of using the WHERE clause in Apache Cassandra.
##### denotes where the code needs to be completed.
Note: __Do not__ click the blue Preview button in the... | github_jupyter |
<a id="title_ID"></a>
# JWST Pipeline Validation Notebook: calwebb_image2, NIRCam imaging
<span style="color:red"> **Instruments Affected**</span>: e.g., NIRCam
### Table of Contents
<div style="text-align: left">
<br> [Introduction\*](#intro)
<br> [JWST CalWG Algorithm\*](#algorithm)
<br> [Defining Terms](#t... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
import os
import sys
import logging
module_path = os.path.abspath(os.path.join("../.."))
if module_path not in sys.path:
sys.path.append(module_path)
from pvi.models import LogisticRegressionModel
from pvi.clients import Client
from pvi.distributions import MultivariateGaus... | github_jupyter |
```
"""
LICENSE MIT
2020
Guillaume Rozier
Website : http://www.guillaumerozier.fr
Mail : guillaume.rozier@telecomnancy.net
README:
This file contains a script that automatically update data. In the morning it update World data, and it updates French data as soon as they are released by Santé publique France.
"""
impo... | github_jupyter |
```
# PCA
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the dataset
dataset = pd.read_csv('Wine.csv')
X = dataset.iloc[:, 0:13].values
y = dataset.iloc[:, 13].values
# Splitting the dataset into the Training set and Test set
from sklearn.model_selection im... | github_jupyter |
```
import os
import pandas as p
import numpy as np
from PIL import ImageEnhance
from PIL import Image, ImageChops, ImageOps
import keras
train_labels = p.read_csv(os.path.join('/mnt/lab_data2/amr1/diabetic_retinopathy/trainLabels.csv'))
image_to_label = dict(zip(train_labels.image, train_labels.level))
valid_ids = []... | github_jupyter |
# Further Python Basics
```
names = ['alice', 'jonathan', 'bobby']
ages = [24, 32, 45]
ranks = ['kinda cool', 'really cool', 'insanely cool']
for (name, age, rank) in zip(names, ages, ranks):
print name, age, rank
for index, (name, age, rank) in enumerate(zip(names, ages, ranks)):
print index, name, age, rank
... | github_jupyter |
<font style="font-size:96px; font-weight:bolder; color:#0040a0"><img src="http://montage.ipac.caltech.edu/docs/M51_logo.png" alt="M" style="float: left; padding: 25px 30px 25px 0px;" /></font>
<i><b>Montage</b> Montage is an astronomical image toolkit with components for reprojection, background matching, coaddition a... | github_jupyter |
<img src="https://github.com/pmservice/ai-openscale-tutorials/raw/master/notebooks/images/banner.png" align="left" alt="banner">
# Notebook for analyzing payload transactions causing drift
Use this notebook to analyze payload transactions that are causing drift, both a drop in accuracy and a drop in data consistency.... | github_jupyter |

# Experiment Notebook - AutoAI Notebook v1.14.5
This notebook contains the steps and code to demonstrate support of AutoAI experiments in Watson Machine Learning service. It introd... | github_jupyter |
From https://github.com/clEsperanto/pyclesperanto_prototype/blob/master/demo/segmentation/Segmentation_3D.ipynb
Tweaked to handle different images
```
from skimage.io import imread, imshow
import matplotlib.pyplot as plt
parent_dir = "D:\\elephasbio\\2021-05-14 Day 3 VD2 EMT-6 fragments\\fragments-001\\";
file_name ... | github_jupyter |
<table>
<tr>
<td width=15%><img src="./img/UGA.png"></img></td>
<td><center><h1>Refresher Course on Matrix Analysis and Optimization</h1><h2> Python Basics </h2></center></td>
<td width=15%><a href="http://www.iutzeler.org" style="font-size: 16px; font-weight: bold">Franck Iutzeler</a> <a href="https://ljk.imag.fr/mem... | github_jupyter |
<a href="https://colab.research.google.com/github/sujitpal/keras-tutorial-osdc2020/blob/master/01_04_exercise_1_solved.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Exercise 1
In this exercise, we will construct a CNN model to classify images u... | github_jupyter |
<a href="https://colab.research.google.com/github/shahd1995913/Tahalf-Mechine-Learning-DS3/blob/main/SVM/ML1_S6_Assignment.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# ML1-S6 (Assignment)
----
## Problem 1: SVM
---
- [x] Build a classificatio... | github_jupyter |
```
import pandas as pd
import numpy as np
import os
import datetime
import geopandas as gpd
from shapely.geometry import Point
from scipy.spatial.distance import cdist
from geopy import distance
#Takes in the county centers & neighboring county data, creates distance based on specific columns of county_centers
def dis... | github_jupyter |
# Numerical programming with Python
### Ipython Notebook
IPython is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language, that offers introspection, rich media, shell syntax, tab completion, and history. IPython provides the following fea... | github_jupyter |
```
import PyPDF2
import re
from nltk.stem import PorterStemmer
from sklearn.feature_extraction.text import CountVectorizer
import pandas as pd
from sklearn.metrics import silhouette_score
from sklearn.cluster import KMeans
import matplotlib.pyplot as plt
from sklearn.preprocessing import normalize
import os,json
impor... | github_jupyter |
```
# Mount Google Drive
from google.colab import drive # import drive from google colab
ROOT = "/content/drive" # default location for the drive
print(ROOT) # print content of ROOT (Optional)
drive.mount(ROOT) # we mount the google drive at /content/drive
!pip install pennylane
from I... | github_jupyter |
# Tracking an Unknown Number of Objects
While SVI can be used to learn components and assignments of a mixture model, pyro.contrib.tracking provides more efficient inference algorithms to estimate assignments. This notebook demonstrates how to use the `MarginalAssignmentPersistent` inside SVI.
```
import math
import ... | github_jupyter |
# Lab 1: Linear Regression and Overfitting
### Machine Learning and Pattern Recognition, September 2015
* The lab exercises should be made in groups of two or three people.
* The deadline is sunday September 20, 23:59.
* Assignment should be sent to Philip Versteeg. (p.j.j.p.versteeg@uva.nl) The subject line of your ... | github_jupyter |
# VacationPy
----
#### Note
* Instructions have been included for each segment. You do not have to follow them exactly, but they are included to help you think through the steps.
```
# Dependencies and Setup
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import requests
import gmaps
import os
... | github_jupyter |
# day 13: Hyperparameter Search
# Objectives
* See how to do grid search using sklearn
* See how to do random search using sklearn
# Outline
* [Part 1: Practical multiclass hyperparameters for MLPs](#part1)
* [Part 2: Grid search](#part2)
* [Part 3: Random search](#part3)
We expect you can at least run through thi... | github_jupyter |
## CIFAR 10
```
%matplotlib inline
%reload_ext autoreload
%autoreload 2
import argparse
import os
import shutil
import time
from fastai.transforms import *
from fastai.dataset import *
from fastai.fp16 import *
from fastai.conv_learner import *
from pathlib import *
from fastai import io
import tarfile
import torch
... | github_jupyter |
<table align="left" width="100%"> <tr>
<td style="background-color:#ffffff;">
<a href="http://qworld.lu.lv" target="_blank"><img src="..\images\qworld.jpg" width="35%" align="left"> </a></td>
<td style="background-color:#ffffff;vertical-align:bottom;text-align:right;">
prepared... | github_jupyter |
```
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sbn
import tensorflow
from tensorflow import keras
from tensorflow.keras.layers import Dense
from keras.models import Sequential
from keras.layers import Dense, Dropout
from keras.wrappers.scikit_learn import KerasRegressor
fr... | github_jupyter |
# Visualization & helper code
```
%%html
<style>@import url('style.css')</style><script>IPython.OutputArea.prototype._should_scroll = function(){return false}</script>
import os
import subprocess
import sys
import time
import IPython
import matplotlib
import librosa
import numpy as np
import pandas as pd
import skle... | github_jupyter |
# This python code builds ScienceBase items that house and describe specific versions of data files from the NHDPlusV2.1 that are being used in the Biogeographic Information System. Data were extracted from ftp://ftp.horizon-systems.com/NHDplus/NHDPlusV21/ and stored within ScienceBase as attachments. Although reorga... | github_jupyter |
# RGI07 (Svalbard and Jan Mayen)
F. Maussion, Dec 2021
Goal: RGI6, except Jan Mayen
```
import pandas as pd
import geopandas as gpd
import subprocess
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import seaborn as sns
import numpy as np
from utils import mkdir, submission_summary, needs_size_... | github_jupyter |
# Thermal Speed
```
%matplotlib inline
import numpy as np
from astropy import units as u
import matplotlib.pyplot as plt
from plasmapy.formulary import Maxwellian_speed_1D, Maxwellian_speed_2D, Maxwellian_speed_3D
from plasmapy.formulary.parameters import thermal_speed
```
The thermal_speed function can be used to... | github_jupyter |
## ```NoteBook Focus```
---
1. Figure out input and default variables.
- Setting some input to a default setting will make the user interface less crowded.
2. Choose and save models that will be used for voting in the app.
- Each model used will have a vote on whether the offender is recieving a prison sentence... | github_jupyter |
```
# Visualization of the KO+ChIP Gold Standard from:
# Miraldi et al. (2018) "Leveraging chromatin accessibility for transcriptional regulatory network inference in Th17 Cells"
# TO START: In the menu above, choose "Cell" --> "Run All", and network + heatmap will load
# NOTE: Default limits networks to TF-TF edges i... | github_jupyter |
# Neural Nets for Digit Classification
#### by Khaled Nasr as a part of a <a href="https://www.google-melange.com/gsoc/project/details/google/gsoc2014/khalednasr92/5657382461898752">GSoC 2014 project</a> mentored by Theofanis Karaletsos and Sergey Lisitsyn
This notebook illustrates how to use the NeuralNets module to... | github_jupyter |
# Pipelines for classifiers using LOOCV
For each dataset, classifier and folds:
- Robust scaling
- LOOCV
- balanced accurary as score
We will use folders *datasets2* and *results2_LOOCV*.
```
%reload_ext autoreload
%autoreload 2
%matplotlib inline
# remove warnings
import warnings
warnings.filterwarnings("ignore", ... | github_jupyter |
```
from ml_agent import TrainingParam, ReplayBuffer, DeepQAgent
from grid2op.Agent import AgentWithConverter
from grid2op.Reward import RedispReward
from grid2op.Converter import IdToAct
import numpy as np
import random
import warnings
import pdb
import grid2op
from grid2op.Reward import ConstantReward, FlatReward
fr... | github_jupyter |
# RAPIDS & Music: Related Artists Prediction from Playlists
### ASONAM 2019 Tutorial
### Authors
- Corey Nolet [cnolet@nvidia.com]
### Table of Contents
* Introduction
* Data Importing and Formatting
* Data Exploration
* Investigating artists
*
* Build Playlist Predictor
### Development Notes
- Developed ... | github_jupyter |
```
!pip install git+https://github.com/jsantoso2/keras-ocr.git#egg=keras-ocr
!nvidia-smi
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import os
import cv2
from google.colab.patches import cv2_imshow
import time
import keras_ocr
from google.colab import drive
drive.mount... | github_jupyter |
# Processing your Eclipse Photo with SunPy
#### Written by Steven Christe and Albert Shih
#### Taken from the following Github repository: https://github.com/ehsteve/solar-eclipse
This notebook allows you to take a photo of an eclipse, with a regular camera, and fit it to a solar coordinate system via a SunPy map obj... | github_jupyter |
#Charlottesville Fire Department Project: Machine Learning Predictions
Authors: Jackson Barkstrom, Habib Karaky, Josh Schuck, Garrett Vercoe. We joined together the data we used here in the "Cleaning and Merging" code. The data was originally worked on by many, including us, during Civic Innovation Day (special shouto... | github_jupyter |
```
import pandas as pd
import numpy as np
import os
import sys
sys.path.append('../src/')
from octopus import OctopusML
pd.options.display.max_columns = None
path_raw = '../data/raw/'
dirname = 'diabetes/'
filename = 'diabetes.csv'
```
## Load data
```
raw_df = pd.read_csv(os.path.join(path_raw, dirname, ... | github_jupyter |
```
from IPython.core.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))
%matplotlib inline
import warnings
warnings.filterwarnings("ignore")
import sqlite3
import pandas as pd
import numpy as np
import nltk
import string
import matplotlib.pyplot as plt
import seaborn as ... | github_jupyter |
```
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
import parent
import networks
from collections import OrderedDict
import torch.nn.functional as F
from mermaidlite import compute_warped_image_multiNC, identity_map_multiN
import torch
import random
import inverseConsistentNet
import networks
import data
import num... | github_jupyter |
#Restricted Boltzmann Machines
```
%tensorflow_version 2.x
```
##Learning data representations with RBMs
```
from sklearn.neural_network import BernoulliRBM
from tensorflow.keras.datasets import mnist
import numpy as np
(x_train, y_train), (x_test, y_test) = mnist.load_data()
image_size = x_train.shape[1]
original... | github_jupyter |
### **Creating** **own** **Dataset**
*Here I will use Fast.ai library to create the Facial Classification model. So, I will initiate the Fast.ai environment first.*
```
# !curl -s https://course.fast.ai/setup/colab | bash
```
*I'm using Colab for this Project. So, I am accessing My drive.*
```
# from google.colab i... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.