text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
# <img src="https://img.icons8.com/bubbles/100/000000/3d-glasses.png" style="height:50px;display:inline"> EE 046746 - Technion - Computer Vision #### Elias Nehme ## Tutorial 12 - Introduction to 3D Deep Learning --- <img src="./assets/tut_09_teaser0.gif" style="width:800px"> * <a href="https://towardsdatascience.com...
github_jupyter
# Classification with Neural Decision Forests **Author:** [Khalid Salama](https://www.linkedin.com/in/khalid-salama-24403144/)<br> **Date created:** 2021/01/15<br> **Last modified:** 2021/01/15<br> **Description:** How to train differentiable decision trees for end-to-end learning in deep neural networks. ## Introduc...
github_jupyter
``` import figure_traub_eigensources as fte import numpy as np import h5py as h5 import scipy import matplotlib.pyplot as plt from traub_data_kcsd_column_figure import (prepare_electrodes, prepare_pots, set_axis) import os def plot_eigensources(k, v, start=0, stop=6): letters = [...
github_jupyter
``` # %matplotlib inline %matplotlib notebook from __future__ import print_function ## Force python3-like printing try: from importlib import reload except: pass from matplotlib import pyplot as plt import os import warnings import numpy as np from astropy.table import Table import pycoco as pcc reload(pc...
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
<a href="https://colab.research.google.com/github/deep-diver/Continuous-Adaptation-for-Machine-Learning-System-to-Data-Changes/blob/main/notebooks/03_Batch_Prediction_Performance.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ## Outline 1. Upload t...
github_jupyter
Following on from [Guide to the Sequential Model](https://keras.io/getting-started/sequential-model-guide/) 10 May 2017 - WH Nixalo ### Getting started with the Keras Sequential model The ```Sequential``` model is a linear stack of layers. You can create a ```Sequential``` model by passing a list of layer instances...
github_jupyter
##### Copyright 2020 The Cirq Developers ``` #@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 agre...
github_jupyter
``` #get deep learning basics import tensorflow as tf from transformers import TFGPT2LMHeadModel, GPT2Tokenizer tokenizer = GPT2Tokenizer.from_pretrained("gpt2-large") GPT2 = TFGPT2LMHeadModel.from_pretrained("gpt2-large", pad_token_id=tokenizer.eos_token_id) # settings #for reproducability SEED = 34 tf.random.set_...
github_jupyter
``` """ Created on Sun Feb 14 21:01:54 2016 @author: Walter Martins-Filho e-mail: walter at on.br waltersmartinsf at gmail.com """ #****************************************************************************** #Main Goal: include the time_info in the header of the images. #************************************...
github_jupyter
# ETL Processes ``` import os import glob import psycopg2 import pandas as pd from sql_queries import * conn = psycopg2.connect("host=127.0.0.1 dbname=postgres user=huiren password=1234") cur = conn.cursor() def get_files(filepath): all_files = [] for root, dirs, files in os.walk(filepath): files = glo...
github_jupyter
# Damaged Properties ``` import pandas as pd import numpy as np df = pd.read_csv('../../data/raw/Damaged_Property.csv') df.head() df.dtypes df.info() ``` ## Rename columns ``` df.rename(columns={'Latitude': 'Y', 'Longitude': 'X'}, inplace=True) df.head() ``` ## Empty values ``` for col in df: ...
github_jupyter
![Qiskit](https://github.com/Qiskit/qiskit-tutorials/raw/115c78962dda85bac29d679063b7d0d0ab1d1ab4/images/qiskit-heading.gif) # Qcamp - Terra ## IBMQ ### Donny Greenberg, Kevin Krsulich and Thomas Alexander # Gameplan * Basics * What is Terra? * Teleportation * QPE a few ways * Browsing device info * Tips and t...
github_jupyter
# Data Visualization in Python ## Introduction In this module, you will learn to quickly and flexibly make a wide series of visualizations for exploratory data analysis and communicating to your audience. This module contains a practical introduction to data visualization in Python and covers important rules that any...
github_jupyter
# Lesson on Pandas 25 October 2017 ``` import pandas as pd surveys_df = pd.read_csv("surveys.csv") type(surveys_df) a = 67 type(a) surveys_df.dtypes column_names = list(surveys_df.columns) column_names surveys_df.head(6) surveys_df.shape pd.unique(surveys_df['species_id']) plot_names = pd.unique(surveys_df['plot_id'])...
github_jupyter
``` from tqdm import tqdm import re def cleaning(string): string = string.replace('\n', ' ').replace('\t', ' ') string = re.sub(r'[ ]+', ' ', string).strip() return string import tensorflow as tf import tensorflow_datasets as tfds from t5.data import preprocessors as prep import functools import t5 import ...
github_jupyter
# Multilayer Neural Networks in TensorFlow ### Goals: - Auto-differentiation: the basics of `TensorFlow` ### Dataset: - Similar as first Lab - Digits: 10 class handwritten digits - http://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_digits.html#sklearn.datasets.load_digits ``` %matplotlib inline ...
github_jupyter
<a href="https://colab.research.google.com/github/jeffheaton/t81_558_deep_learning/blob/master/t81_558_class_06_5_yolo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # T81-558: Applications of Deep Neural Networks **Module 6: Convolutional Neural N...
github_jupyter
``` import numpy as np import tensorflow as tf import tensorview as tv def simple_mnist(batch_num=1000, batch_size=32, image_shape=(28,28,1)): image = tf.keras.Input(shape=image_shape) x = tf.keras.layers.Conv2D(64, 3)(image) x = tf.keras.layers.BatchNormalization()(x) x = tf.keras.layers.ReLU()(x) ...
github_jupyter
``` import numpy as np import pandas as pd from tqdm import tqdm trainData = open('../../../dataFinal/preprocessed_train_text.txt', 'r').readlines() trainLabels = open('../../../dataFinal/finalTrainLabels.labels', 'r').readlines() testData = open('../../../dataFinal/preprocessed_test_text.txt', 'r').readlines() testLab...
github_jupyter
<a href="https://colab.research.google.com/github/Madhav2204/LGMVIP-DataScience/blob/main/Task_9_Handwritten_equation_solver_using_CNN.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ## **Author : Madhav Shrivastava** Task-9 : Handwritten equation ...
github_jupyter
# Read and view Delft3D grid, depth and enclosure files * Move reading functionality to JulesD3D ``` %matplotlib widget import matplotlib.pyplot as plt import matplotlib.patheffects as PathEffects from mpl_toolkits.mplot3d import Axes3D import pandas as pd import numpy as np from JulesD3D.dep import Depth from JulesD...
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
# Foundations of Computational Economics #35 by Fedor Iskhakov, ANU <img src="_static/img/dag3logo.png" style="width:256px;"> ## Stochastic consumption-savings model with discretized choice <img src="_static/img/lecture.png" style="width:64px;"> <img src="_static/img/youtube.png" style="width:65px;"> [https://you...
github_jupyter
# LAB 4a: Creating a Sampled Dataset. **Learning Objectives** 1. Setup up the environment 1. Sample the natality dataset to create train/eval/test sets 1. Preprocess the data in Pandas dataframe ## Introduction In this notebook, we'll read data from BigQuery into our notebook to preprocess the data within a Panda...
github_jupyter
# Molecular mechanisms of antibiotic resistance ``` # Housekeeping library(ggplot2) library(scales) library(tidyr) source("source.R") # Read in data multihit = read.table("../../data/deep_seq/multihit_nonsynonymous_variant_data.txt", sep = "\t", header = T) dim(multihit...
github_jupyter
# Algoritmizace a programování 2 ## Cv.5. Zápočtový test - ukázka Témata v 1. zápočtovém testu: * OOP návrh entity (třída, datové členy, metody) * Sekvenční struktury (zásobník, fronta, setříděný seznam) * Vyhledávací algoritmy nad sekvenčními strukturami * Řadící algoritmy nad sekvenčními strukturami ### 5.1 Model...
github_jupyter
# How to download protein sequences from metagenomes belonging to thermal environment User request: ``` I would like to download protein sequences from metagenomes belonging to thermal environment. Is there any way that this can be acheived. ``` ``` # Requirements !pip install requests ``` ## Obtain the analysis for...
github_jupyter
``` #import argparse import datetime import sys import json from collections import defaultdict from pathlib import Path from tempfile import mkdtemp import numpy as np import torch from torch import optim import models import objectives from utils import Logger, Timer, save_model, save_vars, unpack_data from number...
github_jupyter
``` from __future__ import print_function import matplotlib.pyplot as plt import numpy as np import os import sys import tarfile import tensorflow as tf from IPython.display import display, Image from scipy import ndimage from six.moves.urllib.request import urlretrieve from six.moves import cPickle as pickle %matplotl...
github_jupyter
# Text Mining In diesem Notebook werden die von der Gruppe 1 bereitstellten Dokumenten aufbereitet und ein Text Mining Verfahren wird ausgeführt, sodass die Informationen dieser Dokumente in der Form einer Knowledge-Graph-Datenbank zur Gruppe 3 bereitgestellt wird. ## Import der Bibliotheken #### Basis-Bibliotheken f...
github_jupyter
# _Modeling of Qubit Chain_ <img src="images/line_qubits.png" alt="Qubit Chain"> The model may be illustrated using images from composer. First image is for one step of quantum walk. Each step uses two partitions described earlier. For five qubits each partition includes two two-qubit gates denoted here as m1 and m2...
github_jupyter
<style>div.container { width: 100% }</style> <img style="float:left; vertical-align:text-bottom;" height="65" width="172" src="../assets/holoviz-logo-unstacked.svg" /> <div style="float:right; vertical-align:text-bottom;"><h2>Tutorial 8. Advanced Dashboards</h2></div> At this point we have learned how to build intera...
github_jupyter
## [How to leverage TensorFlow's TFRecord to train Keras model](https://www.dlology.com/blog/how-to-leverage-tensorflows-tfrecord-to-train-keras-model/) Import packages, realize how we import keras from tensorflow `tensorflow.keras` ``` from tensorflow.keras.applications.vgg16 import VGG16 from tensorflow.keras impo...
github_jupyter
``` import numpy as np import pandas as pd df_movies = pd.read_csv('movies.csv') df_links = pd.read_csv('links.csv') df_ratings = pd.read_csv('ratings.csv') df_tags = pd.read_csv('tags.csv') df_movies.head() df_ratings.head() df_tags.head() import math tf = df_tags.groupby(['movieId','tag'], as_index=False, sort=False...
github_jupyter
# Title: IP Explorer <details> <summary> <u>Details...</u></summary> **Notebook Version:** 1.0<br> **Python Version:** Python 3.7 (including Python 3.6 - AzureML)<br> **Required Packages**: kqlmagic, msticpy, pandas, numpy, matplotlib, networkx, ipywidgets, ipython, scikit_learn, dnspython, ipwhois, foli...
github_jupyter
# MNIST Image Classification Using LeNet In this tutorial, we are going to walk through the logic in `lenet_mnist.py` shown below and provide step-by-step instructions. ``` !cat lenet_mnist.py ``` ## Step 1: Prepare training and evaluation dataset, create FastEstimator `Pipeline` `Pipeline` can take both data in me...
github_jupyter
<i>Copyright (c) Microsoft Corporation. All rights reserved.</i> <i>Licensed under the MIT License.</i> # Sequential Recommender Quick Start ### Example: SLi_Rec : Adaptive User Modeling with Long and Short-Term Preferences for Personailzed Recommendation Unlike a general recommender such as Matrix Factorization or ...
github_jupyter
## Importing the required libraries ``` import librosa import librosa.display import numpy as np import matplotlib.pyplot as plt import tensorflow as tf from matplotlib.pyplot import specgram import keras from keras.preprocessing import sequence from keras.models import Sequential from keras.layers import Dense, Embe...
github_jupyter
``` import numpy as np from scipy.sparse import linalg import matplotlib.pyplot as plt from matplotlib import rcParams from scipy import integrate from scipy.linalg import qr from mpl_toolkits.mplot3d import Axes3D plt.rcParams['figure.figsize'] = [10,10] plt.rcParams.update({'font.size': 18}) # spatial discretizati...
github_jupyter
# OWSLib versus Birdy This notebook shows a side-by-side comparison of `owslib.wps.WebProcessingService` and `birdy.WPSClient`. ``` from owslib.wps import WebProcessingService from birdy import WPSClient url = "https://bovec.dkrz.de/ows/proxy/emu?Service=WPS&Request=GetCapabilities&Version=1.0.0" wps = WebProcessin...
github_jupyter
# NOAA RATPAC-B Data ----- ## Initial Data Exploration Initial data exploration for the NOAA RATPAC-B temperature data. ``` processed_data_dir = '../data/processed' # Imports import calendar from datetime import datetime, timedelta import os import pickle import sys import cartopy.crs as ccrs import matplotlib.pyp...
github_jupyter
# Sequential Monte Carlo with two gaussians ``` import pymc3 as pm import numpy as np import matplotlib.pyplot as plt import theano.tensor as tt import shutil plt.style.use('seaborn-darkgrid') print('Running on PyMC3 v{}'.format(pm.__version__)) ``` Sampling from $n$-dimensional distributions with multiple peaks wi...
github_jupyter
``` # Install the environnement %pip install git+https://github.com/AwePhD/NotebooksLabsessionImage.git # Import dataset # Can be found at https://www.kaggle.com/vishalsubbiah/pokemon-images-and-types !rm -rf ./* !curl -LO https://github.com/AwePhD/NotebooksLabsessionImage/raw/main/pokemon_dataset.zip !unzip -qq pokem...
github_jupyter
<table width = "100%"> <tr style="background-color:white;"> <!-- QWorld Logo --> <td style="text-align:left;width:200px;"> <a href="https://qworld.net/" target="_blank"><img src="../images/QWorld.png"> </a></td> <td style="text-align:right;vertical-align:bottom;font-size:16px;"> Prepared...
github_jupyter
## bayespropestimation usage guide The BayesProportionsEstimation class and its methods use a series of defaults which means that user need not provide any information other than the data for samples A and B. This notebook covers usage where a user may want to use non-default parameters. #### Sections ##### Class B...
github_jupyter
# **pix2pix** --- <font size = 4>pix2pix is a deep-learning method allowing image-to-image translation from one image domain type to another image domain type. It was first published by [Isola *et al.* in 2016](https://arxiv.org/abs/1611.07004). The image transformation requires paired images for training (supervised...
github_jupyter
# Welter issue #6 ## Set up the Starfish config.yaml files and directories ### Part 2- Git-er-done Michael Gully-Santiago Thursday, December 17, 2015 Let's do it. ``` import warnings warnings.filterwarnings("ignore") import numpy as np from astropy.io import fits import matplotlib.pyplot as plt % matplotlib inli...
github_jupyter
# Sampling High-Dimensional Vectors Aaron R. Voelker (January 15, 2016) ``` %pylab inline import numpy as np import pylab try: import seaborn as sns # optional; prettier graphs except ImportError: sns = None import nengo from nengolib.compat import get_activities from nengolib.stats import ScatteredHypersphe...
github_jupyter
``` def __Version__(): return('1.1.0') import warnings warnings.filterwarnings('ignore') import ipywidgets as widgets from IPython.display import display, clear_output %pylab inline import matplotlib.pyplot as plt import pandas as pd import seaborn as sns from PIL import Image import datetime import time from ip...
github_jupyter
##### Copyright 2019 The TensorFlow Authors. ``` #@title Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
github_jupyter
> **Note:** In most sessions you will be solving exercises posed in a Jupyter notebook that looks like this one. Because you are cloning a Github repository that only we can push to, you should **NEVER EDIT** any of the files you pull from Github. Instead, what you should do, is either make a new notebook and write you...
github_jupyter
# Multi-frequency FDFD ### Introductory example This example shows how to simulate using FDFD_MF the frequency and spatial profile conversion of an inserted waveguide mode by appropriately choosing the modulation depth and phase profiles. Reproduces the unoptimized structure in J. Wang et al., "Adjoint-based optimizat...
github_jupyter
# Embedding and Filtering Inference Set default input and output directories according to local paths for data ``` import os os.environ['TRKXINPUTDIR']="/global/cfs/cdirs/m3443/data/trackml-kaggle/train_10evts" os.environ['TRKXOUTPUTDIR']= "/global/cfs/projectdirs/m3443/usr/caditi97/iml2020/outtest" ``` Import neces...
github_jupyter
# Hidden Markov Model Demo A Hidden Markov Model (HMM) is one of the simpler graphical models available in _SSM_. This notebook demonstrates creating and sampling from and HMM using SSM, and fitting an HMM to synthetic data. A full treatment of HMMs is beyond the scope of this notebook, but there are many good resourc...
github_jupyter
# Part 7 - Federated Learning with FederatedDataset Here we introduce a new tool for using federated datasets. We have created a `FederatedDataset` class which is intended to be used like the PyTorch Dataset class, and is given to a federated data loader `FederatedDataLoader` which will iterate on it in a federated fa...
github_jupyter
``` import numpy as np import scipy as sp from scipy import spatial import matplotlib.pyplot as plt from nltk.stem.lancaster import LancasterStemmer from sklearn.metrics.pairwise import cosine_similarity from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer from sklearn.metrics import pairwis...
github_jupyter
``` import torch.nn as nn import torch.nn.functional as F import pandas as pd import numpy as np import matplotlib.pyplot as plt import torch import torchvision import torchvision.transforms as transforms from torch.utils.data import Dataset, DataLoader from torchvision import transforms, utils # Ignore warnings imp...
github_jupyter
# hana-ml Tutorial - Clustering **Author: TI HDA DB HANA Core CN** In this tutorial, we will show you how to use clustering functions in hana-ml to preprocess data and train a model with a public Iris dataset. ## Import necessary libraries and functions ``` from hana_ml.dataframe import ConnectionContext from ha...
github_jupyter
# 3D Transformation Matrices --- - Author: Diego Inácio - GitHub: [github.com/diegoinacio](https://github.com/diegoinacio) - Notebook: [3DTransformation_Matrix.ipynb](https://github.com/diegoinacio/creative-coding-notebooks/blob/master/Computer-Graphics/3DTransformation_Matrix.ipynb) --- Overview and application of tri...
github_jupyter
<p> <img src="https://s3.amazonaws.com/iotanalytics-templates/Logo.png" style="float:left;"> <h1 style="color:#1A5276;padding-left:115px;padding-bottom:0px;font-size:28px;">AWS IoT Analytics | Smart Building Energy Consumption</h1> </p> <p style="color:#1A5276;padding-left:90px;padding-top:0px;position:relative...
github_jupyter
``` # Install libraries %%capture ! pip install "flaml[ts_forecast]" # Download the dataset %%capture ! rm -rf * ! gdown --id 15vtwJVePVrbhzcS2gr4xY7qWOPi3Hfzo ! unzip cab.zip ! rm cab.zip # Import libraries %%capture import pandas as pd import numpy as np from flaml import AutoML from pathlib import Path import ...
github_jupyter
<a href="https://colab.research.google.com/github/Vaibhavsharma0209/Markowitz-Model/blob/master/Markowitz_Model.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` import pandas as pd import quandl as q from datetime import datetime from pandas_data...
github_jupyter
# 1.x to 3.x Rule Migration Guide This guide describes changes needed for rules to run under Insights Core 3.x. It covers the following topics: - filtering - decorator interfaces - function signatures - cluster rules - testing - new style specs ## Filtering Filters are now applied to registry points or datasources in...
github_jupyter
## Checkpoint Inspector Loads folders of `json` checkpoints dumped by `train.lua` and visualizes training statistics. ``` import json from scipy.misc import imread, imresize import os import matplotlib.pyplot as plt %matplotlib inline plt.rcParams['figure.figsize'] = (10, 10) plt.rcParams['image.interpolation'] = '...
github_jupyter
## Questionário 21 Orientações: - Registre suas respostas no questionário de mesmo nome no SIGAA. - O tempo de registro das respostas no questionário será de 10 minutos. Portanto, resolva primeiro as questões e depois registre-as. - Haverá apenas 1 (uma) tentativa de resposta. - Submeta seu arquivo-fonte (utilizado ...
github_jupyter
``` from google.colab import files uploaded = files.upload() import io import numpy as np import pandas as pd import matplotlib.pyplot as plt import keras from sklearn import metrics from sklearn.model_selection import StratifiedShuffleSplit from keras.models import Sequential from keras.layers import Dense, Dropout, L...
github_jupyter
# Stage 1 Analysis #### Partial rank correlation coefficient analysis (PRCC) - regression based analysis code ### Step 1: Input preparation ``` #####NIMML###### ### Author: Meghna Verma ### Date : August 10, 2017 #Set it to the directory that has all the csv files obatined after converting the tsv file outptus from ...
github_jupyter
# Spectral Clustering *Complete and hand in this completed worksheet (including its outputs and any supporting code outside of the worksheet) with your assignment submission. Please check the pdf file for more details.* In this exercise you will: - implement the **KNN graph** and other necessary algorithms for **...
github_jupyter
## Installation ``` $ pip install requests mapboxgl supermercado ``` ``` %pylab inline import os import json import random import requests import datetime from io import BytesIO import urllib.parse from supermercado.burntiles import tile_extrema from mapboxgl.utils import * from mapboxgl.viz import * token = os.e...
github_jupyter
# **Getting Started with NETS** **NETS** is a vanilla Deep Learning framework, made using only **NumPy**. This project was first introduced as an assignment I made at the [University of Oslo](https://www.uio.no/studier/emner/matnat/ifi/IN5400/) and [Stanford University](http://cs231n.stanford.edu/syllabus.html) . Howe...
github_jupyter
``` # importing libraries import pandas as pd import numpy as np import os from sklearn import preprocessing from sklearn.preprocessing import OneHotEncoder from sklearn.linear_model import LogisticRegression from sklearn.model_selection import train_test_split, GridSearchCV from sklearn.metrics import accuracy_score ...
github_jupyter
<a href="https://colab.research.google.com/github/tlamadon/pygrpfe/blob/main/docs-src/notebooks/gfe_notebook.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Discretizing Unobserved Heterogeneity: A Step-by-Step Example Welcome to the example on u...
github_jupyter
# Phase 3 Weighted Bagging ``` import pandas as pd import matplotlib.pyplot as plt from os import listdir from os.path import isfile, join import os import re import csv import codecs import gensim import itertools import numpy as np import pandas as pd import operator import sys from nltk import ngrams from collec...
github_jupyter
# [Module 3.2] Custom PCA Docker Image 생성 및 ECR Model 학습 이 노트뷱은 Bring Your Own Container(BYOC)를 위해서 Custom Docker Image를 생성 합니다. 이 docker image는 학습 및 추론에 사용 됩니다. 구체적으로 이 노트북은 아래와 같은 작업을 합니다. - Custom docker image name 정의 - PCA 학습 코드를 docker container 폴더로 복사 - Dockerfile 작성 - Docker Image 빌드 및 ECR에 등록 - Docker Image에...
github_jupyter
# Peform statistical analyses of GNSS station locations and tropospheric zenith delays **Author**: Simran Sangha, David Bekaert - Jet Propulsion Laboratory This notebook provides an overview of the functionality included in the **`raiderStats.py`** program. Specifically, we outline examples on how to perform basic st...
github_jupyter
# Annealing with `qubovert` *qubovert* must be pip installed. Import `qubovert`. ``` import qubovert as qv ``` In this notebook, we will review some basics of the annealing and simulation functionality provided by `qubovert`. Let's look at everything in the simulation (`sim`) library. ``` print(qv.sim.__all__) ```...
github_jupyter
# Part 4 - Application The main idea, which I'll cover in the post focuses on taking our predictions and using the "probability" distriubtions generated by the model in the wOBA calculation - rather than evaluating based on result entirely, we'll evaluate based on likelihoood of possible results. The heavy lifting f...
github_jupyter
# Linked List ### Each element is called Node and that stores two things one is the data and one the refernce to next node ![image.png](attachment:image.png) **Head** stores the reference to the very first node, after knowing that we can travel through the complete linkedList Every **node** will have a data and a ...
github_jupyter
``` #akyork #written to analyze the 16 HMO glycans provided by Ben import sys # add the path to glycompare into the sys PATH sys.path.insert(0, '/Users/apple/PycharmProjects/GlyCompare/glycompare/') import __init__ import json_utility from glypy.io import glycoct, iupac import extract_motif import customize_motif_vec...
github_jupyter
# Part D: Comparison of toroidal meniscus models with different profile shapes ## Introduction So far all the capillary entry pressures for the percoaltion examples were calculated using the ``Standard`` physics model which is the ``Washburn`` model for straight walled capillary tubes. This has been shown to be a bad...
github_jupyter
``` import astropy.coordinates as coord import astropy.units as u from astropy.table import Table, join, vstack import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt %matplotlib inline from astropy.io import ascii from scipy.interpolate import interp1d from scipy.stats import binned_statistic im...
github_jupyter
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. ## AKS Load Testing Once a model has been deployed to production it is important to ensure that the deployment target can support the expected load (number of users and expected response speed). This is critical for providing r...
github_jupyter
# Orchestration of prediction experiments with sktime * Evaluate the predictive performance one or more strategies on one or more datasets [Github weblink](https://github.com/alan-turing-institute/sktime/blob/master/examples/experiment_orchestration.ipynb) ``` from sktime.experiments.orchestrator import Orchestrator...
github_jupyter
``` from google.colab import files uploaded = files.upload() !unzip df.zip import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from sklearn.metrics import mean_squared_error from statsmodels.tsa.stattools import adfuller from statsmodels.graphics.tsaplots import plot_acf,plot_pa...
github_jupyter
# Setup for Screen Reader ``` !pip install colab-a11y-utils !pip install audio-plot-lib import audio_plot_lib as apl from colab_a11y_utils import set_sound_notifications set_sound_notifications() ``` # From Python Data Science Handbook The original is at the following URL, with the text unchanged and only some of t...
github_jupyter
``` Chapter 2 – End-to-end Machine Learning project Welcome to Machine Learning Housing Corp.! Your task is to predict median house values in Californian districts, given a number of features from these districts. This notebook contains all the sample code and solutions to the exercices in chapter 2. Note: You may f...
github_jupyter
# <center>Using Optimization in Simulating 2-D Wildland Fire Behavior </center> <center>by Diane Wang</center> --- # Optimization methods used in fire behavior simulation Fire behavior refers to the gross characteristics of fire, including fireline intensity (power per unit length of the flaming front), spread rate,...
github_jupyter
This exercise is to test your understanding of Python basics. Answer the questions and complete the tasks outlined below; use the specific method described if applicable. In order to get complete points on your homework assigment you have to a) complete this notebook, b) based on your results answer the multiple choic...
github_jupyter
# Aggregating and downscaling timeseries data The **pyam** package offers many tools to facilitate processing of scenario data. In this notebook, we illustrate methods to aggregate and downscale timeseries data of an `IamDataFrame` across regions and sectors, as well as checking consistency of given data along these d...
github_jupyter
# Using PyTorch with TensorRT through ONNX: TensorRT is a great way to take a trained PyTorch model and optimize it to run more efficiently during inference on an NVIDIA GPU. One approach to convert a PyTorch model to TensorRT is to export a PyTorch model to ONNX (an open format exchange for deep learning models) and...
github_jupyter
``` from bs4 import BeautifulSoup as soup import requests url= "https://www.tutorialspoint.com/index.htm" # jere we are storing the URL address print("The URL choosen is", url) req = requests.get(url) # using request package we are obtaining the url address and stroing the request in req print(req) soup_var = soup(re...
github_jupyter
``` import pathlib import tensorflow as tf import tensorflow.keras.backend as K import skimage import imageio import numpy as np import matplotlib.pyplot as plt # Makes it so any changes in pymedphys is automatically # propagated into the notebook without needing a kernel reset. from IPython.lib.deepreload import rel...
github_jupyter
# Magenta魔改记-4:Melody RNN的数据表示和tfrecord读取 本文介绍Melody RNN数据表示的具体形式,以及如何读取Melody RNN转换后保存的.tfrecord文件。 ###### Magenta version:1.1.1 # 数据表示和tfrecord读取 首先,我们以一首最简单的歌曲《小星星》为例。 ![](pics/star.png) 在一切之前,导入我们需要的库: ``` import tensorflow as tf import magenta as mgt import numpy as np #加这行是因为jupyter notebook对tf.app.flags....
github_jupyter
# 1. Introduction to Numpy Numpy is a Library in python that specializes in dealing with multidimensional Arrays. The cool features of Numpy are * **Automatic Checking :** Numpy ndArrays automatically check the consistancy of data. For instance, it is not possible to have 1st row with 2 elements and 2nd row with 3 elem...
github_jupyter
# WBIC This notebook gives a tutorial on how to use Watanabe-Bayesian information criterion (WBIC) for feature selection. The WBIC is an information criterion. Similarly to other criteria (AIC, BIC, DIC) the WBIC endeavors to find the most parsimonious model, i.e., the model that balances fit with complexity. In other...
github_jupyter
# Denoising Autoencoder Sticking with the MNIST dataset, let's add noise to our data and see if we can define and train an autoencoder to _de_-noise the images. <img src='https://raw.githubusercontent.com/udacity/deep-learning-v2-pytorch/master/autoencoder/denoising-autoencoder/notebook_ims/autoencoder_denoise.png' w...
github_jupyter
## 1. load and convert data into common training format ``` import pandas from tqdm.auto import tqdm import spacy.gold ROOT = '../../data/kaggle-ru/' train_data = pandas.read_csv(ROOT+'ru_train.csv') train_data[['before', 'after']] = train_data[['before', 'after']].astype(str) train_data.head(15) fix = train_data['cla...
github_jupyter
``` %%writefile train.py import argparse import os import lightgbm as lgb import pandas as pd from azureml.core import Run import joblib from sklearn.feature_extraction import text from sklearn.pipeline import Pipeline, FeatureUnion, make_pipeline from azure_utils.machine_learning.item_selector import ItemSelector i...
github_jupyter
<a href="https://colab.research.google.com/github/johnhallman/tigercontrol/blob/tutorials/tutorials/notebooks/Environments.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Environments: Load Different Tasks ``` !git clone https://github.com/johnha...
github_jupyter