text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
# scRNA - Example Application
-----------
This notebook showcases the various features of this package in a simple and
accessible example. I.e. we discuss the main parts of the transfer learning
and data simulation pipeline.
The main features of the scRNA package are:
* simulation of scRNA read-count data according ... | github_jupyter |
# Self-Driving Car Engineer Nanodegree
## Project: **Finding Lane Lines on the Road**
***
## Import Packages
```
#importing some useful packages
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
import cv2
import imageio
%matplotlib inline
```
## Read in an Image
```
#reading i... | github_jupyter |
```
import tensorflow as tf
import numpy as np
import matplotlib.mlab
import scipy.io.wavfile
import scipy
import pandas as pd
import time
from sklearn import metrics
import matplotlib.pyplot as plt
import seaborn as sns
sns.set()
dataset = pd.read_csv('/home/husein/space/UrbanSound8K/metadata/UrbanSound8K.csv')
datase... | github_jupyter |
# Patsy
[Patsy](https://patsy.readthedocs.io/en/latest/index.html) is a neat API to transform your data into experimentation model form. For regression and classification problems, you often want your data in the `Xy` form where `X` is a matrix (independent variable) and `y` is a column vector (dependent variable). In... | github_jupyter |
```
#hide
import sys
path = '/home/ddpham/git/tabint/'
sys.path.insert(1, path)
#default_exp learner
#export
import pandas as pd
import numpy as np
from tabint.visual import *
from tabint.utils import *
import lightgbm as lgb
import pickle
from sklearn import tree
# from sklearn.externals import joblib
from sklearn.ens... | github_jupyter |
# LSN - simulation test code
```
# Package imports
%matplotlib inline
import tensorflow as tf
import numpy as np
import random
import time
import math
import pandas as pd
from datetime import datetime
# Main slim library
slim = tf.contrib.slim
class siamese_net(object):
def __init__(self, net_arch):
... | github_jupyter |
```
import numpy as np
import scipy.sparse as sp
from scipy.sparse import csc_matrix as csc
import pandas as pd
pd.options.display.float_format = '{:,.6f}'.format
from sklearn.metrics import (
mean_squared_error,
mean_absolute_error,
r2_score,
explained_variance_score,
roc_auc_score,
log_loss,
... | github_jupyter |
# Chapter 8: Mappings & Sets
## Coding Exercises
Read [Chapter 8](https://nbviewer.jupyter.org/github/webartifex/intro-to-python/blob/master/08_mappings_00_lecture.ipynb) of the book. Then, work through the exercises below.
### Working with Nested Data
Let's write some code to analyze the historic soccer game [Bra... | github_jupyter |
# M-Estimators for Robust Linear Modeling
```
%matplotlib inline
from __future__ import print_function
from statsmodels.compat import lmap
import numpy as np
from scipy import stats
import matplotlib.pyplot as plt
import statsmodels.api as sm
```
* An M-estimator minimizes the function
$$Q(e_i, \rho) = \sum_i~\rh... | github_jupyter |
```
import untangle
import pandas as pd
import numpy as np
import os
### Parsing Drugbank XML
#takes 5 minutes
filename="drugbank_20160420.xml" # DrugBank Version 4.5.0 (release date: 2016.04.20)
obj=untangle.parse(filename)
```
### Building dataframe of chemical descriptors
```
#Data Frame of DrugBank Small Molecul... | github_jupyter |
# Assignment 2, Data Science for Design 2017
### Muhamad Iqbal, s1635468
### Bot on twitter during Brexit
During the brexit, many people talk about it through social media. one social media platform that was used by people is twitter. usually, this platform is used by the researcher as their data sources. furthermore... | github_jupyter |
```
%reload skgym.errors skgym.environments.adversarial skgym.environments
import gym
from sklearn.linear_model import SGDRegressor
from sklearn.preprocessing import FunctionTransformer
from skgym.value_functions import GenericQ
from skgym.policies import ValuePolicy
from skgym.algorithms import MonteCarlo
from skgy... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
```
**Import and meta**
```
from google.cloud import bigquery
from open_patstat.plots import bar_chart, stacked_bar_chart, pie_chart
from open_patstat.documentation.shortdoc import ShortDoc, print_markdown, print_signature
import plotly.plotly as py
import plotly.graph_objs as ... | 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 |
```
from collections import namedtuple
import re
import requests
api_url = "http://127.0.0.1:8000"
files = ["NCBItrainset_corpus.txt", "NCBIdevelopset_corpus.txt", "NCBItestset_corpus.txt"]
source_names = ["NCBI_Disease_Train", "NCBI_Disease_Dev", "NCBI_Disease_Test"]
text_line_re = re.compile("^(\d+)\|(a|t)\|(.*)")
m... | github_jupyter |
Example taken from https://machinelearningmastery.com/binary-classification-tutorial-with-the-keras-deep-learning-library/
Data: https://archive.ics.uci.edu/ml/datasets/Connectionist+Bench+(Sonar,+Mines+vs.+Rocks)
```
import numpy
import pandas
from tensorflow.keras import Input
from tensorflow.keras.models import... | github_jupyter |
In this notebook I will examine the redshift success rates for BGS galaxies at various exposure times observed with nominal dark sky. So far redshift success rate has been assumed to be high for SNR~1 in nominal dark conditions. This is to get an idea of the redshift success rates for various nominal exposure times.
`... | github_jupyter |
# $R_t$ and $k_t$ Negative-Binomial Plots of Number of Secondary Cases
This notebook contains the code for plotting the distribution of number of secondary cases along with their Negative-Binomial fits. As such, the code still requires a bit of manual adaptation for each experiment. So the code here corresponds to the... | github_jupyter |
```
# This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python
# For example, here's several helpful packages to load
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O... | github_jupyter |
```
!pip install eazymind
from google.colab import drive
drive.mount('/content/drive')
from eazymind.nlp.eazysum import Summarizer
key = "92f6b9b0fb3838f6b39450fac3b4a8d3"
sentence = """Facebook CEO Mark Zuckerberg, left, makes the keynote speech at F8, the Facebook's developer conference, Tuesday, April 30, 2019, in ... | github_jupyter |
<!--NAVIGATION-->
< [OPTIONAL - More about interact](02.01-OPTIONAL-More-About-Interact.ipynb) | [Contents](00.00-index.ipynb) | [Widgets in the core ipywidgets package](04.00-widget-list.ipynb) >
# Simple Widget Introduction
## What are widgets?
Widgets are eventful python objects that have a representation in the ... | github_jupyter |
# Switch To Me - Rain feat. JYP Tweet Scraping
```
from tweetkey import consumer_api_key, consumer_api_secret_key, access_token, access_secret_token
import tweepy
import pandas as pd
import time
auth = tweepy.OAuthHandler(consumer_api_key, consumer_api_secret_key)
auth.set_access_token(access_token, access_secret_toke... | github_jupyter |
```
from matplotlib import pyplot as plt
from sklearn import datasets
import pandas as pd
# Load some data
iris = datasets.load_iris()
iris_df = pd.DataFrame(iris['data'], columns=iris['feature_names'])
iris_df['species'] = iris['target']
colours = ['red', 'orange', 'blue']
species = ['I. setosa', 'I. versicolor', 'I... | github_jupyter |
# Introduction to OpenFermion
Note that all the examples below must be run sequentially within a section.
## Initializing the FermionOperator data structure
Fermionic systems are often treated in second quantization where arbitrary operators can be expressed using the fermionic creation and annihilation operators, $a... | github_jupyter |
# Customer Revenue Prediction case study
Azra is a big high-fashion retailer with operations in multiple countries. To optimize their marketing activities, Azra seeks to identify high-value customers – customers that are expected to bring high revenue to the retailer – and have a differential marketing strategy for th... | github_jupyter |
# IS843 Team Project - Spotify Music Popularity Analysis
# Team Members: Ditstat Somsirivatana, Xinyu Guo, Julia Nicholson
In this project, we will explore what makes music popular. We plan to analyze the trends between music characteristics and listening behavior on the Spotify application. Spotify is an internatio... | github_jupyter |
## Evaluating Performance of a Binary Classifier
Binary Model is used for predicting a binary outcome (Pass/Fail, 1/0, True/False).
Some algorithms output a raw score that indicates probability of a sample belonging to positive class.
<q><i>The actual output of many binary classification algorithms is a prediction sc... | github_jupyter |
# CNN for Classification
---
In this notebook, we define **and train** an CNN to classify images from the [Fashion-MNIST database](https://github.com/zalandoresearch/fashion-mnist).
We are providing two solutions to show you how different network structures and training strategies can affect the performance and accur... | github_jupyter |
STAT 453: Deep Learning (Spring 2020)
Instructor: Sebastian Raschka (sraschka@wisc.edu)
Course website: http://pages.stat.wisc.edu/~sraschka/teaching/stat453-ss2020/
GitHub repository: https://github.com/rasbt/stat453-deep-learning-ss20
```
%load_ext watermark
%watermark -a 'Sebastian Raschka' -v -p torch
```
... | github_jupyter |
```
##### Copyright 2021 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 agree... | github_jupyter |
<table width = "100%">
<tr style="background-color:white;">
<!-- QWorld Logo -->
<td style="text-align:left;width:200px;">
<img src="../images/QWorld.png"> </td>
<td style="text-align:right;vertical-align:bottom;font-size:16px;">
Prepared by <a href="https://gitlab.com/pjr1363" target="_... | github_jupyter |
```
import os
from datetime import datetime
import random
from toolz import compose, curry
import pandas as pd
from tqdm import tqdm_notebook
import numpy as np
from fklearn.training.regression import lgbm_regression_learner
from fklearn.validation.perturbators import perturbator, nullify, sample_columns
from fklearn... | github_jupyter |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
# Tutorial #3: Deploy an image classification model for encrypted inferencing in Azure Container Instance (ACI)
This tutorial is **a new addition to the two-part series**. In the [previous tutorial](img-classification-part1-tr... | github_jupyter |
# Object Detection Demo
Welcome to the object detection inference walkthrough! This notebook will walk you step by step through the process of using a pre-trained model to detect objects in an image. Make sure to follow the [installation instructions](https://github.com/tensorflow/models/blob/master/research/object_de... | github_jupyter |
<a href="https://colab.research.google.com/github/alfmorais/estrutura_de_dados_em_python/blob/main/secao_2/aula_40.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
Expressões Regulares
- Busca por padrões em texto em variaveis strings
- Palavras que... | github_jupyter |
# The Making of a Preconditioner
by [Abhilash Reddy M](http://www.abhilashreddy.com)
This notebook ultimately demonstrates a multigrid preconditioned Krylov solver in python3. The code and more examples are present on github at [GeometricMultigrid](https://github.com/AbhilashReddyM/GeometricMultigrid). The problem so... | github_jupyter |
# Overview
In this notebook, we'll look beyond our target concepts to look for semantic modifiers using the **ConText** algorithm. We'll then see how to detect which section of a clinical document a concept is found in.
```
import spacy
import medspacy
from IPython.display import YouTubeVideo
nlp = medspacy.load()
nl... | github_jupyter |
# Cleaning Quiz: Udacity's Course Catalog
It's your turn! Udacity's [course catalog page](https://www.udacity.com/courses/all) has changed since the last video was filmed. One notable change is the introduction of _schools_.
In this activity, you're going to perform similar actions with BeautifulSoup to extract the f... | github_jupyter |
# Graded Assessment
In this assessment you will write a full end-to-end training process using gluon and MXNet. We will train the LeNet-5 classifier network on the MNIST dataset. The network will be defined for you but you have to fill in code to prepare the dataset, train the network, and evaluate it's performance on... | github_jupyter |
# Image Classification
In this project, you'll classify images from the [CIFAR-10 dataset](https://www.cs.toronto.edu/~kriz/cifar.html). The dataset consists of airplanes, dogs, cats, and other objects. You'll preprocess the images, then train a convolutional neural network on all the samples. The images need to be no... | github_jupyter |
# Intro to Git and Python
----
## Table of Contents
1. [Introduction](#introduction)
2. [Git](#git)
- [Setup](#git-setup)
- [Basic Git Structure](#basic-git-structure)
- [Working with Git](#working-with-git)
3. [Python](#python)
- [Python Setup](#python-setup)
- [Data Basics](#data-basics)
- [Loading Data]... | github_jupyter |
## Tic-Tac-Toe Agent
In this notebook, you will learn to build an RL agent (using Q-learning) that learns to play Numerical Tic-Tac-Toe with odd numbers. The environment is playing randomly with the agent, i.e. its strategy is to put an even number randomly in an empty cell. The following is the layout of the noteboo... | github_jupyter |
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import sklearn as sk
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score
# Генерируем уникальный seed
my_code = "Петров"
seed_limit = 2 ** 32
my_seed = int.from_bytes(my_code.encode(), "little") % seed_limit
np.r... | github_jupyter |
# Session 4: Data Structuring - data types
In this combined teaching module and exercise set you will be working with structuring data. We will start out with some material about how write [readable code](#Readable-code). Then we will focus on data cleaning, in particular working with pandas data types and new data ty... | github_jupyter |
# Exploration of the 2014 FARS Auto Fatalities Dataset
**Author:** Alex Nisnevich
This is a brief exploration of the data in `data/fatalities-2014-allfields.tsv`, which was obtained from the [Fatality Analysis Reporting System](http://www-fars.nhtsa.dot.gov//QueryTool/QuerySection/SelectYear.aspx) (I used _"Option 3 (... | github_jupyter |
# Importações
```
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d.axes3d import Axes3D
from sympy import symbols, diff
from matplotlib import cm #colormap
from math import log
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error
%matplotlib... | github_jupyter |
<a href="https://colab.research.google.com/github/Lednik7/CLIP-ONNX/blob/main/examples/RuCLIP_onnx_example.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
#@title Allowed Resources
import multiprocessing
import torch
from psutil import virtual_m... | github_jupyter |
#Weak-Strong Cluster問題
2015年にGoogleとNASAが共同でD-Waveマシンは既存マシンの1億倍高速という発表を行いました。その際に利用されたのが量子ビットのクラスタを作ってフリップさせるWeak-Strong Cluster問題です。今回は簡単なweak clusterとstrong clusterを作って見て計算を行います。
論文は下記を参照します。
What is the Computational Value of Finite Range Tunneling?
https://arxiv.org/abs/1512.02206
##背景
量子アニーリングは量子トンネル効果を利用した最適... | github_jupyter |
## Adjective-Noun Compositions
### Attribute Selection
We use the HeiPLAS data set [(Hartung, 2015)](https://pub.uni-bielefeld.de/record/2900430), which contains adjective-attribute-noun triples that were heuristically extracted from WordNet and manually filtered by linguists. For example, "_hot summer_" (temperature)... | github_jupyter |
<h1>Model Build Workflow</h1>
In this notebook we will show how to define a model build workflow that orchestrates the previous steps (processing, training) and registers models in the SageMaker Model Registry. We will use Amazon SageMaker Pipelines for the workflow orchestration and lineage.
Orchestrating and automa... | github_jupyter |
# Spectral Estimation of Random Signals
*This jupyter notebook is part of a [collection of notebooks](../index.ipynb) on various topics of Digital Signal Processing.
## The Welch Method
In the previous section it has been shown that the [periodogram](periodogram.ipynb) as a non-parametric estimator of the power spec... | github_jupyter |
# Úkol č. 1 - vizualizace dat a web scraping (do 20. října)
* V rámci tohoto úkolu musíte stáhnout dat z webu (tzv. _web scraping_, velmi základní) a následně data zpracovat a vizualizovat.
* Cílem bude stáhnout data ze serveru https://www.volby.cz týkající se voleb do zastupitelstva Vámi vybraného (většího) města... | github_jupyter |
# Introduction
In the last tutorial, we learned how to select relevant data out of a DataFrame or Series. Plucking the right data out of our data representation is critical to getting work done, as we demonstrated in the exercises.
However, the data does not always come out of memory in the format we want it in right... | github_jupyter |
# 311 Data Filtering
#### Agency=DEP Only
#### Complaint Types=Noise related Only
#### Input shape: (2974191, 41)
#### DEP/NOISE ONLY shape: (431986, 41)
#### Output shape: (424949, 36) *NaNs removed*
| Column Name | Description ... | github_jupyter |
<a id="top"></a>
# Classification Tutorial
## OpenVINO version check:
You are currently using the latest development version of Intel® Distribution of OpenVINO™ Toolkit. Alternatively, you can open a version of this notebook for the Intel® Distribution of OpenVINO™ Toolkit LTS version by [clicking this link](../../../... | github_jupyter |
# The Plan
Everything we know about the plan.
### Instructions
1. Run all cells! (click on Menu > Cell > Run All Cells)
1. View report at the bottom.
```
#planId = "98db70e2-cee5-4e2d-ae15-dca389fa8f41"
planId = "f38f1a4b-49d7-4f08-a9b9-c81b2c39aff6"
%%capture
# install packages, setup workspace root
!pip install --... | github_jupyter |
# Example using Jupyter Notebook with Python
To demonstrate the compatibility of vscode with Python I will use some basic data manipulation codes with the `pandas` package. This brief example comes from Lesson 1 of GitHub user guipsamora repository [pandas_exercises](https://github.com/guipsamora/pandas_exercises). To... | github_jupyter |
```
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "0,1,2"
import warnings
warnings.filterwarnings("ignore")
from PIL import Image
Image.LOAD_TRUNCATED_IMAGES = True
import multiprocessing
import shutil
from glob import glob
import numpy as np
from keras import backend
from keras.callbacks import ReduceLROnPlateau,Lea... | github_jupyter |
# <center>K-Means Clustering</center>
## Introduction
There are many models for **clustering** out there. In this notebook, we will be presenting the model that is considered the one of the simplest model among them. Despite its simplicity, the **K-means** is vastly used for clustering in many data science applicatio... | github_jupyter |
# Language Translation
In this project, you’re going to take a peek into the realm of neural network machine translation. You’ll be training a sequence to sequence model on a dataset of English and French sentences that can translate new sentences from English to French.
## Get the Data
Since translating the whole lan... | github_jupyter |
```
import pandas as pd
import nltk
import ast
import numpy as np
import os
import ast
import urllib.request
from urllib.request import urlopen
from bs4 import BeautifulSoup
import os.path
nltk.download('stopwords')
nltk.download('words')
nltk.download('punkt')
```
# Dataset creation if it is not existing.
__Dataset i... | github_jupyter |
<a href="https://colab.research.google.com/github/lakshit2808/Machine-Learning-Notes/blob/master/ML_Models/Classification/Naive_Bayes/naive_bayes.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Naive Bayes
<img src='https://miro.medium.com/max/12... | github_jupyter |
# Feature Extraction
### In this notebook, we roll the datasets for the later features extraction.
### To achieve this, we use the tsfresh library.
### Install some required packages
#### Please install just those that are not yet installed
```
!pip install natsort
!pip install tsfresh
!pip install pandas-profiling... | github_jupyter |
```
# Following variables can be set here or via papermill
# experiment = "experiment-baseline-with-latency-3"
```
# Imports
```
from google.oauth2 import service_account
from google.cloud import monitoring_v3
from google.cloud import bigquery
from google.cloud import storage
from google.oauth2 import service_account... | github_jupyter |
# Learning How to Read: Text Preprocessing
A big part of working with natural languages is preparing a text for later work. In this notebook I demonstrate the process of preparing a document using an e-mail sent out by [arXiv.org](https://arxiv.org/), a website containing preprints of academic papers in the sciences. ... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
import os
import sys
import shutil
import subprocess
from omegaconf import OmegaConf
import pydoc
from tqdm.notebook import tqdm
from collections import defaultdict
from PIL import Image
import cv2
import numpy as np
import torch
from torch import nn
%matplotlib inline
from mat... | github_jupyter |
# Skinet - Segmentation of the Kidney through a Neural nETwork - Inference Tool
For more details, visit https://github.com/SkinetTeam/Skinet
## Google Colab Only
Executes only if using this notebook on Google Colab (getting files needed). Errors might appear, do not worry about them. Check that files you wanted to re... | github_jupyter |
```
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsRegressor
import matplotlib.pyplot as plt
import seaborn as sns # for visualiation
from scipy.stats import ttest_ind # t-tests
import altair as alt
alt.renderers.enable('notebook') # e... | github_jupyter |
[Table of Contents](http://nbviewer.ipython.org/github/rlabbe/Kalman-and-Bayesian-Filters-in-Python/blob/master/table_of_contents.ipynb)
# Ensemble Kalman Filters
```
#format the book
%matplotlib inline
from __future__ import division, print_function
from book_format import load_style
load_style()
```
> I am not wel... | github_jupyter |
##### Copyright 2020 The TensorFlow Hub 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... | github_jupyter |
<h1 style="font-family: Georgia; font-size:3em;color:#2462C0; font-style:bold">
Bandit Algorithms: epsilon-Greedy Algorithm</h1>
A/B testing can be defined as a randomized controlled experiment that allows us to test if there is a causal relationship between a change to a website/app and the user behavior. The change ... | github_jupyter |
# Sources for Python course notebooks - readme for authors:
Edit this file and run the `split_notebooks.py` script to produce notebooks for public display. One version is placed in `exercises/` and one in `solutions/`.
What the script does:
* Cell outputs will be cleared.
* The cell toolbar will be hidden.
* Cells ta... | github_jupyter |
<img align="centre" src="../../Supplementary_data/Github_banner.jpg" width="100%">
# Scalable Supervised Machine Learning on the Open Data Cube
* **Prerequisites:** This notebook series assumes some familiarity with machine learning, statistical concepts, and python programming. Beginners should consider working thro... | github_jupyter |
```
import numpy as np
from gurobipy import *
```
## Precision LP
```
S = [0.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0]
Email, S, t= multidict({i: [S[i], i*100] for i in range(10)})
model = Model('precision')
# Email variable
w = model.addVars(Email, lb=0.0, ub =1.0, vtype='C', name = 'Weight')
I = model.addVar... | github_jupyter |
```
np.arange()
```
# Estadística
Es la rama de las matemáticas que estudia la variabilidad, así como el proceso aleatorio que la genera siguiendo leyes de probabilidad.
La estadística es útil para una amplia variedad de ciencias empíricas (la que entiende los hechos creando representaciones de la realidad), desde l... | github_jupyter |
# Ray RLlib - Introduction to RLlib
© 2019-2021, Anyscale. All Rights Reserved

In the [previous lesson](01-Introduction-to-Reinforcement-Learning.ipynb), we learned the basic concepts of reinforcement learning, with a "taste" of [RLlib](https://rllib.io) and [Op... | github_jupyter |
## Rover Lab Notebook
This notebook contains the functions from the lesson and provides the scaffolding you need to test out your mapping methods. The steps you need to complete in this notebook for the project are the following:
* First just run each of the cells in the notebook, examine the code and the results of ... | github_jupyter |
# Transfer Learning
In this notebook, you'll learn how to use pre-trained networks to solved challenging problems in computer vision. Specifically, you'll use networks trained on [ImageNet](http://www.image-net.org/) [available from torchvision](http://pytorch.org/docs/0.3.0/torchvision/models.html).
ImageNet is a m... | github_jupyter |
# Logistic Regression Example
## Bank dataset to determine if a customer would buy a CD
The data is related with direct marketing campaigns of a Portuguese banking institution. The marketing campaigns were based on phone calls. A number of features such as age, kind of job, marital status, education level, credit def... | github_jupyter |
# DAE solver
In this notebook, we show some examples of solving a DAE model. For the purposes of this example, we use the CasADi solver, but the syntax remains the same for other solvers
```
# Setup
%pip install pybamm -q # install PyBaMM if it is not installed
import pybamm
import tests
import numpy as np
import ... | github_jupyter |
# Supervised Retrieval
In this notebook we use the supervised classification model for a supervised crosslingual information retrieval task.
```
import sys
import os
sys.path.append(os.path.dirname((os.path.abspath(''))))
import pandas as pd
import numpy as np
import seaborn as sn
import matplotlib.pyplot as plt
fro... | github_jupyter |
# Publications markdown generator for academicpages
Takes a TSV of publications with metadata and converts them for use with [academicpages.github.io](academicpages.github.io). This is an interactive Jupyter notebook ([see more info here](http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/what_is_jupyter.... | github_jupyter |
## Connecting to Presto
Presto ships with a CLI which supports autocompletion, history, progress bars and other useful features. For quickly testing queries the CLI is very helpful.
In a environment like a Jupyter notebook, we can use a Presto Python client. The Presto client library implements the Python DBAPI2.0 in... | github_jupyter |
#Import
```
!pip install dlib
!pip install face_recognition
import numpy as np
import csv
from PIL import Image, ImageDraw
from IPython.display import display
from zipfile import ZipFile
import face_recognition
```
#Global variables
```
```
#Connect to drive
```
# from google.colab import drive
# drive.mount('/gdr... | github_jupyter |
```
import open3d as o3d
import numpy as np
import matplotlib.pyplot as plt
import os
import sys
# monkey patches visualization and provides helpers to load geometries
sys.path.append('..')
import open3d_tutorial as o3dtut
# change to True if you want to interact with the visualization windows
o3dtut.interactive = not... | github_jupyter |
```
from tars import Tars, markets, portfolios, traders, strategies
%matplotlib inline
```
# Develop your own trading strategy
Here's an example to show how you can develop your own strategy. This notebook is a template for you to start your own thing.
### Here's the strategy in development
It's actually a copy of ... | github_jupyter |
```
import numpy as np
from dipy.core.gradients import gradient_table
from dipy.data import get_fnames, default_sphere
from dipy.direction import ProbabilisticDirectionGetter
from dipy.io.gradients import read_bvals_bvecs
from dipy.io.image import load_nifti, load_nifti_data
from dipy.io.stateful_tractogram import Spa... | github_jupyter |
# Table of Contents
<p><div class="lev1"><a href="#Short-codebook"><span class="toc-item-num">1 </span>Short codebook</a></div><div class="lev1"><a href="#Importing-libraries-and-data"><span class="toc-item-num">2 </span>Importing libraries and data</a></div><div class="lev1"><a href="#Sample-cha... | github_jupyter |
```
# default_exp models.MINIROCKET
```
# MINIROCKET
> A Very Fast (Almost) Deterministic Transform for Time Series Classification.
```
#export
from tsai.imports import *
from tsai.utils import *
from tsai.data.external import *
from tsai.models.layers import *
#export
from sktime.transformations.panel.rocket import... | github_jupyter |
# Introduction to Python and Natural Language Technologies
## Lecture 01 - Introduction
February 7, 2018
### 1.1 [About this course](#1.1)
### 1.2 [Requirements, course material](#1.2)
### 1.3 [What is Natural Language Processing?](#1.3)
# 1.1 About this course
<a id='1.1'></a>
- Lecture: Wednesday, 12.15-14.00,... | github_jupyter |
# Demo on how to use Basis-Set-Exchange library to interconvert between Basis Set formats of various QC softwares
The following imports the library and returns the list of basis set dictionaries available in the library for pob-tzvp. Unfortunately not all the elements provided on the Crystal website are available in t... | github_jupyter |
## Dependencies
```
!pip install --quiet /kaggle/input/kerasapplications
!pip install --quiet /kaggle/input/efficientnet-git
import warnings, glob
from tensorflow.keras import Sequential, Model
import efficientnet.tfkeras as efn
from cassava_scripts import *
seed = 0
seed_everything(seed)
warnings.filterwarnings('ig... | github_jupyter |
# Using Geoprocessing tools
This sample notebooks shows how geoprocessing tools can be used in an analysis. The analysis below uses a geoprocessing tool to deduce the path that the debris of a crashed airplane would take if it went down at different places in the ocean. It should be noted that this tool is for the pu... | github_jupyter |
```
%matplotlib inline
from matplotlib import style
style.use('fivethirtyeight')
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import datetime as dt
```
# Reflect Tables into SQLAlchemy ORM
```
# Python SQL toolkit and Object Relational Mapper
import sqlalchemy
from sqlalchemy.ext.automap imp... | github_jupyter |
# Michigan Representative Disbursement Spending Analysis v1.1
Analysis of all 14 Michigan house Representative's spending habits.

All data pulled directly from the [FEC disbursement database](https:/... | github_jupyter |
## 練習時間
將你的結果存成 csv, 上傳你的第一份 Kaggle 成績
Hints: https://stackoverflow.com/questions/16923281/pandas-writing-dataframe-to-csv-file
```
# Import 需要的套件
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
```
### 之前做過的處理
```
# 設定 data_path
dir_data = './data/'
f_app_train... | github_jupyter |
```
# we'll need the following packages
from dask.distributed import Client, progress
from dask import dataframe as dd
import datetime
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
# enable matplotlib to display inline
%matplotlib inline
client = Client('10.10.100.15:8786')
client
# create the... | github_jupyter |
```
# import logging
# logging.captureWarnings(True)
# logging.getLogger('py.warnings').setLevel(logging.ERROR)
import numpy as np
import numpy.ma as ma
import xarray as xr
import pandas as pd
from scipy import stats
import scipy
from scipy.interpolate import make_interp_spline, BSpline
import metpy.calc as mpcalc
fro... | github_jupyter |
# Basic Optimization
In this notebook I'll optimize a trough model to fit the data. This is a necessary first-step to fitting trough models and finding model parameters, as it cuts down on the burn-in required when running the MCMC.
This particular will optimize the most basic 0-0 model, in which both the accumulation... | github_jupyter |
### Navigate to the location of folder ###
```
import os
# os.chdir('../../src/Enviroments/ExternalEnv/RPNet')
os.chdir('../../')
from os import listdir,getcwd,chdir,mkdir
from os.path import isfile,join,exists
from pathlib import Path
import sys
sys.path.append(join(getcwd(),str(Path('src'))))
getcwd()
```
### Impor... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.