repo_name
stringlengths
6
77
path
stringlengths
8
215
license
stringclasses
15 values
content
stringlengths
335
154k
iptrha/ml_techbier
machine_learning_loesung.ipynb
mit
import numpy as np import matplotlib.pyplot as plt import pylab pylab.rcParams['figure.figsize'] = (13.0, 8.0) %matplotlib inline import pickle import sklearn import sklearn.linear_model import sklearn.preprocessing import sklearn.gaussian_process import sklearn.ensemble # to make the code is compatible with python...
anugrah-saxena/pycroscopy
jupyter_notebooks/01_Tutorial_Translation.ipynb
mit
# downloading packages: !pip install wget pycroscopy # Ensure python 3 compatibility: from __future__ import division, print_function, absolute_import, unicode_literals # In case some of these packages are not installed, install them #!pip install -U os wget numpy h5py matplotlib pycroscopy # The package for accessi...
sdpython/cpyquickhelper
_doc/notebooks/cbenchmark_vector.ipynb
mit
from jyquickhelper import add_notebook_menu add_notebook_menu() %matplotlib inline """ Explanation: Use of PYBIND11_MAKE_OPAQUE pybind11 automatically converts std::vector into python list. That's convenient but not necessarily efficient depending on how it is used after that. PYBIND11_MAKE_OPAQUE is used to create a...
musketeer191/job_analytics
.ipynb_checkpoints/user_apply_job-p1-checkpoint.ipynb
gpl-3.0
n_application, n_applicant, n_job, n_job_title = apps.shape[0], apps['uid'].nunique(), apps['job_id'].nunique(), apps['job_title'].nunique() n_company = apps['reg_no_uen_ep'].nunique() stats = pd.DataFrame({'n_application': n_application, 'n_applicant': n_applicant, 'n_job': n_job, 'n_job_title'...
dereneaton/ipyrad
tests/cookbook-tetrad.ipynb
gpl-3.0
## conda install ipyrad -c ipyrad ## conda install toytree -c eaton-lab import ipyrad as ip import ipyrad.analysis as ipa import ipyparallel as ipp import toytree """ Explanation: (📗) ipyrad Cookbook: tetrad species tree inference The ipyrad.analysis package includes a module and command-line tool called tetr...
undercertainty/ou_nlp
12_distributed_tensorflow.ipynb
apache-2.0
# To support both python 2 and python 3 from __future__ import division, print_function, unicode_literals # Common imports import numpy as np import os # to make this notebook's output stable across runs def reset_graph(seed=42): tf.reset_default_graph() tf.set_random_seed(seed) np.random.seed(seed) # To...
pastas/pasta
examples/notebooks/02_fix_parameters.ipynb
mit
import pandas as pd import pastas as ps import matplotlib.pyplot as plt ps.set_log_level("ERROR") ps.show_versions() """ Explanation: Time Series Analysis with Pastas Developed by Mark Bakker, TU Delft Required files to run this notebook (all available from the data subdirectory): Head files: head_nb1.csv, B58C06980...
savkov/CRFSuiteTagger
example/example.ipynb
gpl-3.0
import gzip, os, wget def extract(fp): f = gzip.open(fp, 'rb') with open(fp[:-3], 'w') as fh: fh.write(f.read()) f.close() try: os.makedirs('data') except OSError: pass try: os.makedirs('thesauri') except OSError: pass train_url = 'http://www.cnts.ua.ac.be/conll2000/chunking/trai...
watsonyanghx/CS231n
assignment2/BatchNormalization.ipynb
mit
# As usual, a bit of setup import time import numpy as np import matplotlib.pyplot as plt from cs231n.classifiers.fc_net import * from cs231n.data_utils import get_CIFAR10_data from cs231n.gradient_check import eval_numerical_gradient, eval_numerical_gradient_array from cs231n.solver import Solver %matplotlib inline ...
tigerstat46/Deep-Learning
StateFarmDeep.ipynb
mit
#importing necessary packages import numpy as np import matplotlib.pyplot as plt import tensorflow as tf import tflearn import tensorflow as tf from PIL import Image %matplotlib inline #for writing text files import glob import os import random #reading images from a text file from tflearn.data_utils import imag...
mne-tools/mne-tools.github.io
0.20/_downloads/1458a29737cd3695e2bfc763012d8259/plot_report.ipynb
bsd-3-clause
import os import mne """ Explanation: Getting started with mne.Report This tutorial covers making interactive HTML summaries with :class:mne.Report. :depth: 2 As usual we'll start by importing the modules we need and loading some example data <sample-dataset>: End of explanation """ path = mne.datasets.samp...
poldrack/fmri-analysis-vm
analysis/connectivity/PPI.ipynb
mit
import os,sys import numpy %matplotlib inline import matplotlib.pyplot as plt sys.path.insert(0,'../') from utils.mkdesign import create_design_singlecondition from nipy.modalities.fmri.hemodynamic_models import spm_hrf,compute_regressor from utils.make_data import make_continuous_data from statsmodels.tsa.arima_proces...
ChadFulton/statsmodels
examples/notebooks/statespace_cycles.ipynb
bsd-3-clause
%matplotlib inline import numpy as np import pandas as pd import statsmodels.api as sm import matplotlib.pyplot as plt from pandas_datareader.data import DataReader endog = DataReader('UNRATE', 'fred', start='1954-01-01') """ Explanation: Trends and cycles in unemployment Here we consider three methods for separatin...
SylvainCorlay/bqplot
examples/Marks/Pyplot/Pie.ipynb
apache-2.0
data = np.random.rand(3) fig = plt.figure(animation_duration=1000) pie = plt.pie(data, display_labels='outside', labels=list(string.ascii_uppercase)) fig """ Explanation: Basic Pie Chart End of explanation """ n = np.random.randint(1, 10) pie.sizes = np.random.rand(n) """ Explanation: Update Data End of explanatio...
ceos-seo/data_cube_notebooks
notebooks/DEM/SRTM_Product_Showcase_v2.ipynb
apache-2.0
import sys import os sys.path.append(os.environ.get('NOTEBOOK_ROOT')) %matplotlib inline import datacube import matplotlib.pyplot as plt import numpy as np import xarray as xr from scipy.ndimage import convolve """ Explanation: SRTM Product Showcase Products used: srtm_google (original source) Dataset from 11-Feb-...
edosedgar/xs-pkg
deep_learning/hw3/homework03_part3_gan_basic.ipynb
gpl-2.0
""" Please, implement everything in one notebook, using if statements to switch between the tasks """ TASK = 1 # 2, 3, 4, 5 """ Explanation: The visualization used for this homework is based on Alexandr Verinov's code. Generative models In this homework we will try several criterions for learning an implicit mo...
datacommonsorg/api-python
notebooks/analyzing_income_distribution.ipynb
apache-2.0
# Install datacommons !pip install datacommons_pandas --upgrade --quiet """ Explanation: <a href="https://colab.research.google.com/github/datacommonsorg/api-python/blob/master/Case_Study_Analyzing_Income_Distribution.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open...
Olsthoorn/TransientGroundwaterFlow
readthedocs/Course2016_jupyter/docs/source/WellInLeakyAquifer.ipynb
gpl-3.0
import numpy as np import matplotlib.pylab as plt #%%writefile wells.py # remove first # to write this as file "wells.py" to disk import pdb import numpy as np from scipy.special import expi def W(u): return -expi(-u) # Theis def wh(u, rho): """Returns Hantush's well function values Note: works only for...
abulbasar/machine-learning
SparkML - 04 Text_Analysis.ipynb
apache-2.0
spark.sparkContext.uiWebUrl """ Explanation: Problem Statement: IMDB Comment Sentiment Classifier Dataset: For this exercise we will use a dataset hosted at http://ai.stanford.edu/~amaas/data/sentiment/ Problem Statement: This is a dataset for binary sentiment classification containing substantially more data than pr...
d-meiser/cold-atoms
examples/Ions in Penning trap.ipynb
gpl-3.0
import coldatoms import numpy as np %matplotlib notebook import matplotlib.pyplot as plt from IPython import display """ Explanation: Ions in a Penning trap Penning traps are an important experimental tool for confining charged particles. They are used to collect elementary particles produced in high energy experiment...
VVard0g/ThreatHunter-Playbook
docs/notebooks/campaigns/apt29Evals.ipynb
mit
# Importing Libraries from bokeh.io import show from bokeh.plotting import figure from bokeh.models import ColumnDataSource, LabelSet, HoverTool from bokeh.transform import dodge import pandas as pd # You need to run this code at the beginning in order to show visualization using Jupyter Notebooks from bokeh.io import...
phoebe-project/phoebe2-docs
2.1/tutorials/requiv_crit_contact.ipynb
gpl-3.0
!pip install -I "phoebe>=2.1,<2.2" """ Explanation: Critical Radii: Contact Systems Setup Let's first make sure we have the latest version of PHOEBE 2.1 installed. (You can comment out this line if you don't use pip for your installation or don't want to update to the latest release). End of explanation """ %matplot...
tensorflow/docs-l10n
site/ko/tutorials/load_data/text.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...
zakandrewking/cobrapy
documentation_builder/loopless.ipynb
lgpl-2.1
%matplotlib inline import plot_helper import cobra.test from cobra import Reaction, Metabolite, Model from cobra.flux_analysis.loopless import add_loopless, loopless_solution from cobra.flux_analysis import pfba """ Explanation: Loopless FBA The goal of this procedure is identification of a thermodynamically consiste...
tesera/pygypsy
notebooks/#32-address-testing-findings/#32-isolated-profiling-1.ipynb
mit
%%bash grep --colour -nr append ../gypsy/*.py """ Explanation: Initial attemps at profiling had very confusing results; possibly because of module loading and i/o Here, gypsy will be run and profiled on one plot, with no module loading/io recorded in profiling Characterize what is happening In several places, we appen...
qgoisnard/Exercice-update
01-LinearBeam.ipynb
mit
import numpy as np def xR(s): return s def yR(s): return 0.*s s = np.linspace(0.,1.,20) xR(s) """ Explanation: https://www.explainxkcd.com/wiki/images/f/fd/python.png Beam Model Kinematics Consider a beam of length L with a straigth reference configuration and denote by $s$ the arc-length in this configurati...
GoogleCloudPlatform/mlops-on-gcp
on_demand/tfx-caip/lab-02-tfx-pipeline/solutions/lab-02.ipynb
apache-2.0
import yaml # Set `PATH` to include the directory containing TFX CLI and skaffold. PATH=%env PATH %env PATH=/home/jupyter/.local/bin:{PATH} """ Explanation: Continuous training with TFX and Google Cloud AI Platform Learning Objectives Use the TFX CLI to build a TFX pipeline. Deploy a new TFX pipeline version with tu...
dtamayo/reboundx
ipython_examples/Radiation_Forces_Circumplanetary_Dust.ipynb
gpl-3.0
import rebound import reboundx import numpy as np sim = rebound.Simulation() sim.G = 6.674e-11 # SI units sim.dt = 1.e4 # Initial timestep in sec. sim.N_active = 2 # Make it so dust particles don't interact with one another gravitationally sim.add(m=1.99e30, hash="Sun") # add Sun with mass in kg sim.add(m=5.68e26, a=1....
thunder-project/thunder-docs
tutorials/series.ipynb
mit
%matplotlib inline import matplotlib.pyplot as plt import seaborn as sns sns.set_style('darkgrid') sns.set_context('notebook') from showit import image import thunder as td """ Explanation: Series A Series object is a collection of 1D arrays, all of which share a common index. Under the hood, it wraps an n-dimension...
AtmaMani/pyChakras
udemy_ml_bootcamp/Deep Learning/MNIST with Multi-Layer Perceptron.ipynb
mit
import tensorflow as tf # Import MINST data from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("/tmp/data/", one_hot=True) """ Explanation: <a href='http://www.pieriandata.com'> <img src='../Pierian_Data_Logo.png' /></a> MNIST Multi-Layer Perceptron In this lecture we will b...
zhaojijet/UdacityDeepLearningProject
examples/Q-learning-cart.ipynb
apache-2.0
import gym import tensorflow as tf import numpy as np # Create the Cart-Pole game environment env = gym.make('CartPole-v0') """ Explanation: Deep Q-learning In this notebook, we'll build a neural network that can learn to play games through reinforcement learning. More specifically, we'll use Q-learning to train an a...
amitkaps/applied-machine-learning
Module-03g-Model-HyperParameterOpt.ipynb
mit
import pandas as pd import numpy as np import matplotlib.pyplot as plt %matplotlib inline plt.style.use('fivethirtyeight') #Read the data #Read the data df = pd.read_csv("data/historical_loan.csv") # refine the data df.years = df.years.fillna(np.mean(df.years)) # Setup the features and target X = df.iloc[:,1:] y =...
rasbt/pattern_classification
dimensionality_reduction/projection/principal_component_analysis_old.ipynb
gpl-3.0
import numpy as np np.random.seed(0) mu_vec1 = np.array([0, 0, 0]) cov_mat1 = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]]) class1_sample = np.random.multivariate_normal(mu_vec1, cov_mat1, 20).T assert class1_sample.shape == (3, 20), "The matrix has not the dimensions 3x20" mu_vec2 = np.array([1, 1, 1]) cov_mat2 = np....
richlewis42/scikit-chem
docs/tutorial/pipelines.ipynb
bsd-3-clause
pipeline = skchem.pipeline.Pipeline([ skchem.standardizers.ChemAxonStandardizer(keep_failed=True), skchem.forcefields.UFF(), skchem.filters.OrganicFilter(), skchem.descriptors.MorganFeaturizer()]) """ Explanation: Pipelining scikit-chem expands on the scikit-learn Pipeline object to sup...
NeuroDataDesign/seelviz
Jupyter/Filter_and_Plotly_Luke.ipynb
apache-2.0
import os import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from ndreg import * import ndio.remote.neurodata as neurodata import nibabel as nb refToken = "ara_ccf2" refImg = imgDownload(refToken) refAnnoImg = imgDownload(refToken, channel="annotation") randValues = np.random.rand(1000,3) randV...
karlstroetmann/Artificial-Intelligence
Python/3 Games/Minimax.ipynb
gpl-2.0
def maxValue(State): if finished(State): return utility(State) return max([ minValue(ns) for ns in next_states(State, gPlayers[0]) ]) """ Explanation: The Minimax Algorithm with Memoization This notebook implements the minimax algorithm with memoization and thereby implements a program that can play v...
Lstyle1/Deep_learning_projects
intro-to-rnns/Anna_KaRNNa.ipynb
mit
import time from collections import namedtuple import numpy as np import tensorflow as tf """ Explanation: Anna KaRNNa In this notebook, I'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 base...
liopic/scbcn17-customer-segmentation
Workshop-with-answers.ipynb
mit
# This is a cell with code. Try to execute it: use the mouse to focus it and press control+Enter. ' '.join(['Hello', 'world']) """ Explanation: Customer segmentation with unsupervised learning We will learn by doing: you should complete with code the places marked with [WORKSHOP] We will be using the following tools ...
saketkc/hatex
2015_Fall/MATH-578B/Homework1/Homework1.ipynb
mit
%matplotlib inline from __future__ import division import numpy as np from numpy import linalg as LA k_a=0.2 k_b=0.2 k_p = 0.5 P = np.matrix([[1-k_a-k_b, k_a ,k_b, 0, 0, 0], [k_a, 1-k_a-k_b, 0, k_b, 0, 0], [k_b, 0, 1-k_a-k_b, k_a, 0, 0], [0, k_b, k_a, 1-k_a-k_b-k_p, k_p, 0],...
mtchem/ETL-MarchMadness-data
data_to_SQLite_DB.ipynb
mit
import sqlite3 as sql import pandas as pd """ Explanation: This notebook will walk you through each step of creating a SQLite Database for the kaggle.com March Machine Learning Mania 2017 competition. *In order to use this notebook you need to obtain the data from kaggle.com Create a Database 1. Download DB Browser fo...
LSSTC-DSFP/LSSTC-DSFP-Sessions
Sessions/Session06/Day2/IntroToParaView.ipynb
mit
from pyevtk.hl import gridToVTK, pointsToVTK """ Explanation: First and foremost, you should have already installed ParaView on your machine. If not, you can download the package from paraview.org. An Introduction to ParaView version 0.1 Adam A Miller (Northwestern CIERA/Adler Planetarium) 01 May 2018 Our data do not...
arcyfelix/Courses
18-11-22-Deep-Learning-with-PyTorch/01-Introduction to neural networks/07-Analysing-Student-Data-Example/StudentAdmissions.ipynb
apache-2.0
# Importing pandas and numpy import pandas as pd import numpy as np # Reading the csv file into a pandas DataFrame data = pd.read_csv('student_data.csv') # Printing out the first 10 rows of our data data[:10] """ Explanation: Predicting Student Admissions with Neural Networks In this notebook, we predict student adm...
ES-DOC/esdoc-jupyterhub
notebooks/miroc/cmip6/models/miroc-es2l/aerosol.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'miroc', 'miroc-es2l', 'aerosol') """ Explanation: ES-DOC CMIP6 Model Properties - Aerosol MIP Era: CMIP6 Institute: MIROC Source ID: MIROC-ES2L Topic: Aerosol Sub-Topics: Transport, Emissions, C...
boffi/boffi.github.io
dati_2015/ha03/03_Numerical_Integration.ipynb
mit
%matplotlib inline import numpy as np import matplotlib.pyplot as plt from numpy import cos, exp, pi, sin, sqrt from IPython.display import Latex, display plt.style.use(['fivethirtyeight', './00_mplrc']) """ Explanation: Numerical Integration Preliminaries We have to import the array library numpy and the plotting li...
quantumlib/OpenFermion
docs/fqe/tutorials/fermi_hubbard.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...
ShubhamDebnath/Coursera-Machine-Learning
Course 4/Convolution model Step by Step v2.ipynb
mit
import numpy as np import h5py import matplotlib.pyplot as plt %matplotlib inline plt.rcParams['figure.figsize'] = (5.0, 4.0) # set default size of plots plt.rcParams['image.interpolation'] = 'nearest' plt.rcParams['image.cmap'] = 'gray' %load_ext autoreload %autoreload 2 np.random.seed(1) """ Explanation: Convolut...
spulido99/Programacion
Camilo/.ipynb_checkpoints/Taller 3 y 4-checkpoint.ipynb
mit
import numpy as np #libreria de datos numericos import matplotlib.pyplot as plt import seaborn as sns import pandas as pd import statsmodels.formula.api as smf import pylab as pl from sklearn import datasets %matplotlib inline from sklearn import datasets """ Explanation: Taller 3 Regresión y Clustering Este taller...
GoogleCloudPlatform/training-data-analyst
quests/endtoendml/labs/4_preproc.ipynb
apache-2.0
# Ensure the right version of Tensorflow is installed. !pip freeze | grep tensorflow==2.1 %pip install apache-beam[gcp]==2.13.0 """ Explanation: <h1> Preprocessing using Cloud Dataflow </h1> <h2>Learning Objectives</h2> <ol> <li>Create ML dataset using <a href="https://cloud.google.com/dataflow/">Cloud Dataflow<...
steven-murray/halomod
docs/examples/wdm.ipynb
mit
from matplotlib.pyplot import * import matplotlib.pyplot as plt %matplotlib inline %load_ext autoreload %autoreload 2 from hmf.alternatives.wdm import TransferWDM # Transfer-function class with WDM modifications from hmf import MassFunction # Full mass-function class in CDM from hmf.alternatives.wdm import MassFun...
ES-DOC/esdoc-jupyterhub
notebooks/ncc/cmip6/models/sandbox-2/ocnbgchem.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'ncc', 'sandbox-2', 'ocnbgchem') """ Explanation: ES-DOC CMIP6 Model Properties - Ocnbgchem MIP Era: CMIP6 Institute: NCC Source ID: SANDBOX-2 Topic: Ocnbgchem Sub-Topics: Tracers. Properties: 6...
quantopian/research_public
notebooks/lectures/Why_Hedge_II/notebook.ipynb
apache-2.0
import numpy as np import matplotlib.pyplot as plt """ Explanation: Why You Should Hedge Beta and Sector Exposures (Part II) by Jonathan Larkin and Maxwell Margenot Part of the Quantopian Lecture Series: www.quantopian.com/lectures github.com/quantopian/research_public In the first lecture on Why You Should Hedge B...
tpin3694/tpin3694.github.io
python/pandas_assign_new_column_dataframe.ipynb
mit
import pandas as pd """ Explanation: Title: Assign A New Column To A Pandas DataFrame Slug: pandas_assign_new_column_dataframe Summary: Assign a new column to a pandas dataframe. Date: 2017-01-16 12:00 Category: Python Tags: Data Wrangling Authors: Chris Albon Preliminaries End of explanation """ # Create empty d...
mohanprasath/Course-Work
numpy/numpy_exercises_from_kyubyong/Input_and_Output.ipynb
gpl-3.0
from __future__ import print_function import numpy as np author = "kyubyong. https://github.com/Kyubyong/numpy_exercises" np.__version__ from datetime import date print(date.today()) """ Explanation: Input and Output End of explanation """ x = np.arange(10) ... # Check if there exists the 'temp.npy' file. import...
bjshaw/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...
kdestasio/online_brain_intensive
nipype_tutorial/notebooks/introduction_python.ipynb
gpl-2.0
import math """ Explanation: <div align="center"><img src="https://www.python.org/static/img/python-logo.png"></div> Python This section is meant as a general introduction to Python and is by far not complete. It is based amongst others on the IPython notebooks from J. R. Johansson, on http://www.stavros.io/tutorials...
mne-tools/mne-tools.github.io
0.21/_downloads/96cdfef13f5475e2f32b862fa94904b7/plot_visualize_stc.ipynb
bsd-3-clause
import os import os.path as op import numpy as np import matplotlib.pyplot as plt import mne from mne.datasets import sample from mne.minimum_norm import apply_inverse, read_inverse_operator from mne import read_evokeds data_path = sample.data_path() sample_dir = os.path.join(data_path, 'MEG', 'sample') subjects_dir...
ethen8181/machine-learning
ab_tests/causal_inference/diff_in_diff.ipynb
mit
# code for loading the format for the notebook import os # path : store the current path to convert back to it later path = os.getcwd() os.chdir(os.path.join('..', '..', 'notebook_format')) from formats import load_style load_style(plot_style=False) os.chdir(path) # 1. magic for inline plot # 2. magic to print vers...
jseabold/statsmodels
examples/notebooks/statespace_cycles.ipynb
bsd-3-clause
%matplotlib inline import numpy as np import pandas as pd import statsmodels.api as sm import matplotlib.pyplot as plt from pandas_datareader.data import DataReader endog = DataReader('UNRATE', 'fred', start='1954-01-01') endog.index.freq = endog.index.inferred_freq """ Explanation: Trends and cycles in unemployment...
dfm/dfm.io
static/downloads/notebooks/stan-c++.ipynb
mit
%matplotlib inline %config InlineBackend.figure_format = "retina" from matplotlib import rcParams rcParams["savefig.dpi"] = 100 rcParams["figure.dpi"] = 100 rcParams["font.size"] = 20 """ Explanation: Title: Using external C++ functions with PyStan & radial velocity exoplanets Date: 2017-05-04 Category: Data Analysis...
CyberCRI/dataanalysis-herocoli-redmetrics
v1.52/Tests/1.4 Google form analysis - Statistics.ipynb
cc0-1.0
%run "../Functions/1. Google form analysis.ipynb" """ Explanation: Google form analysis tests Purpose: determine in what extent the current data can accurately describe correlations, underlying factors on the score. Especially concerning the 'before' groups: are there underlying groups explaining the discrepancies in ...
torgebo/deep_learning_workshop
2-mlp/multilayer-perceptron.ipynb
mit
# Create input signal x = np.array([[ 1, -4, 0, 7]]) # Create weight matrices for the three layers W1 = np.array([[-0.1, 0.2, 0.1], [ 0.1, 0.4, 0.1], [ 0.0, -0.7, 0.2], [ 0.6, 0.3, -0.4]]) W2 = np.array([[ 0.3, -0.8, 0.1, 0.0], [ 0.0, 0.1, 0.2, 0.8]...
rubensfernando/mba-analytics-big-data
Python/2016-07-25/aula3-parte2-series.ipynb
mit
import pandas as pd """ Explanation: Series End of explanation """ import numpy as np ser1 = pd.Series(np.random.rand(7)) ser1 """ Explanation: Series é na verdade um array NumPy de 1 dimensão. Ele consiste de um array NumPy com um array de rótulos. Criando Series O construtor geral para criar uma Series é da segu...
florianwittkamp/FD_ACOUSTIC
JupyterNotebook/1D/FD_1D_DX4_DT3_ABS.ipynb
gpl-3.0
%matplotlib inline import numpy as np import time as tm import matplotlib.pyplot as plt """ Explanation: FD_1D_DX4_DT3_ABS 1-D acoustic Finite-Difference modelling GNU General Public License v3.0 Author: Florian Wittkamp Finite-Difference acoustic seismic wave simulation Discretization of the first-order acoustic wave...
mohanprasath/Course-Work
numpy/numpy_exercises_from_kyubyong/Discrete_Fourier_Transform.ipynb
gpl-3.0
a = 1+1j output = ... print(output) """ Explanation: Complex Numbers Q1. Return the angle of a in radian. End of explanation """ a = np.array([1+2j, 3+4j, 5+6j]) real = ... imag = ... print("real part=", real) print("imaginary part=", imag) """ Explanation: Q2. Return the real part and imaginary part of a. End of e...
mnschmit/LMU-Syntax-nat-rlicher-Sprachen
01-notebook.ipynb
apache-2.0
from nltk.tree import Tree np1 = Tree('NP', [Tree('ART', ['der']), Tree('N', ['Hund'])]) np2 = Tree('NP', [Tree('ART', ['die']), Tree('N', ['Katze'])]) vp = Tree('VP', [Tree('V', ['jagt']), np2]) """ Explanation: Übung 1 Bäume zeichnen Zunächst konstruieren wir manuell einen Baum: End of explanation """ vp """ Exp...
tritemio/PyBroMo
notebooks/Theory - On Browniam motion and Diffusion coefficient.ipynb
gpl-2.0
D = 1 t = 1 N = 3 sigma = np.sqrt(2*N*D*t) sigma_1d = np.sqrt(2*D*t) sigma n_trajectories = 100 n_time_steps = 1000 np.random.seed(1) dx = sigma_1d*np.random.randn(n_time_steps, n_trajectories) dy = sigma_1d*np.random.randn(n_time_steps, n_trajectories) dz = sigma_1d*np.random.randn(n_time_steps, n_trajectories) x,...
mtasende/Machine-Learning-Nanodegree-Capstone
notebooks/prod/n08_simple_q_learner_11_actions.ipynb
mit
# Basic imports import os import pandas as pd import matplotlib.pyplot as plt import numpy as np import datetime as dt import scipy.optimize as spo import sys from time import time from sklearn.metrics import r2_score, median_absolute_error from multiprocessing import Pool %matplotlib inline %pylab inline pylab.rcPar...
arkottke/pysra
examples/example-06.ipynb
mit
import re import matplotlib.pyplot as plt import numpy as np import pysra %matplotlib inline # Increased figure sizes plt.rcParams["figure.dpi"] = 120 """ Explanation: Example 6 : TS with Geopsy Profiles Time series analysis to compute surface response spectrum and site amplification functions using velocity prof...
ajul/zerosum
python/examples/hazard.ipynb
bsd-3-clause
import _initpath import numpy import zerosum.balance """ Explanation: Hazard handicap function example This example uses a handicap function and data taken from a talk by Hazard. This example appears on Slide 36. Hazard, C. J. 2010. What every game designer should know about game theory. Triangle Game Conference. Rale...
LSSTC-DSFP/LSSTC-DSFP-Sessions
Sessions/Session03/Day2/Documentation.ipynb
mit
def do_something(arg1, arg2): """ A short sentence describing what this function does. More description Parameters ---------- arg1 : type1 Description of the parameter ``arg1`` arg2 : type2 Description of the parameter ``arg2`` Returns ------- t...
Elixeus/NLP
sequence_models/HMM/ViterbiAlgorithm.ipynb
mit
transi = pd.DataFrame({'VB': [.019, .0038, .83, .0040, .23], 'TO': [.0043, .035, 0, .016, .00079], 'NN': [.041, .047, .00047, .087, .0012], 'PPSS': [.067, .0070, 0, .0045, .00014]}, index=['s', 'VB', 'TO', 'NN', 'PPSS'], ...
chrinide/hep_ml
notebooks/DemoReweighting.ipynb
apache-2.0
%pylab inline figsize(16, 8) import root_numpy import pandas from hep_ml import reweight """ Explanation: Demonstration of distribution reweighting hep_ml.reweight contains methods to reweight distributions. Typically we use reweighting of monte-carlo to fight drawbacks of simulation, though there are many applicati...
napsternxg/pyLDAvis
notebooks/sklearn.ipynb
bsd-3-clause
from __future__ import print_function import pyLDAvis import pyLDAvis.sklearn pyLDAvis.enable_notebook() from sklearn.datasets import fetch_20newsgroups from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer from sklearn.decomposition import LatentDirichletAllocation """ Explanation: pyLDAvis.s...
tanghaibao/goatools
notebooks/Optional_attribute_definition.ipynb
bsd-2-clause
from os.path import exists from goatools.obo_parser import GODag if not exists('go-basic.obo'): !wget http://geneontology.org/ontology/go-basic.obo dag = GODag('go-basic.obo', optional_attrs=['def']) """ Explanation: Loading the optional definition attribute 1) Load the ontology file while also loading the option...
the-deep-learners/nyc-ds-academy
notebooks/tensor-fied_intro_to_tensorflow.ipynb
mit
import numpy as np np.random.seed(42) import pandas as pd import matplotlib.pyplot as plt %matplotlib inline import tensorflow as tf tf.set_random_seed(42) """ Explanation: Introduction to TensorFlow, fitting point by point In this notebook, we introduce TensorFlow by fitting a line of the form y=m*x+b point by point....
synthicity/activitysim
activitysim/examples/example_estimation/notebooks/01_estimation_mode.ipynb
agpl-3.0
import os import larch # !conda install larch -c conda-forge # for estimation import pandas as pd """ Explanation: Estimation Mode This set of notebooks illustrates how to re-estimate ActivitySim's choice models. These models include school_location workplace_location auto_ownership free_parking cdap mandatory_tour...
marioberges/F16-12-752
homeworks/homework2/homework2_solution.ipynb
gpl-3.0
import numpy as np import matplotlib.pyplot as plt import pandas as pd import datetime as dt import itertools import pickle %matplotlib inline """ Explanation: 12-752: Data-Driven Building Energy Management Fall 2016, Carnegie Mellon University Assignment #2 We will begin by unpickling the dataset we had played aroun...
franciscodominguezmateos/DeepLearningNanoDegree
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...
mrcslws/nupic.research
projects/whydense/gsc/analyze_scaling.ipynb
agpl-3.0
sparse_all = pd.read_pickle("scaling_results/sparse_scaling.pkl") dense_all = pd.read_pickle("scaling_results/dense_scaling_baselines.pkl") sparse_activations = sparse_all[sparse_all["Activation sparsity"] == 1] sparse_wts = sparse_all[sparse_all["Activation sparsity"] == 0] sparse_all.head() dense_all.head() spa...
harikrishna1302/Convolutional-Neural-Network-using-MNIST-images
CNN.ipynb
apache-2.0
%matplotlib inline import matplotlib.pyplot as plt import numpy as np import tensorflow as tf from sklearn.metrics import confusion_matrix import time from datetime import timedelta import math """ Explanation: Import all the required libraries. End of explanation """ tf.__version__ """ Explanation: Print the Tens...
JasonJWilliamsNY/biocoding_2015
lessons/biocoding_2015_pythonlab_04.ipynb
cc0-1.0
# build a random dna sequence... from numpy import random final_sequence_length = eighty initial_sequence_length = 81 dna_sequence = '' my_nucleotides = [a,t,g,c] my_nucleotide_probs = [0.25,0.25,0.25,0.3] while initial_sequence_length < final_sequence_length: nucleotide = random.choice(my_nucleotides,p=my_nucleotide_...
jorgemf/kaggle_redefining_cancer_treatment
notebook/final_notebook.ipynb
mit
%matplotlib inline import pandas as pd import numpy as np from sklearn.model_selection import cross_val_predict from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression from sklearn.metrics import log_loss, accuracy_score from sklearn.feature_extraction.text import Count...
ondrolexa/sg2
10_Introduction_to_strain_analysis.ipynb
mit
%pylab inline """ Explanation: Homogeneous deformation Often described as deformation during which lines remain as lines and parallel lines remain parallel. Homogeneous deformation could be described as affine transformation of initial coordinates $$\begin{align}x &= aX+bY+t_X \ y &= cX+dY+t_Y \end{align}$$ or in matr...
NumCosmo/NumCosmo
notebooks/DataNCount/run_ascaso_mc_unbinned.ipynb
gpl-3.0
#CCL cosmology cosmo_ccl = ccl.Cosmology(Omega_c = 0.30711 - 0.048254, Omega_b = 0.048254, h = 0.677, sigma8 = 0.8822714165197718, n_s=0.96, Omega_k = 0, transfer_function='eisenstein_hu') #ccl_cosmo_set_high_prec (cosmo_ccl) cosmo_numcosmo, dist, ps_lin, ps_nln, hmfunc = create_nc_obj (cosmo_ccl) psf = hmfunc.peek_p...
diging/methods
2.0. Co-author networks/2.0. Co-Author Graphs.ipynb
gpl-3.0
from tethne.readers import wos metadata = wos.read('../data/Baldwin/PlantPhysiology', streaming=True, index_fields=['date'], index_features=['authors']) """ Explanation: 2.0. Co-author Graphs Social network analysis is a popular method in the field of historical network research. By far the most ...
AllenDowney/ModSimPy
soln/chap08soln.ipynb
mit
# If we're running on Colab, install modsimpy # https://pypi.org/project/modsimpy/ import sys IN_COLAB = 'google.colab' in sys.modules if IN_COLAB: !pip install pint !pip install modsimpy !mkdir figs # Configure Jupyter so figures appear in the notebook %matplotlib inline # import functions from the mod...
tensorflow/docs-l10n
site/en-snapshot/guide/keras/customizing_what_happens_in_fit.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...
yashdeeph709/Algorithms
PythonBootCamp/Complete-Python-Bootcamp-master/.ipynb_checkpoints/Lists-checkpoint.ipynb
apache-2.0
# Assign a list to an variable named my_list my_list = [1,2,3] """ Explanation: Lists Earlier when discussing strings we introduced the concept of a sequence in Python. Lists can be thought of the most general version of a sequence in Python. Unlike strings, they are mutable, meaning the elements inside a list can be ...
bosonbeard/Funny-models-and-scripts
3.Machine_learning/2.family_registered_habr.ipynb
unlicense
import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import numpy as np from sklearn.preprocessing import MinMaxScaler from sklearn.model_selection import train_test_split from sklearn import linear_model import warnings warnings.filterwarnings('ignore') %matplotlib inline """ Explanation: Введени...
tensorflow/docs-l10n
site/zh-cn/hub/tutorials/semantic_similarity_with_tf_hub_universal_encoder_lite.ipynb
apache-2.0
# Copyright 2018 The TensorFlow Hub Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
fluffy-hamster/A-Beginners-Guide-to-Python
A Beginners Guide to Python/Homework Solutions/06. Names (HW).ipynb
mit
cake = 3.14 diameter = 2 belt_size = cake * diameter """ Explanation: Names, Homework Below is three lines of python code, the only thing you have seen yet is the "*" symbol which means multiplication. Your task comes in three parts: Figure out what the code is supposed to do. (this might take some googling hint: th...
karlstroetmann/Algorithms
Python/Chapter-02/Power.ipynb
gpl-2.0
def power(m, n): r = 1 for i in range(n): r *= m return r power(2, 3), power(3, 2) %%time p = power(3, 500000) p """ Explanation: Efficient Computation of Powers The function power takes two natural numbers $m$ and $n$ and computes $m^n$. Our first implementation is inefficient and takes $n-1$ ...
heroxbd/SHTOOLS
examples/notebooks/Introduction-1.ipynb
bsd-3-clause
%matplotlib inline from __future__ import print_function # only necessary if using Python 2.x import matplotlib.pyplot as plt import numpy as np import pyshtools """ Explanation: Introduction to pySHTOOLS pyshtools is a Python module that provides functions for working with spherical harmonics. These routines can be ...
bgroveben/python3_machine_learning_projects
learn_kaggle/machine_learning/starting_your_ml_project.ipynb
mit
import pandas as pd # Load the data and greet everyone. main_file_path = 'input/melbourne_data.csv' data = pd.read_csv(main_file_path) # If you want to remove entries with missing values: # filtered_data = data.dropna(axis=0) print('hello world') """ Explanation: Starting your ML project Introduction This will be you...
csiu/datasci
d3/2015-07-14_stacked-bar-chart.ipynb
mit
import pandas as pd datfile = 'dat/adult.data' def strip(text): try: return text.strip() except AttributeError: return text def make_int(text): return int(text.strip('" ')) df = pd.read_csv(datfile, names=['age', 'workclass', 'fnlwgt', 'educa...
leonarduk/stockmarketview
timeseries-analysis-python/src/main/python/FinanceOps/02_Comparing_Stock_Indices.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 data_keys import * from data import load_index_data, load_usa_cpi from data import load_usa_gov_bond_1year, co...
elenduuche/deep-learning
tv-script-generation/dlnd_tv_script_generation.ipynb
mit
""" DON'T MODIFY ANYTHING IN THIS CELL """ import helper data_dir = './data/simpsons/moes_tavern_lines.txt' text = helper.load_data(data_dir) # Ignore notice, since we don't use it for analysing the data text = text[81:] """ Explanation: TV Script Generation In this project, you'll generate your own Simpsons TV scrip...
GoogleCloudPlatform/asl-ml-immersion
notebooks/ml_fairness_explainability/explainable_ai/solutions/xai_image_caip.ipynb
apache-2.0
from datetime import datetime TIMESTAMP = datetime.now().strftime("%Y%m%d%H%M%S") import os PROJECT_ID = "" # TODO: your PROJECT_ID here. os.environ["PROJECT_ID"] = PROJECT_ID BUCKET_NAME = PROJECT_ID # TODO: replace BUCKET_NAME if needed REGION = "us-central1" os.environ["BUCKET_NAME"] = BUCKET_NAME os.environ[...
rubensfernando/mba-analytics-big-data
Python/2016-08-05/aula6-parte4-foto.ipynb
mit
import facebook access_token = 'EAACUzLmOZC7kBAPfCPMRBG23rGoY3iQWKJMIO7ESZCp0LPZCwQQv0AoQeEtBm9IyNDi5yP2RHMGzCzjquLb4ZCWUHLZA6vY1Pp6x8oFXZA7IMissQbporZAwUoIZCuZBoOBrWQDxi8PUUZCb96uWmSwB2ZBqEIwnvZCRZBnqJjGZBQJVhl1gZDZD' api = facebook.GraphAPI(access_token) api.version foto = open("fia.jpg", "rb") api.put_photo(fo...
janusnic/21v-python
unit_20/parallel_ml/rendered_notebooks/04 - Pandas and Heterogeneous Data Modeling.ipynb
mit
%matplotlib inline import matplotlib.pyplot as plt import numpy as np import pandas as pd import warnings warnings.simplefilter('ignore', DeprecationWarning) """ Explanation: Predictive Modeling with heterogeneous data End of explanation """ #!curl -s https://dl.dropboxusercontent.com/u/5743203/data/titanic/titanic...