repo_name stringlengths 6 77 | path stringlengths 8 215 | license stringclasses 15
values | content stringlengths 335 154k |
|---|---|---|---|
mtchem/ETL-MarchMadness-data | organize-data.ipynb | mit | # imports
import sqlite3 as sql
from sklearn import datasets
from sklearn import metrics
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline
"""
Explanation: This notebook uses the March Madness dataset provided by Kaggel.com. Pleas use kaggle.com to access... |
agile-geoscience/welly | docs/_userguide/Projects.ipynb | apache-2.0 | import welly
welly.__version__
"""
Explanation: Projects
Wells are one of the fundamental objects in welly.
Well objects include collections of Curve objects. Multiple Well objects can be stored in a Project.
On this page, we take a closer look at the Project class. It lets us handle groups of wells. It is really jus... |
fgnt/nara_wpe | examples/WPE_Numpy_offline.ipynb | mit | def aquire_audio_data():
D, T = 4, 10000
y = np.random.normal(size=(D, T))
return y
y = aquire_audio_data()
Y = stft(y, **stft_options)
Y = Y.transpose(2, 0, 1)
Z = wpe(Y)
z_np = istft(Z.transpose(1, 2, 0), size=stft_options['size'], shift=stft_options['shift'])
"""
Explanation: Minimal example with rand... |
OSGeoLabBp/tutorials | english/data_processing/lessons/ransac_line.ipynb | cc0-1.0 | # Python packages used
import numpy as np # for array operations
from matplotlib import pyplot as plt # for graphic output
from math import sqrt
# parameters
tolerance = 2.5 # max distance from the plane to accept point
rep = 1000 # number of repetition
"""
Explanation... |
simpleblob/ml_algorithms_stepbystep | algo_example_logistic_regression_and_optimization_methods.ipynb | mit | print type(iris.data)
print iris.data.shape
print iris.target.shape
print iris.data[0:5]
print np.unique(iris.target)
#make it a binary classification problem instead
X = np.copy(iris.data)
X = (X - np.average(X,axis=0)) / np.std(X, axis=0)
Y = np.copy(iris.target)
np.place(Y, Y==2, [0])
print np.unique(Y)
"""
Explan... |
letsgoexploring/economicData | inflation-forecasts-and-interest-rates/python/real_rate.ipynb | mit | import numpy as np
import matplotlib.dates as dts
import pandas as pd
import fredpy as fp
import runProcs
import requests
import matplotlib.pyplot as plt
plt.style.use('classic')
%matplotlib inline
"""
Explanation: About
This program downloads, manages, and exports to .csv files inflation forecast data from the Federa... |
whiterd/Tutorial-Notebooks | 2019-03-Presentation-Micropython.ipynb | mit | %serialconnect
"""
Explanation: <img src="images/micropython-logo-new.jpg" width="400">
<!--  -->
<img src="images/micropython-logo-old.png" width="400">
What is it?
“micro-ified”
MicroPython-specific libraries
btree - simple BTree database
framebuf - ... |
ES-DOC/esdoc-jupyterhub | notebooks/ec-earth-consortium/cmip6/models/ec-earth3-gris/landice.ipynb | gpl-3.0 | # DO NOT EDIT !
from pyesdoc.ipython.model_topic import NotebookOutput
# DO NOT EDIT !
DOC = NotebookOutput('cmip6', 'ec-earth-consortium', 'ec-earth3-gris', 'landice')
"""
Explanation: ES-DOC CMIP6 Model Properties - Landice
MIP Era: CMIP6
Institute: EC-EARTH-CONSORTIUM
Source ID: EC-EARTH3-GRIS
Topic: Landice... |
GoogleCloudPlatform/training-data-analyst | quests/tpu/tpu_fundamentals.ipynb | apache-2.0 | import numpy as np
import six
import tensorflow as tf
import time
import os
WORKER_NAME = "laktpu" #@param {type:"string"}
TPU_WORKER = tf.contrib.cluster_resolver.TPUClusterResolver(
WORKER_NAME
).get_master()
session = tf.Session(TPU_WORKER)
session.list_devices()
"""
Explanation: TPU Fundamentals
This codela... |
danellecline/stoqs | stoqs/contrib/notebooks/compare_clustering_algorithms.ipynb | gpl-3.0 | cd /vagrant/dev/stoqsgit/stoqs/
from contrib.analysis.cluster import Clusterer
%matplotlib inline
import pylab as plt
import numpy as np
# defining function to create clusters for a specified algorithm
def cluster(algorithm_string, normalize):
# specifying arguments - simulating cluster.py command line arguments... |
Taekyoon/Pytorch_Seq2Seq_Tutorial | Pytorch_Seq2Seq_Practice.ipynb | mit | MAX_LENGTH = 10
"""
Explanation: Pytorch Seq2Seq Machine Translator Practice
이번 튜토리얼에서는 Sequence to Sequence 모델의 핵심인 RNN Encoder Decoder과 Attention 모델을 이해하고, 이를 활용하여 Machine Translator를 구현해보겠습니다.
Machine Traslator에 핵심인 Sequence to Sequence 모델은 아래의 그림과 같이 구성되어 있습니다.
모델의 역할은 다음과 같습니다.
번역을 하고자 하는 데이터를 RNN Encoder에 입력하여 ... |
xchaoo/titanic | kaggle-titanic.ipynb | apache-2.0 | # -*- coding: utf-8 -*-
import pandas as pd
import numpy as np
# plot
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
# Import the linear regression class
from sklearn.linear_model import LinearRegression
# Sklearn also has a helper that makes it easy to do cross validation
from sklearn.cross_... |
caioau/personal | apresentacao rev4.ipynb | gpl-3.0 | YouTubeVideo('XEVlyP4_11M')
"""
Explanation: Encrypta Tudo Unicamp - 2016
Oficina pratica de privacidade
caioau , fabiom, jv ; contato
Tópicos
Referencias Recomendadas
Como fazer boas senhas
Password Managers
Autenticação em dois passos
dá tempo de falar de PGP?
Referencias recomendadas
algumas referencias legais q... |
qkitgroup/qkit | qkit/doc/notebooks/Quickplot_demonstration.ipynb | gpl-2.0 | %matplotlib qt5
import qkit
qkit.cfg['fid_scan_hdf'] = True
#qkit.cfg['datadir'] = r'D:\data\run_0815' #maybe you want to set a path to your data directory manually?
qkit.start()
import qkit.gui.notebook.quickplot as qp
"""
Explanation: In contrast to the usually taken %matplotlib inline, we want to have a dedicate... |
yw-fang/readingnotes | machine-learning/McKinney-pythonbook2013/chapter04-note.ipynb | apache-2.0 | import numpy.random as nrandom
data = nrandom.randn(3,2)
data
data*10
data + data
"""
Explanation: 阅读笔记
作者:方跃文
Email: fyuewen@gmail.com
时间:始于2017年9月12日, 结束写作于
第四章笔记始于2017年10月17日,结束于2018年1月6日
第四章 Numpy基础:数组和矢量计算
时间: 2017年10月17日早晨
Numpy,即 numerical python的简称,是高性能科学计算和数据分析的基础包。它是本书所介绍的几乎所有高级工具的构建基础。其部分功能如下:
... |
VenkatRepaka/deep-learning | intro-to-rnns/Anna_KaRNNa_Exercises.ipynb | mit | import time
from collections import namedtuple
import numpy as np
import tensorflow as tf
"""
Explanation: Anna KaRNNa
In this notebook, we'll build a character-wise RNN trained on Anna Karenina, one of my all-time favorite books. It'll be able to generate new text based on the text from the book.
This network is bas... |
AllenDowney/ModSim | python/soln/examples/orbit_soln.ipynb | gpl-2.0 | # install Pint if necessary
try:
import pint
except ImportError:
!pip install pint
# download modsim.py if necessary
from os.path import exists
filename = 'modsim.py'
if not exists(filename):
from urllib.request import urlretrieve
url = 'https://raw.githubusercontent.com/AllenDowney/ModSim/main/'
... |
BrainIntensive/OnlineBrainIntensive | resources/matplotlib/Examples/formatting_4.ipynb | mit | %load_ext watermark
%watermark -u -v -d -p matplotlib,numpy
"""
Explanation: Sebastian Raschka
back to the matplotlib-gallery at https://github.com/rasbt/matplotlib-gallery
End of explanation
"""
%matplotlib inline
"""
Explanation: <font size="1.5em">More info about the %watermark extension</font>
End of explanati... |
JannesKlaas/MLiFC | Week 4/Ch. 19 - LSTM for Email classification.ipynb | mit | from sklearn.datasets import fetch_20newsgroups
twenty_train = fetch_20newsgroups(subset='train', shuffle=True)
"""
Explanation: Ch. 19 - LSTM for Email classification
In the last chapter we already learned about basic recurrent neural networks. In theory, simple RNN's should be able to retain even long term memories.... |
Cyberface/nrutils_dev | review/notebooks/compare_waveforms_from_two_codes.ipynb | mit | # Setup ipython environment
%load_ext autoreload
%autoreload 2
%matplotlib inline
# Setup plotting backend
import matplotlib as mpl
mpl.rcParams['lines.linewidth'] = 0.8
mpl.rcParams['font.family'] = 'serif'
mpl.rcParams['font.size'] = 12
mpl.rcParams['axes.labelsize'] = 20
from matplotlib.pyplot import *
# Import us... |
seanjmcm/TrafficSign | Traffic_Sign_Classifier_sept.ipynb | mit | # Load pickled data
import pickle
import cv2 # for grayscale and normalize
# TODO: Fill this in based on where you saved the training and testing data
training_file ='traffic-signs-data/train.p'
validation_file='traffic-signs-data/valid.p'
testing_file = 'traffic-signs-data/test.p'
with open(training_file, mode='rb'... |
NEONScience/NEON-Data-Skills | tutorials-in-development/Python/neon_api/neon_api_02_downloading_observation_py.ipynb | agpl-3.0 | import requests
import json
import pandas as pd
SERVER = 'http://data.neonscience.org/api/v0/'
SITECODE = 'TEAK'
PRODUCTCODE = 'DP1.10003.001'
"""
Explanation: syncID:
title: "Downlaoding NEON Observation Data with Python"
description: ""
dateCreated: 2020-04-24
authors: Maxwell J. Burner
contributors: Donal O'Leary... |
tensorflow/docs-l10n | site/ko/agents/tutorials/3_policies_tutorial.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... |
emjotde/UMZ | Wyklady/08/Konkursy2.v3.ipynb | cc0-1.0 | def runningMeanFast(x, N):
return np.convolve(x, np.ones((N,))/N, mode='valid')
def powerme(x1,x2,n):
X = []
for m in range(n+1):
for i in range(m+1):
X.append(np.multiply(np.power(x1,i),np.power(x2,(m-i))))
return np.hstack(X)
def safeSigmoid(x, eps=0):
y = 1.0/(1.0 + np.exp(-... |
bjsmith/motivation-simulation | test-jupyter-widgets-clone3.ipynb | gpl-3.0 | from matplotlib.pyplot import figure, plot, xlabel, ylabel, title, show
from IPython.display import display
text = widgets.FloatText()
floatText = widgets.FloatText(description='MyField',min=-5,max=5)
floatSlider = widgets.FloatSlider(description='MyField',min=-5,max=5)
#https://ipywidgets.readthedocs.io/en/stable/... |
biof-309-python/BIOF309-2016-Fall | Week_03/Week03 - 02 - Week 2 Homework Review.ipynb | mit | # This sequence is the first 100 nucleotides of the Influenza H1N1 Virus segment 8
flu_ns1_seq = 'GTGACAAAGACATAATGGATCCAAACACTGTGTCAAGCTTTCAGGTAGATTGCTTTCTTTGGCATGTCCGCAAACGAGTTGCAGACCAAGAACTAGGTGA'
"""
Explanation: Week 2 Homework - Review
We have seen this week how to print and manipulate text string in python. Le... |
alephcero/adsProject | 1_Model_by_Individual.ipynb | gpl-3.0 | # helper functions
import getEPH
import categorize
import schoolYears
import make_dummy
import functionsForModels
# libraries
import pandas as pd
import numpy as np
from scipy import stats
import statsmodels.api as sm
import matplotlib.pyplot as plt
import seaborn as sns
from statsmodels.sandbox.regression.predstd impo... |
ES-DOC/esdoc-jupyterhub | notebooks/cmcc/cmip6/models/cmcc-esm2-hr5/land.ipynb | gpl-3.0 | # DO NOT EDIT !
from pyesdoc.ipython.model_topic import NotebookOutput
# DO NOT EDIT !
DOC = NotebookOutput('cmip6', 'cmcc', 'cmcc-esm2-hr5', 'land')
"""
Explanation: ES-DOC CMIP6 Model Properties - Land
MIP Era: CMIP6
Institute: CMCC
Source ID: CMCC-ESM2-HR5
Topic: Land
Sub-Topics: Soil, Snow, Vegetation, Ener... |
soracom/handson | cloud/gcp/src/datalab/sensor_data_analysis.ipynb | apache-2.0 | %%bq query -n requests
SELECT datetime, cpu_temperature, temperature
FROM `soracom_handson.raspi_env`
order by datetime asc
import google.datalab.bigquery as bq
import pandas as pd
df_from_bq = requests.execute(output_options=bq.QueryOutput.dataframe()).result()
# データの確認
df_from_bq
# 文字列型でデータが取得されているので変換
df_from_b... |
mne-tools/mne-tools.github.io | stable/_downloads/568aae18ec92d284aff29cfb5f3c11e7/resolution_metrics.ipynb | bsd-3-clause | # Author: Olaf Hauk <olaf.hauk@mrc-cbu.cam.ac.uk>
#
# License: BSD-3-Clause
import mne
from mne.datasets import sample
from mne.minimum_norm import make_inverse_resolution_matrix
from mne.minimum_norm import resolution_metrics
print(__doc__)
data_path = sample.data_path()
subjects_dir = data_path / 'subjects'
meg_pa... |
samueljrowell/UVM-ME249-CFD | ME249-Lecture-3.ipynb | gpl-2.0 | %matplotlib inline
# plots graphs within the notebook
%config InlineBackend.figure_format='svg' # not sure what this does, may be default images to svg format
from IPython.display import Image
from IPython.core.display import HTML
def header(text):
raw_html = '<h4>' + str(text) + '</h4>'
return raw_html
def... |
frucci/kaggle_quora_competition | Tagger.ipynb | gpl-3.0 | import ourfunctions as f
from time import time
import gc
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import matplotlib.pyplot as plt
import seaborn as sns
import nltk
import re
from gensim.models import word2vec
from IPython.core.interactiveshell import ... |
gabrielhpbc/CD | APS5_alunos.ipynb | mit | %matplotlib inline
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import expon
from numpy import arange
import scipy.stats as stats
#Abrir o arquivo
df = pd.read_csv('earthquake.csv')
#listar colunas
print(list(df))
"""
Explanation: APS 5 - Questões com auxílio do Pandas
Nome... |
GoogleCloudPlatform/training-data-analyst | blogs/form_parser/formparsing.ipynb | apache-2.0 | !sudo chown -R jupyter:jupyter /home/jupyter/imported/formparsing.ipynb
from IPython.display import Markdown as md
### change to reflect your notebook
_nb_repo = 'training-data-analyst'
_nb_loc = "blogs/form_parser/formparsing.ipynb"
_nb_title = "Form Parsing Using Google Cloud Document AI"
### no need to change any... |
adieuadieu/educathingamajigs | udacity/dlnd/p1-your-first-network/dlnd-your-first-neural-network.ipynb | unlicense | %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... |
rthadani/coursera-ml | notebooks/classification/module-4-linear-classifier-regularization-pandas.ipynb | epl-1.0 | products = pd.read_csv('../../data/amazon_baby_subset.csv')
products['sentiment']
products['sentiment'].size
products.head(10).name
print ('# of positive reviews =', len(products[products['sentiment']==1]))
print ('# of negative reviews =', len(products[products['sentiment']==-1]))
# The same feature processing (s... |
kubeflow/pipelines | components/gcp/dataproc/submit_hadoop_job/sample.ipynb | apache-2.0 | %%capture --no-stderr
!pip3 install kfp --upgrade
"""
Explanation: Name
Data preparation using Hadoop MapReduce on YARN with Cloud Dataproc
Label
Cloud Dataproc, GCP, Cloud Storage, Hadoop, YARN, Apache, MapReduce
Summary
A Kubeflow Pipeline component to prepare data by submitting an Apache Hadoop MapReduce job on Ap... |
calee0219/Course | DataMining/hw0/hw0.ipynb | mit | #!/usr/bin/env python3
import numpy as np
import pandas as pd
from sklearn import preprocessing
from sklearn.preprocessing import Imputer
from sklearn.metrics import pairwise
from pyproj import Geod
df = pd.read_csv('201707-citibike-tripdata.csv')
"""
Explanation: 2017 NCTU Data Maning HW0
0416037 李家安
Info
Group 3
... |
gigjozsa/HI_analysis_course | chapter_00_preface/00_appendix.ipynb | gpl-2.0 | import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
from IPython.display import HTML
HTML('../style/course.css') #apply general CSS
"""
Explanation: Content
Glossary
0. Preface
Previous: 1. Preface: References and further reading
0. Preface: Appendix<a id='preface:sec:appendix'></a>
0. Preface... |
mne-tools/mne-tools.github.io | 0.23/_downloads/b96d98f7c704193a3ede176aaf9433d2/85_brainstorm_phantom_ctf.ipynb | bsd-3-clause | # Authors: Eric Larson <larson.eric.d@gmail.com>
#
# License: BSD (3-clause)
import os.path as op
import numpy as np
import matplotlib.pyplot as plt
import mne
from mne import fit_dipole
from mne.datasets.brainstorm import bst_phantom_ctf
from mne.io import read_raw_ctf
print(__doc__)
"""
Explanation: Brainstorm CT... |
kerimlcr/ab2017-dpyo | ornek/osmnx/osmnx-0.3/examples/04-example-simplify-network.ipynb | gpl-3.0 | import osmnx as ox
%matplotlib inline
ox.config(log_file=True, log_console=True, use_cache=True)
"""
Explanation: Use OSMnx to topologically correct and simplify street networks
Overview of OSMnx
GitHub repo
Examples, demos, tutorials
End of explanation
"""
# create a network around some (lat, lon) point and plot ... |
Gonzalo933/portfolio | blog/content/K_means_blog.ipynb | mit | %matplotlib inline
#loading the dataset
import numpy as np
import pandas as pd
import seaborn as sns # Nice plots
import matplotlib.pyplot as plt
import matplotlib.cm as cmx
from scipy.spatial.distance import cdist
df = pd.read_csv('old_faithful.csv')
df.round(2) # Round all data to two decimal places
df.drop(df.colum... |
hannorein/rebound | ipython_examples/Units.ipynb | gpl-3.0 | import rebound
import math
sim = rebound.Simulation()
sim.G = 6.674e-11
"""
Explanation: Unit convenience functions
For convenience, REBOUND offers simple functionality for converting units. One implicitly sets the units for the simulation through the values used for the initial conditions, but one has to set the app... |
statsmodels/statsmodels.github.io | v0.12.2/examples/notebooks/generated/statespace_tvpvar_mcmc_cfa.ipynb | bsd-3-clause | %matplotlib inline
from importlib import reload
import numpy as np
import pandas as pd
import statsmodels.api as sm
import matplotlib.pyplot as plt
from scipy.stats import invwishart, invgamma
# Get the macro dataset
dta = sm.datasets.macrodata.load_pandas().data
dta.index = pd.date_range('1959Q1', '2009Q3', freq='Q... |
dcavar/python-tutorial-for-ipython | notebooks/Python Parsing with NLTK.ipynb | apache-2.0 | from nltk import Nonterminal, nonterminals, Production, CFG
nt1 = Nonterminal('NP')
nt2 = Nonterminal('VP')
nt1.symbol()
nt1 == Nonterminal('NP')
nt1 == nt2
S, NP, VP, PP = nonterminals('S, NP, VP, PP')
print(S.symbol())
N, V, P, DT = nonterminals('N, V, P, DT')
prod1 = Production(S, [NP, VP])
prod2 = Productio... |
iurilarosa/thesis | codici/Archiviati/Plots/.ipynb_checkpoints/Sensibilità-checkpoint.ipynb | gpl-3.0 | theta = 2.5
probs = p0*(1-p0)/math.pow(p1,2)
sogliaCR = 6
confs = sogliaCR - math.sqrt(2)*scsp.erfcinv(2*gamma)
const0min = 4.02*math.pow(N,-1/4)*math.pow(theta,-1/2)*math.pow(probs, 1/4)*math.pow(confs, 1/2)*math.pow(tFft,-1/2)
const0min
lambda0min = 4.02*math.pow(theta,-1/2)*math.pow(probs, 1/4)*math.pow(confs, 1/... |
pmgbergen/porepy | tutorials/parameter_assignment_assembler_setup.ipynb | gpl-3.0 | import numpy as np
import scipy.sparse as sps
import porepy as pp
"""
Explanation: Assembly of system with multiple domains, variables and numerics
This tutorial has the dual purpose of illustrating parameter assigment in PorePy, and also showing how to set up problems in (mixed-dimensional) geometries. It contains ... |
Kaggle/learntools | notebooks/computer_vision/raw/ex4.ipynb | apache-2.0 | # Setup feedback system
from learntools.core import binder
binder.bind(globals())
from learntools.computer_vision.ex4 import *
import tensorflow as tf
import matplotlib.pyplot as plt
import learntools.computer_vision.visiontools as visiontools
plt.rc('figure', autolayout=True)
plt.rc('axes', labelweight='bold', labe... |
blakeflei/IntroScientificPythonWithJupyter | 08 - Signal Processing - Scipy.ipynb | bsd-3-clause | import numpy as np # Python numpy
from scipy import signal, stats # Python scipy signal package
from matplotlib import pyplot as plt # Python matplotlib library
import matplotlib.gridspec as gridspec # Multiple plots in a single figure
# Display matplotlib in the notebook
%matplotlib inline
%cd da... |
LSSTC-DSFP/LSSTC-DSFP-Sessions | Sessions/Session14/Day3/AutoencodersBlank.ipynb | mit | !pip install astronn
import torch
import matplotlib.pyplot as plt
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.ensemble import IsolationForest
from astroNN.datasets import load_galaxy10
from astroNN.datasets.galaxy10 import galaxy10cls_lookup
from sklearn.ensemble import RandomFo... |
broundy/udacity | nanodegrees/deep_learning_foundations/unit_3/lesson_34_sentiment-rnn/Sentiment RNN.ipynb | unlicense | import numpy as np
import tensorflow as tf
with open('reviews.txt', 'r') as f:
reviews = f.read()
with open('labels.txt', 'r') as f:
labels = f.read()
reviews[:1000]
"""
Explanation: Sentiment Analysis with an RNN
In this notebook, you'll implement a recurrent neural network that performs sentiment analysis.... |
minireference/noBSLAnotebooks | cut_material/Cut material.ipynb | mit | # Recall the linear transformation P we constructed above
M_P = Matrix([[1,1],
[1,1]])/2
def P(vec):
"""Compute the projection of vector `vec` onto line y=x."""
return M_P*vec
# null space of M_P == kernel of P
M_P.nullspace()
# any vector from the null space gets mapped to the zero vector
n = ... |
bassio/omicexperiment | doc/01_experiment_basics.ipynb | bsd-3-clause | %load_ext autoreload
%autoreload 2
from omicexperiment.experiment.microbiome import MicrobiomeExperiment
mapping = "example_map.tsv"
biom = "example_fungal.biom"
tax = "blast_tax_assignments.txt"
#the MicrobiomeExperiment constructor currently needs three parameters
exp = MicrobiomeExperiment(biom, mapping,tax)
#the... |
vikashvverma/machine-learning | mlfoundation/istat/project/investigate-a-dataset-template.ipynb | mit | # import necessary libraries
%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import seaborn as sns
"""
Explanation: Project: Investigate TMDb Movie Data
Table of Contents
<ul>
<li><a href="#intro">Introduction</a></li>
<li><a href="#wrangling">Data Wrangling</a></li>
<li><a h... |
dereneaton/ipyrad | newdocs/API-analysis/cookbook-distance.ipynb | gpl-3.0 | # conda install ipyrad -c bioconda
# conda install toyplot -c eaton-lab (optional)
import ipyrad.analysis as ipa
import toyplot
"""
Explanation: <h2><span style="color:gray">ipyrad-analysis toolkit:</span> distance</h2>
Key features:
Calculate pairwise genetic distances between samples.
Filter SNPs to reduce missi... |
feststelltaste/software-analytics | notebooks/Checking the modularization of software systems by analyzing co-changing source code files.ipynb | gpl-3.0 | from lib.ozapfdis.git_tc import log_numstat
GIT_REPO_DIR = "../../dropover_git/"
git_log = log_numstat(GIT_REPO_DIR)[['sha', 'file']]
git_log.head()
"""
Explanation: Introduction
In my previous blog post, we've seen how we can identify files that change together in one commit.
In this blog post, we take the analysis ... |
fisicatyc/Cuantica_Jupyter | vis_int.ipynb | mit | from math import sin, cos, tan, sqrt, log, exp, pi
"""
Explanation: Visualización e interacción
La visualización e interacción es un requerimiento actual para las nuevas metodologías de enseñanza, donde se busca un aprendizaje mucho más visual y que permita, a través de la experimentación, el entendimiento de un fenóm... |
ceroytres/ipython-notebooks | Algorithms/Random_Graphs.ipynb | mit | import networkx as nx
import numpy as np
import matplotlib.pyplot as plt
import warnings
warnings.filterwarnings('ignore') #NetworkX has some deprecation warnings
"""
Explanation: Random Graphs
End of explanation
"""
params = [(10,0.1),(10,.5),(10,0.9),(20,0.1),(20,.5),(20,0.9)]
plt.figure(figsize=(15,10))
idx = 1
... |
uber/pyro | tutorial/source/effect_handlers.ipynb | apache-2.0 | import torch
import pyro
import pyro.distributions as dist
import pyro.poutine as poutine
from pyro.poutine.runtime import effectful
pyro.set_rng_seed(101)
"""
Explanation: Poutine: A Guide to Programming with Effect Handlers in Pyro
Note to readers: This tutorial is a guide to the API details of Pyro's effect hand... |
leonarduk/stockmarketview | timeseries-analysis-python/src/main/python/FinanceOps/01B_Better_Long-Term_Stock_Forecasts.ipynb | apache-2.0 | %matplotlib inline
# Imports from Python packages.
import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter
import pandas as pd
import numpy as np
import os
# Imports from FinanceOps.
from curve_fit import CurveFitReciprocal
from data_keys import *
from data import load_index_data, load_stock_data
... |
vinitsamel/udacitydeeplearning | autoencoder/Convolutional_Autoencoder_Solution.ipynb | mit | %matplotlib inline
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets('MNIST_data', validation_size=0)
img = mnist.train.images[2]
plt.imshow(img.reshape((28, 28)), cmap='Greys_r')
"""
Explanation: C... |
prk327/CoAca | 5__Merging_Concatenating.ipynb | gpl-3.0 | # loading libraries and reading the data
import numpy as np
import pandas as pd
market_df = pd.read_csv("./global_sales_data/market_fact.csv")
customer_df = pd.read_csv("./global_sales_data/cust_dimen.csv")
product_df = pd.read_csv("./global_sales_data/prod_dimen.csv")
shipping_df = pd.read_csv("./global_sales_data/sh... |
erinspace/share_tutorials | 2_Complex_Queries_Basic_Visualization_py3.ipynb | apache-2.0 | # Json library parses JSON from strings or files. The library parses JSON into a Python dictionary or list.
# It can also convert Python dictionaries or lists into JSON strings.
# https://docs.python.org/2.7/library/json.html
import json
# Requests library allows you to send organic, grass-fed HTTP/1.1 reque... |
Olsthoorn/TransientGroundwaterFlow | Assignment/VScode/AssJan2019.ipynb | gpl-3.0 | import numpy as np
import matplotlib.pyplot as plt
from scipy.special import exp1 # Theis well function
from scipy.special import erfc
# import the necessary fucntionality
import numpy as np
import matplotlib.pyplot as plt
from scipy.special import exp1 as W # Theis well function
"""
Explanation: Assignment Jan 201... |
Kaggle/learntools | notebooks/python/raw/ex_6.ipynb | apache-2.0 | from learntools.core import binder; binder.bind(globals())
from learntools.python.ex6 import *
print('Setup complete.')
"""
Explanation: You are almost done with the course. Nice job!
We have a couple more interesting problems for you before you go.
As always, run the setup code below before working on the questions.... |
tpin3694/tpin3694.github.io | python/pandas_data_structures.ipynb | mit | import pandas as pd
"""
Explanation: Title: pandas Data Structures
Slug: pandas_data_structures
Summary: pandas Data Structures
Date: 2016-05-01 12:00
Category: Python
Tags: Data Wrangling
Authors: Chris Albon
Import modules
End of explanation
"""
floodingReports = pd.Series([5, 6, 2, 9, 12])
floodingReports
"""... |
CalPolyPat/phys202-2015-work | assignments/project/Progress Report.ipynb | mit | import numpy as np
import matplotlib
from matplotlib import pyplot as plt
matplotlib.style.use('ggplot')
import IPython as ipynb
%matplotlib inline
"""
Explanation: An Exploration of Nueral Net Capabilities
End of explanation
"""
z = np.linspace(-10, 10, 100)
f=plt.figure(figsize=(15, 5))
plt.subplot(1, 2,1)
plt.plo... |
kubernetes-client/python | examples/notebooks/create_deployment.ipynb | apache-2.0 | from kubernetes import client, config
"""
Explanation: How to create a Deployment
In this notebook, we show you how to create a Deployment with 3 ReplicaSets. These ReplicaSets are owned by the Deployment and are managed by the Deployment controller. We would also learn how to carry out RollingUpdate and RollBack to n... |
cliburn/sta-663-2017 | scratch/Lecture09.ipynb | mit | %matplotlib inline
import seaborn as sns
sns.set_context('notebook', font_scale=1.5)
"""
Explanation: Machine Learning in Python
End of explanation
"""
from sklearn.preprocessing import PolynomialFeatures, StandardScaler
from sklearn.feature_selection import VarianceThreshold
from sklearn.model_selection import tra... |
ES-DOC/esdoc-jupyterhub | notebooks/mohc/cmip6/models/sandbox-1/ocnbgchem.ipynb | gpl-3.0 | # DO NOT EDIT !
from pyesdoc.ipython.model_topic import NotebookOutput
# DO NOT EDIT !
DOC = NotebookOutput('cmip6', 'mohc', 'sandbox-1', 'ocnbgchem')
"""
Explanation: ES-DOC CMIP6 Model Properties - Ocnbgchem
MIP Era: CMIP6
Institute: MOHC
Source ID: SANDBOX-1
Topic: Ocnbgchem
Sub-Topics: Tracers.
Properties:... |
DistrictDataLabs/intro-to-nltk | NLTK.ipynb | mit | import nltk
nltk.download()
"""
Explanation: Introduction to NLP with NLTK
Natural Language Processing (NLP) is often taught at the academic level from the perspective of computational linguists. However, as data scientists, we have a richer view of the natural language world - unstructured data that by its very natu... |
JarnoRFB/qtpyvis | notebooks/keras/inference.ipynb | mit | model = keras.models.load_model('example_keras_mnist_model.h5')
model.summary()
"""
Explanation: Inference in Keras is rather simple. One just calls the predict method of the loaded model.
End of explanation
"""
dataset = mnist.load_data()
train_data = dataset[0][0] / 255
train_data = train_data[..., np.newaxis].ast... |
ericmjl/Network-Analysis-Made-Simple | archive/3-hubs-and-paths-instructor.ipynb | mit | # Load the sociopatterns network data.
G = cf.load_sociopatterns_network()
# How many nodes and edges are present?
len(G.nodes()), len(G.edges())
"""
Explanation: Load Data
We will load the sociopatterns network data for this notebook. From the Konect website:
End of explanation
"""
# Let's find out the number of ... |
tensorflow/docs-l10n | site/en-snapshot/addons/tutorials/image_ops.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... |
tclaudioe/Scientific-Computing | SC2/U2_QuadWorldAll.ipynb | bsd-3-clause | import numpy as np
from matplotlib import pyplot as plt
import math
import time
%matplotlib inline
from ipywidgets import interact
import inspect
"""
Explanation: <center>
<h1> ILI286 - Computación Científica II </h1>
<h2> Integración Numérica </h2>
<h2> <a href="#acknowledgements"> [S]cientific [C]omputi... |
spulido99/Programacion | Alex/.ipynb_checkpoints/Cancer-checkpoint.ipynb | mit | import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
sns.set()
%matplotlib inline
n=np.random.normal(10,6,100)
n1=np.random.normal(5,7,100)
sns.distplot(n)
sns.distplot(n1)
import matplotlib.pyplot as plt
plt.scatter(n,n1)
data = pd.DataFrame({'x':n, 'y':n1})
data.head()
sns.lmplot('x', 'y... |
lin99/NLPTM-2016 | 4.Docs/quickIntro2NN.ipynb | mit | from pybrain.tools.shortcuts import buildNetwork
net = buildNetwork(2, 1, outclass=pybrain.SigmoidLayer)
print net.params
def print_pred2(dataset, network):
df = pd.DataFrame(dataset.data['sample'][:dataset.getLength()],columns=['X', 'Y'])
prediction = np.round(network.activateOnDataset(dataset),3)
df['ou... |
joaoandre/algorithms | intro-python-data-science/week1.ipynb | mit | x = 1
y = 2
x + y
x
"""
Explanation: You are currently looking at version 1.0 of this notebook. To download notebooks and datafiles, as well as get help on Jupyter notebooks in the Coursera platform, visit the Jupyter Notebook FAQ course resource.
The Python Programming Language: Functions
End of explanation
"""
d... |
mari-linhares/tensorflow-workshop | code_samples/estimators-for-free/estimators_for_free.ipynb | apache-2.0 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# our model
import model as m
# tensorflow
import tensorflow as tf
print(tf.__version__) #tested with tf v1.2
from tensorflow.contrib import learn
from tensorflow.contrib.learn.python.learn import learn_run... |
jhprinz/openpathsampling | examples/alanine_dipeptide_mstis/AD_mstis_4_analysis.ipynb | lgpl-2.1 | %matplotlib inline
import matplotlib.pyplot as plt
import openpathsampling as paths
import numpy as np
"""
Explanation: Analyzing the MSTIS simulation
Included in this notebook:
Opening files for analysis
Rates, fluxes, total crossing probabilities, and condition transition probabilities
Per-ensemble properties such ... |
KshitijT/fundamentals_of_interferometry | 1_Radio_Science/1_5_black_body_radiation.ipynb | gpl-2.0 | import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
from IPython.display import HTML
HTML('../style/course.css') #apply general CSS
"""
Explanation: Outline
Glossary
1. Radio Science using Interferometric Arrays
Previous: 1.4 Radio regime
Next: 1.6 Synchrotron emission
Section status: <span st... |
tkzeng/molecular-design-toolkit | moldesign/_notebooks/Example 5. Enthalpic barriers.ipynb | apache-2.0 | import moldesign as mdt
from moldesign import units as u
%matplotlib notebook
from matplotlib.pyplot import *
try: import seaborn # optional, makes graphs look better
except ImportError: pass
u.default.energy = u.kcalpermol # use kcal/mol for energy
"""
Explanation: <span style="float:right">
<a href="http://molde... |
sdpython/pyquickhelper | _doc/notebooks/having_a_form_in_a_notebook.ipynb | mit | from jyquickhelper import add_notebook_menu
add_notebook_menu()
"""
Explanation: Having a form in a notebook
Forms in a notebook without storing the values in it, animation with pyquickhelper and matplotlib.
End of explanation
"""
from pyquickhelper.ipythonhelper import open_html_form
params = {"module":"", "version... |
OSGeo-live/CesiumWidget | GSOC/notebooks/Projects/CARTOPY/00 Using cartopy with matplotlib.ipynb | apache-2.0 | %matplotlib inline
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
plt.figure(figsize=(12, 12))
ax = plt.axes(projection=ccrs.PlateCarree())
ax.coastlines();
"""
Explanation: Beautifully simple maps
Cartopy has exposed an interface to enable easy map creation using matplotlib. Creating a basic map is as si... |
dietmarw/EK5312_ElectricalMachines | Chapman/Ch4-Problem_4-03.ipynb | unlicense | %pylab notebook
"""
Explanation: Excercises Electric Machinery Fundamentals
Chapter 4
Problem 4-3
End of explanation
"""
If = 5.0 # [A]
PF = 0.9
Xs = 2.5 # [Ohm]
Ra = 0.2 # [Ohm]
Zload = 24 * (cos(25/180.0 * pi) + sin(25/180.0 * pi)*1j)
P = 50e6 # [W]
Pf_w = 1.0e6 # [W]
Pcore = 1.5e6 # [W]
Pstray = 0 # ... |
ipython/ipywidgets | docs/source/examples/Widget Events.ipynb | bsd-3-clause | from __future__ import print_function
"""
Explanation: Index - Back - Next
Widget Events
Special events
End of explanation
"""
import ipywidgets as widgets
print(widgets.Button.on_click.__doc__)
"""
Explanation: The Button is not used to represent a data type. Instead the button widget is used to handle mouse clic... |
bjmorgan/bsym | examples/bsym_examples.ipynb | mit | from bsym import SymmetryOperation
SymmetryOperation([[ 1, 0, 0 ],
[ 0, 1, 0 ],
[ 0, 0, 1 ]])
"""
Explanation: 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 opera... |
mne-tools/mne-tools.github.io | 0.18/_downloads/a271bc382505fca1eb3f2c32f85b865f/spm_faces_dataset.ipynb | bsd-3-clause | # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Denis Engemann <denis.engemann@gmail.com>
#
# License: BSD (3-clause)
# sphinx_gallery_thumbnail_number = 10
import matplotlib.pyplot as plt
import mne
from mne.datasets import spm_face
from mne.preprocessing import ICA, create_eog_ep... |
aldian/tensorflow | tensorflow/lite/g3doc/performance/post_training_integer_quant.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... |
ES-DOC/esdoc-jupyterhub | notebooks/ncc/cmip6/models/sandbox-2/ocean.ipynb | gpl-3.0 | # DO NOT EDIT !
from pyesdoc.ipython.model_topic import NotebookOutput
# DO NOT EDIT !
DOC = NotebookOutput('cmip6', 'ncc', 'sandbox-2', 'ocean')
"""
Explanation: ES-DOC CMIP6 Model Properties - Ocean
MIP Era: CMIP6
Institute: NCC
Source ID: SANDBOX-2
Topic: Ocean
Sub-Topics: Timestepping Framework, Advection, ... |
JAmarel/QLab | ElectronChargePerMass/DataAnalysis.ipynb | mit | df = pd.read_excel('Data.xlsx', sheetname=None)
df['1000V']
keys = ['1000V','1500V','2000V','2500V','3000V']
xpoints = np.array([df[key]['x(cm)'] for key in keys]) #Same x points at all voltages
#Convert x (cm) to meters
xpoints = xpoints*1e-2
tic_length = df['1000V']['tic length (m)'][0] #Length of ticks on paper... |
moonbury/pythonanywhere | learn_scipy/7702OS_Chap_01_rev20150118.ipynb | gpl-3.0 | import numpy
import scipy
scores=numpy.array([114, 100, 104, 89, 102, 91, 114, 114, 103, 105, 108, 130, 120, 132, 111, 128, 118, 119, 86,
72, 111, 103, 74, 112, 107, 103, 98, 96, 112, 112, 93])
"""
Explanation: <center><font color=red>Learning SciPy for Numerical and Scientific Computing</font></... |
liufuyang/ManagingBigData_MySQL_DukeUniv | week3/MySQL_Exercise_07_Inner_Joins.ipynb | mit | %load_ext sql
%sql mysql://studentuser:studentpw@mysqlserver/dognitiondb
%sql USE dognitiondb
%config SqlMagic.displaylimit=25
"""
Explanation: Copyright Jana Schaich Borg/Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
MySQL Exercise 7: Joining Tables with Inner Joins
Before completing these exercises, I ... |
superliaoyong/plist-forsource | python 第四课课件 一.ipynb | apache-2.0 | import array
a = array.array('i', range(10))
# 数据类型必须统一
a[1] = 's'
a
import numpy as np
"""
Explanation: 人生苦短,我用python
python第四课
课程安排
1、numpy
2、pandas
3、matplotlib
numpy
数组跟列表,列表可以存储任意类型的数据,而数组只能存储一种类型数据
End of explanation
"""
a_list = list(range(10))
b = np.array(a_list)
type(b)
"""
Explanation: 从原有列表转换为数组
E... |
Raag079/self-driving-car | Term01-Computer-Vision-and-Deep-Learning/Labs/02-CarND-TensorFlow-Lab/.ipynb_checkpoints/lab-checkpoint.ipynb | mit | import hashlib
import os
import pickle
from urllib.request import urlretrieve
import numpy as np
from PIL import Image
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelBinarizer
from sklearn.utils import resample
from tqdm import tqdm
from zipfile import ZipFile
print('All m... |
rizar/attention-lvcsr | libs/Theano/doc/library/d3viz/index.ipynb | mit | import theano as th
import theano.tensor as T
import numpy as np
"""
Explanation: d3viz: Interactive visualization of Theano compute graphs
Requirements
d3viz requires the pydot package, which can be installed with pip:
pip install pydot
Overview
d3viz extends Theano’s printing module to interactively visualize comput... |
darkomen/TFG | medidas/12082015/Análisis de datos Ensayo 2.ipynb | cc0-1.0 | #Importamos las librerías utilizadas
import numpy as np
import pandas as pd
import seaborn as sns
#Mostramos las versiones usadas de cada librerías
print ("Numpy v{}".format(np.__version__))
print ("Pandas v{}".format(pd.__version__))
print ("Seaborn v{}".format(sns.__version__))
#Abrimos el fichero csv con los datos... |
DestrinStorm/deep-learning | dcgan-svhn/DCGAN.ipynb | mit | %matplotlib inline
import pickle as pkl
import matplotlib.pyplot as plt
import numpy as np
from scipy.io import loadmat
import tensorflow as tf
!mkdir data
"""
Explanation: Deep Convolutional GANs
In this notebook, you'll build a GAN using convolutional layers in the generator and discriminator. This is called a De... |
datacommonsorg/api-python | notebooks/intro_data_science/Introduction_to_Clustering.ipynb | apache-2.0 | !pip install datacommons --upgrade --quiet
!pip install datacommons_pandas --upgrade --quiet
import datacommons
import datacommons_pandas
import numpy as np
import pandas as pd
# for visualization
import matplotlib.pyplot as plt
import seaborn as sns
# for clustering
from sklearn.cluster import KMeans
"""
Explanati... |
jornvdent/WUR-Geo-Scripting-Course | Lesson 9/Excercise 9.ipynb | gpl-3.0 | from osgeo import ogr
from osgeo import osr
import os
driverName = "ESRI Shapefile"
drv = ogr.GetDriverByName( driverName )
if drv is None:
print "%s driver not available.\n" % driverName
else:
print "%s driver IS available.\n" % driverName
"""
Explanation: Solution Excercise 9 Team Hadochi
Jorn van der Ent
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.