repo_name stringlengths 6 77 | path stringlengths 8 215 | license stringclasses 15
values | content stringlengths 335 154k |
|---|---|---|---|
tensorflow/docs-l10n | site/zh-cn/hub/tutorials/tf2_semantic_approximate_nearest_neighbors.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... |
kyclark/metagenomics-book | python/map/Gematria.ipynb | gpl-3.0 | print('"{}" = "{}"'.format('A', ord('A')))
print('"{}" = "{}"'.format('a', ord('a')))
print('"{}" = "{}"'.format(88, chr(88)))
print('"{}" = "{}"'.format(112, chr(112)))
"""
Explanation: "Gematria" is a system for assigning a number to a word by summing the numeric values of each of the letters as defined by the Mispa... |
Elucidation/tensorflow_chessbot | tensorflow_generate_training_data.ipynb | mit | # Imports
import numpy as np
import PIL
import os
from IPython.display import Image, display
import helper_webkit2png # Contains screenshot helpers and our wrapper ChessScreenshotServer
helper_webkit2png = reload(helper_webkit2png)
import tensorflow_chessbot # For generating tilesets from chessboard screenshots
# relo... |
harishkrao/DSE200x | Week-1-Intro-new/Introduction to Data Science in Python - Soccer Data Analysis.ipynb | mit | import sqlite3
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.cluster import KMeans
from sklearn.preprocessing import scale
from customplot import *
"""
Explanation: <br><br><center><h1 style="font-size:4em;color:#2467C0">Week 1: Soccer Data Analysis</h1></center>
<br>
<table>
<col... |
ajgpitch/qutip-notebooks | examples/smesolve-inefficient-detection.ipynb | lgpl-3.0 | %matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
from qutip import *
from qutip.expect import expect_rho_vec
from matplotlib import rcParams
rcParams['font.family'] = 'STIXGeneral'
rcParams['mathtext.fontset'] = 'stix'
rcParams['font.size'] = '14'
"""
Explanation: Inefficient photon detection:... |
ES-DOC/esdoc-jupyterhub | notebooks/miroc/cmip6/models/nicam16-7s/aerosol.ipynb | gpl-3.0 | # DO NOT EDIT !
from pyesdoc.ipython.model_topic import NotebookOutput
# DO NOT EDIT !
DOC = NotebookOutput('cmip6', 'miroc', 'nicam16-7s', 'aerosol')
"""
Explanation: ES-DOC CMIP6 Model Properties - Aerosol
MIP Era: CMIP6
Institute: MIROC
Source ID: NICAM16-7S
Topic: Aerosol
Sub-Topics: Transport, Emissions, C... |
lamastex/scalable-data-science | _360-in-525/2018/02/SimonLindgren/MeTooInJupyterIpythonNBAction/Simon_MetooStep2.ipynb | unlicense | import pandas as pd
pd.set_option('display.max_colwidth', -1)
from string import punctuation
from collections import defaultdict
from gensim import corpora, models, matutils
from nltk.stem.wordnet import WordNetLemmatizer
from nltk.corpus import stopwords
import re
import glob
"""
Explanation: Simon #metoo step2
E... |
laurensvalk/devbots | jupyter/dynamics-plots.ipynb | mit | from plotly.offline import init_notebook_mode, iplot # from plotly.offline import init_notebook_mode, iplot #
from plotly.graph_objs import Scatter, Figure, Layout
init_notebook_mode(connected=True)
from IPython.display import display, HTML
import numpy as np
from scipy.integrate import odeint
"""
Explanation: Confi... |
CalPolyPat/phys202-2015-work | assignments/assignment05/InteractEx04.ipynb | mit | %matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
from IPython.html.widgets import interact, interactive, fixed
from IPython.display import display
"""
Explanation: Interact Exercise 4
Imports
End of explanation
"""
def random_line(m, b, sigma, size=10):
"""Create a line y = m*x + b + N(0,si... |
boffi/boffi.github.io | dati_2018/02/aliasing.ipynb | mit | %pylab inline
"""
Explanation: Aliasing
Given a sampling rate $\Delta t$, we want to show that a harmonic function (here, a cosine)
with a frequency higher than the the Nyquist frequency $\omega_\text{Ny} = \frac{\pi}{\Delta t}$
cannot be distinguished by a lower frequency harmonic, sampled with the same time step.
De... |
philferriere/tfoptflow | tfoptflow/pwcnet_eval_sm-6-2-cyclic-chairsthingsmix-fp16.ipynb | mit | """
pwcnet_eval.ipynb
PWC-Net model evaluation.
Written by Phil Ferriere
Licensed under the MIT License (see LICENSE for details)
"""
from __future__ import absolute_import, division, print_function
import sys
from copy import deepcopy
import tensorflow as tf
from dataset_base import _DEFAULT_DS_VAL_OPTIONS
from da... |
dtamayo/MachineLearning | Day1/03_machine_learning_intro.ipynb | gpl-3.0 | # import load_iris function from datasets module
from sklearn.datasets import load_iris
# save "bunch" object containing iris dataset and its attributes
iris = load_iris()
type(iris)
# print the iris data
print iris.data
"""
Explanation: Machine Learning in Python with Scikit-learn
From Kevin Markham's video series:... |
hankcs/HanLP | plugins/hanlp_demo/hanlp_demo/zh/cor_restful.ipynb | apache-2.0 | !pip install hanlp_restful -U
"""
Explanation: <h2 align="center">点击下列图标在线运行HanLP</h2>
<div align="center">
<a href="https://colab.research.google.com/github/hankcs/HanLP/blob/doc-zh/plugins/hanlp_demo/hanlp_demo/zh/cor_restful.ipynb" target="_blank"><img src="https://colab.research.google.com/assets/colab-badge.s... |
ttlekich/ds_practice | finance/02_Time_Series_Data.ipynb | mit | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
"""
Explanation: Time Series Data
End of explanation
"""
from datetime import datetime
my_year = 2017
my_month = 10
my_day = 14
my_hour = 15
my_minute = 30
my_second = 15
"""
Explanation: Working with Datetime Objects
End of ... |
dsacademybr/PythonFundamentos | Cap03/Notebooks/DSA-Python-Cap03-Exercicios-Loops-Condiconais-Solucao.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 3</font>
Download: http://github.com/dsacademybr
End of explanation
"""
# Exerc... |
miykael/nipype_tutorial | notebooks/basic_data_input.ipynb | bsd-3-clause | import nipype.interfaces.io as nio
datasource1 = nio.DataGrabber()
datasource1.inputs.base_directory = '/data/ds000114'
datasource1.inputs.template = 'sub-01/ses-test/func/sub-01_ses-test_task-fingerfootlips_bold.nii.gz'
datasource1.inputs.sort_filelist = True
results = datasource1.run()
results.outputs
"""
Explanatio... |
UWSEDS/LectureNotes | save/13-Structured-Query-Language/SEDS-SQL-lecture.ipynb | bsd-2-clause | %load_ext sql
"""
Explanation: Seattle Crime Data
Connect to a database
We will first load the SQL extension:
End of explanation
"""
%sql postgresql://dssg_student:password@seds-sql.csya4zsfb6y4.us-east-1.rds.amazonaws.com/dssg2016
"""
Explanation: We will connect to a database which lives on AWS. The format for c... |
subutai/htmresearch | projects/neural_correlations/EXP2-HighOrder/NeuCorr_Exp2.ipynb | agpl-3.0 | import numpy as np
import random
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from nupic.bindings.algorithms import TemporalMemory as TM
from htmresearch.support.neural_correlations_utils import *
uintType = "uint32"
random.seed(1)
symbolsPerSequence = 10
numSequences = 1000
epochs = 1... |
denricoNBHS/machine-learning | examples/height-vs-stories.ipynb | gpl-3.0 | %matplotlib inline
#Typical imports
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
import pandas as pd
# plots on fleek
matplotlib.style.use('ggplot')
"""
Explanation: What's in a Story?
The file bldgstories.txt lists the height of various buildings vs. the number of stor... |
saudijack/unfpyboot | Day_01/02_Numpy_Matplotlib/00_Numpy.ipynb | mit | import numpy as np
"""
Explanation: An Introduction to Numerical Computing with Python (numpy)
Reference Documents
<OL>
<LI> <A HREF="https://docs.scipy.org/doc/numpy-dev/user/quickstart.html">Numpy Tutorial</A>
<LI> <A HREF="http://docs.scipy.org/doc/numpy/reference">NumPy Reference</A>
<LI> <A HREF="http://mathesaur... |
SaintlyVi/DLR_DB | DLR Social Surveys Explore.ipynb | mit | import processing.procore as pcore
import features.socios as s
tbls = pcore.loadTables()
print("Stored Data Tables\n")
for k in sorted(list(tbls.keys())):
print(k)
"""
Explanation: Domestic Load Research Programme Social Survey Exploration
This notebook requires access to a data directory with DLR survey data sav... |
Who8MyLunch/ipynb_widget_canvas | notebooks/00 - Readme.ipynb | mit | import IPython
from widget_canvas import CanvasImage
from widget_canvas.image import read
data_image = read('images/Whippet.jpg')
data_image.dtype
data_image.shape
"""
Explanation: Canvas Image Widget for IPython Notebook
Features
Accept image data from Numpy arrays or URLs.
Support Python callback functions for f... |
desihub/desitarget | doc/nb/bgs-morphology-properties.ipynb | bsd-3-clause | import os
import numpy as np
import matplotlib.pyplot as plt
import fitsio
from astropy.table import Table
from corner import corner
plt.style.use('seaborn-talk')
%matplotlib inline
basicdir = os.path.join(os.getenv('IM_DATA_DIR'), 'upenn-photdec', 'basic-catalog', 'v2')
adddir = os.path.join(os.getenv('IM_DATA_DIR'... |
statsmodels/statsmodels.github.io | v0.12.2/examples/notebooks/generated/glm_formula.ipynb | bsd-3-clause | import statsmodels.api as sm
import statsmodels.formula.api as smf
star98 = sm.datasets.star98.load_pandas().data
formula = 'SUCCESS ~ LOWINC + PERASIAN + PERBLACK + PERHISP + PCTCHRT + \
PCTYRRND + PERMINTE*AVYRSEXP*AVSALK + PERSPENK*PTRATIO*PCTAF'
dta = star98[['NABOVE', 'NBELOW', 'LOWINC', 'PERASIAN', 'PE... |
jhidding/adhesion-example | notebook/NBody simulation.ipynb | gpl-3.0 | import cft
import numpy as np
from numpy import fft, random
import gnuplot as gp
import os
N = 128
B_m = cft.Box(2, N, 50.0)
A = 40
seed = 6
Power_spectrum = cft.Power_law(0) * cft.Scale(B_m, 0.0) * cft.Cutoff(B_m)
phi = cft.garfield(B_m, Power_spectrum, cft.Potential(), seed) * A
rho = cft.garfield(B_m, Power_spectru... |
cosmolejo/Fisica-Experimental-3 | Minimos_Cuadrados/.ipynb_checkpoints/Minimos_Cuadrados-checkpoint.ipynb | gpl-3.0 | ########################################################
## Librerias para el trabajo
########################################################
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
data1= np.loadtxt('datos.csv',delimiter=',') #datos para regresion lineal
X1=data1[:,0]
Y1=data1[:,1]
pri... |
dlab-geo/geocoding-geopy | intro-geocoding.ipynb | mit | import json
import requests
import pandas as pd
import geopy
from pprint import pprint
"""
Explanation: Introductory Geocoding and Mapping
Juan Shishido, Andrew Chong, Patty Frontiera
Adapted from Juan Shishido's tutorial at: http://people.ischool.berkeley.edu/~juanshishido/geocoding-workshop/intro-geocoding.html
Scho... |
roatienza/Deep-Learning-Experiments | versions/2022/tools/python/input_demo.ipynb | mit | import torchaudio
import torchvision
import torch
import matplotlib.pyplot as plt
from IPython.display import Audio
"""
Explanation: Load and visualize input data using torchvision and torchaudio
Let us load the python modules first.
End of explanation
"""
img = torchvision.io.read_image("data/birdie2.jpg")
img = to... |
tensorflow/docs-l10n | site/zh-cn/hub/tutorials/tweening_conv3d.ipynb | apache-2.0 | # Copyright 2019 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... |
fmaschler/networkit | Doc/uploads/docs/SpectralCentrality.ipynb | mit | cd ../../
import networkit
G = networkit.graphio.readGraph("input/celegans_metabolic.graph", networkit.Format.METIS)
"""
Explanation: Centrality
This evaluates the Eigenvector Centrality and PageRank implemented in Python against C++-native EVZ and PageRank. The Python implementation uses SciPy (and thus ARPACK) to ... |
capn-freako/ibisami | example/ibisami_Example_Models_Tester.ipynb | bsd-3-clause | %matplotlib inline
from matplotlib import pyplot as plt
from numpy import array
from pyibisami import amimodel as ami
# gTxDLLName = "example_tx_x86_amd64.so"
gTxDLLName = "example_tx_x86.dll"
gBitRate = 10.e9
gSampsPerBit = 32
gNumBits = 100
bit_time = 1. / gBitRate
sample_interval = bit... |
ujfjhz/vnpy | vnpy/api/datayes/static/tutorial.ipynb | mit | from storage import *
myConfig = Config(head="Zed's Config",
token='7c2e59e212dbff90ffd6b382c7afb57bc987a99307d382b058af6748f591d723')
myConfig.body
"""
Explanation: VN.DATAYES - Welcome!
1. Preface
1.1
vn.datayes是一个从属于vnpy的开源历史数据模块;使用通联数据API以及MongoDB进行数据的下载和存储管理。项目目前与将来主要解决\准备解决以下问题:
从通联数据等API高效... |
WNoxchi/Kaukasos | pytorch/tutorial_60-min-blitz_20181013.ipynb | mit | import torch
x = torch.empty(5,3); x
x = torch.rand(5,3); x
x = torch.zeros(5,3, dtype=torch.long); x
x = torch.tensor([5.5, 3]); x
x = x.new_ones(5, 3, dtype=torch.double) # new_* methods take in sizes
print(x)
x = torch.rand_like(x, dtype=torch.float) # override dtype
print(x) ... |
katelynneese/dmdd | .ipynb_checkpoints/Testing Simulation_AM-checkpoint.ipynb | mit | print dmdd.dRdQ_AM(Q = [100.], sigma_si = 75.5)
print dmdd.rate_UV.dRdQ(Q = np.asarray([100.]), sigma_si = 75.5)
print dmdd.dRdQ_AM(Q = [100.], sigma_si = 75.5, time = 365)
"""
Explanation: This cell demonstrates that dRdQ_AM has the same value as dRdQ at day 0 and day 365, when the v_lag is = 220.
End of explanatio... |
AaronCWong/phys202-2015-work | assignments/assignment05/InteractEx01.ipynb | mit | %matplotlib inline
from matplotlib import pyplot as plt
import numpy as np
from IPython.html.widgets import interact, interactive, fixed
from IPython.display import display
"""
Explanation: Interact Exercise 01
Import
End of explanation
"""
def print_sum(a, b):
c = a + b
print (c)
"""
Explanation: Interact... |
eusebioaguilera/scalablemachinelearning | Lab01/ML_lab1_review_student.ipynb | gpl-3.0 | labVersion = 'cs190_week1_v_1_2'
"""
Explanation: Math and Python review and CTR data download
This notebook reviews vector and matrix math, the NumPy Python package, and Python lambda expressions. It also covers downloading the data required for Lab 4, where you will analyze website click-through rates. Part 1 cove... |
goddoe/CADL | session-5/session-5-part-1-new.ipynb | apache-2.0 | # First check the Python version
import sys
if sys.version_info < (3,4):
print('You are running an older version of Python!\n\n',
'You should consider updating to Python 3.4.0 or',
'higher as the libraries built for this course',
'have only been tested in Python 3.4 and higher.\n')
... |
oroszl/szamprob | notebooks/Package01/mintapelda01.ipynb | gpl-3.0 | # ez az első megjegyzés
SPAM = 1 # ez a második megjegyzés
# ... és ez a harmadik.
STRING = "# Ez nem megjegyzés, mert idézőjelekben van."
"""
Explanation: Első lépések Pythonban, ismerkedés a változókkal
Ebben a notebookban rövid példákon keresztül megismerkedünk a Python nyel... |
ioam/scipy-2017-holoviews-tutorial | solutions/02-customizing-visual-appearance-with-solutions.ipynb | bsd-3-clause | import pandas as pd
import holoviews as hv
hv.extension('bokeh', 'matplotlib')
"""
Explanation: <a href='http://www.holoviews.org'><img src="assets/hv+bk.png" alt="HV+BK logos" width="40%;" align="left"/></a>
<div style="float:right;"><h2>02. Customizing Visual Appearance</h2></div>
Section 01 focused on specifying e... |
ltiao/notes | Concatenating Basis Functions with Heterogeneous Data.ipynb | unlicense | import numpy as np
from scipy.spatial.distance import cdist
from scipy.special import expit
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.pipeline import make_pipeline, make_union
from sklearn.preprocessing import PolynomialFeatures
from sklearn.linear_model import LinearRegression
from sklear... |
alfkjartan/control-computarizado | state-space/notebooks/Output feedback controller for the harmonic oscillator-observer canonical form.ipynb | mit | import numpy as np
import sympy as sy
sy.init_printing(use_latex='mathjax', order='lex')
h,omega0 = sy.symbols('h,omega0', real=True, positive=True)
z = sy.symbols('z')
beta = sy.cos(omega0*h)
Phi = sy.Matrix([[2*beta, 1],[-1, 0]])
Gamma = sy.Matrix([[1-beta],[1-beta]])
C = sy.Matrix([[1, 0]])
H = sy.simplify(C*(z*sy.... |
nelson-liu/lectures | 2015-2016.Meetings/05.deep-learning-with-keras/mnist_mlp_uncensored.ipynb | mit | from __future__ import print_function
import numpy as np
np.random.seed(1337) # for reproducibility
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation
from keras.optimizers import SGD, Adam, RMSprop
from keras.utils import np_utils
(X_train, ... |
cs207-project/TimeSeries | docs/Web_service_demo.ipynb | mit | # server = subprocess.Popen(['python', '../go_persistent_server.py'])
# time.sleep(3)
# web = subprocess.Popen(['python', '../go_web.py'])
# time.sleep(3)
web_interface = WebInterface()
results = web_interface.add_trigger(
'junk', 'insert_ts', None, 'db:one:ts')
assert results[0] == 200
print(results)
r... |
arnicas/eyeo_nlp | python/TFIDF_Clustering.ipynb | cc0-1.0 | %matplotlib inline
# You can ignore the pink warning that appears
import itertools
import math
import nltk
import string
nltk.data.path = ['../nltk_data']
import matplotlib.pyplot as plt
import numpy as np
from scipy.spatial.distance import pdist, squareform
from scipy.cluster.hierarchy import linkage, dendrogram
f... |
JackDi/phys202-2015-work | assignments/assignment04/MatplotlibExercises.ipynb | mit | %matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
"""
Explanation: Visualization 1: Matplotlib Basics Exercises
End of explanation
"""
scatx=np.random.rand(50)
scaty=np.random.randn(50)
f= plt.figure(figsize=(9,6))
plt.scatter(scatx,scaty,c=u'k',marker=u'o',alpha=1)
plt.xlabel('X')
plt.ylabel('Y'... |
winpython/winpython_afterdoc | docs/WASM_almar_klein_demo/EuroPython2018_talk_compacted.ipynb | mit | # in RISE mode, click <Shift>+<Enter> to execute a cell
def find_prime(nth):
n = 0
i = -1
while n < nth:
i = i + 1
if i <= 1:
continue # nope
elif i == 2:
n = n + 1
else:
gotit = 1
for j in range(2, i//2+1):
... |
tgrammat/ML-Data_Challenges | Reinforcement-Learning/TDn-models/01.CliffWalking_with_TD(n)-models.ipynb | apache-2.0 | import gym
import random
import numpy as np
import pandas as pd
import seaborn as sns
from matplotlib import pyplot as plt
from collections import OrderedDict
"""
Explanation: Cliff Walking Problem solved with TD(n) Algorithms: Implementation & Comparisons
1. Load Libraries & Define Environment
End of explanation
"""
... |
JonasHarnau/apc | apc/vignettes/vignette_mesothelioma.ipynb | gpl-3.0 | import apc
# Turn off FutureWarning from statsmodels
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
"""
Explanation: Mesothelioma Mortality
We loosely replicate the empirical parts of Martinez Miranda et al. (2015).
First, import the package
End of explanation
"""
data = apc.asbestos... |
mne-tools/mne-tools.github.io | 0.15/_downloads/plot_rereference_eeg.ipynb | bsd-3-clause | # Authors: Marijn van Vliet <w.m.vanvliet@gmail.com>
# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
#
# License: BSD (3-clause)
import mne
from mne.datasets import sample
from matplotlib import pyplot as plt
print(__doc__)
# Setup for reading the raw data
data_path = sample.data_path()
raw_f... |
dmc-2016/dmc | notebooks/week-6/01-training a RNN model in Keras.ipynb | apache-2.0 | import numpy as np
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import Dropout
from keras.layers import LSTM
from keras.callbacks import ModelCheckpoint
from keras.utils import np_utils
from time import gmtime, strftime
import os
import re
import pickle
import random
import sys
... |
staeiou/wiki-stat-notebooks | deaths/deaths-enwiki-2016.ipynb | mit | import pandas as pd
import matplotlib.pyplot as plt
import matplotlib
import numpy as np
%matplotlib inline
matplotlib.style.use('seaborn-darkgrid')
import pywikibot
site = pywikibot.Site('en', 'wikipedia')
def yearly_death_counts(startyear,endyear):
years = np.arange(startyear,endyear+1) # add 1 to endyear becau... |
tiggerntatie/emagnet.py | solenoids/solenoid.ipynb | mit | %matplotlib inline
from scipy.special import ellipk, ellipe, ellipkm1
from numpy import pi, sqrt, linspace, log
from pylab import plot, xlabel, ylabel, suptitle, legend, show
uo = 4E-7*pi # Permeability constant - units of H/m
# Compute G Factor from unitless parameters
def GFactorUnitless(a, b, g=0.0): # alpha, ... |
amcdawes/QMlabs | Chapter 8 - Alice and Bob.ipynb | mit | from numpy import sin,cos,pi,sqrt,angle,exp,deg2rad,arange,rad2deg
import matplotlib.pyplot as plt
from qutip import *
%matplotlib inline
H = Qobj([[1],[0]])
V = Qobj([[0],[1]])
"""
Explanation: Chapter 8 - Local Realism
with Alice and Bob
End of explanation
"""
def P(theta):
"""The projection operator for a st... |
steinam/teacher | jup_notebooks/datenbanken/mysql_zugriff.ipynb | mit | import MySQLdb
"""
Explanation: Using MySQLdb
mySQLdb - Library has to be pip'ed' before and now to be imported
End of explanation
"""
#Enter the values for you database connection
dsn_database = "verein" # e.g. "MySQLdbtest"
dsn_hostname = "localhost" # e.g.: "mydbinstance.xyz.us-east-1.rds.amazonaws.com"
... |
mzszym/oedes | examples/egdm/unipolar-prb78.ipynb | agpl-3.0 | %matplotlib inline
import matplotlib.pylab as plt
import numpy as np
from oedes.fvm import mesh1d
from oedes import *
from oedes.models import *
from oedes.models.egdm import GaussianDOS, EGDMMobility, egdm_params_simple
init_notebook()
"""
Explanation: Devices with Gaussian Disorder: comparison with constant mobilit... |
elastic/examples | Machine Learning/Analytics Jupyter Notebooks/ml-analytics-classification.ipynb | apache-2.0 | ## imports
import pprint
from elasticsearch import Elasticsearch
import requests
## create a client to connect to Elasticsearch
es_url = 'http://localhost:9200'
es_client = Elasticsearch()
"""
Explanation: Predicting delayed flights with classification analysis
This is a companion Jupyter notebook to the documentatio... |
buncem/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... |
phasedchirp/Assorted-Data-Analysis | exercises/SlideRule-DS-Intensive/Data Wrangling/sliderule_dsi_xml_exercise.ipynb | gpl-2.0 | from xml.etree import ElementTree as ET
"""
Explanation: XML example and exercise
study examples of accessing nodes in XML tree structure
work on exercise to be completed and submitted
reference: https://docs.python.org/2.7/library/xml.etree.elementtree.html
data source: http://www.dbis.informatik.uni-goettinge... |
IS-ENES-Data/submission_forms | test/Templates/.ipynb_checkpoints/form_retrieval-checkpoint.ipynb | apache-2.0 | from dkrz_forms import form_widgets
form_widgets.show_status('form-retrieval')
"""
Explanation: Retrieve your DKRZ data form
Via this form you can retrieve previously generated data forms and make them accessible via the Web again for completion.
Additionally you can get information on the data ingest process status r... |
royalosyin/Python-Practical-Application-on-Climate-Variability-Studies | SeaIce.ipynb | mit | %matplotlib inline
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import datetime
import os
import calendar
import urllib2
import urlparse
from matplotlib.pylab import rcParams
rcParams['figure.figsize'] = 12, 6
"""
Explanation: Sea Ice Extent
This notebook downloads and renders a current grap... |
halfak/are-the-bots-really-fighting | analysis/main/7-2-comment-parsing.ipynb | mit | import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
import glob
import pickle
import numpy as np
import datetime
%matplotlib inline
start = datetime.datetime.now()
"""
Explanation: Section 7.2: Comment parsing
This is a data analysis script for parsing comments as described in... |
dipanjanS/BerkeleyX-CS100.1x-Big-Data-with-Apache-Spark | Week 3 - Data Management/lab2_apache_log_student.ipynb | mit | import re
import datetime
from pyspark.sql import Row
month_map = {'Jan': 1, 'Feb': 2, 'Mar':3, 'Apr':4, 'May':5, 'Jun':6, 'Jul':7,
'Aug':8, 'Sep': 9, 'Oct':10, 'Nov': 11, 'Dec': 12}
def parse_apache_time(s):
""" Convert Apache time format into a Python datetime object
Args:
s (str): date and ti... |
sz2472/foundations-homework | homework_6_shengying_zhao_graded.ipynb | mit | Make a request from the Forecast.io API for where you were born (or lived, or want to visit!)
import requests
!pip3 install requests
#new york
response = requests.get("https://api.forecast.io/forecast/94bc3fa3628bfad686b10e7054c67f71/40.7141667, -74.0063889")
data = response.json()
print(data)
"""
Explanation: Gr... |
AllenDowney/ModSimPy | examples/hiv_model.ipynb | mit | # 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/'
... |
google/starthinker | colabs/cm360_to_dv360.ipynb | apache-2.0 | !pip install git+https://github.com/google/starthinker
"""
Explanation: CM360 To DV360 Bulk Creator
Allows bulk creating DV360 Insertion Orders and Line Items from CM360.
License
Copyright 2020 Google LLC,
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance w... |
james-prior/cohpy | 20171116-dojo-classification-of-letters-of-roman-numerals.ipynb | mit | roman_letter_values = (
('I', 1),
('V', 5),
('X', 10),
('L', 50),
('C', 100),
('D', 500),
('M', 1000),
)
for i, (letter, value) in enumerate(roman_letter_values):
if i % 2 == 1:
print(i, letter, value)
"""
Explanation: Someone else had some code in some other language that was ... |
joommf/tutorial | workshops/2017-04-24-Intermag2017/tutorial2_hamiltonian.ipynb | bsd-3-clause | p1 = (0, 0, 0)
p2 = (10e-9, 1e-9, 1e-9)
cell = (1e-9, 1e-9, 1e-9)
mesh = oc.Mesh(p1=p1, p2=p2, cell=cell)
system = oc.System(name="zeeman") # create the (micromagnetic) system object
H = (0, 0, 1e6) # external magnetic field (A/m)
Ms = 8e6 # saturation magnetisation (A/m)
system.hamiltonian = oc.Zeeman(H=H) # def... |
stijnvanhoey/course_gis_scripting | notebooks/05-the-power-of-gdal.ipynb | bsd-3-clause | !ogr2ogr ../scratch/deelbekkens_wgs84 -t_srs "EPSG:4326" ../data/deelbekkens/Deelbekken.shp
"""
Explanation: GDAL command line
Example: reprojection
GDAL is a really powerful library for handling GIS data. It provides a number of functionalities to interact with spatial data. As a typical example, take the reprojectio... |
mne-tools/mne-tools.github.io | dev/_downloads/f398f296c84e53a14339d2c3c36e91a4/movement_detection.ipynb | bsd-3-clause | # Authors: Adonay Nunes <adonay.s.nunes@gmail.com>
# Luke Bloy <luke.bloy@gmail.com>
# License: BSD-3-Clause
import os.path as op
import mne
from mne.datasets.brainstorm import bst_auditory
from mne.io import read_raw_ctf
from mne.preprocessing import annotate_movement, compute_average_dev_head_t
# Load dat... |
GoogleCloudPlatform/mlops-on-gcp | examples/mlops-env-on-gcp/provisioning-kfp/verify-infra.ipynb | apache-2.0 | !pip install -U -q pip
!pip list | grep 'tfx\|kfp\|beam\|tensorflow'
"""
Explanation: Verifying the MLOps environment on GCP
Listing the installed packages
End of explanation
"""
%%bash
PREFIX=<YOUR-PREFIX>
ZONE=<YOUR-ZONE>
NAMESPACE=<YOUR-NAMESPACE>
gcloud container clusters get-credentials $PREFIX-cluster --zon... |
oscaribv/pyaneti | pyaneti_extras/synthetic_k2100.ipynb | gpl-3.0 | #Imort modules
from __future__ import print_function, division, absolute_import
import numpy as np
#Import citlalatonac from pyaneti_extras, note that pyaneti has to be compiled in your machine
#and pyaneti has to be in your PYTHONPATH, e.g., you have to add in your bashrc file
#export PYTHONPATH=${PYTHONPATH}:/pathtop... |
marco-olimpio/ufrn | EEC2006/2_Choropleth/Chropleth.ipynb | gpl-3.0 | #System libraries
import os
import sys
#Basic libraries for data analysis
import numpy as np
from numpy import random
import pandas as pd
#Choropleth necessary libraries
##GeoJson data
import json
##Necessary to create shapes in folium
from shapely.geometry import Polygon
from shapely.geometry import Point
##Chorop... |
whitead/numerical_stats | unit_10/hw_2018/Homework_10_Key.ipynb | gpl-3.0 | #2.1
import numpy as np
import scipy.stats as ss
print(1 - ss.poisson.cdf(11 - 1, 3))
"""
Explanation: Homework 10
CHE 116: Numerical Methods and Statistics
5/5/2018
Homework Requirements:
Write all equations in $\LaTeX$
Simplify all expressions
Put comments in your Python code
Explain or show your work
Follow the a... |
stijnvanhoey/phd_ipynb_respiro_showcases | bayesian_story/.ipynb_checkpoints/bayesian_modelling-checkpoint.ipynb | bsd-2-clause | %matplotlib inline
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style("whitegrid")
"""
Explanation: Bayesian model evaluation
End of explanation
"""
from IPython.display import Image
Image(filename='batcheactor.png', width=300)
"""
Explanation: Case study: re... |
phoebe-project/phoebe2-docs | 2.0/tutorials/gravb_bol.ipynb | gpl-3.0 | !pip install -I "phoebe>=2.0,<2.1"
"""
Explanation: Gravity Brightening/Darkening (gravb_bol)
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
"""
... |
metpy/MetPy | v0.5/_downloads/Station_Plot.ipynb | bsd-3-clause | import cartopy.crs as ccrs
import cartopy.feature as feat
import matplotlib.pyplot as plt
import numpy as np
from metpy.calc import get_wind_components
from metpy.cbook import get_test_data
from metpy.plots import StationPlot
from metpy.plots.wx_symbols import current_weather, sky_cover
from metpy.units import units
... |
SHDShim/pytheos | examples/9_pv_eos_fit_scale_conversion.ipynb | apache-2.0 | %config InlineBackend.figure_format = 'retina'
"""
Explanation: For high dpi displays.
End of explanation
"""
import numpy as np
from uncertainties import unumpy as unp
import pandas as pd
import pytheos as eos
"""
Explanation: 0. General note
This notebook shows an example of EOS fitting for static compression,... |
GoogleCloudPlatform/asl-ml-immersion | notebooks/kubeflow_pipelines/cicd/solutions/kfp_cicd.ipynb | apache-2.0 | ENDPOINT = "<YOUR_ENDPOINT>"
PROJECT_ID = !(gcloud config get-value core/project)
PROJECT_ID = PROJECT_ID[0]
"""
Explanation: CI/CD for a KFP pipeline
Learning Objectives:
1. Learn how to create a custom Cloud Build builder to pilote CAIP Pipelines
1. Learn how to write a Cloud Build config file to build and push all ... |
Upward-Spiral-Science/team1 | code/regression_simulation_old.ipynb | apache-2.0 | import numpy as np
import matplotlib.pyplot as plt
import urllib2
%matplotlib inline
sample_size = 10000
k_fold = 10
np.random.seed(1)
url = ('https://raw.githubusercontent.com/Upward-Spiral-Science'
'/data/master/syn-density/output.csv')
data = urllib2.urlopen(url)
csv = np.genfromtxt(data, delimiter=",")[1:]... |
DestrinStorm/deep-learning | gan_mnist/Intro_to_GANs_Exercises.ipynb | mit | %matplotlib inline
import pickle as pkl
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets('MNIST_data')
"""
Explanation: Generative Adversarial Network
In this notebook, we'll be building a generativ... |
SheffieldML/notebook | compbio/periodic/figure3.ipynb | bsd-3-clause | %pylab inline
import numpy as np
import pylab as pb
import GPy
np.random.seed(1)
"""
Explanation: Supplementary materials : Details on generating Figure 3
This document is a supplementary material of the article Detecting periodicities with Gaussian
processes by N. Durrande, J. Hensman, M. Rattray and N. D. Lawrence.... |
mne-tools/mne-tools.github.io | 0.17/_downloads/73d54262ed918b5836ccb242d27450bb/plot_read_noise_covariance_matrix.ipynb | bsd-3-clause | # Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
#
# License: BSD (3-clause)
from os import path as op
import mne
from mne.datasets import sample
print(__doc__)
data_path = sample.data_path()
fname_cov = op.join(data_path, 'MEG', 'sample', 'sample_audvis-cov.fif')
fname_evo = op.join(data_path,... |
Santana9937/Regression_ML_Specialization | Week_2_Multiple_Regression/assign-1_sklearn_mulp_regre.ipynb | mit | import os
import zipfile
import numpy as np
import pandas as pd
from sklearn.linear_model import LinearRegression
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style('darkgrid')
%matplotlib inline
"""
Explanation: Regression Week 2: Multiple Regression (Interpretation)
In this ... |
rsterbentz/phys202-2015-work | days/day19/FittingModels.ipynb | mit | %matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
from scipy import optimize as opt
from IPython.html.widgets import interact
"""
Explanation: Fitting Models
Learning Objectives: learn to fit models to data using linear and non-linear regression.
This material is licensed under the MIT license and... |
flaviostutz/datascience-snippets | kaggle-lung-cancer-approach2/.ipynb_checkpoints/01-nodule-segmentation-prepare-checkpoint.ipynb | mit | INPUT_DIR = '../../input/'
OUTPUT_DIR = '../../output/lung-cancer/01/'
IMAGE_DIMS = (50,50,50,1)
%matplotlib inline
import numpy as np
import pandas as pd
import h5py
import matplotlib.pyplot as plt
import sklearn
import os
import glob
from modules.logging import logger
import modules.utils as utils
from modules.util... |
UWSEDS/LectureNotes | PreFall2018/Unit-Tests/unit-tests.ipynb | bsd-2-clause | import numpy as np
# Code Under Test
def entropy(ps):
items = ps * np.log(ps)
if any(np.isnan(items)):
raise ValueError("Cannot compute log of ps!")
return -np.sum(items)
np.isnan([.1, .9])
# Smoke test
entropy([0.5, 0.5])
"""
Explanation: Unit Tests
Overview and Principles
Testing is the process... |
NYUDataBootcamp/Materials | Code/notebooks/bootcamp_advgraphics_seaborn.ipynb | mit | import matplotlib as mpl
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import sys
%matplotlib inline
"""
Explanation: Graphics using Seaborn
We previously have covered how to do some basic graphics using matplotlib. In this notebook we introduce a package called seaborn. seaborn builds on... |
dataDogma/Computer-Science | Courses/DAT-208x/DAT208X - Week 5 - Section 1 - Plotting_with_MatplotLib.ipynb | gpl-3.0 | # Print the last item from year and pop
# print(year[-1])
# print(pop[-1])
# Import matplotlib.pyplot as plt
# import matplotlib.pyplot as plt
# Make a line plot: year on the x-axis, pop on the y-axis
# plt.plot( year, pop)
# plt.show()
"""
Explanation: Table of Content
Why Visualization is important
Exercise 1
... |
tensorflow/docs-l10n | site/ja/tensorboard/image_summaries.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... |
HarshaDevulapalli/foundations-homework | 11/Homework11-Devulapalli-Graded.ipynb | mit | import pandas as pd
dates=['Issue Date', 'Vehicle Expiration Date'] #Importing dates as datetime
col_types={'Plate ID': 'str','Date First Observed':'str'} #Importing Plate ID and the Date First Observed as a string, because it has to be made into a time by a function.
df=pd.read_csv("small-violations.csv",dtype=col_t... |
ryanpdwyer/sigutils | examples/Sigutils Example.ipynb | mit | %matplotlib inline
from __future__ import division
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from scipy import signal
import sigutils
"""
Explanation: Sigutils Plotting Examples
End of explanation
"""
sigutils.bode_sys(signal.butter(4, [100*2*np.pi, 200*2*np.pi], analog=True, btype=... |
liganega/Gongsu-DataSci | previous/notes2017/old/NB-13-List_Comprehension.ipynb | gpl-3.0 | def odd_number(num):
L=[]
for i in range(num):
if i%2 == 1:
L.append(i)
return L
"""
Explanation: 리스트 조건제시법(List Comprehension)
리스트를 쉽게 구현하는 방법을 배운다.
먼저 0부터 1억 사이의 모든 홀수를 항목으로 갖는 리스트를 구현하는 방법을 고민해보자.
가장 단순한 방법은 아래와 같이 홀수를 모두 나열하는 것이다.
[1, 3, 5, 7, 9, 11, ..., 99999999]
그런데 0부터 ... |
rrbb014/data_science | fastcampus_dss/2016_05_24/0524_02__이항 확률 분포.ipynb | mit | N = 10
theta = 0.6
rv = sp.stats.binom(N, theta)
rv
"""
Explanation: 이항 확률 분포
베르누이 시도(Bernoulli trial)란 성공 혹은 실패로 결과가 나오는 것을 말한다.
성공확률이 $\theta$ 인 베르누이 시도를 $N$번 하는 경우를 생각해 보자. 가장 운이 좋을 때에는 $N$번 모두 성공할 것이고 가장 운이 나쁜 경우에는 한 번도 성공하지 못할 겻이다. $N$번 중 성공한 횟수를 확률 변수 $X$ 라고 한다면 $X$의 값은 0 부터 $N$ 까지의 정수 중 하나가 될 것이다.
이러한 확률 변수를 ... |
chapagain/kaggle-competitions-solution | Sentiment Analysis on Movie Reviews/Sentiment-Analysis-on-Movie-Reviews-RNN-LSTM-IMDB.ipynb | mit | from __future__ import print_function
from keras.preprocessing import sequence
from keras.models import Sequential
from keras.layers import Dense, Embedding
from keras.layers import LSTM
from keras.datasets import imdb
import numpy as np
max_features = 20000
maxlen = 80 # cut texts after this number of words (among ... |
tuanvu216/udacity-course | intro_to_statistics/.ipynb_checkpoints/Lesson 7 - Programming Bayes-checkpoint.ipynb | mit | def f(p):
return 1-p
print f(0.3)
"""
Explanation: Table of Contents
<p><div class="lev1"><a href="#Complement"><span class="toc-item-num">1 </span>Complement</a></div><div class="lev1"><a href="#Two-flips"><span class="toc-item-num">2 </span>Two flips</a></div><div class="lev1"><a href="#Th... |
DaveBuckingham/fish | process_rig_data.ipynb | gpl-3.0 | import numpy as np
import h5py
import matplotlib.pyplot as plt
from matplotlib import gridspec
import seaborn as sns
sns.set_context('notebook', font_scale=1.0)
%matplotlib inline
"""
Explanation: Process data from the IMU testing rig
The IMU testing rig was an arm that could swivel and move forward and back. The... |
bert9bert/statsmodels | examples/notebooks/statespace_sarimax_stata.ipynb | bsd-3-clause | %matplotlib inline
import numpy as np
import pandas as pd
from scipy.stats import norm
import statsmodels.api as sm
import matplotlib.pyplot as plt
from datetime import datetime
import requests
from io import BytesIO
"""
Explanation: SARIMAX: Introduction
This notebook replicates examples from the Stata ARIMA time se... |
d-li14/CS231n-Assignments | assignment1/knn.ipynb | gpl-3.0 | # Run some setup code for this notebook.
import random
import numpy as np
from cs231n.data_utils import load_CIFAR10
import matplotlib.pyplot as plt
from __future__ import print_function
# This is a bit of magic to make matplotlib figures appear inline in the notebook
# rather than in a new window.
%matplotlib inlin... |
vzg100/Post-Translational-Modification-Prediction | old/Phosphorylation Sequence Tests -MLP -dbptm+ELM -scalesTrain-VectorAvr..ipynb | mit | from pred import Predictor
from pred import sequence_vector
from pred import chemical_vector
"""
Explanation: Template for test
End of explanation
"""
par = ["pass", "ADASYN", "SMOTEENN", "random_under_sample", "ncl", "near_miss"]
scale = [-1, "standard", "robust", "minmax", "max"]
for i in par:
for j in scale... |
samuxiii/notebooks | hello.ipynb | apache-2.0 | print("Hello man")
"""
Explanation: Hints to know
End of explanation
"""
def fibo(n):
if n == 0:
return 0
elif n == 1:
return 1
return fibo(n-1) + fibo(n-2)
%timeit fibo(20)
"""
Explanation: Example code block
print("Hello man"
Example maths
$$
y = \frac{a}{b+c}
$$
$$
\int f(x) dx
$$
$$... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.