text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
[](http://rpi.analyticsdojo.com)
<center><h1>Introduction to Modeling - New Boston Housing </h1></center>
<center><h3><a href = 'http://rpi.analyticsdojo.com'>rpi.analyticsdojo.com</a></h3></center>
# Las... | github_jupyter |
# Madrid Mobility Data
> Preprocessing Madrid CRTM survey data
- toc: true
- branch: master
- badges: false
- hide_binder_badge: true
- comments: true
- author: Alexandra Kapp
- categories: [mobility, preprocessing]
Madrid (CRTM: Consorcio Regional de Transportes de Madrid), unlike most other cities, provides a rich ... | github_jupyter |
<CENTER><h1>Estructura de bandas electrónicas para una red 3D para la estructura cristalina FCC</h1></CENTER>
<div align="right">Por:<br>Angie M. Sanchez<br>Jorge A. Quintero<br>Kevin A. González<br>2019</div>
<br style="clear:both;" />
<div id="imagenes" align="center">
<img src="https://raw.githubusercontent.com/dav... | github_jupyter |
```
import numpy as np
from random import randint, random, choice
import matplotlib.pyplot as plt
from math import sqrt, log
%matplotlib inline
class Board(object):
def __init__(self, num_players, rewards):
self.n_players = num_players
self.rewards = rewards
self.grid = [[0 for i in range(16... | github_jupyter |
# Flood Insurance Claims in New York City
Exploratory Data Analysis (EDA) of the National Flood Insurance Program (NFIP) claims in New York City since 1968.
*Mark Bauer*
# Table of Contents
Fill in here
## 1 Executive Summary
Add text here.
# 2 Introduction
Add text here.
# 3 Loading and Exploring Data
## 3.... | github_jupyter |
<a href="https://colab.research.google.com/github/https-deeplearning-ai/tensorflow-1-public/blob/master/C1/W4/ungraded_labs/C1_W4_Lab_3_compacted_images.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Ungraded Lab: Effect of Compacted Images in Tr... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from sklearn.svm import SVR
from sklearn.svm import LinearSVR
from sklearn.metrics import r2_score
from sklearn.metrics import mean_squared_error
from sklearn.preprocessing import StandardScaler
from sklearn.preprocessing import MinMaxScaler
fro... | github_jupyter |
# Machine Learning
Machine learning is the application of algorithms to extract information from datasets by way of understanding it. This "understanding" usually means fitting a model on the dataset. It overlaps considerably with data mining, where one is usually more concerned with getting the information than with ... | github_jupyter |
__This notebook contains optional study material. You are not required to work through it in order to meet the learning objectives or complete the assessments associated with this module.__
*This notebook demonstrates the effectiveness of a pre-trained convolutional neural network (CNN) at classifying MNIST handwritte... | github_jupyter |
# Working with Sentinel-2
This notebook demonstrates how to find, load and process Sentinel-2 CARD images on the DIAS.
The DIAS stores the CARD images in the S3 store. In order to work with the data in a program (or for downloading), you first need to transfer it to local disk. For this, you need to know the S3 "end-... | github_jupyter |
```
import malaya_speech
import numpy as np
from malaya_speech import Pipeline
import matplotlib.pyplot as plt
import IPython.display as ipd
```
### Creating dummy audio
```
import random
import malaya_speech.augmentation.waveform as augmentation
sr = 8000
speakers_size = 4
def read_wav(f):
return malaya_speech... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
import sys
sys.path.append("..")
from heritageconnector.utils.sparql import get_sparql_results
import re
import pandas as pd
endpoint_url = "https://query.wikidata.org/sparql"
```
### get all items which are instance of (subclass of)^n company
```
# get all items which are inst... | github_jupyter |
# Representations and Tables
Scipp provides a number of options for visualizing the structure and contents of variables, data arrays, and datasets in Jupyter notebooks:
- `scipp.to_html` produces a HTML representation.
This is also bound to `_repr_html_`, i.e., Jupyter will display this when the name of a scipp obj... | github_jupyter |
# Try It Yourself
Think you are ready to use Booleans and Conditionals? Try it yourself and find out.
To get started, **run the setup code below** before writing your own code (and if you leave this notebook and come back later, don't forget to run the setup code again).
```
from learntools.core import binder; binde... | github_jupyter |
# Data Scientist
```
from src.AriesDuetTokenExchanger import AriesDuetTokenExchanger
%autoawait
import time
import asyncio
import os
import nest_asyncio
from aries_cloudcontroller import AriesAgentController
api_key = os.getenv("ACAPY_ADMIN_API_KEY")
admin_url = os.getenv("ADMIN_URL")
webhook_port = os.getenv("WEBHOO... | github_jupyter |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.

# Neural style trans... | github_jupyter |
# 5.1 Encoding Nominal Categorical Feature
```
import numpy as np
from sklearn.preprocessing import LabelBinarizer, MultiLabelBinarizer
feature = np.array([
["Texas"],
["California"],
["Texas"],
["Delaware"],
["Texas"]
])
# create one-hot encoder
one_hot = LabelBinarizer()
# one-hot encode featu... | github_jupyter |
# 1. Import libraries
```
#----------------------------Reproducible----------------------------------------------------------------------------------------
import numpy as np
import random as rn
import os
seed=0
os.environ['PYTHONHASHSEED'] = str(seed)
np.random.seed(seed)
rn.seed(seed)
#---------------------------... | github_jupyter |
## Third party ADP library prevalence analysis
- Find the number sites that embed a given script/endpoint
```
# For third-party scripts: we use script domains (PS+1) to measure the prevalence.
# For Wordpress and Magenta plugins served from first-party sites, we match the URL path.
ADP_PROVIDER_DOMAINS = {
"Fomo"... | github_jupyter |
```
import haiku as hk
import jax
import jax.numpy as jnp
```
**TL;DR:** A JAX transform inside of a `hk.transform` is likely to transform a side effecting function, which will result in an `UnexpectedTracerError`. This page describes two ways to get around this.
# Limitations of Nesting JAX Functions and Haiku Modul... | github_jupyter |
# Chapter 9 - Looping over containers
So far, you have been introduced to **integers** (e.g. 1) **strings** (e.g. 'hello'), **lists** (e.g. [1, 'a', 3] , and **sets** (e.g. {1, 2, 'Python'}). You have learned how to create and inspect them using methods and built-in functions.
However, you'll find that, most of the t... | github_jupyter |
# Title
**Exercise: Feature Importance**
# Description
The goal of this exercise is to compare two feature importance methods; MDI, and Permutation Importance. For a discussion on the merits of each <a href="https://scikit-learn.org/stable/modules/permutation_importance.html" target="_blank">see</a>.
<img src="../i... | github_jupyter |
### Tips, Tricks, and Hacks
In the tutorial notebook, we learned how to make light curves for stars observed in a single sector or in multiple sectors. In this notebook we'll explore how to make the most of these data and ensure your signal is real.
#### 1.1 Choosing an Aperture
Let's begin with the same WASP-100 we... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
from IPython.core.display import HTML, display
import pytest
import ipytest
ipytest.autoconfig()
from bs4 import BeautifulSoup
from dagster import execute_solid
from food_ke.scripts.custom import HTMLSpan, TableChunk
from food_ke.scripts.modes import dev
from food_ke.scripts.ne... | github_jupyter |
```
# Задание на повторение материала предыдущего семестра
# Зависимости
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import random
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import MinMaxScaler
from sklearn.compose import ColumnTransformer
from sklearn.l... | github_jupyter |
# Preprocessing for numerical features
In this notebook, we will still use only numerical features.
We will introduce these new aspects:
* an example of preprocessing, namely **scaling numerical variables**;
* using a scikit-learn **pipeline** to chain preprocessing and model
training.
## Data preparation
First,... | github_jupyter |
# Estimating functional connectivity on a large dataset
Extracting time series from a functional dataset is long, mainly due to heavy I/O operations. Fortunately, the Preprocessed Connectome Project, initiated by the 1000 Functional Connectomes Project (FCP) and International Neuroimaging Data-sharing Initiative (INDI... | github_jupyter |
Reconstructing a D meson based on the decay mode $$D \rightarrow K^0 _S \ \phi$$
<br>
Wherein the $K$-short meson further decays into $$ K^0 _S \rightarrow \pi^+ \ \pi^- $$
And the $ \phi$ meson decays into $$ \phi \rightarrow K^+ \ K^- $$
```
###### This cell need only be run once per session ##############
######... | github_jupyter |
# On the Importance of Scaling with Stochastic Gradient Descent
This notebook demonstrates the importance of scaling input data when using stochastic gradient descent (SGD).
## Imports
Import necessary libraries here.
```
import numpy as np
from sklearn import linear_model
import matplotlib.pyplot as plt
from sklea... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
import glob
import nibabel as nib
import os
import time
import pandas as pd
import numpy as np
from mricode.utils import log_textfile
from mricode.utils import copy_colab
from mricode.utils import return_iter
from mricode.utils import return_csv
from mricode.models.SimpleCNN im... | github_jupyter |
```
# Add the Pandas and OS dependency
import pandas as pd
import os
# Files to load
school_data_to_load = os.path.join(".","Resources", "schools_complete.csv")
student_data_to_load = os.path.join(".","Resources", "students_complete.csv")
# Read the school data file and store it in a Pandas DataFrame.
school_data_df... | github_jupyter |
# Copyright Netherlands eScience Center and Centrum Wiskunde & Informatica <br>
** Function : Emotion recognition and forecast with ConvLSTM** <br>
** Author : Yang Liu** <br>
** Contributor : Tianyi Zhang (Centrum Wiskunde & Informatica)<br>
** Last Update : 2021.02.08 ** <br>
** Last Update : 2021.02.12 ... | github_jupyter |
## Using AntiNex to Make Predictions with a Pre-trained Deep Neural Network

#### This notebook requires running the AntiNex stack locally. The easiest way is to use docker-compose, but you can also run it manually.
## What is AntiNex?
AntiNex is a free tool... | github_jupyter |
# Obtaining Course Materials
The course materials will be updated throughout the course, so we recommend that you download the most recent version of the materials before each lecture or recap session. The latest notebooks and other materials for this course can be obtained by following these steps:
1. Go to the githu... | github_jupyter |
Show the percentage of Proximus clients compared to the total population per arrondissement and province.
This figure is not used in the paper (confidential), but its lower limit may be used to justify using these data.
```
# import pandas as pd
import numpy as np
import pandas as pd
import glob
%matplotlib notebook
... | github_jupyter |
# 내맘대로 뉴스 요약 큐레이션 (1) - 시작 그리고 뉴스 크롤링
> 내맘대로 뉴스 기사 요약 + 큐레이션 프로젝트를 시작해보았다.
- badges: true
- comments: true
- categories: [side project]
내맘대로 사이드 프로젝트는 내맘대로니까 의식의 흐름대로 막씀. 반말로 씀.
## 0. 내맘대로 뉴스 기사 요약 + 큐레이션 프로젝트 시작.
일요일 오후 1:30분.. 글쓰기 마감일인데, 이번주도 한 글자도 안썼다...
집에서는 안되겠다 싶어 노트북을 챙겨서 빽다방에 나왔다.
이번주는 ~~또 어떻게 때우나~~ 어떤 글... | github_jupyter |
# Playground 3: Segmentation workflow for Nucleophosmin
This notebook contains the workflow for Nucleophosmin, and serves as a starting point for developing a classic segmentation workflow if your data shows similar morphology as Nucleophosmin.
----------------------------------------
Cell Structure Observations:
... | github_jupyter |
# Revisão em Tópicos Especiais em Desenvolvimento de Sistemas
**Alunos:**
- Tiago Danin (20180793708)
- Michel Farias (20180793684)
## 1. Imprima a frase “Tópicos Especiais em Desenvolvimento de sistemas!"
```
print("Tópicos Especiais em Desenvolvimento de sistemas!")
```
## 2. Faça operações matemáticas de soma, s... | github_jupyter |
# Comparison of the data taken with LED illumination vs laser
(c) 2019 Manuel Razo. This work is licensed under a [Creative Commons Attribution License CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/). All code contained herein is licensed under an [MIT license](https://opensource.org/licenses/MIT)
---
```
i... | github_jupyter |
# UCL AI Society Machine Learning Tutorials
### Session 01. Introduction to Numpy, Pandas, Matplotlib
### Contents
1. Numpy
2. Pandas
3. Matplotlib
4. EDA(Exploratory Data Analysis)
### Aim
At the end of this session, you will be able to:
- Understand the basics of numpy.
- Understand the basics of pandas.
- Understa... | github_jupyter |
<a href="https://colab.research.google.com/github/DaniAffCH/BeSTreet/blob/master/StreetTrack.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
import pandas as pd
import numpy as np
from tensorflow import keras
from matplotlib import pyplot as plt... | github_jupyter |
<a href="https://cognitiveclass.ai/?utm_medium=Exinfluencer&utm_source=Exinfluencer&utm_content=000026UJ&utm_term=10006555&utm_id=NA-SkillsNetwork-Channel-SkillsNetworkCoursesIBMDeveloperSkillsNetworkPY0101ENSkillsNetwork19487395-2021-01-01">
<img src="https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-da... | github_jupyter |
### Lending Club - Example Case
using Python and Scikit-learn to apply decision tree and random forest classification to a real world case:
- Lending Club connects people who need money (borrowers) with people who have money (investors)
- as an investor, people who showed a profile of having a high probability of payi... | github_jupyter |
## Discussion: Classifying Songs by Lyrics
Today's discussion is designed to prepare you for Project 3. In this project, you'll create a classifier that predicts a song's genre based on its lyrics (the words in the song). Each observation is a song. Every song's genre is either hip-hop or country. There is one att... | github_jupyter |
# Random Forest algorithm
Random forest là thuật toán supervised learning, có thể giải quyết cả bài toán regression và classification.
## Giới thiệu về thuật toán Random Forest
Random là ngẫu nhiên, Forest là rừng, nên ở thuật toán Random Forest mình sẽ xây dựng nhiều cây quyết định bằng thuật toán Decision Tree, tu... | github_jupyter |
```
%reload_ext autoreload
%autoreload 2
epoch_key = ("Jaq", 3, 2)
import numpy as np
import pandas as pd
from loren_frank_data_processing import (get_all_multiunit_indicators,
get_all_spike_indicators,
make_neuron_dataframe,
... | github_jupyter |
```
import sys; sys.path.append(_dh[0].split("knowknow")[0])
from knowknow import *
database_name = "sociology-jstor"
cits = get_cnt("%s.doc" % database_name, keys=['fy.t','t','fy'])
RELIABLE_DATA_ENDS_HERE = 2010
import re
def create_tysum(cits):
meta_counters = defaultdict(int)
ty = defaultdict(lambda:... | github_jupyter |
# 13 - Text Similarity
by [Alejandro Correa Bahnsen](http://www.albahnsen.com/)
version 1.0, June 2020
## Part of the class [AdvancedMethodsDataAnalysisClass](https://github.com/albahnsen/AdvancedMethodsDataAnalysisClass/tree/master/notebooks)
This notebook is licensed under a [Creative Commons Attribution-ShareAli... | github_jupyter |
# Neural Architecture Search with DARTS
In this example you will deploy Katib Experiment with Differentiable Architecture Search (DARTS) algorithm using Jupyter Notebook and Katib SDK. Your Kubernetes cluster must have at least one GPU for this example.
You can read more about how we use DARTS in Katib [here](https:/... | github_jupyter |
<center><H1>An introduction to S3, Boto and Nexrad on S3</H1></center>
Adapted from and thank to the first tutorial by Valliappa Lakshmanan, formerly at Climate Corp now at Google.
https://eng.climate.com/2015/10/27/how-to-read-and-display-nexrad-on-aws-using-python/
<a href='https://aws.amazon.com/s3'> Amazon Simpl... | github_jupyter |

[](https://colab.research.google.com/github/JohnSnowLabs/spark-nlp-workshop/blob/master/jupyter/training/english/dictionary-sentiment/sentiment.ipynb)
## 0. Colab Setup
```
i... | github_jupyter |
```
import pandas as pd
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
beis_2013 = pd.read_csv('~/Documents/PhD/Projects/10-ELECSIM/run/beis_case_study/data/reference_run/2013_projection_1.csv')
beis_2013
beis_2013_long = pd.melt(beis_2013, id_vars='fuel_type')
beis_2013_long.loc[:,'variable']... | github_jupyter |
## Configuration
_Initial steps to get the notebook ready to play nice with our repository. Do not delete this section._
Code formatting with [black](https://pypi.org/project/nb-black/).
```
%load_ext lab_black
import os
import pytz
import glob
import pathlib
this_dir = pathlib.Path(os.path.abspath(""))
data_dir = t... | github_jupyter |
```
%matplotlib inline
import cv2
import numpy as np
from scipy.spatial.distance import cdist
from scipy.stats import linregress
from scipy.signal import convolve2d, gaussian, argrelextrema
from scipy.ndimage.interpolation import zoom
from sklearn.preprocessing import normalize
from skimage.transform import rotate
impo... | github_jupyter |
```
# You only need to run this once per run
# This allows running the Python files
import sys; sys.path.insert(0, '..')
## Import from my files
from lib.data_lfp import mne_lfp_Axona, load_lfp_Axona
from lib.data_pos import RecPos
from lib.plots import plot_small_sq, plot_tmaze, plot_mne
%matplotlib inline
import os
i... | github_jupyter |
# Run Regressions
This short notebook runs ridge regressions on the pre-featurized data matrix using a 5-fold cross-validation approach for all 12 ACS labels. It saves `.data` files that are then opened by the notebook "2_make_fig.ipynb" in this same folder to make the plot.
## Settings
Here are the settings you can... | github_jupyter |
Ejercicio del set de imágenes CIFAR10- Clasificando imágenes diversas
- TENSORFLOW parte 1- Pre-Procesamiento de datos
- Andrés de la Rosa
- En este caso se utilizaron las imágenes CIFAR10 del sitio original, a estas imágenes que vienen
en 5 batches se le realizó un procesamiento que queda definido en las funciones d... | github_jupyter |
[Table of Contents](http://nbviewer.ipython.org/github/rlabbe/Kalman-and-Bayesian-Filters-in-Python/blob/master/table_of_contents.ipynb)
# Smoothing
```
#format the book
%matplotlib inline
from __future__ import division, print_function
from book_format import load_style
load_style()
```
## Introduction
The perform... | github_jupyter |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.

#... | github_jupyter |
```
import pandas as pd
df1 = pd.read_csv('bankloanData.csv')
df1.head()
# When using Watson Studio on IBM Cloud or when using IBM Data Science Experience Local,
# just add the bankloanData.csv as a local data asset and then replace the code above
# with code generated using "Insert to Code" to insert code that read... | github_jupyter |
##### Copyright 2020 The Cirq Developers
```
#@title Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | github_jupyter |
# Timeline of foreign country restriction for each country using travel restriction data from Humanitarian Data Exchange
To create a timeline (historical record of country restrictions) we run the information extraction code on travel restrictions data downloaded form Humanitarian Data Exchange platform. Data is being... | github_jupyter |
# Dominican Republic National Identifiers
## Introduction
The function `clean_do_cedula()` cleans a column containing Dominican Republic national identifier (Cedula) strings, and standardizes them in a given format. The function `validate_do_cedula()` validates either a single Cedula strings, a column of Cedula strin... | github_jupyter |
## Parallel, Multi-Objective BO in BoTorch with qEHVI and qParEGO
In this tutorial, we illustrate how to implement a simple multi-objective (MO) Bayesian Optimization (BO) closed loop in BoTorch.
We use the parallel ParEGO ($q$ParEGO) [1] and parallel Expected Hypervolume Improvement ($q$EHVI) [1] acquisition functi... | github_jupyter |
```
import os
import re
import json
import string
import numpy as np
import pandas as pd
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
from sklearn import preprocessing
from tokenizers import BertWordPieceTokenizer
from transformers import BertTokenizer, TFBertModel, BertConfi... | github_jupyter |
```
%reload_ext autoreload
%autoreload 2
%matplotlib inline
import IPython
import matplotlib.pyplot as plt
import numpy as np
import soundfile as sf
import time
from tqdm import tqdm
import tensorflow as tf
from nara_wpe.tf_wpe import wpe
from nara_wpe.utils import stft, istft, get_stft_center_frequencies
from nara_w... | github_jupyter |
```
import numpy as np
import pandas as pd
N_FOLDS = 5
oof_df = pd.read_parquet('seq_datasets/new_oof_ensemble.parquet')
print(oof_df.shape)
oof_df.head()
gt_df = pd.read_csv("../train_folds.csv")
print(gt_df.shape)
gt_df.head()
oof_df = oof_df.drop("kfold", axis=1).merge(gt_df[["id", "kfold"]].drop_duplicates(), o... | github_jupyter |
<center>
<img src="./images/adsp_logo.png">
</center>
### Prof. Dr. -Ing. Gerald Schuller <br> Jupyter Notebook: Renato Profeta
# Filters
```
%%html
<iframe width="560" height="315" src="https://www.youtube.com/embed/5nw86XtKvyc" frameborder="0" allow="accelerometer; encrypted-media; gyroscope; picture-in-pictur... | github_jupyter |
> **Copyright (c) 2020 Skymind Holdings Berhad**<br><br>
> **Copyright (c) 2021 Skymind Education Group Sdn. Bhd.**<br>
<br>
Licensed under the Apache License, Version 2.0 (the \"License\");
<br>you may not use this file except in compliance with the License.
<br>You may obtain a copy of the License at http://www.apach... | github_jupyter |
## 1. Monte Carlo Simulation of SU(N) Gauge Field in 2D
### 1.2 System Configuration
Consider a \\(L_1 \times L_2\\) periodic lattice where one dimension is time and another dimension is space. On that lattice space, we are going to study a guage invariant nonabelian gauge theory. There are \\( 2L_1L_2\\) no of \\(... | github_jupyter |
# MACHINE LEARNING CLASSIFICATION AND COMPARISONS
This notebook we have used 6 different ML classifiers and compared them to find the best one that can accurately classify our malicious dataset.
## Installing some libraries.
```
pip install smote_variants
pip install imbalanced_databases
pip install imbalanced-learn... | github_jupyter |
<i>Copyright (c) Microsoft Corporation. All rights reserved.</i>
<i>Licensed under the MIT License.</i>
# Setup of an Azure workspace

## 1. Introduction <a id="int... | github_jupyter |
```
!pip install matplotlib
!pip install numpy
!pip install scipy
%matplotlib inline
import matplotlib.pyplot as plt
from IPython.display import Image
```
# Numpy - multidimensional data arrays
## Introduction
Numpy is not part of the "standard library", but it might as well be for engineers. Numpy is Python's answ... | github_jupyter |
# Train two classifiers on MNIST
Load and prepare MNIST data for training.
We normalise all image values to the range [0, 1], and use a one-hot encoding for the lables.
```
import keras
from keras.datasets import mnist
import numpy as np
input_size = 28*28
output_size = 10
def load_data(input_size=28*28, output_si... | github_jupyter |
## Importing Libraries and Dataset
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
import os
if not os.path.isdir('models'):
os.mkdir('models')
import tensorflow as tf
from keras.models import Sequential #Sequential Model
from keras.layers import Conv2D,MaxPooling2D... | github_jupyter |

## O que vamos aprender nessa aula:
1. [Modularização com arquivos](#1.-Modularização-com-arquivos)
1.1. [Separação em arquivos](#1.1.-Separação-em-arquivos)
1.2. [Importando arquivos](#1.2.-Importando-arquivos)
⠀⠀⠀⠀1.2.1. [Importando o arquivo completo](#1.2.1.-I... | github_jupyter |
<a href="https://colab.research.google.com/github/hsuanchia/Image-caption/blob/main/compare_two_model_by_caption.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# 兩個 model 之間對同一張圖片產的 caption 的視覺化和分數比較的小工具
```
from google.colab import drive
drive.mo... | github_jupyter |
### IMPORT SEMUA LIBARARY
```
import pandas as pd
import numpy as np
import psycopg2
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
from matplotlib import pyplot as plt
from matplotlib import style
from fpdf import FPDF
import math
import io
import base64
import xlsxwriter
```
### Upload data ke Postgre S... | github_jupyter |
# WCS Transformations
As we've seen in the FITS tutorial, FITS file headers often include information about the coordinate system of the data. This is referred to as World Coordinate System (WCS) information. The [astropy.wcs](http://docs.astropy.org/en/stable/wcs/index.html) sub-package wraps the standard [WCSLIB](ht... | github_jupyter |
# 1.2 Exploring Data
## Finding jobs
In [section one](signac_101_Getting_Started.ipynb) of this tutorial, we evaluated the ideal gas equation and stored the results in the *job document* and in a file called `V.txt`.
Let's now have a look at how we can explore our data space for basic and advanced analysis.
We alrea... | github_jupyter |
<a href="https://colab.research.google.com/github/Nirzu97/pyprobml/blob/resnet-torch/notebooks/resnet_torch.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Residual networks
We implement residual network CNN.
Based on 7.6 of http://d2l.ai/chapte... | github_jupyter |
```
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import statsmodels.api as sm
import seaborn as sns
from sklearn import metrics
%matplotlib inline
data = pd.read_csv("Fortnite.csv")
df = pd.read_csv("rawData.csv")
droppedLocations = data["Location"]
# creates a substring of only the first let... | github_jupyter |
# Basic usage
*`skorch`* is designed to maximize interoperability between `sklearn` and `pytorch`. The aim is to keep 99% of the flexibility of `pytorch` while being able to leverage most features of `sklearn`. Below, we show the basic usage of `skorch` and how it can be combined with `sklearn`.
<table align="left"><... | github_jupyter |
# Basic TensorFlow with GPU

```
!nvidia-smi
import tensorflow as tf
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
logdir = '/root/pipeline/logs/tensorflow'
import numpy as np
import matplotlib.pyplot as plt
import datetime
... | github_jupyter |
# Eel imports
Now let's take a look at a cut of data on eel product imports. The data come from [a foreign trade database maintained by NOAA](https://www.st.nmfs.noaa.gov/commercial-fisheries/foreign-trade/).
The CSV file lives here: `../data/eels.csv`.
We'll start by importing pandas and creating a data frame.
```... | github_jupyter |
## Mount Drive and Download Dataset
```
from google.colab import drive
drive.mount('/content/gdrive')
!unzip -uq '/content/gdrive/My Drive/chexpertdataset.zip'
```
## Import Basic Packages
```
import cv2
import numpy as np
import pandas as pd
%matplotlib inline
from matplotlib import pyplot as plt
```
## Read and c... | github_jupyter |
# CSE 6040, Fall 2015 [04]: List comprehensions, generators, and sparse data structures
In our association mining example, recall that we wanted to maintain a _sparse_ table of the number of occurrences of pairs of items. The focus of today's class is on some Python constructs that will enable us to write compact code... | github_jupyter |
# CS152 ASSIGNMENT 1: THE 8-PUZZLE
### Vinícius Miranda
The assignment description is available [here](https://course-resources.minerva.kgi.edu/uploaded_files/mke/00081092-1101/assignment1.pdf).
The code below implements A* search to solve the n-Puzzle. The misplaced tiles, Manhattan distance, and disjoint pattern d... | github_jupyter |
<a href="https://colab.research.google.com/github/ATOMconsortium/AMPL/blob/Tutorials/atomsci/ddm/examples/tutorials/00_BasicCOLAB_Tutorial.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
<h1>AMPL Using COLAB: Basic Introduction to Google COLAB</h1>
... | github_jupyter |
# Set-up and Workflow
### Importing the packages
```
# Load the packages
import requests
from bs4 import BeautifulSoup
```
### Making a GET request
```
# Defining the url of the site
base_site = "https://en.wikipedia.org/wiki/Music"
# Making a get request
response = requests.get(base_site)
response.status_code
# E... | github_jupyter |
```
from IPython.core.display import display, HTML, Markdown
from ipywidgets import Button, HBox, VBox, widgets, Layout
from tabulate import tabulate
import copy
campo_minato = [
[ 0 , 2 , 3 , 1 , 1 , 3 , 4 , 7 ,-1 ],
[ 2 , 1 ,-1 , 2 ,-1 ,-1 , 7 , 1 , 2 ],
[ 4 ,-1 , 2 , 3 , 7 , 1 , 1 , 5 , 4 ... | github_jupyter |
```
import matplotlib.pyplot as plt
a = [1, 2, 2]
b = [1, 3, 5]
plt.plot(b, a)
plt.show()
```
- Concat: 데이터를 여러개 읽어서 스텍으로 쌓는 방법을 제시함.
```
import pandas as pd
Concat_data = pd.read_csv('./data/concat_data.csv')
print(Concat_data)
total_data = []
for _ in range(0, 2):
temp_data = pd.read_csv('./data/concat_data.csv... | github_jupyter |
```
# Science imports
import pandas as pd
import numpy as np
# Viz imports
import matplotlib.pyplot as plt
import seaborn as sns
# Config matplotlib
%matplotlib inline
plt.rcParams["patch.force_edgecolor"] = True # in matplotlib, edge borders are turned off by default.
sns.set_style("darkgrid") # set a grey grid as ... | github_jupyter |
# BigQuery Essentials for Teradata Users
In this lab you will take an existing 2TB+ [TPC-DS benchmark dataset](http://www.tpc.org/tpc_documents_current_versions/pdf/tpc-ds_v2.10.0.pdf) and learn common day-to-day activities you'll perform in BigQuery.
### What you'll do
In this lab, you will learn how to:
- Use ... | github_jupyter |
# Adam算法
:label:`sec_adam`
本章我们已经学习了许多有效优化的技术。
在本节讨论之前,我们先详细回顾一下这些技术:
* 在 :numref:`sec_sgd`中,我们学习了:随机梯度下降在解决优化问题时比梯度下降更有效。
* 在 :numref:`sec_minibatch_sgd`中,我们学习了:在一个小批量中使用更大的观测值集,可以通过向量化提供额外效率。这是高效的多机、多GPU和整体并行处理的关键。
* 在 :numref:`sec_momentum`中我们添加了一种机制,用于汇总过去梯度的历史以加速收敛。
* 在 :numref:`sec_adagrad`中,我们使用每坐标缩放来实现计算效率的预处... | github_jupyter |
# Exercise 03
The goal of this exercise is to evaluate the impact of feature preprocessing on a pipeline that uses a decision-tree-based classifier instead of logistic regression.
- The first question is to empirically evaluate whether scaling numerical feature is helpful or not;
- The second question is to evaluat... | github_jupyter |
```
import tensorflow as tf
from sklearn import datasets
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
iris = datasets.load_iris()
features = iris['data']
target = iris['target']
N = len(target)
shuffle_index = np.arange(len(target))
np.random.shuffle(shuffle_index)
featur... | github_jupyter |
```
from google.colab import drive
drive.mount('/content/drive')
```
### Dependencies
```
!unzip -q '/content/drive/My Drive/Colab Notebooks/[Kaggle] Understanding Clouds from Satellite Images/Data/train_images384x480.zip'
#@title
# Dependencies
import os
import cv2
import math
import random
import shutil
import warn... | github_jupyter |
```
import tensorflow as tf
import os
import sys
import keras
from keras.models import Sequential, Model
from keras.layers import Dense, Activation, Dropout, Embedding, LSTM, Bidirectional,Multiply
# Merge,
from keras.layers import BatchNormalization, merge, add
from keras.layers.core import Flatten, Reshape
from... | github_jupyter |
# Using Automated Machine Learning
There are many kinds of machine learning algorithm that you can use to train a model, and sometimes it's not easy to determine the most effective algorithm for your particular data and prediction requirements. Additionally, you can significantly affect the predictive performance of a... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.