code stringlengths 2.5k 150k | kind stringclasses 1
value |
|---|---|
# Polynomial interpolation
---
Perform polynomial interpolation of air density from the data in the following table.
$$
\begin{aligned}
& \text {Table with air density against temperature}\\
&\begin{array}{c|c}
Temperature & Density \\
^\circ\,C & kg\,m^{-3} \\
\hline
100 & 0.946 \\
150 & 0.835 \\
200 & 0.746 \... | github_jupyter |
<table> <tr>
<td style="background-color:#ffffff;">
<a href="http://qworld.lu.lv" target="_blank"><img src="..\images\qworld.jpg" width="25%" align="left"> </a></td>
<td style="background-color:#ffffff;vertical-align:bottom;text-align:right;">
prepared by Berat Yenilen, Utku Bir... | github_jupyter |
# Jupyter Bridge Basic
## Yihang Xin and Alex Pico
## 2021-04-04
# Why use Jupyter Bridge
* Users do not need to worry about dependencies and environment.
* Easily share notebook-based workflows and data sets
* Workflows can reside in the cloud, access cloud resources, and yet still use Cytoscape features.
# How Jupy... | github_jupyter |
```
%matplotlib inline
import os.path
import pprint
import pandas as pd
from gmprocess.io.asdf.stream_workspace import StreamWorkspace
from gmprocess.io.test_utils import read_data_dir
from gmprocess.io.read import read_data
from gmprocess.streamcollection import StreamCollection
from gmprocess.processing import proc... | github_jupyter |
# Day 6: Bagging and gradient boosting.
This practice notebook is based on Evgeny Sokolov's awesome [materials](https://github.com/esokolov/ml-course-hse/blob/master/2020-fall/seminars/sem09-gbm-part2.ipynb) and [this notebook](https://github.com/neychev/harbour_ml2020/blob/master/day07_Gradient_boosting/07_trees_boos... | github_jupyter |
```
# Check Python Version
import sys
import scipy
import numpy
import matplotlib
import pandas
import sklearn
print('Python: {}'.format(sys.version))
print('scipy: {}'.format(scipy.__version__))
print('numpy: {}'.format(numpy.__version__))
print('matplotlib: {}'.format(matplotlib.__version__))
print('pandas: {}'.form... | github_jupyter |
<a href="https://colab.research.google.com/github/rizwandel/Auto_TS/blob/master/Copy_of_Q%26A_on_PDF_Files.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
!pip install cdqa
!pip install flask-ngrok
import os
import pandas as pd
from ast import l... | github_jupyter |
# GMNS to AequilibraE example
## Inputs
1. Nodes as a .csv flat file in GMNS format
2. Links as a .csv flat file in GMNS format
3. Trips as a .csv flat file, with the following columns: orig_node, dest_node, trips
4. Sqlite database used by AequilibraE
## Steps
1. Read the GMNS nodes
- Place in SQLite database... | github_jupyter |
```
import matplotlib.pyplot as plt
import requests
from bs4 import BeautifulSoup
import pandas as pd
from tqdm import tqdm
from ratelimit import limits, sleep_and_retry
import Edgar_scrapper
import re
pd.set_option('display.max_colwidth',200)
edgar_access = Edgar_scrapper.EdgarAccess()
def get_fillings(fillings_ticke... | github_jupyter |
```
%reset -f
# libraries used
# https://stats.stackexchange.com/questions/181/how-to-choose-the-number-of-hidden-layers-and-nodes-in-a-feedforward-neural-netw
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
from sklearn... | github_jupyter |
Clasificación de las imágenes.
The problem: clasificación del dataset MNIST
- clasificación en escala de grises
- dígitos handwritten
- 28x28px
- 10 categorías (0-9)
```
# tensorflow low level library
# keras high level library
from tensorflow import keras
from tensorflow.keras import models
from tensorflow.keras imp... | github_jupyter |
# Performance analysis of a uniform linear array
We compare the MSE of MUSIC with the CRB for a uniform linear array (ULA).
```
import numpy as np
import doatools.model as model
import doatools.estimation as estimation
import doatools.performance as perf
import matplotlib.pyplot as plt
%matplotlib inline
wavelength =... | 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 |
<a href="https://colab.research.google.com/github/Tenntucky/DS-Unit-1-Sprint-1-Dealing-With-Data/blob/master/module1-afirstlookatdata/Kole_Goldsberry_LS_DSPT3_111_A_First_Look_at_Data.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Lambda School D... | github_jupyter |
## Gender Recognition by Voice Project
In this project, we will classify a person's gender by his/her various aspects of voice using different classification methods like logistic regression, k-nearest neighbors, Naive Bayes. These methods will be completely implemented from sratch using pure Python and related mathema... | github_jupyter |
# Oddstradamus
### Good odds and where to find them
### Introduction
In the long run, the bookmaker always wins. The aim of this project is to disprove exactly this. We are in the football sports betting market and are trying to develop a strategy that is profitable in the long term and which will make the bookmaker ... | github_jupyter |
# Fast Bernoulli: Benchmark Python
In this notebooks we will measure performance of generating sequencies of Bernoulli-distributed random varibales in Python without and within LLVM JIT compiler. The baseline generator is based on top of expression `random.uniform() < p`.
```
import numpy as np
import matplotlib.pypl... | github_jupyter |
# Proyecto 3.
- Carlos González Mendoza
- Raul Enrique González Paz
- Juan Andres Serrano Rivera
Para este proyecto revisaremos los precios ajustados de las empresas **ADIDAS**, **NIKE** y **UNDER ARMOUR**, ya que son las dos empresas deportivas mas grandes del mundo. Y aparte son un trio de empresas con gran impacto ... | github_jupyter |
# Install dependencies
```
!pip install pretrainedmodels
!pip install albumentations==0.4.5
!pip install transformers
# install dependencies for TPU
#!curl https://raw.githubusercontent.com/pytorch/xla/master/contrib/scripts/env-setup.py -o pytorch-xla-env-setup.py
#!python pytorch-xla-env-setup.py --apt-packages libo... | github_jupyter |
# CS229: Problem Set 3
## Problem 1: A Simple Neural Network
**C. Combier**
This iPython Notebook provides solutions to Stanford's CS229 (Machine Learning, Fall 2017) graduate course problem set 3, taught by Andrew Ng.
The problem set can be found here: [./ps3.pdf](ps3.pdf)
I chose to write the solutions to the co... | github_jupyter |
## Dependencies
```
# Dependencies to Visualize the model
%matplotlib inline
from IPython.display import Image, SVG
import matplotlib.pyplot as plt
import numpy as np
np.random.seed(0)
# Filepaths, numpy, and Tensorflow
import os
import numpy as np
import tensorflow as tf
# Sklearn scaling
from sklearn.preprocessing i... | github_jupyter |
# Self-Driving Car Engineer Nanodegree
## Project: **Finding Lane Lines on the Road**
***
In this project, you will use the tools you learned about in the lesson to identify lane lines on the road. You can develop your pipeline on a series of individual images, and later apply the result to a video stream (really j... | github_jupyter |
# Summarizing Data
> What we have is a data glut.
>
> \- Vernor Vinge, Professor Emeritus of Mathematics, San Diego State University
## Applied Review
### Dictionaries
* The `dict` structure is used to represent **key-value pairs**
* Like a real dictionary, you look up a word (**key**) and get its definition (**va... | github_jupyter |
```
import csv
import datetime
import json
import matplotlib.pyplot as plt
import numpy as np
import os
```
## Constants
```
LOGDIR = '../trace-data'
DATE_FORMAT_STR = '%Y-%m-%d %H:%M:%S'
MINUTES_PER_DAY = (24 * 60)
MICROSECONDS_PER_MINUTE = (60 * 1000)
```
## Utility code
```
def parse_date(date_str):
"""Parse... | github_jupyter |
# Scikit-Learn Practice Exercises
This notebook offers a set of excercises for different tasks with Scikit-Learn.
Notes:
* There may be more than one different way to answer a question or complete an exercise.
* Some skeleton code has been implemented for you.
* Exercises are based off (and directly taken from) the ... | github_jupyter |
This material has been adapted by @dcapurro from the Jupyter Notebook developed by:
Author: [Yury Kashnitsky](https://yorko.github.io). Translated and edited by [Christina Butsko](https://www.linkedin.com/in/christinabutsko/), [Yuanyuan Pao](https://www.linkedin.com/in/yuanyuanpao/), [Anastasia Manokhina](https://www.... | github_jupyter |
# Example of building a MLDataSet
## Building a Features MLDataSet from a Table
```
from PrimalCore.heterogeneous_table.table import Table
from ElementsKernel.Path import getPathFromEnvVariable
ph_catalog=getPathFromEnvVariable('PrimalCore/test_table.fits','ELEMENTS_AUX_PATH')
catalog=Table.from_fits_file(ph_catalog,... | github_jupyter |
<a href="https://www.pythonista.io"> <img src="img/pythonista.png"></a>
## Análisis econométrico.
Un análisis econométrico consiste en la aplicaciónde técnicas estadísticas para poder crear modelos capaces de predecir con cierto grado de confianza los fenoménos y observados.
https://economipedia.com/definiciones/mod... | github_jupyter |
# Week 2 -- Probability
<img align="right" style="padding-right:10px;" src="figures_wk2/stats_cover.png" width=200><br>
**Resources and References**
>**Practical Statistics for Data Scientists, 2nd Edition**<br>
>by Peter Bruce, Andrew Bruce, Peter Gedeck<br>
>Publisher: O'Reilly Media, Inc.<br>
>Release Date: May 20... | github_jupyter |
# Using surface roughness to date landslides
### Overview
In March of 2014, unusually high rainfall totals over a period of several weeks triggered a deep-seated landslide that mobilized into a rapidly moving debris flow. The debris flow inundated the town of Oso, Washington, resulting in 43 fatalities and the destruc... | github_jupyter |
## regular expressions
```
input_str = "Yes, my zip code is 12345. I heard that Gary's zip code is 23456. But 212 is not a zip code."
import re
zips= re.findall(r"\d{5}", input_str)
zips
from urllib.request import urlretrieve
urlretrieve("https://raw.githubusercontent.com/ledeprogram/courses/master/databases/data/enro... | github_jupyter |
# Bite Size Bayes
Copyright 2020 Allen B. Downey
License: [Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
```
## The Euro problem
In [a previous notebook](https:... | github_jupyter |
# Monte Carlo Simulation of Dividend Discount Model
## Description
You are trying to determine the value of a mature company. The company has had stable dividend growth for a long time so you select the dividend discount model (DDM).
$$P = \frac{d_1}{r_s - g}$$
### Level 1
- The next dividend will be \\$1 and your ba... | github_jupyter |
# Dynamic Recurrent Neural Network.
TensorFlow implementation of a Recurrent Neural Network (LSTM) that performs dynamic computation over sequences with variable length. This example is using a toy dataset to classify linear sequences. The generated sequences have variable length.
- Author: Aymeric Damien
- Project: ... | github_jupyter |
# Wright-Fisher model of mutation and random genetic drift
A Wright-Fisher model has a fixed population size *N* and discrete non-overlapping generations. Each generation, each individual has a random number of offspring whose mean is proportional to the individual's fitness. Each generation, mutation may occur.
## S... | github_jupyter |
<img src="images/usm.jpg" width="480" height="240" align="left"/>
# MAT281 - Laboratorio N°04
## Objetivos de la clase
* Reforzar los conceptos básicos de los módulos de pandas.
## Contenidos
* [Problema 01](#p1)
* [Problema 02](#p2)
## Problema 01
<img src="https://image.freepik.com/vector-gratis/varios-automo... | github_jupyter |
# Dependencies
```
import os, warnings, shutil
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from transformers import AutoTokenizer
from sklearn.utils import shuffle
from sklearn.model_selection import StratifiedKFold
SEED = 0
warnings.filterwarnings("ignore")
```
# Pa... | github_jupyter |
```
import numpy as np
import lqrpols
import matplotlib.pyplot as plt
```
Here is a link to [lqrpols.py](http://www.argmin.net/code/lqrpols.py)
```
np.random.seed(1337)
# state transition matrices for linear system:
# x(t+1) = A x (t) + B u(t)
A = np.array([[1,1],[0,1]])
B = np.array([[0],[1]])
d,p = B.shape
#... | github_jupyter |
```
#default_exp core
#export
from local.test import *
from local.imports import *
from local.notebook.showdoc import show_doc
```
# Core
> Basic functions used in the fastai library
```
# export
defaults = SimpleNamespace()
```
## Metaclasses
```
#export
class PrePostInitMeta(type):
"A metaclass that calls op... | github_jupyter |
# Python for ML
> Basic Python reference useful for ML
- toc: true
- badges: true
- comments: true
- categories: [Python, NumPy, Pandas]
- image: images/py.png
----------------------------------------------------------------------------------------------------------------------------
## Python Collections
Collecti... | github_jupyter |
```
# ------------------------- #
# SET - UP #
# ------------------------- #
# ---- Requirements ----- #
#!pip install datasets
#!pip install sentencepiece
#!pip install transformers
#!pip install jsonlines
import csv
import datasets
from google.colab import drive
import huggingface_hub
import j... | github_jupyter |
# Encoding of categorical variables
In this notebook, we will present typical ways of dealing with
**categorical variables** by encoding them, namely **ordinal encoding** and
**one-hot encoding**.
Let's first load the entire adult dataset containing both numerical and
categorical data.
```
import pandas as pd
adult... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
import torch
device = 'cuda' if torch.cuda.is_available() else 'cpu'
import os,sys
opj = os.path.join
from copy import deepcopy
import pickle as pkl
sys.path.append('../../src')
sys.path.append('../../src/dsets... | github_jupyter |
This notebook is part of the orix documentation https://orix.readthedocs.io. Links to the documentation won’t work from the notebook.
## Visualizing point groups
Point group symmetry operations are shown here in the stereographic projection.
Vectors located on the upper (`z >= 0`) hemisphere are displayed as points ... | github_jupyter |
## Loan EDA
```
import pandas as pd
import numpy as np
dtrain = pd.read_csv('data/train.csv')
test = pd.read_csv('data/test.csv')
```
## Data Cleaning
```
dtrain.head()
dtrain.shape
# Removing the commas form `Loan_Amount_Requested`
dtrain['Loan_Amount_Requested'] = dtrain.Loan_Amount_Requested.str.replace(',', '').... | github_jupyter |
# Merging Databases
```
import pandas as pd
help(pd.merge)
df = pd.DataFrame([{'Name': 'Chris', 'Item Purchased': 'Sponge', 'Cost': 22.50},
{'Name': 'Kevyn', 'Item Purchased': 'Kitty Litter', 'Cost': 2.50},
{'Name': 'Filip', 'Item Purchased': 'Spoon', 'Cost': 5.00}],
... | github_jupyter |
```
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
base_path = './data/ML-1M/'
ratings = pd.read_csv(base_path+'ratings.csv', sep='\t',
encoding='latin-1',
usecols=['user_id', 'movie_id', 'rating'])
users = pd.read_csv(base_path+'users.csv'... | github_jupyter |
# Configuracion de grafica a usar
```
import os
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID";
# lA ID de la GPU a usar, puede ser desde 0 hasta las N GPU's. Si es -1 significa que es en la CPU
os.environ["CUDA_VISIBLE_DEVICES"]="1";
```
# Importacion de librerias
```
from __future__ import absolute_import, divisio... | github_jupyter |
```
# hide
from nbdev.showdoc import *
```
# Load model from Weights & Biases (wandb)
This tutorial is for people who are using [Weights & Biases (wandb)](https://wandb.ai/site) `WandbCallback` in their training pipeline and are looking for a convenient way to use saved models on W&B cloud to make predictions, evalua... | github_jupyter |
```
# Copyright 2019 Google LLC
#
# 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 writi... | github_jupyter |
<a href="https://colab.research.google.com/github/LedaiThomasNilsson/github-slideshow/blob/master/C3_W1_Lab_1_transfer_learning_cats_dogs.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Basic transfer learning with cats and dogs data
### Import t... | github_jupyter |
# Notebook 5: Clean Up Resources
Specify "Python 3" Kernel and "Data Science" Image.
### Background
In this notebook, we will clean up the resources we provisioned during this workshop:
- SageMaker Feature Groups
- SageMaker Endpoints
- Amazon Kinesis Data Stream
- Amazon Kinesis Data Analytics application
### Im... | github_jupyter |
# PharmSci 175/275 (UCI)
## What is this??
The material below is a Jupyter notebook including some lecture content to supplement class material on fluctuations, correlations, and error analysis from Drug Discovery Computing Techniques, PharmSci 175/275 at UC Irvine.
Extensive materials for this course, as well as ext... | github_jupyter |
```
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import math
import json
import os
class cell_migration3:
def __init__(self, L ,W, H, N0, C0, Uc, Un, Dc, Dn, Qcb0, Qcd0, Qn, A0, dx, dt):
#W = 10 #width
#L = 850 #length
#H = 17 #he... | github_jupyter |
```
import numpy as np
exp = np.exp
arange = np.arange
ln = np.log
from datetime import *
import matplotlib.pyplot as plt
from matplotlib import patches
# import plotly.plotly as py
# import plotly.graph_objs as go
from scipy.stats import norm
from scipy import interpolate as interp
pdf = norm.pdf
cdf = norm.cdf
ppf... | github_jupyter |
[View in Colaboratory](https://colab.research.google.com/github/tomwilde/100DaysOfMLCode/blob/master/2_numpy_linearRegression_with_CostFn.ipynb)
```
!pip install -U -q PyDrive
import numpy as np
import matplotlib.pyplot as plt
import pandas
import io
# Install the PyDrive wrapper & import libraries.
# This only nee... | github_jupyter |
# A demo of XYZ and RDKitMol
There is no easy way to convert xyz to RDKit Mol/RWMol. Here RDKitMol shows a possibility by using openbabel / method from Jensen et al. [1] as a molecule perception backend.
[1] https://github.com/jensengroup/xyz2mol.
```
import os
import sys
sys.path.append(os.path.dirname(os.path.abs... | github_jupyter |
# Dimensionality Reduction with the Shogun Machine Learning Toolbox
#### *By Sergey Lisitsyn ([lisitsyn](https://github.com/lisitsyn)) and Fernando J. Iglesias Garcia ([iglesias](https://github.com/iglesias)).*
This notebook illustrates <a href="http://en.wikipedia.org/wiki/Unsupervised_learning">unsupervised learnin... | github_jupyter |
___
<a href='http://www.pieriandata.com'> <img src='../Pierian_Data_Logo.png' /></a>
___
# Decision Trees and Random Forests in Python
This is the code for the lecture video which goes over tree methods in Python. Reference the video lecture for the full explanation of the code!
I also wrote a [blog post](https://me... | github_jupyter |
# NOTE
# IMPORTS
```
# Architecture
from keras import layers
from keras import models
from keras.preprocessing.image import load_img
from keras import backend as K
from keras.utils import plot_model
# Automatic Downloads
import numpy as np
import requests
import time
import os
# Image labeling
import cv2
import imu... | github_jupyter |
# Feature List View
## Usage
```
import sys, json, math
from mlvis import FeatureListView
from random import uniform, gauss
from IPython.display import display
if sys.version_info[0] < 3:
import urllib2 as url
else:
import urllib.request as url
def generate_random_steps(k):
randoms = [uniform(0, 1) /... | github_jupyter |
```
from selenium import webdriver
#import urllib you can use urllib to send web request to websites and get back html text as response
import pandas as pd
from bs4 import BeautifulSoup
from selenium.webdriver.common.keys import Keys
from lxml import html
import numpy
# import dependencies
browser = webdriver.Firefox()... | github_jupyter |
```
# General purpose libraries
import boto3
import copy
import csv
import datetime
import json
import numpy as np
import pandas as pd
import s3fs
from collections import defaultdict
import time
import re
import random
from sentence_transformers import SentenceTransformer
import sentencepiece
from scipy.spatial import ... | github_jupyter |
# Investigating ocean models skill for sea surface height with IOOS catalog and Python
The IOOS [catalog](https://ioos.noaa.gov/data/catalog) offers access to hundreds of datasets and data access services provided by the 11 regional associations.
In the past we demonstrate how to tap into those datasets to obtain sea... | github_jupyter |
### Made by Kartikey Sharma (IIT Goa)
### GOAL
Predicting the costs of used cars given the data collected from various sources and distributed across various locations in India.
#### FEATURES:
<b>Name</b>: The brand and model of the car.<br>
<b>Location</b>: The location in which the car is being sold or is availabl... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
import starry
import exoplanet as exo
starry.__version__
map = starry.Map(ydeg=20, udeg=2, rv=True, lazy=False)
time, vels, verr = np.loadtxt('../data/transit.vels', usecols=[0,1,2], unpack=True)
time -= 2458706.5
Prot = 2.85 # days
P = 8.1387 ... | github_jupyter |
Includes:
```
import matplotlib.pyplot as plt
import numpy as np
import math
import pandas as pd
import seaborn as sns
import scipy.integrate
```
Data and plots for Figure 2. Figure 1 is a cartoon while Figures 3-5 were produced directly in the ParaView visualisation software from the ChemChaste simulation output. Th... | github_jupyter |
In this notebook, we shall test the centered images on all major machine learning methods that predate neural networks. We do this in order to establish a baseline of performance for any later classifer that is developed.
```
import numpy as np
from scipy import *
import os
import h5py
from keras.utils import np_utils... | github_jupyter |
# Generating a Word Cloud
For this project, we generate a "word cloud" from a given text file. The script will process the text (should be "utf-8" encoded), remove punctuation, ignore words that do not contain english alphabets, ignore uninteresting or irrelevant words, and count the word frequencies. It then uses the... | github_jupyter |
```
library(dslabs)
library(HistData)
library(tidyverse)
data(heights)
data(Galton)
data(murders)
# HarvardX Data Science Course
# Module 2: Data Visualization
x <- Galton$child
x_with_error <- x
x_with_error[1] <- x_with_error[1] * 10
mean(x_with_error) - mean(x)
sd(x_with_error) - sd(x)
# Median and MAD (median abso... | github_jupyter |
```
import pandas as pd
df = pd.read_csv("../k2scoc/results/tables/full_table.csv")
hasflares = (df.real==1) & (df.todrop.isnull())
wassearched = (df.real==0) & (df.todrop.isnull())
df = df[hasflares & (df.cluster=="hyades") & (df.Teff_median > 3250.) & (df.Teff_median < 3500.)]
df[["EPIC"]].drop_duplicates()
```
3... | github_jupyter |
# Import Libraries
```
from __future__ import print_function
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets, transforms
```
## Data Transformations
```
# Train Phase transformations
train_transforms = transforms.Compose([
... | github_jupyter |
# Análise de Dados da Plataforma Consumidor.gov.br em 2019
O Consumidor.gov.br, plataforma criada pelo Governo Federal como alternativa para desafogar o Procon, trouxe ainda uma maior proximidade entre consumidor e empresa para a resolução de conflitos já que não há intermediadores. Serviço público, gratuito e monitor... | github_jupyter |
# `GiRaFFE_NRPy`: Solving the Induction Equation
## Author: Patrick Nelson
This notebook documents the function from the original `GiRaFFE` that calculates the flux for $A_i$ according to the method of Harten, Lax, von Leer, and Einfeldt (HLLE), assuming that we have calculated the values of the velocity and magnetic... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
import math
from matplotlib import style
from collections import Counter
style.use('fivethirtyeight') #Shows Grid
import pandas as pd
import random
df = pd.read_csv('Breast-Cancer.csv',na_values = ['?'])
means = df.mean().to_dict()
df.drop(['id'],1,inplace=True)
he... | github_jupyter |
# Simplify network topology and consolidate intersections
Author: [Geoff Boeing](https://geoffboeing.com/)
- [Overview of OSMnx](http://geoffboeing.com/2016/11/osmnx-python-street-networks/)
- [GitHub repo](https://github.com/gboeing/osmnx)
- [Examples, demos, tutorials](https://github.com/gboeing/osmnx-example... | github_jupyter |
```
import os
from collections import defaultdict, namedtuple
from copy import deepcopy
from pprint import pprint
import lxml
import lxml.html
import lxml.etree
from graphviz import Digraph
from similarity.normalized_levenshtein import NormalizedLevenshtein
normalized_levenshtein = NormalizedLevenshtein()
TAG_NAME_A... | github_jupyter |
# Imitation Learning with Neural Network Policies
In this notebook, you will implement the supervised losses for behavior cloning and use it to train policies for locomotion tasks.
```
import os
from google.colab import drive
drive.mount('/content/gdrive')
DRIVE_PATH = '/content/gdrive/My\ Drive/282'
DRIVE_PYTHON_PATH... | github_jupyter |
## SIMPLE CONVOLUTIONAL NEURAL NETWORK
```
import numpy as np
# import tensorflow as tf
import tensorflow.compat.v1 as tf
import matplotlib.pyplot as plt
# from tensorflow.examples.tutorials.mnist import input_data
%matplotlib inline
print ("PACKAGES LOADED")
```
# LOAD MNIST
```
def OnehotEncoding(target):
fr... | 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 |
<a href="https://colab.research.google.com/github/yukinaga/minnano_kaggle/blob/main/section_2/02_titanic_random_forest.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# タイタニック号生存者の予測
「ランダムフォレスト」という機械学習のアルゴリズムにより、タイタニック号の生存者を予測します。
訓練済みのモデルによる予測結果は... | github_jupyter |
# Driven Modal Simulation and S-Parameters
## Prerequisite
You must have a working local installation of Ansys.
```
%load_ext autoreload
%autoreload 2
import qiskit_metal as metal
from qiskit_metal import designs, draw
from qiskit_metal import MetalGUI, Dict, Headings
import pyEPR as epr
```
## Create the design in... | github_jupyter |
# Introduction
In this experiment we will be trying to do convolution operation on various signals and using
both methods of linear convolution and circular convolution.In the theory class we have ana-
lyzed the advantages of using circular convolution over using linear convolution when we are
recieving continuos samp... | github_jupyter |
```
%matplotlib inline
import matplotlib.pyplot as plt
import itertools
import numpy as np
import pyquil.api as api
from pyquil.gates import *
from pyquil.quil import Program
def qubit_strings(n):
qubit_strings = []
for q in itertools.product(['0', '1'], repeat=n):
qubit_strings.append(''.join(q))
r... | 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 |
```
# This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python
# For example, here's several helpful packages to load in
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file... | github_jupyter |
# Tarea 98 - Análisis del rendimiento de las aplicaciones de IA
## Ejercicio: Debes programar el problema que se plantea en la siguiente secuencia de videos en el lenguaje de programación que desees:
## Primera parte
[
rocznik = 1991
rocznik
teraz = 2020
teraz - rocznik
ile_lat ... | github_jupyter |
## Support vector machine applicate a XOR
```
import warnings
warnings.filterwarnings('ignore')
%matplotlib inline
import numpy as np
from sklearn import svm
from sklearn.kernel_approximation import RBFSampler
from sklearn.linear_model import SGDClassifier
import matplotlib.pyplot as plt
import matplotlib.colors as m... | github_jupyter |
```
from keras.preprocessing.sequence import TimeseriesGenerator
from FC_RNN_Evaluater.FC_RNN_Evaluater import *
from keras.initializers import RandomNormal
import numpy as np
timesteps = 10
inputMatrix = np.random.rand(57,224,224,3)# np.array([[[[i, i, i]]] for i in range(57)])
labels = np.array([[i, i, i] for i in ra... | github_jupyter |
<a href="https://colab.research.google.com/github/Khislatz/DS-Unit-2-Linear-Models/blob/master/module4-logistic-regression/Khislat_Zhuraeva_LS_DS_214_assignment.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, Spr... | github_jupyter |
# Basic Plotting in Python
Making explatory plots is a common task in data science and many good presentations usually feature excellent plots.
For us the most important plotting package is `matplotlib`, which is python's attempt to copy MATLAB's plotting functionality. Also of note is the package `seaborn`, but we w... | github_jupyter |
(docs-contribute)=
# Contributing to the Ray Documentation
There are many ways to contribute to the Ray documentation, and we're always looking for new contributors.
Even if you just want to fix a typo or expand on a section, please feel free to do so!
This document walks you through everything you need to do to get... | github_jupyter |
```
import pandas as pd
from sqlalchemy import create_engine
# Store CSV into a DF
csv_file = "./Resources/MoviesOnStreamingPlatforms_updated.csv"
streaming_df = pd.read_csv(csv_file)
streaming_df
# Store CSV into a DF
csv_file2 = "./Resources/rotten_tomatoes_movies.csv"
tomato_df = pd.read_csv(csv_file2)
tomato_df
tom... | github_jupyter |
```
import os
import pickle
import re
import sys
sys.path.append(os.path.abspath('') + '/../../..')
import warnings
warnings.filterwarnings('ignore')
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from matplotlib.ticker import MultipleLocator
import matplotlib.font_manager as font_manager
matplo... | github_jupyter |
```
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
from IPython.html.widgets import interact
from sklearn.datasets import load_digits
digits = load_digits()
def sigmoid(x):
return 1/(1 + np.exp(-x))
sigmoid_v = np.vectorize(sigmoid)
def sigmoidprime(x):
return sigmoid(x) * (1 - sigmoid... | github_jupyter |
<a href="https://colab.research.google.com/github/sullyvan15/Universidade-Vila-Velha/blob/master/Lista_2.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
<?xml version="1.0" encoding="UTF-8"?>
<html>
<body>
<header></header>
<CENTER>
... | github_jupyter |
```
import urllib.request
import os
import geopandas as gpd
import rasterio
from rasterio.plot import show
import zipfile
import matplotlib.pyplot as plt
```
# GIS visualizations with geopandas
```
url = 'https://biogeo.ucdavis.edu/data/gadm3.6/shp/gadm36_COL_shp.zip'
dest = os.path.join('data', 'admin')
os.makedirs(... | github_jupyter |
```
%matplotlib inline
from matplotlib import pyplot as pp
import numpy as np
```
# Introduction
Let's assume that we are given the function $f(\mathbf{x}) : \mathbb{R}^M \rightarrow \mathbb{R}$. At each point $\mathbf{x}$ this function produces the value $y = f(\mathbf{x})$. Due to real world circumstances, this ass... | github_jupyter |
```
import cobra
import copy
import mackinac
mackinac.modelseed.ms_client.url = 'http://p3.theseed.org/services/ProbModelSEED/'
mackinac.workspace.ws_client.url = 'http://p3.theseed.org/services/Workspace'
mackinac.genome.patric_url = 'https://www.patricbrc.org/api/'
# PATRIC user information
mackinac.get_token('mljen... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.