text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
# (Temporary) Notebook that Compares Quant results to the SIMs that Mark created ``` import multiprocessing as mp import numpy as np #import multiprocess as mp # A fork of multiprocessing that uses dill rather than pickle import yaml # pyyaml library for reading the parameters.yml file import os import matplotlib.py...
github_jupyter
# Seasonal Autoregressive Integrated Moving Average with Explanatory Variable (SARIMAX) The <a href="https://en.wikipedia.org/wiki/Autoregressive_integrated_moving_average">ARIMA</a> model is a generalisation of an ARMA model that can be applied to non-stationary time series. The SARIMAX model is an modified and exte...
github_jupyter
# ``` %load_ext autoreload %autoreload 2 from ramprate.load_dataset import load_epacems, load_epa_crosswalk from ramprate.build_features import uptime_events, calc_distance_from_downtime import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns ``` ## CEMS Processing ``` # all stat...
github_jupyter
# Debugging strategies You will get errors in your scripts. This is not a bad thing! It's just part of the process -- the error messages will help guide you to the solution. The key is to not get discouraged. A typical development pattern: Write some code. Run it. See what errors break your script. Throw in some `pri...
github_jupyter
# Imports ``` import sys import numpy as np import matplotlib.pyplot as plt from sklearn import svm from sklearn.decomposition import PCA from sklearn.pipeline import make_pipeline from sklearn.preprocessing import MinMaxScaler from sklearn.externals import joblib import torch import torchvision import torchvisi...
github_jupyter
# Video Pipeline Details This notebook goes into detail about the stages of the video pipeline in the base overlay and is written for people who want to create and integrate their own video IP. For most regular input and output use cases the high level wrappers of `HDMIIn` and `HDMIOut` should be used. Both the input...
github_jupyter
``` import numpy as np import time import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torchvision from torch.utils.data.sampler import SubsetRandomSampler import torchvision.transforms as transforms import matplotlib.pyplot as plt import torchvision.models from PIL imp...
github_jupyter
# Week 1 Homework and/or In-Class Activity ## Working with jupyter notebooks and Python fundamentals ### In the next cell, do the following: 1. Create markdown cell 2. Create a level 1 header with the text "Week 1" as the header text 3. Create a level 2 header with the text "Learning Jupyter Notebooks and Basic Python...
github_jupyter
``` import torch from torch import nn, optim from torch.utils.data import DataLoader, Dataset from torchvision import datasets, transforms from torchvision.utils import make_grid import matplotlib from matplotlib import pyplot as plt import seaborn as sns from IPython import display import torchsummary as ts import num...
github_jupyter
# Exploring S1-NRB data cubes ## Introduction **Sentinel-1 Normalised Radar Backscatter** Sentinel-1 Normalised Radar Backscatter (S1-NRB) is a newly developed Analysis Ready Data (ARD) product for the European Space Agency that offers high-quality, radiometrically terrain corrected (RTC) Synthetic Aperture Radar (...
github_jupyter
# Lecture 3 ## Differentiation I: ### Introduction and Interpretation ``` import numpy as np ################################################## ##### Matplotlib boilerplate for consistency ##### ################################################## from ipywidgets import interact from ipywidgets import FloatSlider fro...
github_jupyter
# Descriptive Statistics 1. Descriptive Statistics and Graphs 2. Number of Tweets (Total) 3. Number of Tweets (Time Series) 4. Gender Distribution 5. Language Distribution 6. Follower Counts 7. Client Usage (Android, iPhone, web etc.) # Jupyter Notebook Style Let's make this thing look nice. ``` from IPython.core.di...
github_jupyter
Copyright 2019 The Dopamine Authors. 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 agreed to in writing, software...
github_jupyter
``` import tsflex print(tsflex.__version__) ``` ## Get the data ``` from tsflex.utils.data import load_empatica_data df_tmp, df_acc, df_gsr, df_ibi = load_empatica_data(["tmp", "acc", "gsr", "ibi"]) from pandas.tseries.frequencies import to_offset data = [df_tmp, df_acc, df_gsr, df_ibi] for df in data: print("T...
github_jupyter
# Kestrel+Model ### A [Bangkit 2021](https://grow.google/intl/id_id/bangkit/) Capstone Project Kestrel is a TensorFlow powered American Sign Language translator Android app that will make it easier for anyone to seamlessly communicate with people who have vision or hearing impairments. The Kestrel model builds on the ...
github_jupyter
# Welcome to `bruges` This notebook accompanies [a blog post on agilegeoscience.com](http://www.agilegeoscience.com/blog/). If you are running this locally, you need to install [`bruges`](https://github.com/agile-geoscience/bruges) first: pip install bruges This notebook also requires [`welly`](https://github....
github_jupyter
``` from estruturas.pilha import * from estruturas.fila import * from estruturas.deque import * from estruturas.pilha_dinamica import * from estruturas.fila_dinamica import * from estruturas.lista import * from estruturas.arvore import * from estruturas.arvore_binaria import * from cyjupyter import Cytoscape import...
github_jupyter
##### Copyright 2020 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
``` # slow down a bit when hacking something together, e.g. I forgot to add a simple function call # tuple unpacking is nice, but cannot be done in a nested list comprehension # don't forget .items in for k,v in dict.items() # use hashlib for md5 encodings # multiline list comprehensions don't need extra parentheses,...
github_jupyter
# Autonomous Driving - Car Detection Welcome to the Week 3 programming assignment! In this notebook, you'll implement object detection using the very powerful YOLO model. Many of the ideas in this notebook are described in the two YOLO papers: [Redmon et al., 2016](https://arxiv.org/abs/1506.02640) and [Redmon and Far...
github_jupyter
# RadarCOVID-Report ## Data Extraction ``` import datetime import json import logging import os import shutil import tempfile import textwrap import uuid import matplotlib.pyplot as plt import matplotlib.ticker import numpy as np import pandas as pd import pycountry import retry import seaborn as sns %matplotlib in...
github_jupyter
``` # default_exp diffdrive # hide from fastcore.all import * ``` # Differential Drive Chapter Some code to create and display maps/likelihoods in Chapter 4. ``` # export import gtsam import math import PIL import numpy as np import plotly.express as px import plotly.graph_objects as go ``` ## Pinhole Figures ``` ...
github_jupyter
## _*H2 excited states from NumPyEigensolver*_ This notebook demonstrates using Qiskit Chemistry to plot graphs of the ground state and excited state energies of the Hydrogen (H2) molecule over a range of inter-atomic distances. This notebook utilizes the fact that when two_qubit_reduction is used with the parity mapp...
github_jupyter
We show that linear_model.Lasso provides the same results for dense and sparse data and that in the case of sparse data the speed is improved. #### New to Plotly? Plotly's Python library is free and open source! [Get started](https://plot.ly/python/getting-started/) by downloading the client and [reading the primer](h...
github_jupyter
# An Inventory of the Shared Datasets in the LSST Science Platform <br>Owner(s): **Phil Marshall** ([@drphilmarshall](https://github.com/LSSTScienceCollaborations/StackClub/issues/new?body=@drphilmarshall)), **Rob Morgan** ([@rmorgan10](https://github.com/LSSTScienceCollaborations/StackClub/issues/new?body=@rmorgan10))...
github_jupyter
# 17. Random Forest and Gradient Boosted Trees Classifier [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/rhennig/EMA6938/blob/main/Notebooks/17.RandomForest.ipynb) Previously, we used a Decision Tree Classifier to learn the fcc, bcc, and hcp cryst...
github_jupyter
# Deep multimodal Two Stream Action Recognition Import Deep Learning streams (Video and Pulse) ``` import numpy as np from streams.rgbi3d import rgbi3d from streams.cnn_lstm import cnn_lstm from streams.two_stream import two_stream ``` Firstly, we obtain the action list with the name and identifier that this solutio...
github_jupyter
# Traduzione Una delle forze motrici che ha permesso lo sviluppo della civiltà umana è la capacità di comunicare reciprocamente. Nella maggior parte delle attività umane, la comunicazione è fondamentale. ![Un robot multilingue](./images/translation.jpg) L'intelligenza artificiale (IA) può aiutare a semplificar...
github_jupyter
``` from lxml import etree import pandas as pd from collections import Counter import os import glob import re import matplotlib.pyplot as plt import numpy as np from collections import Counter from numpy import array import numpy as np wdir = "/home/jose/Dropbox/biblia/tb/" file = "TEIBible" # "*.xml" outdir = "/hom...
github_jupyter
``` import sys import pathlib import numpy as np import pandas as pd sys.path.insert(0, "../../scripts") from utils import load_data from pycytominer.cyto_utils import infer_cp_features import matplotlib.pyplot as plt from matplotlib.pyplot import figure from sklearn.decomposition import PCA from tensorflow import...
github_jupyter
Deep Learning ============= Assignment 2 ------------ Previously in `1_notmnist.ipynb`, we created a pickle with formatted datasets for training, development and testing on the [notMNIST dataset](http://yaroslavvb.blogspot.com/2011/09/notmnist-dataset.html). The goal of this assignment is to progressively train deep...
github_jupyter
## Dependencies ``` import json, glob from tweet_utility_scripts import * from tweet_utility_preprocess_roberta_scripts_aux import * from transformers import TFRobertaModel, RobertaConfig from tokenizers import ByteLevelBPETokenizer from tensorflow.keras import layers from tensorflow.keras.models import Model ``` # L...
github_jupyter
# SIT742: Modern Data Science **(Week 07: Big Data Platform (II))** --- - Materials in this module include resources collected from various open-source online repositories. - You are free to use, change and distribute this package. - If you found any issue/bug for this document, please submit an issue at [tulip-lab/s...
github_jupyter
In this notebook, we'll learn how to use GANs to do semi-supervised learning. In supervised learning, we have a training set of inputs $x$ and class labels $y$. We train a model that takes $x$ as input and gives $y$ as output. In semi-supervised learning, our goal is still to train a model that takes $x$ as input and...
github_jupyter
``` # Train neural network to predict significant wave height from SAR spectra. # Train with heteroskedastic regression uncertainty estimates. # Author: Peter Sadowski, Dec 2020 import os, sys os.environ['TF_FORCE_GPU_ALLOW_GROWTH'] = 'true' # Needed to avoid cudnn bug. import numpy as np import h5py import tensorflow...
github_jupyter
##### Copyright 2019 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
## 5.3 季節など周期性で売り上げ予測(時系列分析) ### 共通事前準備 ``` # 日本語化ライブラリ導入 !pip install japanize-matplotlib | tail -n 1 # 共通事前処理 # 余分なワーニングを非表示にする import warnings warnings.filterwarnings('ignore') # 必要ライブラリのimport import pandas as pd import numpy as np import matplotlib.pyplot as plt # matplotlib日本語化対応 import japanize_matplotlib ...
github_jupyter
``` import os,datetime,re from utils import News, Site class EngENNews(News): def __init__(self, tag, base_url): ''' <parameter> tag (bs4.element.Tag) : single topic object ''' self.tag = tag self.base_url = base_url self.summary() # this should be overri...
github_jupyter
## Calculate skill of a MJO Index of S2S models as function of daily lead time ``` # linting %load_ext nb_black %load_ext lab_black import xarray as xr xr.set_options(display_style="html") import numpy as np import matplotlib.pyplot as plt from climpred import HindcastEnsemble import climpred ``` IRIDL hosts variou...
github_jupyter
*Accompanying code examples of the book "Introduction to Artificial Neural Networks and Deep Learning: A Practical Guide with Applications in Python" by [Sebastian Raschka](https://sebastianraschka.com). All code examples are released under the [MIT license](https://github.com/rasbt/deep-learning-book/blob/master/LICEN...
github_jupyter
## Exponential Moving Average t_i = alpha * t_{i-1} + (1 - alpha) * s_i, with a value of alpha = 0.99 ``` import os os.chdir(os.path.join(os.getcwd(), '..')) import numpy as np import matplotlib.pyplot as plt import pandas as pd import seaborn as sns from src.model import mean_teacher from keras.applications.resnet50 ...
github_jupyter
<a href="https://colab.research.google.com/github/Data-Science-and-Data-Analytics-Courses/UniMelb---Database-Systems-Information-Modelling-INFO90002_2019_SM1/blob/master/Resources.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Clone remote ``` i...
github_jupyter
### String Problems ##### https://leetcode.com/explore/challenge/card/30-day-leetcoding-challenge/528/week-1/3283/ ##### Q.1. Given a non-empty array of integers, every element appears twice except for one. Find that single one. ``` from typing import List """ For O(1) space complexity use math operation or XOR. a^a ...
github_jupyter
# Data validation * https://adventofcode.com/2020/day/4 We get to validate passports. Part 1 asks us to validate the fields; there are a number of required fields, and one optional. This is mostly a parsing task, however. The data for each passport is separated from the next by a blank line, so we just split the who...
github_jupyter
# Random Forest Project For this project we will be exploring publicly available data from [LendingClub.com](www.lendingclub.com). Lending Club connects people who need money (borrowers) with people who have money (investors). Hopefully, as an investor you would want to invest in people who showed a profile of havin...
github_jupyter
# Getting to know qubits through QEC ### James R. Wootton, IBM Quantum ## Introduction Back in 2018 I worked as a quantum error correction researcher at the University of Basel. IBM had just put a 16 qubit device online, and I wanted to see how well it could implement the basics of QEC. So I ran repetition codes. ...
github_jupyter
``` class ListNode: def __init__(self, x): self.val = x self.next = None ``` 链表的题目比较单一,因为链表数据结构的特殊性,成员只能通过指针访问,所以根据维护的指针数量可以大致分为几类: - 单指针 - 双指针 - 多指针 ## 单指针 单指针指的是只需要维护单个工作指针用于扫描链表,而该指针通常指向前驱节点。 [Delete Node in a Linked List](https://leetcode.com/problems/delete-node-in-a-linked-list/)。只给出待删除节点的指...
github_jupyter
# Import the dataset ``` import numpy as np import pandas as pd import tensorflow as tf from keras import Sequential from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from keras.layers import Dense, Embedding, GlobalMaxPool1D, LSTM, Input from keras.losses import Bin...
github_jupyter
``` %matplotlib inline %precision 2 ``` # Nonparametric Latent Dirichlet Allocation _Latent Dirichlet Allocation_ is a [generative](https://en.wikipedia.org/wiki/Generative_model) model for topic modeling. Given a collection of documents, an LDA inference algorithm attempts to determined (in an unsupervised manner) t...
github_jupyter
# Formati dati 1 - Introduzione ## [Scarica zip esercizi](../_static/generated/formats.zip) [Naviga file online](https://github.com/DavidLeoni/softpython-it/tree/master/formats) In questi tutorial parleremo di formati dei dati: File testuali: * File a linee * CSV * breve panoramica sui cataloghi open data * menzio...
github_jupyter
# Data Structures In simple terms, It is the the collection or group of data in a particular structure. ## Lists Lists are the most commonly used data structure. Think of it as a sequence of data that is enclosed in square brackets and data are separated by a comma. Each of these data can be accessed by calling it's...
github_jupyter
*It's custom ResNet trained demonstration purpose, not for accuracy. Dataset used is cats_vs_dogs dataset from tensorflow_dataset with **ImageDataGenerator** for data augmentation* --- ### **1. Importing Libraries** ``` import tensorflow as tf from tensorflow.keras.layers import Dense, Dropout, Flatten, Conv2D, MaxP...
github_jupyter
# Welcome to BME 590: Machine Learning in Imaging ## People <img src="https://bme.duke.edu/sites/bme.duke.edu/files/u12/xhorstmeyer_200x200px.jpg.pagespeed.ic.SLWkDogtxs.webp" alt="Roarke Horstmeyer" width="100"/> Roarke Horstmeyer - rwh4@duke.edu | Office location: CIEMAS 2569 Office hours: Wednesdays 3:00pm-4:...
github_jupyter
# EPSchema # 1. Introduction This notebook explores the EnergyPlus schema using the EPSchema class in the eprun package. ## 2. Setup ### 2.1. Module Imports ``` from eprun import EPSchema ``` ### 2.2. Filepaths ``` fp='Energy+.schema.epJSON' ``` ## 3. Reading the schema file ### 3.1. Import ``` schema=EPSchem...
github_jupyter
# Super Scratcher This is a simple (but powerful) example of grabbing all the stuff from Rotten Tomato website via given list of movies. ``` from goje_scrapper.goje import * import pymongo goje_jaan = GojeScraper() movie_list = goje_jaan.extract_movie_links(1990,1991) # movie_list[i][0] = movie name # movie_list[i][1...
github_jupyter
# Change directory to wherever you are housing this project ``` import sys sys.path.append("C:/Users/ahaberlie/Documents/GitHub/MCS/") ``` # Download example radar data Download data.tar.gz from https://tiny.cc/ + the full manuscript ID for part 1 (case sensitive), and untar and ungzip this into the directory "MCS/m...
github_jupyter
Hypothesis Testing ================== Copyright 2016 Allen Downey License: [Creative Commons Attribution 4.0 International](http://creativecommons.org/licenses/by/4.0/) ``` from __future__ import print_function, division import numpy import scipy.stats import matplotlib.pyplot as pyplot from ipywidgets import int...
github_jupyter
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. # Optimizing runtime performance on GPT-2 model inference with ONNXRuntime on CPU In this tutorial, you'll be introduced to how to load a GPT2 model from PyTorch, convert it to ONNX with one step search, and inference it using O...
github_jupyter
[[source]](../api/alibi.explainers.cfproto.rst) # Counterfactuals Guided by Prototypes ## Overview This method is based on the [Interpretable Counterfactual Explanations Guided by Prototypes](https://arxiv.org/abs/1907.02584) paper which proposes a fast, model agnostic method to find interpretable counterfactual exp...
github_jupyter
``` import pandas as pd data = pd.read_csv("https://short.upm.es/dyjzp") data.info() data.head() data.describe() import seaborn as sns sns.countplot(x='class', data=data) from sklearn.preprocessing import LabelEncoder encoder = LabelEncoder() data['class'] = encoder.fit_transform(data['class']) data.head() column_names...
github_jupyter
# Construction of Regression Models using Data Author: Jerónimo Arenas García (jarenas@tsc.uc3m.es) Jesús Cid Sueiro (jcid@tsc.uc3m.es) Notebook version: 2.0 (Sep 26, 2017) Changes: v.1.0 - First version. Extracted from regression_intro_knn v.1.0. v.1.1 - Compatibility with pyth...
github_jupyter
# Multiple Linear Regression ## Objectives After completing this lab you will be able to: * Use scikit-learn to implement Multiple Linear Regression * Create a model, train it, test it and use the model <h1>Table of contents</h1> <div class="alert alert-block alert-info" style="margin-top: 20px"> <ol> ...
github_jupyter
``` import keras from keras.models import Sequential, Model, load_model from keras.layers import Dense, Dropout, Activation, Flatten, Input, Lambda from keras.layers import Conv2D, MaxPooling2D, Conv1D, MaxPooling1D, LSTM, ConvLSTM2D, GRU, BatchNormalization, LocallyConnected2D, Permute from keras.layers import Concat...
github_jupyter
``` %matplotlib notebook import numpy as np import matplotlib.pyplot as plt #Initialize input as a matrix #Each row is a different training example #Each column is a different neuron X = np.array([[0,0,1], [0,1,1], [1,0,1], [1,1,1], [1,1,1]]) #Create output da...
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
``` # -*- coding: utf-8 -*- #@author: alison import re import string import pickle import keras import numpy as np import pandas as pd from nltk.corpus import stopwords from sklearn.model_selection import train_test_split from nltk.stem import PorterStemmer, SnowballStemmer from nltk.tokenize import TweetTokenizer fr...
github_jupyter
``` !pip install tensorflow==2.0.0b1 import tensorflow as tf print(tf.__version__) import numpy as np import matplotlib.pyplot as plt def plot_series(time, series, format="-", start=0, end=None): plt.plot(time[start:end], series[start:end], format) plt.xlabel("Time") plt.ylabel("Value") plt.grid(True) !...
github_jupyter
En este cuaderno se implementan algunas funciones y algunos segmentos de código que pueden ser útiles para el desarrollo del [Taller 1](https://github.com/andresgm/Herramientas-Computacionales/tree/master/02_taller01) del curso. Comienzo importando dos librerías que no habíamos usado hasta ahora en el curso. La lib...
github_jupyter
# [L&S 88] Open Science -- Project 1, part 1 --- ### Instructors Eric Van Dusen and Josh Quan In this notebook we will be covering different approaches to Exploratory Data Analysis (EDA), exploring how different techniques and approachs can lead to different results and conclusions about data. We will be exploring ...
github_jupyter
### Task 1: Importing Libraries ``` import pandas as pd import numpy as np import seaborn as sns from scipy.stats import skew %matplotlib inline import matplotlib.pyplot as plt plt.style.use("ggplot") plt.rcParams['figure.figsize'] = (12, 8) ``` ### Task 2: Load the Data The adverstiting dataset captures sales rev...
github_jupyter
--- ## <span style="color:orange"> Host Multiple TensorFlow Computer Vision Models using SageMaker Multi-Model Endpoint </span> --- ## <span style="color:black">Contents</span> 1. [Background](#Background) 1. [Setup](#Setup) 1. [Train Model 1 - CIFAR-10 Image Classification](#Train-Model-1---CIFAR-10-Image-Classificati...
github_jupyter
# ✨ REST API Usage --- This notebook explains how Superwise model KPIs can be consumed and analyzed using REST API calls. There are three main parts: [**1. Connection**](#1.-Connection) - Initiates the mandatory token-based authentication. [More details here](https://docs.superwise.ai/v0.1/docs/authentication). [**...
github_jupyter
# Detrending, Stylized Facts and the Business Cycle In an influential article, Harvey and Jaeger (1993) described the use of unobserved components models (also known as "structural time series models") to derive stylized facts of the business cycle. Their paper begins: "Establishing the 'stylized facts' associat...
github_jupyter
``` import pandas as pd import matplotlib.pyplot as plt import numpy as np data=pd.read_csv('train.csv') test=pd.read_csv('test.csv') y=data.SalePrice y.shape test.shape x=data.drop(labels=['SalePrice'],axis=1,) import seaborn as sns sns.heatmap(x.isnull()) cdrop=['Alley','FireplaceQu','PoolQC','MiscFeature','Fence'] ...
github_jupyter
# Representing data in memory A typical program outline calls for us to load data from disk and place into memory organized into data structures. The way we represent data in memory is critical to building programs. This is particularly true with data science programs because processing data is our focus. First, le...
github_jupyter
gmail_spam_detection: - our goal for this competition is to build a spam filter by predicting whether an email message is spam (junk email) or ham (good email). This is a classic data set derived from a *bag-of-words* model applied 4601 email messages collected at Hewlett-Packard Labs. The features consist of the rela...
github_jupyter
# Amazon SageMaker Neo でコンパイルしたモデルを AWS IoT Greengrass V2 を使ってデバイスにデプロイする このサンプルノートブックは、エッジ推論を行うために学習済みモデルを Amazon SageMaker Neo でコンパイルして AWS Iot Greengrass V2 を使ってデバイスにデプロイするパイプラインを AWS Step Functions を使って自動化する方法をご紹介します。このノートブックを Amazon SageMaker のノートブックインスタンスで使用する場合は、`conda_tensorflow_p36` のカーネルをご利用ください。 このノートブックでは...
github_jupyter
``` import setGPU import os # os.environ["CUDA_VISIBLE_DEVICES"]="4" import pandas as pd import numpy as np import pickle import matplotlib.pyplot as plt import matplotlib.patches as mpatches from scipy import stats import tensorflow as tf from pylab import rcParams import seaborn as sns from sklearn.model_selection i...
github_jupyter
<a href="https://colab.research.google.com/github/drc10723/GAN_design/blob/master/GAN_implementations/Basic_GAN.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> #Generative Adversarial Networks Aim of this notebook is to implement [Generative Advers...
github_jupyter
# Pandas Pandas is a powerful, open source Python library for data analysis, manipulation, and visualization. If you're working with data in Python and you're not using pandas, you're probably working too hard! There are many things to like about pandas: It's well-documented, has a huge amount of community support, i...
github_jupyter
![qiskit_header.png](attachment:qiskit_header.png) # Account management Qiskit Runtime is available on both IBM Cloud and IBM Quantum. The former requires an IBM Cloud account and the latter an IBM Quantum account. If you don't have these accounts, please refer to [01_introduction_ibm_cloud_runtime.ipynb](01_introduc...
github_jupyter
# AceleraDev DataScience ## Setup https://www.kaggle.com/c/house-prices-advanced-regression-techniques/data ``` #lendo os pacotes import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import numpy as np df = pd.read_csv('train.csv') ``` ## Analysis ### Selecao por completude ``` #Criando um d...
github_jupyter
``` %%html <style> .h1_cell, .just_text { box-sizing: border-box; padding-top:5px; padding-bottom:5px; font-family: "Times New Roman", Georgia, Serif; font-size: 125%; line-height: 22px; /* 5px +12px + 5px */ text-indent: 25px; background-color: #fbfbea; padding: 10px; border-sty...
github_jupyter
``` import sys, os root_dir = '\\'.join(os.getcwd().split('\\')[:-1]) sys.path.append(root_dir) from copy import deepcopy from functools import reduce from buildingBlocks.Synthesis import Chain from buildingBlocks.Synthesis.Synthesizer import Synthesizer from buildingBlocks.default.Tokens import Constant, Si...
github_jupyter
# Wikipedia Text Generation (using RNN LSTM) > - 🤖 See [full list of Machine Learning Experiments](https://github.com/trekhleb/machine-learning-experiments) on **GitHub**<br/><br/> > - ▶️ **Interactive Demo**: [try this model and other machine learning experiments in action](https://trekhleb.github.io/machine-learnin...
github_jupyter
# Training and Deploying the Fraud Detection Model In this notebook, we will take the outputs from the Processing Job in the previous step and use it and train and deploy an XGBoost model. Our historic transaction dataset is initially comprised of data like timestamp, card number, and transaction amount and we enriche...
github_jupyter
# Input Data Preparation ``` from glob import glob from imageio import imread from tqdm import tqdm import tensorflow as tf import json import os.path as osp import numpy as np import numpy.random as npr import cv2 import os from tensorflow.contrib.learn.python.learn.datasets import base class DetectionDataset(object)...
github_jupyter
# Maximising the utility of an Open Address Anthony Beck (GeoLytics), John Daniels (UU), Paul Williams (UU), Dave Pearson (UU), Matt Beare (Beare Essentials) ![](https://dl.dropboxusercontent.com/u/393477/ImageBank/ForAddresses/UU_SPA_CONCEPTUAL.png) Go down for licence and other metadata about this presentation ...
github_jupyter
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/EliShayGH/deep-learning-v2-pytorch/blob/master/autoencoder/linear-autoencoder/Simple_Autoencoder_Exercise.ipynb) # A Simple Autoencoder We'll start off by building a simple autoencoder to compress the...
github_jupyter
``` import json import os import sys import fnmatch import numpy as np import pandas as pd import matplotlib.pyplot as plt from matplotlib.colors import LogNorm from collections import defaultdict plt.style.use('fivethirtyeight') WS_REAL = defaultdict(list) valid_final_season = {} FEAT = ['Age','WS'] for YR in ran...
github_jupyter
### Install Dependencies ``` !pip install kaggle contractions ``` ### Import Dependencies ``` import os os.environ['KAGGLE_USERNAME'] = 'spyrosmouselinos' os.environ['KAGGLE_KEY'] = 'a907fb69eab07900ccb6e1f2874fd343' import re import contractions import numpy as np import pandas as pd import nltk nltk.download('wo...
github_jupyter
``` import requests import pandas as pd import tweepy import json import os ``` First, you will need to enable OAuth 2.0 in your App’s auth settings in the Developer Portal to get your client ID. You will also need your callback URL, which can be obtained from your App's auth settings. ``` %env CLIENT_ID your_client_...
github_jupyter
``` import numpy as np import matplotlib.pyplot as plt from scipy.io import wavfile from scipy.signal import fftconvolve from librosa.core import stft from librosa.core import istft from librosa import amplitude_to_db, db_to_amplitude from librosa.display import specshow from librosa.output import write_wav from scip...
github_jupyter
# Job Listings ``` # Dependencies & Setup import pandas as pd import numpy as np import requests import json from os.path import exists import simplejson as json # Retrieve Google API Key from config.py from config_3 import gkey # File to Load wc_file = "data/west_coast_job_listings.csv" ba_file = "data/bay_area_job...
github_jupyter
# Estatísticas de formatos de arquivo no censo de Diários Oficiais Agora temos uma funcionalidade no site do [Censo](https://censo.ok.org.br/) que permite baixar os dados do mapeamento. A partir desses dados, podemos encontrar analisar os formatos de arquivos que estão sendo utilizados nos diários oficiais e identific...
github_jupyter
## Introduction to the Interstellar Medium ### Jonathan Williams ### Figure 6.15: simple model of heating and cooling in an HII region ``` import numpy as np import matplotlib.pyplot as plt import matplotlib.ticker %matplotlib inline # scale wavelengths to energy via Hydrogen E_IP = 13.6 # eV lambda_IP = 91.2 ...
github_jupyter
# Getting started with DoWhy: A simple example This is a quick introduction to the DoWhy causal inference library. We will load in a sample dataset and estimate the causal effect of a (pre-specified)treatment variable on a (pre-specified) outcome variable. First, let us add the required path for Python to find the DoW...
github_jupyter
![imagen](../../imagenes/python.jpg) # Módulos y bibliotecas en Python Hasta ahora hemos desarrollado programas no muy complicados que cabían en una celda de un Notebook, pero poco a poco se va complicando más la cosa. ¿Qué ocurrirá cuando tengamos varias funciones definidas, datos declarados, Clases (lo veremos el p...
github_jupyter
# Riddler Battle Royale > [538's *The Riddler* Asks](http://fivethirtyeight.com/features/the-battle-for-riddler-nation-round-2/): *In a distant, war-torn land, there are 10 castles. There are two warlords: you and your archenemy, with whom you’re competing to collect the most victory points. Each castle has its own ...
github_jupyter
# Using FFT to do convolution. [Source code link from StackOverflow](https://stackoverflow.com/questions/40703751/using-fourier-transforms-to-do-convolution?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa) ``` import sys from scipy import signal from scipy import linalg import numpy as np x ...
github_jupyter