text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
```
import numpy as np
import matplotlib.pyplot as plt
% matplotlib inline
plt.rcParams["savefig.dpi"] = 300
plt.rcParams["savefig.bbox"] = "tight"
np.set_printoptions(precision=3, suppress=True)
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.pipeline import make_pipeline
from skl... | github_jupyter |
# How to setup Seven Bridges Public API python library
## Overview
Here you will learn the three possible ways to setup Seven Bridges Public API Python library.
## Prerequisites
1. You need to install _sevenbridges-python_ library. Library details are available [here](http://sevenbridges-python.readthedocs.io/en/late... | github_jupyter |
Manipulating numbers in Python
================
**_Disclaimer_: Much of this section has been transcribed from <a href="https://pymotw.com/2/math/">https://pymotw.com/2/math/</a>**
Every computer represents numbers using the <a href="https://en.wikipedia.org/wiki/IEEE_floating_point">IEEE floating point standard</a>... | github_jupyter |
```
import numpy as np
import random
twopi = 2.*np.pi
oneOver2Pi = 1./twopi
import time
def time_usage(func):
def wrapper(*args, **kwargs):
beg_ts = time.time()
retval = func(*args, **kwargs)
end_ts = time.time()
print("elapsed time: %f" % (end_ts - beg_ts))
return retval
... | 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 a... | github_jupyter |
```
pip install pyspark
pip install sklearn
pip install pandas
pip install seaborn
pip install matplotlib
import pandas as pd
import numpy as np
import os
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.linear_model import LogisticRegression
from sklearn.linear_model import LogisticRegressionCV
from ... | github_jupyter |
# GRIP_JULY - 2021 (TASK 5)
# Task Name:- Traffic sign classification/Recognition
# Domain:- Computer Vision and IOT
# Name:- Akash Singh

```
import cv2
import numpy as np
from scipy.stats import itemfreq
def get_dominant_color(image, n_colors):
pixels = np.float32(image).... | github_jupyter |
# Markov Random Fields for Collaborative Filtering (Memory Efficient)
This notebook provides a **memory efficient version** in Python 3.7 of the algorithm outlined in the paper
"[Markov Random Fields for Collaborative Filtering](https://arxiv.org/abs/1910.09645)"
at the 33rd Conference on Neural Information Processi... | github_jupyter |
<a href="https://colab.research.google.com/github/emadphysics/Amsterdam_Airbnb_predictive_models/blob/main/airbnb_pytorch.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 datetime import date
import ... | github_jupyter |
```
import panel as pn
pn.extension()
```
One of the main design goals for Panel was that it should make it possible to seamlessly transition back and forth between interactively prototyping a dashboard in the notebook or on the commandline to deploying it as a standalone server app. This section shows how to display ... | github_jupyter |
# Bias Reduction
Climate models can have biases towards different references. Commonly, biases are reduced by postprocessing before verification of forecasting skill. `climpred` provides convenience functions to do so.
```
import climpred
import xarray as xr
import matplotlib.pyplot as plt
from climpred import Hindca... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
import os
os.environ['CUDA_VISIBLE_DEVICES'] = "0"
import gin
import numpy as np
from matplotlib import pyplot as plt
from torch.autograd import Variable
from tqdm.auto import tqdm
import torch
from causal_util.helpers import lstdct2dctlst
from sparse_causal_model_learner_rl.sacre... | github_jupyter |
# Using `bw2landbalancer`
Notebook showing typical usage of `bw2landbalancer`
## Generating the samples
`bw2landbalancer` works with Brightway2. You only need set as current a project in which the database for which you want to balance land transformation exchanges is imported.
```
import brightway2 as bw
import nu... | github_jupyter |
# Analyzing volumes for word frequencies
This notebook will demonstrate some of basic functionality of the Hathi Trust FeatureReader object. We will look at a few examples of easily replicable text analysis techniques — namely word frequency and visualization.
```
%%capture
!pip install nltk
from htrc_features import ... | github_jupyter |
# Correlation and Causation
It is hard to over-emphasize the point that **correlation is not causation**!. Variables can be highly correlated for any number of reasons, none of which imply a causal relationship.
When trying to understand relationships between variables, it is worth the effort to think carefully a... | github_jupyter |
# Fraud_Detection_Using_ADASYN_OVERSAMPLING
I am able to achieve the following accuracies in the validation data. These results can be further improved by reducing the
parameter, number of frauds used to create features from category items. I have used a threshold of 100.
* Logistic Regression :
Validation ... | github_jupyter |
# Boston Housing Prices Classification
```
import itertools
import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
from dataclasses import dataclass
from sklearn import datasets
from sklearn import svm
from sklearn import tree
from sklearn.ensemble import AdaBoostClassifier
f... | github_jupyter |
[](http://rpi.analyticsdojo.com)
<center><h1>Intro to Tensorflow - MINST</h1></center>
<center><h3><a href = 'http://rpi.analyticsdojo.com'>rpi.analyticsdojo.com</a></h3></center>
[](https://colab.research... | github_jupyter |
```
# Required to load webpages
from IPython.display import IFrame
```
[Table of contents](../toc.ipynb)
<img src="https://github.com/scipy/scipy/raw/master/doc/source/_static/scipyshiny_small.png" alt="Scipy" width="150" align="right">
# SciPy
* Scipy extends numpy with powerful modules in
* optimization,
* ... | github_jupyter |
<h1>Table of Contents<span class="tocSkip"></span></h1>
<div class="toc"><ul class="toc-item"><li><span><a href="#Objectives" data-toc-modified-id="Objectives-1"><span class="toc-item-num">1 </span>Objectives</a></span></li><li><span><a href="#Example-Together" data-toc-modified-id="Example-Together-2"><span... | github_jupyter |
## Dependencies
```
import json, warnings, shutil
from tweet_utility_scripts import *
from tweet_utility_preprocess_roberta_scripts import *
from transformers import TFRobertaModel, RobertaConfig
from tokenizers import ByteLevelBPETokenizer
from tensorflow.keras.models import Model
from tensorflow.keras import optimiz... | github_jupyter |
__This notebook__ trains resnet18 from scratch on CIFAR10 dataset.
```
%load_ext autoreload
%autoreload 2
%env CUDA_VISIBLE_DEVICES=YOURDEVICEHERE
import os, sys, time
sys.path.insert(0, '..')
import lib
import numpy as np
import torch, torch.nn as nn
import torch.nn.functional as F
import matplotlib.pyplot as plt
%m... | github_jupyter |
## Homework-3: MNIST Classification with ConvNet
### **Deadline: 2021.04.06 23:59:00 **
### In this homework, you need to
- #### implement the forward and backward functions for ConvLayer (`layers/conv_layer.py`)
- #### implement the forward and backward functions for PoolingLayer (`layers/pooling_layer.py`)
- #### i... | github_jupyter |
# YOLOv5 Training on Custom Dataset
## Pre-requisite
- Make sure you read the user guide from the [repository](https://github.com/CertifaiAI/classifai-blogs/tree/sum_blogpost01/0_Complete_Guide_To_Custom_Object_Detection_Model_With_Yolov5)
- Upload this to Google Drive to run on Colab.
*This script is written pri... | github_jupyter |
# Getting Started
## Platforms to Practice
Let us understand different platforms we can leverage to practice Apache Spark using Python.
* Local Setup
* Databricks Platform
* Setting up your own cluster
* Cloud based labs
## Setup Spark Locally - Ubuntu
Let us setup Spark Locally on Ubuntu.
* Install latest versio... | github_jupyter |
## MEG Group Analysis
Group analysis for MEG data, for the FOOOF paper.
The Data Source is from the
[Human Connectome Project](https://www.humanconnectome.org/)
This notebook is for group analysis of MEG data using the
[omapping](https://github.com/voytekresearch/omapping) module.
```
%matplotlib inline
from sc... | github_jupyter |
```
import numpy as np
import scipy
import scipy.misc
import scipy.ndimage
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.preprocessing import MinMaxScaler
from sklearn.preprocessing import OneHotEncoder
from datetime import datetime
import resource
np.set_printoptions(suppress=True, precision=5)
... | github_jupyter |
<img src="../../images/qiskit-heading.gif" alt="Note: In order for images to show up in this jupyter notebook you need to select File => Trusted Notebook" width="500 px" align="left">
## _*Shor's Algorithm for Integer Factorization*_
The latest version of this tutorial notebook is available on https://github.com/qis... | github_jupyter |
# A-weightening filter implementation
The A-weighting transfer function is defined in the ANSI Standards S1.4-1983 and S1.42-2001:
$$
H(s) = \frac{\omega_4^2 s^4}{(s-\omega_1)^2(s-\omega_2)(s-\omega_3)(s-\omega_4)^2}
$$
Where $\omega_i = 2\pi f_i$ are the angular frequencies defined by:
```
import numpy as np
f1 =... | github_jupyter |
# Supervised baselines
Notebook with strong supervised learning baseline on cifar-10
```
%reload_ext autoreload
%autoreload 2
```
You probably need to install dependencies
```
# All things needed
!git clone https://github.com/puhsu/sssupervised
!pip install -q fastai2
!pip install -qe sssupervised
```
After runni... | github_jupyter |
```
import pandas as pd
import numpy as np
import warnings
warnings.filterwarnings('ignore')
train=pd.read_csv(r'C:\Users\prath\LoanEligibilityPrediction\Dataset\train.csv')
train.Loan_Status=train.Loan_Status.map({'Y':1,'N':0})
train.isnull().sum()
Loan_status=train.Loan_Status
train.drop('Loan_Status',axis=1,inplace... | github_jupyter |
# Jupyter Notebooks and CONSTELLATION
This notebook is an introduction to using Jupyter notebooks with CONSTELLATION. In part 1, we'll learn how to send data to CONSTELLATION to create and modify graphs. In part 2, we'll learn how to retrieve graph data from CONSTELLATION. Part 3 will be about getting and setting info... | github_jupyter |
# Step 1 - Prepare Data
Data cleaning.
```
%load_ext autoreload
%autoreload 2
import pandas as pd
# Custom Functions
import sys
sys.path.append('../src')
import data as dt
import prepare as pr
import helper as he
```
### Load Data
```
dt_task = dt.Data()
data = dt_task.load('fn_clean')
fn_data = he.get_config()['pa... | github_jupyter |
## Create Azure Resources¶
This notebook creates relevant Azure resources. It creates a recource group where an IoT hub with an IoT edge device identity is created. It also creates an Azure container registry (ACR).
```
from dotenv import set_key, get_key, find_dotenv
from pathlib import Path
import json
import time
... | github_jupyter |
# Example of optimizing Xgboost XGBClassifier function
# Goal is to test the objective values found by Mango
# Benchmarking Serial Evaluation: Iterations 60
```
from mango.tuner import Tuner
from scipy.stats import uniform
def get_param_dict():
param_dict = {"learning_rate": uniform(0, 1),
"gamma"... | github_jupyter |
<img src='./img/intel-logo.jpg' width=50%, Fig1>
# OpenCV 기초강좌
<font size=5><b>01. 이미지, 비디오 입출력 <b></font>
<div align='right'>성 민 석 (Minsuk Sung)</div>
<div align='right'>류 회 성 (Hoesung Ryu)</div>
<img src='./img/OpenCV_Logo_with_text.png' width=20%, Fig2>
---
<h1>Table of Contents<span class="tocSkip"><... | github_jupyter |
```
import logging
import warnings
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
import neurolib.optimize.exploration.explorationUtils as eu
import neurolib.utils.pypetUtils as pu
from neurolib.optimize.exploration import BoxSearch
logger = logging.getLogger()
warnings.... | github_jupyter |
# Operator Upgrade Tests
## Setup Seldon Core
Follow the instructions to [Setup Cluster](https://docs.seldon.io/projects/seldon-core/en/latest/examples/seldon_core_setup.html#Setup-Cluster) with [Ambassador Ingress](https://docs.seldon.io/projects/seldon-core/en/latest/examples/seldon_core_setup.html#Ambassador) and ... | github_jupyter |
Comparison for decision boundary generated on iris dataset between Label Propagation and SVM.
This demonstrates Label Propagation learning a good boundary even with a small amount of labeled data.
#### New to Plotly?
Plotly's Python library is free and open source! [Get started](https://plot.ly/python/getting-started... | github_jupyter |
<a href="https://colab.research.google.com/github/satyajitghana/TSAI-DeepVision-EVA4.0/blob/master/05_CodingDrill/EVA4S5F1.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Import Libraries
```
from __future__ import print_function
import torch
imp... | github_jupyter |
# GPU Computing for Data Scientists
#### Using CUDA, Jupyter, PyCUDA, ArrayFire and Thrust
https://github.com/QuantScientist/Data-Science-ArrayFire-GPU
```
%reset -f
import pycuda
from pycuda import compiler
import pycuda.driver as drv
import pycuda.driver as cuda
```
# Make sure we have CUDA
```
drv.init()
print(... | github_jupyter |
# Solving Linear Systems: Iterative Methods
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://licensebuttons.net/l/by/4.0/80x15.png" /></a><br />This notebook by Xiaozhou Li is licensed under a <a rel="license" href="http://creati... | github_jupyter |
```
import holoviews as hv
hv.extension('bokeh')
hv.opts.defaults(hv.opts.Curve(width=500),
hv.opts.Histogram(width=500),
hv.opts.HLine(alpha=0.5, color='r', line_dash='dashed'))
import numpy as np
import scipy.stats
```
# Cadenas de Markov
## Introducción
En la lección anterior vi... | github_jupyter |
# The R Programming Language
1. **R**: Popular **open-source programming language** for statistical analysis
2. Widely used in statistics and econometrics
3. **User-friendly and powerful IDE**: [RStudio](https://www.rstudio.com/)
4. Basic functionalities of **R** can be extended by **packages**
5. Large number of pack... | github_jupyter |
```
####################################################################################################
# Copyright 2019 Srijan Verma and EMBL-European Bioinformatics Institute
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License... | github_jupyter |
# Running attribute inference attacks on Regression Models
In this tutorial we will show how to run black-box inference attacks on regression model. This will be demonstrated on the Nursery dataset (original dataset can be found here: https://archive.ics.uci.edu/ml/datasets/nursery).
## Preliminaries
In order to moun... | github_jupyter |
<h1><center>ERM with DNN under penalty of Equalized Odds</center></h1>
We implement here a regular Empirical Risk Minimization (ERM) of a Deep Neural Network (DNN) penalized to enforce an Equalized Odds constraint. More formally, given a dataset of size $n$ consisting of context features $x$, target $y$ and a sensitiv... | github_jupyter |
# Estimating The Mortality Rate For COVID-19
> Using Country-Level Covariates To Correct For Testing & Reporting Biases And Estimate a True Mortality Rate.
- author: Joseph Richards
- image: images/corvid-mortality.png
- comments: true
- categories: [MCMC, mortality]
- permalink: /covid-19-mortality-estimation/
- toc: ... | github_jupyter |
Building the dataset of numerical data
```
#### STOP - ONLY if needed
# Allows printing full text
import pandas as pd
pd.set_option('display.max_colwidth', None)
#mid_keywords = best_keywords(data, 1, 0.49, 0.51) # same as above, but for average papers
#low_keywords = best_keywords(data, 1, 0.03, 0.05) # same ... | github_jupyter |
```
import requests
import json
headers = {'content-type': 'application/json'}
url = 'https://nid.naver.com/nidlogin.login'
data = {"eventType": "AAS_PORTAL_START", "data": {"id": "lafamila", "pw": "als01060"}}
#params = {'sessionKey': '9ebbd0b25760557393a43064a92bae539d962103', 'format': 'xml', 'platformId': 1}
#re... | github_jupyter |
# NumPy
NumPy is also incredibly fast, as it has bindings to C libraries. For more info on why you would want to use arrays instead of lists, check out this great [StackOverflow post](http://stackoverflow.com/questions/993984/why-numpy-instead-of-python-lists).
```
import numpy as np
```
# NumPy Arrays
NumPy array... | github_jupyter |
<a href="https://colab.research.google.com/github/Scott-Huston/DS-Unit-1-Sprint-2-Data-Wrangling-and-Storytelling/blob/master/LS_DS_123_Make_Explanatory_Visualizations.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
_Lambda School Data Science_
# M... | github_jupyter |
# Bloodmeal Calling
In this notebook, we analyze contigs from each bloodfed mosquito sample with LCA in *Vertebrata*. The potential bloodmeal call is the lowest taxonomic group consistent with the LCAs of all such contigs in a sample.
```
import pandas as pd
import numpy as np
from ete3 import NCBITaxa
import boto3
i... | github_jupyter |
# LAB 4b: Create Keras DNN model.
**Learning Objectives**
1. Set CSV Columns, label column, and column defaults
1. Make dataset of features and label from CSV files
1. Create input layers for raw features
1. Create feature columns for inputs
1. Create DNN dense hidden layers and output layer
1. Create custom evaluat... | github_jupyter |
```
%env CUDA_VISIBLE_DEVICES=1
DATA_DIR='/home/HDD6TB/datasets/emotions/zoom/'
import os
from PIL import Image
import cv2
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier,RandomForestRegressor
from sklearn import svm,metrics,preprocessing
from sklearn.neighbors i... | github_jupyter |
# Setup
```
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
import itertools as it
import helpers_03
%matplotlib inline
```
# Neurons as Logic Gates
As an introduction to neural networks and their component neurons, we are going to look at using neurons to implement the most primitive lo... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
%aimport utils_1_1
import pandas as pd
import numpy as np
import altair as alt
from altair_saver import save
import datetime
import dateutil.parser
from os.path import join
from constants_1_1 import SITE_FILE_TYPES
from utils_1_1 import (
get_site_file_paths,
get_site_fi... | github_jupyter |
# Session 17: Recommendation system on your own
This script should allow you to build an interactive website from your own
dataset. If you run into any issues, please let us know!
## Step 1: Select the corpus
In the block below, insert the name of your corpus. There should
be images in the directory "images". If th... | github_jupyter |
# K-Nearest Neighbors Algorithm
In this Jupyter Notebook we will focus on $KNN-Algorithm$. KNN is a data classification algorithm that attempts to determine what group a data point is in by looking at the data points around it.
An algorithm, looking at one point on a grid, trying to determine if a point is in group A... | github_jupyter |
# Quantization of Signals
*This jupyter notebook is part of a [collection of notebooks](../index.ipynb) on various topics of Digital Signal Processing. Please direct questions and suggestions to [Sascha.Spors@uni-rostock.de](mailto:Sascha.Spors@uni-rostock.de).*
## Spectral Shaping of the Quantization Noise
The quan... | github_jupyter |
<a href="https://colab.research.google.com/github/MuhammedAshraf2020/DNN-using-tensorflow/blob/main/DNN_using_tensorflow_ipynb.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
#import libs
import numpy as np
import matplotlib.pyplot as plt
imp... | github_jupyter |
This notebook copies images and annotations from the original dataset, to perform instance detection
you can control how many images per pose (starting from some point) and how many instances to consider as well as which classes
we also edit the annotation file because initially all annotations are made by instance n... | github_jupyter |
# Validating Multi-View Spherical KMeans by Replicating Paper Results
Here we will validate the implementation of multi-view spherical kmeans by replicating the right side of figure 3 from the Multi-View Clustering paper by Bickel and Scheffer.
```
import sklearn
from sklearn.datasets import fetch_20newsgroups
from s... | github_jupyter |
# StellarGraph Ensemble for link prediction
In this example, we use `stellargraph`s `BaggingEnsemble` class of [GraphSAGE](http://snap.stanford.edu/graphsage/) models to predict citation links in the Cora dataset (see below). The `BaggingEnsemble` class brings ensemble learning to `stellargraph`'s graph neural network... | github_jupyter |
# `kmeans(data)`
#### `def kmeans_more(data, nk=10, niter=100)`
- `returns 3 items : best_k, vector of corresponding labels for each given sample, centroids for each cluster`
#### `def kmeans(data, nk=10, niter=100)`
- `returns 2 items: best_k, vector of corresponding labels for each given sample`
# Requirement... | github_jupyter |
```
%load_ext autoreload
%autoreload
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import math
import sys
sys.path.append("..")
import physics
sys.path.append("../..")
from spec.spectrum import *
import spec.spectools as spectools
import xsecs
class Rates(object):
def __init__(self, E_sp... | github_jupyter |
# Applied Process Mining Module
This notebook is part of an Applied Process Mining module. The collection of notebooks is a *living document* and subject to change.
# Lecture 1 - 'Event Logs and Process Visualization' (R / bupaR)
## Setup
<img src="http://bupar.net/images/logo_text.PNG" alt="bupaR" style="width: 2... | github_jupyter |
##### Copyright 2018 The TensorFlow Authors.
```
#@title Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | github_jupyter |
# Eaton method with well log
Pore pressure prediction with Eaton's method using well log data.
Steps:
1. Calculate Velocity Normal Compaction Trend
2. Optimize for Eaton's exponent n
3. Predict pore pressure using Eaton's method
```
import warnings
warnings.filterwarnings(action='ignore')
# for python 2 and 3 co... | github_jupyter |
### Details on the hardware used to gather the performance data
```
import pandas as pd
from collections import OrderedDict as odict
#name, cache-size (in kB)
hardware = odict({})
hardware['i5'] = ('Intel Core i5-6600 @ 3.30GHz (2x 8GB DDR4, 4 cores)',6144,
'1 MPI task x 4 OpenMP threads (1 per cor... | github_jupyter |
## setup and notebook configuration
```
# scientific python stack
import numpy as np
import scipy as sp
import sympy as sym
import orthopy, quadpy
# matplotlib, plotting setup
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.tri as mtri # delaunay triangulation
from mpl_toolkits... | github_jupyter |
```
import os
import numpy as np
from tqdm import tqdm
from src.data.loaders.ascad import ASCADData
from src.dlla.berg import make_mlp
from src.dlla.hw import prepare_traces_dl, dlla_known_p
from src.pollution.gaussian_noise import gaussian_noise
from src.tools.cache import cache_np
from src.trace_set.database import... | github_jupyter |
# Import necessary depencencies
```
import pandas as pd
import numpy as np
import text_normalizer as tn
import model_evaluation_utils as meu
np.set_printoptions(precision=2, linewidth=80)
```
# Load and normalize data
```
dataset = pd.read_csv(r'movie_reviews.csv')
reviews = np.array(dataset['review'])
sentiments ... | 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 retry
import seaborn as sns
%matplotlib inline
current_work... | github_jupyter |
# Plotting the Correlation between Air Quality and Weather
```
# If done right, this program should
# Shoutout to my bois at StackOverflow - you da real MVPs
# Shoutout to my bois over at StackOverflow - couldn't've done it without you
import pandas as pd
import numpy as np
from bokeh.plotting import figure
from bok... | github_jupyter |
# Prosper Loan Data Exploration
## By Abhishek Tiwari
# Preliminary Wrangling
This data set contains information on peer to peer loans facilitated by credit company Prosper
```
# import all packages
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
df = p... | github_jupyter |
## Compile per MOA p value for shuffled comparison
```
import pathlib
import numpy as np
import pandas as pd
import scipy.stats
# Load L2 distances per MOA
cp_l2_file = pathlib.Path("..", "cell-painting", "3.application", "L2_distances_with_moas.csv")
cp_l2_df = pd.read_csv(cp_l2_file).assign(shuffled="real")
cp_l2_d... | github_jupyter |
# Image similarity estimation using a Siamese Network with a contrastive loss
**Author:** Mehdi<br>
**Date created:** 2021/05/06<br>
**Last modified:** 2021/05/06<br>
**ORIGINAL SOURCE:** https://github.com/keras-team/keras-io/blob/master/examples/vision/ipynb/siamese_contrastive.ipynb<br>
**Description:** Similarity ... | github_jupyter |
##### Copyright 2018 The TensorFlow Authors.
```
#@title Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | github_jupyter |
```
# Copyright 2019 The TensorFlow Hub Authors. All Rights Reserved.
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | github_jupyter |
<a href="https://colab.research.google.com/github/thomascong121/SocialDistance/blob/master/model_camera_colibration.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
from google.colab import drive
drive.mount('/content/drive')
%%capture
!pip insta... | github_jupyter |
# Azure Machine Learning Setup
To begin, you will need to provide the following information about your Azure Subscription.
**If you are using your own Azure subscription, please provide names for subscription_id, resource_group, workspace_name and workspace_region to use.** Note that the workspace needs to be of type ... | github_jupyter |
SAM001a - Query Storage Pool from SQL Server Master Pool (1 of 3) - Load sample data
====================================================================================
Description
-----------
In this 3 part tutorial, load data into the Storage Pool (HDFS) using
`azdata`, convert it into Parquet (using Spark) and th... | github_jupyter |
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Image/composite_bands.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a target="_blank" href="... | github_jupyter |
# Florida Single Weekly Predictions, trained on historical flu data and temperature
> Once again, just like before in the USA flu model, I am going to index COVID weekly cases by Wednesdays
```
import tensorflow as tf
physical_devices = tf.config.list_physical_devices('GPU')
tf.config.experimental.set_memory_growth(p... | 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 |
# MALDI acquisition of predefined areas
author: Alex Mattausch
version: 0.1.0
```
%load_ext autoreload
%autoreload 2
# "%matplotlib widget" is slightly better, but sometimes doesn't work
# "%matplotlib notebook" or "%matplotlib inline" can be used as alternatives
%matplotlib widget
import matplotlib.pyplot as plt
i... | github_jupyter |
<a href="https://practicalai.me"><img src="https://raw.githubusercontent.com/practicalAI/images/master/images/rounded_logo.png" width="100" align="left" hspace="20px" vspace="20px"></a>
<img src="https://raw.githubusercontent.com/practicalAI/images/master/basic_ml/06_Multilayer_Perceptron/nn.png" width="200" vspace="1... | github_jupyter |

---
# Pandas Introduction
**Author list:** Ikhlaq Sidhu & Alexander Fred Ojala
**References / Sources:**
Includes examples from Wes McKinney and the 10 min intro to Pandas
**License Agreement:** Feel free to do whatever you want with this code
___
### Topics:
1. D... | github_jupyter |
```
import json
import bz2
import regex
from tqdm import tqdm
from scipy import sparse
import pandas as pd
import numpy as np
import nltk
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
%pylab inline
responses = []
with bz2.BZ2File('banki_responses.json.bz2', 'r') as thefile:
for row in tq... | github_jupyter |
```
_= """
ref https://www.reddit.com/r/algotrading/comments/e44pdd/list_of_stock_tickers_from_yahoo/
https://old.nasdaq.com/screening/companies-by-name.aspx?letter=0&exchange=nasdaq&render=download
AMEX
https://old.nasdaq.com/screening/companies-by-name.aspx?letter=0&exchange=amex&render=download
NYSE
https://old... | github_jupyter |
_Lambda School Data Science — Tree Ensembles_
# Decision Trees — with ipywidgets!
### Notebook requirements
- [ipywidgets](https://ipywidgets.readthedocs.io/en/stable/examples/Using%20Interact.html): works in Jupyter but [doesn't work on Google Colab](https://github.com/googlecolab/colabtools/issues/60#issuecomment-... | github_jupyter |
# Nature of signals
In the context of this class, a signal is the data acquired by the measurement system. It contains much information that we need to be able to identify to extract knowledge about the system being tested and how to optimize the measurements. A signal caries also messages and information. We will u... | github_jupyter |
# Navigation
---
You are welcome to use this coding environment to train your agent for the project. Follow the instructions below to get started!
### 1. Start the Environment
Run the next code cell to install a few packages. This line will take a few minutes to run!
```
!pip -q install ./python
```
The environ... | github_jupyter |
# Objects
*Python* is an object oriented language. As such it allows the definition of classes.
For instance lists are also classes, that's why there are methods associated with them (i.e. `append()`). Here we will see how to create classes and assign them attributes and methods.
## Definition and initialization
A ... | github_jupyter |
# IntegratedML applied to biomedical data, using PyODBC
This notebook demonstrates the following:
- Connecting to InterSystems IRIS via PyODBC connection
- Creating, Training and Executing (PREDICT() function) an IntegratedML machine learning model, applied to breast cancer tumor diagnoses
- INSERTING machine learning ... | github_jupyter |
# Advanced Data Wrangling with Pandas
```
import pandas as pd
import numpy as np
```
## Formas não usuais de se ler um dataset
Você não precisa que o arquivo com os seus dados esteja no seu disco local, o pandas está preparado para adquirir arquivos via http, s3, gs...
```
diamonds = pd.read_csv("https://raw.github... | github_jupyter |
```
# Libraries needed for NLP
import nltk
nltk.download('punkt')
from nltk.stem.lancaster import LancasterStemmer
stemmer = LancasterStemmer()
# Libraries needed for Tensorflow processing
import tensorflow as tf
import numpy as np
import tflearn
import random
import json
from google.colab import files
files.upload()
... | github_jupyter |
## Dependencies
```
import json, warnings, shutil, glob
from jigsaw_utility_scripts import *
from scripts_step_lr_schedulers import *
from transformers import TFXLMRobertaModel, XLMRobertaConfig
from tensorflow.keras.models import Model
from tensorflow.keras import optimizers, metrics, losses, layers
SEED = 0
seed_ev... | github_jupyter |
## 1. 데이터 불러오기
```
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import random
data1 = pd.read_csv('C:/Users/Soyoung Cho/Desktop/NMT Project/dataset/train.csv')
data2 = pd.read_csv('C:/Users/Soyoung Cho/Desktop/NMT Project/dataset/test.csv')
data3 = pd.read_csv('C:/Users/Soyoung Cho/Desktop... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.