repo_name stringlengths 6 77 | path stringlengths 8 215 | license stringclasses 15
values | content stringlengths 335 154k |
|---|---|---|---|
jegibbs/phys202-2015-work | assignments/assignment03/NumpyEx03.ipynb | mit | import numpy as np
%matplotlib inline
import matplotlib.pyplot as plt
import seaborn as sns
import antipackage
import github.ellisonbg.misc.vizarray as va
"""
Explanation: Numpy Exercise 3
Imports
End of explanation
"""
def brownian(maxt, n):
"""Return one realization of a Brownian (Wiener) process with n steps... |
datawrestler/after-hours | docs/notebooks/SampleUsage.ipynb | mit | # dev system path adjustment - normal usage would not include this cell
import sys
sys.path.insert(0, "/Users/jasonlewris/Desktop/after_hours/afterhours")
from afterhours import AfterHours
# in packaged version, import follows:
# from afterhours.afterhours import AfterHours
"""
Explanation: AfterHours usage
In this ... |
mne-tools/mne-tools.github.io | 0.21/_downloads/112f45fdd43e503d5a44dfeb8227317e/plot_read_proj.ipynb | bsd-3-clause | # Author: Joan Massich <mailsik@gmail.com>
#
# License: BSD (3-clause)
import matplotlib.pyplot as plt
import mne
from mne import read_proj
from mne.io import read_raw_fif
from mne.datasets import sample
print(__doc__)
data_path = sample.data_path()
subjects_dir = data_path + '/subjects'
fname = data_path + '/MEG... |
jwjohnson314/data-801 | notebooks/more_pandas.ipynb | mit | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
plt.rcParams['figure.figsize']=(8,5) # optional
plt.style.use('bmh') # optional
"""
Explanation: Part I
End of explanation
"""
#change the paths as needed
train = pd.read_csv('../data/titanic_train.csv')
test = pd.read_csv('.... |
authman/DAT210x | Module3/Module3 - Lab6.ipynb | mit | import pandas as pd
import matplotlib.pyplot as plt
import matplotlib
# Look pretty...
# matplotlib.style.use('ggplot')
plt.style.use('ggplot')
"""
Explanation: DAT210x - Programming with Python for DS
Module3 - Lab6
End of explanation
"""
# .. your code here ..
"""
Explanation: Load up the wheat seeds dataset in... |
radu941208/DeepLearning | Hyperparameter_Tuning_Regularization_Optimization/Optimization+methods.ipynb | mit | import numpy as np
import matplotlib.pyplot as plt
import scipy.io
import math
import sklearn
import sklearn.datasets
from opt_utils import load_params_and_grads, initialize_parameters, forward_propagation, backward_propagation
from opt_utils import compute_cost, predict, predict_dec, plot_decision_boundary, load_data... |
JAmarel/QLab | MassSpectrometer/BackgroundSubstract.ipynb | mit | Argon = pd.read_table('Ar.txt',delimiter=', ',engine='python', header=None)
Amu = Argon[0] #These are the values of amu that the mass spec searches for
Argon = np.array([entry[:-1] for entry in Argon[1]],dtype='float')*1e6
"""
Explanation: Argon
End of explanation
"""
plt.figure(figsize=(9,4))
plt.scatter(Amu, Ar... |
deepmind/enn_acme | enn_acme/tutorial.ipynb | apache-2.0 | # Copyright 2022 DeepMind Technologies Limited. 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 ... |
tensorflow/docs-l10n | site/ja/probability/examples/Probabilistic_Layers_VAE.ipynb | apache-2.0 | #@title Licensed under the Apache License, Version 2.0 (the "License"); { display-mode: "form" }
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... |
bmorris3/gsoc2015 | constraints_boolean_logic.ipynb | mit | from __future__ import (absolute_import, division, print_function,
unicode_literals)
from astropy.time import Time
import astropy.units as u
from astroplan import Observer, FixedTarget
# Observe from Keck
obs = Observer.at_site("Keck")
# Observe these three stars
name_list = ['vega', 'rigel'... |
ewulczyn/talk_page_abuse | misc/iac/src/IAC Analysis.ipynb | apache-2.0 | %matplotlib inline
import numpy as np
import pandas as pd
import sklearn
from sklearn.pipeline import Pipeline
from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer
from sklearn.ensemble import RandomForestRegressor
from sklearn.linear_model import LinearRegression, LogisticRegression
from skle... |
JasonJWilliamsNY/biocoding_2015 | lessons/biocoding_2015_pythonlab_03.ipynb | cc0-1.0 | # store the hiv genome as a variable
hiv_genome = uggaagggcuaauucacucccaacgaagacaagauauccuugaucuguggaucuaccacacacaaggcuacuucccugauuagcagaacuacacaccagggccagggaucagauauccacugaccuuuggauggugcuacaagcuaguaccaguugagccagagaaguuagaagaagccaacaaaggagagaacaccagcuuguuacacccugugagccugcauggaauggaugacccggagagagaaguguuagaguggagguuugaca... |
AllenDowney/ThinkBayes2 | notebooks/chap17.ipynb | mit | # If we're running on Colab, install empiricaldist
# https://pypi.org/project/empiricaldist/
import sys
IN_COLAB = 'google.colab' in sys.modules
if IN_COLAB:
!pip install empiricaldist
# Get utils.py
from os.path import basename, exists
def download(url):
filename = basename(url)
if not exists(filename... |
NuSTAR/nustar_pysolar | notebooks/Mosaic Example.ipynb | mit | fname = io.download_occultation_times(outdir='../data/')
print(fname)
"""
Explanation: Download the list of occultation periods from the MOC at Berkeley.
Note that the occultation periods typically only are stored at Berkeley for the future and not for the past. So this is only really useful for observation planning.
... |
GoogleCloudPlatform/training-data-analyst | courses/machine_learning/deepdive/02_generalization/repeatable_splitting.ipynb | apache-2.0 | pip install --upgrade google-cloud-bigquery[bqstorage,pandas]
from google.cloud import bigquery
"""
Explanation: <h1> Repeatable splitting </h1>
In this notebook, we will explore the impact of different ways of creating machine learning datasets.
<p>
Repeatability is important in machine learning. If you do the sa... |
ledeprogram/algorithms | class7/homework/ronga_paul_7.ipynb | gpl-3.0 | from sklearn import datasets, tree, metrics
from sklearn.cross_validation import train_test_split
import numpy as np
dt = tree.DecisionTreeClassifier()
iris = datasets.load_iris()
x = iris.data[:,2:]
y = iris.target
# 50% - 50%
x_train, x_test, y_train, y_test = train_test_split(x,y,test_size=0.5,train_size=0.5)
dt... |
xtr33me/deep-learning | weight-initialization/weight_initialization.ipynb | mit | %matplotlib inline
import tensorflow as tf
import helper
from tensorflow.examples.tutorials.mnist import input_data
print('Getting MNIST Dataset...')
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
print('Data Extracted.')
"""
Explanation: Weight Initialization
In this lesson, you'll learn how to fin... |
bwgref/nustar_pysolar | notebooks/20190112/Mosaic 20190112.ipynb | mit | fname = io.download_occultation_times(outdir='../data/')
print(fname)
"""
Explanation: Download the list of occultation periods from the MOC at Berkeley.
Note that the occultation periods typically only are stored at Berkeley for the future and not for the past. So this is only really useful for observation planning.
... |
Azure/azure-sdk-for-python | sdk/digitaltwins/azure-digitaltwins-core/samples/notebooks/01_Patrons.ipynb | mit | from azure.identity import AzureCliCredential
from azure.digitaltwins.core import DigitalTwinsClient
# using yaml instead of
import yaml
import uuid
# using altair instead of matplotlib for vizuals
import numpy as np
import pandas as pd
# you will get this from the ADT resource at portal.azure.com
your_digital_twin... |
NYUDataBootcamp/Projects | UG_F16/Limongelli-World Series.ipynb | mit | # Packages
import pandas as pd
import matplotlib.pyplot as plt
"""
Explanation: Predicting World Series Winners
Fall 2016
Jack Limongelli (jal839@stern.nyu.edu)
Introduction
Baseball is America's pasttime. It began in 1846 when the Carwright Knickerbockers lost to the New York Baseball Club in Hoboken, New Jersey.... |
claudiuskerth/PhDthesis | Data_analysis/SNP-indel-calling/ANGSD/BOOTSTRAP_CONTIGS/bootstrap_contigs.ipynb | mit | # which *sites
% ll ../*sites
"""
Explanation: Table of Contents
<p><div class="lev2 toc-item"><a href="#start" data-toc-modified-id="start-01"><span class="toc-item-num">0.1 </span>start</a></div><div class="lev2 toc-item"><a href="#Bootstrap-regions-file" data-toc-modified-id="Bootstrap-regions-file-02">... |
weleen/mxnet | example/notebooks/moved-from-mxnet/simple_bind.ipynb | apache-2.0 | import mxnet as mx
import numpy as np
import logging
import pprint
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
"""
Explanation: MXNet Symbol.simple_bind example
In this example, we will show how to use simple_bind API.
Note it is a low level API. By using such a low level API, we are able to interac... |
GSimas/EEL7045 | Aula 1 - Introdução e Conceitos Básicos.ipynb | mit | print("Seja Bem-Vindo ao Curso de Circuitos Elétricos A")
print("Para rodar os códigos você precisa dos módulos Numpy e Sympy")
"""
Explanation: EEL 7045 - Circuitos Elétricos A
Bem-vindo
Jupyter Notebook desenvolvido por Gustavo S.S.
End of explanation
"""
print("Exemplo 1.1")
carga_eletron = -1.6*10**(-19) #unidad... |
google/lifetime_value | notebooks/kaggle_acquire_valued_shoppers_challenge/classification.ipynb | apache-2.0 | import os
import numpy as np
import pandas as pd
import tqdm
from sklearn import metrics
from sklearn import model_selection
from sklearn import preprocessing
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import backend as K
import tensorflow_probability as tfp
from typing import Sequence
... |
thalesians/tsa | src/jupyter/python/foundations/optimization.ipynb | apache-2.0 | def func(x): return -2. * x**2 + 6. * x + 9.
"""
Explanation: Motivation
We can view pretty much all of machine learning (ML) (and this is one of many possible views) as an optimization exercise. Our challenge in supervized learning is to find a function that maps the inputs of a certain system to its outputs. Since w... |
tensorflow/docs-l10n | site/ko/tutorials/customization/custom_training_walkthrough.ipynb | apache-2.0 | #@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 agreed to in writing, software
# distributed under... |
planet-os/notebooks | api-examples/cams_air_quality_demo_calu2020.ipynb | mit | %matplotlib notebook
%matplotlib inline
import numpy as np
import dh_py_access.lib.datahub as datahub
import xarray as xr
import matplotlib.pyplot as plt
import ipywidgets as widgets
from mpl_toolkits.basemap import Basemap
import dh_py_access.package_api as package_api
import matplotlib.colors as colors
import warning... |
squishbug/DataScienceProgramming | 03-NumPy-and-Linear-Algebra/Introduction_orig.ipynb | cc0-1.0 | %matplotlib inline
import math
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sbn
##from scipy import *
"""
Explanation: Introduction to NumPy
Topics
Basic Synatx
creating vectors matrices
special: ones, zeros, identity eye
add, product, inverse
Mechanics: indexing, slicing, concatenating, res... |
PyLCARS/PythonUberHDL | PYNQLearn/FabricOnly/myHDL_PYNQZ12_FabricOnly.ipynb | bsd-3-clause | from myhdl import *
from myhdlpeek import Peeker
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
from sympy import *
init_printing()
import random
#https://github.com/jrjohansson/version_information
%load_ext version_information
%version_information myhdl, myhdlpeek, numpy, ... |
tensorflow/docs-l10n | site/en-snapshot/probability/examples/TFP_Release_Notebook_0_13_0.ipynb | apache-2.0 | #@title Licensed under the Apache License, Version 2.0 (the "License"); { display-mode: "form" }
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... |
rdeits/meshcat-python | examples/animation_demo.ipynb | mit | import meshcat
from meshcat.geometry import Box
vis = meshcat.Visualizer()
## To open the visualizer in a new browser tab, do:
# vis.open()
## To open the visualizer inside this jupyter notebook, do:
# vis.jupyter_cell()
vis["box1"].set_object(Box([0.1, 0.2, 0.3]))
"""
Explanation: MeshCat Animations
MeshCat.jl ... |
mauroalberti/geocouche | pygsf/docs/notebooks/General 1 - spatial data.ipynb | gpl-2.0 | %load_ext autoreload
%autoreload 1
"""
Explanation: pygsf 1: spatial data
March-April, 2018, Mauro Alberti, alberti.m65@gmail.com
Developement code:
End of explanation
"""
%matplotlib inline
"""
Explanation: 1. Introduction
gsf is a library for the processing of geometric and geographic data, with a focus on struct... |
davek44/Basset | tutorials/new_data_iso.ipynb | mit | !wget ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE47nnn/GSE47753/suppl/GSE47753_CD4%2B_ATACseq_AllDays_AllReps_ZINBA_pp08.bed.gz
!mv GSE47753_CD4+_ATACseq_AllDays_AllReps_ZINBA_pp08.bed.gz atac_cd4.bed.gz
!gunzip -f atac_cd4.bed.gz
"""
Explanation: In this tutorial, we'll walk through running Basset on ONLY your own data... |
ES-DOC/esdoc-jupyterhub | notebooks/dwd/cmip6/models/sandbox-1/atmos.ipynb | gpl-3.0 | # DO NOT EDIT !
from pyesdoc.ipython.model_topic import NotebookOutput
# DO NOT EDIT !
DOC = NotebookOutput('cmip6', 'dwd', 'sandbox-1', 'atmos')
"""
Explanation: ES-DOC CMIP6 Model Properties - Atmos
MIP Era: CMIP6
Institute: DWD
Source ID: SANDBOX-1
Topic: Atmos
Sub-Topics: Dynamical Core, Radiation, Turbulen... |
ES-DOC/esdoc-jupyterhub | notebooks/snu/cmip6/models/sandbox-1/ocean.ipynb | gpl-3.0 | # DO NOT EDIT !
from pyesdoc.ipython.model_topic import NotebookOutput
# DO NOT EDIT !
DOC = NotebookOutput('cmip6', 'snu', 'sandbox-1', 'ocean')
"""
Explanation: ES-DOC CMIP6 Model Properties - Ocean
MIP Era: CMIP6
Institute: SNU
Source ID: SANDBOX-1
Topic: Ocean
Sub-Topics: Timestepping Framework, Advection, ... |
google/jax | docs/notebooks/autodiff_cookbook.ipynb | apache-2.0 | import jax.numpy as jnp
from jax import grad, jit, vmap
from jax import random
key = random.PRNGKey(0)
"""
Explanation: The Autodiff Cookbook
alexbw@, mattjj@
JAX has a pretty general automatic differentiation system. In this notebook, we'll go through a whole bunch of neat autodiff ideas that you can cherry pick ... |
martinjrobins/hobo | examples/toy/model-hes1-michaelis-menten.ipynb | bsd-3-clause | import numpy as np
import matplotlib.pyplot as plt
import pints
import pints.toy
model = pints.toy.Hes1Model()
print('Outputs: ' + str(model.n_outputs()))
print('Parameters: ' + str(model.n_parameters()))
"""
Explanation: HES1 Michaelis-Menten toy model
The Hes1Model describes the expression level of the transcripti... |
psci2195/espresso-ffans | doc/tutorials/11-ferrofluid/11-ferrofluid_part1.ipynb | gpl-3.0 | import espressomd
espressomd.assert_features('DIPOLES', 'LENNARD_JONES')
from espressomd.magnetostatics import DipolarP3M
from espressomd.magnetostatic_extensions import DLC
from espressomd.cluster_analysis import ClusterStructure
from espressomd.pair_criteria import DistanceCriterion
import numpy as np
"""
Explan... |
aakashm301/Workshop | Refactored_Py_DS_ML_Bootcamp-master/01-Python-Crash-Course/03-Python Crash Course Exercises - Solutions.ipynb | gpl-3.0 | 7**4
"""
Explanation: <a href='http://www.pieriandata.com'> <img src='../Pierian_Data_Logo.png' /></a>
Python Crash Course Exercises - Solutions
This is an optional exercise to test your understanding of Python Basics. If you find this extremely challenging, then you probably are not ready for the rest of this course... |
nikbearbrown/Deep_Learning | NEU/Vikram_Balakrishnan_DL/Phase_0/1. variables.ipynb | mit | import tensorflow as tf
x = tf.constant(35, name='x')
y = tf.Variable(x + 5, name='y')
model = tf.global_variables_initializer()
"""
Explanation: Variables
resources used - http://learningtensorflow.com/lesson2/
Section 1 - a simple representation
A simple representation of variables and constants in a tf graph
En... |
pvillela/ServerSim | .ipynb_checkpoints/OverviewAndTutorial-checkpoint.ipynb | mit | # %load simulate_deployment_scenario.py
from __future__ import print_function
from typing import List, Tuple, Sequence
from collections import namedtuple
import random
import simpy
from serversim import *
def simulate_deployment_scenario(num_users, weight1, weight2, server_range1,
... |
srnas/barnaba | manuscript_figures/01_figure.ipynb | gpl-3.0 | import pickle
# read ermds pickle
fname = "ermsd.p"
print "# reading pickle %s" % fname,
ermsd = pickle.load(open(fname, "r"))
print " - shape ", ermsd.shape
# Read rmsd pickle
fname = "rmsd.p"
print "# reading pickle %s" % fname,
rmsd = pickle.load(open(fname, "r"))
print " - shape ", rmsd.shape
# Read annotatio... |
Hyperparticle/deep-learning-foundation | lessons/intro-to-tflearn/TFLearn_Digit_Recognition.ipynb | mit | # Import Numpy, TensorFlow, TFLearn, and MNIST data
import numpy as np
import tensorflow as tf
import tflearn
import tflearn.datasets.mnist as mnist
"""
Explanation: Handwritten Number Recognition with TFLearn and MNIST
In this notebook, we'll be building a neural network that recognizes handwritten numbers 0-9.
This... |
KnHuq/Dynamic-Tensorflow-Tutorial | Vhanilla_RNN/.ipynb_checkpoints/RNN-checkpoint.ipynb | mit | import numpy as np
import tensorflow as tf
from sklearn.datasets import load_digits
from sklearn.cross_validation import train_test_split
import pylab as pl
from IPython import display
import sys
%matplotlib inline
"""
Explanation: <span style="color:green"> VANILLA RNN ON 8*8 MNIST DATASET TO PREDICT TEN CLASS
<span... |
GoogleCloudPlatform/training-data-analyst | courses/fast-and-lean-data-science/01_MNIST_TPU_Keras.ipynb | apache-2.0 | import os, re, time, json
import PIL.Image, PIL.ImageFont, PIL.ImageDraw
import numpy as np
import tensorflow as tf
from matplotlib import pyplot as plt
AUTOTUNE = tf.data.AUTOTUNE
print("Tensorflow version " + tf.__version__)
#@title visualization utilities [RUN ME]
"""
This cell contains helper functions used for vi... |
aflaxman/siaman16-va-minitutorial | 1-tutorial-notebooks/5-cccsmf_replication_archive.ipynb | gpl-3.0 | import numpy as np, pandas as pd, matplotlib.pyplot as plt, seaborn as sns
%matplotlib inline
sns.set_style('whitegrid')
sns.set_context('poster')
"""
Explanation: Replication Archive for "Measuring causes of death in populations: a new metric that corrects cause-specific mortality fractions for chance"
End of explan... |
kingsgeocomp/applied_gsa | Practical-06-3. Correlation.ipynb | mit | # Here's an output table which gives you nice, specific
# numbers but is hard to read so I'm only showing the
# first ten rows and columns...
scdf.corr().iloc[1:7,1:7]
"""
Explanation: Considering Correlated Variables (a.k.a. Feature Selection)
Depending on the clustering technique, correlated variables can have an... |
nwjs/chromium.src | third_party/tensorflow-text/src/docs/guide/unicode.ipynb | bsd-3-clause | #@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 agreed to in writing, software
# distributed under... |
phoebe-project/phoebe2-docs | 2.3/tutorials/requiv_crit_semidetached.ipynb | gpl-3.0 | #!pip install -I "phoebe>=2.3,<2.4"
"""
Explanation: Critical Radii: Semidetached Systems
Setup
Let's first make sure we have the latest version of PHOEBE 2.3 installed (uncomment this line if running in an online notebook session such as colab).
End of explanation
"""
import phoebe
from phoebe import u # units
impo... |
moranconnorj/code_guild | wk0/notebooks/wk0.1.ipynb | mit | def t(num):
if 10<= num < 15:
print("hot")
elif num > 15:
print("hotter")
else:
print("cold")
t(5)
i in range(4):
for j in range(10):
if j % 3 == 0:
continue
if j > 7 and j % 2 == 0:
break
else:
print('i equals', i)
... |
dereneaton/ipyrad | newdocs/API-analysis/cookbook-abba-baba.ipynb | gpl-3.0 | import ipyrad.analysis as ipa
import ipyparallel as ipp
import toytree
import toyplot
print(ipa.__version__)
print(toyplot.__version__)
print(toytree.__version__)
"""
Explanation: <span style="color:gray">ipyrad-analysis toolkit:</span> abba-baba
The baba tool can be used to measure abba-baba statistics across many d... |
projectmesa/Presentations | scipy_2015/Schelling Model.ipynb | apache-2.0 | import matplotlib.pyplot as plt
%matplotlib inline
from Schelling import SchellingModel
"""
Explanation: Schelling Segregation Model
End of explanation
"""
model = SchellingModel(20, 20, 0.85, 0.2, 3)
while model.running and model.schedule.steps < 100:
model.step()
print(model.schedule.steps) # Show how many s... |
FrederikDiehl/apsis | code/examples/Introduction.ipynb | mit | from apsis_client.apsis_connection import Connection
conn = Connection(server_address="http://localhost:5000")
"""
Explanation: apsis on the BRML cluster
Generally, apsis consists of a server, whose task it is to generate new candidates and receive updates, and several worker processes, who evaluate the actual machine... |
jpn--/larch | book/user-guide/machine-learning.ipynb | gpl-3.0 | # TEST
from pytest import approx
import numpy as np
import larch
import pandas as pd
from larch import PX, P, X
from larch.data_warehouse import example_file
df = pd.read_csv(example_file("MTCwork.csv.gz"))
df.set_index(['casenum','altnum'], inplace=True, drop=False)
"""
Explanation: Machine Learning
Larch is (mostl... |
avincartemard/avincartemard.github.io | iPython_posts/SGD.ipynb | apache-2.0 | import numpy as np
from scipy.io import loadmat
# load data from MATLAB file
datamat = loadmat('quantum.mat')
X = datamat['X']
y = datamat['y']
class LogisticRegressionSGD(object):
def __init__(self, X, y, progTol=1e-4, nEpochs=10):
self.X = X
self.y = y
self.n, self.d = X.shape
... |
cmshobe/landlab | notebooks/tutorials/fault_scarp/landlab-fault-scarp.ipynb | mit | import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
"""
Explanation: <a href="http://landlab.github.io"><img style="float: left" src="../../landlab_header.png"></a>
Introduction to Landlab: Creating a simple 2D scarp diffusion model
<hr>
<small>For more Landlab tutorials, click here: <a href="https:/... |
mne-tools/mne-tools.github.io | stable/_downloads/51cca4c9f4bd40623cb6bfa890e2eb4b/20_erp_stats.ipynb | bsd-3-clause | import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import ttest_ind
import mne
from mne.channels import find_ch_adjacency, make_1020_channel_selections
from mne.stats import spatio_temporal_cluster_test
np.random.seed(0)
# Load the data
path = mne.datasets.kiloword.data_path() / 'kword_metadata-epo.... |
ini-python-course/ss15 | notebooks/Profiling with IPython.ipynb | mit | from time import sleep
def foo():
print 'foo: calculating heavy stuff...'
sleep(1)
def bar():
print 'bar: calculating heavy stuff...'
sleep(2)
def baz():
foo()
bar()
"""
Explanation: Profiling with IPython
Sometimes our scripts take a lot of time or memory to run. That happens especially for... |
GoogleCloudPlatform/mlops-on-gcp | immersion/kubeflow_pipelines/multiple_frameworks/solutions/lab-01.ipynb | apache-2.0 | REGION = 'us-central1'
PROJECT_ID = !(gcloud config get-value core/project)
PROJECT_ID = PROJECT_ID[0]
BUCKET = 'gs://' + PROJECT_ID
"""
Explanation: Lab: Continuous Training with TensorFlow, PyTorch, XGBoost, and Scikit-learn Models with KubeFlow and AI Platform Pipelines
In this lab we will create containerized tra... |
jamesmcclain/geodocker-jupyter-geopyspark | notebooks/NLCD viewer.ipynb | apache-2.0 | nlcd_cmap = gps.ColorMap.nlcd_colormap()
nlcd_tms_server = gps.TMS.build((catalog_uri, layer_name), display=nlcd_cmap)
nlcd_tms_server.bind('0.0.0.0')
nlcd_tms_server.url_pattern
m = Map(tiles='Stamen Terrain', location=[37.1, -95.7], zoom_start=4)
TileLayer(tiles=nlcd_tms_server.url_pattern, attr='GeoPySpark Tiles').... |
mdda/fossasia-2016_deep-learning | notebooks/9-Utilities/Z-Choose-GPU.ipynb | mit | raw="""
name | sh:tx:rop | mem | bw | bus | ocl |single|double|watts| passmark
GeForce GT 740 | 384:32:16 | 4096 | 28 | 128 | 1.2 | 763 | 0 | 65 | 1579
GeForce GTX 750 | 512:32:16 | 2048 | 80 | 128 | 1.2 | 1044 | 32 | 55 | 3271
GeForce GTX 750 Ti | 640:40:16 | 409... |
stevetjoa/stanford-mir | chroma.ipynb | mit | x, sr = librosa.load('audio/simple_piano.wav')
ipd.Audio(x, rate=sr)
"""
Explanation: ← Back to Index
Constant-Q Transform and Chroma
Constant-Q Transform
Unlike the Fourier transform, but similar to the mel scale, the constant-Q transform (Wikipedia) uses a logarithmically spaced frequency axis. For more informa... |
psas/sw-cad-airframe-lv3.0 | sim/finLoading2.ipynb | bsd-2-clause | from sympy import *
init_printing()
%matplotlib inline
y, q, c, F, M, cr, ct, bst, kq, kF, kM = symbols('y q c F M cr ct bst kq kF kM')
c = cr + y*(cr+ct)/(bst/2) # define chord as a function of y
q = kq*c # constant lifting pressure
LV3parms = {cr: 18, ct: 5, kq: 1, bst: 6.42*2} # in, in, lbf/in^2, in; parameters for ... |
donaghhorgan/COMP9033 | labs/07b - Decision tree regression.ipynb | gpl-3.0 | %matplotlib inline
import pandas as pd
from sklearn.ensemble import RandomForestRegressor
from sklearn.tree import DecisionTreeRegressor
from sklearn.metrics import mean_absolute_error
from sklearn.model_selection import GridSearchCV, KFold, cross_val_predict
"""
Explanation: Lab 07b: Decision tree regression
Introdu... |
mne-tools/mne-tools.github.io | 0.23/_downloads/2dd868e4ea307404d807080fb341eb26/evoked_topomap.ipynb | bsd-3-clause | # Authors: Christian Brodbeck <christianbrodbeck@nyu.edu>
# Tal Linzen <linzen@nyu.edu>
# Denis A. Engeman <denis.engemann@gmail.com>
# Mikołaj Magnuski <mmagnuski@swps.edu.pl>
# Eric Larson <larson.eric.d@gmail.com>
#
# License: BSD (3-clause)
import numpy as np
import matplotlib.p... |
arturops/deep-learning | first-neural-network/Your_first_neural_network.ipynb | mit | %matplotlib inline
%config InlineBackend.figure_format = 'retina'
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
"""
Explanation: Your first neural network
In this project, you'll build your first neural network and use it to predict daily bike rental ridership. We've provided some of the code... |
tensorflow/tfx | docs/tutorials/tfx/components_keras.ipynb | apache-2.0 | #@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 agreed to in writing, software
# distributed under... |
rishuatgithub/MLPy | torch/PYTORCH_NOTEBOOKS/04-RNN-Recurrent-Neural-Networks/01-RNN-on-a-Time-Series.ipynb | apache-2.0 | import torch
import torch.nn as nn
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
# This relates to plotting datetime values with matplotlib:
from pandas.plotting import register_matplotlib_converters
register_matplotlib_converters()
"""
Explanation: <img src="../Pierian-Da... |
cmshobe/landlab | notebooks/tutorials/overland_flow/coupled_rainfall_runoff.ipynb | mit | %matplotlib notebook
import os
import numpy as np
from landlab.io import read_esri_ascii, write_esri_ascii
from landlab import imshow_grid_at_node
from landlab.components import SpatialPrecipitationDistribution
from landlab.components import OverlandFlow
import matplotlib.pyplot as plt
"""
Explanation: A coupled rainf... |
IACS-CS-207/cs207-F17 | lectures/L5/L5.ipynb | mit | from IPython.display import HTML
"""
Explanation: Lecture 5: Basic Python
Booleans and Control Flow
Functions
Exceptions
Plotting
We'll be embedding some HTML into our notebook. To do so, we need to import a library:
End of explanation
"""
import numpy as np
"""
Explanation: We'll also probably use numpy so we ... |
jphall663/GWU_data_mining | 02_analytical_data_prep/src/py_part_2_target_encode_categorical.ipynb | apache-2.0 | import pandas as pd # pandas for handling mixed data sets
from numpy.random import uniform # numpy for basic math and matrix operations
"""
Explanation: License
Copyright (C) 2017 J. Patrick Hall, jphall@gwu.edu
Permission is hereby granted, free of charge, to any person obtaining a copy of this softw... |
tensorflow/docs-l10n | site/pt-br/r1/tutorials/keras/basic_classification.ipynb | apache-2.0 | #@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 agreed to in writing, software
# distributed under... |
tensorflow/similarity | examples/unsupervised_hello_world.ipynb | apache-2.0 | # @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 agreed to in writing, software
# distributed unde... |
YangDS/recommenders | notebooks/Example 3-b Nonnegative Matrix Factorization via TensorFlow.ipynb | gpl-3.0 | # Customary imports
import tensorflow as tf
import numpy as np
import pandas as pd
np.random.seed(0)
# Creating the matrix to be decomposed
A_orig = np.array([[3, 4, 5, 2],
[4, 4, 3, 3],
[5, 5, 4, 4]], dtype=np.float32).T
A_orig_df = pd.DataFrame(A_orig)
A_orig_df #(4 users, 3... |
tensorflow/docs | site/en/guide/mixed_precision.ipynb | apache-2.0 | #@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 agreed to in writing, software
# distributed under... |
jgarciab/wwd2017 | class3/class3c_groupby.ipynb | gpl-3.0 | ##Some code to run at the beginning of the file, to be able to show images in the notebook
##Don't worry about this cell
#Print the plots in this screen
%matplotlib inline
#Be able to plot images saved in the hard drive
from IPython.display import Image
#Make the notebook wider
from IPython.core.display import dis... |
maptime/boulder | geopandas/01 - GeoPandas Introduction.ipynb | bsd-2-clause | import json, shapely, fiona, os
import seaborn as sns
import pandas as pd
import geopandas as gpd
import networkx as nx
import matplotlib.pyplot as plt
%matplotlib inline
"""
Explanation: An introduction to GeoPandas
Welcome to Jupyter Notebook, this is an example of a Python notebook. A quick overview of how notebo... |
italoPontes/Machine-learning | Tarefas/Predicao-de-CRA-com-Regressao/.ipynb_checkpoints/Task 03-checkpoint.ipynb | lgpl-3.0 | #enconding=utf8
import copy
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib
import matplotlib.pyplot as plt
from scipy import stats
from scipy.stats import skew
from scipy.stats.stats import pearsonr
%config InlineBackend.figure_format = 'retina' #set 'png' here when working on noteboo... |
cbpygit/pypmj | examples/Using jcmpython - the mie2D-project.ipynb | gpl-3.0 | %%javascript
require(['base/js/utils'],
function(utils) {
utils.load_extensions('IPython-notebook-extensions-3.x/usability/comment-uncomment');
utils.load_extensions('IPython-notebook-extensions-3.x/usability/dragdrop/main');
});
%load_ext autoreload
%autoreload 2
"""
Explanation: Preparations
Notebook extens... |
davidgutierrez/HeartRatePatterns | Jupyter/Logistic.ipynb | gpl-3.0 | import numpy as np
import pandas as pd
import statsmodels.api as sm
import matplotlib.pyplot as plt
from patsy import dmatrices
from sklearn.linear_model import LogisticRegression
from sklearn.cross_validation import train_test_split
from sklearn import metrics
from sklearn.cross_validation import cross_val_score
"""
... |
GoogleCloudPlatform/training-data-analyst | courses/machine_learning/deepdive2/feature_engineering/labs/6_gapic_feature_store.ipynb | apache-2.0 | # Setup your dependencies
import os
# The Google Cloud Notebook product has specific requirements
IS_GOOGLE_CLOUD_NOTEBOOK = os.path.exists("/opt/deeplearning/metadata/env_version")
# Google Cloud Notebook requires dependencies to be installed with '--user'
USER_FLAG = ""
if IS_GOOGLE_CLOUD_NOTEBOOK:
USER_FLAG = ... |
davidthaler/arboretum | examples/SmoothTree.ipynb | mit | from arboretum.datasets import load_diabetes
xtr, ytr, xte, yte = load_diabetes()
xtr.shape, xte.shape
"""
Explanation: Smooth Tree
Single decision trees generally overfit, leading to poor predictive performance. Tree ensembles (RF, GBM) perform well, but are black-box models. In this notebook, we investigate whether ... |
metpy/MetPy | v0.6/_downloads/Simple_Sounding.ipynb | bsd-3-clause | import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import metpy.calc as mpcalc
from metpy.cbook import get_test_data
from metpy.plots import add_metpy_logo, SkewT
from metpy.units import units
# Change default to be better for skew-T
plt.rcParams['figure.figsize'] = (9, 9)
# Upper air data can be ... |
ssunkara1/bqplot | examples/Marks/Pyplot/Bins.ipynb | apache-2.0 | # Create a sample of Gaussian draws
np.random.seed(0)
x_data = np.random.randn(1000)
"""
Explanation: Bins Mark
This Mark is essentially the same as the Hist Mark from a user point of view, but is actually a Bars instance that bins sample data.
The difference with Hist is that the binning is done in the backend, so it... |
knowledgeanyhow/notebooks | united-nations/senegal_population_trends.ipynb | mit | import pandas as pd
df_pop_density = pd.read_csv('/resources/senegal_growth_migration.csv')
df_pop_density.head(5)
"""
Explanation: Population Growth Estimates
Objective
Provide an introductory analysis into the growth rates within Senegal due to migration trends.
Senegal has a population of over 13.5 million,[36] ab... |
pfschus/fission_bicorrelation | methods/generate_pair_is.ipynb | mit | %%javascript
$.getScript('https://kmahelona.github.io/ipython_notebook_goodies/ipython_notebook_toc.js')
"""
Explanation: <h1 id="tocheading">Table of Contents</h1>
<div id="toc"></div>
End of explanation
"""
import pandas as pd
import os
import sys
import numpy as np
import matplotlib.pyplot as plt
import seaborn a... |
jpilgram/phys202-2015-work | assignments/assignment05/InteractEx02.ipynb | mit | %matplotlib inline
from matplotlib import pyplot as plt
import numpy as np
from IPython.html.widgets import interact, interactive, fixed
from IPython.display import display
"""
Explanation: Interact Exercise 2
Imports
End of explanation
"""
# YOUR CODE HERE
#raise NotImplementedError()
def plot_sine1(a,b):
x = ... |
bicepjai/Deep-Survey-Text-Classification | data_prep/word_vectors.ipynb | mit | import sys
import os
import re
import collections
import itertools
import bcolz
import pickle
sys.path.append('../lib')
import gc
import random
import smart_open
import h5py
import csv
import tensorflow as tf
import gensim
import datetime as dt
from tqdm import tqdm_notebook as tqdm
import numpy as np
import pandas... |
raman-sharma/stanford-mir | spectral_features.ipynb | mit | x, fs = librosa.load('simple_loop.wav')
IPython.display.Audio(x, rate=fs)
spectral_centroids = librosa.feature.spectral_centroid(x, sr=fs)
plt.plot(spectral_centroids[0])
"""
Explanation: ← Back to Index
Spectral Features
For classification, we're going to be using new features in our arsenal: spectral moments (... |
michaelneuder/image_quality_analysis | bin/calculations/ssim/predictions.ipynb | mit | import numpy as np
import pandas as pd
import scipy.signal as sig
import matplotlib.pyplot as plt
import iqa_tools as iqa
import matplotlib.gridspec as gridspec
import tensorflow as tf
image_dim, result_dim = 96, 86
input_layer, output_layer = 4, 1
input_layer, first_layer, second_layer, third_layer, fourth_layer, out... |
tclaudioe/Scientific-Computing | SC1v2/Bonus - 05 - Newton's divided differences, Sinc and piecewiselinear interpolations.ipynb | bsd-3-clause | import numpy as np
import matplotlib.pyplot as plt
import sympy as sym
from functools import reduce
import matplotlib as mpl
mpl.rcParams['font.size'] = 14
mpl.rcParams['axes.labelsize'] = 20
mpl.rcParams['xtick.labelsize'] = 14
mpl.rcParams['ytick.labelsize'] = 14
%matplotlib inline
from ipywidgets import interact, fi... |
bpsmith/tia | examples/datamgr.ipynb | bsd-3-clause | import pandas as pd
import tia.bbg.datamgr as dm
"""
Explanation: Example using the data manager classes
This notebook shows how to use the data manager framework for simpler API usage and for caching capabilities.
Please note that in order to request bloomberg fields using property access, it must be CAPITALIZED. (s... |
nmayorov/pyins | examples/ins_gps.ipynb | mit | from pyins import sim
from pyins.coord import perturb_ll
def generate_trajectory(n_points, min_step, max_step, angle_spread, random_state=0):
rng = np.random.RandomState(random_state)
xy = [np.zeros(2)]
angle = rng.uniform(2 * np.pi)
heading = [90 - angle]
angle_spread = np.deg2rad(angle_sprea... |
thaophung/Udacity_deep_learning | first-neural-network/Your_first_neural_network.ipynb | mit | %matplotlib inline
%config InlineBackend.figure_format = 'retina'
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
"""
Explanation: Your first neural network
In this project, you'll build your first neural network and use it to predict daily bike rental ridership. We've provided some of the code... |
tensorflow/docs-l10n | site/en-snapshot/addons/tutorials/networks_seq2seq_nmt.ipynb | apache-2.0 | #@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 agreed to in writing, software
# distributed under... |
sieben/makesense | demo.ipynb | apache-2.0 | import os
from os.path import join as pj
from jinja2 import Environment, FileSystemLoader
ROOT_DIR = os.getcwd()
CONTIKI_FOLDER = os.path.abspath(pj(ROOT_DIR, "contiki"))
EXPERIMENT_FOLDER = pj(ROOT_DIR, "experiments")
TEMPLATE_FOLDER = pj(ROOT_DIR, "templates")
TEMPLATE_ENV = Environment(loader=FileSystemLoader(TEMP... |
calroc/joypy | docs/Newton-Raphson.ipynb | gpl-3.0 | from notebook_preamble import J, V, define
"""
Explanation: Newton's method
End of explanation
"""
define('Q == [tuck / + 2 /] unary')
"""
Explanation: Cf. "Why Functional Programming Matters" by John Hughes
$a_{i+1} = \frac{(a_i+\frac{n}{a_i})}{2}$
Let's define a function that computes the above equation:
n a... |
jdnz/qml-rg | Tutorials/Advanced_Data_Science.ipynb | gpl-3.0 | from __future__ import print_function
import matplotlib.pyplot as plt
import os
import pandas as pd
import re
import seaborn as sns
try:
from urllib2 import Request, urlopen
except ImportError:
from urllib.request import Request, urlopen
from bs4 import BeautifulSoup
%matplotlib inline
"""
Explanation: 1. Intr... |
kpei/cs-rating | discourse q/discourse.ipynb | gpl-3.0 | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
data = pd.read_csv('data.csv', index_col=0).reset_index(drop=True)
teams = np.sort(np.unique(np.concatenate([data['Team 1 ID'], data['Team 2 ID']])))
periods = data.Date.unique()
tmap = {v:k for k,v in dict(... |
dfm/emcee | docs/tutorials/moves.ipynb | mit | %config InlineBackend.figure_format = "retina"
from matplotlib import rcParams
rcParams["savefig.dpi"] = 100
rcParams["figure.dpi"] = 100
rcParams["font.size"] = 20
import numpy as np
import matplotlib.pyplot as plt
def logprob(x):
return np.sum(
np.logaddexp(
-0.5 * (x - 2) ** 2,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.