text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
# Load data
```
import os, glob
import cv2
import numpy as np
import matplotlib.pyplot as plt
from multiprocessing import Pool
import functools
%matplotlib inline
```
## video2npy
```
import skvideo.io
import skvideo.datasets
vid_root = '/data/dataset/UCF/'
vid_ls = glob.glob(vid_root+"v_BabyCrawling**.avi")
vid_ls.... | github_jupyter |
```
%matplotlib inline
import numpy as np
import pandas as pd
import math
from scipy import stats
import pickle
from causality.analysis.dataframe import CausalDataFrame
from sklearn.linear_model import LinearRegression
import matplotlib.pyplot as plt
import matplotlib.font_manager as fm
import plotly
import plotly.grap... | github_jupyter |
# Data Mining, Preparation and Understanding
Today we'll go through Data Mining, Preparation & Understanding which is a really fun one (and important).
In this notebook we'll try out some important libs to understand & also learn how to parse Twitter with some help from `Twint`. All in all we'll go through `pandas`, ... | github_jupyter |
```
# ['nigga', 'hate', 'love','ass','hell','better']
# #accuracy over all cross-validation folds: [0.6317343173431734, 0.618450184501845, 0.6140221402214022, 0.622140221402214, 0.6137370753323486]
# mean=0.62 std=0.01
# ['nigga', 'hate', 'love','ass','hell','better','bitch','fuck','dick']
# accuracy over all cross-va... | github_jupyter |
# Finite Difference Method
This note book illustrates the finite different method for a Boundary Value Problem.
### Example Boudary Value Problem
$$ \frac{d^2 y}{dx^2} = 4y$$
### Boundary Condition
$$ y(0)=1.1752, y(1)=10.0179 $$
```
import numpy as np
import math
import matplotlib.pyplot as plt
import warnings
war... | github_jupyter |
### Package installs
If you are using jupyter lab online, all packages will be available. If you are running this on your local computer, you may need to install some packages. Run the cell below if using jupyter lab locally.
```
!pip install numpy
!pip install scipy
!pip install pandas
!pip install scikit-learn
!pip ... | github_jupyter |
```
import tensorflow as tf
import numpy as np
from copy import deepcopy
epoch = 20
batch_size = 64
size_layer = 64
dropout_rate = 0.5
n_hops = 2
class BaseDataLoader():
def __init__(self):
self.data = {
'size': None,
'val':{
'inputs': None,
'questions... | github_jupyter |
# Deep Learning Toolkit for Splunk - Notebook for STL - Seasonality and Trend Decomposition
This notebook contains a barebone example workflow how to work on custom containerized code that seamlessly interfaces with the Deep Learning Toolkit for Splunk.
Note: By default every time you save this notebook the cells are... | github_jupyter |
# Intro
[PyTorch](https://pytorch.org/) is a very powerful machine learning framework. Central to PyTorch are [tensors](https://pytorch.org/docs/stable/tensors.html), a generalization of matrices to higher ranks. One intuitive example of a tensor is an image with three color channels: A 3-channel (red, green, blue) im... | github_jupyter |
# Spatially Assign Work
In this example, assignments will be assigned to specific workers based on the city district that it falls in. A layer in ArcGIS Online representing the city districts in Palm Springs will be used.
* Note: This example requires having Arcpy or Shapely installed in the Python environment.
### I... | github_jupyter |
# Quantum Generative Adversarial Networks
## Introduction
Generative [adversarial](gloss:adversarial) networks (GANs) [[1]](https://arxiv.org/abs/1406.2661) have swiftly risen to prominence as one of the most widely-adopted methods for unsupervised learning, with showcased abilities in photo-realistic image generatio... | github_jupyter |
## Working with filter pipelines
This Jupyter notebook explains the workflow of setting up and configuring a ground point filtering pipeline. This is an advanced workflow for users that want to define their own filtering workflows. For basic use, preconfigured pipelines are (or rather: will be) provided by `adaptivefi... | github_jupyter |
```
%matplotlib inline
```
(beta) Building a Convolution/Batch Norm fuser in FX
*******************************************************
**Author**: `Horace He <https://github.com/chillee>`_
In this tutorial, we are going to use FX, a toolkit for composable function
transformations of PyTorch, to do the following:
1... | github_jupyter |
```
import torch
import torch.nn as nn
import torch.optim as optim
import torchtext
import torchtext.data as data
import torch.nn.functional as F
import matplotlib.pyplot as plt
import os
import random
%matplotlib inline
%config Completer.use_jedi = False
```
```bash
bash ./preprocess.sh dump-tokenized
cat ~/data/toke... | github_jupyter |
<a href="https://colab.research.google.com/github/kalz2q/mycolabnotebooks/blob/master/numpyexercises.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# 100 numpy exercises
<https://github.com/rougier/numpy-100>
にあったもののコピー。
とりあえず使い方がわからない。まあいいか。やっ... | github_jupyter |
# make regional weights files
```
import rhg_compute_tools.kubernetes as rhgk
import dask.distributed as dd
import dask.dataframe as ddf
import geopandas as gpd
import pandas as pd
import xarray as xr
import numpy as np
import cartopy.crs as ccrs
import cartopy.feature as cfeature
%matplotlib inline
import os
CRS_SU... | github_jupyter |
<a href="https://colab.research.google.com/github/wesleybeckner/technology_fundamentals/blob/main/C2%20Statistics%20and%20Model%20Creation/Tech_Fun_C2_S1_Regression_and_Descriptive_Statistics.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Technol... | github_jupyter |
## Hosting a Pretrained Model on SageMaker
Amazon SageMaker is a service to accelerate the entire machine learning lifecycle. It includes components for building, training and deploying machine learning models. Each SageMaker component is modular, so you're welcome to only use the features needed for your use case... | 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 install numpy --upgrade
!pip -q inst... | github_jupyter |
```
!rm -rf output-*/
```
## Test 1: discretize = False
```
!mkdir -p output-1
!docker run -it \
--mount type='bind',src="$(pwd)",target='/datadir' \
fiddle-v020 \
python -m FIDDLE.run \
--data_fname='/datadir/input/data.csv' \
--population_fname='/datadir/input/pop.csv' \
--config_fname='/datadir... | github_jupyter |
```
import numpy as np
import torch
import gym
import pybullet_envs
import os
import utils
import TD3
import OurDDPG
import DDPG
# Runs policy for X episodes and returns average reward
# A fixed seed is used for the eval environment
def eval_policy(policy, env_name, seed, eval_episodes=10):
eval_env = gym.make(env... | 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 |
# Ramp Optimization Examples
This notebook outlines an example to optimize the ramp settings for a few different types of observations.
In these types of optimizations, we must consider observations constraints such as saturation levels, SNR requirements, and limits on acquisition time.
**Note**: The reported acquis... | github_jupyter |
# How to separate your credentials, secrets, and configurations from your source code with environment variables
## <a id="intro"></a>Introduction
As a modern application, your application always deal with credentials, secrets and configurations to connect to other services like Authentication service, Database, Clou... | github_jupyter |
# Training a Custom TensorFlow.js Audio Model
In this notebook, we show how to train a custom audio model based on the model topology of the
[TensorFlow.js Speech Commands model](https://www.npmjs.com/package/@tensorflow-models/speech-commands).
The training is done in Python by using a set of audio examples stored as... | github_jupyter |
```
# designed to be run after 03-clinical_variables_final. this notebook does some data cleaning/processing. run before -___ notebook.
## cleans many aspects of the raw clinical variables.
## collapses and formats all of the various categorical variables into discrete variables as well.
import pandas as pd
import mat... | github_jupyter |
# `bsym` – a basic symmetry module
`bsym` is a basic Python symmetry module. It consists of some core classes that describe configuration vector spaces, their symmetry operations, and specific configurations of objects withing these spaces. The module also contains an interface for working with [`pymatgen`](http://pym... | github_jupyter |
Visualisation des différentes statistiques de Dbnary
=============
```
import datetime
# PLotting
import bqplot as bq
# Data analys
import numpy as np
from IPython.display import clear_output
from ipywidgets import widgets
from pandasdatacube import *
ENDPOINT: str = "http://kaiko.getalp.org/sparql"
PREFIXES: dict... | github_jupyter |
<CENTER>
<img src="img/PyDataLogoBig-Paris2015.png" width="50%">
<header>
<h1>Introduction to Pandas</h1>
<h3>April 3rd, 2015</h3>
<h2>Joris Van den Bossche</h2>
<p></p>
Source: <a href="https://github.com/jorisvandenbossche/2015-PyDataParis">https://github.com/jorisvandenbossche/2015-PyDataParis</a>... | github_jupyter |
<a href="https://colab.research.google.com/github/daanishrasheed/DS-Unit-2-Applied-Modeling/blob/master/DS_Sprint_Challenge_7.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
_Lambda School Data Science, Unit 2_
# Applied Modeling Sprint Challenge: ... | github_jupyter |
# How to Win in the Data Science Field
## A. Business Understanding
This project aims to answer the question: "How does one win in the Data Science field?"
To gain insight on this main inquiry, I focused on addressing the following:
- Are there major differences in salary among the different data science roles?
- ... | github_jupyter |
## Section 7.0: Introduction to Plotly's Streaming API
Welcome to Plotly's Python API User Guide.
> Links to the other sections can be found on the User Guide's [homepage](https://plotly.com/python/userguide)
Section 7 is divided, into separate notebooks, as follows:
* [7.0 Streaming API introduction](https://plot... | github_jupyter |
# Data Visualization: Rules and Guidelines
> **Co-author**
- [Paul Schrimpf *UBC*](https://economics.ubc.ca/faculty-and-staff/paul-schrimpf/)
**Prerequisites**
- [Introduction to Plotting](../scientific/plotting.ipynb)
**Outcomes**
- Understand steps of creating a visualization
- Know when to use each of the... | github_jupyter |
#### 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](https://plot.ly/python/getting-started/).
<br>You can set up Plotly to work in [online](https://plot.ly/python/getting-started/#initialization-fo... | github_jupyter |
# Введение
Данные интерактивные тетради основаны на языке Python.
Для выполнения кода выберите ячейку с кодом и нажмите `Ctrl + Enter`.
```
from platform import python_version
print("Используемая версия Python:", python_version())
```
Ячейки подразумевают последовательное исполнение.
```
l = [1, 2, 3]
l[0]
type(l)... | github_jupyter |
<a href="https://colab.research.google.com/github/SahityaRoy/AKpythoncodes/blob/main/Copy_of_Untitled22.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
import matplotlib.pyplot as plt
import matplotlib as m... | github_jupyter |
```
import tensorflow as tf
import pandas as pd
import numpy as np
import pickle
from time import time
from utils.df_loader import load_compas_df
from utils.preprocessing import min_max_scale_numerical, remove_missing_values, inverse_dummy
from sklearn.model_selection import train_test_split
from sklearn.tree import D... | github_jupyter |
# Lesson 2: `if / else` and Functions
---
Sarah Middleton (http://sarahmid.github.io/)
This tutorial series is intended as a basic introduction to Python for complete beginners, with a special focus on genomics applications. The series was originally designed for use in GCB535 at Penn, and thus the material has been h... | github_jupyter |
```
given = """
E N T E R L A S E R L A S E R R E S A L
L A S E R O B S I D I A N L A S E R G W
E R E S A L L A S E R L M R R E S A L A
L A S E R R E S A L A O E R L A S E R L
L L E M I T T E R S O S E L R E S A L L
A A M R E S A L E N A S L A L A S E R R
S S R E S A L R S L A R A S R E S A L E
E E L A S E R T R L L E ... | github_jupyter |
```
! pip install h2o
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.metrics import confusion_matrix, roc_curve, auc
from sklearn import tree
import h2o
from h2o.estimators.glm import H2OGeneralizedLinearEstimator
from h2o.estimators.random_forest import H2ORa... | github_jupyter |
# Dragon Real Estate -Price Prediction
```
#load the house dataset
import pandas as pd
housing=pd.read_csv("data.csv")
#sample of first 5 data
housing.head()
#housing information
housing.info()
#or find missing value
housing.isnull().sum()
print(housing["CHAS"].value_counts())
housing.describe()
%matplotlib inline
# ... | github_jupyter |
### This script relies on a active environment with Basemap
If that is not possible, you properly have to outcomment a thing or two.
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os
import time
import geopandas as gpd
from mpl_toolkits.basemap import Basemap
import ezodf
basePath = ... | github_jupyter |
```
import tweepy
import json
import pandas as pd
import csv
import mysql.connector
from mysql.connector import Error
#imports for catching the errors
from ssl import SSLError
from requests.exceptions import Timeout, ConnectionError
from urllib3.exceptions import ReadTimeoutError
#Twitter API credentials
consumer_key... | github_jupyter |
```
import os
import sys
import subprocess
import numpy as np
import pandas as pd
from io import StringIO
os.getcwd()
from skempi_consts import *
import matplotlib.pyplot as plt
%matplotlib inline
%load_ext autoreload
%autoreload 2
import pylab
pylab.rcParams['figure.figsize'] = (10.0, 8.0)
df = skempi_df
ddg1... | github_jupyter |
```
%matplotlib inline
```
# Probability Calibration for 3-class classification
This example illustrates how sigmoid calibration changes predicted
probabilities for a 3-class classification problem. Illustrated is the
standard 2-simplex, where the three corners correspond to the three classes.
Arrows point from the... | github_jupyter |
# VIPERS SHAM Project
This notebook is part of the VIPERS-SHAM project:
http://arxiv.org/abs/xxxxxxx
Copyright 2019 by Ben Granett, granett@gmail.com
All rights reserved.
This file is released under the "MIT License Agreement". Please see the LICENSE
file that should have been included as part of this package.
```
%... | github_jupyter |
## UTAH FORGE PROJECT'S MISSION
Enable cutting-edge research and drilling and technology testing, as well as to allow scientists to identify a replicable, commercial pathway to EGS. In addition to the site itself, the FORGE effort will include a robust instrumentation, data collection, and data dissemination component... | github_jupyter |
##### Copyright 2018 The TF-Agents Authors.
### Get Started
<table class="tfo-notebook-buttons" align="left">
<td>
<a target="_blank" href="https://colab.research.google.com/github/tensorflow/agents/blob/master/tf_agents/colabs/1_dqn_tutorial.ipynb"><img src="https://www.tensorflow.org/images/colab_logo_32px.png... | github_jupyter |
# Chapter 11
*Modeling and Simulation in Python*
Copyright 2021 Allen Downey
License: [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-nc-sa/4.0/)
```
# install Pint if necessary
try:
import pint
except ImportError:
!pip install pint
# downlo... | github_jupyter |
# Solving 10 Queens using pygenetic
In this example we are going to walk through the usage of GAEngine to solve the N-Queens problem
The objective would be to place queens on single board such that all are in safe position
<b>Each configuration of board represents a potential candidate solution for the problem</b>
#... | github_jupyter |
<h1>Table of Contents<span class="tocSkip"></span></h1>
<div class="toc"><ul class="toc-item"><li><span><a href="#Cargamos-librerias" data-toc-modified-id="Cargamos-librerias-1">Cargamos librerias</a></span><ul class="toc-item"><li><span><a href="#metricas-de-evaluacion-(sigmas)-+-funciones-de-utilidad" data-toc-modifi... | github_jupyter |

## Data-X: Titanic Survival Analysis
Data from: https://www.kaggle.com/c/titanic/data
**Authors:** Several public Kaggle Kernels, edits by Alexander Fred Ojala & Kevin Li
<img src="data/Titanic_Variable.png">
# Note
Install xgboost package in your pyhton enviroment:
try:... | github_jupyter |
Now it's your turn to test your new knowledge of **missing values** handling. You'll probably find it makes a big difference.
# Setup
The questions will give you feedback on your work. Run the following cell to set up the feedback system.
```
# Set up code checking
import os
if not os.path.exists("../input/train.csv... | github_jupyter |
```
import numpy as np
import cv2
import matplotlib.pyplot as plt
from tensorflow.keras import models
import tensorflow.keras.backend as K
import tensorflow as tf
from sklearn.metrics import f1_score
import requests
import xmltodict
import json
plateCascade = cv2.CascadeClassifier('indian_license_plate.xml')
#detect th... | github_jupyter |
Diodes
===
The incident flux and the current that is generated by a photodiode subjected to it are related by
$$
\begin{equation}
\begin{split}
I(A)=&\sum_{i,j}P_{i,j}(W)R_{j}(A/W)+D(A)\\
P_{i,j}(W)=&I_{i,j}(Hz)E_{j}(\text{keV})\\
R_{j}(A/W)=&\frac{e(C)}{E_{h}(\text{keV})}[1-e^{-\mu(E_{j})\rho d}]
\end{split}
\end{eq... | github_jupyter |
# Accessing C Struct Data
This notebook illustrates the use of `@cfunc` to connect to data defined in C.
## Via CFFI
Numba can map simple C structure types (i.e. with scalar members only) into NumPy structured `dtype`s.
Let's start with the following C declarations:
```
from cffi import FFI
src = """
/* Define t... | github_jupyter |
# Final Project
## Daniel Blessing
## Can we use historical data from professional league of legends games to try and predict the results of future contests?
## Load Data
```
from sklearn.ensemble import RandomForestClassifier, ExtraTreesClassifier # ensemble models we're trying out
from sklearn.model_selectio... | github_jupyter |
```
%load_ext autoreload
%pylab inline
%autoreload 2
import seaborn as sns
import pandas as pd
import numpy as np
import sys
sys.path.append('..')
import tensorflow as tf
from tuning_manifold.fnp_model import Predictor
from tuning_manifold.util import negloglik, pearson
tfk = tf.keras
# construct a model with archi... | github_jupyter |
[source](../../api/alibi_detect.ad.adversarialae.rst)
# Adversarial Auto-Encoder
## Overview
The adversarial detector follows the method explained in the [Adversarial Detection and Correction by Matching Prediction Distributions](https://arxiv.org/abs/2002.09364) paper. Usually, autoencoders are trained to find a tr... | github_jupyter |
# **Testing for Stuctural Breaks in Time Series Data with a Chow Test**
## **I. Introduction**
I've written a bit on forecasting future stock prices and distributions of future stock prices. I'm proud of the models I built for those articles, but they will eventually be no more predictive than a monkey throwing darts... | github_jupyter |
### About
The goal of this script is to process a few common keyphrase datasets, including
- **Tokenize**: by default using method from Meng et al. 2017, which fits more for academic text since it splits strings by hyphen etc. and makes tokens more fine-grained.
- keep [_<>,\(\)\.\'%]
- replace digits with ... | github_jupyter |
# Misc tests used for evaluating how well RSSI translates to distance
Note - this notebook still needs to be cleaned. We include it here so this work won't be lost
```
%matplotlib inline
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
onemeter_file_path = '../data/rssi_distance/expt4/expt_07_11... | github_jupyter |
# Displacement controlled normal contact
***
In this notebook we will make a contact model which solves a normal contact problem with a specified displacement.
For normal contact problems with specified loads see the 'recreating the hertz solition numerically' example.
Here again we will use the hertz solution as an... | github_jupyter |
# Cell Editing
DataGrid cells can be edited using in-place editors built into DataGrid. Editing can be initiated by double clicking on a cell or by starting typing the new value for the cell.
DataGrids are not editable by default. Editing can be enabled by setting `editable` property to `True`. Selection enablement is... | github_jupyter |
```
#convert
```
# babilim.training.losses
> A package containing all losses.
```
#export
from collections import defaultdict
from typing import Any
import json
import numpy as np
import babilim
from babilim.core.itensor import ITensor
from babilim.core.logging import info
from babilim.core.tensor import Tensor
from... | github_jupyter |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
# Inference Bert Model for High Performance with ONNX Runtime on AzureML #
This tutorial includes how to pretrain and finetune Bert models using AzureML, convert it to ONNX, and then deploy the ONNX model with ONNX Runtime thr... | github_jupyter |
```
import numpy as np
import pandas as pd
import re, nltk, spacy, gensim
import en_core_web_sm
from tqdm import tqdm
# Sklearn
from sklearn.decomposition import LatentDirichletAllocation, TruncatedSVD, NMF
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
from sklearn.model_selection import... | github_jupyter |
```
import numpy as np
import cv2
# read image
img = cv2.imread('sample.jpg', 0)# IMREAD_GRAYSCALE, IMREAD_COLOR
%matplotlib inline
from matplotlib import pyplot as plt
plt.imshow(img, cmap = 'gray', interpolation = 'bicubic')
plt.xticks([]), plt.yticks([]) # to hide tick values on X and Y axis
plt.show()
```
# 1.... | github_jupyter |
# Object-based filtering of pixel classifications <img align="right" src="../figs/DE_Africa_Logo_Stacked_RGB_small.jpg">
## Background
Geographic Object-Based Image Analysis (GEOBIA), which aims to group pixels together into meaningful image-objects. There are two advantages to a GEOBIA worklow; one, we can reduce th... | github_jupyter |
<a href="https://colab.research.google.com/github/AI4Finance-LLC/FinRL/blob/master/FinRL_ensemble_stock_trading_ICAIF_2020.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Deep Reinforcement Learning for Stock Trading from Scratch: Multiple Stock T... | github_jupyter |
# Text Classification using LSTM
This Code Template is for Text Classification using Long short-term memory in python
<img src="https://cdn.blobcity.com/assets/gpu_required.png" height="25" style="margin-bottom:-15px" />
### Required Packages
```
!pip install tensorflow
!pip install nltk
import pandas as pd
im... | github_jupyter |
# Deep learning models for age prediction on EEG data
This notebook uses deep learning methods to predict the age of infants using EEG data. The EEG data is preprocessed as shown in the notebook 'Deep learning EEG_dataset preprocessing raw'.
```
import sys, os, fnmatch, csv
import numpy as np
import pandas as pd
impo... | github_jupyter |
# Descriptive statistics
```
import numpy as np
import seaborn as sns
import scipy.stats as st
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import pandas as pd
import statsmodels.api as sm
import statistics
import os
from scipy.stats import norm
```
## Probability data, binomial distribution
We al... | github_jupyter |
```
from google.colab import drive
drive.mount('/content/drive')
import torch
# If there's a GPU available...
if torch.cuda.is_available():
# Tell PyTorch to use the GPU.
device = torch.device("cuda")
print('There are %d GPU(s) available.' % torch.cuda.device_count())
print('We will use the ... | github_jupyter |
# Qiskit: Open-Source Quantum Development, an introduction
---
### Workshop contents
1. Intro IBM Quantum Lab and Qiskit modules
2. Circuits, backends, visualization
3. Quantum info, circuit lib, algorithms
4. Circuit compilation, pulse, opflow
## 1. Intro IBM Quantum Lab and Qiskit modules
### https://... | github_jupyter |
# Pivotal method vs Percentile Method
In this notebook we will explore the difference between the **pivotal** and **percentile** bootstrapping methods.
tldr -
* The **percentile method** generates a bunch of re-samples and esimates confidence intervals based on the percentile values of those re-samples.
* The **piv... | github_jupyter |
Cesar Andrés Galindo Villalobos /
Juan Sebastian Correa Paez
**MOVIMIENTO DE UN CUERPO HACÍA UN PLANETA**
Un cuerpo de masa m2, parte desde una posición (a,b), con una velocidad horizontal Vx y una velocidad vertical Vy hacía un planeta de masa 1, radio R y con un centro de gravedad ubicado en el punto (h,k) del sist... | github_jupyter |
```
import sys
sys.path.append('/Users/mic.fell/Documents/venvs/jupyter/lib/python3.6/site-packages')
import pandas as pd
import html
from functools import reduce
import re
import numpy as np
from nltk import word_tokenize
import spacy
import pronouncing
from textblob import TextBlob
from sklearn.preprocessing impor... | github_jupyter |
```
import os
import sys
from os.path import dirname
proj_path = dirname(os.getcwd())
sys.path.append(proj_path)
from typing import Mapping
import torch
import torch.distributions as D
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import tqdm
from absl import app
from absl import f... | github_jupyter |
# Image Classification Neo Compilation Example - Local Mode
This notebook shows an intermediate step in the process of developing an Edge image classification algorithm.
## Notebook Setup
```
%matplotlib inline
import time
import os
#os.environ["CUDA_VISIBLE_DEVICES"]="0"
import tensorflow as tf
import numpy as np... | github_jupyter |
# Basic Distributions
### A. Taylan Cemgil
### Boğaziçi University, Dept. of Computer Engineering
### Notebook Summary
* We review the notation and parametrization of densities of some basic distributions that are often encountered
* We show how random numbers are generated using python libraries
* We show some basic... | github_jupyter |
```
import sys
if not './' in sys.path:
sys.path.append('./')
import pandas as pd
import numpy as np
import io
import os
from datetime import datetime
from sklearn import preprocessing
from sklearn.model_selection import train_test_split
from envs.stocks_env_multiaction import Stocks_env
from datasets import nyse
... | github_jupyter |
### Package Imports
```
#Package imports
import pandas as pd
import numpy as np
import calendar
import matplotlib.pyplot as plt
import seaborn as sns
import plotly
import utils
sns.set_style('darkgrid')
from pandas_datareader import data #Package for pulling data from the web
from datetime import date
from fbprophet i... | github_jupyter |
```
import pandas as pd
import numpy as np
import seaborn as sb
%matplotlib inline
import matplotlib.pyplot as plt
df = pd.read_csv('C:\\\\Users\kimte\\git\\data-analytics-and-science\\exercises\\exercise 1 - loan prediction problem\\data\\train.csv')
df.shape
type(df)
df.info()
df.head()
```
# Missing values identifi... | github_jupyter |
# Using multi-armed bandits to choose the best model for predicting credit card default
## Dependencies
- [helm](https://github.com/helm/helm)
- [minikube](https://github.com/kubernetes/minikube) --> install 0.25.2
- [s2i](https://github.com/openshift/source-to-image)
- Kaggle account to download data.
- Python pack... | github_jupyter |
<img src="NotebookAddons/blackboard-banner.png" width="100%" />
<font face="Calibri">
<br>
<font size="7"> <b> GEOS 657: Microwave Remote Sensing<b> </font>
<font size="5"> <b>Lab 9: InSAR Time Series Analysis using GIAnT within Jupyter Notebooks<br>Part 2: GIAnT <font color='rgba(200,0,0,0.2)'> -- [## Points] </font>... | github_jupyter |
*Python Machine Learning 2nd Edition* by [Sebastian Raschka](https://sebastianraschka.com), Packt Publishing Ltd. 2017
Code Repository: https://github.com/rasbt/python-machine-learning-book-2nd-edition
Code License: [MIT License](https://github.com/rasbt/python-machine-learning-book-2nd-edition/blob/master/LICENSE.tx... | 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 |
```
#Imported relevant and necessary libraries and data cleaning tools
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import hypertools as hyp
from glob import glob as lsdir
import os
import re
import datetime as dt
from sklearn import linear_model
from sklearn.neural_netw... | github_jupyter |
# Ex 12
```
import tensorflow as tf
from tensorflow import keras
import os
import numpy as np
import matplotlib.pyplot as plt
from tensorflow.keras.datasets import mnist
from tensorflow.keras import models
from tensorflow.keras import layers
from tensorflow.keras.utils import to_categorical
from matplotlib.pyplot impo... | github_jupyter |
# Prophecy of ATM Withdrawals
Agus Gunawan, Holy Lovenia
## Importing dataset
```
from datetime import datetime
from pandas import read_csv
import pandas as pd
from os import listdir, mkdir
from os.path import exists, isfile, join
```
### Read train data
#### Functions
```
def get_files_from_dir_path(dir_path):
... | github_jupyter |
```
import os
os.chdir('/Users/sheldon/git/podly_app/new_files')
import glob
files = [f for f in os.listdir('.') if os.path.isfile(f)]
files = glob.glob('*.txt')
import pandas as pd
series = []
for i in files:
series.append(i.split('.mp3')[0])
x = pd.DataFrame(series)
def read_podcast(file):
tempFile = open(fil... | github_jupyter |
# Imports
```
import pandas as pd
import numpy as np
import seaborn as sns
import pycountry_convert as pc
import statsmodels.formula.api as sm
from statsmodels.tsa.seasonal import STL
from scipy.stats import pearsonr
from scipy.misc import derivative
from scipy.optimize import fsolve
import numpy as np
sns.set_style('... | github_jupyter |
```
import numpy as np
import pandas as pd
np.random.seed(42)
import tensorflow as tf
tf.set_random_seed(42)
from keras.models import Model
from keras.layers import Dense, Conv2D, BatchNormalization, MaxPooling2D, Flatten, Dropout, Input
from keras.preprocessing.image import ImageDataGenerator
from keras.optimizers imp... | github_jupyter |
```
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import glob
%matplotlib inline
### Reading all file from glob module
### The glob module is used to retrieve files/pathnames matching a specified pattern.
path = r'E:\project\Transport_Vehicle_Online_Sales\Data_Vehicle_Sales'
all_files = glob... | github_jupyter |
```
from collections import Counter
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import ast
import json
df = pd.read_csv('/home/amir/projects/light-sa-type-inf/ManyTypes4Py_processed_fix_feb2/all_fns.csv',
low_memory=False)
jsons_merged = json.load(open('/home/amir/ManyTypes4P... | github_jupyter |
```
d
```
## Import Required Libraries
```
import glob
import numpy as np
import pandas as pd
EXPERIMENT_ID = '1005'
experiment_dir = 'outputs/experiment_{}/'.format(EXPERIMENT_ID)
results_path = experiment_dir + 'results.npy'
schedules_path = experiment_dir + 'schedulesWithMakespan.npy'
log_paths = glob.glob(experi... | github_jupyter |
```
# code for loading the format for the notebook
import os
# path : store the current path to convert back to it later
path = os.getcwd()
os.chdir( os.path.join('..', 'notebook_format') )
from formats import load_style
load_style()
os.chdir(path)
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt... | github_jupyter |
```
import torch
import torch.optim as optim
import torch.nn.functional as F
import torchvision
import torchvision.datasets as datasets
import torchvision.models as models
import torchvision.transforms as transforms
import time
import matplotlib.pyplot as plt
import numpy as np
dataset = datasets.ImageFolder(
'dat... | github_jupyter |
## Imports
```
%matplotlib inline
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split, cross_val_score
from sklearn.metrics import mean_squared_error
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model ... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.