repo_name
stringlengths
6
77
path
stringlengths
8
215
license
stringclasses
15 values
content
stringlengths
335
154k
chrismcginlay/crazy-koala
jupyter/04_making_decisions_introduction.ipynb
gpl-3.0
temperature = float(input("Please enter the temperature: ")) if temperature<15: print("It is too cold.") print("Turn up the heating.") """ Explanation: Making Decisions - Introduction Your programs so far always carry out the same commands every time the programs are run. Most programs need to be able to carry...
gsentveld/lunch_and_learn
notebooks/Data_Exploration.ipynb
mit
import os from dotenv import load_dotenv, find_dotenv # find .env automagically by walking up directories until it's found dotenv_path = find_dotenv() # load up the entries as environment variables load_dotenv(dotenv_path) """ Explanation: Exploring the files with Pandas Many statistical Python packages can deal wit...
qutip/qutip-notebooks
examples/control-pulseoptim-Lindbladian.ipynb
lgpl-3.0
%matplotlib inline import numpy as np import matplotlib.pyplot as plt import datetime from qutip import Qobj, identity, sigmax, sigmay, sigmaz, sigmam, tensor from qutip.superoperator import liouvillian, sprepost from qutip.qip import hadamard_transform import qutip.logging_utils as logging logger = logging.get_logger...
dismalpy/dismalpy
doc/notebooks/local_linear_trend.ipynb
bsd-2-clause
%matplotlib inline import numpy as np import pandas as pd from scipy.stats import norm import dismalpy as dp import matplotlib.pyplot as plt """ Explanation: State space modeling: Local Linear Trends This notebook describes how to extend the state space classes to create and estimate a custom model. Here we develop a...
ES-DOC/esdoc-jupyterhub
notebooks/dwd/cmip6/models/sandbox-1/ocean.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'dwd', 'sandbox-1', 'ocean') """ Explanation: ES-DOC CMIP6 Model Properties - Ocean MIP Era: CMIP6 Institute: DWD Source ID: SANDBOX-1 Topic: Ocean Sub-Topics: Timestepping Framework, Advection, ...
basp/notes
3dgfx.ipynb
mit
import numpy as np import matplotlib.pyplot as plt %matplotlib inline """ Explanation: 3dgfx the math This is pretty much a collection of notes mostly inspired by Computer Graphics, Fall 2009. Yeah it's an old course but it's very good and covers a lot of essentials in a fast pace. This is by no means a substitute for...
deepmind/acme
examples/quickstart.ipynb
apache-2.0
environment_library = 'gym' # @param ['dm_control', 'gym'] """ Explanation: Acme: Quickstart Guide to installing Acme and training your first D4PG agent. <a href="https://colab.research.google.com/github/deepmind/acme/blob/master/examples/quickstart.ipynb" target="_parent"><img src="https://colab.research.google.com/...
analysiscenter/dataset
examples/tutorials/05_creating_CNN.ipynb
apache-2.0
import sys import warnings warnings.filterwarnings("ignore") import numpy as np import PIL from matplotlib import pyplot as plt from tqdm import tqdm %matplotlib inline # the following line is not required if BatchFlow is installed as a python package. sys.path.append('../..') from batchflow import D, B, V, C, R, P ...
BryanCutler/spark
python/docs/source/getting_started/quickstart.ipynb
apache-2.0
from pyspark.sql import SparkSession spark = SparkSession.builder.getOrCreate() """ Explanation: Quickstart This is a short introduction and quickstart for the PySpark DataFrame API. PySpark DataFrames are lazily evaluated. They are implemented on top of RDDs. When Spark transforms data, it does not immediately compu...
rainyear/pytips
Tips/2016-04-08-Descriptor.ipynb
mit
a = 1 b = 2 print("a + b = {}".format(a+b)) # 相当于 print("a.__add__(b) = {}".format(a.__add__(b))) """ Explanation: Python 描述符 本篇主要关于三个常用内置方法:property(),staticmethod(),classmethod() 在 Python 语言的设计中,通常的语法操作最终都会转化为方法调用,例如: End of explanation """ class Int: ctype = "Class::Int" def __init__(self, val): ...
wmfschneider/CHE30324
Homework/HW5-soln.ipynb
gpl-3.0
import numpy as np import matplotlib.pyplot as plt E = [] l = 1.4e-10 #m hbar = 1.05457e-34 #J*s m = 9.109e-31 #kg N = [1,3,5,7,9] #N = number of C-C bonds for n in range (1,7): for i in N: e = (n**2*np.pi**2*hbar**2*6.2415e18)/(2*m*(i*l)**2) E.append(e) plt.scatter(N,E[0:5], label = "n=1") plt.scatter(N,...
tensorflow/docs-l10n
site/ja/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...
mne-tools/mne-tools.github.io
0.20/_downloads/d52b5321a00f5cf4d4be975019fb541b/plot_morph_surface_stc.ipynb
bsd-3-clause
# Author: Tommy Clausner <tommy.clausner@gmail.com> # # License: BSD (3-clause) import os import mne from mne.datasets import sample print(__doc__) """ Explanation: Morph surface source estimate This example demonstrates how to morph an individual subject's :class:mne.SourceEstimate to a common reference space. We a...
nbokulich/short-read-tax-assignment
ipynb/simulated-community/taxonomy-assignment.ipynb
bsd-3-clause
from os.path import join, expandvars from joblib import Parallel, delayed from glob import glob from os import system from tax_credit.simulated_communities import copy_expected_composition from tax_credit.framework_functions import (parameter_sweep, generate_per_method_biom_...
tpin3694/tpin3694.github.io
machine-learning/flatten_a_matrix.ipynb
mit
# Load library import numpy as np """ Explanation: Title: Flatten A Matrix Slug: flatten_a_matrix Summary: How to flatten a matrix in Python. Date: 2017-09-02 12:00 Category: Machine Learning Tags: Vectors Matrices Arrays Authors: Chris Albon Preliminaries End of explanation """ # Create matrix matrix = np.a...
tensorflow/lucid
notebooks/feature-visualization/any_number_channels.ipynb
apache-2.0
import numpy as np import tensorflow as tf import lucid.modelzoo.vision_models as models from lucid.misc.io import show import lucid.optvis.objectives as objectives import lucid.optvis.param as param import lucid.optvis.render as render import lucid.optvis.transform as transform model = models.InceptionV1() model.loa...
ericmjl/systems-microbiology-hiv
Problem Set (Solutions).ipynb
mit
# This cell loads the data and cleans it for you, and log10 transforms the drug resistance values. # Remember to run this cell if you want to have the data loaded into memory. DATA_HANDLE = 'drug_data/hiv-protease-data.csv' # specify the relative path to the protease drug resistance data N_DATA = 8 # specify the numb...
grfiv/MNIST
svm.scikit/svm_rbf.scikit_random_gridsearch.ipynb
mit
from __future__ import division import os, time, math, csv import cPickle as pickle import matplotlib.pyplot as plt import numpy as np from print_imgs import print_imgs # my own function to print a grid of square images from sklearn.preprocessing import StandardScaler from sklearn.utils import shuffle...
ES-DOC/esdoc-jupyterhub
notebooks/thu/cmip6/models/sandbox-2/landice.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'thu', 'sandbox-2', 'landice') """ Explanation: ES-DOC CMIP6 Model Properties - Landice MIP Era: CMIP6 Institute: THU Source ID: SANDBOX-2 Topic: Landice Sub-Topics: Glaciers, Ice. Properties: 3...
drgmk/sdf
examples/explore_results.ipynb
mit
import requests import pickle """ Explanation: Explore sdf output sdf generates a large amount of information during fitting. Most of this is saved in a database that isn't visible on the web, and also in pickle files that can be found for each model under the "..." link. A simpler output is the json files under the "...
AllenDowney/ModSim
soln/chap20.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/' ...
DamienIrving/ocean-analysis
development/dask_iris.ipynb
mit
import warnings warnings.filterwarnings('ignore') import glob import iris from iris.experimental.equalise_cubes import equalise_attributes import iris.coord_categorisation infiles = glob.glob('/g/data/ua6/DRSv3/CMIP5/CCSM4/historical/mon/ocean/r1i1p1/thetao/latest/thetao_Omon_CCSM4_historical_r1i1p1_??????-??????.nc'...
antoinecarme/sklearn_explain
doc/sklearn_reason_codes.ipynb
bsd-3-clause
from sklearn import datasets import pandas as pd ds = datasets.load_breast_cancer(); NC = 4 lFeatures = ds.feature_names[0:NC] df = pd.DataFrame(ds.data[:,0:NC] , columns=lFeatures) df['TGT'] = ds.target df.sample(6, random_state=1960) """ Explanation: Model Explanation for Classification Models This document descri...
snowicecat/umich-eecs445-f16
handsOn_lecture17_clustering-mixtures-em/handsOn_lecture17_clustering-mixtures-em.ipynb
mit
%matplotlib inline from matplotlib import pyplot as plt; import matplotlib as mpl; import numpy as np; """ Explanation: $$ \LaTeX \text{ command declarations here.} \newcommand{\R}{\mathbb{R}} \renewcommand{\vec}[1]{\mathbf{#1}} \newcommand{\X}{\mathcal{X}} \newcommand{\D}{\mathcal{D}} \newcommand{\G}{\mathcal{G}} \n...
ajfriend/cyscs
tutorial_parallel.ipynb
mit
import scs from concurrent import futures num_problems = 20 m = 1000 # size of L1 problem data = [scs.examples.l1(m, seed=i) for i in range(num_problems)] """ Explanation: Calling SCS in Parallel In this notebook, we set up a list of several SCS problems and map scs.solve over that list to solve each of the problems...
shreyas111/Multimedia_CS523_Project1
Style_Transfer_Saving_Input_Output_Images.ipynb
mit
from IPython.display import Image, display Image('images/15_style_transfer_flowchart.png') """ Explanation: Style Transfer Our Changes: Added code for saving the input content and style images. Also added code for saving the output mixed image End of explanation """ %matplotlib inline import matplotlib.pyplot as plt...
srcole/qwm
burrito/.ipynb_checkpoints/Burrito_bootcamp-checkpoint.ipynb
mit
# These commands control inline plotting %config InlineBackend.figure_format = 'retina' %matplotlib inline import numpy as np # Useful numeric package import scipy as sp # Useful statistics package import matplotlib.pyplot as plt # Plotting package """ Explanation: San Diego Burrito Analytics: Bootcamp 2016 Scott Col...
bundgus/python-playground
jupyter-notebook-playground/P4DS4D; 16; Outliers.ipynb
mit
import numpy as np from scipy.stats.stats import pearsonr np.random.seed(101) normal = np.random.normal(loc=0.0, scale= 1.0, size=1000) print 'Mean: %0.3f Median: %0.3f Variance: %0.3f' % (np.mean(normal), np.median(normal), np.var(normal)) outlying = normal.copy() outlying[0] = 50.0 print 'Mean: %0.3f Median: %0.3f V...
adico-somoto/deep-learning
language-translation/dlnd_language_translation.ipynb
mit
""" DON'T MODIFY ANYTHING IN THIS CELL """ import helper import problem_unittests as tests source_path = 'data/small_vocab_en' target_path = 'data/small_vocab_fr' source_text = helper.load_data(source_path) target_text = helper.load_data(target_path) """ Explanation: Language Translation In this project, you’re going...
GoogleCloudPlatform/ai-platform-samples
ai-explanations-local-experience.ipynb
apache-2.0
PROJECT_ID = "[your-project-id]" #@param {type:"string"} if PROJECT_ID == "" or PROJECT_ID is None or PROJECT_ID == "[your-project-id]": # Get your GCP project id from gcloud shell_output = !gcloud config list --format 'value(core.project)' 2>/dev/null PROJECT_ID = shell_output[0] print("Project ID:", ...
pyzos/pyzos
Examples/jupyter_notebooks/00_Enhancing_the_ZOS_API_Interface.ipynb
mit
from __future__ import print_function import os import sys import numpy as np from IPython.display import display, Image, YouTubeVideo import matplotlib.pyplot as plt # Imports for using ZOS API in Python directly with pywin32 # (not required if using PyZOS) from win32com.client.gencache import EnsureDispatch, EnsureM...
philmui/datascience
lecture07.big.data/lecture07.3.trends.ipynb
mit
yrs = [str(yr) for yr in range(2002, 2016)] """ Explanation: We are only interested the year range from 2002 - 2006 End of explanation """ export_df = df[(df['trade_type'] == 'Export') & (df['partner'] == 'EXT_EU28') ].loc[['EU28', 'UK']][yrs] export_df.head(4) """ Explanation: Let's f...
Jim00000/Numerical-Analysis
7_Boundary_Value_Problems.ipynb
unlicense
# Import modules import numpy as np import scipy """ Explanation: ★ Boundary Value Problems ★ End of explanation """ def ode_rkf45(f, a, b, y0, h = 1e-3, tol = 1e-6): w = y0.astype(np.float64) t = a while(t < b): w_this, t_this = w, t s1 = f(t, w) hs1 = h * s1 s2 = f(t + h...
LSSTC-DSFP/LSSTC-DSFP-Sessions
Sessions/Session02/Day5/PracticalMachLearnWorkflowSolutions.ipynb
mit
import numpy as np from astropy.table import Table import matplotlib.pyplot as plt %matplotlib inline """ Explanation: A Practical Guide to the Machine Learning Workflow: Separating Stars and Galaxies from SDSS Version 0.1 By AA Miller 2017 Jan 22 We will now follow the steps from the machine learning workflow lectur...
ES-DOC/esdoc-jupyterhub
notebooks/ec-earth-consortium/cmip6/models/sandbox-2/atmos.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'ec-earth-consortium', 'sandbox-2', 'atmos') """ Explanation: ES-DOC CMIP6 Model Properties - Atmos MIP Era: CMIP6 Institute: EC-EARTH-CONSORTIUM Source ID: SANDBOX-2 Topic: Atmos Sub-Topics: Dyn...
sbu-python-summer/python-tutorial
day-1/python-day1-exercises1.ipynb
bsd-3-clause
import random random_number = random.randint(0,9) """ Explanation: Exercises Q 1 When talking about floating point, we discussed machine epsilon, $\epsilon$&mdash;this is the smallest number that when added to 1 is still different from 1. We'll compute $\epsilon$ here: Pick an initial guess for $\epsilon$ of eps = ...
deeplook/notebooks
mapping/geodesic_polylines.ipynb
mit
%matplotlib inline import math import folium la = 34.05351, -118.24531 nyc = 40.71453, -74.00713 berlin = 52.516071, 13.37698 potsdam = 52.39962, 13.04784 singapore = 1.29017, 103.852 sydney = -33.86971, 151.20711 """ Explanation: Using truly geodesic polylines with Folium This notebook shows how long straight lin...
w4zir/ml17s
lectures/lec03-gradient-descent.ipynb
mit
%matplotlib inline import pandas as pd import numpy as np from sklearn import linear_model import matplotlib.pyplot as plt # read data in pandas frame dataframe = pd.read_csv('datasets/house_dataset1.csv') # assign x and y X = np.array(dataframe[['Size']]) y = np.array(dataframe[['Price']]) m = y.size # number of tr...
SKA-ScienceDataProcessor/algorithm-reference-library
workflows/notebooks/imaging-fits_arlexecute.ipynb
apache-2.0
%matplotlib inline import os import sys sys.path.append(os.path.join('..', '..')) from data_models.parameters import arl_path results_dir = arl_path('test_results') from matplotlib import pylab pylab.rcParams['figure.figsize'] = (10.0, 10.0) pylab.rcParams['image.cmap'] = 'rainbow' from matplotlib import pyplot ...
GoogleCloudPlatform/nvidia-merlin-on-vertex-ai
02-model-training-hugectr.ipynb
apache-2.0
import json import os import time from google.cloud import aiplatform as vertex_ai from google.cloud.aiplatform import hyperparameter_tuning as hpt """ Explanation: Training Large Recommender Models with NVIDIA Merlin HugeCTR and Vertex AI This notebook demonstrates how to use Vertex AI Training to operationalize tra...
arcyfelix/Courses
18-11-22-Deep-Learning-with-PyTorch/05-Recurrent Neural Networks/02 - Character_Level_RNN.ipynb
apache-2.0
import numpy as np import torch from torch import nn import torch.nn.functional as F """ Explanation: Character-Level LSTM in PyTorch In this notebook, I'll construct a character-level LSTM with PyTorch. The network will train character by character on some text, then generate new text character by character. As an ex...
Ecotrust/growth-yield-batch
notebooks/QAQC on Ridge Property.ipynb
bsd-3-clause
%matplotlib inline from matplotlib.pylab import plt import pandas as pd from sqlalchemy import create_engine from matplotlib import cm import seaborn as sns """ Explanation: This notebook will explore the Ridge property data as modeled by FVS and the Ecotrust Growth-Yield-Batch system. Also serves as a demonstration o...
anugrah-saxena/pycroscopy
docs/auto_examples/microdata_example.ipynb
mit
# Code source: Chris Smith -- cq6@ornl.gov # Liscense: MIT import numpy as np import pycroscopy as px """ Explanation: Writing to hdf5 using the Microdata objects End of explanation """ # First create some data data1 = np.random.rand(5, 7) """ Explanation: Create some MicroDatasets and MicroDataGroups that will be...
sangheestyle/ml2015project
howto/make_data_a_serialized_object.ipynb
mit
import csv import gzip import cPickle as pickle from collections import defaultdict import yaml question_reader = csv.reader(open("../data/questions.csv")) question_header = ["answer", "group", "category", "question", "pos_token"] questions = defaultdict(dict) for row in question_reader: question = {} row[-1...
eneskemalergin/Data_Structures_and_Algorithms
Chapter4/4-Algorithm_Analysis.ipynb
gpl-3.0
def ex1(n): total = 0 for i in range(n): total += i return total print ex1(10) """ Explanation: Algorithm Analysis We can solve a problem with different solutions, but which one is better/best solution? We can answer this question by measuing the execution time, measuring the memory usage, and so...
NeuroDataDesign/pan-synapse
pipeline_3/background/GabaExploration.ipynb
apache-2.0
def otsuVox(argVox): probVox = np.nan_to_num(argVox) bianVox = np.zeros_like(probVox) for zIndex, curSlice in enumerate(probVox): #if the array contains all the same values if np.max(curSlice) == np.min(curSlice): #otsu thresh will fail here, leave bianVox as all 0's ...
Bowenislandsong/Distributivecom
Archive/Actors.ipynb
gpl-3.0
import ray ray.init(num_gpus=2) """ Explanation: Remote functions in Ray should be thought of as functional and side-effect free. Restricting ourselves only to remote functions gives us distributed functional programming, which is great for many use cases, but in practice is a bit limited. Ray extends the dataflow mod...
mathLab/RBniCS
tutorials/05_gaussian/tutorial_gaussian_exact.ipynb
lgpl-3.0
from dolfin import * from rbnics import * """ Explanation: TUTORIAL 05 - Exact Parametrized Functions for non-affine elliptic problems Keywords: exact parametrized functions 1. Introduction In this Tutorial, we consider steady heat conduction in a two-dimensional square domain $\Omega = (-1, 1)^2$. The boundary $\part...
nicolasfauchereau/ICU
indices/plot_real_time_indices.ipynb
bsd-3-clause
%matplotlib inline import os, sys import pandas as pd from datetime import datetime, timedelta from cStringIO import StringIO import requests import matplotlib as mpl from matplotlib import pyplot as plt from IPython.display import Image """ Explanation: Plots the NINO Sea Surface Temperature indices (data from th...
w4zir/ml17s
lectures/lec02-regression-single-variable.ipynb
mit
import pandas as pd from sklearn import linear_model import matplotlib.pyplot as plt # read data in pandas frame dataframe = pd.read_csv('datasets/house_dataset1.csv') # assign x and y x_feature = dataframe[['Size']] y_labels = dataframe[['Price']] # check data by printing first few rows dataframe.head() """ Explan...
mattilyra/gensim
docs/notebooks/annoytutorial.ipynb
lgpl-2.1
# pip install watermark %reload_ext watermark %watermark -v -m -p gensim,numpy,scipy,psutil,matplotlib """ Explanation: Similarity Queries using Annoy Tutorial This tutorial is about using the (Annoy Approximate Nearest Neighbors Oh Yeah) library for similarity queries with a Word2Vec model built with gensim. Why use ...
esa-as/2016-ml-contest
dagrha/KNN_submission_1_dagrha.ipynb
apache-2.0
import pandas as pd import numpy as np from sklearn import neighbors from sklearn import preprocessing from sklearn.model_selection import LeaveOneGroupOut import inversion import matplotlib.pyplot as plt import seaborn as sns %matplotlib inline """ Explanation: Facies classification using KNearestNeighbors <a rel=...
ES-DOC/esdoc-jupyterhub
notebooks/cas/cmip6/models/sandbox-1/atmos.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'cas', 'sandbox-1', 'atmos') """ Explanation: ES-DOC CMIP6 Model Properties - Atmos MIP Era: CMIP6 Institute: CAS Source ID: SANDBOX-1 Topic: Atmos Sub-Topics: Dynamical Core, Radiation, Turbulen...
konstantinstadler/country_converter
doc/country_converter_examples.ipynb
gpl-3.0
import country_converter as coco converter = coco.CountryConverter() """ Explanation: Country Converter The country converter (coco) is a Python package to convert country names into different classifications and between different naming versions. Internally it uses regular expressions to match country names. Install...
a301-teaching/a301_code
notebooks/ground_track.ipynb
mit
from a301utils.a301_readfile import download from a301lib.cloudsat import get_geo import glob import os from pathlib import Path import sys import json import numpy as np import h5py from matplotlib import pyplot as plt from mpl_toolkits.basemap import Basemap rad_file='MYD021KM.A2006303.2220.006.2012078143305.h5' g...
laisee/bitfinex
examples/Backtest.ipynb
mit
import sys sys.path.append('..') from bitfinex.backtest import data %pylab inline """ Explanation: Backtesting example This notebook assumes you have the bitfinex library installed End of explanation """ with open('quandl.key', 'r') as f: key = f.read().strip() data.Quandl.search('bitfinex') """ Explanation: fe...
pydata/xarray
doc/examples/monthly-means.ipynb
apache-2.0
%matplotlib inline import numpy as np import pandas as pd import xarray as xr import matplotlib.pyplot as plt """ Explanation: Calculating Seasonal Averages from Time Series of Monthly Means Author: Joe Hamman The data used for this example can be found in the xarray-data repository. You may need to change the path to...
edwardd1/phys202-2015-work
midterm/AlgorithmsEx03.ipynb
mit
%matplotlib inline from matplotlib import pyplot as plt import numpy as np from IPython.html.widgets import interact """ Explanation: Algorithms Exercise 3 Imports End of explanation """ def char_probs(s): """Find the probabilities of the unique characters in the string s. Parameters ---------- ...
Piezoid/pyGATB
samples/notebook.ipynb
agpl-3.0
from gatb import Graph graph = Graph('-in ../../DiscoSnp/test/large_test/discoRes_k_31_c_auto.h5') # chr1 with simulated variants graph help(graph) """ Explanation: pyGATB: presentation and usage bash git clone --recursive https://github.com/GATB/pyGATB cd pyGATB mkdir build &amp;&amp; cd build cmake . .. -DCMAKE_BU...
inncretech/datascience
projects/data_clean/notebook/blog_data-cleaning.ipynb
mit
import pandas as pd """ Explanation: <html> <body> <img src="logo.png"> <B><p style="text-align:center; color: blue; font-size: 30px "> Inncretech Project <br><br> <I style= "text-align:center;color:black; font-size: 20px"><B style = "color:red">Inn</B>ovation <B style = "color:red">Cre</B>ativit...
scidash/sciunit
docs/chapter4.ipynb
mit
!pip install -q sciunit """ Explanation: <a href="https://colab.research.google.com/github/scidash/sciunit/blob/master/docs/chapter4.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> Chapter 4. Example of RunnableModel and Backend (or back to Chapter ...
Chiroptera/QCThesis
notebooks/cuda sorting test.ipynb
mit
4e7*4/1024/1024 a=np.random.randint(0,1e4,1e6) dA = cuda.to_device(a) del a @cuda.reduce def argmax_gpu(a,b): if a >= b: return a else: return b %time a.max() %time argmax_gpu(dA) sorter = RadixSort(maxcount=dA.size, dtype=dA.dtype) dRes = sorter.argsort(dA) res = dRes.copy_to_host() a ...
xdze2/thermique_appart
drafts/Model03_old.ipynb
mit
filename = './results/model02results.csv' Ttuile = pd.read_csv( filename, index_col=0, parse_dates=True ) Ttuile.plot(figsize=(14, 5) ); plt.ylabel('T_tuile °C'); """ Explanation: Modèle 03 -old- Utilise le Model02 pour prédire la température intérieure de l'appartement <img src="images/sch_model03.jpg" width="500p...
metpy/MetPy
dev/_downloads/87fd6ee8be4ea1587fa2ad7f4206407a/Combined_plotting.ipynb
bsd-3-clause
import xarray as xr from metpy.cbook import get_test_data from metpy.plots import ContourPlot, ImagePlot, MapPanel, PanelContainer from metpy.units import units # Use sample NARR data for plotting narr = xr.open_dataset(get_test_data('narr_example.nc', as_file_obj=False)) """ Explanation: Combined Plotting Demonstra...
lyoung13/deep-learning-nanodegree
p4-language-translation/dlnd_language_translation.ipynb
mit
""" DON'T MODIFY ANYTHING IN THIS CELL """ import helper import problem_unittests as tests source_path = 'data/small_vocab_en' target_path = 'data/small_vocab_fr' source_text = helper.load_data(source_path) target_text = helper.load_data(target_path) """ Explanation: Language Translation In this project, you’re going...
enbanuel/phys202-2015-work
assignments/midterm/InteractEx06.ipynb
mit
%matplotlib inline import matplotlib.pyplot as plt import numpy as np from IPython.display import Image from IPython.html.widgets import interact, interactive, fixed """ Explanation: Interact Exercise 6 Imports Put the standard imports for Matplotlib, Numpy and the IPython widgets in the following cell. End of explan...
JJINDAHOUSE/deep-learning
transfer-learning/Transfer_Learning_Solution.ipynb
mit
from urllib.request import urlretrieve from os.path import isfile, isdir from tqdm import tqdm vgg_dir = 'tensorflow_vgg/' # Make sure vgg exists if not isdir(vgg_dir): raise Exception("VGG directory doesn't exist!") class DLProgress(tqdm): last_block = 0 def hook(self, block_num=1, block_size=1, total_s...
CompPhysics/MachineLearning
doc/pub/week35/ipynb/.ipynb_checkpoints/week35-checkpoint.ipynb
cc0-1.0
%matplotlib inline # Common imports import numpy as np import pandas as pd import matplotlib.pyplot as plt from IPython.display import display import os # Where to save the figures and data files PROJECT_ROOT_DIR = "Results" FIGURE_ID = "Results/FigureFiles" DATA_ID = "DataFiles/" if not os.path.exists(PROJECT_ROOT_...
marshal789/Lectures-On-Machine-Learning
Support Vector Machines/SVM.ipynb
mit
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns %matplotlib inline """ Explanation: Support Vector Machines Import Libraries End of explanation """ from sklearn.datasets import load_breast_cancer cancer = load_breast_cancer() """ Explanation: Get the Data Using the buil...
hongguangguo/shogun
doc/ipython-notebooks/clustering/GMM.ipynb
gpl-3.0
%pylab inline %matplotlib inline # import all Shogun classes from modshogun import * from matplotlib.patches import Ellipse # a tool for visualisation def get_gaussian_ellipse_artist(mean, cov, nstd=1.96, color="red", linewidth=3): """ Returns an ellipse artist for nstd times the standard deviation of this ...
drericstrong/Blog
20170106_DQ0TransformInPython.ipynb
agpl-3.0
import numpy as np import seaborn as sns import matplotlib.pyplot as plt %matplotlib inline # User configurable freq = 1/60 end_time = 180 v_peak = 220 step_size = 0.01 # Find the three-phase voltages v1 = [] v2 = [] v3 = [] thetas = 2 * np.pi * freq * np.arange(0,end_time,step_size) for ii, t in enumerate(thetas): ...
jellis18/enterprise
tests/data.ipynb
mit
% matplotlib inline %config InlineBackend.figure_format = 'retina' from __future__ import division import numpy as np import matplotlib.pyplot as plt from enterprise.pulsar import Pulsar import enterprise.signals.parameter as parameter from enterprise.signals import utils from enterprise.signals import signal_base f...
KirtoXX/Security_Camera
ssd_mobilenet/object_detection/object_detection_tutorial.ipynb
apache-2.0
import numpy as np import os import six.moves.urllib as urllib import sys import tarfile import tensorflow as tf import zipfile from collections import defaultdict from io import StringIO from matplotlib import pyplot as plt from PIL import Image """ Explanation: Object Detection Demo Welcome to the object detection ...
feststelltaste/software-analytics
demos/20181213_EuregJUG_Aachen/No Go Areas.ipynb
gpl-3.0
import pandas as pd log = pd.read_csv("../../../software-data/projects/linux/linux_blame_log.csv.gz") log.head() log.info() top10 = log['author'].value_counts().head(10) top10 %matplotlib inline top10.plot.pie(); """ Explanation: Versionskontrollsysteme sind eine unglaubliche Informationsquelle um Softwaresysteme...
sbenthall/bigbang
examples/experimental_notebooks/Analyze Senders.ipynb
agpl-3.0
%matplotlib inline """ Explanation: This notebook shows how BigBang can help you analyze the senders in a particular mailing list archive. First, use this IPython magic to tell the notebook to display matplotlib graphics inline. This is a nice way to display results. End of explanation """ import bigbang.mailman as ...
ndanielsen/dc_parking_violations_data
notebooks/Top 15 Violations by Revenue And Total for MD.ipynb
mit
dc_df = df[(df.rp_plate_state.isin(['MD']))] dc_fines = dc_df.groupby(['violation_code']).fine.sum().reset_index('violation_code') fine_codes_15 = dc_fines.sort_values(by='fine', ascending=False)[:15] top_codes = dc_df[dc_df.violation_code.isin(fine_codes_15.violation_code)] top_violation_by_state = top_codes.groupby...
wbinventor/openmc
examples/jupyter/mgxs-part-ii.ipynb
mit
import numpy as np import matplotlib.pyplot as plt plt.style.use('seaborn-dark') import openmoc import openmc import openmc.mgxs as mgxs import openmc.data from openmc.openmoc_compatible import get_openmoc_geometry %matplotlib inline """ Explanation: This IPython Notebook illustrates the use of the openmc.mgxs modu...
brandoncgay/deep-learning
gan_mnist/Intro_to_GANs_Exercises.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...
diging/tethne-notebooks
5. Co-citation analysis.ipynb
gpl-3.0
%pylab inline import matplotlib.pyplot as plt """ Explanation: Introduction to Tethne: Co-citation analysis In this workbook we will conduct a co-citation analysis using the approach outlined in Chen (2009). If you have used the Java-based desktop application CiteSpace II, this should be familiar: this is the same me...
AndreySheka/dl_ekb
hw6/Seminar 6 - segmentation.ipynb
mit
! wget https://www.dropbox.com/s/o8loqc5ih8lp2m9/weights.pkl?dl=0 ! wget https://www.dropbox.com/s/jy34yowcf85ydba/data.zip?dl=0 ! unzip -q data.zip import scipy as sp import scipy.misc import matplotlib.pyplot as plt import numpy as np %matplotlib inline """ Explanation: Seminar 6 - Neural networks for segmentation...
corochann/deep-learning-tutorial-with-chainer
src/04_cifar_cnn/image_processing_basic.ipynb
mit
import os import matplotlib.pyplot as plt import cv2 %matplotlib inline def readRGBImage(imagepath): image = cv2.imread(imagepath) # Height, Width, Channel (major, minor, _) = cv2.__version__.split(".") if major == '3': # version 3 is used, need to convert image = cv2.cvtColor(image, cv2...
ling7334/tensorflow-get-started
mnist/Getting_Started_With_TensorFlow.ipynb
apache-2.0
import tensorflow as tf """ Explanation: 开始使用Tensorflow 本教程帮助你使用TensorFlow编程, 开始之前,确保你安装了Tensorflow。使用 TensorFlow,你必须了解: * 如何使用Python编程。 * 至少了解数组的概念。 * 最好了解过机器学习。但不了解的话,本教程仍不失为一个很好的开始。 Tensorflow提供多种API。最底层API——Tensorflow核心——提供了完全的编程控制。我们建议机器学习研究人员以及需要精细控制他们模型的人使用Tensorflow核心。最高层API是建立在Tensorflow核心上的。这些高层API通常比Tensorf...
y2ee201/Deep-Learning-Nanodegree
my-experiments/reinforcement learning/Frozen Lake.ipynb
mit
import gym import tensorflow as tf from collections import deque import numpy as np from keras.models import Sequential from keras.layers import Dense from keras.optimizers import Adam from gym import wrappers import shutil shutil.rmtree('./monitor') env = gym.make('FrozenLake-v0') env = wrappers.Monitor(env,'./monito...
yy/dviz-course
m06-data/m06-lab.ipynb
mit
import pandas as pd pew_df = pd.read_csv('https://raw.githubusercontent.com/tidyverse/tidyr/4c0a8d0fdb9372302fcc57ad995d57a43d9e4337/vignettes/pew.csv') pew_df """ Explanation: Module 6: Data types and tidy data Tidy data Let's do some tidy exercise first. This is one of the non-tidy dataset assembled by Hadley Wickh...
cdt15/lingam
examples/RESIT.ipynb
mit
import numpy as np import pandas as pd import graphviz import lingam from lingam.utils import print_causal_directions, print_dagc, make_dot import warnings warnings.filterwarnings('ignore') print([np.__version__, pd.__version__, graphviz.__version__, lingam.__version__]) np.set_printoptions(precision=3, suppress=Tru...
ThunderShiviah/code_guild
interactive-coding-challenges/stacks_queues/queue_list/queue_list_challenge.ipynb
mit
class Node(object): def __init__(self, data): # TODO: Implement me pass class Queue(object): def __init__(self): # TODO: Implement me pass def enqueue(self, data): # TODO: Implement me pass def dequeue(self): # TODO: Implement me pass...
deepmind/dm_alchemy
examples/AlchemyGettingStarted.ipynb
apache-2.0
import os import matplotlib.pyplot as plt import numpy as np import seaborn as sns import dm_alchemy from dm_alchemy import io from dm_alchemy import symbolic_alchemy from dm_alchemy import symbolic_alchemy_bots from dm_alchemy import symbolic_alchemy_trackers from dm_alchemy import symbolic_alchemy_wrapper from dm_al...
saketkc/hatex
2015_Fall/MATH-578B/Homework5/Homework5.ipynb
mit
%matplotlib inline from __future__ import division import pandas as pd import matplotlib import itertools matplotlib.rcParams['figure.figsize'] = (16,12) import matplotlib.pyplot as plt import numpy as np np.random.seed(1) def propose(S): r = np.random.choice(len(S), 2) rs = np.sort(r) j,k=rs[0],rs[1] ...
statsmodels/statsmodels.github.io
v0.13.1/examples/notebooks/generated/discrete_choice_overview.ipynb
bsd-3-clause
import numpy as np import statsmodels.api as sm """ Explanation: Discrete Choice Models Overview End of explanation """ spector_data = sm.datasets.spector.load() spector_data.exog = sm.add_constant(spector_data.exog, prepend=False) """ Explanation: Data Load data from Spector and Mazzeo (1980). Examples follow Gree...
googlegenomics/datalab-examples
datalab/genomics/Explore 1000 Genomes Samples.ipynb
apache-2.0
import gcp.bigquery as bq samples_table = bq.Table('genomics-public-data:1000_genomes.sample_info') samples_table.schema """ Explanation: <!-- Copyright 2015 Google Inc. All rights reserved. --> <!-- Licensed under the Apache License, Version 2.0 (the "License"); --> <!-- you may not use this file except in complianc...
ueapy/ueapy.github.io
content/notebooks/2018-02-19-debugging-profiling.ipynb
mit
from IPython.core.debugger import set_trace """ Explanation: Today we went through some basic tools to inspect Python scripts for errors and performance bottlenecks. Debugging Python DeBugger (PDB) The standard Python tool for interactive debugging is pdb, the Python debugger. This debugger lets the user step throug...
Petr-By/qtpyvis
notebooks/caffe/train.ipynb
mit
solver = caffe.SGDSolver('mnist_solver.prototxt') solver.net.forward() niter = 2500 test_interval = 100 # losses will also be stored in the log train_loss = np.zeros(niter) test_acc = np.zeros(int(np.ceil(niter / test_interval))) output = np.zeros((niter, 8, 10)) # the main solver loop for it in range(niter): sol...
AllenDowney/ModSimPy
soln/throwingaxe_soln.ipynb
mit
# Configure Jupyter so figures appear in the notebook %matplotlib inline # Configure Jupyter to display the assigned value after an assignment %config InteractiveShell.ast_node_interactivity='last_expr_or_assign' # import functions from the modsim.py module from modsim import * """ Explanation: Modeling and Simulati...
xdze2/thermique_appart
drafts/get_sun_position.ipynb
mit
map_coords = (45.1973288, 5.7103223) #( 45.166672, 5.71667 ) import pysolar.solar as solar import datetime as dt d = dt.datetime.now() #d = dt.datetime(2017, 6, 20, 13, 30, 0, 130320) solar.get_altitude( *map_coords, d) solar.get_azimuth(*map_coords, d) Alt = [ solar.get_altitude(*map_coords, dt.datetime(2017, 12...
dolittle007/dolittle007.github.io
notebooks/GLM-poisson-regression.ipynb
gpl-3.0
## Interactive magics %matplotlib inline import sys import warnings warnings.filterwarnings('ignore') import re import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import patsy as pt from scipy import optimize # pymc3 libraries import pymc3 as pm import theano as thno import ...
weleen/mxnet
example/notebooks/basic/image_io.ipynb
apache-2.0
%matplotlib inline import os import subprocess import mxnet as mx import numpy as np import matplotlib.pyplot as plt # change this to your mxnet location MXNET_HOME = '/scratch/mxnet' """ Explanation: Image Data IO This tutorial explains how to prepare, load and train with image data in MXNet. All IO in MXNet is hand...
ES-DOC/esdoc-jupyterhub
notebooks/inm/cmip6/models/inm-cm4-8/ocean.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'inm', 'inm-cm4-8', 'ocean') """ Explanation: ES-DOC CMIP6 Model Properties - Ocean MIP Era: CMIP6 Institute: INM Source ID: INM-CM4-8 Topic: Ocean Sub-Topics: Timestepping Framework, Advection, ...
akshayrangasai/akshayrangasai.github.io
Blog Post Content/.ipynb_checkpoints/Airport Waiting Time-checkpoint.ipynb
mit
%matplotlib inline #Imports for solution import numpy as np import scipy.stats as sp from matplotlib.pyplot import * #Setting Distribution variables ##All rates are in per Minute. """ Explanation: Airport Wait Time Simulation End of explanation """ #Everything will me modeled as a Poisson Process SIM_TIME = 180 Q...
MaximMalakhov/coursera
Learning on marked data/Week 5/task_nn.ipynb
mit
# Выполним инициализацию основных используемых модулей %matplotlib inline import random import matplotlib.pyplot as plt from sklearn.preprocessing import normalize import numpy as np """ Explanation: В этом задании вы будете настраивать двуслойную нейронную сеть для решения задачи многоклассовой классификации. Предла...
Zhenxingzhang/AnalyticsVidhya
Articles/Parameter_Tuning_GBM_with_Example/GBM model.ipynb
apache-2.0
import pandas as pd import numpy as np from sklearn.ensemble import GradientBoostingClassifier from sklearn import cross_validation, metrics from sklearn.grid_search import GridSearchCV import matplotlib.pylab as plt %matplotlib inline from matplotlib.pylab import rcParams rcParams['figure.figsize'] = 12, 4 """ Expla...