repo_name
stringlengths
6
77
path
stringlengths
8
215
license
stringclasses
15 values
content
stringlengths
335
154k
DSSG-paratransit/main_repo
Access_Analysis_Project/notebooks/topPercenters.ipynb
agpl-3.0
import pandas as pd schedule = pd.read_csv('../data/UW_Trip_Data_4mo_QC_capacity.csv') dh_data = pd.read_csv('../data/4mo_deadhead_results.csv') """ Explanation: This file will have more deadheading analysis At least at the beginning I'll be looking at busruns that are 50% plus deadheading End of explanation """ fif...
ktaneishi/deepchem
examples/notebooks/Deepchem_NumpyDataset_tutorial.ipynb
mit
import deepchem as dc import numpy as np import random """ Explanation: Using Deepchem Datasets In this tutorial we will have a look at various deepchem dataset methods present in deepchem.datasets. End of explanation """ # data is your dataset in numpy array of size : 20x20. data = np.random.random((4, 4)) labels ...
whitead/numerical_stats
unit_10/hw_2020/homework_10_key.ipynb
gpl-3.0
import scipy.stats as ss #Poisson 1 - ss.poisson.cdf(10, 8) """ Explanation: Homework 10 Key CHE 116: Numerical Methods and Statistics 4/9/2020 Problem 1 State which hypothesis best matches the scenario and justify your answer You have the historic mean and standard deviation of temperature for April and want to kno...
kmorel/kmorel.github.io
images/better-plots/XY_Trend.ipynb
mit
import pandas import numpy import toyplot import toyplot.pdf import toyplot.png import toyplot.svg print('Pandas version: ', pandas.__version__) print('Numpy version: ', numpy.__version__) print('Toyplot version: ', toyplot.__version__) """ Explanation: When analyzing data, I usually use the following three module...
ProjectQ-Framework/ProjectQ
examples/simulator_tutorial.ipynb
apache-2.0
import projectq eng = projectq.MainEngine() # This loads the simulator as it is the default backend """ Explanation: ProjectQ Simulator Tutorial The aim of this tutorial is to introduce some of the basic and more advanced features of the ProjectQ simulator. Please note that all the simulator features can be found in o...
SKA-ScienceDataProcessor/crocodile
examples/notebooks/wtowers-predict.ipynb
apache-2.0
%matplotlib inline import sys sys.path.append('../..') from matplotlib import pylab as plt from ipywidgets import interact import itertools import numpy import numpy.linalg import scipy import scipy.special import time from crocodile.synthesis import * from crocodile.simulate import * from util.visualize import * f...
JAmarel/Phys202
Interact/InteractEx02.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 """ Explanation: Interact Exercise 2 Imports End of explanation """ def plot_sine1(a,b): labels = ['0','$\pi$.','$2\pi$.','$3\pi$.','$4\pi$...
royalosyin/Python-Practical-Application-on-Climate-Variability-Studies
ex32-North Atlantic Winter Weather Regimes from a Self-Organizing Map Perspective.ipynb
mit
%matplotlib inline import numpy as np import matplotlib.pyplot as plt import xarray as xr import cartopy.crs as ccrs from sompy.sompy import SOMFactory """ Explanation: North Atlantic Winter Weather Regimes from a Self-Organizing Map Perspective The four weather regimes typically found over the North Atlantic in wint...
mayank-johri/LearnSeleniumUsingPython
Section 1 - Core Python/Chapter 05 - Data Types/5.0.1 Answers - Data_Type.ipynb
gpl-3.0
a=[1,2,3,4,5,6,7,8,9] print(a[::2]) a=[1,2,3,4,5,6,7,8,9] a[::2]=10,20,30,40,50,60 # a[0], a[2],... = 10,20,30 print(a) a=[1,2,3,4,5,6,7,8,9] a[::2]=10,20,30,40,50 print(a) a=[1,2,3,4,5] a[3:1:-1] a=[1,2,3,4,5] print(a[3:0:-1]) arr = [[1, 2, 3, 4], [4, 5, 6, 7], [8, 9, 10, 11], [12, 13, 14, 15...
tensorflow/docs-l10n
site/ko/tutorials/structured_data/feature_columns.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...
tensorflow/tfx
docs/tutorials/tfx/components.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...
amueller/scipy-2017-sklearn
notebooks/17.In_Depth-Linear_Models.ipynb
cc0-1.0
from sklearn.datasets import make_regression from sklearn.model_selection import train_test_split X, y, true_coefficient = make_regression(n_samples=200, n_features=30, n_informative=10, noise=100, coef=True, random_state=5) X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=5, train_size=60, test_...
hammerlab/isovar
notebook/Naive Strategy.ipynb
apache-2.0
import pysam import numpy as np import pandas as pd def contexify(samfile, chromosome, location, allele, radius): # This will be our score board counts = np.zeros(shape=((radius * 2) + 1, 5)) # 5 slots for each of the bases d = pd.DataFrame(counts, index=range(location - radius, locati...
bbengfort/mosaic
notebooks/usage-visualization.ipynb
mit
%matplotlib inline import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from datetime import datetime from mosaic.usage import FileUsage from mosaic.utils import humanize_bytes # Set the Seaborn style and context sns.set_style('darkgrid') sns.set_context('poster') sns.set_palette('Set1') # Set ...
jamesHuffman/pyciss
docs/examples.ipynb
isc
from pyciss import io """ Explanation: Usage examples End of explanation """ io.config io.get_db_root() """ Explanation: The io module manages where data is stored and This is my database root path, where all downloaded images are automatically stored. Check if this is automatically set for you at a reasonable lo...
konstantinstadler/pymrio
doc/source/notebooks/load_save_export.ipynb
gpl-3.0
import pymrio import os io = pymrio.load_test().calc_all() """ Explanation: Loading, saving and exporting data Pymrio includes several functions for data reading and storing. This section presents the methods to use for saving and loading data already in a pymrio compatible format. For parsing raw MRIO data see the di...
frol/python-tutorials
notebooks/Intro.ipynb
mit
# you can mix text and code in one place and # run code from a Web browser """ Explanation: This is an iPython Notebook! End of explanation """ a = 10 a """ Explanation: Basics All you need to know about Python is here: You don't need to specify type of a variable End of explanation """ a, b = 1, 2 a, b b, a = ...
cranmer/look-elsewhere-2d
two-experiment-lee-testing.ipynb
mit
%pylab inline --no-import-all #plt.rc('text', usetex=True) plt.rcParams['figure.figsize'] = (6.0, 6.0) #plt.rcParams['savefig.dpi'] = 60 import george from george.kernels import ExpSquaredKernel, My2ExpLEEKernel, MySignificanceKernel from scipy.stats import chi2, norm length_scale_of_correaltion=3. ratio_of_length_sc...
AntonelliLab/seqcap_processor
docs/notebook/subdocs/align_paralogs.ipynb
mit
%%bash head -n 10 ../../data/processed/target_contigs_paralogs/1061/info_paralogous_loci.txt """ Explanation: Align paralogous contigs to reference If you applied the --keep-paralogs flag in the SECAPR find_target_contigs function, the function will print a text file with paralogous information into the subfolder of e...
tensorflow/privacy
tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/codelabs/membership_probability_codelab.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...
eds-uga/csci1360-fa16
lectures/L6.ipynb
mit
squares = [] for element in range(10): squares.append(element ** 2) print(squares) """ Explanation: Lecture 6: Advanced Data Structures CSCI 1360: Foundations for Informatics and Analytics Overview and Objectives We've covered list, tuples, sets, and dictionaries. These are the foundational data structures in Pyth...
ES-DOC/esdoc-jupyterhub
notebooks/mpi-m/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', 'mpi-m', 'sandbox-1', 'ocnbgchem') """ Explanation: ES-DOC CMIP6 Model Properties - Ocnbgchem MIP Era: CMIP6 Institute: MPI-M Source ID: SANDBOX-1 Topic: Ocnbgchem Sub-Topics: Tracers. Propertie...
TomAugspurger/PracticalPandas
Practical Pandas 02 - EDA.ipynb
mit
%matplotlib inline import os import datetime import pandas as pd import seaborn as sns import matplotlib.pyplot as plt df = pd.read_hdf(os.path.join('data', 'cycle_store.h5'), key='merged') df.head() """ Explanation: Practical Pandas 02: Exporatory Data Analysis Welcome back. As a reminder, we've got a dataset with...
Vvkmnn/books
ThinkBayes/12_Evidence.ipynb
gpl-3.0
import thinkbayes class TopLevel(thinkbayes.Suite): def Update(self, data): a_sat, b_sat = data a_like = thinkbayes.PmfProbGreater(a_sat, b_sat) b_like = thinkbayes.PmfProbLess(a_sat, b_sat) c_like = thinkbayes.PmfProbEqual(a_sat, b_sat) a_like += c_like / 2 b_lik...
mbakker7/timml
notebooks/circareasink_example.ipynb
mit
N = 0.001 R = 100 ml = ModelMaq(kaq=5, z=[10, 0]) ca = CircAreaSink(ml, xc=0, yc=0, R=100, N=0.001) ml.solve() x = np.linspace(-200, 200, 100) h = ml.headalongline(x, 0) plt.plot(x, h[0]); qx = np.zeros_like(x) for i in range(len(x)): qx[i], qy = ml.disvec(x[i], 1e-6) plt.plot(x, qx) qxb = N * np.pi * R ** 2 / (2 ...
NEONScience/NEON-Data-Skills
tutorials-in-development/Python/neon_api/neon_api_04_locations_py.ipynb
agpl-3.0
import requests import json import pandas as pd #Define API call componenets SERVER = 'http://data.neonscience.org/api/v0/' SITECODE = 'TEAK' PRODUCTCODE = 'DP1.10003.001' """ Explanation: syncID: title: "Querying Location Data with NEON API and Python" description: "Querying the 'locations/' NEON API endpoint with ...
Pittsburgh-NEH-Institute/Institute-Materials-2017
schedule/week_2/collation/4_collate-outside-the-notebook.ipynb
gpl-3.0
from collatex import * collation = Collation() collation.add_plain_witness( "A", "The quick brown fox jumped over the lazy dog.") collation.add_plain_witness( "B", "The brown fox jumped over the dog." ) collation.add_plain_witness( "C", "The bad fox jumped over the lazy dog.") table = collate(collation) print(table) "...
jorgemauricio/INIFAP_Course
algoritmos/Validacion_App_Movil_climMAPcore_Son_BW.ipynb
mit
# librerias import pandas as pd import numpy as np import matplotlib.pyplot as plt import statsmodels.formula.api as sm %matplotlib inline plt.style.use('grayscale') # leer archivo data = pd.read_csv('../data/dataFromSonoraClimmapcore.csv') # verificar su contenido data.head() # diferencia entre valores de precipita...
linuxlewis/django-diffs
examples/Tutorial.ipynb
mit
# Setup django import os os.environ['DJANGO_SETTINGS_MODULE'] = 'example.settings' import django django.setup() """ Explanation: django-diffs tutorial This is a walkthrough tutorial demonstrating the features of django diffs End of explanation """ from django.conf import settings settings.DIFFS_SETTINGS from diffs...
ES-DOC/esdoc-jupyterhub
notebooks/bnu/cmip6/models/sandbox-1/land.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'bnu', 'sandbox-1', 'land') """ Explanation: ES-DOC CMIP6 Model Properties - Land MIP Era: CMIP6 Institute: BNU Source ID: SANDBOX-1 Topic: Land Sub-Topics: Soil, Snow, Vegetation, Energy Balance...
Unidata/unidata-python-workshop
notebooks/AWIPS/Watch_and_Warning_Polygons.ipynb
mit
from awips.dataaccess import DataAccessLayer from awips.tables import vtec from datetime import datetime import numpy as np import matplotlib.pyplot as plt import cartopy.crs as ccrs import cartopy.feature as cfeature from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER from cartopy.feature import ...
FavioVazquez/MexicanNumericalSimulationSchool
school/projects/HabibProject/Solutions/PkEmu/.ipynb_checkpoints/plotPrueba-checkpoint.ipynb
gpl-3.0
import matplotlib matplotlib.use('nbagg') import matplotlib.pyplot as plt import pandas as pd from matplotlib import rc rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) ## for Palatino and other serif fonts use: #rc('font',**{'family':'serif','serif':['Palatino']}) rc('text', usetex=True) #LaTeX plt.rc...
wasat/JupyTEPIDE
notebooks/grass/bash/terrain_modeling_ascii.ipynb
apache-2.0
# Obtain sample data and set new Grass mapset import urllib from zipfile import ZipFile import os.path zip_path = "/home/jovyan/work/tmp/nc_spm_08_grass7.zip" mapset_path = "/home/jovyan/grassdata" if not os.path.exists(zip_path): urllib.urlretrieve("https://grass.osgeo.org/sampledata/north_carolina/nc_spm_08_gras...
radhikapc/foundation-homework
homework07/Homework07-BuildingPandas-Radhika.ipynb
mit
import pandas as pd """ Explanation: 1.Import pandas with the right name: End of explanation """ import matplotlib.pyplot as plt %matplotlib inline """ Explanation: 2. Set all graphics from matplotlib to display inline End of explanation """ df = pd.read_csv("07-hw-animals.csv") df """ Explanation: 3. Read the...
AllenDowney/ModSimPy
notebooks/filter.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...
jepegit/cellpy
dev_utils/new_external_libs/UserNumba001.ipynb
mit
my_data = cellreader.CellpyData() # only for my MacBook filename = "/Users/jepe/scripting/cellpy/dev_data/out/20190204_FC_snx012_01_cc_01.h5" assert os.path.isfile(filename) my_data.load(filename) """ Explanation: Setting things up End of explanation """ %%timeit my_data.make_summary() %%timeit my_data.make_step_ta...
eggie5/ipython-notebooks
housing/Home Value Regression Exercise - Alex Egg.ipynb
mit
import pandas as pd import numpy as np import scipy.stats %pylab inline csv = pd.read_csv("single_family_home_values.csv", parse_dates=["last_sale_date"]) print csv.shape csv.head() #scale the data from sklearn import preprocessing from scipy import stats """ Explanation: Estimating Home Prices Estimating home valu...
georgetown-analytics/yelp-classification
Yelp_web_scrapper/Business_Scrapper.ipynb
mit
from bs4 import BeautifulSoup import requests import re import json import scrapping_functions as sf reload(sf) from selenium import webdriver #Start = signifies the listing to start it, increases in increments of 10 per page #End = 990 target_url = 'https://www.yelp.com/search?find_desc=Restaurants&find_loc=Washington...
edwardd1/phys202-2015-work
assignments/assignment03/NumpyEx01.ipynb
mit
import numpy as np %matplotlib inline import matplotlib.pyplot as plt import seaborn as sns import antipackage import github.ellisonbg.misc.vizarray as va """ Explanation: Numpy Exercise 1 Imports End of explanation """ def checkerboard(size): """Return a 2d checkboard of 0.0 and 1.0 as a NumPy array""" che...
nvergos/DAT-ATX-1_Project
Notebooks/1. Data Preparation & Exploratory Analysis.ipynb
mit
import warnings warnings.filterwarnings('ignore') import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns %matplotlib inline from scipy import stats # For correlation coefficient calculation """ Explanation: DAT-ATX-1 Capstone Project Nikolaos Vergos, February 2016 nv&#...
quanta413/Population-Evolution-Project-Source-Code
Plots related to the traveling wave regime-Revisions.ipynb
bsd-2-clause
fbvary_results = [] for file in glob.glob('runs/evolved_mu_f_b_vary?replicate?datetime.datetime(2019, 5, *).hdf5'): try: fbvary_results.append(popev.PopulationReader(file)) except OSError: pass favary_results = [] for file in glob.glob('runs/evolved_mu_f_a_vary?replicate?datetime.datetime(2019,...
asimshankar/tensorflow
tensorflow/contrib/eager/python/examples/generative_examples/dcgan.ipynb
apache-2.0
# Install imgeio in order to generate an animated gif showing the image generating process !pip install imageio """ Explanation: Copyright 2018 The TensorFlow Authors. Licensed under the Apache License, Version 2.0 (the "License"). Generating Handwritten Digits with DCGAN <table class="tfo-notebook-buttons" align="lef...
befelix/lyapunov-learning
1d_example.ipynb
mit
# Discretization constant tau = 0.001 # x_min, x_max, discretization grid_param = [-1., 1., tau] extent = np.array(grid_param[:2]) # Create a grid grid = np.arange(*grid_param)[:, None] num_samples = len(grid) print('Grid size: {0}'.format(len(grid))) """ Explanation: We start by defining a discretization of the s...
ctroupin/CMEMS_INSTAC_Training
PythonNotebooks/IndexFilePlots/IndexFile_Folium_Visalization.ipynb
mit
indexfile = "../PlatformPlots/datafiles/index_latest.txt" """ Explanation: Index file visualization This notebook shows an easy way to represent the In Situ data positions using the index files.<br> For this visualization of a sample <i>index_latest.txt</i> dataset of the Copernicus Marine Environment Monitoring Servi...
yingchi/fastai-notes
deeplearning1/nbs/lesson6_yingchi.ipynb
apache-2.0
from theano.sandbox import cuda cuda.use('gpu1') %matplotlib inline import utils; from utils import * from keras.layers import TimeDistributed, Activation from numpy.random import choice """ Explanation: Table of Contents <p><div class="lev1 toc-item"><a href="#Setup" data-toc-modified-id="Setup-1"><span class="toc-i...
mne-tools/mne-tools.github.io
0.23/_downloads/33d5dd5786fed13908838e94d55ac785/90_compute_covariance.ipynb
bsd-3-clause
import os.path as op import mne from mne.datasets import sample """ Explanation: Computing a covariance matrix Many methods in MNE, including source estimation and some classification algorithms, require covariance estimations from the recordings. In this tutorial we cover the basics of sensor covariance computations...
KECB/learn
BAMM.101x/datetime_objects.ipynb
mit
d1 = "10/24/2017" d2 = "11/24/2016" max(d1,d2) """ Explanation: <h1>datetime library</h1> <li>Time is linear <li>progresses as a straightline trajectory from the big bag <li>to now and into the future <li>日期库官方说明 https://docs.python.org/3.5/library/datetime.html <h3>Reasoning about time is important in data analysis...
akchinSTC/systemml
samples/jupyter-notebooks/Linear_Regression_Algorithms_Demo.ipynb
apache-2.0
!pip show systemml """ Explanation: Linear Regression Algorithms using Apache SystemML This notebook shows: - Install SystemML Python package and jar file - pip - SystemML 'Hello World' - Example 1: Matrix Multiplication - SystemML script to generate a random matrix, perform matrix multiplication, and compute th...
Pantkowsky/electricitymap
datascience/exchange.ipynb
gpl-3.0
from utils import * # Enable inline plotting %matplotlib inline from ggplot import * """ Explanation: Analysis of Electricity Exchange This notebook shows how to use utils function. In particular we show how to pull data of electricity exchange. We first import utils function. This lets you access a set of handy fu...
mayankjohri/LetsExplorePython
Section 1 - Core Python/Chapter 16 - Standard library/Reference, Shallow and deep copy.ipynb
gpl-3.0
x = 10 y = x print(id(x), id(y)) x = [10, 3] y = x print(x , y) x[1] = "This is a test message" print(x, y) x = 10 print(id(x)) x +=1 y = x print(id(x), id(y)) x = 10 print(id(x)) y = x x = "d" print(id(x), id(y)) print(y, x) x = "10" y = x + "1" print(id(x), id(y)) print(x , y) x = 10 y = x print(id(x), id(y)) ...
uber-common/deck.gl
bindings/pydeck/examples/02 - Scatterplots.ipynb
mit
import pandas as pd import pydeck as pdk # First, let's use Pandas to download our data URL = 'https://raw.githubusercontent.com/ajduberstein/data_sets/master/beijing_subway_station.csv' df = pd.read_csv(URL) df.head() """ Explanation: Scatterplots in pydeck: A case study using Beijing subway stops Below we'll plot t...
tyarkoni/transitions
examples/Frequently asked questions.ipynb
mit
from transitions import Machine import json class Model: def say_hello(self, name): print(f"Hello {name}!") # import json json_config = """ { "name": "MyMachine", "states": [ "A", "B", { "name": "C", "on_enter": "say_hello" } ], "transitions": [ ["go", "A", "B"], {"trigger":...
eds-uga/csci1360e-su16
lectures/L18.ipynb
mit
import matplotlib as mpl import matplotlib.pyplot as plt """ Explanation: Lecture 18: Data Visualization CSCI 1360E: Foundations for Informatics and Analytics Overview and Objectives Data visualization is one of, if not the, most important method of communicating data science results. It's analogous to writing: if you...
farr/kepler-selection
kephackwk/BinnedOccurrence.ipynb
mit
hw_data_directory = '/Users/farr/Documents/Research/KepHackWeek/data' occur_dir = '/Users/farr/Google Drive/Kepler ExoPop Hack 2015/end2end_occ_calc' eff_dir = '/Volumes/KepHacWkWMF/Kepler_HW2015/Dp4_DetectionCountours/v0' rbins = array([1.5**(i-1) for i in range(9)]) pbins = array([10*2**i for i in range(6)]) print r...
reychil/project-alpha-1
code/utils/misc/.ipynb_checkpoints/BART_Data_Beginning-checkpoint.ipynb
bsd-3-clause
from __future__ import absolute_import, division, print_function import numpy as np import numpy.linalg as npl import matplotlib.pyplot as plt import nibabel as nib import pandas as pd # new import os # new # the last one is a major thing for ipython notebook, don't include in regular python code %matplotlib inline ...
JustasB/MitralSuite
SimpleNeuronCellTests.ipynb
mit
%matplotlib inline import matplotlib.pyplot as g from neuronunit.neuron.models import * from neuronunit.tests import * import neuronunit.neuroelectro from quantities import nA, pA, s, ms, mV from neuron import h # DEBUG TESTING #from importlib import * #import neuronunit #reload(neuronunit.neuron.models) #from neuro...
sbussmann/sleep-bit
notebooks/sbussmann_get-fitbit-data.ipynb
mit
%load_ext pypath_magic %pypath -a /Users/rbussman/Projects/sleep-bit from src.data import get_fitbit import matplotlib.pyplot as plt %matplotlib inline import seaborn as sns sns.set_context('poster') import pandas as pd import time daterange = pd.date_range('2017-03-30', '2017-08-10') """ Explanation: Summary Use...
fantasycheng/udacity-deep-learning-project
tutorials/gan_mnist/Intro_to_GANs_Solution.ipynb
mit
%matplotlib inline import pickle as pkl import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets('MNIST_data') """ Explanation: Generative Adversarial Network In this notebook, we'll be building a generativ...
mohanprasath/Course-Work
numpy/numpy_exercises_from_kyubyong/Statistics_solutions.ipynb
gpl-3.0
__author__ = "kyubyong. kbpark.linguist@gmail.com" import numpy as np np.__version__ """ Explanation: Statistics End of explanation """ x = np.arange(4).reshape((2, 2)) print("x=\n", x) print("ans=\n", np.amin(x, 1)) """ Explanation: Order statistics Q1. Return the minimum value of x along the second axis. End of...
ffyu/Build_Model_from_Scratch
5_Anomaly_Detection.ipynb
mit
import math import numpy as np import scipy class AnomalyDetection(): def __init__(self, multi_variate=False): # if multi_variate is True, we will use multivariate Gaussian distribution # to estimate the probabilities self.multi_variate = multi_variate self.mu = None self....
IS-ENES-Data/submission_forms
test/prov/old/prov-submission-Copy1.ipynb
apache-2.0
%load_ext autoreload %autoreload 2 %load_ext autoreload %autoreload 2 import sys sys.path.append('/home/stephan/Repos/ENES-EUDAT/submission_forms') from dkrz_forms import form_handler from dkrz_forms import checks from dkrz_forms.config import test_config from dkrz_forms.config import workflow_steps #print test_con...
GeoffreyBessardon/end_of_day_two
DefensiveProgramming_3.ipynb
mit
def test_range_overlap(): assert range_overlap([(-3.0, 5.0), (0.0, 4.5), (-1.5, 2.0)]) == (0.0, 2.0) assert range_overlap([ (2.0, 3.0), (2.0, 4.0) ]) == (2.0, 3.0) assert range_overlap([ (0.0, 1.0), (0.0, 2.0), (-1.0, 1.0) ]) == (0.0, 1.0) """ Explanation: # Defensive programming (2) We have seen the ba...
zhaojijet/UdacityDeepLearningProject
examples/Convolutional_Autoencoder_Solution.ipynb
apache-2.0
%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) img = mnist.train.images[2] plt.imshow(img.reshape((28, 28)), cmap='Greys_r') """ Explanation: C...
xlbaojun/Note-jupyter
05其他/pandas文档-zh-master/.ipynb_checkpoints/数据结构-checkpoint.ipynb
gpl-2.0
import numpy as np import pandas as pd """ Explanation: 数据结构 这一节介绍pandas中的数据结构。首先,导入numpy和pandas: End of explanation """ s = pd.Series(np.random.randn(5), index=['a', 'b', 'c', 'd', 'e']) s s.index pd.Series(np.random.randn(5)) """ Explanation: 我们先对数据结构进行简短的介绍, 然后再详细说明各个数据结构内置的方法。 Series Series是一个一维带label的数组,元素可以...
sourabhrohilla/ds-masterclass-hands-on
session-2/python/TFIDF_NewsRecommender.ipynb
mit
PATH_NEWS_ARTICLES="/home/phoenix/Documents/HandsOn/Final/news_articles.csv" ARTICLES_READ=[2,7] NUM_RECOMMENDED_ARTICLES=5 try: import numpy import pandas as pd import pickle as pk from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity ...
rigetticomputing/pyquil
docs/source/quilt_raw_capture.ipynb
apache-2.0
from pyquil import Program, get_qc qc = get_qc('Aspen-8') cals = qc.compiler.calibration_program """ Explanation: RAW-CAPTURE on Aspen-8 In this we are going to show how to access "raw" measurement data with Quilt. End of explanation """ from pyquil.quilatom import Qubit, Frame from pyquil.quilbase import Pulse, C...
Olsthoorn/TransientGroundwaterFlow
Assignment/VScode/AssJan2017.ipynb
gpl-3.0
# import the necessary fucntionality import numpy as np import matplotlib.pyplot as plt from scipy.special import exp1 as W # Theis well function def newfig(title='?', xlabel='?', ylabel='?', xlim=None, ylim=None, xscale=None, yscale=None, figsize=(10, 8), fontsize=16): sizes = ['xx-small', 'x-small', ...
dssg/diogenes
doc/notebooks/.ipynb_checkpoints/display-checkpoint.ipynb
mit
%matplotlib inline import diogenes import numpy as np wine_data = diogenes.read.open_csv_url('http://archive.ics.uci.edu/ml/machine-learning-databases/wine-quality/winequality-white.csv', delimiter=';') """ Explanation: The Display Module The :mod:diogenes.display module provides tools for summarizing/exploring d...
willingc/jupyter-data-seeker
Repos for an Organization.ipynb
gpl-2.0
import github3 import os # Set ORGANIZATION ORGANIZATION = 'jupyter' GH_NAME= os.environ.get('GH_NAME') GH_PASSWD = os.environ.get('GH_PASSWORD') GH_TOKEN = os.environ.get('GH_TOKEN') # Authenticate and get a github object for accessing API without rate limits gh = github3.login(GH_NAME, GH_PASSWD) """ Explanation:...
aliakbars/uai-ai
scripts/tugas1.ipynb
mit
from __future__ import print_function, division # Gunakan print(...) dan bukan print ... import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns import random import keras from keras.models import Sequential, load_model from keras.layers import Dense, Dropout, Flatten from keras.la...
ES-DOC/esdoc-jupyterhub
notebooks/test-institute-2/cmip6/models/sandbox-2/ocean.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'test-institute-2', 'sandbox-2', 'ocean') """ Explanation: ES-DOC CMIP6 Model Properties - Ocean MIP Era: CMIP6 Institute: TEST-INSTITUTE-2 Source ID: SANDBOX-2 Topic: Ocean Sub-Topics: Timestepp...
fonnesbeck/scientific-python-workshop
notebooks/Data Wrangling with Pandas.ipynb
cc0-1.0
%matplotlib inline import pandas as pd import numpy as np import matplotlib.pyplot as plt """ Explanation: Data Wrangling with Pandas Now that we have been exposed to the basic functionality of Pandas, lets explore some more advanced features that will be useful when addressing more complex data management tasks. As m...
nyoungb2/CLdb
doc/examples/Ecoli/spacers_shared.ipynb
gpl-2.0
# directory where you want the spacer blasting to be done ## CHANGE THIS! workDir = "/home/nyoungb2/t/CLdb_Ecoli/spacers_shared/" """ Explanation: Description: This notebook goes through the assessment of spacers shared across CRISPR loci Before running this notebook: run the Setup notebook User-defined variables ...
LSSTC-DSFP/LSSTC-DSFP-Sessions
Sessions/Session11/Day1/IntroductionToBasicStellarPhotometry.ipynb
mit
import numpy as np import matplotlib.pyplot as plt %matplotlib notebook """ Explanation: Introduction to Basic Stellar Photometry Measuring Flux in 1D Version 0.1 In this notebook we will introduce some basic concepts related to measuring the flux of a point source. As this is an introduction, several challenges asso...
mne-tools/mne-tools.github.io
0.24/_downloads/cfbef36033f8d33f28c4fe2cfa35314a/30_cluster_ftest_spatiotemporal.ipynb
bsd-3-clause
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Eric Larson <larson.eric.d@gmail.com> # License: BSD-3-Clause import os.path as op import numpy as np from scipy import stats as stats import mne from mne import spatial_src_adjacency from mne.stats import spatio_temporal_cluster_test, summarize_...
buruzaemon/natto-py
notebooks/05_制約付き解析.ipynb
bsd-2-clause
from natto import MeCab """ Explanation: 制約付き解析 End of explanation """ text1 = """\ 証券コードは4桁の銘柄識別コードです。 たとえば、7777 です。 あるいは 7777 JP や 7777.Tというのもあります。 また「7777JP」のような全角文字を使う表し方もあるかも知れません。 \ """ # 簡単な証券コードの正規表現 patt = "[0-9\uFF10-\uFF19]{4}((\s|\.)+[a-zA-Z]{1,2}|[\uFF21-\uFF3A]{2})" with MeCab(r"-F%m\t%f[0]\t%s") as...
pschragger/big-data-python-class
Lectures/Week 2 - Python and Jupyter for Big-Data/Lecture-2-Introduction-to-Python-Programming.ipynb
mit
ls ..\..\Scripts\hello-world*.py """ Explanation: Introduction to Python programming This crash course on python is take from two souces: http://github.com/jrjohansson/scientific-python-lectures. and Chapter 2 of the Datascience from scratch: First principles with python Code from https://github.com/joelgrus/data-scie...
HumanCompatibleAI/imitation
examples/4_train_airl.ipynb
mit
from stable_baselines3 import PPO from stable_baselines3.ppo import MlpPolicy import gym import seals env = gym.make("seals/CartPole-v0") expert = PPO( policy=MlpPolicy, env=env, seed=0, batch_size=64, ent_coef=0.0, learning_rate=0.0003, n_epochs=10, n_steps=64, ) expert.learn(1000) # ...
chetan51/nupic.research
projects/dynamic_sparse/notebooks/ExperimentAnalysis-MNISTSparser.ipynb
gpl-3.0
%load_ext autoreload %autoreload 2 from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import glob import tabulate import pprint import click import numpy as np import pandas as pd from ray.tune.commands import * from nupic.research.frameworks.dynamic...
wholmgren/pvlib-python
docs/tutorials/tmy_and_diffuse_irrad_models.ipynb
bsd-3-clause
# built-in python modules import os import inspect # scientific python add-ons import numpy as np import pandas as pd # plotting stuff # first line makes the plots appear in the notebook %matplotlib inline import matplotlib.pyplot as plt # finally, we import the pvlib library import pvlib # Find the absolute file ...
tensorflow/docs-l10n
site/ja/guide/keras/sequential_model.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...
franklinsales/udacity-data-analyst-nanodegree
project0/Data_Analyst_ND_Project0.ipynb
mit
import pandas as pd # pandas é uma biblioteca para manipulação e anáise de dados # geralmente usamos nomes mais curtos para as bibliotecas.Pabdas é geralmente abreviada para pd # tecle shift + enter para rodar esta célula ou bloco de código path = r'~/Downloads/chopstick-effectiveness.csv' # Mude o caminho para o loc...
VVard0g/ThreatHunter-Playbook
docs/notebooks/windows/05_defense_evasion/WIN-201012183248.ipynb
mit
from openhunt.mordorutils import * spark = get_spark() """ Explanation: Wuauclt CreateRemoteThread Execution Metadata | Metadata | Value | |:------------------|:---| | collaborators | ['@Cyb3rWard0g'] | | creation date | 2020/10/12 | | modification date | 2020/10/12 | | playbook related | [] | Hypo...
betatim/studyGroupJupyter
python.ipynb
mit
import math print("The square root of 3 is:", math.sqrt(3)) print("π is:", math.pi) print("The sin of 90 degrees is:", math.sin(math.radians(90))) """ Explanation: Topics We will cover: Basic math Exploring modules and getting help Rich displaying Inline plots Interactive inline plots Interactive elements Basic mat...
ramabrahma/data-sci-int-capstone
.ipynb_checkpoints/data-exploration-life-insurance-checkpoint.ipynb
gpl-3.0
# Importing libraries %pylab inline %matplotlib inline import pandas as pd import matplotlib.pyplot as plt from matplotlib.colors import LogNorm from sklearn import preprocessing import numpy as np # Convert variable data into categorical, continuous, discrete, # and dummy variable lists the following into a dictio...
kit-cel/wt
wt/vorlesung/ch7_9/generating_distributions.ipynb
gpl-2.0
# importing import numpy as np from scipy import stats, special import matplotlib.pyplot as plt import matplotlib # showing figures inline %matplotlib inline # plotting options font = {'size' : 20} plt.rc('font', **font) plt.rc('text', usetex=True) matplotlib.rc('figure', figsize=(18, 6) ) """ Explanation: Con...
AllenDowney/ModSim
soln/chap15.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/' ...
Energya/cma-es-configuration-data-mining
module_analysis.ipynb
mit
# Imports + definitions %matplotlib inline from __future__ import division, print_function, unicode_literals import matplotlib.pyplot as plt import matplotlib.mlab as mlab import networkx as nx import numpy as np import os import pydot import scipy.io.arff as arff from collections import Counter, defaultdict from cy...
danresende/deep-learning
sentiment_network/Sentiment Classification - Project 1 Solution.ipynb
mit
def pretty_print_review_and_label(i): print(labels[i] + "\t:\t" + reviews[i][:80] + "...") g = open('reviews.txt','r') # What we know! reviews = list(map(lambda x:x[:-1],g.readlines())) g.close() g = open('labels.txt','r') # What we WANT to know! labels = list(map(lambda x:x[:-1].upper(),g.readlines())) g.close()...
DiXiT-eu/collatex-tutorial
unit6/Tokenization.ipynb
gpl-3.0
from collatex import * collation = Collation() collation.add_plain_witness("A", "Peter's cat.") collation.add_plain_witness("B", "Peter's dog.") table = collate(collation, segmentation=False) print(table) """ Explanation: Tokenization Default tokenization Tokenization (the first of the five parts of the Gothenburg mod...
deepmind/graph_nets
graph_nets/demos_tf2/graph_nets_basics.ipynb
apache-2.0
#@title ### Install the Graph Nets library on this Colaboratory runtime { form-width: "60%", run: "auto"} #@markdown <br>1. Connect to a local or hosted Colaboratory runtime by clicking the **Connect** button at the top-right.<br>2. Choose "Yes" below to install the Graph Nets library on the runtime machine with the c...
felixcheung/spark-ml-streaming
ipython_notebook/Streaming k-means.ipynb
apache-2.0
from IPython.display import IFrame IFrame('https://lightning-docs.herokuapp.com/visualizations/4/iframe/', 1155, 673) """ Explanation: Visualizing Streaming k-means on IPython + Lightning <img src="http://lightning-viz.org/images/logo.png" align="left"><br><h1>Lightning</h1>DATA VISUALIZATION SERVER <br> <br> Lightnin...
agile-geoscience/notebooks
Programming_a_seismic_program.ipynb
apache-2.0
import numpy as np import matplotlib.pyplot as plt from shapely.geometry import Point, LineString import geopandas as gpd import pandas as pd from fiona.crs import from_epsg %matplotlib inline """ Explanation: Programming a seismic program This notebook goes with the article Bianco, E and M Hall (2015). Programming ...
LorenzoBi/courses
CQD/.ipynb_checkpoints/exercise1-checkpoint.ipynb
mit
import numpy as np from numpy import linalg as LA import matplotlib.pyplot as plt from math import factorial from itertools import combinations_with_replacement from scipy.integrate import quad %matplotlib inline def generate_random_hermitian(N): A = np.random.normal(size=(N, N)) H = (np.tril(A) + np.triu(A...
clarecorthell/nlp_workshop
nlp_basics_workshop.ipynb
mit
%pwd # make sure we're running our script from the right place; # imports like "filename" are relative to where we're running ipython """ Explanation: NLP Workshop Author: Clare Corthell, Luminant Data Conference: Talking Machines, Manila Date: 18 February 2016 Description: Much of human knowledge is “locked up” in ...
tensorflow/gan
tensorflow_gan/examples/colab_notebooks/tfgan_tutorial.ipynb
apache-2.0
# Check that imports for the rest of the file work. import tensorflow.compat.v1 as tf !pip install tensorflow-gan import tensorflow_gan as tfgan import tensorflow_datasets as tfds import matplotlib.pyplot as plt import numpy as np # Allow matplotlib images to render immediately. %matplotlib inline tf.logging.set_verbos...
ML4DS/ML4all
P5.Data preprocessing/Intro5_DataNormalization_professor.ipynb
mit
# Some libraries that will be used along the notebook. import numpy as np import matplotlib.pyplot as plt """ Explanation: Data preprocessing methods: Normalization Notebook version: * 1.0 (Sep 15, 2020) - First version * 1.1 (Sep 15, 2021) - Exercises Authors: Jesús Cid Sueiro (jcid@ing.uc3m.es) End of explanation ...
patrickfuller/imolecule
examples/ipython.ipynb
mit
import imolecule imolecule.draw("CC1(C(N2C(S1)C(C2=O)NC(=O)CC3=CC=CC=C3)C(=O)O)C") """ Explanation: imolecule in the IPython notebook I created imolecule to fix a deficiency in my workflow. While my chemical simulations were entirely in notebooks, I had to use external programs like mercury to visually debug chemical ...
otavio-r-filho/AIND-Deep_Learning_Notebooks
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...
ES-DOC/esdoc-jupyterhub
notebooks/mpi-m/cmip6/models/icon-esm-lr/ocnbgchem.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'mpi-m', 'icon-esm-lr', 'ocnbgchem') """ Explanation: ES-DOC CMIP6 Model Properties - Ocnbgchem MIP Era: CMIP6 Institute: MPI-M Source ID: ICON-ESM-LR Topic: Ocnbgchem Sub-Topics: Tracers. Prope...