repo_name
stringlengths
6
77
path
stringlengths
8
215
license
stringclasses
15 values
content
stringlengths
335
154k
turbomanage/training-data-analyst
courses/machine_learning/deepdive2/recommendation_systems/labs/als_bqml_hybrid.ipynb
apache-2.0
import os PROJECT = "your-project-id-here" # REPLACE WITH YOUR PROJECT ID # Do not change these os.environ["PROJECT"] = PROJECT %%bigquery --project $PROJECT SELECT processed_input, feature, TO_JSON_STRING(factor_weights), intercept FROM ML.WEIGHTS(MODEL movielens.recommender_16) WHERE (processed...
pombredanne/https-gitlab.lrde.epita.fr-vcsn-vcsn
doc/notebooks/automaton.sum.ipynb
gpl-3.0
import vcsn ctx = vcsn.context('lal_char, q') aut = lambda e: ctx.expression(e).standard() """ Explanation: automaton.sum(aut,algo="auto") Build an automaton whose behavior is the sum of the behaviors of the input automata. The algorithm has to be one of these: "auto": default parameter, same as "standard" if paramet...
mdeff/ntds_2017
projects/reports/lastfm_recommendation/Report.ipynb
mit
%load_ext autoreload %autoreload 1 import numpy as np import pickle import matplotlib.pyplot as plt import scipy as sp import pandas as pd import os.path import networkx as nx from scipy.sparse import csr_matrix from Dataset import Dataset from plots import * import os from helpers import * %matplotlib inline """ Exp...
mir-group/flare
docs/source/tutorials/aps_tutorial.ipynb
mit
! pip install --upgrade mir-flare """ Explanation: Introduction to FLARE: Fast Learning of Atomistic Rare Events Jonathan Vandermause (jonathan_vandermause@g.harvard.edu) <img src="https://github.com/mir-group/APS-2020-FLARE-Tutorial/blob/master/Tutorial_Images/flare_logo.png?raw=true" width="60%"> Learning objectives...
encima/Comp_Thinking_In_Python
3_Homework_Answers.ipynb
mit
is """ Explanation: When would 2 variables be equal but not have the same identity? When they have different addresses in memory What is the symbol for identity comparison? End of explanation """ num_wheels >= 1024 and num_wheels < 2456 """ Explanation: Which of the values below return True when used in the followi...
tensorflow/docs-l10n
site/pt-br/tutorials/text/word_embeddings.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...
mne-tools/mne-tools.github.io
dev/_downloads/81e58e463fcd949fd4ab7ab7ab8ef317/left_cerebellum_volume_source.ipynb
bsd-3-clause
# Author: Alan Leggitt <alan.leggitt@ucsf.edu> # # License: BSD-3-Clause import os.path as op import mne from mne import setup_source_space, setup_volume_source_space from mne.datasets import sample print(__doc__) data_path = sample.data_path() subjects_dir = op.join(data_path, 'subjects') subject = 'sample' aseg_f...
phoebe-project/phoebe2-docs
2.2/tutorials/logg.ipynb
gpl-3.0
!pip install -I "phoebe>=2.2,<2.3" """ Explanation: Surface Gravity (logg) Setup Let's first make sure we have the latest version of PHOEBE 2.2 installed. (You can comment out this line if you don't use pip for your installation or don't want to update to the latest release). End of explanation """ %matplotlib inlin...
gwulfs/research_public
lectures/pairs_trading/Pairs Trading.ipynb
apache-2.0
import numpy as np import pandas as pd import statsmodels from statsmodels.tsa.stattools import coint # just set the seed for the random number generator np.random.seed(107) import matplotlib.pyplot as plt """ Explanation: Researching a Pairs Trading Strategy By Delaney Granizo-Mackenzie Part of the Quantopian Lectu...
Automating-GIS-processes/2017
source/codes/Lesson3-point-in-polygon.ipynb
mit
from shapely.geometry import Point, Polygon # Create Point objects p1 = Point(24.952242, 60.1696017) p2 = Point(24.976567, 60.1612500) # Create a Polygon coords = [(24.950899, 60.169158), (24.953492, 60.169158), (24.953510, 60.170104), (24.950958, 60.169990)] poly = Polygon(coords) # Let's check what we have print(...
kit-cel/wt
mloc/ch5_Algorithm_Unfolding/Deep_MIMO_Detection.ipynb
gpl-2.0
import torch import torch.nn as nn import torch.optim as optim import numpy as np import matplotlib.pyplot as plt from matplotlib.pyplot import cm %matplotlib inline device = 'cuda' if torch.cuda.is_available() else 'cpu' print("We are using the following device for learning:",device) """ Explanation: Deep MIMO Dete...
pastas/pastas
examples/notebooks/10_multiple_wells.ipynb
mit
import numpy as np import pandas as pd import pastas as ps import matplotlib.pyplot as plt ps.show_versions() """ Explanation: Adding Multiple Wells This notebook shows how a WellModel can be used to fit multiple wells with one response function. The influence of the individual wells is scaled by the distance to the ...
Chipe1/aima-python
vacuum_world.ipynb
mit
from agents import * from notebook import psource """ Explanation: THE VACUUM WORLD In this notebook, we will be discussing the structure of agents through an example of the vacuum agent. The job of AI is to design an agent program that implements the agent function: the mapping from percepts to actions. We assume thi...
jphall663/bellarmine_py_intro
python_tricks.ipynb
apache-2.0
type(4/2) # float type(4//2) # int, double slash performs integer division """ Explanation: Python Tricks License Copyright (c) 2017 by Patrick Hall, jpatrickhall@gmail.com 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 ...
yoheikikuta/arxiv_summary_translation
arxiv_translator.ipynb
mit
import os from modules.DataArxiv import get_date from modules.DataArxiv import execute_query from modules.Translate import Translate """ Explanation: Arxiv summary auto translation Set up import modules. End of explanation """ CREDENTIALS_JSON = "credentials.json" CREDENTIALS_PATH = os.path.normpath( os.path.j...
AEW2015/PYNQ_PR_Overlay
Pynq-Z1/notebooks/Video_PR/Lines_Filter.ipynb
bsd-3-clause
from pynq.drivers.video import HDMI from pynq import Bitstream_Part from pynq.board import Register from pynq import Overlay Overlay("demo.bit").download() """ Explanation: Don't forget to delete the hdmi_out and hdmi_in when finished Lines Filter Example In this notebook, we will create a box formed of four lines on...
mariusvniekerk/bayes_logistic
notebooks/bayeslogistic_demo.ipynb
bsd-3-clause
# import bayes_logistic import bayes_logistic as bl #------------------------------------------------------------------------------------- # These are imported for use within the notebook. # bayeslogistic imports numpy and scipy.optimize automatically import numpy as np import matplotlib.pyplot as plt %matplotlib inl...
minesh1291/Practicing-Kaggle
zillow2017/H2Opy_v0.ipynb
gpl-3.0
import h2o import time,os %matplotlib inline #IMPORT ALL THE THINGS import matplotlib.pyplot as plt import numpy as np import pandas as pd from h2o.estimators.deeplearning import H2OAutoEncoderEstimator, H2ODeepLearningEstimator from h2o.estimators.gbm import H2OGradientBoostingEstimator fro...
tiagoantao/biopython-notebook
notebooks/18 - KEGG.ipynb
mit
!wget http://rest.kegg.jp/get/ec:5.4.2.2 -O ec_5.4.2.2.txt from Bio.KEGG import Enzyme records = Enzyme.parse(open("ec_5.4.2.2.txt")) record = list(records)[0] record.classname record.entry """ Explanation: KEGG KEGG (http://www.kegg.jp/) is a database resource for understanding high-level functions and utilities...
amcdawes/QMlabs
Simulating measurements.ipynb
mit
import matplotlib.pyplot as plt from numpy import sqrt,pi,cos,sin,arange,random,real,imag from qutip import * %matplotlib inline """ Explanation: Measurement simulation A way to simulate data from measurements of a specific quantum state. Start with standard imports: End of explanation """ H = Qobj([[1],[0]]) V = Qo...
pydata/xarray
doc/examples/multidimensional-coords.ipynb
apache-2.0
%matplotlib inline import numpy as np import pandas as pd import xarray as xr import cartopy.crs as ccrs from matplotlib import pyplot as plt """ Explanation: Working with Multidimensional Coordinates Author: Ryan Abernathey Many datasets have physical coordinates which differ from their logical coordinates. Xarray pr...
YuriyGuts/kaggle-quora-question-pairs
notebooks/feature-lda.ipynb
mit
from pygoose import * from gensim.corpora import Dictionary from gensim.models import LdaMulticore from nltk.stem import SnowballStemmer from sklearn.metrics.pairwise import cosine_distances, euclidean_distances """ Explanation: Feature: LDA Topic Distances Train a Latent Dirichlet Allocation model with 300 topics ...
Kaggle/learntools
notebooks/sql_advanced/raw/tut4.ipynb
apache-2.0
#$HIDE_INPUT$ from google.cloud import bigquery from time import time client = bigquery.Client() def show_amount_of_data_scanned(query): # dry_run lets us see how much data the query uses without running it dry_run_config = bigquery.QueryJobConfig(dry_run=True) query_job = client.query(query, job_config=d...
brettavedisian/phys202-2015-work
assignments/assignment03/NumpyEx04.ipynb
mit
import numpy as np %matplotlib inline import matplotlib.pyplot as plt import seaborn as sns """ Explanation: Numpy Exercise 4 Imports End of explanation """ import networkx as nx K_5=nx.complete_graph(5) nx.draw(K_5) """ Explanation: Complete graph Laplacian In discrete mathematics a Graph is a set of vertices or n...
epidataio/epidata-community
ipython/home/tutorials/1. Getting Started Tutorial.ipynb
apache-2.0
#from epidata.context import ec from datetime import datetime, timedelta import pandas as pd import matplotlib.pyplot as plt """ Explanation: <h1 style="text-align:center;text-decoration: underline">Getting Started Tutorial</h1> <h1>Overview</h1> <p>Welcome to the getting started tutorial for EpiData's Jupyter Noteboo...
kubeflow/fairing
examples/train_job_api/main.ipynb
apache-2.0
%%writefile train.py print("hello world!") job = TrainJob("train.py", backend=KubeflowGKEBackend()) job.submit() """ Explanation: Executing a python file End of explanation """ def train(): print("simple train job!") job = TrainJob(train, backend=KubeflowGKEBackend()) job.submit() """ Explanation: Executing a...
mne-tools/mne-tools.github.io
0.23/_downloads/a3f6a5e6550d5cc477c48007e697532b/ems_filtering.ipynb
bsd-3-clause
# Author: Denis Engemann <denis.engemann@gmail.com> # Jean-Remi King <jeanremi.king@gmail.com> # # License: BSD (3-clause) import numpy as np import matplotlib.pyplot as plt import mne from mne import io, EvokedArray from mne.datasets import sample from mne.decoding import EMS, compute_ems from sklearn.model_...
keras-team/keras-io
guides/ipynb/intro_to_keras_for_engineers.ipynb
apache-2.0
import numpy as np import tensorflow as tf from tensorflow import keras """ Explanation: Introduction to Keras for Engineers Author: fchollet<br> Date created: 2020/04/01<br> Last modified: 2020/04/28<br> Description: Everything you need to know to use Keras to build real-world machine learning solutions. Setup End of...
YeEmrick/learning
cs231/assignment/assignment2/Dropout.ipynb
apache-2.0
# As usual, a bit of setup from __future__ import print_function import time import numpy as np import matplotlib.pyplot as plt from cs231n.classifiers.fc_net import * from cs231n.data_utils import get_CIFAR10_data from cs231n.gradient_check import eval_numerical_gradient, eval_numerical_gradient_array from cs231n.solv...
banneker-aztlan/python-week-2
Part 2/galaxy_phot.ipynb
mit
# only necessary if you're running Python 2.7 or lower from __future__ import print_function from __builtin__ import range """ Explanation: Simulating Galaxy Observations: Photometry In this exercise, I want to focus on getting comfortable with a few core packages: matplotlib (the default plotting utility), numpy (use...
ShubhamDebnath/Coursera-Machine-Learning
Course 2/Gradient Checking v1.ipynb
mit
# Packages import numpy as np from testCases import * from gc_utils import sigmoid, relu, dictionary_to_vector, vector_to_dictionary, gradients_to_vector """ Explanation: Gradient Checking Welcome to the final assignment for this week! In this assignment you will learn to implement and use gradient checking. You are ...
mcc-petrinets/formulas
spot/tests/python/_altscc.ipynb
mit
from IPython.display import display import spot spot.setup(show_default='.bas') spot.automaton(''' HOA: v1 States: 2 Start: 0&1 AP: 2 "a" "b" acc-name: Buchi Acceptance: 1 Inf(0) --BODY-- State: 0 [0] 0 [!0] 1 State: 1 [1] 1 {0} --END-- ''') """ Explanation: These examples are tests for scc_info on alternating automa...
leoferres/prograUDD
labs/20.ejercicio_dict1.ipynb
mit
letras = {"A" : (1,12) , "B" : (3,2) , "C" : (3,4), "D" : (2,5), "E" : (1,12), "F" : (4,1), "G" : (2,2) , "H" : (4,2) , "I" : (1,6), "J" : (8,1), "L" : (1,4), "M" : (3,2), "N" : (1,5) , "O" : (1,9) , "P" : (3,2), "Q" : (5,1), "R" : (1,5), "S" : (1,6), "T" : (1,4) , "U" : (1,5) , "V" : (4,1...
amitkaps/applied-machine-learning
Module-03c-Model-Evaluation.ipynb
mit
import pandas as pd import numpy as np import matplotlib.pyplot as plt %matplotlib inline plt.style.use('fivethirtyeight') df = pd.read_csv('data/historical_loan.csv') df.head() """ Explanation: Model Evaluation End of explanation """ df.years = df.years.fillna(np.mean(df.years)) #Load the preprocessing module fr...
Vvkmnn/books
AutomateTheBoringStuffWithPython/lesson45.ipynb
gpl-3.0
import docx """ Explanation: Lesson 45: Reading and Editing Word Documents Python can also be used to create and modify Word documents. The python-docx module can interact with Word document files, with .docx filetypes. While the module is installed via python-docx, it is imported with docx. End of explanation """ ...
ES-DOC/esdoc-jupyterhub
notebooks/thu/cmip6/models/sandbox-1/atmoschem.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'thu', 'sandbox-1', 'atmoschem') """ Explanation: ES-DOC CMIP6 Model Properties - Atmoschem MIP Era: CMIP6 Institute: THU Source ID: SANDBOX-1 Topic: Atmoschem Sub-Topics: Transport, Emissions Co...
iannesbitt/ml_bootcamp
Python-for-Data-Analysis/Pandas/Merging, Joining, and Concatenating .ipynb
mit
import pandas as pd df1 = pd.DataFrame({'A': ['A0', 'A1', 'A2', 'A3'], 'B': ['B0', 'B1', 'B2', 'B3'], 'C': ['C0', 'C1', 'C2', 'C3'], 'D': ['D0', 'D1', 'D2', 'D3']}, index=[0, 1, 2, 3]) df2 = pd.DataFrame({'A': ['A4', 'A5',...
kaushik94/tardis
docs/models/examples/.ipynb_checkpoints/Custom_Density_And_Boundary_Velocities-checkpoint.ipynb
bsd-3-clause
import tardis import matplotlib.pyplot as plt import numpy as np """ Explanation: Specifying boundary velocities in addition to a custom density file This notebook will go through multiple detailed examples of how to properly run TARDIS with a custom ejecta profile specified by a custom density file and a custom abund...
tkzeng/molecular-design-toolkit
moldesign/_notebooks/Example 3. Simulating a crystal structure.ipynb
apache-2.0
%matplotlib inline from matplotlib.pyplot import * import moldesign as mdt from moldesign import units as u """ Explanation: <span style="float:right"> <a href="http://moldesign.bionano.autodesk.com/" target="_blank" title="About">About</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="https://forum.bionano.autodesk.c...
crowd-course/datascience
5-classification/5.4.2 - Peeking Inside a Neural Network with MNIST Data.ipynb
mit
import pandas as pd import numpy as np from sknn.mlp import Classifier, Layer from sklearn.datasets import fetch_mldata from sklearn.utils import shuffle %matplotlib inline import matplotlib.pyplot as plt from matplotlib import cm plt.rcParams['figure.figsize'] = (10, 10) """ Explanation: Peeking Inside a Neural Netw...
seg/2016-ml-contest
MandMs/04_faciesClassification_MandMs_featureEngineering_v2.ipynb
apache-2.0
# for training data # import data and filling missing PE values with average filename = 'facies_vectors.csv' train_data = pd.read_csv(filename) train_data['PE'].fillna((train_data['PE'].mean()), inplace=True) print np.shape(train_data) train_data['PE'].fillna((train_data['PE'].mean()), inplace=True) print np.shape(...
pablormier/yabox
notebooks/yabox-vs-scipy-de.ipynb
apache-2.0
%matplotlib inline import matplotlib.pyplot as plt import sys from time import time # Load Yabox (from local) # Comment this line to use the installed version sys.path.insert(0, '../') import yabox as yb import scipy as sp import numpy as np # Import the DE implementations from yabox.algorithms import DE, PDE from ...
keylime1/courses_12-752
projects/avanig_ndirks/Final Project_avanig_ndirks.ipynb
mit
import numpy as np import matplotlib.pyplot as plt import datetime as dt from operator import itemgetter import math %matplotlib inline """ Explanation: Avani Goyal, Nathaniel Dirks : 12752 : Final Project Due: 12/13/2015 End of explanation """ f= open('recs2009_public.csv','r') datanames = np.genfromtxt(f,delimiter...
godfreyduke/deep-learning
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...
GoogleCloudPlatform/training-data-analyst
quests/bq-teradata/02_teradata_bq_sql_translation/solution/teradata_bq_sql_translation.ipynb
apache-2.0
!bq head -n 5 --selected_fields rental_id,duration,bike_id,end_date,end_station_id,start_date,start_station_id bigquery-public-data:london_bicycles.cycle_hire """ Explanation: Teradata to BigQuery SQL Translation Introduction Both BigQuery and Teradata Database conform to the ANSI/ISO SQL:2011 standard. In addition, ...
turbomanage/training-data-analyst
courses/machine_learning/deepdive2/structured/labs/1b_prepare_data_babyweight.ipynb
apache-2.0
%%bash sudo pip freeze | grep google-cloud-bigquery==1.6.1 || \ sudo pip install google-cloud-bigquery==1.6.1 """ Explanation: LAB 2b: Prepare babyweight dataset. Learning Objectives Setup up the environment Preprocess natality dataset Augment natality dataset Create the train and eval tables in BigQuery Export data...
StevenPeutz/myDataProjects
PyCon_2018/PyCon 2018/StevenPyCon2018 Exercise(Pandas).ipynb
cc0-1.0
import pandas as pd %matplotlib inline import matplotlib.pyplot as plt import os cwd = os.getcwd() print(cwd) ls ../ """ Explanation: PyCon 2018 workshop by Kevin Markham (founder of dataschool.io) End of explanation """ df = pd.read_csv('../police.csv') """ Explanation: 'Stanford Open Policing Project' // d...
jennybrown8/python-notebook-coding-intro
lesson8exercises.ipynb
apache-2.0
children = ["sally", "jenny", "latoya", "atalia", "yu"] """ Explanation: Lesson 8: String Processing The following exercises let you practice on string processing. You'll need the lesson page open for examples since there are too many to list here. I've linked to the python string functions (string methods) just b...
mne-tools/mne-tools.github.io
0.12/_downloads/plot_stats_spatio_temporal_cluster_sensors.ipynb
bsd-3-clause
# Authors: Denis Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable from mne.viz import plot_topomap import mne from mne.stats import spatio_temporal_cluster_test from mne.datasets import sample fro...
ZhangXinNan/tensorflow
tensorflow/contrib/eager/python/examples/notebooks/automatic_differentiation.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...
gardenermike/deep-learning
sentiment-rnn/Sentiment RNN.ipynb
mit
import numpy as np import tensorflow as tf with open('./reviews.txt', 'r') as f: reviews = f.read() with open('./labels.txt', 'r') as f: labels = f.read() reviews[:2000] """ Explanation: Sentiment Analysis with an RNN In this notebook, you'll implement a recurrent neural network that performs sentiment analy...
btq/citi_bike
CitiBike_01_Read_Explore.ipynb
mit
#Station information station_status_url = 'http://www.citibikenyc.com/stations/json' resp=requests.get(station_status_url) resp.json().keys() resp.json()['stationBeanList'][0] station_info = pd.DataFrame(resp.json()['stationBeanList']) station_info.head(2) filename = 'data/201501-citibike-tripdata.zip' with zipfile....
arcyfelix/Courses
18-11-22-Deep-Learning-with-PyTorch/Final Lab/Image Classifier Project.ipynb
apache-2.0
# Imports here import numpy as np import matplotlib.pyplot as plt import torch import torch.optim as optim from torch import nn from torch.utils.data.sampler import SubsetRandomSampler from torch.utils.data.dataloader import DataLoader import torchvision.transforms as transforms import torchvision.datasets import to...
seg/2016-ml-contest
MandMs/03_Facies_classification_MandMs_feature_engineering_derivatives_moments_glcms.ipynb
apache-2.0
# import data and filling missing PE values with average filename = 'facies_vectors.csv' training_data = pd.read_csv(filename) training_data['PE'].fillna((training_data['PE'].mean()), inplace=True) print np.shape(training_data) training_data['PE'].fillna((training_data['PE'].mean()), inplace=True) print np.shape(tr...
lahdo/sentence-suggester
back-end/notebooks/.ipynb_checkpoints/gensim1-checkpoint.ipynb
mit
raw_corpus = ["Human machine interface for lab abc computer applications", "A survey of user opinion of computer system response time", "The EPS user interface management system", "System and human system engineering testing of EPS", "Relation of user pe...
tatsuya-ogawa/udacity-deep-learning
image-classification/dlnd_image_classification.ipynb
mit
""" DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE """ from urllib.request import urlretrieve from os.path import isfile, isdir from tqdm import tqdm import problem_unittests as tests import tarfile cifar10_dataset_folder_path = 'cifar-10-batches-py' # Use Floyd's cifar-10 dataset if present floyd_cifar10...
kit-cel/wt
mloc/ch4_Autoencoders/Autoencoder_Compression_Binarizer_simple.ipynb
gpl-2.0
import torch import torch.nn as nn import torch.optim as optim import torchvision import numpy as np from matplotlib import pyplot as plt device = 'cuda' if torch.cuda.is_available() else 'cpu' print("We are using the following device for learning:",device) """ Explanation: Image Compression using Autoencoders with B...
vicente-gonzalez-ruiz/YAPT
02-basics/09-OOP.ipynb
cc0-1.0
class A: pass """ Explanation: Object Oriented Programming Objects are structures which contain data (attributes) and code (hold by methods). In Python everything is an object, so, objects can contain other objects and methods. 1. Defining a class End of explanation """ class A(object): pass """ Explanation...
baliga-lab/GGBWeb
docs/ggbweb_usecase_bbb.ipynb
mit
from query.egrin2_query import * # connect to the egrin 2.0 database host = "primordial" port = 27017 db = "eco_db" client = MongoClient( 'mongodb://'+ host +':'+ str( port )+'/' ) """ Explanation: Introducing GGBweb ...for Baligans... (that means EGRIN 2.0) GGBweb Highlights <u>Interact</u> with data on a genome-sc...
mansweet/GaussianLDA
Data Prep.ipynb
apache-2.0
from __future__ import division import numpy as np from sklearn import datasets import random import pprint from scipy import stats as stat import nltk from operator import itemgetter from gensim.models import Word2Vec from nltk.tokenize import word_tokenize from sklearn.cluster import KMeans import FastGaussianLDA2 ...
Naereen/notebooks
agreg/Algorithme_genetique_pour_generer_des_eclairages_modelisation_agreg.ipynb
mit
graphe1 = [(1,3), (3,2), (2,4), (2,6), (2,7), (4,5), (5,6), (6,7), (6,9), (7,8), (8,9)] graphe1 = [ (u-1, v-1) for (u,v) in graphe1 ] def nbsommets(graphe): n = 0 for (u, v) in graphe: if u > n or v > n: n = max(u, v) return n + 1 nbsommets(graphe1) """ Explanation: Table of Contents <p><div clas...
kaleoyster/nbi-data-science
Bridge Life-Cycle Models/CDF+Probability+Reconstruction+vs+Age+of+Bridges+in+the+Southeast+United+States.ipynb
gpl-2.0
import pymongo from pymongo import MongoClient import time import pandas as pd import numpy as np import seaborn as sns from matplotlib.pyplot import * import matplotlib.pyplot as plt import folium import datetime as dt import random as rnd import warnings import datetime as dt import csv %matplotlib inline """ Explan...
ltiao/notebooks
calculating-kl-divergence-in-closed-form-versus-monte-carlo-estimation.ipynb
mit
%matplotlib notebook import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from scipy.stats import norm from keras import backend as K from keras.layers import (Input, Activation, Dense, Lambda, Layer, add, multiply) from keras.models import Model, S...
SylvainCorlay/ipywidgets
docs/source/examples/Output Widget.ipynb
bsd-3-clause
import ipywidgets as widgets """ Explanation: Index - Back - Next Output widgets: leveraging Jupyter's display system End of explanation """ out = widgets.Output(layout={'border': '1px solid black'}) out """ Explanation: The Output widget can capture and display stdout, stderr and rich output generated by IPython. ...
rjenc29/numerical
tensorflow/genadv1.ipynb
mit
import tensorflow as tf import numpy as np import matplotlib.pyplot as plt from scipy.stats import norm %matplotlib inline """ Explanation: Generative Adversarial Nets Training a generative adversarial network to sample from a Gaussian distribution. This is a toy problem, takes < 3 minutes to run on a modest 1.2GHz CP...
biolink/ontobio
notebooks/Phenotype_Enrichment.ipynb
bsd-3-clause
## Parse ids from file file = open("data/rp-genes.tsv", "r") gene_ids = [row.split("\t")[0] for row in file] ## show first 10 IDs: gene_ids[:10] ## Create an ontology factory in order to fetch HPO from ontobio.ontol_factory import OntologyFactory ofactory = OntologyFactory() ont = ofactory.create("hp") ## Load HP. ...
ES-DOC/esdoc-jupyterhub
notebooks/csiro-bom/cmip6/models/access-1-0/atmos.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'csiro-bom', 'access-1-0', 'atmos') """ Explanation: ES-DOC CMIP6 Model Properties - Atmos MIP Era: CMIP6 Institute: CSIRO-BOM Source ID: ACCESS-1-0 Topic: Atmos Sub-Topics: Dynamical Core, Radia...
jonathanmorgan/msu_phd_work
methods/data_creation/2016.12.10-work_log-prelim_month-single_name_match_error.ipynb
lgpl-3.0
import datetime print( "packages imported at " + str( datetime.datetime.now() ) ) %pwd """ Explanation: 2016.12.10 - work log - prelim_month - single name match error <h1>Table of Contents<span class="tocSkip"></span></h1> <div class="toc"><ul class="toc-item"><li><span><a href="#Table-of-Contents" data-toc-modified...
brettavedisian/Liquid-Crystals-Summer-2015
Nematic/Annulus_Simple_Matplotlib.ipynb
mit
# commands for plotting, "plot" works with matplotlib def mesh2triang(mesh): xy = mesh.coordinates() return tri.Triangulation(xy[:, 0], xy[:, 1], mesh.cells()) def mplot_cellfunction(cellfn): C = cellfn.array() tri = mesh2triang(cellfn.mesh()) return plt.tripcolor(tri, facecolors=C) def mplot_fun...
AtmaMani/pyChakras
udemy_ml_bootcamp/Machine Learning Sections/Linear-Regression/Linear Regression - Project Exercise - Solutions.ipynb
mit
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns %matplotlib inline """ Explanation: <a href='http://www.pieriandata.com'> <img src='../Pierian_Data_Logo.png' /></a> Linear Regression - Project Exercise Congratulations! You just got some contract work with an Ecommerce comp...
phoebe-project/phoebe2-docs
2.0/tutorials/alternate_backends.ipynb
gpl-3.0
!pip install -I "phoebe>=2.0,<2.1" """ Explanation: Advanced: Alternate Backends Setup Let's first make sure we have the latest version of PHOEBE 2.0 installed. (You can comment out this line if you don't use pip for your installation or don't want to update to the latest release). End of explanation """ import phoe...
dsacademybr/PythonFundamentos
Cap08/Notebooks/DSA-Python-Cap08-06-Bokeh.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 8</font> Download: http://github.com/dsacademybr End of explanation """ # Impor...
jmschrei/pomegranate
benchmarks/pomegranate_vs_sklearn_naive_bayes.ipynb
mit
%pylab inline import seaborn, time seaborn.set_style('whitegrid') from sklearn.naive_bayes import GaussianNB from pomegranate import * """ Explanation: pomegranate / sklearn Naive Bayes comparison authors: <br> Nicholas Farn (nicholasfarn@gmail.com) <br> Jacob Schreiber (jmschreiber91@gmail.com) <a href="https://gith...
relopezbriega/mi-python-blog
content/notebooks/pyLinearAlgrebra.ipynb
gpl-2.0
# <!-- collapse=True --> # importando modulos necesarios %matplotlib inline import matplotlib.pyplot as plt import numpy as np import scipy.sparse as sp import scipy.sparse.linalg import scipy.linalg as la import sympy # imprimir con notación matemática. sympy.init_printing(use_latex='mathjax') # <!-- collapse=True ...
matmodlab/matmodlab2
notebooks/PoroplasticFitting.ipynb
bsd-3-clause
import numpy as np from numpy import * from bokeh import * from bokeh.plotting import * output_notebook() from matmodlab2 import * from pandas import read_excel from scipy.optimize import leastsq diff = lambda x: np.ediff1d(x, to_begin=0.) trace = lambda x, s='SIG': x[s+'11'] + x[s+'22'] + x[s+'33'] RTJ2 = lambda x: sq...
JoaoFelipe/ipython-unittest
presentations/SciPy 2017.ipynb
mit
%load_ext ipython_unittest.dojo def add(x, y): return x + y %%unittest -p 1 assert add(1, 1) == 2 assert add(1, 2) == 3 assert add(2, 2) == 4 import unittest import sys class JupyterTest(unittest.TestCase): def test_add_1_1_returns_2(self): self.assertEqual(add(1, 1), 2) def test_add_1_2_retu...
bsafdi/NPTFit
examples/Example7_Manual_nonPoissonian_Likelihood.ipynb
mit
# Import relevant modules %matplotlib inline %load_ext autoreload %autoreload 2 import numpy as np import healpy as hp import matplotlib.pyplot as plt from NPTFit import nptfit # module for performing scan from NPTFit import create_mask as cm # module for creating the mask from NPTFit import psf_correction as pc # m...
rob-dalton/amazon-product-recommender
src/scriptDev-addPosTags.ipynb
mit
import pyspark as ps from sentimentAnalysis import dataProcessing as dp # create spark session spark = ps.sql.SparkSession(sc) # get dataframes # specify s3 as sourc with s3a:// #df = spark.read.json("s3a://amazon-review-data/user_dedup.json.gz") #df_meta = spark.read.json("s3a://amazon-review-data/metadata.json.gz")...
PublicHealthEngland/pygom
notebooks/PyGOM_SEIRsetup.ipynb
gpl-2.0
# import required packages from pygom import DeterministicOde, Transition, SimulateOde, TransitionType import os from sympy import symbols, init_printing import numpy as np import matplotlib.pyplot as mpl import sympy import itertools # Add graphvis path (N.B. set to your local circumstances) graphvis_path = 'h:\\Pr...
jeanbaptistepriez/predicsis-ai-faq-tuto
24.how_to_produce_scores_from_trained_model/Predictive Scoring.ipynb
gpl-3.0
# Load PredicSis.ai SDK from predicsis import PredicSis import predicsis.config as config, os, sys os.environ['PREDICSIS_URL'] = 'your_instance' if sys.version_info[0] >= 3: from importlib import reload reload(config) """ Explanation: Goal From a predictive model, score a new dataset using the Python SDK Prerequi...
infilect/ml-course1
keras-notebooks/FCNN/3.1 Hidden Layer Representation and Embeddings.ipynb
mit
import numpy as np import matplotlib.pyplot as plt %matplotlib inline """ Explanation: Fully Connected Feed-Forward Network In this notebook we will play with Feed-Forward FC-NN (Fully Connected Neural Network) for a classification task: Image Classification on MNIST Dataset RECALL In the FC-NN, the output of each l...
Aggieyixin/cjc2016
code/03.python_intro.ipynb
mit
import random, datetime import numpy as np import pylab as plt import statsmodels.api as sm from scipy.stats import norm from scipy.stats.stats import pearsonr """ Explanation: Python使用简介 王成军 wangchengjun@nju.edu.cn 计算传播网 http://computational-communication.com 人生苦短,我用Python。 Python(/ˈpaɪθən/)是一种面向对象、解释型计算机程序设计语言 - 由...
tensorflow/docs-l10n
site/en-snapshot/hub/tutorials/action_recognition_with_tf_hub.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...
georgetown-analytics/envirohealth
CapstoneSEER/SEER Data Analysis Phase 1- Ingestion.ipynb
mit
import time import os import glob import pandas as pd from pandas.io import sql from MasterSeer import MasterSeer """ Explanation: SEER Data Analysis Phase 1: Data Ingestion End of explanation """ class LoadSeerData(MasterSeer): def __init__(self, path=r'./data', reload=True, testMode=False, verbose=True, batch...
GoogleCloudPlatform/vertex-ai-samples
notebooks/community/migration/UJ4 AutoML for structured data with Vertex AI Regression.ipynb
apache-2.0
! pip3 install -U google-cloud-aiplatform --user """ Explanation: Vertex AI AutoML tables regression Installation Install the latest (preview) version of Vertex SDK. End of explanation """ ! pip3 install google-cloud-storage """ Explanation: Install the Google cloud-storage library as well. End of explanation """ ...
cloudera/ibis
docs/source/tutorial/07-Advanced-Topics-Analytics-Tools.ipynb
apache-2.0
import os import ibis ibis.options.interactive = True connection = ibis.sqlite.connect(os.path.join('data', 'geography.db')) """ Explanation: Advanced Topics: Analytics Tools Setup End of explanation """ countries = connection.table('countries') countries.continent.value_counts() """ Explanation: Frequency tables...
Luke035/dlnd-lessons
sentiment-rnn/.ipynb_checkpoints/Sentiment_RNN-checkpoint.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...
sairamprasad999/udacity-deep-learning
projects/notMNIST/1_notmnist.ipynb
mit
# 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 matplotlib.pyplot as plt import numpy as np import os import sys import tarfile from IPython.display import display, Image from scipy import ndimage from sklearn.line...
PyLCARS/PythonUberHDL
myHDL_ComputerFundamentals/Memorys/Memory.ipynb
bsd-3-clause
from myhdl import * from myhdlpeek import Peeker import numpy as np import pandas as pd import matplotlib.pyplot as plt %matplotlib inline from sympy import * init_printing() import random #https://github.com/jrjohansson/version_information %load_ext version_information %version_information myhdl, myhdlpeek, numpy, ...
nholtz/structural-analysis
matrix-methods/frame2d/70-Generate-large-frames.ipynb
cc0-1.0
from Frame2D import Frame2D from Tables import Table, DataSource import numpy as np import pandas as pd ## NOTE: all units are kN and m FD = {'storey_heights': [6.5] + [5.5]*20 + [7.0], # m 'bay_widths': [10.5,10,10,10,10,10.5], # m 'frame_spacing':8, # m, used only for...
mne-tools/mne-tools.github.io
0.17/_downloads/81258b1255ee7242b3b6c9f251dcfbd8/plot_xdawn_denoising.ipynb
bsd-3-clause
# Authors: Alexandre Barachant <alexandre.barachant@gmail.com> # # License: BSD (3-clause) from mne import (io, compute_raw_covariance, read_events, pick_types, Epochs) from mne.datasets import sample from mne.preprocessing import Xdawn from mne.viz import plot_epochs_image print(__doc__) data_path = sample.data_pa...
jfemiani/srp-boxes
nb/get_sample_locations.ipynb
mit
import logging import os import numpy as np import rasterio as rio import lmdb from caffe.proto.caffe_pb2 import Datum import caffe.io from rasterio._io import RasterReader from glob import glob sources =glob('/home/shared/srp/try2/*.tif') print len(sources) pos_regions = rasterio.open(r'/home/liux13/Desktop/tmp/pos...
csieber/alpha-dataset
notebooks/results.ipynb
mit
df = pd.read_csv("../data/results.csv.gz") df.loc[:,'sw_p_m'] = df.loc[:,'nr_of_switches'] / (df.loc[:,'video_lengh'] / 60) """ Explanation: Result Database In this example we show how to read and evaluate the result database. End of explanation """ df = df[(df.video_id == "CRZbG73SX3s") & (df.pattern_type=="medium"...
kaleoyster/nbi-data-science
Deterioration Curves/(Northeast) Deterioration+Curves+and+Classification+of+Bridges+in+the+Northeast+United+States.ipynb
gpl-2.0
import pymongo from pymongo import MongoClient import time import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt import csv """ Explanation: Libraries and Packages End of explanation """ Client = MongoClient("mongodb://bridges:readonly@nbi-mongo.admin/bridge") db = Client.bridg...
justinsowhat/scikit-learn-nlp-tutorial
sklearn_tutorial_1.ipynb
mit
import pandas as pd dataset = pd.read_csv('20news-18828.csv', header=None, delimiter=',', names=['label', 'text']) """ Explanation: scikit-learn for NLP -- Part 1 Introductory Tutorial scikit-learning is an open-sourced simple and efficient tools for data mining, data analysis and machine learning in Python. It is bu...
chengsoonong/didbits
Accuracy/choose_threshold.ipynb
apache-2.0
import numpy as np import matplotlib.pyplot as plt %matplotlib inline """ Explanation: Choosing a threshold for classification There are three types of output that could come out of a classifier: the score, the probability of positive, and the classification. This notebook illustrates how to select a threshold on the...
samstav/scipy_2015_sklearn_tutorial
notebooks/01.4 Training and Testing Data.ipynb
cc0-1.0
from sklearn.datasets import load_iris from sklearn.neighbors import KNeighborsClassifier iris = load_iris() X, y = iris.data, iris.target classifier = KNeighborsClassifier() """ Explanation: Cross-Validation and scoring methods To evaluate how well our supervised models generalize, we can split our data into a trai...
ARM-software/lisa
ipynb/deprecated/examples/trace_analysis/TraceAnalysis_IdleStates.ipynb
apache-2.0
import logging from conf import LisaLogging LisaLogging.setup() %matplotlib inline import os # Support to access the remote target from env import TestEnv # Support to access cpuidle information from the target from devlib import * # Support to configure and run RTApp based workloads from wlgen import RTA, Ramp #...
GoogleCloudPlatform/vertex-ai-samples
notebooks/community/ml_ops/stage6/get_started_with_matching_engine.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 = ...
openfisca/openfisca-france-indirect-taxation
openfisca_france_indirect_taxation/examples/notebooks/compute_cas_type_ticpe.ipynb
agpl-3.0
import datetime import pandas as pd import seaborn """ Explanation: Nous simulons les montants de TICPE payés par un ménage selon le type de véhicules dont il dispose. Nous prenons un ménage dont les dépenses annuelles en carburants s'élèveraient à 1000 euros. C'est en dessous de la moyenne de nos samples (plutôt aut...