repo_name
stringlengths
6
77
path
stringlengths
8
215
license
stringclasses
15 values
content
stringlengths
335
154k
thalesians/tsa
src/jupyter/python/pypeoutgoing.ipynb
apache-2.0
import os, sys sys.path.append(os.path.abspath('../../main/python')) import random import numpy as np import thalesians.tsa.pypes as pypes pype = pypes.Pype(pypes.Direction.OUTGOING, name='EXAMPLE', port=5758); pype """ Explanation: This Jupyter notebook should be used in conjunction with pypeincoming.ipynb. Run thr...
yongtang/tensorflow
tensorflow/lite/g3doc/examples/super_resolution/overview.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...
informatics-isi-edu/deriva-py
docs/derivapy-datapath-example-1.ipynb
apache-2.0
# Import deriva modules from deriva.core import ErmrestCatalog, get_credential # Connect with the deriva catalog protocol = 'https' hostname = 'www.facebase.org' catalog_number = 1 credential = get_credential(hostname) catalog = ErmrestCatalog(protocol, hostname, catalog_number, credential) """ Explanation: DataPath ...
vbarua/PythonWorkshop
Code/Introduction To Python/5 - Functions.ipynb
mit
def plus_one(x): return x + 1 plus_one(1) plus_one(2) """ Explanation: Functions Functions in Python (and other languages in general) are a way to package reusable chunks of code. You define a function using the def keyword. They can be simple End of explanation """ def do_math(x): return (x * 2.)/(x - 1.)...
IIPBC/Material
Notebooks/Python BootCamp 2017 - Your code pretty and healthy.ipynb
mit
import this """ Explanation: Your code pretty and healthy We all already had (or, at least, will have) the experience of getting to work with someone's piece of code and find it a nightmare to make it run, install, debug, etc. Sometimes this someone is our Past Selves that did not do a good job writing a code thinking...
GoogleCloudPlatform/mlops-on-gcp
immersion/kubeflow_pipelines/walkthrough/solutions/lab-01_vertex.ipynb
apache-2.0
!pip freeze | grep google-cloud-aiplatform || pip install google-cloud-aiplatform import os import time from google.cloud import aiplatform from google.cloud import bigquery import pandas as pd from sklearn.compose import ColumnTransformer from sklearn.linear_model import SGDClassifier from sklearn.pipeline import Pi...
csdms/coupling
docs/demos/child.ipynb
mit
from __future__ import print_function # Some magic to make plots appear within the notebook %matplotlib inline import numpy as np # In case we need to use numpy """ Explanation: CHILD Landscape Evolution Model Link to this notebook: https://github.com/csdms/pymt/blob/master/docs/demos/child.ipynb Install command: $...
IBMDecisionOptimization/tutorials
jupyter/Linear_Programming.ipynb
apache-2.0
import sys try: import cplex except: if hasattr(sys, 'real_prefix'): #we are in a virtual env. !pip install cplex else: !pip install --user cplex """ Explanation: Tutorial: Linear Programming, (CPLEX Part 1) This notebook gives an overview of Linear Programming (or LP). After comple...
planetlabs/notebooks
jupyter-notebooks/orders/tools_and_toolchains.ipynb
apache-2.0
import json import os import pathlib import time import numpy as np import rasterio from rasterio.plot import show import requests from requests.auth import HTTPBasicAuth # API Key stored as an env variable PLANET_API_KEY = os.getenv('PL_API_KEY') orders_url = 'https://api.planet.com/compute/ops/orders/v2' # set up...
jsub10/MLCourse
Notebooks/Learning-Curves.ipynb
mit
import numpy as np # Simulate a dataset containing one feature (and one target) # The feature values are contained in X # The target values are contained in y def make_data(N=100, err=0.8, rseed=1): # randomly sample the data rng = np.random.RandomState(rseed) X = rng.rand(N, 1) ** 2 y = 10 - 1. / (X.r...
GoogleCloudPlatform/training-data-analyst
courses/machine_learning/deepdive2/introduction_to_tensorflow/solutions/quickstart.ipynb
apache-2.0
# Install required packages. !pip install -q tensorflow-recommenders !pip install -q --upgrade tensorflow-datasets """ Explanation: Working with TensorFlow Recommenders: Quickstart Learning Objectives Read the data and build vocabularies. Define a model. Create and train a model. Introduction In this tutorial, you b...
dhiapet/PyMC3
docs/notebooks/getting_started.ipynb
apache-2.0
import numpy as np import matplotlib.pyplot as plt # Intialize random number generator np.random.seed(123) # True parameter values alpha, sigma = 1, 1 beta = [1, 2.5] # Size of dataset size = 100 # Predictor variable X1 = np.linspace(0, 1, size) X2 = np.linspace(0,.2, size) # Simulate outcome variable Y = alpha + ...
5agado/data-science-learning
data analysis/Pandas and Seaborn.ipynb
apache-2.0
# Load conversation messages msgs = pd.read_csv('test_conv.csv', parse_dates=['datetime']) # Display first 5 entries of our dataframe msgs.head() # Double check of types msgs.info() """ Explanation: Table of Contents Intro Data Loading Function Application Group-By and Aggregation Plotting Multi-Index Pivoting, St...
rueedlinger/python-snippets
http/beautifulsoup4.ipynb
mit
html_doc = """ <html><head><title>My new page</title></head> <body> <p class="title"><b>Cool my new page</b></p> <p class="story">I have written the following articles: <a href="http://foo.bar/A1" class="sister" id="link1">A1</a>, <a href="http://foo.bar/A2" class="sister" id="link2">A2</a> <a href="http://foo.bar/A3"...
oscarmore2/deep-learning-study
sentiment-rnn/Sentiment_RNN_Solution.ipynb
mit
import numpy as np import tensorflow as tf with open('../sentiment-network/reviews.txt', 'r') as f: reviews = f.read() with open('../sentiment-network/labels.txt', 'r') as f: labels = f.read() reviews[:2000] """ Explanation: Sentiment Analysis with an RNN In this notebook, you'll implement a recurrent neural...
darcamo/pyphysim
ipython_notebooks/METIS Simple Scenario 2.ipynb
gpl-2.0
%matplotlib widget # xxxxxxxxxx Add the parent folder to the python path. xxxxxxxxxxxxxxxxxxxx import sys import os sys.path.append('../') # xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx from matplotlib import pyplot as plt import numpy as np from ipywidgets.widgets import interact, intera...
gassantos/ML4Edatics
Relatorio-de-Aprendizado-de-Maquina-Trabalho2A.ipynb
gpl-3.0
import os import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import PolynomialFeatures # Carregando o pacote que contém a função de carregar arquivos Matlab from scipy.io import loadmat # Carregando o pacote que contém a função de minimizar uma Função Objetivo from sc...
ES-DOC/esdoc-jupyterhub
notebooks/nasa-giss/cmip6/models/giss-e2-1h/aerosol.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'nasa-giss', 'giss-e2-1h', 'aerosol') """ Explanation: ES-DOC CMIP6 Model Properties - Aerosol MIP Era: CMIP6 Institute: NASA-GISS Source ID: GISS-E2-1H Topic: Aerosol Sub-Topics: Transport, Emis...
feststelltaste/software-analytics
courses/python_pandas_basics/session0/DetectCrimesPresentation.ipynb
gpl-3.0
import pandas as pd cdr = pd.read_excel("cdr_data.xlsx") cdr.head() """ Explanation: Solving Crimes with Data Science <br/> <br/> <br/> <b>Markus Harrer</b> @feststelltaste <small>PyDay 1, 19. Dezember 2019</small> <img src="resources/innoq_logo.jpg" width=20% height="20%" align="right"/> Facts of the case a white bu...
Cyb3rWard0g/ThreatHunter-Playbook
docs/notebooks/windows/02_execution/WIN-190813181020.ipynb
gpl-3.0
from openhunt.mordorutils import * spark = get_spark() """ Explanation: Service Creation Metadata | | | |:------------------|:---| | collaborators | ['@Cyb3rWard0g', '@Cyb3rPandaH'] | | creation date | 2019/08/13 | | modification date | 2020/09/20 | | playbook related | [] | Hypothesis Ad...
geoneill12/phys202-2015-work
assignments/assignment05/InteractEx01.ipynb
mit
%matplotlib inline from matplotlib import pyplot as plt import numpy as np from IPython.html.widgets import interact, interactive, fixed from IPython.display import display from IPython.html import widgets """ Explanation: Interact Exercise 01 Import End of explanation """ def print_sum(a, b): c = a + b pri...
austinjalexander/sandbox
python/py/TextAnalytics/01_Acquire_Text.ipynb
mit
#Inspect the texts available in the built in gutenberg corpus from nltk.corpus import gutenberg fileids = gutenberg.fileids() print len(fileids), 'files' print fileids """ Explanation: NLTK Built In Corpora End of explanation """ #Inspect the raw text of the Alice in Wonderland text alice_raw = gutenberg.raw(fileids...
dsacademybr/PythonFundamentos
Cap04/Notebooks/DSA-Python-Cap04-02-Arquivos-Parte2.ipynb
gpl-3.0
# Versão da Linguagem Python from platform import python_version print('Versão da Linguagem Python Usada Neste Jupyter Notebook:', python_version()) """ Explanation: <font color='blue'>Data Science Academy - Python Fundamentos - Capítulo 4</font> Download: http://github.com/dsacademybr End of explanation """ texto =...
UWSEDS/LectureNotes
PreFall2018/Visualization-in-Depth/Visualization-in-depth.ipynb
bsd-2-clause
from bokeh.plotting import figure, output_file, show, output_notebook, vplot import random import numpy as np import pandas as pd output_notebook() # Use so see output in the Jupyter notebook import bokeh bokeh.__version__ """ Explanation: Visualization in Depth With Bokeh For details on bokeh, see http://bokeh.pyda...
GoogleCloudPlatform/vertex-ai-samples
notebooks/community/ml_ops/stage2/get_started_vertex_vizier.ipynb
apache-2.0
import os # The Vertex AI Workbench Notebook product has specific requirements IS_WORKBENCH_NOTEBOOK = os.getenv("DL_ANACONDA_HOME") IS_USER_MANAGED_WORKBENCH_NOTEBOOK = os.path.exists( "/opt/deeplearning/metadata/env_version" ) # Vertex AI Notebook requires dependencies to be installed with '--user' USER_FLAG = ...
alfkjartan/nvgimu
notebooks/Get started.ipynb
gpl-3.0
import numpy as np import matplotlib.pyplot as plt import nvg.ximu.ximudata as ximudata %matplotlib notebook """ Explanation: Getting started with the analysis of nvg data This notebook assumes that data exists in a database in the hdf5 format. For instructions how to set up the database with data see [../readme.md]. ...
csaladenes/csaladenes.github.io
present/mcc2/PythonDataScienceHandbook/05.02-Introducing-Scikit-Learn.ipynb
mit
import seaborn as sns iris = sns.load_dataset('iris') iris.head() """ Explanation: <!--BOOK_INFORMATION--> <img align="left" style="padding-right:10px;" src="figures/PDSH-cover-small.png"> This notebook contains an excerpt from the Python Data Science Handbook by Jake VanderPlas; the content is available on GitHub. Th...
cogeorg/black_rhino
examples/solow/Analyse_Solow.ipynb
gpl-3.0
solow_data = pd.read_csv('measurements/TestMeasurement.csv', index_col=0) """ Explanation: Analyse Solow The notebook can be used to analyse the output of the Solow model. End of explanation """ fig, ax = plt.subplots(nrows=1, ncols=1, figsize=(10,6)) ax.plot(solow_data.index, solow_data) ax.set_xlabel('Time', fon...
mne-tools/mne-tools.github.io
dev/_downloads/7b89f7dac105a44e25d2fbdd898b911f/vector_mne_solution.ipynb
bsd-3-clause
# Author: Marijn van Vliet <w.m.vanvliet@gmail.com> # # License: BSD-3-Clause import numpy as np import mne from mne.datasets import sample from mne.minimum_norm import read_inverse_operator, apply_inverse print(__doc__) data_path = sample.data_path() subjects_dir = data_path / 'subjects' smoothing_steps = 7 # Read...
desihub/desitarget
doc/nb/qso-dr8.ipynb
bsd-3-clause
%matplotlib inline import matplotlib.pyplot as plt import seaborn as sns; sns.set() import numpy as np import pandas as pd from pathlib import Path import astropy.table import astropy.io.fits as fits import astropy.coordinates import astropy.units as u from sklearn import ensemble, model_selection import desitarge...
mne-tools/mne-tools.github.io
stable/_downloads/a179627fc73cce931ace004638e9685c/read_inverse.ipynb
bsd-3-clause
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # # License: BSD-3-Clause import mne from mne.datasets import sample from mne.minimum_norm import read_inverse_operator from mne.viz import set_3d_view print(__doc__) data_path = sample.data_path() subjects_dir = data_path / 'subjects' meg_path = data_path /...
ramseylab/networkscompbio
class15_MCODE_python3_template.ipynb
apache-2.0
edge_list = """ Explanation: Run mcode on the adjacency list for your toy graph, with vwp=0.8 Load the Krogan et al. network edge-list data as a Pandas data frame End of explanation """ krogan_graph = krogan_graph.summary() """ Explanation: Make an igraph graph and print its summary End of explanation """ res =...
GoogleCloudPlatform/training-data-analyst
courses/machine_learning/feateng/ASL_2.0_bqml_feateng-REVIEW.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...
diegocavalca/Studies
deep-learnining-specialization/4. Convolutional Neural Networks/week3/Autonomous+driving+application+-+Car+detection+-+v3.ipynb
cc0-1.0
import argparse import os import matplotlib.pyplot as plt from matplotlib.pyplot import imshow import scipy.io import scipy.misc import numpy as np import pandas as pd import PIL import tensorflow as tf from keras import backend as K from keras.layers import Input, Lambda, Conv2D from keras.models import load_model, Mo...
MelroLeandro/Matematica-Discreta-para-Hackers
jpynb_source/Chapter2_Calculo_Proposicional/.ipynb_checkpoints/Chapter2_Calculo_Proposicional-checkpoint.ipynb
gpl-2.0
# # Tabela da Negação # for p in [True,False]: print('not',p,"=", not p) """ Explanation: Chapter 2 Lógica proposicional "Poder-se-á definir a Lógica como a ciência das regras que legitimam a utilização da palavra portanto." B. Ruyer in Logique. Proposição No caso das instruções if e while, a execução dum bloco...
rahulkgup/deep-learning-foundation
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...
lilleswing/deepchem
examples/tutorials/09_Advanced_Model_Training.ipynb
mit
!curl -Lo conda_installer.py https://raw.githubusercontent.com/deepchem/deepchem/master/scripts/colab_install.py import conda_installer conda_installer.install() !/root/miniconda/bin/conda info -e !pip install --pre deepchem import deepchem deepchem.__version__ """ Explanation: Tutorial Part 9: Advanced Model Trainin...
ES-DOC/esdoc-jupyterhub
notebooks/ncar/cmip6/models/sandbox-3/ocnbgchem.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'ncar', 'sandbox-3', 'ocnbgchem') """ Explanation: ES-DOC CMIP6 Model Properties - Ocnbgchem MIP Era: CMIP6 Institute: NCAR Source ID: SANDBOX-3 Topic: Ocnbgchem Sub-Topics: Tracers. Properties:...
dlsun/symbulate
labs/Lab 2 - Random Variables.ipynb
mit
from symbulate import * %matplotlib inline """ Explanation: Symbulate Lab 2 - Random Variables This Jupyter notebook provides a template for you to fill in. Read the notebook from start to finish, completing the parts as indicated. To run a cell, make sure the cell is highlighted by clicking on it, then press SHIFT ...
cmshobe/landlab
notebooks/tutorials/network_sediment_transporter/network_sediment_transporter.ipynb
mit
import warnings warnings.filterwarnings('ignore') import matplotlib.pyplot as plt import numpy as np from landlab.components import FlowDirectorSteepest, NetworkSedimentTransporter from landlab.data_record import DataRecord from landlab.grid.network import NetworkModelGrid from landlab.plot import graph from landlab.p...
scikit-rf/scikit-rf
doc/source/examples/networksets/Sorting Network Sets.ipynb
bsd-3-clause
from time import sleep import skrf as rf %matplotlib inline from pylab import * rf.stylely() !rm -rf tmp !mkdir tmp wg = rf.wr10 # just a dummy media object to generate data wg.frequency.npoints = 101 for k in range(10): # timestamp generated with `rf.now_string()` ntwk = wg.random(name=rf.now_string()+...
mne-tools/mne-tools.github.io
0.20/_downloads/638c39682b0791ce4e430e4d2fcc4c45/plot_tf_dics.ipynb
bsd-3-clause
# Author: Roman Goj <roman.goj@gmail.com> # # License: BSD (3-clause) import mne from mne.event import make_fixed_length_events from mne.datasets import sample from mne.time_frequency import csd_fourier from mne.beamformer import tf_dics from mne.viz import plot_source_spectrogram print(__doc__) data_path = sample.d...
ueapy/ueapy.github.io
content/notebooks/2017-09-25-numpy-intro.ipynb
mit
my_collection = [1, 4, 6, 10] my_collection.append(100000) my_collection.remove(1) my_collection[1] = 'abcdef' my_collection """ Explanation: Basic data containers in Python include high-level number objects: integer, floating point, complex, etc. containers: lists (costless insertion and append), dictionaries (f...
sysid/nbs
LP/Introduction-to-linear-programming/Introduction to Linear Programming with Python - Part 2.ipynb
mit
import pulp """ Explanation: Introduction to Linear Programming with Python - Part 2 Introduction to PuLP PuLP is an open source linear programming package for python. PuLP can be installed using pip, instructions here. In this notebook, we'll explore how to construct and solve the linear programming problem described...
samgoodgame/sf_crime
iterations/misc/Final_21_2348_AUG_17.ipynb
mit
# Basic libraries import time import numpy as np import pandas as pd # Modeling libraries and estimators from sklearn.neighbors import KNeighborsClassifier from sklearn import preprocessing from sklearn.preprocessing import MinMaxScaler from sklearn.preprocessing import StandardScaler from sklearn.naive_bayes import B...
annarev/tensorflow
tensorflow/python/ops/numpy_ops/g3doc/TensorFlow_NumPy_Text_Generation.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...
mansweet/GaussianLDA
Das Code Check.ipynb
apache-2.0
import numpy as np import os from operator import itemgetter from collections import Counter import scipy.stats as stat from gensim.models import Word2Vec from nltk import corpus """ Explanation: Comparing My Output to Das Java Output NIPS Dataset with 50 Topics End of explanation """ wvmodel = Word2Vec.load_word2ve...
cpatrickalves/simprev
notebooks/CalculoEstoqueMetodoProb.ipynb
gpl-3.0
import numpy as np n_segurados = 1000 prob = 0.35 # Lista que salva a quantidade de aposentados para cada cenário lista_nap = [] # Lista de seeds -> 50 cenários seeds = range(0,50) # Executa 50 cenários (seeds) diferentes for seed in seeds: # Define o seed para geração de números aleatórios np.random.seed(...
wmvanvliet/neuroscience_tutorials
mne-intro/expert.ipynb
bsd-2-clause
%matplotlib notebook # Import the MNE-Python module, which contains all the data analysis routines we need import mne print('MNE-Python imported.') # Configure the graphics engine from matplotlib import pyplot as plt plt.rc('figure', max_open_warning=100) %matplotlib notebook from mayavi import mlab # Mayavi is used...
MIREL-UNC/mirel-scripts
yago_scripts/Extended Ontology description and how its populated.ipynb
bsd-3-clause
CATEGORIES = [ "wordnet_association_108049401", "wordnet_authorization_101138670", "wordnet_ban_107255401", "wordnet_case_law_106535035", "wordnet_civil_liberty_113995662", "wordnet_code_of_conduct_105668095", "wordnet_common_law_108453722", "wordnet_company_108058098", "wordnet_cont...
agaveapi/SC17-container-tutorial
content/notebooks/06 - Packaging, publishing, and Portability.ipynb
bsd-3-clause
writefile("funwave-input.tpl",""" !INPUT FILE FOR FUNWAVE_TVD ! NOTE: all input parameter are capital sensitive ! --------------------TITLE------------------------------------- ! title only for log file TITLE = VESSEL ! -------------------HOT START--------------------------------- HOT_START = F FileNumber_HOTST...
pombredanne/https-gitlab.lrde.epita.fr-vcsn-vcsn
doc/notebooks/automaton.has_twins_property.ipynb
gpl-3.0
import vcsn q = vcsn.context('lal_char(ab), q') def std(e): return q.expression(e).standard() """ Explanation: automaton.has_twins_property Whether the automaton has the twins property. Sibling states: Two states $p$, $q$ are siblings if there exist two labels $x$ and $y$ such that $p$ and $q$ can be reached from...
johnnyliu27/openmc
examples/jupyter/post-processing.ipynb
mit
%matplotlib inline from IPython.display import Image import numpy as np import matplotlib.pyplot as plt import openmc """ Explanation: This notebook demonstrates some basic post-processing tasks that can be performed with the Python API, such as plotting a 2D mesh tally and plotting neutron source sites from an eigen...
hfoffani/deep-learning
autoencoder/Simple_Autoencoder.ipynb
mit
%matplotlib inline import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets('MNIST_data', validation_size=0) """ Explanation: A Simple Autoencoder We'll start off by building a simple autoencoder to compres...
eigendreams/TensorFlow-Tutorials
03_PrettyTensor.ipynb
mit
from IPython.display import Image Image('images/02_network_flowchart.png') """ Explanation: TensorFlow Tutorial #03 PrettyTensor by Magnus Erik Hvass Pedersen / GitHub / Videos on YouTube Introduction The previous tutorial showed how to implement a Convolutional Neural Network in TensorFlow, which required low-level k...
mbakker7/ttim
pumpingtest_benchmarks/8_test_of_hardinxveld_recovery.ipynb
mit
%matplotlib inline import numpy as np import matplotlib.pyplot as plt from ttim import * import pandas as pd """ Explanation: Recovery Test This test is taken from MLU examples. End of explanation """ H = 27 #aquifer thickness [m] zt = -10 #upper boundary of aquifer zb = zt - H rw = 0.155 #well screen radius [m] Q =...
karlstroetmann/Artificial-Intelligence
Python/3 Games/Game-Move-Ordering-Memoization.ipynb
gpl-2.0
gCache = {} """ Explanation: Utilities The global variable gCache is used as a cache for the function evaluate defined later. Instead of just storing the values for a given State, the cache stores pairs of the form * ('=', v), * ('≤', v), or * ('≥', v). The first component of these pairs is a flag that specifies wh...
darkomen/TFG
ipython_notebooks/06_regulador_experto/ensayo3.ipynb
cc0-1.0
#Importamos las librerías utilizadas import numpy as np import pandas as pd import seaborn as sns #Mostramos las versiones usadas de cada librerías print ("Numpy v{}".format(np.__version__)) print ("Pandas v{}".format(pd.__version__)) print ("Seaborn v{}".format(sns.__version__)) #Abrimos el fichero csv con los datos...
srcole/qwm
burrito/.ipynb_checkpoints/Burrito_California-checkpoint.ipynb
mit
%config InlineBackend.figure_format = 'retina' %matplotlib inline import numpy as np import scipy as sp import matplotlib.pyplot as plt import pandas as pd import seaborn as sns sns.set_style("white") """ Explanation: San Diego Burrito Analytics: Data characterization Scott Cole 21 May 2016 This notebook characteriz...
GoogleCloudPlatform/training-data-analyst
courses/machine_learning/deepdive2/structured/labs/3a_bqml_baseline_babyweight.ipynb
apache-2.0
%%bash pip freeze | grep google-cloud-bigquery==1.6.1 || \ pip install google-cloud-bigquery==1.6.1 """ Explanation: LAB 3a: BigQuery ML Model Baseline. Learning Objectives Create baseline model with BQML Evaluate baseline model Calculate RMSE of baseline model Introduction In this notebook, we will create a baseli...
tjwei/HackNTU_Data_2017
Week02/04-SVM.ipynb
mit
from PIL import Image import numpy as np %matplotlib inline import matplotlib import matplotlib.pyplot as plt from sklearn import datasets, svm, linear_model matplotlib.style.use('bmh') matplotlib.rcParams['figure.figsize']=(10,7) """ Explanation: Support Vector Machine End of explanation """ X = np.random.normal(5,...
ceos-seo/data_cube_notebooks
notebooks/vegetation/SAR/Vegetation_Change_S2.ipynb
apache-2.0
import sys import os sys.path.append(os.environ.get('NOTEBOOK_ROOT')) import warnings # Supress Warning warnings.filterwarnings('ignore') from datacube.utils.aws import configure_s3_access configure_s3_access(requester_pays=True) import utils.data_cube_utilities.data_access_api as dc_api api = dc_api.DataAccessAp...
octaflop/django_music
presentation/code_life.ipynb
mit
from IPython.display import HTML """ Explanation: How to be a Hacker End of explanation """ print('Hello') """ Explanation: Intros End of explanation """ HTML(""" <div style="width:100%;height:0;padding-bottom:56%;position:relative;"><iframe src="https://giphy.com/embed/eCqFYAVjjDksg" width="100%" height="100%" ...
Naereen/notebooks
Py_Pi_Day_2017.ipynb
mit
print(" pi ~= 3.14 (two first digits).") print(" pi ~= 22/7 = {} (two first digits).".format(22.0 / 7.0)) print(" pi ~= 355/113 = {} (six first digits).".format(355.0 / 113.0)) """ Explanation: Table of Contents <p><div class="lev1 toc-item"><a href="#Python-Pi-Day-2017" data-toc-modified-id="Python-Pi-Day-2017-1"><sp...
mne-tools/mne-tools.github.io
0.23/_downloads/9253528f5ba1c240d3397da64c84a625/90_phantom_4DBTi.ipynb
bsd-3-clause
# Authors: Alex Gramfort <alexandre.gramfort@inria.fr> # # License: BSD (3-clause) import os.path as op import numpy as np from mne.datasets import phantom_4dbti import mne """ Explanation: 4D Neuroimaging/BTi phantom dataset tutorial Here we read 4DBTi epochs data obtained with a spherical phantom using four differe...
SheffieldML/notebook
GPy/optimizer-implementation.ipynb
bsd-3-clause
# Get the parameters for Rprop of climin: climin.Rprop? class RProp(Optimizer): # We want the optimizer to know some things in the Optimizer implementation: def __init__(self, step_shrink=0.5, step_grow=1.2, min_step=1e-06, max_step=1, changes_max=0.1, *args, **kwargs): super(RProp, self).__init__(*arg...
ES-DOC/esdoc-jupyterhub
notebooks/cccma/cmip6/models/canesm5/ocnbgchem.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'cccma', 'canesm5', 'ocnbgchem') """ Explanation: ES-DOC CMIP6 Model Properties - Ocnbgchem MIP Era: CMIP6 Institute: CCCMA Source ID: CANESM5 Topic: Ocnbgchem Sub-Topics: Tracers. Properties: 6...
kidpixo/git_history_visualizer
git_history_test_git.ipynb
mit
import os path = os.getcwd() # put here the desired git repo path gt = ghv.git_history(path) gt.get_history() # new compact version gt = ghv.git_history(path, get_history=True) """ Explanation: Gather the data Githistoryvis exposes the class git_history. inizialization: python foo = git_history(PATH) sets the att...
turbomanage/training-data-analyst
courses/machine_learning/deepdive2/building_production_ml_systems/solutions/4b_streaming_data_inference.ipynb
apache-2.0
!pip install --user apache-beam[gcp] """ Explanation: Working with Streaming Data Learning Objectives 1. Learn how to process real-time data for ML models using Cloud Dataflow 2. Learn how to serve online predictions using real-time data Introduction It can be useful to leverage real time data in a machine learning ...
wuafeing/Python3-Tutorial
01 data structures and algorithms/01.08 calculating with dict.ipynb
gpl-3.0
prices = { "ACME" : 45.23, "AAPL" : 612.78, "IBM" : 205.55, "HPQ" : 37.20, "FB" : 10.75 } """ Explanation: Previous 1.8 字典的运算 问题 怎样在数据字典中执行一些计算操作(比如求最小值、最大值、排序等等)? 解决方案 考虑下面的股票名和价格映射字典: End of explanation """ min_price = min(zip(prices.values(), prices.keys())) print("min_price is:", min_price) ...
ernestyalumni/CompPhys
moreCUDA/samples02/sinsin2dtex.ipynb
apache-2.0
%matplotlib inline import matplotlib.pyplot as plt import csv ld = [ 1., 1.] WIDTH = 640 HEIGHT = 640 print WIDTH*HEIGHT hd = [ld[0]/(float(WIDTH)), ld[1]/(float(HEIGHT)) ] with open('sinsin2dtex_result.csv','r') as csvfile_result: plot_results = csv.reader(csvfile_result, delimiter=',') result_list = list(...
ShubhamDebnath/Coursera-Machine-Learning
Course 2/Regularization.ipynb
mit
# import packages import numpy as np import matplotlib.pyplot as plt from reg_utils import sigmoid, relu, plot_decision_boundary, initialize_parameters, load_2D_dataset, predict_dec from reg_utils import compute_cost, predict, forward_propagation, backward_propagation, update_parameters import sklearn import sklearn.da...
ES-DOC/esdoc-jupyterhub
notebooks/nerc/cmip6/models/sandbox-1/ocnbgchem.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'nerc', 'sandbox-1', 'ocnbgchem') """ Explanation: ES-DOC CMIP6 Model Properties - Ocnbgchem MIP Era: CMIP6 Institute: NERC Source ID: SANDBOX-1 Topic: Ocnbgchem Sub-Topics: Tracers. Properties:...
ahmadpgh/deepSimDEF
data/protein_protein_interaction_data_prepration.ipynb
mit
import pandas as pd import numpy as np import os import requests import easydict import linecache import pprint import random pp = pprint.PrettyPrinter(indent=4) """ Explanation: PPI Data Prepration<a id='top'></a> Sections:<br> 0) Description<br> 1) Importing Modules and Packages<br> 2) Configuration<br> 3) Loading ...
pastas/pastas
examples/notebooks/08_threshold_non_linear.ipynb
mit
import numpy as np import pandas as pd import matplotlib.pyplot as plt import pastas as pt pt.set_log_level('WARNING') pt.show_versions() ml = pt.io.load('data_notebook_8/B28H1804_2.pas') # the model is already solved, but we solve it again to be certain ml.solve(noise=False, report=False) # and we plot the results ml...
ctroupin/OceanData_NoteBooks
PythonNotebooks/PlatformPlots/plot_positions_latest_global.ipynb
gpl-3.0
datadir = "~/CMEMS_INSTAC/INSITU_GLO_NRT_OBSERVATIONS_013_030/latest/20151201/" %matplotlib inline import matplotlib.pyplot as plt import glob import os import netCDF4 import numpy as np """ Explanation: In this exercise we will plot all the data locations available for a given day in the latest directory of the glob...
JaviMerino/lisa
ipynb/tutorial/00_LisaInANutshell.ipynb
apache-2.0
import logging reload(logging) logging.basicConfig( format='%(asctime)-9s %(levelname)-8s: %(message)s', datefmt='%I:%M:%S') # Enable logging at INFO level logging.getLogger().setLevel(logging.INFO) # Execute this cell to enable verbose SSH commands logging.getLogger('ssh').setLevel(logging.DEBUG) # Other py...
SamLau95/nbinteract
packages/nbinteract-core/example-notebooks/ipywidgets_widget_list.ipynb
bsd-3-clause
import ipywidgets as widgets """ Explanation: Index - Back - Next Widget List End of explanation """ widgets.IntSlider( value=7, min=0, max=10, step=1, description='Test:', disabled=False, continuous_update=False, orientation='horizontal', readout=True, readout_format='d' ) "...
joommf/tutorial
workshops/Durham/tutorial3_dynamics.ipynb
bsd-3-clause
import oommfc as oc import discretisedfield as df %matplotlib inline # Define macro spin mesh (i.e. one discretisation cell). p1 = (0, 0, 0) # first point of the mesh domain (m) p2 = (1e-9, 1e-9, 1e-9) # second point of the mesh domain (m) cell = (1e-9, 1e-9, 1e-9) # discretisation cell size (m) mesh = oc.Mesh(p1=p...
tensorflow/docs
site/en/r1/tutorials/eager/eager_basics.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...
Caranarq/01_Dmine
Datasets/SNIIV/.ipynb_checkpoints/SNIIV-checkpoint.ipynb
gpl-3.0
descripciones = { 'P0405': 'Viviendas Verticales', 'P0406': 'Viviendas urbanas en PCU U1 y U2', 'P0411': 'Subsidios CONAVI' } # Librerias utilizadas import pandas as pd import sys import urllib import os import csv import zeep import requests from lxml import etree import xmltodict # Configuracion del sis...
Bio204-class/bio204-notebooks
Popn-Sample-and-SamplingDistn.ipynb
cc0-1.0
mu, sigma = 64, 8 popn = np.random.normal(loc=mu,scale=sigma, size=100000) truemu, truesigma = np.mean(popn), np.std(popn) s = \ """For the population of interest, the true mean is {} and the true standard deviation is {} """ print(s.format(truemu,truesigma)) """ Explanation: Population distribution Here is a popula...
AllenDowney/ProbablyOverthinkingIt
distribution.ipynb
mit
from __future__ import print_function, division %matplotlib inline %precision 6 import matplotlib.pyplot as plt import numpy as np from numpy.fft import fft, ifft from inspect import getsourcelines def show_code(func): lines, _ = getsourcelines(func) for line in lines: print(line, end='') """ Expl...
tlkh/Generating-Inference-from-3D-Printing-Jobs
Data Plots New.ipynb
mit
import numpy as np import csv %run 'preprocessor.ipynb' #our own preprocessor functions """ Explanation: Simple 2D Plots using Matplotlib Week 4 onwards (Term 2) Import dependencies End of explanation """ with open('/Users/timothy/Desktop/Files/data_new/merged.csv', 'r') as f: reader = csv.reader(f) data...
mauriciogtec/PropedeuticoDataScience2017
Alumnos/DiegoAEstradaRivera/Tarea 2.ipynb
mit
%matplotlib inline import matplotlib.pyplot as plt import numpy as np from PIL import Image # Recibir el path de la imagen y almacenarla en una variable en escala de grises imagen = Image.open('C:/Users/Diego/Pictures/Nintendo.png') imagen = imagen.convert('LA') # Convertir imagen en una matriz numérica matriz = np.a...
sprtkd/OpenHmnD
object/object_detection_tutorial.ipynb
mit
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 ...
excelsimon/AI
DeepLearning/3-ConvolutionalNeuralNetwork/2-DeepCNN_CaseStudy/KerasTutorial/Keras+-+Tutorial+-+Happy+House+v1.ipynb
mit
import numpy as np from keras import layers from keras.layers import Input, Dense, Activation, ZeroPadding2D, BatchNormalization, Flatten, Conv2D from keras.layers import AveragePooling2D, MaxPooling2D, Dropout, GlobalMaxPooling2D, GlobalAveragePooling2D from keras.models import Model from keras.preprocessing import im...
renatocoutinho/ode_examples
Chesson Lesson.ipynb
mit
%matplotlib notebook from numpy import * from scipy.integrate import odeint from matplotlib.pyplot import * ion() def consumer_resource1(y, t, r, K, b1, m1, b2, m2): return array([ y[0] * (r*(1-y[0]/K) - b1*y[1] - b2*y[2]), y[1] * (b1*y[0] - m1), y[2] * (b2*y[0] - m2)]) t = a...
IanHawke/orcomp-training
03-plotting-data.ipynb
mit
%matplotlib inline """ Explanation: Plotting There are many libraries for plotting in Python. The standard library is matplotlib. Its examples and gallery are particularly useful references. Matplotlib is most useful if you have data in numpy arrays. We can then plot standard single graphs straightforwardly: End of ex...
yvesdubief/UVM-ME249-CFD
.ipynb_checkpoints/ME249-Python-crash-course-checkpoint.ipynb
gpl-2.0
import math print("pi = %1.15f" %math.pi) print("pi = %1.15e" %math.pi) import numpy as np import scipy as scp print(" numpy pi = %1.15f" %np.pi) print(" scipy pi = %1.15f" %scp.pi) """ Explanation: <h1> Crash Course in Python</h1> Python is a powerful programming language that bears many similarities with matlab, ...
nwilbert/async-examples
notebook/aio34.ipynb
mit
import asyncio loop = asyncio.get_event_loop() """ Explanation: Simple I/O Loop Examples for Python 3.4 Create an event loop (which automatically becomes the default event loop in the context). End of explanation """ def hello_world(): print('Hello World!') loop.stop() loop.call_soon(hello_world) loop.run_f...
gregstarr/PyGPS
Examples/Rideout method TEC plots.ipynb
agpl-3.0
fig = plt.figure(figsize=(14,14)) tlim = 4000 minpoints = 3000 svs_with_pts_in_range = [i for i in data.items if(np.sum(np.logical_and.reduce( (data[data.labels[:tlim],i,'L1','data']>0, data[data.labels[:tlim],i,'L2','data']>0, data[data.labels[:tlim],i,'C1','data']>0,...
mne-tools/mne-tools.github.io
0.23/_downloads/e41b6a898e7a75f8a9f1a6c00ca73857/20_visualize_epochs.ipynb
bsd-3-clause
import os import mne sample_data_folder = mne.datasets.sample.data_path() sample_data_raw_file = os.path.join(sample_data_folder, 'MEG', 'sample', 'sample_audvis_raw.fif') raw = mne.io.read_raw_fif(sample_data_raw_file, verbose=False).crop(tmax=120) """ Explanation: Visualizing epo...
PMBio/scLVM
tutorials/tcell_demo.ipynb
apache-2.0
# activiate inline plotting %pylab inline # load modules import sys import scipy as SP import pylab as PL from matplotlib import cm import h5py import os #adjust path scLVM_BASE = './..' from scLVM import scLVM #sys.path.append(scLVM_BASE) #sys.path.append( scLVM_BASE +'..') #sys.path.append(scLVM_BASE + 'scLVM/utils...
musketeer191/job_analytics
filter_dups.ipynb
gpl-3.0
df = df.sort_values(['employer_name', 'doc']) print('# posts bf filtering dups: %d' %df.shape[0]) df.head(10) df = df.drop_duplicates(['employer_name', 'doc']) print('# posts after filtering dups: %d' %df.shape[0]) df.head(10) df = df.reset_index() df.head() df.to_csv(SKILL_DAT + 'uniq_doc_index.csv', index=False)...
cxxgtxy/tensorflow
tensorflow/python/ops/numpy_ops/g3doc/TensorFlow_Numpy_Distributed_Image_Classification.ipynb
apache-2.0
#@title Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under...
lo-co/atm-py
examples/instruments_POPS_peak.ipynb
mit
from atmPy.instruments.POPS import peaks,calibration %matplotlib inline hm.setRcParams(plt) from importlib import reload reload(peaks) """ Explanation: Introduction The main function of this module is to convert recored peak intensities to particle sizes and create a sizedistribution instance. Imports End of explana...
VectorBlox/PYNQ
Pynq-Z1/notebooks/examples/pmod_dac_adc.ipynb
bsd-3-clause
from pynq import Overlay from pynq.iop import Pmod_ADC, Pmod_DAC """ Explanation: DAC-ADC Pmod Examples using Matplotlib and Widget Contents Pmod DAC-ADC Feedback Tracking the IO Error Error plot with Matplotlib XKCD Plot Widget controlled plot Pmod DAC-ADC Feedback This example shows how to use the PmodDA4 DAC and ...
apozas/BIST-Python-Bootcamp
4_Numpy_Pandas.ipynb
gpl-3.0
import numpy as np import pandas as pd print('NumPy:', np.__version__) print('Pandas:', pd.__version__) """ Explanation: 4 NumPy and Pandas Introduction After getting used to how Python works, it is the moment to begin getting our hands dirty with data analysis. We will study two packages: NumPy is the fundamental num...
vicolab/neural-network-intro
1-regression/1-linear-regression.ipynb
mit
# Plots will be show inside the notebook %matplotlib notebook import matplotlib.pyplot as plt # NumPy is a package for manipulating N-dimensional array objects import numpy as np # Pandas is a data analysis package import pandas as pd import problem_unittests as tests """ Explanation: Outline <div class="alert ale...