code stringlengths 2.5k 150k | kind stringclasses 1
value |
|---|---|
# Hypothesis Testing
```
set.seed(37)
```
## Student's t-test
The `Student's t-test` compares the means of two samples to see if they are different. Here is a `two-sided` Student's t-test.
```
x <- rnorm(1000, mean=0, sd=1)
y <- rnorm(1000, mean=1, sd=1)
r <- t.test(x, y, alternative='two.sided')
print(r)
```
Her... | github_jupyter |
<a href="https://colab.research.google.com/github/michalwilk123/nlp-transformer-app-pl/blob/master/ProjektSi_2021.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# **Transformacja liniowa nastroju skończonego tekstu**
## Projekt: Sztuczna Inteligenc... | github_jupyter |
```
!pip install confluent-kafka==1.7.0
from confluent_kafka.admin import AdminClient, NewTopic, NewPartitions
from confluent_kafka import KafkaException
import sys
from uuid import uuid4
bootstrap_server = "kafka:9092" # Brokers act as cluster entripoints
conf = {'bootstrap.servers': bootstrap_server}
a = AdminClient(... | github_jupyter |
```
#default_exp dispatch
#export
from fastcore.imports import *
from fastcore.foundation import *
from fastcore.utils import *
from nbdev.showdoc import *
from fastcore.test import *
```
# Type dispatch
> Basic single and dual parameter dispatch
## Helpers
```
#exports
def type_hints(f):
"Same as `typing.get_t... | github_jupyter |
```
import linsolve
import tf_linsolve
import tensorflow as tf
import scipy
import numpy as np
import pylab as plt
%load_ext line_profiler
from hera_cal.io import HERAData
hd = HERAData('zen.2458098.27465.sum.corrupt.uvh5')
data, flags, _ = hd.read(polarizations=['nn'])
from hera_cal.redcal import predict_noise_varianc... | github_jupyter |
# Scalars
```
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
```
## Integers
### Binary representation of integers
```
format(16, '032b')
```
### Bit shifting
```
format(16 >> 2, '032b')
16 >> 2
format(16 << 2, '032b')
16 << 2
```
### Overflow
In general, the computer representation of in... | github_jupyter |
#Introduction to the Research Environment
The research environment is powered by IPython notebooks, which allow one to perform a great deal of data analysis and statistical validation. We'll demonstrate a few simple techniques here.
##Code Cells vs. Text Cells
As you can see, each cell can be either code or text. To... | github_jupyter |
# Running T<sub>1</sub> Experiments with Qiskit
In a T<sub>1</sub> experiment, we measure an excited qubit after a delay. Due to decoherence processes (e.g. amplitude damping channel), it is possible that, at the time of measurement, after the delay, the qubit will not be excited anymore. The larger the delay time is,... | github_jupyter |
```
import os
from pycocotools.coco import COCO
import numpy as np
import torch.utils.data as data
import torch
from heatmap import heatmaps_from_keypoints
from imageio import imread
from skimage.transform import resize
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.model_zo... | github_jupyter |
# Lab 05
## Solving a rigid system of differential equations
### Konks Eric, Б01-818
X.9.7
$$y_1'=-0.04y_1+10^4y_2y_3$$
$$y_2'=0.04y_1-10^4y_2y_3-3*10^7y_2^2$$
$$y_3'=3*10^7y_2^2$$
$$y_1(0)=1,\ y_2(0)=0,\ y_3(0)=0$$
```
import unittest
import logging
import numpy as np
import pandas as pd
import matplotlib.pypl... | 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 |
## GMLS-Nets: 1D Regression of Linear and Non-linear Operators $L[u]$.
__Ben J. Gross__, __Paul J. Atzberger__ <br>
http://atzberger.org/
Examples showing how GMLS-Nets can be used to perform regression for some basic linear and non-linear differential operators in 1D.
__Parameters:__</span> <br>
The key parameter... | github_jupyter |
**General Work Process**
1. Import dataset and preprocess
2. Train model
3. Test model
```
import io
import os
import re
import shutil
import string
import numpy as np
import pandas as pd
import tensorflow as tf
from tensorflow.keras import Sequential, layers, losses
from tensorflow.keras.layers import Dense, Embeddi... | github_jupyter |
```
from moviepy.editor import *
postedByFontSize=25
replyFontSize=35
titleFontSize=100
cortinilla= VideoFileClip('assets for Channel/assets for video/transicion.mp4')
clip = ImageClip('assets for Channel/assets for video/background assets/fondo_preguntas.jpg').on_color((1920, 1080))
final= VideoFileClip('assets for C... | github_jupyter |
# PoissonRegressor with StandardScaler & Power Transformer
This Code template is for the regression analysis using Poisson Regressor, StandardScaler as feature rescaling technique and Power Transformer as transformer in a pipeline. This is a generalized Linear Model with a Poisson distribution.
### Required Packages
... | github_jupyter |
<a href="https://colab.research.google.com/github/Pradyumna1312/ML_SelfStudy/blob/main/ML_SelfStudy_LogReg.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
#Logistic regression
It is a statistical technique for modelling the probability of a specific... | github_jupyter |
```
# Transformers installation
! pip install transformers datasets
# To install from source instead of the last release, comment the command above and uncomment the following one.
# ! pip install git+https://github.com/huggingface/transformers.git
```
# Fine-tuning a pretrained model
In this tutorial, we will show y... | github_jupyter |
## ## Week 3-1 - Linear Regression - class notebook
This notebook gives three examples of regression, that is, fitting a linear model to our data to find trends. For the finale, we're going to duplicate the analysis behind the Washington Post story
```
import pandas as pd
import numpy as np
import matplotlib.pyplot a... | github_jupyter |
```
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
mnist = tf.contrib.learn.datasets.load_dataset("mnist")
train_data = mnist.train.images # Returns np.array
train_labels = np.asarray(mnist.train.labels, dtype=np.int32)
eval_data = mnist.test.images # Returns np.array
eval_labels = np.asar... | github_jupyter |
# はじめに
本実験では,PythonとGoogle Colaboratory(以下,Colab)を使用して,力学系の数値解析手法を学ぶ.PythonとColabの特徴は以下のとおり.
- Pythonとは
- プログラミング言語の1つで,現在,広く利用されている.
- Google Colaboratory(Colab)とは
- ブラウザ上で Python を記述して実行できるツール.
- 具体的には,まずブラウザで表示されるノートブック(今開いているこのページが1つのノートブックである)を作成し,そこにPythonコードの記述と実行を行う.
- Pythonコードの他に,テキストも入力できる
... | 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 |
# This notebook helps you to do several things:
1) Find your optimal learning rate
https://docs.fast.ai/callbacks.html#LRFinder
2)
```
%reload_ext autoreload
%autoreload 2
import fastai
from fastai.callbacks import *
from torch.utils.data import Dataset, DataLoader
from models import UNet2d_assembled
import numpy as... | github_jupyter |
```
## import data manipulation packages for data cleaning and distance calculation
import pandas as pd
import numpy as np
from sklearn.neighbors import DistanceMetric
from math import radians
## DATA CLEANING AND PREPARATION
## import dataset as variable 'city' and drop NaN
cities = pd.read_excel('worldcities.xlsx')
c... | github_jupyter |
## Sampling
You can get a randomly rows of the dataset. It is very usefull in training machine learning models.
We will use the dataset about movie reviewers obtained of [here](http://grouplens.org/datasets/movielens/100k/).
```
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# read a dataset o... | github_jupyter |
# Homework 8 - Artificial Neural Networks with PyTorch
## About
### In this homework, you will get your feet wet with deep learning using the PyTorch deep learning platform. This will involve:
* Preparing data
* Learning about the components of a deep learning pipeline
* Setting up a model, a loss function, and an o... | 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 |
```
%matplotlib inline
```
# Frequency and time-frequency sensors analysis
The objective is to show you how to explore the spectral content
of your data (frequency and time-frequency). Here we'll work on Epochs.
We will use this dataset: `somato-dataset`. It contains so-called event
related synchronizations (ERS)... | github_jupyter |
# Plots of the total distance covered by the particles as a function of their initial position
*Author: Miriam Sterl*
We plot the total distances covered by the particles during the simulation, as a function of their initial position. We do this for the FES, the GC and the GC+FES run.
```
from netCDF4 import Dataset... | github_jupyter |
# Data-Sitters Club 8: Just the Code
This notebook contains just the code (and a little bit of text) from the portions of *[DSC 8: Text-Comparison-Algorithm-Crazy-Quinn](https://datasittersclub.github.io/site/dsc8/)* for using Euclidean and cosine distance with word counts and word frequencies, and running TF-IDF for ... | github_jupyter |
# Politician Activity on Facebook by Political Affiliation
The parameters in the cell below can be adjusted to explore other political affiliations and time frames.
### How to explore other political affiliation?
The ***affiliation*** parameter can be use to aggregate politicians by their political affiliations. The ... | github_jupyter |
# 目的:了解Python基本語法
1. [資料型別](#01)
2. [for-loop](#02)
3. [while-loop](#03)
4. [清單(list)](#04)
5. [tuple是什麼?](#05)
6. [Python特殊的清單處理方式](#06)
7. [if的用法](#07)
8. [以if控制迴圈的break和continue](#08)
9. [函數:將計算結果直接於函數內印出或回傳(return)出函數外](#09)
10. [匿名函數](#10)
11. [物件導向範例](#11)
12. [NumPy (Python中用於處理numerical array的套件)](#12)
13. [一維... | github_jupyter |
### ILAS: Introduction to Programming 2017/18
# Coursework Assignment: Plant-life Report
__Complete exercises A to E.__
<br>__The exercises should be completed using Python programming skills we have covered in class. The questions are focussed on an imaginary case study:__
>It is though that the acidification of an... | github_jupyter |
# SageMaker Batch Transform using an XgBoost Bring Your Own Container (BYOC)
In this notebook, we will walk through an end to end data science workflow demonstrating how to build your own custom XGBoost Container using Amazon SageMaker Studio. We will first process the data using SageMaker Processing, push an XGB algo... | github_jupyter |
```
import numpy as np
import pandas as pd
import seaborn as sns
from scipy import stats
import matplotlib.pyplot as plt
from ipywidgets import *
import warnings
warnings.simplefilter(action='ignore', category=Warning)
%matplotlib inline
from google.colab import drive
df = pd.read_csv("DEMOFINAL - Sheet1.csv")
df = df.... | github_jupyter |
# Operations on word vectors
Welcome to your first assignment of this week!
Because word embeddings are very computionally expensive to train, most ML practitioners will load a pre-trained set of embeddings.
**After this assignment you will be able to:**
- Load pre-trained word vectors, and measure similarity usi... | github_jupyter |
# 16 - Regression Discontinuity Design
We don't stop to think about it much, but it is impressive how smooth nature is. You can't grow a tree without first getting a bud, you can't teleport from one place to another, a wound takes its time to heal. Even in the social realm, smoothness seems to be the norm. You can't ... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import random
import math
from itertools import combinations
POPULATION_SIZE = 1000
INITIAL_SICK = 1
INITIAL_HEALTHY = POPULATION_SIZE - INITIAL_SICK
SICK_COLOR = (1, 0, 0)
HEALTHY_COLOR = (0, 1, 0)
RECOVERED_COLOR = (0.7, ... | github_jupyter |
```
# Import libraries and modules
import matplotlib.pyplot as plt
import numpy as np
import os
import tensorflow as tf
print(np.__version__)
print(tf.__version__)
np.set_printoptions(threshold=np.inf)
```
# Local Development
## Arguments
```
arguments = {}
# File arguments.
arguments["train_file_pattern"] = "gs://m... | github_jupyter |
Водопьян А.О. Кобзарь О.С. Хабибуллин Р.А. 2019 г.
# Вязкость нефти
Источники:
1. Beggs, H.D. and Robinson, J.R. “Estimating the Viscosity of Crude Oil Systems.”
Journal of Petroleum Technology. Vol. 27, No. 9 (1975)
2. Vazquez M. et al. Correlations for fluid physical property prediction //SPE Annual... | github_jupyter |
```
import pandas
df = pandas.read_excel("s3://lab11---2019/house_price (1).xls")
df[:10]
df.describe()
df.hist(figsize=(20,20))
df.groupby('house_type').mean()
df[:10]
!pip install mglearn
import sklearn
from sklearn.model_selection import train_test_split
from matplotlib import pyplot as plt
%matplotlib inline
impo... | github_jupyter |
# Tidy Data
> Structuring datasets to facilitate analysis [(Wickham 2014)](http://www.jstatsoft.org/v59/i10/paper)
If there's one maxim I can impart it's that your tools shouldn't get in the way of your analysis. Your problem is already difficult enough, don't let the data or your tools make it any harder.
## The Ru... | github_jupyter |
# Week 1
1.Question 1
Consider the table below describing a data set of individuals who have registered to volunteer at a public school. Which of the choices below lists categorical variables?
**Answer:phone number and name**
2.Question 2
A study is designed to test the effect of type of light on exam performance of... | github_jupyter |
```
# import packages
import csv
import numpy as np
import warnings
import matplotlib.pyplot as plt
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.neighbors import KNeighbor... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import style
import warnings
from math import sqrt
from collections import Counter
from collections import defaultdict
style.use('fivethirtyeight')
import pandas as pd
import random
df = pd.read_csv('Dataset.csv')
original_df = pd.DataFrame.copy(df)... | github_jupyter |
# Module 3 Graded Assessment
```
"""
1.Question 1
Fill in the blanks of this code to print out the numbers 1 through 7.
"""
number = 1
while number <= 7:
print(number, end=" ")
number +=1
"""
2.Question 2
The show_letters function should print out each letter of a word on a separate line.
Fill in the blanks to mak... | github_jupyter |
### Instructions
The lecture uses random forest to predict the state of the loan with data taken from Lending Club (2015). With minimal feature engineering, they were able to get an accuracy of 98% with cross validation. However, the accuracies had a lot of variance, ranging from 98% to 86%, indicating there are lots ... | github_jupyter |
# Federated Keras MNIST Tutorial
```
#Install Tensorflow and MNIST dataset if not installed
!pip install tensorflow==2.3.1
#Alternatively you could use the intel-tensorflow build
# !pip install intel-tensorflow==2.3.0
import numpy as np
import tensorflow as tf
import tensorflow.keras as keras
from tensorflow.keras im... | 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 |
論文<br>
https://arxiv.org/abs/2109.07161<br>
<br>
GitHub<br>
https://github.com/saic-mdal/lama<br>
<br>
<a href="https://colab.research.google.com/github/kaz12tech/ai_demos/blob/master/Lama_demo.ipynb" target="_blank"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# 環境セットア... | github_jupyter |
# Wind Statistics
### Introduction:
The data have been modified to contain some missing values, identified by NaN.
Using pandas should make this exercise
easier, in particular for the bonus question.
You should be able to perform all of these operations without using
a for loop or other looping construct.
1. The... | github_jupyter |
# APS 5 - Questões com auxílio do Pandas
** Nome: ** <font color=blue> Gabriel Heusi Pereira Bueno de Camargo </font>
APS **INDIVIDUAL**
Data de Entrega: 26/Set até às 23h59 via GitHub.
Vamos trabalhar com dados do USGS (United States Geological Survey) para tentar determinar se os abalos detectados no hemisfério N... | github_jupyter |
```
# assume you have openmm, pdbfixer and mdtraj installed.
# if not, you can follow the gudie here https://github.com/npschafer/openawsem
# import all using lines below
# from simtk.openmm.app import *
# from simtk.openmm import *
# from simtk.unit import *
from simtk.openmm.app import ForceField
# define atoms and ... | github_jupyter |
# [NTDS'18] tutorial 2: build a graph from an edge list
[ntds'18]: https://github.com/mdeff/ntds_2018
[Benjamin Ricaud](https://people.epfl.ch/benjamin.ricaud), [EPFL LTS2](https://lts2.epfl.ch)
* Dataset: [Open Tree of Life](https://tree.opentreeoflife.org)
* Tools: [pandas](https://pandas.pydata.org), [numpy](http:... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
import numpy as np
import scipy.stats as stats
import scipy.special
#graphing
import matplotlib.pyplot as plt
#stats
import statsmodels.api as sm
from statsmodels.base.model import GenericLikelihoodModel
#import testing
import sys
sys.path.append("../")
import vuong_plots
beta0 ... | github_jupyter |
<a href="https://colab.research.google.com/github/livjab/DS-Unit-2-Sprint-4-Practicing-Understanding/blob/master/module1-hyperparameter-optimization/LS_DS_241_Hyperparameter_Optimization.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
_Lambda School... | github_jupyter |
```
import numpy as np
import pandas as pd
from pathlib import Path
import matplotlib.pyplot as plt
%matplotlib inline
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
```
# Return Forecasting: Read Historical Daily Yen Futures Data
In this notebook, you will load historical Dollar-Yen ex... | github_jupyter |
# Semantic Segmentation and Data Sets
In our discussion of object detection issues in the previous sections, we only used rectangular bounding boxes to label and predict objects in images. In this section, we will look at semantic segmentation, which attempts to segment images into regions with different semantic cate... | github_jupyter |
```
import fitsio as ft
import healpy as hp
import numpy as np
import matplotlib.pyplot as plt
import sys
sys.path.append('/users/PHS0336/medirz90/github/LSSutils')
from lssutils.utils import make_hp
from lssutils.lab import get_cl
from lssutils.extrn.galactic.hpmaps import logHI
from sklearn.linear_model import Linea... | github_jupyter |
# Scroll down to get to the interesting tables...
# Construct list of properties of widgets
"Properties" here is one of:
+ `keys`
+ `traits()`
+ `class_own_traits()`
Common (i.e. uninteresting) properties are filtered out.
The dependency on astropy is for their Table. Replace it with pandas if you want...
```
imp... | github_jupyter |
<a href="https://colab.research.google.com/github/RoetGer/coding-practice/blob/main/solved_coding_problems.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
**From Leetcode - Maximum Subarray**
Given an integer array nums, find the contiguous subarra... | github_jupyter |
<a href="https://colab.research.google.com/github/cervantes-loves-ai/100-Days-Of-ML-Code/blob/master/deep_neaural_network.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
!pip3 install torch
import torch
import numpy as np
import matplotlib.pyplo... | github_jupyter |
# DJL BERT Inference Demo
## Introduction
In this tutorial, you walk through running inference using DJL on a [BERT](https://towardsdatascience.com/bert-explained-state-of-the-art-language-model-for-nlp-f8b21a9b6270) QA model trained with MXNet and PyTorch.
You can provide a question and a paragraph containing the a... | github_jupyter |
# Feature Engineering in Keras.
Let's start off with the Python imports that we need.
```
import os, json, math, shutil
import numpy as np
import tensorflow as tf
print(tf.__version__)
# Note that this cell is special. It's got a tag (you can view tags by clicking on the wrench icon on the left menu in Jupyter)
# The... | github_jupyter |
# Performing Basic Sequence Analysis
Now I am continuing to my bioinformatics cookbook tutorial series. Today's topic is to perform basic sequence analysis which is the basics of Next Generation Sequencing.
We will do some basic sequence analysis on DNA sequences. FASTA files are our main target on this, also Biopyt... | github_jupyter |
```
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
pi = np.pi
x = np.linspace(-4*pi, 4*pi, 1000)
plt.plot(x, np.sin(x)/x)
plt.show()
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
pi = np.pi
x = np.linspace(-4*pi, 4*pi, 1000)
plt.plot(x, np.cos(x)/x)
plt.show()
%matplotlib... | github_jupyter |
# DSM - Modelling
- ploltting.py is imported to facilitate in visualization
$ (0) \quad \dot{E}_{t} \quad = \quad demand_{t} \quad + \quad DSM_{t}^{up} \quad - \quad
\sum_{tt=t-L}^{t+L} DSM_{t,tt}^{do} \qquad \forall t $
### Formulation after Zerrahn & Schill
$ (1) \quad DSM_{t}^{up} \quad = \qua... | github_jupyter |
```
import os, numpy, warnings
import pandas as pd
os.environ['R_HOME'] = '/home/gdpoore/anaconda3/envs/tcgaAnalysisPythonR/lib/R'
warnings.filterwarnings('ignore')
%config InlineBackend.figure_format = 'retina'
%reload_ext rpy2.ipython
%%R
require(ggplot2)
require(snm)
require(limma)
require(edgeR)
require(dplyr)
req... | github_jupyter |

# <font color='Blue'> Ciência dos Dados na Prática</font>
# Sistemas de Recomendação

Cada empresa de consumo de Internet precisa um si... | github_jupyter |
# Transporter statistics and taxonomic profiles
## Overview
In this notebook some overview statistics of the datasets are computed and taxonomic profiles investigated. The notebook uses data produced by running the [01.process_data](01.process_data.ipynb) notebook.
```
import numpy as np
import pandas as pd
import s... | github_jupyter |
```
import numpy as np
from keras.models import Sequential
from keras.models import load_model
from keras.models import model_from_json
from keras.layers.core import Dense, Activation
from keras.utils import np_utils
from keras.preprocessing.image import load_img, save_img, img_to_array
from keras.applications.imagen... | github_jupyter |
```
# Load libraries
import pandas as pd
import numpy as np
from pandas.tools.plotting import scatter_matrix
import matplotlib.pyplot as plt
import time
from sklearn.cross_validation import train_test_split
from sklearn.grid_search import GridSearchCV
from sklearn.neighbors import KNeighborsClassifier
# Load dataset
u... | github_jupyter |
Licensed under the MIT License.
Copyright (c) 2021-2031. All rights reserved.
# Kats Outliers Detection
* Kats General
* `TimeSeriesData` params and methods: https://facebookresearch.github.io/Kats/api/kats.consts.html#kats.consts.TimeSeriesData
* Kats Detection
* Kats detection official tutorial: https://github... | github_jupyter |
<a href="https://colab.research.google.com/github/mfernandes61/python-intro-gapminder/blob/binder/colab/07_reading_tabular.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
```
---
title: "Reading Tabular Data into DataFrames"
teaching: 10
exerci... | github_jupyter |
<figure>
<IMG SRC="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Fachhochschule_Südwestfalen_20xx_logo.svg/320px-Fachhochschule_Südwestfalen_20xx_logo.svg.png" WIDTH=250 ALIGN="right">
</figure>
# Machine Learning
### Sommersemester 2021
Prof. Dr. Heiner Giefers
```
import pandas as pd
import numpy as n... | github_jupyter |
## Prepare data
```
# mount google drive & set working directory
# requires auth (click on url & copy token into text box when prompted)
from google.colab import drive
drive.mount("/content/gdrive", force_remount=True)
import os
print(os.getcwd())
os.chdir('/content/gdrive/My Drive/Colab Notebooks/MidcurveNN')
!pwd
... | github_jupyter |
```
import io
import os
import pandas as pd
data_path = 'E:\\BaiduYunDownload\\optiondata3\\'
```
## Definitions
* Underlying The stock, index, or ETF symbol
* Underlying_last The last traded price at the time of the option quote.
* Exchange The exchange of the quote – Asterisk(*) represents a consolidated price of al... | github_jupyter |
# Modeling Transmission Line Properties
## Table of Contents
* [Introduction](#introduction)
* [Propagation constant](#propagation_constant)
* [Interlude on attenuation units](#attenuation_units)
* [Modeling a loaded lossy transmission line using transmission line functions](#tline_functions)
* [Input impedances, re... | github_jupyter |
# Arbeit mit Selenium_Arbeitskopie
Die Arbeit mit Selenium erfordert etwas Übung. Aber der Zeitaufwand lohnt sich. Es gibt mit Selenium kaum ein Webdienst der nicht scrapbar wird. Beginnen wir aber wie üblich mit der Dokumentation. Sie ist im Falle von Selenium sehr hilfreich. Ihr findet [sie hier](http://selenium-pyt... | github_jupyter |
# Temporal-Difference Methods
In this notebook, you will write your own implementations of many Temporal-Difference (TD) methods.
While we have provided some starter code, you are welcome to erase these hints and write your code from scratch.
---
### Part 0: Explore CliffWalkingEnv
We begin by importing the necess... | github_jupyter |
# Ridge Regression
## Goal
Given a dataset with continuous inputs and corresponding outputs, the objective is to find a function that matches the two as accurately as possible. This function is usually called the target function.
In the case of a ridge regression, the idea is to modellize the target function as a li... | github_jupyter |
```
import numpy as np
import pandas as pd
import os
for dirname, _, filenames in os.walk('/kaggle/input'):
for filename in filenames:
print(os.path.join(dirname, filename))
train = pd.read_csv("/kaggle/input/30-days-of-ml/train.csv")
test = pd.read_csv("/kaggle/input/30-days-of-ml/test.csv")
sample_submi... | github_jupyter |
```
# HIDDEN
import matplotlib
#matplotlib.use('Agg')
path_data = '../../../data/'
from datascience import *
%matplotlib inline
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import math
import scipy.stats as stats
plt.style.use('fivethirtyeight')
# HIDDEN
def standard_units... | github_jupyter |
```
%matplotlib inline
```
GroupLasso for linear regression with dummy variables
=====================================================
A sample script for group lasso with dummy variables
Setup
-----
```
import matplotlib.pyplot as plt
import numpy as np
from sklearn.linear_model import Ridge
from sklearn.metrics ... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
%matplotlib inline
import sys
import shutil
sys.path.append('../code/')
sys.path.append('../python/')
from pprint import pprint
from os import path
import scipy
import os
from matplotlib import pyplot as plt
from tqdm import tqdm
from argparse import Namespace
import pickle
impor... | github_jupyter |
## Pandas
### Instructions
This assignment will be done completely inside this Jupyter notebook with answers placed in the cell provided.
All python imports that are needed shown.
Follow all the instructions in this notebook to complete these tasks.
Make sure the CSV data files is in the same folder as this no... | github_jupyter |
<table>
<tr>
<td>
<center>
<font size="+1">If you haven't used BigQuery datasets on Kaggle previously, check out the <a href = "https://www.kaggle.com/rtatman/sql-scavenger-hunt-handbook/">Scavenger Hunt Handbook</a> kernel to get started.</font>
</center>
</td>
</tr>
</t... | github_jupyter |
# Trim a Binary Search Tree - SOLUTION
## Problem Statement
Given the root of a binary search tree and 2 numbers min and max, trim the tree such that all the numbers in the new tree are between min and max (inclusive). The resulting tree should still be a valid binary search tree. So, if we get this tree as input:
__... | github_jupyter |
# Pair-wise Correlations
The purpose is to identify predictor variables strongly correlated with the sales price and with each other to get an idea of what variables could be good predictors and potential issues with collinearity.
Furthermore, Box-Cox transformations and linear combinations of variables are added whe... | github_jupyter |
```
import os
import tarfile
from six.moves import urllib
DOWNLOAD_ROOT = 'https://raw.githubusercontent.com/ageron/handson-ml/master/'
HOUSING_PATH = 'datasets/housing'
HOUSING_URL = DOWNLOAD_ROOT + HOUSING_PATH + '/housing.tgz'
def fetch_housing_data(housing_url=HOUSING_URL, housing_path=HOUSING_PATH):
if not o... | github_jupyter |
# This notebook shows an example where a set of electrodes are selected from a dataset and then LFP is extracted from those electrodes and then written to a new NWB file
```
import pynwb
import os
#DataJoint and DataJoint schema
import datajoint as dj
## We also import a bunch of tables so that we can call them easi... | github_jupyter |
# Train a model using Watson Studio and deploy it in Watson Machine Learning
This notebook will show how to use your annotated images from Cloud Annotations to train an Object Detection model using a Python Notebook in Watson Studio. After training and testing, some extra steps will show how to deploy this model in Wa... | 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 |
### Heroes Of Pymoli Data Analysis
* Of the 1163 active players, the vast majority are male (84%). There also exists, a smaller, but notable proportion of female players (14%).
* Our peak age demographic falls between 20-24 (44.8%) with secondary groups falling between 15-19 (18.60%) and 25-29 (13.4%).
-----
### No... | 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 |
# Introduction to TensorFlow v2 : Basics
### Importing and printing the versions
```
import tensorflow as tf
print("TensorFlow version: {}".format(tf.__version__))
print("Eager execution is: {}".format(tf.executing_eagerly()))
print("Keras version: {}".format(tf.keras.__version__))
```
### TensorFlow Variables
[Te... | github_jupyter |
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
```
# Package overview
pandas is a [Python](https://www.python.org) package providing fast,
flexible, and expressive data structures designed to make working with
“relational” or “labeled” data both easy and intuitive. It aims to be the
fundam... | github_jupyter |
# Regularization
Welcome to the second assignment of this week. Deep Learning models have so much flexibility and capacity that **overfitting can be a serious problem**, if the training dataset is not big enough. Sure it does well on the training set, but the learned network **doesn't generalize to new examples** that... | github_jupyter |
```
%reload_ext autoreload
%autoreload 2
import sys
import os
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname("__file__"), os.path.pardir))
sys.path.append(BASE_DIR)
import cv2
import time
import numpy as np
import matplotlib.pyplot as plt
import imgaug as ia
import imgaug.augmenters as iaa
import tensorflow as... | github_jupyter |
<a href="https://colab.research.google.com/github/MidasXIV/Artificial-Intelliegence--Deep-Learning--Tensor-Flow/blob/master/Codelabs/1.Hello_ML_World.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# The Hello World of Deep Learning with Neural Netw... | github_jupyter |
```
import sys
import os
module_path = os.path.abspath(os.path.join('..'))
if module_path not in sys.path:
sys.path.append(module_path + "/src")
from simulation import BaseSimulation
from individual_interaction_population import IndividualInteractionPopulation
from base_test_protocol import ContactTraceProtocol, Q... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.