text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
# "LFFD Paper review"
> "Analyzing LFFD architecture, a one-stage object detection pipeline to detect faces"
- toc: true
- branch: master
- badges: true
- comments: true
- categories: [deep_learning, resnet]
- image: https://images.unsplash.com/photo-1499781350541-7783f6c6a0c8?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&c... | github_jupyter |
# ํ๋ฅ ๋ณ์/๋ถํฌ๊ฐ์ ๊ด๋ จ์ฑ ์ดํดํ๊ธฐ
1. ํน์ ํ๋ฅ ๋ณ์/๋ถํฌ๋ค ์ฌ์ด์ ์กด์ฌํ๋ ์ ์ฌ์ฑ์ ํ์ธํ๋ ์ฝ๋๋ฅผ ์์ฑํ๋ค.
1. Binomial๊ณผ Poisson์ ์ ์ฌ์ฑ
1. Gamma ๋ถํฌ์ ํน์ํ์ธ Exponential
1. Gaussian๊ณผ Student's T
---
## A0. ์ฌ๋ฌ ๊ทธ๋ํ๋ฅผ ํจ๊ป ๊ทธ๋ฆฌ๊ธฐ
๋ ํ๋ฅ ๋ณ์/๋ถํฌ ์ฌ์ด์ ์ ์ฌ์ฑ/๊ด๋ จ์ฑ์ PMF/PDF ๊ทธ๋ํ์ ๋น๊ต๋ฅผ ํตํด ํ์ธํ๋ คํ๋ค. ์ด๋ฅผ ์ํด์๋ ์ฌ๋ฌ ๊ฐ์ ๊ทธ๋ํ๋ฅผ ํจ๊ป ํํํ๋ ๊ฒ์ด ํ์ํ๋ค. ๊ทธ๋ํ๋ฅผ ๊ทธ๋ฆด ๋ ์ฌ์ฉํ๊ณ ์๋ Matplotlib Library์ Tutorial์ ์ฐธ๊ณ ํ๊ธฐ ๋ฐ๋๋ค. ... | github_jupyter |

---
# Task 5 - Convolution
This notebook will ask you to first implement convolution functions from scratch in numpy. Then later try it to perform simple image processing.
In this exercise, you will build every step of the convolution process.
To understand the st... | github_jupyter |
```
%matplotlib inline
```
์ฌํ ๊ณผ์ : Bi-LSTM CRF์ ๋์ ๊ฒฐ์
======================================================
๋์ , ์ ์ ๋ฅ ๋ฌ๋ ํดํท(toolkits) ๋น๊ต
--------------------------------------------
Pytorch๋ *๋์ * ์ ๊ฒฝ๋ง ํดํท์
๋๋ค. ๋ค๋ฅธ ๋์ ์ ๊ฒฝ๋ง ํดํท์ผ๋ก๋
`Dynet <https://github.com/clab/dynet>`_ ์ด ์์ต๋๋ค.(์ด ํดํท์
์๋ก ๋ ์ด์ ๋ ์ฌ์ฉํ๋ ๋ฒ์ด Pytorch์ ๋น์ทํ๊ธฐ ๋๋ฌธ์
๋๋ค. ... | github_jupyter |
##### Copyright 2020 Google LLC.
```
#@title Licensed under the Apache License, Version 2.0 (the "License");
# 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... | github_jupyter |
<a href="https://colab.research.google.com/github/chel310/Trash_classifier/blob/main/trash_classifier_MobileNetV2.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
Lets clone our repository initially
```
!git clone https://github.com/chel310/Trash_... | github_jupyter |
# Day 10: Raster
Keeping it simple today and going to visualize some data from a familiar dataset, WorldPop
There are a variety of data sources I will use throughout these exercises, including:
* [Explorer Basemap](https://visibleearth.nasa.gov/images/147190/explorer-base-map): Joshua Stevens, NASA Earth Observatory
... | github_jupyter |
# Disciplina - DQF10648 Eletromagnetismo I
## Aula em 08/07/2021 - Semestre 2021/1 EARTE
### [DQF - CCENS](http://alegre.ufes.br/ccens/departamento-de-quimica-e-fisica) - [UFES/Alegre](http://alegre.ufes.br/)
# Mudanรงas nas Atividades
- retirados 2 de 3 trabalhos computacionais em grupo, ficando sรณ o de mรฉtodo de sep... | github_jupyter |
# Exp 177 analysis
See `./informercial/Makefile` for experimental
details.
```
import os
import numpy as np
from IPython.display import Image
import matplotlib
import matplotlib.pyplot as plt
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
import seaborn as sns
sns.set_style('ticks')
matplotlib.... | github_jupyter |
# Surface Temperature Change decomposition routine
Written by Inne Vanderkelen (Aug 2020), based on script from Thiery et al., 2017. https://github.com/VUB-HYDR/2017_Thiery_etal_JGR/blob/master/mf_STCdecomp.m
## 1. Settings
### 1.1 Import the necessary python libraries
```
from __future__ import print_function
impor... | github_jupyter |
<a href="https://colab.research.google.com/github/martin-fabbri/colab-notebooks/blob/master/deeplearning.ai/nlp/c4_w1_tf_nmt_with_attention.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
##### Copyright 2019 The TensorFlow Authors.
```
#@title Lic... | github_jupyter |
```
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split, GridSearchCV
from matplotlib import pyplot as plt
import seaborn as sns
from sklearn.preprocessing import StandardScaler, MinMaxScaler
from sklearn.linear_model import Ridge, Lasso, ElasticNet, LinearRegression
from sklea... | github_jupyter |
# Python ใงๆฐ่ปฝใซๅๅญฆใปๅๅญฆๅทฅๅญฆ
# ็ฌฌ 6 ็ซ ใใผใฟใปใใใฎ่ฆใใๅ (ๅฏ่ฆๅ) ใใใ
## 6.1 ไธปๆๅๅๆ (Principal Component Analysis, PCA)
## Jupyter Notebook ใฎๆ็จใชใทใงใผใใซใใใฎใพใจใ
- <kbd>Esc</kbd>: ใณใใณใใขใผใใซ็งป่ก๏ผใปใซใฎๆ ใ้๏ผ
- <kbd>Enter</kbd>: ็ทจ้ใขใผใใซ็งป่ก๏ผใปใซใฎๆ ใ็ท๏ผ
- ใณใใณใใขใผใใง <kbd>M</kbd>: Markdown ใปใซ (่ชฌๆใปใกใขใๆธใ็จ) ใซๅคๆด
- ใณใใณใใขใผใใง <kbd>Y</kbd>: Code ใปใซ (Python ใณใผใใๆธใ็จ) ใซๅคๆด
- ... | github_jupyter |
# GMM ็ฎๆณ
> GMMไป้ถๅผๅงๅฎ็ฐ
>
> ๆจกๆไธคไธชๆญฃๆๅๅธ็ๅๆฐ
```
from numpy import *
import numpy as np
import random
import copy
import matplotlib.pyplot as plt
```
ๅๅผไธๅๆ ทๆฌ
```
def generate_data():
mu1 = 2
mu2 = 6
sigma1 = 0.1
sigma2 = 0.5
alpha1 = 0.4
alpha2 = 0.6
N = 5000
N1 = int(alpha1 * N)
X = mat(z... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
from utils import load_dataset
%matplotlib inline
# Loading the data (cat/non-cat)
train_set_x_orig, train_set_y, test_set_x_orig, test_set_y, classes = load_dataset()
# Example of a picture
index = 27
plt.imshow(train_set_x_orig[index])
print ("y = " + str(train_... | github_jupyter |
```
import os, sys, gc
import time
import glob
import pickle
import copy
import json
import random
from collections import OrderedDict, namedtuple
import multiprocessing
import threading
import traceback
from typing import Tuple, List
import h5py
from tqdm import tqdm, tqdm_notebook
import numpy as np
import pandas ... | github_jupyter |
# Vectors in Python
In the following exercises, you will work on coding vectors in Python.
Assume that you have a state vector
$$\mathbf{x_0}$$
representing the x position, y position, velocity in the x direction, and velocity in the y direction of a car that is driving in front of your vehicle. You are tracking th... | github_jupyter |
## 1. Import libraries
```
# import libraries
import numpy as np
import pandas as pd
import scipy
import math
from datetime import datetime
import datetime as dt
import matplotlib.pyplot as plt
from statsmodels.tsa.stattools import pacf
from math import sqrt
from statsmodels.tsa.arima_model import ARIMA
from s... | github_jupyter |
```
%cd ..
```
# train on single-step retrosynthesis
for saving the model to ```./data/model/``` add ```--save_model True```
for further details call ```python -m mhnreact.train -h```
## mhn model
```
!python -m mhnreact.train --model_type=mhn --device=best --fp_size=4096 --fp_type morgan --template_fp_type rdk --... | github_jupyter |
#็ปไน ไธ๏ผๅ็จๅบ๏ผๅฏ็ฑ้ฎ็่ฏปๅ
ฅ็จๆทๅงๅไพๅฆMr. right๏ผ่ฎฉ็จๆท่พๅ
ฅๅบ็็ๆไปฝไธๆฅๆ๏ผๅคๆญ็จๆทๆๅบง๏ผๅ่ฎพ็จๆทๆฏ้็ๅบง๏ผๅ่พๅบ๏ผMr. right๏ผไฝ ๆฏ้ๅธธๆๆงๆ ผ็้็ๅบง๏ผใ
```
name = input('่ฏท่พๅ
ฅๆจ็ๅๅญ')
print("ๆจๅฅฝ๏ผ, name")
birthday = float(input('่ฏท่พๅ
ฅๆจ็็ๆฅ๏ผๆ ผๅผ:ๆไปฝ.ๆฅๆ'))
if birthday >= 1.20 and birthday <= 2.18:
print(name, 'ไฝ ๆฏ้ๅธธๆไธชๆง็ๆฐด็ถๅบง')
elif birthday >= 2.19 and birthday <= 3.20:
... | github_jupyter |
```
%matplotlib widget
import numpy as np
import matplotlib.pyplot as plt
import pydae.ssa as ssa
import scipy.signal as sctrl
from vsc_lcl import vsc_lcl_class
```
## Instantiate system
```
syst = vsc_lcl_class()
syst.Dt = 5e-6
syst.decimation = 1
syst.N_store = 100_000
syst.update()
```
## CTRL1 in state feedback
... | github_jupyter |
## Having learned the fundamentals of working with DataFrames, you will now move on to more advanced indexing techniques. You will learn about MultiIndexes, or hierarchical indexes, and learn how to interact with and extract data from them.
## Changing index of a DataFrame
As you saw in the previous exercise, indexes ... | github_jupyter |
This notebook shows how to use the `check_conversion` function to verify successful conversion to ONNX. This function wraps the `check_model` and `create_input` modules found in the source code of OLive (ONNX Go Live) service. https://github.com/microsoft/OLive
We will demonstrate step-by-step how to use the model tra... | github_jupyter |
# 1A.algo - Casser le code de Vigenรจre
La lettre la plus frรฉquente en franรงais est la lettre E. Cette information permet de casser le code de Cรฉsar en calculant le dรฉcalage entre la lettre la plus frรฉquente du message codรฉ et E. Mais cette mรชme mรฉthode ne marchera pas pour casser le [code de Vigenรจre](http://fr.wikipe... | github_jupyter |
```
import tensorflow as tf
print(tf.__version__)
# Computing gradients using epsilon
def f(w1, w2):
return 3 * w1 ** 2 + 2 * w1 * w2
w1, w2 = 5, 3
eps = 1e-6
print("partial derivative wrt w1, [(w1, w2) = (5, 3)]: ", (f(w1 + eps, w2) - f(w1, w2)) / eps)
print("partial derivative wrt w2, [(w1, w2) = (5, 3)]: ", (f(... | github_jupyter |
# CNTK 202: Language Understanding with Recurrent Networks
This tutorial shows how to implement a recurrent network to process text,
for the [Air Travel Information Services](https://catalog.ldc.upenn.edu/LDC95S26)
(ATIS) task of slot tagging (tag individual words to their respective classes,
where the classes are p... | github_jupyter |
```
import numpy as np
import pandas as pd
import os
import matplotlib.pyplot as plt
import seaborn as sns
import tensorflow as tf
import keras
from keras.preprocessing import image
from keras.models import Sequential
from keras.layers import Conv2D, MaxPool2D, Flatten,Dense,Dropout,BatchNormalization
from tensorflow... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
data = pd.read_csv("./Section 6 - Polynomial Regression/Position_Salaries.csv");
x = data.iloc[:,1:2].values
y = data.iloc[:,2].values
x
"""no tiene mucho sentido dividir un conjunto de datos muy pequeรฑo
porque todos los datos son importan... | github_jupyter |
```
# General libraries
import os
import numpy as np
import pandas as pd
import random
import cv2
import matplotlib.pyplot as plt
%matplotlib inline
# Deep learning libraries
import keras.backend as K
from keras.models import Model, Sequential
from keras.layers import Input, Dense, Flatten, Dropout, BatchNormalizatio... | github_jupyter |
# Introduction
Machine learning competitions are a great way to improve your data science skills and measure your progress.
In this exercise, you will create and submit predictions for a Kaggle competition. You can then improve your model (e.g. by adding features) to improve and see how you stack up to others taking ... | github_jupyter |
# Introduction to TrainConfig
### Context
> Warning: This is still experimental and may change during June / July 2019
We introduce here the TrainConfig abstraction, a serializible wrapper to the usual setup used to run federated training: a model, a loss function, an optimizer type and training hyper parameters (b... | github_jupyter |
### Stacking
In stacking initially, you train multiple base models of different type on training/test dataset. It is ideal to mix models that work differently (kNN, bagging, boosting etc) so that it can learn some part of the problem. At level one, use the predicted values from base models as features and train a mode... | github_jupyter |
```
import pandas as pd
import numpy as np
from sklearn import manifold
from sklearn.metrics import pairwise_distances
import matplotlib.pyplot as plt
```
elec = electricity consumption per capita
energy = energy consumption
forest = % of forest cover
urban = % urban population
pop = % population growth
co2 = co2 em... | github_jupyter |
# Road Following - ResNet18ใTensorRTใซๅคๆ
ๅญฆ็ฟใใPytorchใขใใซใTensorRTใงๆ้ฉๅใใพใใ
``02_train_model_JP.ipynb``ใใผใใใใฏใฎๆ็คบใซๅพใฃใฆใใใงใซ``best_steering_model_xy.pth``ใไฝๆใใฆใใใใจใๆณๅฎใใพใใ
## ๅญฆ็ฟๆธใฟใขใใซใฎ่ชญใฟ่พผใฟ
ๆๅใซtorchvisionใงๆไพใใใฆใใๆชๅญฆ็ฟใฎResNet18ใขใใซใ่ชญใฟ่พผใฟใพใใ(่ชๅๅญฆ็ฟใใๅคใงใขใใซใๅๆๅใใใใใImageNetใงๅญฆ็ฟๆธใฟใฎใขใใซใงใใๅฟ
่ฆใใใใพใใใ)
ๆฌกใซใResNet18ใขใใซๆง้ ใฎๅ
จ็ตๅๅฑค(fully connected ... | github_jupyter |
Libraries & Parameters
```
!pip install -q awswrangler
import awswrangler as wr
import pandas as pd
import boto3
import pytz
import numpy as np
!pip install -U -q seaborn
import seaborn as sns
import matplotlib.pyplot as plt
import datetime
from sagemaker import get_execution_role
# Get Sagemaker Role
role = get_e... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
import os
import sys
module_path = os.path.abspath(os.path.join('..'))
if module_path not in sys.path:
sys.path.append(module_path)
from test_functions import problem_setup
from sim_helpers import (
gen_initial_real_data,
fit_outcome_model,
gen_random_candidates,... | github_jupyter |
# TSG024 - Namenode is in safe mode
HDFS can get itself into Safe mode. For example if too many Pods are
re-cycled too quickly in the Storage Pool then Safe mode may be
automatically enabled.
When starting a spark session, the user may see (for example, when
trying to start a PySpark or PySpark3 session in a notebook... | github_jupyter |
```
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
```
# Step 0 and 1
Import Data (only FD001)
```
# step 1: read the dataset
columns = ['unitid', 'time', 'set_1','set_2','set_3']
columns.extend(['sensor_' + str(i) for i in range(1,22)])
df = pd.read_csv('./data/train_FD001.txt', delim_whitesp... | github_jupyter |
```
%matplotlib inline
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import random
import os
import json
import scipy
import scipy.stats
# Detectron colors
_COLORS = np.array([
0.000, 0.447, 0.741,
0.850, 0.325, 0.098,
0.929, 0.694, 0.125,
0.494, 0.184, 0.556,
0.466, 0.674, ... | github_jupyter |
## Imports
```
from stabilizer.llrd import get_optimizer_parameters_with_llrd
from stabilizer.reinitialize import reinit_autoencoder_model
from stabilizer.trainer import train_step,evaluate_step
from sklearn.model_selection import train_test_split
from transformers import AutoModel,AutoTokenizer
from stabilizer.datase... | github_jupyter |
```
import numpy as np
import xarray as xr
import dask
import intake
import gcsfs
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
def get_dictionary():
"""
Function to get the dictionary of models and ensemble members of the historical runs
that have all of siconc, so, and thetao
Return... | github_jupyter |
<a href="https://colab.research.google.com/github/pliniodester/project_euler/blob/main/008.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
### **Problem 8 - Largest product in a series**
The four adjacent digits in the 1000-digit number that have t... | github_jupyter |
# Batch Normalization
Batch normalization was introduced in Sergey Ioffe's and Christian Szegedy's 2015 paper [Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift](https://arxiv.org/pdf/1502.03167.pdf). The idea is that, instead of just normalizing the inputs to the network, w... | github_jupyter |
```
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.colors as colors
%matplotlib inline
import numpy as np
from numpy import linalg as LA
from numpy.linalg import inv, lstsq
from sklearn.linear_model import Ridge, RidgeCV, ElasticNet, LassoCV, LassoLarsCV, LogisticRegression
f... | github_jupyter |
# Convolutional Neural Networks: Application
Welcome to Course 4's second assignment! In this notebook, you will:
- Implement helper functions that you will use when implementing a TensorFlow model
- Implement a fully functioning ConvNet using TensorFlow
**After this assignment you will be able to:**
- Build and t... | github_jupyter |
```
#comparing relaxed, not relaxed, repack input True and repack input False
#using Pool to speed things up to be less awful
#adapting the multiprocessing supported pyrosetta scripts to run single mutation scan across all of a protein
import logging
logging.basicConfig(level=logging.INFO)
import pandas
import seab... | github_jupyter |
# Sweeps - Capacitance matrix
### Prerequisite
You need to have a working local installation of Ansys
## 1. Perform the necessary imports and create a QDesign in Metal first.
```
%load_ext autoreload
%autoreload 2
import qiskit_metal as metal
from qiskit_metal import designs, draw
from qiskit_metal import MetalGUI, ... | github_jupyter |
# Investigating different sources of error
- This notebook investigates the different sources of error in age inference. Besides the "bimodality" that we discuss at length in the manuscript, we also looked at whether protein length, number of domains, and evolutionary rate correlated with node error, our main error st... | github_jupyter |
# Linear Regression
__~ Anish Sachdeva__
$ x_1 x_2 x_3 .. x_m $ --> $y_1 y_2 y_3 ... y_m$
x --> y
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
X = pd.read_csv("Linear_X_Train.csv").values
Y = pd.read_csv("Linear_Y_Train.csv").values
plt.figure(figsize=(10, 7))
plt.scatter(X, Y)
plt.sh... | github_jupyter |
# 20NG (Twenty Newsgroups). GenSim vs TopicNet
In this notebook we are going to train two topic models: one using TopicNet, and another one โ using [GenSim](https://radimrehurek.com/gensim/).
So, we will be able to compare quality of the models, as well as the simplicity of each model's training process.
# Contents<a... | github_jupyter |
```
import pandas as pd
df = pd.read_csv('/content/Restaurant reviews.csv')
df.drop(['Restaurant','Reviewer','Metadata','Time','Pictures'],inplace=True,axis=1)
df.head()
df.info()
df.dropna(inplace=True)
df=df[df.Rating!='Like']
df.reset_index(inplace=True,drop=True)
df.head()
df.info()
def fun(x):
x=float(x)
if(x<... | github_jupyter |
```
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
```
# Step 3. Assemble DataFrame
This notebook demonstrates how harmonic features and ancillary features (like weather) are merged to produce a complete dataframe, which is then used to train a random forest in Goo... | github_jupyter |
# Session 8: the Kernel trick in Logistic Regression
------------------------------------------------------
Introduction to Data Science & Machine Learning
*Pablo M. Olmos olmos@tsc.uc3m.es*
------------------------------------------------------
Just as we did for linear regression, we can optimize a Kernel Logist... | github_jupyter |
## Topic Modelling using Latent Semantic Analysis (LSA) and Latent Dirichlet Allocation (LDA) in sklearn
### **There also exists implementation using the Gensim libray. Checkout the same [here](https://www.analyticsvidhya.com/blog/2016/08/beginners-guide-to-topic-modeling-in-python/) , [here](https://nlpforhackers.... | github_jupyter |
# Ray Serve - Model Serving Challenges
ยฉ 2019-2021, Anyscale. All Rights Reserved

Now we'll explore a nontrivial example for Ray Serve.
We'll work through an example that also covers training a model, deploying it, then updating later, based on this [documentat... | github_jupyter |
# Summary statistics standardization and export
This pipeline module contains codes to process summary statistics from conventional QTL association scan to standard formats for public distribution. It will also export multiple QTL studies to formats easily accessible for data integration methods to query and analyze t... | github_jupyter |
# Task 2-1
## Reconstruct Rydberg wave function from projective measurement results
- Train RBMs by changing number of hidden nodes: $n_h$.
- See if any convergence regarding energy is shown.
- The original task requires us to achieve criteria of energy diferecene $< 0.0001$, eventually we found that the criteria is ... | github_jupyter |
<a href="https://colab.research.google.com/github/partha1189/machine_learning/blob/master/PredictSyntheticTimeSeries.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
import tensorflow as tf
print(tf.__version__)
import numpy as np
import matplotl... | github_jupyter |
#Cognitive XAI IMDb Example
Denis Rothman, copyright 2020, MIT License
```
#@title SHAP installation
try:
import shap
except:
print("Installing shap")
!pip install shap
#@title Import modules
import sklearn
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.model_selection import train_tes... | github_jupyter |
# 4. Training sampler
JAXMAPP provides some useful features for training sampler models from MAPP demonstrations.
## Overview
- `scripts/create_training_data.py` creates a collection of MAPP problem instances and their solutions using random sampler.
- `scripts/create_tfrecords.py` converts the data collection creat... | github_jupyter |
# Trying out features
**Learning Objectives:**
* Improve the accuracy of a model by adding new features with the appropriate representation
The data is based on 1990 census data from California. This data is at the city block level, so these features reflect the total number of rooms in that block, or the total num... | github_jupyter |
```
import open3d as o3d
import numpy as np
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 "CI" in os.environ
```
# File ... | github_jupyter |
```
import pandas as pd
import numpy as np
lane_width = 3.7
ego_width = 1.905
tolerance = 1.05*(0.5*lane_width - 0.5*ego_width)
original_excel_file = 'segment-183829460855609442_430_000_450_000_with_camera_labels.xlsx'
DataFrame = pd.read_excel ('ExcelFiles/' + original_excel_file)
ind = DataFrame.loc[(DataFrame['ob... | github_jupyter |

# terrainbento model Basic model with real DEM
This model shows example usage of the [Basic](../coupled_process_elements/model_basic_steady_solution.ipynb) model from the TerrainBento package. However, this time we will download and use an SRTM DEM as the ... | github_jupyter |
# 03 Clean and scrape data
Merge, integrate and clean the data from actor and actress.
```
# Data manipulation
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from time import gmtime, strftime
import ast
%matplotlib inline
#import pandas as pd
df_actress = pd.read_csv('ex... | github_jupyter |
<small><small><i>
All the IPython Notebooks in this lecture series by Dr. Milan Parmar are available @ **[GitHub](https://github.com/milaan9/10_Python_Pandas_Module/tree/main/001_Python_Pandas_Methods)**
</i></small></small>
# Drop columns in pandas DataFrame
Datasets could be in any shape and form. To optimize the d... | github_jupyter |
Hi! This is a tensorflow binary classification example built with inspiration from https://blog.cmgresearch.com/2020/09/06/tensorflow-binary-classification.html
The link contains additional explanitory text and short 5-minute youtube video explaining core concepts.
```
### TENSORFLOW CLASSIFICATION EXAMPLE
#
# Auth... | github_jupyter |
# Unity ML Agents
## Proximal Policy Optimization (PPO)
Contains an implementation of PPO as described [here](https://arxiv.org/abs/1707.06347).
```
import numpy as np
import os
import tensorflow as tf
from ppo.history import *
from ppo.models import *
from ppo.trainer import Trainer
from unityagents import *
```
##... | github_jupyter |
# Create a Feature Store, use SageMaker Data wrangler for feature engineering and SageMaker Processing Job for Data Ingestion
---
#### Note: Please set kernel to Python 3 (Data Science) and select instance to ml.t3.medium
<div class="alert alert-info"> ๐ก <strong> Quick Start </strong>
To save your processed data to... | github_jupyter |
# Exploring ConWhAt Atlases
There are four different atlas types in ConWhat, corresponding to the 2 ontology types (Tract-based / Connectivity-Based) and 2 representation types (Volumetric / Streamlinetric).
(More on this schema [here](http://conwhat.readthedocs.io/en/latest/about_conwhat/ontology_and_representation... | github_jupyter |
# Flopy MODFLOW Boundary Conditions
Flopy has a new way to enter boundary conditions for some MODFLOW packages. These changes are substantial. Boundary conditions can now be entered as a list of boundaries, as a numpy recarray, or as a dictionary. These different styles are described in this notebook.
Flopy also n... | github_jupyter |
# Demo calculation of parallax and proper motion offset for a nearby star, making use of the Astropy libraries
```
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import astropy.units as u
import astropy.constants as c
import astropy.time
import astroquery.simbad # To install astroquery: $ conda... | github_jupyter |
# Detect Model Bias with Amazon SageMaker Clarify
## Amazon Science: _[How Clarify helps machine learning developers detect unintended bias](https://www.amazon.science/latest-news/how-clarify-helps-machine-learning-developers-detect-unintended-bias)_
[<img src="img/amazon_science_clarify.png" width="100%" align="l... | github_jupyter |
# A Simple Example on Creating a Custom Refutation Using User-Defined Outcome Functions
In this experiment, we define a linear dataset. In order to find the coefficients, we make use of the linear regression estimator. In order to test the effectiveness of the linear estimator, we now replace the outcome value with a d... | github_jupyter |
```
import matplotlib.pyplot as plt
%matplotlib inline
import numpy as np
from qiskit import IBMQ, BasicAer
from qiskit.providers.ibmq import least_busy
from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister, execute
from qiskit.quantum_info import Statevector
from qiskit.visualization import plot_state... | github_jupyter |
# Datensets explorieren
**Inhalt:** Erste Schritte mit Pandas
**Nรถtige Skills:** Keine
**Lernziele:**
- Datensets herunterladen, Datensets รถffnen
- Umfang der Daten, Felder und groben Inhalt erkennen
- Einfache deskriptive Statistiken
- Plotting Level 0
# Das Beispiel
Eine Datenbank zu den verhรคngten Todesstrafen ... | github_jupyter |
## Visual Comparison Between Different Classification Methods in Shogun
Notebook by Youssef Emad El-Din (Github ID: <a href="https://github.com/youssef-emad/">youssef-emad</a>)
This notebook demonstrates different classification methods in Shogun. The point is to compare and visualize the decision boundaries of diffe... | github_jupyter |
```
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from autograd.numpy import log, sqrt, sin, cos, exp, pi, prod
from autograd.numpy.random import normal, uniform
import os
from scipy import stats
from google.colab import drive
drive.mount('/content/drive')
path = "/conten... | github_jupyter |
# This is a Demo of IDioM applied to Alanine dipeptide (Ala2).
This can also be used to reproduce the relevant results in the paper "Learning Clustered Representatio n for Complex Free Energy Landscapes" by Zhang et al.
First import basic libraries:
```
from __future__ import division, print_function, absolute_import... | github_jupyter |
# Tabular Experiments -- Discretisation and Binarisation Purity #
The experiments are executed by selecting one of the data sets via uncommenting
its name in one of the notebook cells below.
```
! mkdir -p _figures
import matplotlib
import matplotlib.pyplot as plt
matplotlib.rc('text', usetex=True)
plt.style.use('s... | github_jupyter |
<a href="https://colab.research.google.com/github/neilgautam/APRIORI-ASSOCIATION_RULE_LEARNING-/blob/master/APRIORI.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os
... | github_jupyter |
# An Introduction to Python
[back to main page](index.ipynb)
[Python](http://www.python.org/) is a general-purpose programming language.
It is an *interpreted* language, i.e. source code is not compiled into an executable file but it is directly executed by an *interpreter*.
A file containing Python code can be execu... | github_jupyter |
## Training metrics
*Metrics* for training fastai models are simply functions that take `input` and `target` tensors, and return some metric of interest for training. You can write your own metrics by defining a function of that type, and passing it to [`Learner`](/basic_train.html#Learner) in the [`metrics`](/metrics... | github_jupyter |
## Assignment 2 :Segmenting and Clustering Neighborhoods in Toronto
```
# Import necessary libraries
import requests
import lxml.html as lh
import pandas as pd
url='https://en.wikipedia.org/wiki/List_of_postal_codes_of_Canada:_M'
#Create a handle, page, to handle the contents of the website
page = requests.get(url)
... | github_jupyter |
```
import torch
import numpy
import torch
import torch.nn as nn
import torch.nn.functional as F
from tqdm import tqdm
import os
import matplotlib.pyplot as plt
import sys
sys.path.insert(0,'/home/gsoc0/Adversarial_CapsNet_Pytorch/')
from model.net import *
from utils.training import *
from data.data import *
```
## ... | github_jupyter |
## Word embedding
ไฝฟ็จskip-gramๆจกๅ่ฎญ็ป่ฏๅ้
```
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils import data
from collections import Counter
import numpy as np
import random
import pandas as pd
import scipy
import sklearn
from sklearn.metrics.pairwise import cosine_similarity
import os
... | github_jupyter |
```
import numpy as np
import pandas as pd
ratings = pd.read_csv('data/ratings.csv')
ratings.head()
len(ratings)
```
## Cross-tab
Do a small cross-tab based on the users and movies with more ratings
```
user_groups = ratings.groupby('userId')['rating'].count()
top_users = user_groups.sort_values(ascending=False)[:15... | github_jupyter |
# Problem Set 4: Neural Networks
This assignment requires a working IPython Notebook installation, which you should already have. If not, please refer to the instructions in Problem Set 2.
The programming part is adapted from [Stanford CS231n](http://cs231n.stanford.edu/).
Total: 100 points.
## [30pts] Problem 1: B... | github_jupyter |
# Colun or semicolun ?
In this notebook, you are going to implement a logistic regression algrorithm.
- 1st, you'll build a dataset
- 2nd, you'll you are going do define a model
- 3rd, a backpropagation method
- 4th, a gradient descent method
---
### Dataset
We build a dataset to illustrate our purpose.
The dataset... | github_jupyter |
<small><small><i>
All the IPython Notebooks in this lecture series by Dr. Milan Parmar are available @ **[GitHub](https://github.com/milaan9/10_Python_Pandas_Module/tree/main/001_Python_Pandas_Methods)**
</i></small></small>
# Create Pandas DataFrame from Python List
In this class, you will learn how to convert Pytho... | github_jupyter |
```
"""
You can run either this notebook locally (if you have all the dependencies and a GPU) or on Google Colab.
Instructions for setting up Colab are as follows:
1. Open a new Python 3 notebook.
2. Import this notebook from GitHub (File -> Upload Notebook -> "GITHUB" tab -> copy/paste GitHub URL)
3. Connect to an in... | github_jupyter |
# Visualizing Loans Awarded by Kiva
In this project you'll visualize insights using a dataset from <a href = "https://www.kaggle.com/fkosmowski/kivadhsv1" target = "_blank">Kaggle</a>. The dataset contains information about loans awarded by the non-profit <a href = "https://www.kiva.org/" target = "_blank">Kiva</a>.
... | github_jupyter |
```
/*
Created by Indra Mahkota
*/
%use @gson.json
%use krangl
%use coroutines
%use @retrofit.json
%use @retrofit_gson_converter.json
%use @org_json.json
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow... | github_jupyter |
```
import numpy as np
import tensorflow as tf
from sklearn.utils import shuffle
import re
import time
import collections
import os
def build_dataset(words, n_words, atleast=1):
count = [['GO', 0], ['PAD', 1], ['EOS', 2], ['UNK', 3]]
counter = collections.Counter(words).most_common(n_words)
counter = [i for... | github_jupyter |
```
class Wanted:
from selenium import webdriver
from fake_useragent import UserAgent
import time
def __init__(self, headless=True):
options = webdriver.ChromeOptions()
options.add_argument("user-agent={}".format(UserAgent().chrome))
if headless:
options.add... | github_jupyter |
<a href="https://colab.research.google.com/github/adasegroup/ML2022_seminars/blob/master/seminar3/seminar03-solution.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Measure quality of a classification model
This notebook explains how to measure q... | github_jupyter |
# Examples for QuantumAlgebra.jl
```
using QuantumAlgebra
# convience function to show both the original and normal_form version of an expression
dispnormal(x) = display("text/latex","\$ $(latex(x)) \\quad\\to\\quad $(latex(normal_form(x))) \$");
```
## Parameters
Create parameters with `param(:name,state,indices...)... | github_jupyter |
# La clase DataSet
Si queremos empezar a entrenar algoritmos lo primero que necesitamos son datos. La mayorรญa de las veces tendremos los datos guardados en archivos externos en diferentes formatos. Como inversiรณn para el futuro vamos a crear una forma fรกcil de cargar y manipular datos para que posteriormente los algor... | github_jupyter |
### <font color = "red">Visualization Examples</font>
Load the **iris** dataset from the following url:
https://raw.githubusercontent.com/uiuc-cse/data-fa14/gh-pages/data/iris.csv
Plot the `petal_length` versus `sepal_length` separate by species.
```
import numpy as np
import pandas as pd
# load data from url
d... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
%matplotlib inline
from __future__ import print_function
import numpy as np
import tempfile
import tensorflow as tf
from tf_rl.controller import DiscreteDeepQ, HumanController
from tf_rl.simulation import KarpathyGame
from tf_rl import simulate
from tf_rl.models import MLP
LOG_D... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.