text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
<a href="https://colab.research.google.com/github/kyle-gao/GRSS_TrackMSD2021/blob/main/MakeTilesDeepGlobe.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` """ Copyright 2021 Yi Lin(Kyle) Gao #@title Licensed under the Apache License, Version 2....
github_jupyter
# Autoencoder --- # Tutorial Objectives ## Architecture ![Deep ANN autoencoder](https://github.com/mpbrigham/colaboratory-figures/raw/master/nma/autoencoders/ae-ann-3h.png) ``` # @title Video 1: Extensions from IPython.display import YouTubeVideo video = YouTubeVideo(id="pgkrU9UqXiU", width=854, height=480, fs=1) ...
github_jupyter
``` # -*- coding: utf-8 -*- """ EVCのためのEV-GMMを構築します. そして, 適応学習する. 詳細 : https://pdfs.semanticscholar.org/cbfe/71798ded05fb8bf8674580aabf534c4dbb8bc.pdf This program make EV-GMM for EVC. Then, it make adaptation learning. Check detail : https://pdfs.semanticscholar.org/cbfe/71798ded05fb8bf8674580abf534c4dbb8bc.pdf """ ...
github_jupyter
<a href="https://colab.research.google.com/github/jeffheaton/t81_558_deep_learning/blob/master/t81_558_class_08_5_kaggle_project.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 8: Kaggle Data ...
github_jupyter
``` # import packages %matplotlib inline import os import sys from multiprocessing import Process, Queue import pandas as pd import optuna import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec sys.path.append('/opt/conda/GSASII/') # Configurations ### Change here ### STUDY_NAME = 'YOUR_MATERIAL' R...
github_jupyter
[[source]](../api/alibi.explainers.counterfactual.rst) # Counterfactual Instances ## Overview A counterfactual explanation of an outcome or a situation $Y$ takes the form "If $X$ had not occured, $Y$ would not have occured" ([Interpretable Machine Learning](https://christophm.github.io/interpretable-ml-book/counterf...
github_jupyter
# Combining Data With Joins ## Overview Teaching: 15 Exercises: 10 ### Questions - "How do I bring data together from separate tables?" ### Objectives - "Employ joins to combine data from two tables." - "Apply functions to manipulate individual values." - "Employ aliases to assign new names to tables and colu...
github_jupyter
``` import numpy as np import tensorflow as tf from tensorflow.keras.preprocessing.image import ImageDataGenerator train_datagen = ImageDataGenerator(rescale=1./255) val_datagen = ImageDataGenerator(rescale=1./255) train_generator = train_datagen.flow_from_directory('./dataset/train', ...
github_jupyter
# Scikit Learn and the K-nearest Neighbor Algorithm In this notebook we'll introduce the `sklearn` package and a few important concepts in machine learning: * Splitting data into test, train, and validation sets. * Fitting models to a dataset. * And using "Hyperparameters" to tune models. Lets revisit the example w...
github_jupyter
# Clean Data ### Imports ``` import numpy as np import pandas as pd # visualization import matplotlib.pyplot as plt %matplotlib inline import seaborn as sns # personal module scripts import clean_data ``` ## Clean NFL Combine Data ``` combine_file = r'data\nfl_combine_1987_2020.csv' df_raw_combine = pd.read_csv(...
github_jupyter
# 11.3 Date Ranges, Frequencies, and Shifting(日期范围,频度,和位移) 普通的时间序列通常是不规律的,但我们希望能有一个固定的频度,比如每天,每月,或没15分钟,即使有一些缺失值也没关系。幸运的是,pandas中有一套方法和工具来进行重采样,推断频度,并生成固定频度的日期范围。例如,我们可以把样本时间序列变为固定按日的频度,需要调用resample: ``` import pandas as pd import numpy as np from datetime import datetime dates = [datetime(2011, 1, 2), datetime(201...
github_jupyter
``` import matplotlib from matplotlib.pylab import * %matplotlib inline matplotlib.rcParams['font.size'] = 16 import json repos = [] with open('data/repos_with_annotation_infos.json') as input_file: for line in input_file: repos.append(json.loads(line)) repos = repos[1:] import math N = math.ceil(sqrt(len(...
github_jupyter
# DSE Course 1, Session 4: Visualization **Instructor**: Wesley Beckner **Contact**: wesleybeckner@gmail.com <br> --- <br> In this session we'll be discussing visualization strategies. And, more specifically, how we can manipulate our `pandas dataframes` to give us the visualizations we desire. Before we get ther...
github_jupyter
# Submitting and Managing Jobs Launch this tutorial in a Jupyter Notebook on Binder: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/htcondor/htcondor-python-bindings-tutorials/master?urlpath=lab/tree/Submitting-and-Managing-Jobs.ipynb) ## What is HTCondor? An HTCondor pool provides a wa...
github_jupyter
# What is the Requests Resource? Requests is an Apache2 Licensed HTTP library, written in Python. It is designed to be used by humans to interact with the language. This means you don’t have to manually add query strings to URLs, or form-encode your POST data. Don’t worry if that made no sense to you. It will in due ti...
github_jupyter
``` pip install ta==0.4.7 import glob import os import pickle import warnings warnings.filterwarnings("ignore") import pandas as pd import numpy as np import datetime as dt from ta import add_all_ta_features from sklearn.ensemble import RandomForestClassifier from sklearn.linear_model import LogisticRegression from ...
github_jupyter
### Coupling GIPL and ECSimpleSnow models Before you begin, install: ```conda install -c conda-forge pymt pymt_gipl pymt_ecsimplesnow seaborn``` ``` import pymt.models import matplotlib.pyplot as plt import seaborn as sns import numpy as np import matplotlib.colors as mcolors from matplotlib.colors import LinearSegm...
github_jupyter
## Questionário 22 (Q22) **Orientações para submissão:** - 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 ...
github_jupyter
## Individual Variable Data Exploration Notebook ``` import numpy as np import pandas as pd import missingno as msno import matplotlib.pyplot as plt import seaborn as sns data_train = pd.read_csv('claim_data_v2_train.csv') data_train.sample(3) def visualize_cat(attr, df=data_train): df_i = df[['Fraudulent_Claim', ...
github_jupyter
``` import gust import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from numpy import matrix import scipy import scipy.sparse as sp import torch.distributions as dist from time import time from sklearn.model_selection import StratifiedShuffleSplit from scipy.spatial.distance import ...
github_jupyter
# Backtesting: EW vs CW ``` import numpy as np import pandas as pd import edhec_risk_kit_204 as erk %load_ext autoreload %autoreload 2 ind49_rets = erk.get_ind_returns(weighting="vw", n_inds=49)["1974":] ind49_mcap = erk.get_ind_market_caps(49, weights=True)["1974":] ``` In this section we'll develop a basic infras...
github_jupyter
``` import numpy as np import pandas as pd import plotly.graph_objects as go import plotly.offline as po from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot import matplotlib.pyplot as plt import dash import plotly.express as px import random import plotly.figure_factory as ff ``` # Loading D...
github_jupyter
<table align="left"> <td> <a href="https://colab.research.google.com/github/nyandwi/machine_learning_complete/blob/main/6_classical_machine_learning_with_scikit-learn/10_intro_to_unsupervised_learning_with_kmeans_clustering.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg...
github_jupyter
# Overnight returns [Overnight Returns and Firm-Specific Investor Sentiment](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2554010) > **Abtract**: We explore the possibility that overnight returns can serve as a measure of firm-specific investor sentiment by analyzing whether they exhibit characteristics expect...
github_jupyter
<a href="https://colab.research.google.com/github/rajdeepd/tensorflow_2.0_book_code/blob/master/ch04/inception_v3_all_images_25_epochs_colab_modelfit.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` import sys IN_COLAB = 'google.colab' in sys.mod...
github_jupyter
# # Duramat Webinar: US NREL Electric Futures 2021 This journal simulates the Reference and High Electrification scenarios from Electrification Futures, and comparing to a glass baseline with High bifacial future projection. Installed Capacity considerations from bifacial installations are not considered here. Re...
github_jupyter
# Fun with FFT and sound files Based on: https://realpython.com/python-scipy-fft/ Define a function for generating pure sine wave tones ``` import numpy as np import matplotlib.pyplot as plt SAMPLE_RATE = 44100 # Hertz DURATION = 5 # Seconds def generate_sine_wave(freq, sample_rate, duration): x = np.linspac...
github_jupyter
## PSO - Particle Swarm Optimisation **About PSO -** PSO is an biologically inspired meta-heuristic optimisation algorithm. It takes its inspiration from bird flocking or fish schooling. It works pretty good in practice. So let us code it up and optimise a function. ``` #dependencies import random import math impor...
github_jupyter
``` import sys, os if 'google.colab' in sys.modules: # https://github.com/yandexdataschool/Practical_RL/issues/256 !pip install tensorflow-gpu==1.13.1 if not os.path.exists('.setup_complete'): !wget -q https://raw.githubusercontent.com/yandexdataschool/Practical_RL/spring20/setup_colab.sh -O- |...
github_jupyter
``` #@title Copyright 2022 The Cirq Developers # 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...
github_jupyter
# Breakpoint analysis for damaging winds or rain Here, we explore the idea that wind/rain damage occurs above some threshold of wind speed, rain rate or rain accumulation. The damage survey results are classified into damaged/not damaged, and the rate of damaged buildings for a given wind speed/rain rate/rain accumu...
github_jupyter
## Module 2.2: Working with CNNs in Keras (A Review) We turn to implementing a CNN in the Keras functional API. In this module we will pay attention to: 1. Using the Keras functional API for defining models. 2. Implementing dropout regularization. Those students who are comfortable with all these matters might consid...
github_jupyter
## Dependencies ``` import os import sys import cv2 import shutil import random import warnings import numpy as np import pandas as pd import seaborn as sns import multiprocessing as mp import matplotlib.pyplot as plt from tensorflow import set_random_seed from sklearn.utils import class_weight from sklearn.model_sele...
github_jupyter
# Dependent density regression In another [example](dp_mix.ipynb), we showed how to use Dirichlet processes to perform Bayesian nonparametric density estimation. This example expands on the previous one, illustrating dependent density regression. Just as Dirichlet process mixtures can be thought of as infinite mixtur...
github_jupyter
# MLflow end-to-end example In this example we are going to build a model using `mlflow`, pack and deploy locally using `tempo` (in docker and local kubernetes cluster). We are are going to use follow the MNIST pytorch example from `mlflow`, check this [link](https://github.com/mlflow/mlflow/tree/master/examples/pyto...
github_jupyter
##### Copyright 2018 The TensorFlow Authors. ``` #@title Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
github_jupyter
## How-to guide for Real-Time Forecasting use-case on Abacus.AI platform This notebook provides you with a hands on environment to build a real-time forecasting model using the Abacus.AI Python Client Library. We'll be using the [Household Electricity Usage Dataset](https://s3.amazonaws.com/realityengines.exampledatas...
github_jupyter
``` import os import requests import calendar data = {'formQuery:menuAldId':1, 'formQuery:selectRad':'incidentLevel', 'dateFromCrime':'01/01/2005', 'dateToCrime':'07/10/2017', 'dateFromAcci':'MM/DD/YYYY', 'dateToAcci':'MM/DD/YYYY', 'formQuery:radioFormat':'excel', ...
github_jupyter
``` # Copyright 2021 NVIDIA Corporation. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
github_jupyter
![qiskit_header.png](attachment:qiskit_header.png) <div class="alert alert-block alert-info"> <b>Important:</b> This notebook uses <code>ipywidgets</code> that take advantage of the javascript interface in a web browser. The downside is the functionality does not render well on saved notebooks. Run this notebook...
github_jupyter
# Millikan Oil Drop ___**Meansurement of the electron charge** ``` rho=886 # kg/m^3 dV = .5 #volts dd = .000005 # meters dP = 5 # pascals g=9.8 # m/s^2 eta= 1.8330*10**(-5) # N*s/m^2 b=8.20*10**(-3) # Pa*m p=101325 #Pa V=500 #V e=1.6*10**(-19) d_array=10**(-3)*np.array([7.55,7.59,7.60,7.60,7.60,7.61]) # unit: m d=d_ar...
github_jupyter
# 3.6 Refinements with federated learning ## Data loading and preprocessing ``` # read more: https://www.tensorflow.org/federated/tutorials/federated_learning_for_text_generation import nest_asyncio # pip install nest_asyncio import tensorflow_federated as tff # pip install tensorflow_federated import collections im...
github_jupyter
# 0.前言 这个文档主要是用来入门下XGBOOST,主要就是参考的https://blog.csdn.net/qq_24519677/article/details/81869196 ``` import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import xgboost as xgb from sklearn.model_selection import train_test_split from sklearn import preprocessing from sklearn.model_...
github_jupyter
###### Background - As you know that, the non-zero value is very few in target in this competition. It is like imbalance of target in classfication problem. - For solving the imbalance in classfication problem, we commonly use the "stratifed sampling". - For this cometition, we can simply apply the stratified sampling ...
github_jupyter
# FIDO - the unified downloader tool for SunPy ### NOTE: Internet access is required in order to use this tutorial FIDO is a new feature as part of the 0.8 SunPy release. It provides a unified interface to search for and download data from multiple sources and clients. For example, it can be used to search for images...
github_jupyter
## Day Agenda - Reading the diffent format of data sets - statistical information about data sets - Concatination of data frames - grouping of dataframes - merging data frames - filtering data from data frames - ## Reading the diffent format of data sets - csv(comma separated values) - json - xlsx - tsv(tab separated...
github_jupyter
# Potentiostats and Galvanostats ## References --- Adams, Scott D., et al. "MiniStat: Development and evaluation of a mini-potentiostat for electrochemical measurements." Ieee Access 7 (2019): 31903-31912. https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8657694 --- Ainla, Alar, et al. "Open-source potentiosta...
github_jupyter
# <font color="blue">Failure Cases in Tesseract OCR</font> In this notebook, we will see some instances where Tesseract does not work as expected and provide logical reasons for them. We will see some examples from scanned documents as well as natural camera images. We will discuss how to improve the OCR output in the...
github_jupyter
**Note that the name of the callback `AccumulateStepper` has been changed into `AccumulateScheduler`** https://forums.fast.ai/t/accumulating-gradients/33219/90?u=hwasiti https://github.com/fastai/fastai/blob/fbbc6f91e8e8e91ba0e3cc98ac148f6b26b9e041/fastai/train.py#L99-L134 ``` import fastai from fastai.vision import...
github_jupyter
# Introduction ## Why the FLUX pipeline? The aim of the FLUX pipeline is to provide a standard implemented as a tutorial for using some of most common toolboxes to analyze full MEG datasets. The pipeline will be used for education and as well as provide a common framework for MEG data analysis. This section will f...
github_jupyter
<img width="10%" alt="Naas" src="https://landen.imgix.net/jtci2pxwjczr/assets/5ice39g4.png?w=160"/> # Gmail - Schedule mailbox cleaning <a href="https://app.naas.ai/user-redirect/naas/downloader?url=https://raw.githubusercontent.com/jupyter-naas/awesome-notebooks/master/Gmail/Gmail_Schedule_mailbox_cleaning.ipynb" tar...
github_jupyter
# k-Nearest Neighbor (kNN) exercise *Complete and hand in this completed worksheet (including its outputs and any supporting code outside of the worksheet) with your assignment submission. For more details see the [assignments page](http://vision.stanford.edu/teaching/cs231n/assignments.html) on the course website.* ...
github_jupyter
<img src="./pictures/DroneApp_logo.png" style="float:right; max-width: 180px; display: inline" alt="INSA" /></a> <img src="./pictures/logo_sizinglab.png" style="float:right; max-width: 100px; display: inline" alt="INSA" /></a> # Application of First Monotonicity Principle to the optimization of MRAV *Created by Aitor ...
github_jupyter
<!--BOOK_INFORMATION--> <img align="left" style="padding-right:10px;" src="fig/cover-small.jpg"> *This notebook contains an excerpt from the [Whirlwind Tour of Python](http://www.oreilly.com/programming/free/a-whirlwind-tour-of-python.csp) by Jake VanderPlas; the content is available [on GitHub](https://github.com/jak...
github_jupyter
# Automated Gradual Pruning Schedule Michael Zhu and Suyog Gupta, ["To prune, or not to prune: exploring the efficacy of pruning for model compression"](https://arxiv.org/pdf/1710.01878), 2017 NIPS Workshop on Machine Learning of Phones and other Consumer Devices<br> <br> After completing sensitivity analysis, decide ...
github_jupyter
# Coursework 2: Neural Networks This coursework covers the topics covered in class regarding neural networks for image classification. This coursework includes both coding questions as well as written ones. Please upload the notebook, which contains your code, results and answers as a pdf file onto Cate. Dependenci...
github_jupyter
``` !python ../input/jigsawsrc/inference.py \ --num_folds 10 \ --base_model ../input/deberta/deberta-large \ --base_model_name microsoft/deberta-large \ --weights_dir ../input/ranking-30-deberta-large \ --data_path ../input/jigsaw-toxic-severity-rating/comments_to_score.csv \ --save_path preds_3...
github_jupyter
## 1. Where are the old left-handed people? <p><img src="https://s3.amazonaws.com/assets.datacamp.com/production/project_479/img/Obama_signs_health_care-20100323.jpg" alt="Barack Obama signs the Patient Protection and Affordable Care Act at the White House, March 23, 2010"></p> <p>Barack Obama is left-handed. So are Bi...
github_jupyter
This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/interactive-coding-challenges). # Challenge Notebook ## Problem: Given a list of stock prices on each consecutive day, determine the max profits with k transactions. * [...
github_jupyter
# Address Segmentation Conversion of address points into segmented address ranges along a road network. **Notes:** The following guide assumes data has already been preprocessed including data scrubbing and filtering. ``` import contextily as ctx import geopandas as gpd import math import matplotlib.pyplot as plt imp...
github_jupyter
<img src="https://raw.githubusercontent.com/dask/dask/main/docs/source/images/dask_horizontal_no_pad.svg" width="30%" alt="Dask logo\" /> # Parallel and Distributed Machine Learning The material in this notebook was based on the open-source content from [Dask's tutorial repository](https://github.com/dask/d...
github_jupyter
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mahdimplus/DeepRetroMoco/blob/main/functions.ipynb) ``` pip install voxelmorph ``` ### Requirement libraries. ``` import nibabel as nib import os import numpy as np import random from nibabel.affines...
github_jupyter
``` ''' A Convolutional Network implementation example using TensorFlow library. This example is using the MNIST database of handwritten digits (http://yann.lecun.com/exdb/mnist/) Author: Aymeric Damien Project: https://github.com/aymericdamien/TensorFlow-Examples/ ''' import tensorflow as tf # Import MNIST data from...
github_jupyter
## Dependencies ``` import json, warnings, shutil from jigsaw_utility_scripts import * from transformers import TFXLMRobertaModel, XLMRobertaConfig from tensorflow.keras.models import Model from tensorflow.keras import optimizers, metrics, losses, layers from tensorflow.keras.callbacks import EarlyStopping, ModelCheck...
github_jupyter
## CIFAR 10 ``` %matplotlib inline %reload_ext autoreload %autoreload 2 ``` You can get the data via: wget http://pjreddie.com/media/files/cifar.tgz ``` from fastai.conv_learner import * from pathlib import Path if os.name == 'nt': PATH = str(Path.home()) + "\\data\\cifar10\\" else: PATH = "data/cifar...
github_jupyter
# Lesson 1 In the screencast for this lesson I go through a few scenarios for time series. This notebook contains the code for that with a few little extras! :) # Setup ``` # !pip install -U tf-nightly-2.0-preview import numpy as np import matplotlib.pyplot as plt import tensorflow as tf from tensorflow import keras...
github_jupyter
# `rlplay`-ing around with Policy Gradients ``` import torch import numpy import matplotlib.pyplot as plt %matplotlib inline import gym # hotfix for gym's unresponsive viz (spawns gl threads!) import rlplay.utils.integration.gym ``` See example.ipynb for the overview of `rlplay` <br> ## Sophisticated CartPole wi...
github_jupyter
``` import numpy as np from LSTM_Learning_Lib import Model from FeatureSetCalculation_Lib import ComputeMultiLevelLogsig1dBM import matplotlib.pyplot as plt import time from sklearn.model_selection import ParameterGrid from sklearn import preprocessing import random from GetSeqMnistData import GetSeqPenandCalLogSig, Ge...
github_jupyter
``` # !wget https://raw.githubusercontent.com/huseinzol05/Malaya-Dataset/master/dependency/gsd-ud-train.conllu.txt # !wget https://raw.githubusercontent.com/huseinzol05/Malaya-Dataset/master/dependency/gsd-ud-test.conllu.txt # !wget https://raw.githubusercontent.com/huseinzol05/Malaya-Dataset/master/dependency/gsd-ud-d...
github_jupyter
<a href="https://colab.research.google.com/github/AI4Finance-Foundation/FinRL/blob/master/FinRL_Raytune_for_Hyperparameter_Optimization_RLlib%20Models.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` #Installing FinRL %%capture !pip install git+h...
github_jupyter
``` A = {1,2,3,8} B = {3,4} print(1 in A) print(4 in A) flag = 4 in A type(flag) print(B.issubset(A)) def f_issubset(A,B): for e in A: if e in B: pass else: return False return True print(f_issubset(B,A)) print(f_issubset({2,3,4},{1,2,3,4,5,6})) import numpy as np Omg = s...
github_jupyter
## Welcome to Aequitas The Aequitas toolkit is a flexible bias-audit utility for algorithmic decision-making models, accessible via Python API, command line interface (CLI), and through our [web application](http://aequitas.dssg.io/). Use Aequitas to evaluate model performance across several bias and fairness metric...
github_jupyter
# 定义目标 # 数据获取 ## 训练数据 ``` import pandas as pd import numpy as np import seaborn as sb from matplotlib import pyplot as plt %matplotlib inline data_train = pd.read_csv("./data/train.csv") data_train.head() ``` ## 测试数据 ``` data_test = pd.read_csv("./data/test.csv") data_test.head() ``` # 数据理解 ## 数据集名称 PassengerI...
github_jupyter
``` import os os.environ['CUDA_VISIBLE_DEVICES'] = '2' import bert from bert import run_classifier from bert import optimization from bert import tokenization from bert import modeling import numpy as np import tensorflow as tf import pandas as pd from tqdm import tqdm # !wget https://github.com/huseinzol05/Malaya/raw/...
github_jupyter
# Data union 4 archives are presented with data from year 2017 to 2019 for each hive (names: Wurzburg and Schwartau) - flow(nameofthehive).csv : For a date it contains the number of departures and arrivals from/to the beehive. A positive number indicates the number of arrivals and a negative number of departures. Not...
github_jupyter
# Matrix Factorization for Recommender Systems - Part 2 As seen in [Part 1](/examples/matrix-factorization-for-recommender-systems-part-1), strength of [Matrix Factorization (MF)](https://en.wikipedia.org/wiki/Matrix_factorization_(recommender_systems)) lies in its ability to deal with sparse and high cardinality cate...
github_jupyter
<a href="https://colab.research.google.com/github/Dariush-Mehdiaraghi/bachelor_project/blob/main/ssdlite_mobiledet_transfer_learning.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> **Retrain SSDLite Mobiledet for Coral's EdgeTpu** This is a slightl...
github_jupyter
``` %load_ext autoreload %autoreload 2 import matplotlib.pyplot as plt %matplotlib inline from ipywidgets import interact, interactive, fixed, interact_manual import ipywidgets as widgets import numpy as np import torch, torch.optim import torch.nn.functional as F torch.backends.cudnn.enabled = True torch.backends.cud...
github_jupyter
# Renumbering Test Demonstrate creating a graph with renumbering. Most cugraph algorithms operate on a CSR representation of a graph. A CSR representation requires an indices array that is as long as the number of edges and an offsets array that is as 1 more than the largest vertex id. This makes the memory utiliza...
github_jupyter
``` from sklearn.datasets import load_wine wine_data = load_wine() dir(wine_data) print(wine_data.DESCR) inputs = wine_data.data output = wine_data.target inputs.shape output.shape wine_data.feature_names import pandas as pd df = pd.DataFrame(inputs, columns=wine_data.feature_names) df = pd.concat([df, pd.DataFrame(out...
github_jupyter
``` envname = 'variables/loop_stim10e-16.0et6.0ph1.0pvaryt0.1plNonebp0.5.pkl' # import stuff from placerg.funcs import * from placerg.objects import* from placerg.funcsrg import * from scipy.optimize import curve_fit import matplotlib.pyplot as plt import matplotlib.cm as cm import matplotlib # set up notebook displayt...
github_jupyter
``` with open('/mnt/pmldl/paracrawl-release1.en-ru.zipporah0-dedup-clean.en') as f: eng_lines = f.readlines() with open('/mnt/pmldl/paracrawl-release1.en-ru.zipporah0-dedup-clean.ru') as f: ru_lines = f.readlines() from transformers import AutoTokenizer, AutoModelForSeq2SeqLM ``` # Use pretrained model and tok...
github_jupyter
``` import pandas as pd import numpy as np # Read in feature sets and corresponding outputs # Some values of a_max were too large for a 64-bit number, # so a 128-bit float had to be specified in order for the # column to be parsed correctly (otherwise Pandas defaulted # to parsing them as strings) X1 = pd.read_csv("fea...
github_jupyter
# Imports ``` import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.dates as mdates import seaborn as sns import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.dates as mdates import seaborn as sns from glob import glob from hypnospy import Wearab...
github_jupyter
<table> <tr> <td style="background-color:#ffffff;"> <a href="http://qworld.lu.lv" target="_blank"><img src="../images/qworld.jpg" width="25%" align="left"> </a></td> <td style="background-color:#ffffff;vertical-align:bottom;text-align:right;"> prepared by <a href="http://abu.lu....
github_jupyter
**[Deep Learning Course Home Page](https://www.kaggle.com/learn/deep-learning)** --- # Exercise Introduction We will return to the automatic rotation problem you worked on in the previous exercise. But we'll add data augmentation to improve your model. The model specification and compilation steps don't change when ...
github_jupyter
# Interactive Plotting with Jupyter There are several ways to interactively plot. In this tutorial I will show how to interact with 2D and 1D data. There are other ways to interact with large tables of data using either [Bokeh](https://docs.bokeh.org/en/latest/index.html) (shown the Skyfit notebook) or [Glue](http://...
github_jupyter
# LetsGrowMore ## ***Virtual Internship Program*** ***Data Science Tasks*** ### ***Author: SARAVANAVEL*** # ***ADVANCED LEVEL TASK*** ### Task 9 -Handwritten equation solver using CNN Simple Mathematical equation solver using character and symbol regonition using image processing and CNN ## 1. Import Libraries/Pac...
github_jupyter
<i>Copyright (c) Microsoft Corporation. All rights reserved.<br> Licensed under the MIT License.</i> <br> # Recommender Hyperparameter Tuning w/ AzureML This notebook shows how to auto-tune hyperparameters of a recommender model by utilizing **Azure Machine Learning service** ([AzureML](https://azure.microsoft.com/en-...
github_jupyter
# Show iterative steps of preprocessing ``` import data_utils import numpy as np import matplotlib.pyplot as plt from preprocessing import binarize_per_slice, all_slice_analysis, fill_hole, two_lung_only, process_mask # Show iterative steps of computing lung mask first_patient_pixels, spacing, _ = data_utils.load_dico...
github_jupyter
<a href="https://colab.research.google.com/github/NeuromatchAcademy/course-content/blob/master/tutorials/W2D3_BiologicalNeuronModels/student/W2D3_Intro.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Intro **Our 2021 Sponsors, including Presentin...
github_jupyter
<a href="https://colab.research.google.com/github/bereml/iap/blob/master/libretas/1f_fashion_fcn.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Clasificación de Fashion-MNIST con una red densa Curso: [Introducción al Aprendizaje Profundo](http:/...
github_jupyter
``` from collections import defaultdict, OrderedDict import warnings import gffutils import pybedtools import pandas as pd import copy import os import re from gffutils.pybedtools_integration import tsses from copy import deepcopy from collections import OrderedDict, Callable import errno def mkdir_p(path): try: ...
github_jupyter
# Variance Component Analysis This notebook illustrates variance components analysis for two-level nested and crossed designs. ``` import numpy as np import statsmodels.api as sm from statsmodels.regression.mixed_linear_model import VCSpec import pandas as pd ``` Make the notebook reproducible ``` np.random.seed(31...
github_jupyter
### Import libraries and modify notebook settings ``` # Import libraries import os import sys import h5py import numpy as np import pandas as pd import matplotlib.pyplot as plt from IPython.display import clear_output from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten fr...
github_jupyter
# ism3d.uvhelper: visibility imaging ## Setup We first import essential API functions / modules from `ism3d` and other libraries **Used ISM3D Functions:** * `im3d.logger.logger_config` * `im3d.logger.logger_status` ``` nb_dir=_dh[0] os.chdir(nb_dir+'/../output/mockup') sys.path.append(nb_dir) from notebook_setup i...
github_jupyter
# Relevancy Analysis <div class="alert alert-info"> This tutorial is available as an IPython notebook at [Malaya/example/relevancy](https://github.com/huseinzol05/Malaya/tree/master/example/relevancy). </div> <div class="alert alert-warning"> This module only trained on standard language structure, so it is no...
github_jupyter
``` import pandas as pd import numpy as np import datetime import seaborn as sns import matplotlib.pyplot as plt from gs_quant.markets.portfolio import Portfolio from gs_quant.risk import MarketDataShockBasedScenario, MarketDataPattern, MarketDataShock, MarketDataShockType, PnlExplain from gs_quant.markets import Prici...
github_jupyter
``` from google.colab import drive drive.mount('/content/drive') %cd /content/drive/MyDrive/AGGLIO/github_upload import numpy as np from sklearn.model_selection import ShuffleSplit from sklearn.model_selection import GridSearchCV from agglio_lib import * n = 1000 w_radius = 10 dim_list=[10, 20, 30, 40, 50] val_ind=np.r...
github_jupyter
``` import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt from sklearn.preprocessing import MinMaxScaler from sklearn.preprocessing import LabelEncoder from sklearn.naive_bayes import GaussianNB from sklearn.tree import DecisionTreeClassifier data = pd.read_csv("healthcare-datase...
github_jupyter