repo_name
stringlengths
6
77
path
stringlengths
8
215
license
stringclasses
15 values
content
stringlengths
335
154k
jpilgram/phys202-2015-work
assignments/assignment05/InteractEx04.ipynb
mit
%matplotlib inline import matplotlib.pyplot as plt import numpy as np from IPython.html.widgets import interact, interactive, fixed from IPython.display import display """ Explanation: Interact Exercise 4 Imports End of explanation """ def random_line(m, b, sigma, size=10): """Create a line y = m*x + b + N(0,si...
sreedom/fpExperiments
WhyFP.ipynb
mit
def count_w(filename): count = 0 offset = 0 file = open(filenames) for line in file: for w in line.split(): count += 1 return count # But This Doesnt Scale! """ Explanation: Functional Programming What, Why and How We will try to explain the first principles of functional progra...
cloudmesh/book
notebooks/machinelearning/seabornexercies.ipynb
apache-2.0
# please watch out how we import seaborn package and how we rename it as sns import seaborn as sns import pandas as pd # read CSV file directly from a URL and save the results iris = pd.read_csv('https://raw.githubusercontent.com/uiuc-cse/data-fa14/gh-pages/data/iris.csv') iris.head() iris["species"].value_counts() ...
dinrker/Algorithms_DataStructures
01_Sort.ipynb
mit
class Solution(object): def wiggleSort(self, nums): """ :type nums: List[int] :rtype: void Do not return anything, modify nums in-place instead. """ for i in range(len(nums)-1): if (i%2 == 0 and nums[i] > nums[i+1]) or (i%2 ==1 and nums[i] < nums[i+1]): ...
hparik11/Deep-Learning-Nanodegree-Foundation-Repository
gan_mnist/Intro_to_GANs_Solution.ipynb
mit
%matplotlib inline import pickle as pkl 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') """ Explanation: Generative Adversarial Network In this notebook, we'll be building a generativ...
marcinofulus/ProgramowanieRownolegle
MPI/PR_MPI_p2p.ipynb
gpl-3.0
import numpy as np import ipyparallel as ipp c = ipp.Client(profile='mpi') print(c.ids) view = c[:] view.activate() """ Explanation: MPI - point to point operations We will use mpi4py End of explanation """ %time np.max(np.random.randn(5000,5000)) %%px --block from mpi4py import MPI import time import numpy as np ...
anhaidgroup/py_entitymatching
notebooks/guides/step_wise_em_guides/.ipynb_checkpoints/Generating Features Manually-checkpoint.ipynb
bsd-3-clause
# Import py_entitymatching package import py_entitymatching as em import os import pandas as pd """ Explanation: Introduction This IPython notebook illustrates how to generate features for blocking/matching manually. First, we need to import py_entitymatching package and other libraries as follows: End of explanation ...
root-mirror/training
SummerStudentCourse/2019/Exercises/ROOTBooks/graphDraw_Solution.ipynb
gpl-2.0
import ROOT c = ROOT.TCanvas() """ Explanation: Interactively Draw a Graph End of explanation """ g = ROOT.TGraph() for i in range(5): g.SetPoint(i,i,i*i) g.Draw("APL") c.Draw() """ Explanation: The simple graph End of explanation """ %jsroot on g.SetMarkerStyle(ROOT.kFullTriangleUp) g.SetMarkerSize(3) g.SetMark...
anilcs13m/MachineLearning_Mastering
predicting Housing price/.ipynb_checkpoints/Predicting house prices-checkpoint.ipynb
gpl-2.0
import graphlab """ Explanation: Predicting the house prices data set for king county Loading graphlab End of explanation """ sales = graphlab.SFrame('home_data.gl/') sales.head(5) """ Explanation: Load some house sales data Dataset is from house sales in King County, the region where the city of Seattle, WA is lo...
rasbt/bugreport
pytorch-lightning/csvlogger-stepsbug/01.ipynb
mit
BATCH_SIZE = 64 NUM_EPOCHS = 200 LEARNING_RATE = 0.01 NUM_WORKERS = 0 """ Explanation: MLP Classifier -- Cement Dataset General settings and hyperparameters End of explanation """ import pytorch_lightning as pl import torch import torchmetrics """ Explanation: Setting up the PyTorch Lightning model End of explanat...
allafort/StatisticalMethods
examples/SDSScatalog/CorrFunc.ipynb
gpl-2.0
%load_ext autoreload %autoreload 2 import numpy as np import SDSS import pandas as pd import matplotlib.pyplot as plt %matplotlib inline import copy # We want to select galaxies, and then are only interested in their positions on the sky. data = pd.read_csv("downloads/SDSSobjects.csv",usecols=['ra','dec','u','g',\ ...
statsmodels/statsmodels.github.io
v0.13.0/examples/notebooks/generated/mediation_survival.ipynb
bsd-3-clause
import pandas as pd import numpy as np import statsmodels.api as sm from statsmodels.stats.mediation import Mediation """ Explanation: Mediation analysis with duration data This notebook demonstrates mediation analysis when the mediator and outcome are duration variables, modeled using proportional hazards regression....
evanmiltenburg/python-for-text-analysis
Chapters-colab/Chapter_16_Data_formats_I_(CSV_and_TSV).ipynb
apache-2.0
%%capture !wget https://github.com/cltl/python-for-text-analysis/raw/master/zips/Data.zip !wget https://github.com/cltl/python-for-text-analysis/raw/master/zips/images.zip !wget https://github.com/cltl/python-for-text-analysis/raw/master/zips/Extra_Material.zip !unzip Data.zip -d ../ !unzip images.zip -d ./ !unzip Ext...
ernestyalumni/CompPhys
crack/TreesGraphs.ipynb
apache-2.0
# binary tree class Node: def __init__(self,val): self.l=None self.r=None self.v=val class Tree: def __init__(self): self.root = None def getRoot(self): return self.root def add(self, val): if (self.root == None): self.root = Nod...
ramseylab/networkscompbio
class03_igraph_python3_template.ipynb
apache-2.0
import pandas df = pandas.read_csv("shared/pathway_commons.sif", sep="\t", names=["species1","interaction_type","species2"]) """ Explanation: Load the Pathway Commons SIF file into a pandas data frame, naming the three columns End of explanation """ interaction_types_ppi =...
BillyLjm/CS100.1x.__CS190.1x
ML_lab3_linear_reg_student.ipynb
mit
labVersion = 'cs190_week3_v_1_3' """ Explanation: Linear Regression Lab This lab covers a common supervised learning pipeline, using a subset of the Million Song Dataset from the UCI Machine Learning Repository. Our goal is to train a linear regression model to predict the release year of a song given a set of audio f...
andsor/pyfssa
docs/tutorial.ipynb
isc
from __future__ import division # configure plotting %config InlineBackend.rc = {'figure.dpi': 300, 'savefig.dpi': 300, \ 'figure.figsize': (6, 6 / 1.6), 'font.size': 12, \ 'figure.facecolor': (1, 1, 1, 0)} %matplotlib inline import itertools from cycler import...
robertoalotufo/ia898
master/iadftdecompose.ipynb
mit
%matplotlib inline import numpy as np import matplotlib.pyplot as plt from numpy.fft import fft2 from numpy.fft import ifft2 import sys,os ia898path = os.path.abspath('/etc/jupyterhub/ia898_1s2017/') if ia898path not in sys.path: sys.path.append(ia898path) import ia898.src as ia f = 50 * np.ones((128,128)) f[:, ...
jokedurnez/RequiredEffectSize
Figure1_Power/.ipynb_checkpoints/fig_power-checkpoint.ipynb
mit
% matplotlib inline from __future__ import division import os import nibabel as nib import numpy as np from neuropower import peakdistribution import scipy.integrate as integrate import pandas as pd import matplotlib.pyplot as plt import palettable.colorbrewer as cb if not 'FSLDIR' in os.environ.keys(): raise Exce...
Javier-AG/SMC_thesis
preliminary_user_evaluation/evaluation_run.ipynb
gpl-3.0
instrument, category, accordion = load_interface1() check1, slider1, check2, slider2, check3, slider3, check4, slider4 = load_interface2() display(accordion) display(check1,slider1) display(check2,slider2) display(check3,slider3) display(check4,slider4) """ Explanation: INSTRUCTIONS Go on by clicking on "Run cell" but...
planetlabs/notebooks
jupyter-notebooks/crop-classification/segment-knn-tuning.ipynb
apache-2.0
from __future__ import print_function import os import numpy as np from sklearn.model_selection import GridSearchCV from sklearn.metrics import classification_report from sklearn.neighbors import KNeighborsClassifier as KNN """ Explanation: KNN Parameter Tuning In Segmentation: KNN, we perform KNN classification of ...
ecervera/mindstorms-nb
task/sound.ipynb
mit
from functions import connect, sound, forward, stop connect() """ Explanation: <img src="img/nao.jpg" align="right" width=200> Sensor de so (micròfon) El micròfon del robot detecta el soroll ambiental. No sap reconèixer paraules, però si pot reaccionar a una palmada, o un crit. Altres robots més sofisticats com el de...
GoogleCloudPlatform/asl-ml-immersion
notebooks/ml_fairness_explainability/explainable_ai/labs/xai_structured_caip.ipynb
apache-2.0
import os PROJECT_ID = "" # TODO: your PROJECT_ID here. os.environ["PROJECT_ID"] = PROJECT_ID BUCKET_NAME = "" # TODO: your BUCKET_NAME here. REGION = "us-central1" os.environ[ "BUCKET_NAME" ] = PROJECT_ID # Replace your BUCKET_NAME, if needed. You can leave it as is! os.environ["REGION"] = REGION """ Explan...
rebeccabilbro/viz
seaborn/energy_viz.ipynb
mit
%matplotlib inline import os import requests import matplotlib import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from pandas.tools.plotting import scatter_matrix """ Explanation: Visualization basics with Matplotlib, Pandas and Seaborn Demo: Visualizing Energy Efficiency Imp...
joshnsolomon/phys202-2015-work
assignments/assignment11/OptimizationEx01.ipynb
mit
%matplotlib inline import matplotlib.pyplot as plt import numpy as np import scipy.optimize as opt """ Explanation: Optimization Exercise 1 Imports End of explanation """ def hat(x,a,b): return -1*a*(x**2) + b*(x**4) assert hat(0.0, 1.0, 1.0)==0.0 assert hat(0.0, 1.0, 1.0)==0.0 assert hat(1.0, 10.0, 1.0)==-9.0 ...
Danghor/Formal-Languages
Python/FixedPoint.ipynb
gpl-2.0
def fixpoint(S0, f): Result = S0.copy() # don't change S0 while True: NewElements = { x for o in Result for x in f(o) } if NewElements.issubset(Result): return Result Result |= NewElements """ Explanation: Fixed-Point Iterati...
MTG/sms-tools
notebooks/E3-Fourier-properties.ipynb
agpl-3.0
from scipy.fftpack import fft, fftshift import numpy as np from math import gcd, ceil, floor import sys sys.path.append('../software/models/') from dftModel import dftAnal, dftSynth from scipy.signal import get_window import matplotlib.pyplot as plt # E3 - 1.1: Complete the function minimize_energy_spread_dft() d...
chungjjang80/FRETBursts
notebooks/Example - Selecting FRET populations.ipynb
gpl-2.0
from fretbursts import * sns = init_notebook(apionly=True) print('seaborn version: ', sns.__version__) # Tweak here matplotlib style import matplotlib as mpl mpl.rcParams['font.sans-serif'].insert(0, 'Arial') mpl.rcParams['font.size'] = 12 %config InlineBackend.figure_format = 'retina' """ Explanation: Example - Sel...
lwahedi/CurrentPresentation
talks/MDI3/.ipynb_checkpoints/networkslides-checkpoint.ipynb
mit
import pandas as pd import networkx as nx import numpy as np import scipy as sp import itertools import matplotlib.pyplot as plt import statsmodels.api as sm %matplotlib inline """ Explanation: Collecting and Using Data in Python Laila A. Wahedi Massive Data Institute Postdoctoral Fellow <br>McCourt School of Public P...
blua/deep-learning
gan_mnist/Intro_to_GANs_Exercises.ipynb.LOCAL.17033.ipynb
mit
%matplotlib inline import pickle as pkl 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') """ Explanation: Generative Adversarial Network In this notebook, we'll be building a generativ...
malogrisard/NTDScourse
algorithms/01_sol_graph_science.ipynb
mit
# Load libraries # Math import numpy as np # Visualization %matplotlib notebook import matplotlib.pyplot as plt plt.rcParams.update({'figure.max_open_warning': 0}) from mpl_toolkits.axes_grid1 import make_axes_locatable from scipy import ndimage # High-res visualization (but no rotation possible) %matplotlib inlin...
dcavar/python-tutorial-for-ipython
notebooks/spaCy Tutorial.ipynb
apache-2.0
import spacy """ Explanation: spaCy Tutorial (C) 2019-2020 by Damir Cavar Version: 1.4, February 2020 Download: This and various other Jupyter notebooks are available from my GitHub repo. This is a tutorial related to the L665 course on Machine Learning for NLP focusing on Deep Learning, Spring 2018 at Indiana Univers...
ES-DOC/esdoc-jupyterhub
notebooks/messy-consortium/cmip6/models/sandbox-3/atmos.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'messy-consortium', 'sandbox-3', 'atmos') """ Explanation: ES-DOC CMIP6 Model Properties - Atmos MIP Era: CMIP6 Institute: MESSY-CONSORTIUM Source ID: SANDBOX-3 Topic: Atmos Sub-Topics: Dynamical...
barronh/GCandPython
PNC_02Figures.ipynb
gpl-3.0
# Prepare my slides %pylab inline %cd working """ Explanation: Python Analysis Figures Author: Barron H. Henderson End of explanation """ %mkdir icartt !curl -Lo icartt/dc3-mrg60-dc8_merge_20120518_R7_thru20120622.ict http://www-air.larc.nasa.gov/cgi-bin/enzFile?e38EE03EFAE02C04F06E9647DAF98F48D6A2f7075622d6169722f5...
chetan51/nupic.research
projects/whydense/cifar-100/results-06-05-19.ipynb
gpl-3.0
metrics = ['epochs', 'test_accuracy_max', 'test_accuracy', 'noise_accuracy_max', 'noise_accuracy'] df[df['name'].str.startswith('C10_')][['name'] + metrics] # (['dataset', 'name'])['test_accuracy_max', 'test_accuracy', 'noise_accuracy_max', 'noise_accuracy'] metrics = ['epochs', 'test_accuracy', 'test_accuracy_max',...
DanilBaibak/crash_planes
summaries_investigation.ipynb
mit
df = pd.read_csv('data/data.csv') """ Explanation: Raw data End of explanation """ df = pci.clean_database(df) df.head() print('Total number of the data: {}'.format(df.shape[0])) print('Number of the not empty summaries: {}'.format(df[df.Summary.isnull()].shape[0])) """ Explanation: Clean(er) Data End of explanati...
MihaiLai/digit_recognition
digit_recognition.ipynb
mit
from keras.datasets import mnist (X_raw, y_raw), (X_raw_test, y_raw_test) = mnist.load_data() n_train, n_test = X_raw.shape[0], X_raw_test.shape[0] """ Explanation: 机器学习工程师纳米学位 深度学习 项目:搭建一个数字识别项目 在此文件中,我们提供给你了一个模板,以便于你根据项目的要求一步步实现要求的功能,进而完成整个项目。如果你认为需要导入另外的一些代码,请确保你正确导入了他们,并且包含在你的提交文件中。以'练习'开始的标题表示接下来你将开始实现你的项目。注意有一...
tzk/EDeN_examples
graph_format.ipynb
gpl-2.0
%matplotlib inline import pylab as plt import networkx as nx G=nx.Graph() G.add_node(0, label='A') G.add_node(1, label='B') G.add_node(2, label='C') G.add_edge(0,1, label='x') G.add_edge(1,2, label='y') G.add_edge(2,0, label='z') from eden.util import display print display.serialize_graph(G) from eden.util import d...
projectmesa/Presentations
scipy_2015/Demographic Prisoner's Dilemma Activation Schedule.ipynb
apache-2.0
from pd_grid import PD_Model import random import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec %matplotlib inline """ Explanation: Demographic Prisoner's Dilemma The Demographic Prisoner's Dilemma is a family of variants on the classic two-player Prisoner's Dilemma, first developed by Joshu...
google/lifetime_value
notebooks/kaggle_acquire_valued_shoppers_challenge/preprocess_data.ipynb
apache-2.0
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import numpy as np import pandas as pd import tqdm import multiprocessing pd.options.mode.chained_assignment = None # default='warn' """ Explanation: <table align="left"> <td> <a target="_bl...
tensorflow/recommenders
docs/examples/multitask.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...
materialsvirtuallab/matgenb
notebooks/2017-04-03-Slab generation and Wulff shape.ipynb
bsd-3-clause
# Import the neccesary tools to generate surfaces from pymatgen.core.surface import SlabGenerator, generate_all_slabs, Structure, Lattice # Import the neccesary tools for making a Wulff shape from pymatgen.analysis.wulff import WulffShape import os # Let's start with fcc Ni lattice = Lattice.cubic(3.508) Ni = Structu...
NeuroDataDesign/seelviz
Jupyter/.ipynb_checkpoints/Ilastik and Membrane Detection-checkpoint.ipynb
apache-2.0
print cwd """ Explanation: October 19, 2016 Ilastik Membrane Detection Decision Tree and Random Forest Decision trees are a type of regression technique that aims to discern some set of discrete features from a data set. Decision trees function are built from a subset of branches (specific features) and nodes (where ...
google/BIG-bench
bigbench/bbseqio/docs/seqio_tasks_from_json.ipynb
apache-2.0
!pip install git+https://github.com/google/BIG-bench.git import tensorflow as tf tf.compat.v1.enable_eager_execution() import os from typing import Any, Dict, List import seqio import t5.data import t5.evaluation.metrics import tensorflow_datasets as tfds from bigbench.bbseqio import task_api as bb_task_api from bigbe...
jakevdp/sklearn_tutorial
notebooks/03.2-Regression-Forests.ipynb
bsd-3-clause
%matplotlib inline import numpy as np import matplotlib.pyplot as plt from scipy import stats plt.style.use('seaborn') """ Explanation: <small><i>This notebook was put together by Jake Vanderplas. Source and license info is on GitHub.</i></small> Supervised Learning In-Depth: Random Forests Previously we saw a powerf...
p-chambers/Python_OOP_Workshop
index.ipynb
mit
# Run this cell before trying examples import numpy as np import matplotlib.pyplot as plt %matplotlib inline """ Explanation: Python Object Orientation Workshop Paul Chambers P.R.Chambers@soton.ac.uk <img style="float: left;" src="images/ngcm.png"> <img style="float: right;" src="images/epsrc_logo.jpg"> Prerequisites ...
UWSEDS/LectureNotes
Fall2018/04_ProjectOverview_AnalysisWorkflow/analysis_workflow.ipynb
bsd-2-clause
# Packages from urllib import request import os import pandas as pd # Constants used in analysis TRIP_DATA = "https://data.seattle.gov/api/views/tw7j-dfaw/rows.csv?accessType=DOWNLOAD" TRIP_FILE = "pronto_trips.csv" WEATHER_DATA = "http://uwseds.github.io/data/pronto_weather.csv" WEATHER_FILE = "pronto_weather.csv" ...
gregorjerse/rt2
2015_2016/lab3/triangulation.ipynb
gpl-3.0
class Triangle: """ A triangle is represented as a list of its vertices (labeled with natural numbers). """ def __init__(self, vertices, neighbours=None): assert len(vertices) == 3, 'A triangle should have 3 vertices' self.vertices = sorted(vertices) self.neighbours = neighbo...
ellisztamas/faps
docs/tutorials/07_dealing_with_multiple_half-sib_families.ipynb
mit
import numpy as np import faps as fp import matplotlib.pyplot as plt print("Created using FAPS version {}.".format(fp.__version__)) """ Explanation: Dealing with multiple half-sib families Tom Ellis, March 2018, updated June 2020 End of explanation """ %pylab inline adults = fp.read_genotypes('../../data/parents_...
MatthewDaws/OSMDigest
notebooks/Geopandas.ipynb
mit
point_features = [{"geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "properties": { "prop0": "value0", "prop1": "value1" } }] point_data = gpd.GeoDataFrame.from_features(point_features) point_data point_data.ix[0].geome...
graphistry/pygraphistry
demos/upload_csv_miniapp.ipynb
bsd-3-clause
#!pip install graphistry -q import pandas as pd import graphistry # To specify Graphistry account & server, use: # graphistry.register(api=3, username='...', password='...', protocol='https', server='hub.graphistry.com') # For more options, see https://github.com/graphistry/pygraphistry#configure """ Explanation: Vi...
phockett/ePSproc
epsproc/vol/set_plot_options_json.ipynb
gpl-3.0
import json import pprint pp = pprint.PrettyPrinter(indent=4) import sys from pathlib import Path # ePSproc test codebase (local) # For package version this shouldn't be necessary if sys.platform == "win32": modPath = r'D:\code\github\ePSproc' # Win test machine else: modPath = r'/home/femtolab/github/ePSpro...
msampathkumar/kaggle-quora-tensorflow
references/starters/keras_starter.ipynb
apache-2.0
import os import csv import codecs import numpy as np import pandas as pd np.random.seed(1337) from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from keras.utils.np_utils import to_categorical from keras.layers import Dense, Input, Flatten, merge, LSTM, Lambda, Dropo...
tpin3694/tpin3694.github.io
sql/select_values_between_two_values.ipynb
mit
# Ignore %load_ext sql %sql sqlite:// %config SqlMagic.feedback = False """ Explanation: Title: Select Values Between Two Values Slug: select_values_between_two_values Summary: Select values between two values in SQL. Date: 2016-05-01 12:00 Category: SQL Tags: Basics Authors: Chris Albon Note: This tutorial was ...
mitdbg/modeldb
client/workflows/demos/registry/data-tranformation-modelless-deployment.ipynb
mit
# restart your notebook if prompted on Colab try: import verta except ImportError: !pip install verta import os # Ensure credentials are set up, if not, use below # os.environ['VERTA_EMAIL'] = # os.environ['VERTA_DEV_KEY'] = # os.environ['VERTA_HOST'] = from verta import Client client = Client(os.environ...
Ensembl/cttv024
tests/__reports__/postgap.20180108.asthma.tsv.gz.REPORT.20180206170054.ipynb
apache-2.0
from reports import helpers helpers.calc_run_str() # pg = pd.read_csv(filename, sep='\t', na_values=['None']) pg = helpers.load_file(filename) """ Explanation: POSTGAP Report This notebook was automatically generated as a summary of POSTGAP output. Setup End of explanation """ print(pg.shape) """ Explanation: Hea...
juditacs/labor
notebooks/bi_ea_demo/cat_dog.ipynb
lgpl-3.0
import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy.io import wavfile import os from sklearn.metrics import precision_recall_fscore_support from sklearn.preprocessing import StandardScaler %matplotlib inline from keras.layers import Input, Dense, Bidirectional, Dropout, Conv1D, MaxPoolin...
Upward-Spiral-Science/spect-team
Code/Assignment-10/SubjectSelectionExperiments (rCBF data with baseline).ipynb
apache-2.0
# Standard import pandas as pd import numpy as np %matplotlib inline import matplotlib.pyplot as plt # Dimensionality reduction and Clustering from sklearn.decomposition import PCA from sklearn.cluster import KMeans from sklearn.cluster import MeanShift, estimate_bandwidth from sklearn import manifold, datasets from i...
ES-DOC/esdoc-jupyterhub
notebooks/nuist/cmip6/models/sandbox-3/seaice.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'nuist', 'sandbox-3', 'seaice') """ Explanation: ES-DOC CMIP6 Model Properties - Seaice MIP Era: CMIP6 Institute: NUIST Source ID: SANDBOX-3 Topic: Seaice Sub-Topics: Dynamics, Thermodynamics, Ra...
danijel3/ASRDemos
notebooks/MLP_TIMIT.ipynb
apache-2.0
import os os.environ['CUDA_VISIBLE_DEVICES']='0' """ Explanation: Simple MLP demo for TIMIT using Keras This notebook describes how to reproduce the results for the simple MLP architecture described in this paper: ftp://ftp.idsia.ch/pub/juergen/nn_2005.pdf And in Chapter 5 of this thesis: http://www.cs.toronto.edu/~g...
wgong/open_source_learning
fun_with_jupyter.ipynb
apache-2.0
HTML("<img src=images/office-suite.jpg>") """ Explanation: Fun with Jupyter Table of Contents Motivation Introduction Problem Statement Import packages Estimate x range Use IPython as a calculator Use Python programming to find solution Graph the solution with matplotlib Solve equation precisely using SymPy Pandas fo...
DominikDitoIvosevic/Uni
STRUCE/2018/.ipynb_checkpoints/SU-2018-LAB01-Regresija-checkpoint.ipynb
mit
# Učitaj osnovne biblioteke... import numpy as np import sklearn import matplotlib.pyplot as plt import scipy as sp %pylab inline """ Explanation: Sveučilište u Zagrebu Fakultet elektrotehnike i računarstva Strojno učenje 2018/2019 http://www.fer.unizg.hr/predmet/su Laboratorijska vježba 1: Regresija Verzija: 1.1 Z...
psumank/DATA643
Final/DATA643_Final_Project.ipynb
mit
import os import sys import urllib2 import collections import matplotlib.pyplot as plt import math from time import time, sleep %pylab inline """ Explanation: DATA 643 - Final Project Sreejaya Nair and Suman K Polavarapu Description: Explore the Apache Spark Cluster Computing Framework by analysing the movielens datas...
facaiy/book_notes
Mining_of_Massive_Datasets/Link_Analysis/note.ipynb
cc0-1.0
plt.imshow(plt.imread('./res/fig_5_1.png')) plt.imshow(plt.imread('./res/eg_5_1.png')) """ Explanation: 5 Link Analysis 5.1 PageRank 5.1.1 Eearly Search Engines and Term Spam inverted index: a data structure that makes it easy to find all the palces where that a term given occurs. term spam: techniques for fooli...
antoniomezzacapo/qiskit-tutorial
community/terra/qis_intro/superposition.ipynb
apache-2.0
# useful additional packages import matplotlib.pyplot as plt %matplotlib inline import numpy as np # importing Qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister, execute from qiskit import Aer, IBMQ # import basic plot tools from qiskit.tools.visualization import matplotlib_circuit_drawer ...
Ironlors/SmartIntersection-Ger
Journal/Seminararbeit.ipynb
apache-2.0
v1 = int(input('v1: ')) v2 = int(input('v2: ')) h1 = int(input('h1: ')) h2 = int(input('h2: ')) v = v1+v2 h = h1+h2 print ('V', v) print ('H', h) """ Explanation: Seminararbeit - autonome Verkehrsleitsysteme von Kay Kleinvogel und Lisa-Marie Nehring Übersicht: Die Hauptaufgabe dieser Arbeit ist das Forschen an effizi...
Diyago/Machine-Learning-scripts
clustering/Базовая кластеризация.ipynb
apache-2.0
#импортируем библиотеки import numpy as np import matplotlib.pyplot as plt from sklearn.cluster import KMeans from sklearn.datasets import make_blobs from sklearn.cluster import DBSCAN plt.figure(figsize=(12, 12)) n_samples = 2300 random_state = 220 X, y = make_blobs(n_samples=n_samples, random_state=random_sta...
tensorflow/docs-l10n
site/ja/tensorboard/hyperparameter_tuning_with_hparams.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...
esa-as/2016-ml-contest
MSS_Xmas_Trees/ml_seg_sub5_CRAW.ipynb
apache-2.0
from numpy.fft import rfft from scipy import signal import numpy as np import matplotlib.pyplot as plt import plotly.plotly as py import pandas as pd import timeit from sqlalchemy.sql import text from sklearn import tree #from sklearn.model_selection import LeavePGroupsOut from sklearn import metrics from sklearn.tree ...
cranmer/look-elsewhere-2d
create_gaussian_process_examples-fill_holes.ipynb
mit
%pylab inline --no-import-all """ Explanation: Testing look-elsewhere effect by creating 2d chi-square random fields with a Gaussian Process by Kyle Cranmer, Dec 7, 2015 The correction for 2d look-elsewhere effect presented in Estimating the significance of a signal in a multi-dimensional search by Ofer Vitells and ...
balarsen/pymc_learning
Deconvolution/convolution2.ipynb
bsd-3-clause
np.random.seed(8675309) sim_pa = np.arange(20,175) sim_c = 890*np.sin(np.deg2rad(sim_pa))**0.8 # at each point draw a poisson variable with that mean sim_c_n = np.asarray([np.random.poisson(v) for v in sim_c ]) prob=0.1 sim_c_n2 = np.asarray([np.random.negative_binomial((v*prob)/(1-prob), prob) for v in sim_c ]) ...
david-hagar/NLP-Analytics
rnn-lstm-text-classification/LSTM Text Classification.ipynb
mit
import numpy as np from keras.datasets import imdb from keras.models import Sequential from keras.layers import Dense, LSTM, GRU, Dropout from keras.layers.embeddings import Embedding from keras.preprocessing import sequence from keras.callbacks import TensorBoard from keras import backend # fix random seed for reprod...
quantumlib/Cirq
docs/tutorials/educators/ion_device.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...
IST256/learn-python
content/lessons/05-Functions/Slides.ipynb
mit
try: n = int(input("Enter n: ")) if n > 0: q = 1 elif n == 0: q = 2 else: q = 3 except: q = 4 """ Explanation: IST256 Lesson 05 Functions Zybook Ch 5 P4E Ch 4 Links Participation: https://poll.ist256.com In-Class Questions: Ask over Zoom Chat! Agenda Exam 1 - Frequently...
aboucaud/python-euclid2016
notebooks/02-Numpy.ipynb
bsd-3-clause
# uncomment that line if you are using python 2 # from __future__ import print_function, division import numpy as np """ Explanation: Numpy NumPy is the fundamental package for scientific computing with Python. You can find more tutorials at http://wiki.scipy.org/Tentative_NumPy_Tutorial . Also check http://www.nump...
AllenDowney/ThinkStats2
solutions/chap09soln.ipynb
gpl-3.0
from os.path import basename, exists def download(url): filename = basename(url) if not exists(filename): from urllib.request import urlretrieve local, _ = urlretrieve(url, filename) print("Downloaded " + local) download("https://github.com/AllenDowney/ThinkStats2/raw/master/code/th...
chapagain/kaggle-competitions-solution
Sentiment Analysis on Movie Reviews/Sentiment-Analysis-on-Movie-Reviews-RNN-LSTM-Kaggle.ipynb
mit
import numpy as np import pandas as pd from gensim import corpora from nltk.corpus import stopwords from nltk.tokenize import word_tokenize from nltk.stem import SnowballStemmer from keras.preprocessing import sequence from keras.utils import np_utils from keras.models import Sequential from keras.layers import Dens...
huajianmao/learning
coursera/deep-learning/1.neural-networks-deep-learning/week2/pa.1.Python_Basics_With_Numpy_v2.ipynb
mit
### START CODE HERE ### (≈ 1 line of code) test = "Hello World" ### END CODE HERE ### print ("test: " + test) """ Explanation: Table of Contents <p><div class="lev1 toc-item"><a href="#Python-Basics-with-Numpy-(optional-assignment)" data-toc-modified-id="Python-Basics-with-Numpy-(optional-assignment)-1"><span class="...
materialsproject/mapidoc
example_notebooks/mpcomplete_submit_structures_example.ipynb
bsd-3-clause
zipfilename = '/Users/dwinston/Dropbox/best/structures/ever.zip' """ Explanation: Submit Structures to MPComplete This notebook documents the process of 1. Taking and validating a collection of CIFs (e.g. in a ZIP file), creating pymatgen Structure objects 3. Filtering for structures that are submittable to MP (e.g. t...
google/applied-machine-learning-intensive
content/02_data/01_introduction_to_pandas/colab.ipynb
apache-2.0
# 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 the L...
PrincetonACM/princetonacm.github.io
events/code-at-night/archive/python_talk/intro_to_python_soln.ipynb
mit
# When a line begins with a '#' character, it designates a comment. This means that it's not actually a line of code # This is how you say hello world print('hello world') # Can you make Python print the staircase below: # # ======== # | | # =============== ...
cathalmccabe/PYNQ
boards/Pynq-Z1/base/notebooks/pmod/pmod_grove_usranger.ipynb
bsd-3-clause
from pynq.overlays.base import BaseOverlay base = BaseOverlay("base.bit") """ Explanation: Grove Ultrasonic Ranger Example This example shows how to use the Grove ultrasonic_ranger on the board. The Ultrasonic sensor has a maximal range of 400 cm, a minimal range of 3 cm and resolution of 1 cm. If no obstacle is se...
anthonyng2/FX-Trading-with-Python-and-Oanda
Oanda v1 REST-oandapy/06.00 Position Management.ipynb
mit
from datetime import datetime, timedelta import pandas as pd import oandapy import configparser config = configparser.ConfigParser() config.read('../config/config_v1.ini') account_id = config['oanda']['account_id'] api_key = config['oanda']['api_key'] oanda = oandapy.API(environment="practice", a...
EvenStrangest/tensorflow
tensorflow/examples/udacity/2_fullyconnected.ipynb
apache-2.0
# These are all the modules we'll be using later. Make sure you can import them # before proceeding further. from __future__ import print_function import numpy as np import tensorflow as tf from six.moves import cPickle as pickle from six.moves import range """ Explanation: Deep Learning Assignment 2 Previously in 1_n...
magwenelab/mini-term-2016
ode-modeling1-instructor.ipynb
cc0-1.0
# import statements to make numeric and plotting functions available %matplotlib inline from numpy import * from matplotlib.pyplot import * ## define your function in this cell def hill_activating(X, B, K, n): Xn = X**n return (B * Xn)/(K**n + Xn) ## generate a plot using your hill_activating function define...
jegibbs/phys202-2015-work
assignments/assignment07/AlgorithmsEx02.ipynb
mit
%matplotlib inline from matplotlib import pyplot as plt import seaborn as sns import numpy as np """ Explanation: Algorithms Exercise 2 Imports End of explanation """ def find_peaks(a): """Find the indices of the local maxima in a sequence.""" localmax=[] for x in range(len(a)): if x==0: ...
flaxandteal/python-course-lecturer-notebooks
Basic control structures.ipynb
mit
x = # Insert something before the hash """ Explanation: Basic control structures and variables Nails for the hammer As one of the prereqs for this course was some knowledge of MATLAB or a decent understanding of programming, we won't spend a huge amount of time on concepts, assuming you have a fair idea, and focus on ...
turbomanage/training-data-analyst
CPB100/lab4c/mlapis.ipynb
apache-2.0
APIKEY="CHANGE-THIS-KEY" # Replace with your API key """ Explanation: <h1> Using Machine Learning APIs </h1> First, visit <a href="http://console.cloud.google.com/apis">API console</a>, choose "Credentials" on the left-hand menu. Choose "Create Credentials" and generate an API key for your application. You should p...
mne-tools/mne-tools.github.io
0.17/_downloads/d4848b046d4a566cb8cc0dae39f6b211/plot_eeg_erp.ipynb
bsd-3-clause
import mne from mne.datasets import sample """ Explanation: EEG processing and Event Related Potentials (ERPs) For a generic introduction to the computation of ERP and ERF see tut_epoching_and_averaging. Here we cover the specifics of EEG, namely: - setting the reference - using standard montages :func:`mne.channels.M...
GoogleCloudPlatform/training-data-analyst
courses/machine_learning/feateng/asl_2.0_feat_eng.ipynb
apache-2.0
%%bash export PROJECT=$(gcloud config list project --format "value(core.project)") echo "Your current GCP Project Name is: "$PROJECT import os PROJECT = "cloud-training-demos" # REPLACE WITH YOUR PROJECT NAME REGION = "us-west1-b" # REPLACE WITH YOUR BUCKET REGION e.g. us-central1 # Do not change these os.environ["P...
qqwjq/lightFM
examples/crossvalidated/example.ipynb
apache-2.0
import data (interactions, question_features, user_features, question_vectorizer, user_vectorizer) = data.read_data() # This will download the data if not present """ Explanation: Recommending questions on CrossValidated In this example, we'll try to recommend questions to be answered to users of stats.stackexchang...
fluxcapacitor/source.ml
jupyterhub.ml/notebooks/train_deploy/zz_under_construction/zz_old/Spark/ML/SparkML_To_Production_Airbnb_Hybrid_Cloud.ipynb
apache-2.0
df = spark.read.format("csv") \ .option("inferSchema", "true").option("header", "true") \ .load("s3a://datapalooza/airbnb/airbnb.csv.bz2") df.registerTempTable("df") print(df.head()) print(df.count()) """ Explanation: Step 0: Load Libraries and Data End of explanation """ df_filtered = df.filter("price >= 50 ...
tritemio/FRETBursts
notebooks/Example - Exporting Burst Data Including Timestamps.ipynb
gpl-2.0
from fretbursts import * sns = init_notebook() """ Explanation: Exporting Burst Data This notebook is part of a tutorial series for the FRETBursts burst analysis software. In this notebook, show a few example of how to export FRETBursts burst data to a file. <div class="alert alert-info"> Please <b>cite</b> FRETBu...
scottlittle/solar-sensors
IPnotebooks/important-IPNBs/prune-X.ipynb
apache-2.0
import numpy as np import matplotlib.pyplot as plt from data_helper_functions import * from IPython.display import display pd.options.display.max_columns = 999 %matplotlib inline with np.load('data/X.npz') as data: #old X, don't use, start at "Now with all channels..." X = data['X'] with np.load('data/Y.npz') as...
mne-tools/mne-tools.github.io
0.17/_downloads/8b68ef11c9dcc68ed3cd0ccec9a41a34/plot_decoding_unsupervised_spatial_filter.ipynb
bsd-3-clause
# Authors: Jean-Remi King <jeanremi.king@gmail.com> # Asish Panda <asishrocks95@gmail.com> # # License: BSD (3-clause) import numpy as np import matplotlib.pyplot as plt import mne from mne.datasets import sample from mne.decoding import UnsupervisedSpatialFilter from sklearn.decomposition import PCA, FastI...
phoebe-project/phoebe2-docs
2.3/tutorials/gravb_bol.ipynb
gpl-3.0
#!pip install -I "phoebe>=2.3,<2.4" """ Explanation: Gravity Brightening/Darkening (gravb_bol) 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...
usantamaria/iwi131
ipynb/17-CicloFor/For.ipynb
cc0-1.0
j = 0 while j<10: print j, j += 1 # Toda la información de los valores utilizados está en range(10) for j in range(10): print j, """ Explanation: <header class="w3-container w3-teal"> <img src="images/utfsm.png" alt="" align="left"/> <img src="images/inf.png" alt="" align="right"/> </header> <br/><br/>...
robertoalotufo/ia898
master/tutorial_contraste_iterativo_2.ipynb
mit
%matplotlib inline import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np import sys,os ia898path = os.path.abspath('/etc/jupyterhub/ia898_1s2017/') if ia898path not in sys.path: sys.path.append(ia898path) import ia898.src as ia def TWL(L,W): Pmin = max(0,L-W//2) Pmax = min...
rishuatgithub/MLPy
torch/1.Tensor Basics.ipynb
apache-2.0
import torch import numpy as np print(torch.__version__) arr = np.array([1,2,4,12,34]) arr arr.dtype x = torch.from_numpy(arr) x type(x) torch.as_tensor(arr) ### creating 2D array arr2d = np.arange(0.0,12.0) arr2d arr2d = arr2d.reshape(4,3) arr2d ## create a 2d torch x2 = torch.from_numpy(arr2d) x2 ### pro...
yevheniyc/C
1t_DataAnalysisMLPython/1j_ML/DS_ML_Py_SBO/DataScience/3_Distributions/Distributions.ipynb
mit
%matplotlib inline import numpy as np import matplotlib.pyplot as plt values = np.random.uniform(-10.0, 10.0, 100000) plt.hist(values, 50) plt.show() """ Explanation: Examples of Data Distributions Uniform Distribution End of explanation """ from scipy.stats import norm import matplotlib.pyplot as plt x = np.aran...