code stringlengths 2.5k 150k | kind stringclasses 1
value |
|---|---|
```
# 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 |
# Gaussian mixture model
The model in prototyped with TensorFlow Probability and inferecne is performed with variational Bayes by stochastic gradient descent.
Details on [Wikipedia](https://en.wikipedia.org/wiki/Mixture_model#Gaussian_mixture_model).
Some codes are borrowed from
[Brendan Hasz](https://brendanhasz.g... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
from sklearn import svm
import pandas as pd
import seaborn as sns
from sklearn import svm
from sklearn.model_selection import train_test_split
from sklearn import metrics
from sklearn import neighbors, datasets
from sklearn.model_selection import cross_val_score
fr... | github_jupyter |
# Direct optimal control of a pendulum
We want to control an inverted pendulum and stabilize it in the upright position. The equations in Hamiltonian form describing an inverted pendulum with a torsional spring are as following:
$$\begin{equation}
\begin{bmatrix} \dot{q}\\ \dot{p}\\ \end{bmatrix} =
\begin{bm... | github_jupyter |
### Question1
#### Create a function that takes a list of strings and integers, and filters out the list so that it
#### returns a list of integers only.
#### Examples
#### filter_list([1, 2, 3, "a", "b", 4]) ➞ [1, 2, 3, 4]
#### filter_list(["A", 0, "Edabit", 1729, "Python&q... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
ATrot = np.array([1* 60 + 17.50, 1*60 + 17.12, 60 + 16.18, 60 +16.94, 60 + 17.57, 60+ 17.59, 60 + 17.53, 60 + 18.06])
ATcyl = np.array([60 +37.60, 60 +38.07, 60 +37.13, 60 + 37.54, 60 + 37.62, 60 + 36.84, 60 +37.40, 60 + 37.38, 60 +37.52])
mcyl = 1.6189
Rcyl = 0.... | github_jupyter |
```
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
from IPython.display import display
```
## Exercise 1
You've just been hired at a real estate investment firm and they would like you to build a model for pricing houses. You are given a dataset that contains data for hou... | github_jupyter |
## Lab 7: Babies
Please complete this lab by providing answers in cells after the question. Use **Code** cells to write and run any code you need to answer the question and **Markdown** cells to write out answers in words. After you are finished with the assignment, remember to download it as an **HTML file** and subm... | github_jupyter |
```
!pip install pandas sklearn
import pandas as pd
df = pd.read_csv('spotify_kaggle/data.csv')
df.head()
new_df = pd.read_csv('spotify2.csv')
new_df.head()
import pickle
filename = 'neighbors'
infile = open(filename,'rb')
model = pickle.load(infile)
infile.close()
def value_monad(a):
return new_df.values.tolist(... | github_jupyter |
# Efficient Grammar Fuzzing
In the [chapter on grammars](Grammars.ipynb), we have seen how to use _grammars_ for very effective and efficient testing. In this chapter, we refine the previous string-based algorithm into a tree-based algorithm, which is much faster and allows for much more control over the production o... | github_jupyter |
# Knowledge Graph Triplet
Generate MS text -> EN Knowledge Graph Triplet.
<div class="alert alert-info">
This tutorial is available as an IPython notebook at [Malaya/example/knowledge-graph-triplet](https://github.com/huseinzol05/Malaya/tree/master/example/knowledge-graph-triplet).
</div>
<div class="alert ale... | github_jupyter |
```
%matplotlib inline
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
import xarray as xr
from neurolib.models.multimodel import MultiModel
from yasa import get_centered_indices
from aln_thalamus import ALNThalamusMiniNetwork
from plotting import ... | github_jupyter |
## Contents
0. Import Libraries and Load Data
1. Data Preparation for PanelData Model
2. Bassic Panel Model
- PooledOLS model
- RandomEffects model
- BetweenOLS model
3. Testing correlated effects
- Testing for Fixed Effects
- Testing for Time Effects
- First Differences
4. Comparison
- Comp... | github_jupyter |
```
import os
mingw_path = 'C:\\Users\\a1\\mingw\\mingw64\\bin'
os.environ['PATH'] = mingw_path + ';' + os.environ['PATH']
import xgboost as xgb
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
train = pd.read_csv('new_train_mean_cl.csv')
test = pd.read_csv('new_test_mean_cl.c... | github_jupyter |
# Access and mosaic Planet NICFI monthly basemaps
> A guide for accessing monthly Planet NICFI basemaps, selecting data by a defined AOI and mosaicing to produce a single image.
You will need a configuration file named `planet_api.cfg` (simple text file with `.cfg` extension will do) to run this notebook. It should b... | github_jupyter |
## Preprocessing
```
# Import our dependencies
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
import pandas as pd
import tensorflow as tf
# Import and read the charity_data.csv.
import pandas as pd
df = pd.read_csv("../Resources/charity_data.csv")
df.head()
# d... | github_jupyter |
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Array/spectral_unmixing.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a target="_blank" href... | github_jupyter |
# 选择
## 布尔类型、数值和表达式

- 注意:比较运算符的相等是两个等号,一个等到代表赋值
- 在Python中可以用整型0来代表False,其他数字来代表True
- 后面还会讲到 is 在判断语句中的用发
```
a = id(1)
b = id(1)
print(a,b)
# 因为a和b并不是同一个对象
a is b
a = id(1)
b = a
a is b
a = True
b = False
id(True)
a == b
a is b
```
## 字符串的比较使用ASCII值
```
a = "jokar"
b = "jokar"
a > b
```
## M... | github_jupyter |
## Day 14
https://adventofcode.com/2020/day/14
```
import aocd
lines = [line for line in aocd.get_data(day=14, year=2020).splitlines()]
len(lines)
lines[:5]
```
### Solution to Part 1
```
def maskable(value: int) -> list:
return list(bin(value)[2:].zfill(36))
def mask_value(value: int, *, mask: str) -> int:
... | github_jupyter |
# Lists
Data Structure:
A data structure is a collection of data elements (such as numbers or characters—or even other data structures) that is structured in some way, for example, by numbering the elements. The most basic data structure in Python is the "sequence".
-> List is one of the Sequence Data structure
... | github_jupyter |
<div align="right"><a href="https://github.com/lucasliano/Medidas1">Link Github</a></div>
<img src="logo.jpg" width="400"></img>
<div align="center">
<h1>Resúmen Teórico de Medidas Electrónicas 1</h1>
<h2>Incertidumbre</h2>
<h3>Liaño, Lucas</h3>
</div>
# Contenidos
- **Introducción**
- **Marco Teóri... | github_jupyter |
```
import sys
import os
import pandas as pd
import matplotlib.pyplot as plt
# parentDir = os.path.dirname(os.getcwd())
# sys.path.insert(0,parentDir )
myMods = os.path.join(os.getcwd(), "myMods")
sys.path.insert(0,myMods)
import mainFun.apiFix as apiFix
import mainFun.createReport as createReport
import mainFun.getVi... | github_jupyter |
### Analyze Auto sales trend and verify if RCF detects abrupt shift in sales
#### Years: 2005 to 2020. This period covers recession due to housing crisis in 2008, followed by recovery and economic impact due to Covid
### Data Source: Monthly New Vehicle Sales for the United States Automotive Market
### https://www.goo... | github_jupyter |
```
# Following imports pylab notebook without giving the user rubbish messages
import os, sys
stdout = sys.stdout
sys.stdout = open(os.devnull, 'w')
%pylab notebook
sys.stdout = stdout
from scipy.optimize import differential_evolution, minimize
import matplotlib.lines as mlines
from matplotlib.legend_handler import H... | github_jupyter |
```
import glob
import os
import warnings
import geopandas
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import matplotlib.colors
import pandas
import seaborn
from cartopy import crs as ccrs
from mpl_toolkits.axes_grid1 import make_axes_locatable
# from geopandas/geoseries.py:358, when ... | github_jupyter |
```
# import data handling libraries
import pandas as pd
import numpy as np
# import graphing libraries
import seaborn as sns
import matplotlib.pyplot as plt
# import stats libraries
from scipy.optimize import curve_fit
from scipy.special import factorial
from scipy.stats import poisson, norm, chi2, ttest_ind, ttest_re... | github_jupyter |
<a href="https://www.bigdatauniversity.com"><img src="https://ibm.box.com/shared/static/qo20b88v1hbjztubt06609ovs85q8fau.png" width="400px" align="center"></a>
<h1 align="center"><font size="5">LOGISTIC REGRESSION WITH TENSORFLOW</font></h1>
## Table of Contents
Logistic Regression is one of most important technique... | github_jupyter |
```
#@title Copyright 2021 Google LLC. { display-mode: "form" }
# 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... | github_jupyter |
## Section Contents
* [plot(): analyze distributions](plot.ipynb)
* [plot_correlation(): analyze correlations](plot_correlation.ipynb)
* [plot_missing(): analyze missing values](plot_missing.ipynb)
* [plot_diff(): analyze difference between DataFrames](plot_diff.ipynb)
* [create_report(): create a profile report]... | github_jupyter |
# Prominent paths originating from epilepsy to a Compound
```
import math
import pandas
from neo4j import GraphDatabase
from tqdm.notebook import tqdm
import hetnetpy.readwrite
import hetnetpy.neo4j
from src.database_utils import get_db_connection
epilepsy_id = 'DOID:1826'
# Get top ten most important metapaths for... | github_jupyter |
```
from hyperneat.spatial_node import SpatialNode, SpatialNodeType
from hyperneat.substrate import Substrate
from hyperneat.evolution import Hyperneat
from neat.genes import ConnectionGene, NodeGene, NodeType
from neat.genome import Genome
from neat.activation_functions import ActivationFunction
from neat.neural_netw... | github_jupyter |
# 🧐 Find label errors with cleanlab
In this tutorial, we will show you how you can find possible labeling errors in your data set with the help of [*cleanlab*](https://github.com/cgnorthcutt/cleanlab) and *Rubrix*.
## Introduction
As shown recently by [Curtis G. Northcutt et al.](https://arxiv.org/abs/2103.14749) l... | github_jupyter |
### Task Video :
#### Dataset Link:
Dataset can be found at " /data/videos/ " in the respective challenge's repo.
#### Description:
Video series is just a sequence of images arranged in a specific order. Images of that sequence are called frames. Therefore, in video intelligence tasks, we take advantage of the tempor... | github_jupyter |
<a href="https://colab.research.google.com/github/AzucenaMV/top2000-dashboard/blob/main/top_2000_spotify_api.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
import pandas as pd
import requests
import os
from google.colab import drive
drive.mount... | github_jupyter |
# Uncertainty Quantification (UQ)
Approach:
1. Select some parameters to vary (e.g., the mean speed of pedestrians).
2. Use different distributions to estimate selected parameters.
3. Test effect on a so called quantity of intereset (e.g., the density).
That is, you feed different input distributions, simulate and c... | github_jupyter |
# Handwritten Digit Recognition With Deep Learning
#### A classic image recognition problem. Exploratory project - [repo here.](https://github.com/jeremyrcouch/digitrecognition)
---
The [MNIST](http://yann.lecun.com/exdb/mnist/) database is a collection of 70,000 handwritten digits (0 to 9). The goal is to build a mo... | github_jupyter |
# Machine Learning and Statistics for Physicists
Material for a [UC Irvine](https://uci.edu/) course offered by the [Department of Physics and Astronomy](https://www.physics.uci.edu/).
Content is maintained on [github](github.com/dkirkby/MachineLearningStatistics) and distributed under a [BSD3 license](https://openso... | github_jupyter |
# Plot Earth-Relative Atmospheric Angular Momentum
#### This notebook plots daily earth-relative atmospheric angular momentum (AAM) calculated using data from the 20th Century Reanalysis Project Version 3 (see AAM_Calculation_20CR.ipynb).
#### Import the necessary libraries.
```
import xarray as xr
import numpy as np... | github_jupyter |
# *Data Visualization and Statistics*
Gallery of Matplotlib examples: [https://matplotlib.org/gallery.html](https://matplotlib.org/gallery.html)
```
## First, let's import some packages.
import os
from pprint import pprint
from textblob import TextBlob
import numpy as np
from scipy import stats
import pandas as pd
... | github_jupyter |
### Introduction
This is a `View` Notebook to show an `IntSlider` widget either in an interactive Notebook or in a `Voila` Dashboard mode that will then print the [Fibonnaci sequence](https://en.wikipedia.org/wiki/Fibonacci_number) answer for that number. It will also show how long it takes each handler to calculate t... | github_jupyter |
## 1. Meet Dr. Ignaz Semmelweis
<p><img style="float: left;margin:5px 20px 5px 1px" src="https://s3.amazonaws.com/assets.datacamp.com/production/project_20/img/ignaz_semmelweis_1860.jpeg"></p>
<!--
<img style="float: left;margin:5px 20px 5px 1px" src="https://s3.amazonaws.com/assets.datacamp.com/production/project_20/d... | github_jupyter |
<center>
<img src="https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/Logos/organization_logo/organization_logo.png" width="300" alt="cognitiveclass.ai logo" />
</center>
# Pie Charts, Box Plots, Scatter Plots, and Bubble Plots
Estimated time needed: **30** minutes
## Objectives
A... | github_jupyter |
# Time-energy fit
3ML allows the possibility to model a time-varying source by explicitly fitting the time-dependent part of the model. Let's see this with an example.
First we import what we need:
```
from threeML import *
import matplotlib.pyplot as plt
from jupyterthemes import jtplot
%matplotlib inline
jtplot... | github_jupyter |
# Credit Risk Resampling Techniques
```
import warnings
warnings.filterwarnings('ignore')
import numpy as np
import pandas as pd
from pathlib import Path
from collections import Counter
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model impo... | github_jupyter |
## Predicting Survival on the Titanic
### History
Perhaps one of the most infamous shipwrecks in history, the Titanic sank after colliding with an iceberg, killing 1502 out of 2224 people on board. Interestingly, by analysing the probability of survival based on few attributes like gender, age, and social status, we c... | github_jupyter |
<a name="top"></a>
<div style="width:1000 px">
<div style="float:right; width:98 px; height:98px;">
<img src="https://raw.githubusercontent.com/Unidata/MetPy/master/metpy/plots/_static/unidata_150x150.png" alt="Unidata Logo" style="height: 98px;">
</div>
<h1>Hodographs</h1>
<h3>Unidata Python Workshop</h3>
<div styl... | github_jupyter |
## Community Detection
In this notebook we will walk through a number of methods for community detection using a simple example dataset.
```
import numpy,pandas
import networkx as nx
import matplotlib.pyplot as plt
import sys
import operator
import itertools
sys.path.append('../utils')
from utils import algorithm_u... | github_jupyter |
<a href="https://colab.research.google.com/github/srijan-singh/machine-learning/blob/main/Regression/Simple%20Regression/Models/Simple_Regression_M1.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
!pip install -U scikit-learn
import matplotlib.p... | github_jupyter |
# Preprocessing data
```
import json
import numpy as np
import csv
import sys
dictCountries={
"Alemania":"Germany",
"Austria":"Austria",
"Bélgica":"Belgium",
"Bulgaria":"Bulgaria",
"Chipre":"Cyprus",
"Croacia":"Croatia",
"Dinamarca":"Denmark",
"Eslovenia":"Slovenia",
"Estonia":"E... | github_jupyter |
```
import holoviews as hv
hv.extension('bokeh')
hv.opts.defaults(hv.opts.Curve(width=500),
hv.opts.Image(width=500, colorbar=True, cmap='Viridis'))
import numpy as np
import scipy.signal
import scipy.fft
from IPython.display import Audio
```
# Diseño de sistemas y filtros IIR
Un filtro FIR de buena... | github_jupyter |
# Assignment 2. Programming Intelligent Agents
MTY - A01152534 - Jorge Antonio Ayala Urbina
MTY - Datos Ale
MTY - A01037093 - Miguel Angel Cruz Gomez
```
from agents import *
import random
# Create things
# Treasure1 thing
class T(Thing):
pass
# Treasure2 thing
class t(Thing):
pass
#Reusable tool thing... | github_jupyter |
# The Schrödinger equation
#### Let's have some serious fun!
We'll look at the solutions of the Schrödinger equation for a harmonic potential.
```
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import math
from math import pi as Pi
import... | github_jupyter |
```
%%capture
!pip install python-dp
import syft as sy
duet = sy.join_duet(loopback=True)
# https://github.com/OpenMined/PyDP/blob/dev/examples/Tutorial_1-carrots_demo/carrots_demo.ipynb
# we will not explicitly call pydp.xxx, instead we will call duet.pydp.xxx, which is calling pydp.xxx on the DO side, so it's not nec... | github_jupyter |
```
import pandas as pd
# movies dataset
movies = pd.read_pickle('./dataset/movies/movies.p')
print(movies.shape)
movies.head()
#taglines dataset
taglines = pd.read_pickle('./dataset/movies/taglines.p')
print(taglines.shape)
taglines.head()
```
## Filter joins
- semi join
- anti join
Mutation join vs filter join
- ... | github_jupyter |
```
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
from sklearn import datasets
from sklearn.decomposition import PCA
```
### Generate a dataset
```
xy = np.random.multivariate_normal([0,0], [[10,7],[7,10]],1000)
plt.plot(xy[:,0],xy[:,1],"o")
plt.show()
```
### Create a Principle Component An... | github_jupyter |
```
%matplotlib inline
import numpy as np
import pylab as plt
import ccgpack as ccg
from itertools import product
from matplotlib.colors import LogNorm
cl = np.load('../data/cl_planck_lensed.npy')
sfs = ccg.StochasticFieldSimulator(cl)
nside = 1024
size = 30
ms = []
for i in range(4):
ms.append(sfs.simulate(nside,... | github_jupyter |
# Quantum chemistry with VQE
This tutorial will show you how to solve an important problem for quantum chemistry using PennyLane on Amazon Braket: finding the ground-state energy of a molecule. The problem can be tackled using near-term quantum hardware by implementing the variational quantum eigensolver (VQE) algorit... | github_jupyter |
# Counterfactual explanations with ordinally encoded categorical variables
This example notebook illustrates how to obtain [counterfactual explanations](https://docs.seldon.io/projects/alibi/en/latest/methods/CFProto.html) for instances with a mixture of ordinally encoded categorical and numerical variables. A more el... | github_jupyter |
# Stateful Model Feedback Metrics Server
In this example we will add statistical performance metrics capabilities by levering the Seldon metrics server.
Dependencies
* Seldon Core installed
* Ingress provider (Istio or Ambassador)
An easy way is to run `examples/centralized-logging/full-kind-setup.sh` and then:
```ba... | github_jupyter |
# Self-Driving Car Engineer Nanodegree
## Project: **Finding Lane Lines on the Road**
***
In this project, you will use the tools you learned about in the lesson to identify lane lines on the road. You can develop your pipeline on a series of individual images, and later apply the result to a video stream (really j... | github_jupyter |
# Batch correction
What is batch correction? A "Batch" is when experiments have been performed at different times and there's some obvious difference between them. Single-cell experiments are often inherently "batchy" because you can only perform so many single cell captures at once, and you do multiple captures, over... | github_jupyter |
# **PROGETTO**
# FEATURES NUMERICHE, CATEGORIALI, DATA
In questo notebook tratto ed introduco le features numeriche, categoriali e di tipo data. Le varie features verranno aggiunte in modo incrementale. Nel successivo notebook verranno introdotte ulteriore features: di tipo insiemistico e di tipo testuale.
Spesso è ... | github_jupyter |
```
import tensorflow
import pandas as pd
import time
import numpy as np
# ignore all info and warnings but not error messages
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# tensorflow libraries
import tensorflow as tf
import tensorflow.keras as keras
from tensorflow.keras import Sequential
from tensorflow.ker... | github_jupyter |
_Lambda School Data Science — Big Data_
# AWS SageMaker
### Links
#### AWS
- The Open Guide to Amazon Web Services: EC2 Basics _(just this one short section!)_ https://github.com/open-guides/og-aws#ec2-basics
- AWS in Plain English https://www.expeditedssl.com/aws-in-plain-english
- Amazon SageMaker » Create an Amaz... | github_jupyter |
# Введение в искусственные нейронные сети
# Урок 1. Основы обучения нейронных сетей
## Содержание методического пособия:
<ol>
<li>Общие сведения о искусственных нейронных сетях</li>
<li>Место искусственных нейронных сетей в современном мире</li>
<li>Области применения</li>
<li>Строение биологической ... | github_jupyter |
```
import numpy as np
import cv2
import tensorflow as tf
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
model = tf.keras.models.load_model("/home/d3adsh0t/Tunex/8")
# EMOTIONS = ["angry" ,"disgust","scared", "happy", "sad", "surprised","neutral"]
# EMOTIONS=["angry",
# "disgust",
... | github_jupyter |
# T005 · Compound clustering
Authors:
- Gizem Spriewald, CADD Seminar, 2017, Charité/FU Berlin
- Calvinna Caswara, CADD Seminar, 2018, Charité/FU Berlin
- Jaime Rodríguez-Guerra, 2019-2020, [Volkamer lab](https://volkamerlab.org), Charité
__Talktorial T005__: This talktorial is part of the TeachOpenCADD pipeline des... | github_jupyter |
## Getting Started
[`Magma`](https://github.com/phanrahan/magma) is a hardware construction language written in `Python 3`. The central abstraction in `Magma` is a `Circuit`, which is analagous to a verilog module. A circuit is a set of functional units that are wired together.
`Magma` is designed to work with [`Mant... | github_jupyter |
# Tahoe Healthcare
## How to reduce readmissions to each hospital
- The goal of this case is exploratory data analysis to understand what factors are the biggest indicator or readmissions. This way, instead of rolling out 'Care Tracker' to every patient ( which costs `$1,200` per patient), only the groups of patients m... | github_jupyter |
# **The Data Science Method**
1. [**Problem Identification**](https://medium.com/@aiden.dataminer/the-data-science-method-problem-identification-6ffcda1e5152)
2. [Data Wrangling](https://medium.com/@aiden.dataminer/the-data-science-method-dsm-data-collection-organization-and-definitions-d19b6ff141c4)
* Dat... | github_jupyter |
# SageMaker Tensorflow를 이용한 MNIST 학습
MNIST는 필기 숫자 분류하는 문제로 이미지 처리의 테스트용으로 널리 사용되는 데이터 세트입니다. 28x28 픽셀 그레이스케일로 70,000개의 손으로 쓴 숫자 이미지가 레이블과 함께 구성됩니다. 데이터 세트는 60,000개의 훈련 이미지와 10,000개의 테스트 이미지로 분할됩니다. 0~9까지 10개의 클래스가 있습니다. 이 튜토리얼은 SageMaker에서 Tensorflow V2를 이용하여 MNIST 분류 모델을 훈련하는 방법을 보여줍니다.
```
import sagemaker
sagemak... | github_jupyter |
# VacationPy
----
#### Note
* Keep an eye on your API usage. Use https://developers.google.com/maps/reporting/gmp-reporting as reference for how to monitor your usage and billing.
* Instructions have been included for each segment. You do not have to follow them exactly, but they are included to help you think throug... | github_jupyter |

[](https://colab.research.google.com/github/JohnSnowLabs/spark-nlp-workshop/blob/master/tutorials/Certification_Trainings/Healthcare/21.Gender_Classifier.ipynb)
# 21. Gender C... | github_jupyter |
# Chapter 7: n-step Bootstrapping
## 1. n-step TD Prediction
- Generalize one-step TD(0) method
- Temporal difference extends over n-steps

- Want to update estimated value $v_\pi(S_t)$ of state $S_t$ from:
$$S_t,R_{t+1},S_{t+1},R_{t+1},...,R_T,S_T$$
- for *MC*, target is... | github_jupyter |
This script takes the notebook with RNA and DNA BSID's and collects information for the corresponding samples from fusion summary files, breakpoint density files, GISTIC CNA broad_values file and FPKM files
```
import argparse
import pandas as pd
import numpy as np
import zipfile
import statistics
import scipy
f... | github_jupyter |
```
# importing libraries
import h5py
import scipy.io as io
import PIL.Image as Image
import numpy as np
import os
import glob
from matplotlib import pyplot as plt
from scipy.ndimage.filters import gaussian_filter
import scipy
from scipy import spatial
import json
from matplotlib import cm as CM
from image import *
fro... | github_jupyter |
```
import pandas as pd
import numpy as np
```
##### Cargar la data de salarios
```
data = pd.read_csv('../Datasets casos de estudio 2/Case study 1/cs2.1.csv')
```
##### Variables en dataset
```
data.head()
data.dtypes
```
##### Dimensiones del dataset
```
data.shape
```
##### Estadisticos principales
```
data.... | github_jupyter |
<a href="https://colab.research.google.com/github/arjunparmar/VIRTUON/blob/main/Harshit/SwapNet_Experimentation.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
from google.colab import drive
drive.mount('/content/drive')
## Imports
import os
imp... | github_jupyter |
Lambda School Data Science
*Unit 2, Sprint 2, Module 3*
---
# Cross-Validation
## Assignment
- [x] [Review requirements for your portfolio project](https://lambdaschool.github.io/ds/unit2), then submit your dataset.
- [x] Continue to participate in our Kaggle challenge.
- [x] Use scikit-learn for hyperparameter o... | github_jupyter |
```
import numpy as np
# Define Cost function, lambda function, p function, alpha function
def cost(theta:float) -> float:
return theta
def la(theta:float) -> float:
return 1/theta
def p(theta:float) -> float:
return 1/theta
def al(theta:float)-> float:
return theta
# def L_al_la(la,al,x_n):
# l=2*x... | github_jupyter |
```
import cv2
import glob
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.image as mpimg
%matplotlib inline
left_top=[585, 456]
left_bottom =[253, 697]
right_top =[1061, 690]
right_bottom =[700, 456]
corners = np.float32([left_top,left_bottom, right_top,right_bottom])
offset = 150 #test the imag... | github_jupyter |
<table style="float:left; border:none">
<tr style="border:none">
<td style="border:none">
<a href="https://bokeh.org/">
<img
src="assets/bokeh-transparent.png"
style="width:50px"
>
</a>
</td>
<td style="border:n... | github_jupyter |
```
from pathlib import Path
import os
import shlex
import shutil
import subprocess
import pandas as pd
names_rows_stability = [
['dg', 1], # totalEnergy
['backbone_hbond', 2],
['sidechain_hbond', 3],
['van_der_waals', 4],
['electrostatics', 5],
['solvation_polar', 6],
['solvation_hydroph... | github_jupyter |
# Quantum Katas and Tutorials as Jupyter Notebooks
To run the katas and tutorials online, make sure you're viewing this file on Binder (if not, use [this link](https://mybinder.org/v2/gh/Microsoft/QuantumKatas/main?urlpath=/notebooks/index.ipynb)).
To run the katas and tutorials locally, follow [these installation in... | github_jupyter |
# Classifying OUV using NGram features and MLP
## Imports
```
import sys
sys.executable
from argparse import Namespace
from collections import Counter
import json
import os
import re
import string
import random
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
import torch.nn.functional as F
i... | github_jupyter |
# A/B and A/A tests and the power to detect a difference on a binary task (e.g. churn or propensity to buy)
A/B tests are used to detect a difference in two populations. Here we look at churn on 2 cohorts who have a low churn rate (5%), we'd like to determine how many people we need to sample to reliably detect an imp... | github_jupyter |
# Mass Transports
Transport diagnostics for flow through major straits.
## Theory
Formally, mass transports are given by
$$T_x = \rho u $$
$$T_y = \rho v $$
Mass transports are diagnostics that are calculated online by the model:
|--|
|variable|long name|units|dimensions|
|--|
|tx_trans|T-cell i-mass transport|S... | github_jupyter |
# Introduction to Adaptive Thresholding
This tutorial will go over some basic concepts you may wish to consider when setting thresholds for production models or otherwise.
## Make Some Data
This tutorial doesn't actually require real data--nor even a model! We'll make some fake data to get the idea. Don't worry too mu... | github_jupyter |
# Overlap matrices
This notebook will look at different ways of plotting overlap matrices and making them visually appealing.
One way to guarantee right color choices for color blind poeple is using this tool: https://davidmathlogic.com/colorblind
```
%pylab inline
import pandas as pd
import seaborn as sbn
sbn.set_st... | github_jupyter |
*Accompanying code examples of the book "Introduction to Artificial Neural Networks and Deep Learning: A Practical Guide with Applications in Python" by [Sebastian Raschka](https://sebastianraschka.com). All code examples are released under the [MIT license](https://github.com/rasbt/deep-learning-book/blob/master/LICEN... | github_jupyter |
<a href="https://colab.research.google.com/github/suyash091/EEG-MULTIPLE-CHANNEL/blob/master/1%20channel.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
# Mindwave | 1 channel | 512 sampling rate
```
```
from google.colab import drive
drive.m... | github_jupyter |
# 📝 Exercise M3.02
The goal is to find the best set of hyperparameters which maximize the
generalization performance on a training set.
Here again with limit the size of the training set to make computation
run faster. Feel free to increase the `train_size` value if your computer
is powerful enough.
```
import num... | github_jupyter |
```
import pandas as pd
import numpy as np
import math
import json
%matplotlib inline
# read in the json files
portfolio = pd.read_json('data/portfolio.json', orient='records', lines=True)
profile = pd.read_json('data/profile.json', orient='records', lines=True)
transcript = pd.read_json('data/transcript.json', orien... | github_jupyter |
# Object and Scene Detection using Amazon Rekognition
This notebook provides a walkthrough of [object detection API](https://docs.aws.amazon.com/rekognition/latest/dg/labels.html) in Amazon Rekognition to identify objects.
```
import boto3
from IPython.display import HTML, display, Image as IImage
from PIL import Ima... | github_jupyter |
# EGM722 - Week 5 Practical: Vector and raster operations using python
## Overview
Up to now, we have worked with either vector data or raster data, but we haven't really used them together. In this week's practical, we'll learn how we can combine these two data types, and see some examples of different analyses, suc... | github_jupyter |
# 5. Statistical Packages in Python for Mathematicians
Statisticians use the following packages in Python:
- Data creation: `random`
- Data analysis/manipulation: `pandas`, `scikit-learn`
- Statistical functions: `scipy.stats`
- Statistical data visualization: `matplotlib`, `seaborn`
- Statistical data exploration: `... | github_jupyter |
**This notebook is an exercise in the [Intro to Deep Learning](https://www.kaggle.com/learn/intro-to-deep-learning) course. You can reference the tutorial at [this link](https://www.kaggle.com/ryanholbrook/deep-neural-networks).**
---
# Introduction #
In the tutorial, we saw how to build deep neural networks by sta... | github_jupyter |
```
import pandas as pd
from sklearn.model_selection import train_test_split
# Read the data
data = pd.read_csv('~/kaggle/input/melbourne-housing-snapshot/melb_data.csv')
# Select subset of predictors
cols_to_use = ['Rooms', 'Distance', 'Landsize', 'BuildingArea', 'YearBuilt']
X = data[cols_to_use]
# Select target
y... | github_jupyter |
# Analysis for the floor control detection (FCD) model and competitor models
This notebook analyses the predictions of the FCD model and the competitor models discussed in the paper and show how they are compared over a few performance measurements. It also includes some stats about the dataset and the annotated floor... | github_jupyter |
# 3D Object Detection Evaluation Tutorial
Welcome to the 3D object detection evaluation tutorial! We'll walk through the steps to submit your detections to the competition server.
```
from av2.evaluation.detection.eval import evaluate
from av2.evaluation.detection.utils import DetectionCfg
from pathlib import Path
fr... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.