repo_name
stringlengths
6
77
path
stringlengths
8
215
license
stringclasses
15 values
content
stringlengths
335
154k
pmgbergen/porepy
tutorials/meshing_of_fractures.ipynb
gpl-3.0
import numpy as np import porepy as pp # Point coordinates point_coordinates = np.array([[0, 2, 1, 1], [0, 0, 0, 1]]) # Point connections as a 2 x num_frac arary point_indices = np.array([[0, 2], [1, 3]]) # Define a rectangular domain in terms of range in the...
seblabbe/MATH2010-Logiciels-mathematiques
ipynb-cours/16-04-12.ipynb
gpl-3.0
from IPython.display import Image Image('../NotesDeCours/images/bart_simpson.jpg') range(100, 109) for i in range(100, 109): print(i, "I will not do this again") for i in range(10): print(i) """ Explanation: 13 Boucles for et while End of explanation """ s = 0 """ Explanation: 13.1 La boucle for Syntaxe ...
mbakker7/ttim
pumpingtest_benchmarks/9_test_of_texas_hill.ipynb
mit
%matplotlib inline import numpy as np import matplotlib.pyplot as plt import pandas as pd from ttim import * """ Explanation: Leaky Aquifer Test This example is taken from AQTESOLV examples. End of explanation """ Q = 24464.06 #constant discharge in m^3/d b1 = 6.096 #overlying aquitard thickness in m b2 = 15.24 #aqu...
meteotest/hurray-py
docs/notebooks/tutorial.ipynb
bsd-3-clause
import os import sys import logging module_path = os.path.abspath(os.path.join('..')) if module_path not in sys.path: sys.path.append(module_path) import hurraypy as hurray import numpy as np hurray.__version__ """ Explanation: Tutorial End of explanation """ logger = logging.getLogger('hurraypy') # console =...
AssembleSoftware/IoTPy
examples/ExamplesOfMap.ipynb
bsd-3-clause
import os import sys sys.path.append("../") from IoTPy.core.stream import Stream, run from IoTPy.agent_types.op import map_element from IoTPy.helper_functions.recent_values import recent_values """ Explanation: Examples of @map_e, @fmap_e and map_element This notebook had examples of map from IoTPy/IoTPy/agent_types/...
JAmarel/Phys202
LaTeX/.ipynb_checkpoints/InteractEx05-checkpoint.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 SVG from IPython.display import display """ Explanation: Interact Exercise 5 Imports Put the standard imports for Matplotlib, Numpy and the IPython widgets ...
jesford/cluster-lensing
fitting_a_model.ipynb
mit
import numpy as np import matplotlib.pyplot as plt import seaborn; seaborn.set() from clusterlensing import ClusterEnsemble import emcee import corner % matplotlib inline import matplotlib matplotlib.rcParams["axes.labelsize"] = 20 matplotlib.rcParams["legend.fontsize"] = 12 """ Explanation: Model fitting with clu...
joshnsolomon/phys202-2015-work
assignments/assignment10/ODEsEx03.ipynb
mit
%matplotlib inline import matplotlib.pyplot as plt import numpy as np import seaborn as sns from scipy.integrate import odeint from IPython.html.widgets import interact, fixed """ Explanation: Ordinary Differential Equations Exercise 3 Imports End of explanation """ g = 9.81 # m/s^2 l = 0.5 # length of pendulum...
gtrichards/QuasarSelection
SpIESHighzCandidateSelection2.ipynb
mit
# Read in training data file %matplotlib inline from astropy.table import Table import numpy as np import matplotlib.pyplot as plt data = Table.read('GTR-ADM-QSO-ir-testhighz_findbw_lup_2016_starclean.fits') # X is in the format need for all of the sklearn tools, it just has the colors X = np.vstack([ data['ug'], data...
bjshaw/phys202-2015-work
days/day06/Matplotlib.ipynb
mit
%matplotlib inline import matplotlib.pyplot as plt import numpy as np """ Explanation: Visualization with Matplotlib Learning Objectives: Learn how to make basic plots using Matplotlib's pylab API and how to use the Matplotlib documentation. This notebook focuses only on the Matplotlib API, rather that the broader que...
wbinventor/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...
maxis42/ML-DA-Coursera-Yandex-MIPT
3 Unsupervised learning/Homework/1 banners placing/Размещение баннеров.ipynb
mit
import numpy as np import pandas as pd from sklearn.cluster import MeanShift """ Explanation: Размещение баннеров Представим, что международное круизное агентство Carnival Cruise Line решило себя разрекламировать с помощью баннеров и обратилось для этого к вам. Чтобы протестировать, велика ли от таких баннеров польза,...
dwhswenson/openpathsampling
examples/misc/custom_strategy_repex_shoot_repex.ipynb
mit
%matplotlib inline import matplotlib.pyplot as plt import matplotlib import openpathsampling as paths import numpy as np import openpathsampling.visualize as ops_vis from IPython.display import SVG matplotlib.rcParams.update({'font.size': 16, 'xtick.labelsize': 12, ...
pagutierrez/tutorial-sklearn
notebooks-spanish/04-entrenando_y_generalizando.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: Entrenamiento y test Para evaluar que tal generalizan nuestros modelos supervisados, podemos dividir los datos en un conjunto...
abhi1509/deep-learning
weight-initialization/weight_initialization.ipynb
mit
%matplotlib inline import tensorflow as tf import helper from tensorflow.examples.tutorials.mnist import input_data print('Getting MNIST Dataset...') mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) print('Data Extracted.') """ Explanation: Weight Initialization In this lesson, you'll learn how to fin...
vadim-ivlev/STUDY
coding/Cracking the code interview.ipynb
mit
# from IPython.core.debugger import set_trace def has_unique_characters(str=''): ''' Checks if a string has all unique characters >>> has_unique_characters('abc') True >>> has_unique_characters() True >>> has_unique_characters('abac') False ''' # 1/ time: 1.74 µs ± 14.5 ns ...
ES-DOC/esdoc-jupyterhub
notebooks/awi/cmip6/models/sandbox-3/ocean.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'awi', 'sandbox-3', 'ocean') """ Explanation: ES-DOC CMIP6 Model Properties - Ocean MIP Era: CMIP6 Institute: AWI Source ID: SANDBOX-3 Topic: Ocean Sub-Topics: Timestepping Framework, Advection, ...
CalPolyPat/Python-Workshop
Python Workshop/Scipy.ipynb
mit
import scipy.optimize as opt import numpy as np import matplotlib.pyplot as plt import scipy.interpolate as inter %matplotlib inline #Let's find out what the scipy.optimize.curve_fit function does and how to use it. opt.curve_fit? x = np.linspace(0,10, 200) y = 34*np.sin(x)*np.random.rand(200) plt.plot(x,y) func = ...
QuantCrimAtLeeds/PredictCode
examples/Chicago/Simulate spatial location.ipynb
artistic-2.0
%matplotlib inline import matplotlib.pyplot as plt import geopandas as gpd import os import numpy as np import pandas as pd #filename = os.path.join("/media", "disk", "tl_2013_17031_edges", "tl_2013_17031_edges.shp") filename = os.path.join("..", "..", "..", "..", "..", "Data", "tl_2013_17031_edges", "tl_2013_17031_ed...
ece579/ece579_f17
recitation4/problems/summary.ipynb
mit
raw.take(1) import numpy as np def parse_kdd(line): split = line.split(",") # we will keep just numeric and logical values # discard any string values symbolic_indexes = [1,2,3,41] clean_split = [item for i,item in enumerate(split) if i not in symbolic_indexes] return np.array([float(x) for x ...
malminhas/udacity-deep-learning
5_word2vec.ipynb
apache-2.0
# These are all the modules we'll be using later. Make sure you can import them # before proceeding further. from __future__ import print_function import collections import math import numpy as np import os import random import tensorflow as tf import zipfile from matplotlib import pylab from six.moves import range fro...
pastas/pastas
examples/notebooks/01_basic_model.ipynb
mit
import matplotlib.pyplot as plt import pandas as pd import pastas as ps ps.show_versions() """ Explanation: A Basic Model In this example application it is shown how a simple time series model can be developed to simulate groundwater levels. The recharge (calculated as precipitation minus evaporation) is used as the...
sdpython/pyquickhelper
_unittests/ut_helpgen/data/rst_notebooks/exemple_of_fix_menu.ipynb
mit
<div style="position:absolute; top:10px; right:5px; width:100px; height:90px; margin:10px;"> [Section 1](#Section-1) -- [Section 2](#Section-2) -- [This is the end](#This-is-the-end.) </div> """ Explanation: Example of a notebook with a javascript menu It is sometimes difficult to navigate through long notebooks. Re...
nadvamir/deep-learning
tensorboard/Anna_KaRNNa_Summaries.ipynb
mit
import time from collections import namedtuple import numpy as np import tensorflow as tf """ Explanation: Anna KaRNNa In this notebook, I'll build a character-wise RNN trained on Anna Karenina, one of my all-time favorite books. It'll be able to generate new text based on the text from the book. This network is base...
dietmarw/EK5312_ElectricalMachines
Chapman/Ch1-Problem_1-05.ipynb
unlicense
%pylab notebook %precision %.4g from scipy import constants as c # we like to use some constants """ Explanation: Excercises Electric Machinery Fundamentals Chapter 1 Problem 1-5 End of explanation """ phi = 0.005 # Wb """ Explanation: Description A ferromagnetic core is shown in Figure P1-2: <img src="figs/Fi...
bhattacharjee/courses
CourseraDeepLearningSpecialization/2.HyperparameterTrainingRegularizationAndOptimization/Week1/Exercises/Initialization.ipynb
mit
import numpy as np import matplotlib.pyplot as plt import sklearn import sklearn.datasets from init_utils import sigmoid, relu, compute_loss, forward_propagation, backward_propagation from init_utils import update_parameters, predict, load_dataset, plot_decision_boundary, predict_dec %matplotlib inline plt.rcParams['f...
jgarciab/wwd2017
class8/class8_dimensionality_reduction.ipynb
gpl-3.0
##Some code to run at the beginning of the file, to be able to show images in the notebook ##Don't worry about this cell #Print the plots in this screen %matplotlib inline #Be able to plot images saved in the hard drive from IPython.display import Image #Make the notebook wider from IPython.core.display import dis...
naru-T/2017FOSS4GHOKKAIDO
FOSS4G_Hokkaido.ipynb
mit
from IPython.display import Image, display, HTML %matplotlib inline from pylab import * import datetime import math import time import ee ee.Initialize() """ Explanation: Global-scale MODIS NDVI time series analysis (with interpolation) A material for the presentation in FOSS4G-Hokkaido on 1st July 2017. Copyright ...
vtsatskin/Hot-Car-Data-Collection
IRIS Dataset.ipynb
mit
import matplotlib.pyplot as plt import numpy as np import os from skimage import data from skimage import io from skimage.transform import resize from skimage.color import rgb2gray from scipy.misc import bytescale %matplotlib inline WINDOW_WIDTH = 18 WINDOW_HEIGHT = 26 sample_iris_frame = data.imread('external_data/i...
mjones01/NEON-Data-Skills
code/Python/neonUtilities/neonUtilitiesPython.ipynb
agpl-3.0
pip install rpy2 """ Explanation: syncID: 5be9f80592394af3bc09cf8e469fef6e title: "Using neonUtilities in Python" description: "Use the neonUtilities R package in Python, via the rpy2 library." dateCreated: 2018-5-10 authors: Claire K. Lunch contributors: estimatedTime: 20 minutes packagesLibraries: rpy2 topics: data...
cchuang2009/DyLabIPy
DiffEq/SIR.ipynb
gpl-3.0
%matplotlib inline import numpy as np import matplotlib.pyplot as plt from numpy import log from scipy import integrate from scipy.optimize import fsolve import scipy.linalg as la import scipy.integrate as spi from IPython.html.widgets import interact, interactive, fixed from IPython.html import widgets #from matplot...
helgako/cms-dqm
notebooks/correlations.ipynb
mit
%matplotlib inline import matplotlib.pyplot as plt plt.style.use('ggplot') import numpy as np import pandas as pd import collections import re DATA_PATH = 'merged.pickle' LABELS_PATH = './quality_2010/labels_v2.pickled' import cPickle as pickle with open(DATA_PATH, 'r') as f: data = pickle.load(f) with open(LA...
Jackporter415/phys202-2015-work
assignments/assignment04/MatplotlibEx02.ipynb
mit
%matplotlib inline import matplotlib.pyplot as plt import numpy as np """ Explanation: Matplotlib Exercise 2 Imports End of explanation """ !head -n 30 open_exoplanet_catalogue.txt """ Explanation: Exoplanet properties Over the past few decades, astronomers have discovered thousands of extrasolar planets. The follo...
GoogleCloudPlatform/training-data-analyst
courses/machine_learning/deepdive2/production_ml/labs/samples/core/kubeflow_tf_serving/kubeflow_tf_serving.ipynb
apache-2.0
# Set your output and project. !!!Must Do before you can proceed!!! project = 'Your-Gcp-Project-ID' #'Your-GCP-Project-ID' model_name = 'model-name' # Model name matching TF_serve naming requirements import time ts = int(time.time()) model_version = ...
kemerelab/NeuroHMM
StateClustering.ipynb
mit
import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns import sys sys.path.insert(0, 'helpers') from efunctions import * # load my helper function(s) to save pdf figures, etc. from hc3 import load_data, get_sessions from hmmlearn import hmm # see https://github.com/ckemere/hmmlea...
magenta/ddsp
ddsp/colab/tutorials/3_training.ipynb
apache-2.0
# Copyright 2021 Google LLC. 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 applicable law or a...
steinam/teacher
jup_notebooks/.ipynb_checkpoints/Subselects_11FI3-checkpoint.ipynb
mit
%load_ext sql %sql mysql://steinam:steinam@localhost/versicherung_complete """ Explanation: Subselect / Unterabfragen) Zur Durchführung einer Abfrage werden Informationen benötigt, die erst durch eine eigene Abfrage geholt werden müssen. Sie können stehen als Vertreter für einen Wert als Vertreter für eine Liste als...
lknelson/text-analysis-2017
04-Dictionaries/00.1-DictionaryMethod_AdditionalExercises.ipynb
bsd-3-clause
import pandas as pd import nltk import matplotlib.pyplot as plt #read in our data df = ... """ Explanation: Additional Exercises for Dictionary Method Ex. Read in the childrens_lit.csv.bz2 file from the data folder. Come up with a hypothesis on what you think the sentiment ratings is for children's literature. Do ...
franciscodominguezmateos/DeepLearningNanoDegree
sentiment-network/Sentiment_Classification_Projects.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()...
jbwhit/2017-05-PyCon-EDA-Tutorial
notebooks/2017-02-24-djm-redcard-eda.ipynb
mit
%matplotlib inline import numpy as np import matplotlib.pyplot as plt import pandas as pd %%time df = pd.read_csv('../data/redcard/crowdstorm_disaggregated.csv.gz', compression='gzip') """ Explanation: Are soccer referees more likely to give red cards to dark skin toned players than light skin toned players? End of...
phoebe-project/phoebe2-docs
2.2/tutorials/meshes.ipynb
gpl-3.0
!pip install -I "phoebe>=2.2,<2.3" """ Explanation: Accessing and Plotting Meshes 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 """ %matplotli...
chunweixu/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...
GoogleCloudPlatform/ml-design-patterns
04_hacking_training_loop/overfitting.ipynb
apache-2.0
import os import numpy as np import pandas as pd import tensorflow as tf import matplotlib.pyplot as plt from tensorflow import keras from tensorflow import feature_column as fc from tensorflow.keras import layers, models, Model %matplotlib inline df = pd.read_csv("./data/babyweight_train.csv") """ Explanation: Ove...
rahulkgup/deep-learning-foundation
language-translation/dlnd_language_translation.ipynb
mit
""" DON'T MODIFY ANYTHING IN THIS CELL """ import helper import problem_unittests as tests source_path = 'data/small_vocab_en' target_path = 'data/small_vocab_fr' source_text = helper.load_data(source_path) target_text = helper.load_data(target_path) """ Explanation: Language Translation In this project, you’re going...
natematias/research_in_python
instrumental_variables_estimation/Instrumental-Variables Estimation.ipynb
mit
# THINGS TO IMPORT # This is a baseline set of libraries I import by default if I'm rushed for time. import codecs # load UTF-8 Content import json # load JSON files import pandas as pd # Pandas handles dataframes import numpy as np # Numpy handles...
tallakahath/pymatgen
examples/Basic functionality.ipynb
mit
import pymatgen as mg """ Explanation: Introduction This notebook demostrates the core functionality of pymatgen, including the core objects representing Elements, Species, Lattices, and Structures. By convention, we import pymatgen as mg. End of explanation """ si = mg.Element("Si") print("Atomic mass of Si is {}"...
Abjad/intensive
day-2/1-rhythms-by-hand.ipynb
mit
%load_ext abjadext.ipython import abjad import random durations = [] numerators = range(16) denominators = [2**x for x in range(1, 5)] for x in range(10): numerator = random.choice(numerators) denominator = random.choice(denominators) duration_token = (numerator, denominator) duration = abjad.Duration(...
phoebe-project/phoebe2-docs
2.3/tutorials/constraints.ipynb
gpl-3.0
#!pip install -I "phoebe>=2.3,<2.4" import phoebe from phoebe import u # units import numpy as np import matplotlib.pyplot as plt logger = phoebe.logger() b = phoebe.default_binary() """ Explanation: Constraints Setup Let's first make sure we have the latest version of PHOEBE 2.3 installed (uncomment this line if r...
probml/pyprobml
notebooks/misc/poly_regression_torch.ipynb
mit
import numpy as np import matplotlib.pyplot as plt np.random.seed(seed=1) import math import torch from torch import nn from torch.nn import functional as F from torch.utils import data from IPython import display !mkdir figures # for saving plots import warnings warnings.filterwarnings("ignore") # For reproducin...
LedaLima/incubator-spot
spot-oa/oa/flow/ipynb_templates/Advanced_Mode_master.ipynb
apache-2.0
import datetime import pandas as pd import numpy as np import linecache, bisect import os spath = os.getcwd() path = spath.split("/") date = path[len(path)-1] """ Explanation: Apache Spot's Ipython Advanced Mode Netflows This guide provides examples about how to request data, show data with some cool libraries like p...
grlurton/orbf_data_validation
notebooks/reporting/Algorithm AEDES.ipynb
mit
import sys sys.path.insert(0, '../../src/monitoring_algorithms/') from aedes_algorithm import * %matplotlib inline store = pd.HDFStore('../../data/processed/orbf_benin.h5') tarifs = store['tarifs'] data = store['data'] store.close() data = data[data.period.apply(str).str[0:4] == '2016'] data = data[data.date < '2016...
LSSTC-DSFP/LSSTC-DSFP-Sessions
Sessions/Session07/Day4/LetsGetNetworking.ipynb
mit
# install software on the backend, which is located at # Google's Super Secret Sky Server in an alternate universe. # The backend is called a 'hosted runtime' if it is on their server. # A local runtime would start a colab notebook on your machine locally. # Think of google colab as a Google Docs version of Jupyter N...
hannorein/variations
Figure6.ipynb
gpl-3.0
import rebound import numpy as np %matplotlib inline import matplotlib import matplotlib.pyplot as plt from matplotlib.colors import LogNorm from timeit import Timer print(rebound.__build__) """ Explanation: Figure 6 This notebook recreates Figure 6 in Rein & Tamayo 2016. The figure illustrates the scaling of second o...
prodicus/dabble
nltk/.ipynb_checkpoints/text_classification-checkpoint.ipynb
mit
movie_reviews.categories() """ Explanation: There are a thousand movie reviews for both positive and negetive reviews End of explanation """ documents = [(list(movie_reviews.words(fileid)), category) for category in movie_reviews.categories() for fileid in movie_reviews.fileids(category) ...
skkandrach/foundations-homework
Homework6_Soma.ipynb
mit
#api KEY = c9d64e80aa02ca113562a075e57256d7 https://api.forecast.io/forecast/c9d64e80aa02ca113562a075e57256d7/10.4806,66.9036 import requests response = requests.get("https://api.forecast.io/forecast/c9d64e80aa02ca113562a075e57256d7/10.4806,66.9036") forecast = response.json() print(forecast.keys()) print(forecast...
deflaux/linkage-disequilibrium
datalab/Tag_variant_identification.ipynb
apache-2.0
import gcp.bigquery as bq import matplotlib import matplotlib.pyplot as plt import pandas as pd """ Explanation: <!-- Copyright 2015 Google Inc. All rights reserved. --> <!-- Licensed under the Apache License, Version 2.0 (the "License"); --> <!-- you may not use this file except in compliance with the License. --> <...
GSimas/EEL7045
Problemas - Cap1.ipynb
mit
print("1.1") carga_eletron = 1.602*10**(-19) #coulombs n_eletrons = 1/carga_eletron a = 6.482*10**17 b = 1.24*10**18 c = 2.46*10**19 d = 1.628*10**20 carga_a = -a / n_eletrons carga_b = -b / n_eletrons carga_c = -c / n_eletrons carga_d = -d / n_eletrons print("Carga (a):", carga_a, "C") print("Carga (b):", carga_b, "C"...
awhite40/pymks
notebooks/MD.ipynb
mit
%matplotlib inline %load_ext autoreload %autoreload 2 import numpy as np import matplotlib.pyplot as plt from pymks_share import DataManager manager = DataManager('pymks.me.gatech.edu') manager.list_datasets() X = manager.fetch_data('Molecular Dynamics') """ Explanation: Authors Alexander M. Lohse, 2nd year PhD S...
dbouquin/AstroHackWeek2015
inference/straightline.ipynb
gpl-2.0
%load_ext autoreload %autoreload 2 from __future__ import print_function import numpy as np import matplotlib.pyplot as plt %matplotlib inline plt.rcParams['figure.figsize'] = (6.0, 6.0) plt.rcParams['savefig.dpi'] = 100 from straightline_utils import * """ Explanation: Bayesian Inference II: Fitting a Straight Li...
ES-DOC/esdoc-jupyterhub
notebooks/cams/cmip6/models/cams-csm1-0/ocean.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'cams', 'cams-csm1-0', 'ocean') """ Explanation: ES-DOC CMIP6 Model Properties - Ocean MIP Era: CMIP6 Institute: CAMS Source ID: CAMS-CSM1-0 Topic: Ocean Sub-Topics: Timestepping Framework, Advec...
ES-DOC/esdoc-jupyterhub
notebooks/awi/cmip6/models/sandbox-1/landice.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'awi', 'sandbox-1', 'landice') """ Explanation: ES-DOC CMIP6 Model Properties - Landice MIP Era: CMIP6 Institute: AWI Source ID: SANDBOX-1 Topic: Landice Sub-Topics: Glaciers, Ice. Properties: 3...
Cyb3rWard0g/ThreatHunter-Playbook
docs/notebooks/windows/06_credential_access/WIN-180815210510.ipynb
gpl-3.0
from openhunt.mordorutils import * spark = get_spark() """ Explanation: Active Directory Replication From Non-Domain-Controller Accounts Metadata | | | |:------------------|:---| | collaborators | ['@Cyb3rWard0g', '@Cyb3rPandaH'] | | creation date | 2018/08/15 | | modification date | 2020/...
roatienza/Deep-Learning-Experiments
versions/2020/MLP/code/tf.keras/mlp-mnist.ipynb
mit
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense from tensorflow.keras.utils import to_categorical, plot_model from tensorflow.keras....
dpshelio/2015-EuroScipy-pandas-tutorial
solved - 04 - Groupby operations.ipynb
bsd-2-clause
%matplotlib inline import pandas as pd import numpy as np import matplotlib.pyplot as plt try: import seaborn except ImportError: pass pd.options.display.max_rows = 10 """ Explanation: Groupby operations Some imports: End of explanation """ df = pd.DataFrame({'key':['A','B','C','A','B','C','A','B','C'], ...
Jackporter415/phys202-2015-work
assignments/assignment10/ODEsEx03.ipynb
mit
%matplotlib inline import matplotlib.pyplot as plt import numpy as np import seaborn as sns from scipy.integrate import odeint from IPython.html.widgets import interact, fixed """ Explanation: Ordinary Differential Equations Exercise 3 Imports End of explanation """ g = 9.81 # m/s^2 l = 0.5 # length of pendulum...
tien-le/uranus
tools_numpy.ipynb
mit
from __future__ import division, print_function, unicode_literals """ Explanation: Tools - NumPy NumPy is the fundamental library for scientific computing with Python. NumPy is centered around a powerful N-dimensional array object, and it also contains useful linear algebra, Fourier transform, and random number functi...
espressomd/espresso
doc/tutorials/constant_pH/constant_pH.ipynb
gpl-3.0
# ionization degree alpha calculated from the Henderson-Hasselbalch equation for an ideal system def ideal_alpha(pH, pK): return 1. / (1 + 10**(pK - pH)) """ Explanation: The constant-pH ensemble method for acid-base reactions Expected prior knowledge To work with this tutorial, you should be familiar with the fol...
yongtang/tensorflow
tensorflow/lite/g3doc/tutorials/model_maker_object_detection.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...
planet-os/notebooks
api-examples/swan-oahu-api.ipynb
mit
%matplotlib inline import numpy as np import matplotlib.pyplot as plt import dateutil.parser import datetime from urllib.request import urlopen, Request import simplejson as json """ Explanation: Plotting Data from the Oahu Simulating Waves Nearshore (SWAN) Regional Wave Model Note: this notebook requires python3. Thi...
rishuatgithub/MLPy
torch/PYTORCH_NOTEBOOKS/01-PyTorch-Basics/01-Tensor-Operations.ipynb
apache-2.0
import torch import numpy as np """ Explanation: <img src="../Pierian-Data-Logo.PNG"> <br> <strong><center>Copyright 2019. Created by Jose Marcial Portilla.</center></strong> Tensor Operations This section covers: * Indexing and slicing * Reshaping tensors (tensor views) * Tensor arithmetic and basic operations * Dot ...
sheikhomar/ml
mixtures-of-gaussians.ipynb
mit
import numpy as np import matplotlib.pyplot as plt %matplotlib inline """ Explanation: Mixture of Gaussians End of explanation """ X = np.linspace(-6, 12, 100) def gaussian(X, mu, sigma): a = 1 / (sigma * np.sqrt(2 * np.pi)) return a * np.exp(-np.power(X - mu, 2.) / (2 * sigma * sigma)) fig, ax = plt.sub...
walchko/netscan2
docs/netscan.ipynb
mit
from __future__ import print_function from netscan.lib import WhoIs, GetHostName, MacLookup, Commands import pprint as pp """ Explanation: Netscan Here is a sample of some the capabilities of the netscan library. End of explanation """ print(GetHostName('192.168.1.13').name) print(GetHostName('127.0.0.1').name) """...
rule-lab/ligfit
notebook/.ipynb_checkpoints/Derivation of Binding Equation-checkpoint.ipynb
gpl-3.0
#Kd-prime and Kd-doubleprime as expressions of Kd and alpha (cooperativity) #as well as their concentration ratios kd, alpha, p, l, pl, plp = symbols('K_{D} alpha [P] [L] [PL] [PLP]') kd_p = Eq(kd / 2, p * l / pl) kd_p kd_pp = Eq(2 * kd / alpha, p * pl / plp) kd_pp """ Explanation: The Binding Model The binding mod...
squishbug/DataScienceProgramming
DataScienceProgramming/02-Python/WordFrequencies.ipynb
cc0-1.0
from urllib.request import urlopen # from urllib.request import * # in order to get the help text, we should import the whole subpackage. import urllib.request help(urllib.request) help(urlopen) """ Explanation: Word Frequencies Can we identify different types of text documents based on the frequency of their words...
anilcs13m/MachineLearning_Mastering
sentiment analysis/Analyzing product sentiment.ipynb
gpl-2.0
import graphlab """ Explanation: Predicting sentiment from product reviews Load Graph lab End of explanation """ products = graphlab.SFrame('amazon_baby.gl/') """ Explanation: Read some product review data Loading reviews for a set of baby products. End of explanation """ products.head(5) """ Explanation: Let's ...
noppanit/titanic-random-forest
Titanic Learning from Disaster.ipynb
mit
%matplotlib inline import pandas as pd import numpy as np """ Explanation: Titanic Learning from Disaster We would like to predict survival on the Titanic. https://www.kaggle.com/c/titanic End of explanation """ train = pd.read_csv('train.csv') test = pd.read_csv('test.csv') train.shape train.head() train.Age.his...
tanghaibao/goatools
notebooks/goea_nbt3102_group_results.ipynb
bsd-2-clause
%run goea_nbt3102_fncs.ipynb goeaobj = get_goeaobj_nbt3102('fdr_bh') # Read Nature data from Excel file (~400 study genes) studygeneid2symbol = read_data_nbt3102() # Run Gene Ontology Enrichment Analysis using Benjamini/Hochberg FDR correction geneids_study = studygeneid2symbol.keys() goea_results_all = goeaobj.run_stu...
karlstroetmann/Formal-Languages
Python/Equivalence.ipynb
gpl-2.0
%run Regexp-2-NFA.ipynb """ Explanation: Checking the Equivalence of Regular Expressions In order to check whether two regular expressions $r_1$ and $r_2$ are equivalent, perform the following steps: - convert the regular expressions $r_1$ and $r_2$ into non-deterministic FSMs $F_1$ and $F_2$ such that $L(r_1) = L(...
bobflagg/deepER
notebook/Twitter-NER.ipynb
apache-2.0
def read_data(file_path): tokens = [] tags = [] tweet_tokens = [] tweet_tags = [] for line in open(file_path, encoding='utf-8'): line = line.strip() if not line: if tweet_tokens: tokens.append(tweet_tokens) tags.append(tweet_tags) ...
agvergara/DatatonURJC
Day4/Lab_4.ipynb
gpl-3.0
#read data using pandas import pandas as pd import numpy as np boston_df = pd.read_csv('boston.csv') #verify whether ther exisits NaN print np.sum(boston_df.isnull()) boston_df boston_df.describe() #get names x_var_names = list(boston_df)[:-1] print x_var_names y_var_names = list(boston_df)[-1] print y_var_nam...
dianafprieto/SS_2017
.ipynb_checkpoints/05_NB_VTKPython_Scalar-checkpoint.ipynb
mit
%gui qt import vtk from vtkviewer import SimpleVtkViewer #help(vtk.vtkRectilinearGridReader()) """ Explanation: <img src="imgs/header.png"> Visualization techniques for scalar fields in VTK + Python Reminder: The VTK pipeline <img src="imgs/vtk_pipeline.png", align=left> $~$ Visualizing data within a recilinear grid T...
google/tf-quant-finance
tf_quant_finance/examples/jupyter_notebooks/Introduction_to_TensorFlow_Part_3_-_Advanced_Tensor_Manipulation.ipynb
apache-2.0
#@title Licensed under the Apache License, Version 2.0 (the "License"); { display-mode: "form" } # 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, sof...
danecollins/pyawr
awr_nb/measurement_to_dataframe.ipynb
mit
import os import pandas as pd from pyawr import connect, AwrMeas, as_list, meas_from_graph, open_example # connect to AWRDE awrde, awrc = connect() # awrde is the pointed to the awrde COM object while awrc is the AWR defined constants # Open the lumped filter example open_example(awrde, 'LPF_lumped.emp') # Let's se...
parrt/msan692
notes/dict.ipynb
mit
p = (32,9,9732) print(type(p)) print(p) """ Explanation: Associations and dictionaries In mathematics, we group numbers or other elements in parentheses, thus, forming a tuple. For example, to represent a three-dimensional Euclidean point, we'd use 3-tuple notation like (32,9,9732). Python uses the same mathematical ...
nproctor/phys202-2015-work
assignments/assignment06/ProjectEuler17.ipynb
mit
import numpy as np numbers = {0: "", 1:"one", 2:"two", 3:"three", 4:"four", 5:"five", 6:"six", 7:"seven", 8:"eight", 9:"nine", 10:"ten", 11:"eleven", 12:"twelve", 13:"thirteen", 14:"fourteen", 15:"fifteen", 16:"sixteen", 17:"seventeen", 18:"eighteen", 19:"nineteen", 20:"twenty", 30:"thirty", 40:"fo...
InsightLab/data-science-cookbook
2019/02-python-bibliotecas-manipulacao-dados/pandas_basico.ipynb
mit
import pandas as pd import numpy as np """ Explanation: Pandas Importando o Pandas e o NumPy End of explanation """ """ Apenas a partir dos valores """ obj = pd.Series([4, 7, -5, 3]) obj obj.values obj.index """ A partir dos valores e dos índices """ obj2 = pd.Series([4, 7, -5, 3], index=['d','b','a','c']) obj2...
cliburn/sta-663-2017
worksheet/04_Working_With_Numbers_Solutions.ipynb
mit
def f(n): x = np.ones((n, n)).astype('int') for i in range(1, (n+1)//2): x[i:-i, i:-i] += 1 return x f(13) """ Explanation: 1. Write a function to generate square arrays of size $n \times n$ that increment by one in layers. For example, for n=11, we have array([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], ...
kit-cel/wt
nt2_ce2/vorlesung/ch_4_diversity/ber_fading.ipynb
gpl-2.0
# importing import numpy as np from scipy import stats import matplotlib.pyplot as plt import matplotlib # showing figures inline %matplotlib inline # plotting options font = {'size' : 30} plt.rc('font', **font) #plt.rc('text', usetex=True) matplotlib.rc('figure', figsize=(30, 12) ) """ Explanation: Content and...
Mashimo/datascience
02-Classification/TensorFlow regularisation .ipynb
apache-2.0
import tensorflow as tf print(tf.__version__) """ Explanation: Regularisation with Tensorflow Previously, we have seen how to build in Tensorflow an end-to-end workflow for training, evaluating and predicting from deep learning models. Now we are going to look at adding some important features. We will look at how we ...
djfan/yelp-challenge
data_urbana_champaign/UC01_Data_PreProcess_Uurbana_Champaign.ipynb
mit
import seaborn import pandas as pd import pylab as pl import yaml %pylab inline df = pd.read_pickle("../yelp-challenge/data_urbana_champaign/business_urbana_champaign.p") df.reset_index(drop=True, inplace=True) print df.shape print df.columns.values len(df.business_id.unique()) """ Explanation: To-Do: * category [lis...
ES-DOC/esdoc-jupyterhub
notebooks/uhh/cmip6/models/sandbox-3/atmoschem.ipynb
gpl-3.0
# DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'uhh', 'sandbox-3', 'atmoschem') """ Explanation: ES-DOC CMIP6 Model Properties - Atmoschem MIP Era: CMIP6 Institute: UHH Source ID: SANDBOX-3 Topic: Atmoschem Sub-Topics: Transport, Emissions Co...
turbomanage/training-data-analyst
blogs/bqml/taxifare_bqml.ipynb
apache-2.0
%pip install google-cloud-bigquery seaborn """ Explanation: <h1> Structured data prediction using BigQuery ML </h1> This notebook illustrates: <ol> <li> Training Machine Learning models using BQML <li> Predicting with model <li> Using spatial queries in BigQuery <li> Building a linear regression model with feature cr...
ocelot-collab/ocelot
demos/ipython_tutorials/pfs_4_synchrotron_radiation_visualization.ipynb
gpl-3.0
import numpy as np import logging from ocelot import * from ocelot.rad import * from ocelot.optics.wave import dfl_waistscan, screen2dfl, RadiationField from ocelot.gui.dfl_plot import plot_dfl, plot_dfl_waistscan from ocelot import ocelog ocelog.setLevel(logging.ERROR) #suppress logger output # Activate interactive ...
eng-tools/sfsimodels
examples/saving_and_loading_objects.ipynb
mit
import numpy as np import json import sfsimodels as sm """ Explanation: Saving and loading objects End of explanation """ # Set the void ratio and specific gravity sl = sm.Soil() sl.id = 1 # Must set an id before saving sl.e_curr = 0.7 assert sl.unit_dry_weight is None sl.specific_gravity = 2.95 assert np.isclose(...
dietmarw/EK5312_ElectricalMachines
Chapman/Ch6-Problem_6-01.ipynb
unlicense
%pylab notebook """ Explanation: Excercises Electric Machinery Fundamentals Chapter 6 Problem 6-1 End of explanation """ fse = 50 # [Hz] p = 6 s = 3.5/100 """ Explanation: Description A 220-V three-phase six-pole 50-Hz induction motor is running at a slip of 3.5 percent. End of explanation """ n_s...
UWSEDS/LectureNotes
PreFall2018/Deep-and-Shallow-Copies.ipynb
bsd-2-clause
# BUGGY Code # Create a list list1 = [1, 2, 3] # Make a copy list2 = list1 # Update the copy list2.append(4) # BUG: list1 has changed too! print(list1, list2) """ Explanation: Deep and Shallow Copies This short lecture addresses a common source of bugs in python (and other languages). This is illustrated below. End o...
piscataway/datascience
lab/02 Regression-v1.ipynb
mit
from numpy import * # y = mx + b # m is slope, b is y-intercept # here we are calculating the sum of squared error by using the equation which we have seen. def compute_error_for_line_given_points(b, m, points): totalError = 0 for i in range(0, len(points)): x = points[i, 0] y = points[i, 1] ...
henrysky/astroNN
demo_tutorial/NN_uncertainty_analysis/Uncertainty_Demo_MNIST.ipynb
mit
%matplotlib inline %config InlineBackend.figure_format='retina' from tensorflow.keras.datasets import mnist from tensorflow.keras import utils import numpy as np import pylab as plt from astroNN.models import MNIST_BCNN """ Explanation: Classification Uncertainty Analysis in Bayesian Deep Learning with Dropout Varia...
sanjayankur31/nest-simulator
doc/userdoc/model_details/siegert_neuron_integration.ipynb
gpl-2.0
import numpy as np from scipy.special import erf, erfcx import matplotlib.pyplot as plt """ Explanation: Siegert neuron integration Alexander van Meegen, 2020-12-03 This notebook describes how NEST handles the numerical integration of the 'Siegert' function. For an alternative approach, which was implemented in NEST b...
heprom/pymicro
examples/SampleDataUserGuide/3_SampleData_Image_groups.ipynb
mit
from pymicro.core.samples import SampleData as SD from config import PYMICRO_EXAMPLES_DATA_DIR # import file directory path import os dataset_file = os.path.join(PYMICRO_EXAMPLES_DATA_DIR, 'test_sampledata_ref') # test dataset file path data = SD(filename=dataset_file) """ Explanation: 4 - Creating, getting and visua...