text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
# Approximating Runge's function
**Randall Romero Aguilar, PhD**
This demo is based on the original Matlab demo accompanying the <a href="https://mitpress.mit.edu/books/applied-computational-economics-and-finance">Computational Economics and Finance</a> 2001 textbook by Mario Miranda and Paul Fackler.
Original (Mat... | github_jupyter |
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/FeatureCollection/column_statistics_multiple.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a ... | github_jupyter |
For this step we're going to use Keras. This will also start up your GPU if you're using one, which can take up to **10 seconds**.
```
import numpy as np
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Flatten, Reshape
from keras.layers.convolutional import Conv2D, MaxPooling2D
from k... | github_jupyter |
# Clean Up Resources
This notebook demonstrates how to clean up all the resources created in the previous set of notebooks.
This notebook uses the functions defined below, to iterate throught the resources inside a dataset group. The dataset group arn is defined in the Notebook `01_Data_Layer.pnyb`
```
%store -r
imp... | github_jupyter |
```
from google.colab import drive
drive.mount('/content/drive')
```
### Dependencies
```
!unzip -q '/content/drive/My Drive/Colab Notebooks/[Kaggle] Understanding Clouds from Satellite Images/Data/train_images384x480.zip'
#@title
# Dependencies
import os
import cv2
import math
import random
import shutil
import warn... | github_jupyter |
## Recap your python skills
#### Ex0.1. Write a function `splitter` which inputs a string and breaks that string into substrings separated by `\`.
For instance
`splitter("C:\Users\Shrek")`
should return the list
`["C:", "Users", "Shrek"]`
**Note:** You will have to find out yourself what string method to apply... | github_jupyter |
# Imports
```
import tensorflow as tf
import numpy as np
import pandas as pd
tf.__version__
######## GPU CONFIGS FOR RTX 2070 ###############
## Please ignore if not training on GPU ##
## this is important for running CuDNN on GPU ##
tf.keras.backend.clear_session() #- for easy reset of notebook state
# chck ... | github_jupyter |
```
#pip install baidu-aip
##write your model id & key here
from aip import AipNlp
APP_ID = ""
API_KEY = ''
SECRET_KEY = '''
cli = AipNlp(APP_ID, API_KEY, SECRET_KEY)
cli.sentimentClassify(" A股三大股指全线上涨 沪指盘中站上3000大关")#['items'][0]['positive_prob']
#initialize
import pandas as pd
comment_file='D:/股吧评论/gu600519.xlsx'
id='... | github_jupyter |
```
for j in range(i+1, n): #
if nums[j] == val - 1:
min_val = nums[j]
count[val][1] += 1
elif nums[j] == val + 1:
max_val = nums[j]
count[val][0] += 1
elif nums[j] == val:
... | github_jupyter |
##### Copyright 2019 The TensorFlow Authors.
```
#@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 ... | github_jupyter |
# Using USD Python APIs on Google Colab
This Google Colaboratory notebook illustrates how to use the core USD Python API from a web browser.
The goal is to make it easy to:
* Try code snippets without building or installing USD locally;
* Share code snippets without copy/pasting files and scripts to a local machin... | github_jupyter |
```
from PIL import Image
import cv2
import numpy as np
from torch.utils.data import Dataset
from torchvision import transforms
from albumentations import Compose, RandomCrop, Normalize, HorizontalFlip, Resize
```
# An example pipeline that uses torchvision
```
class TorchvisionDataset(Dataset):
def __init__(self... | github_jupyter |
```
#############################################################
# Author(s): Debaditya, Anwesha, Anna #
#############################################################
#Download the data files.
import os, requests
fname = []
for j in range(3):
fname.append('steinmetz_part%d.npz'%j)
url = ["h... | github_jupyter |
```
import numpy as np
# To avoid issues with escape characters etc
# we also read the sample from a file
with open("./13-sample.txt", "r") as FILE:
data = FILE.read()
with open("./13-input.txt", "r") as FILE:
data = FILE.read()
def read_track(data):
""" We read the track model and remove the cars so we hav... | github_jupyter |
```
import ROOT
import ostap.fixes.fixes
from ostap.core.core import cpp, Ostap
from ostap.core.core import pwd, cwd, ROOTCWD
from ostap.core.core import rootID, funcID, funID, fID, histoID, hID, dsID
from ostap.core.core import VE
from ostap.histos.histos import h1_axis, h2_axes, h3_axes
from ostap.histos.graphs impor... | github_jupyter |
# Лабораторна робота №2
## з дисципліни «Математичне моделювання економічних та екологічних процесів»
### Варіант №11
#### Завдання 11. 1:
Економіка країни розбита на дві виробничі галузі (промисловість та сільське господарство). За минулий рік повний випуск промислових виробництв у вартісн... | github_jupyter |
```
import numpy as np
import cmdstanpy
import astropy.units as u
rcat = 'YOUR DATA HERE! Make sure that the necessary columns (used below) are present, or modify the code below as appropriate.'
filtered = rcat[np.logical_and.reduce((
rcat['FLAG'] == 0,
rcat['SNR'] > 3,
rcat['Vrot'] < 5,
rcat['Teff']... | github_jupyter |
# Recommendation System

A recommendation system is a system that seeks to predict or filter preferences according to the user's choices. The created Web-App using Python is a similar system, which suggests courses based on the user's liked or search... | github_jupyter |
# Lecture 20: Introduction to FiPy - Getting to Know the Diffusion Equation
Objectives:
* Understand how to create the diffusion equation in FiPy.
* Be able to change variables in the equation and observe the effects in the diffusion equation solution.
* Understand how to save the results to a data file.
First t... | github_jupyter |
```
import numpy as np
import pandas as pd
import linearsolve as ls
import matplotlib.pyplot as plt
plt.style.use('classic')
%matplotlib inline
```
# Class 17: Exogenous Shocks in the New-Keynesian Model
In this notebook, we will compute impulse responses to exogenous shocks in the new-Keynesian model and interpret t... | github_jupyter |
<a href="https://colab.research.google.com/github/NeuromatchAcademy/course-content/blob/master/tutorials/W2D4_DynamicNetworks/student/W2D4_Intro.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Intro
**Our 2021 Sponsors, including Presenting Spons... | github_jupyter |
# Hydrograph Development Notebooks: Data Exploration
Overview: This notebook was created to document data exploration of the availability/applicability of USGS gage Data in the vicinity of the levees in Lisle & Whitney Point NY.
## Introduction
##### 1. Go to the USGS gage listing page for NY, search for the floodin... | github_jupyter |
**Problem Formulation**
The problem is supervised text classification problem, and our goal is to investigate which supervised machine learning methods are best suited to solve it.
We have 25 unique resume categories to classify. This is multi-class text classification problem. I can’t wait to see what we can achieve... | github_jupyter |
# Interpreting BERT Models (Part 1)
In this notebook we demonstrate how to interpret Bert models using `Captum` library. In this particular case study we focus on a fine-tuned Question Answering model on SQUAD dataset using transformers library from Hugging Face: https://huggingface.co/transformers/
We show how to u... | github_jupyter |
```
%matplotlib inline
```
Neural Networks
===============
Neural networks can be constructed using the ``torch.nn`` package.
Now that you had a glimpse of ``autograd``, ``nn`` depends on
``autograd`` to define models and differentiate them.
An ``nn.Module`` contains layers, and a method ``forward(input)``\ that
re... | github_jupyter |
```
BRANCH = 'v1.0.2'
"""
You can run either this notebook locally (if you have all the dependencies and a GPU) or on Google Colab.
Instructions for setting up Colab are as follows:
1. Open a new Python 3 notebook.
2. Import this notebook from GitHub (File -> Upload Notebook -> "GITHUB" tab -> copy/paste GitHub URL)
3... | github_jupyter |
```
# Simple finite difference
# Acoustic wave equation p_tt = c^2 p_xx + src
# 2-D regular grid
nx = 200 # grid points in x
nz = 200 # grid points in z
nt = 1000 # number of time steps
dx = 10.0 # grid increment in x (m)
dt = 0.001 # Time step (s)
c0 = 3000.0 # velocity (m/s)
isx = nx // 2 # ... | github_jupyter |
# FTE/BTE Experiment for MNIST & Fashion-MNIST
As an extension of the FTE/BTE experiments demonstrated on the CIFAR and food-101 datasets, we now look to examine the performance of progressive learning algorithms on the MNIST and fashion-MNIST datasets.
Due to their similarity in structure, both containing 60,000 tr... | github_jupyter |
<a href="https://colab.research.google.com/github/MuhammedAshraf2020/implementation-of-CNN-Models/blob/main/LeNet/LeNet.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
# Import libs
import torch
import keras
import numpy as np
import torch.op... | github_jupyter |
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from matplotlib.patches import Ellipse
from scipy.stats import norm
from numpy import linalg as LA
%matplotlib inline
def hmc_sample(U, grad_U, epsilon, L, current_q, std_dev):
'''
U: function returns the poten... | github_jupyter |
# Prepare data input for Amazon Forecast
Forecasting is used in a variety of applications and business use cases: For example, retailers need to forecast the sales of their products to decide how much stock they need by location, Manufacturers need to estimate the number of parts required at their factories to optimiz... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
%cd ..
from IPython.core.display import display, HTML
display(HTML("<style>.container { width:90% !important; }</style>"))
import pickle
from typing import Dict, Tuple, List
from collections import Counter
import functools
from pathlib import Path
from copy import deepcopy
import... | github_jupyter |
<h2 align="center">Multiple Linear Regression</h2>
**Simple Linear Regression**: <h5 align=center>$$Y = \beta_0 + \beta_1 X + \epsilon$$</h5>
**Multiple Linear Regression**: <h5 align=center>$$Y = \beta_0 + \beta_1 X_1 + \beta_2 X_2 +...+ \beta_p X_p + \epsilon$$ </h5>
<h5 align=center> $$sales = \beta_0 + \beta_1 \t... | github_jupyter |
```
# ATTENTION: Please do not alter any of the provided code in the exercise. Only add your own code where indicated
# ATTENTION: Please do not add or remove any cells in the exercise. The grader will check specific cells based on the cell position.
# ATTENTION: Please use the provided epoch values when training.
imp... | github_jupyter |
# Check smif outputs correspond to energy demand model outputs
Energy demand model reports high-level totals in logging. Check that these match the outputs
as processed by smif and passed on to other models (energy supply) and for analysis.
- read smif outputs from an energy demand model run
- read text file outputs ... | github_jupyter |
##### Copyright 2018 The TensorFlow Authors.
```
#@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 ... | github_jupyter |
# Logistic Modeling of COVID-19 Confirmed Cases
This notebook explores modeling the spread of COVID-19 confirmed cases as a logistic function. It compares the accuracy of two sigmoid models: [simple logistic function](https://en.wikipedia.org/wiki/Logistic_function) and [Gompertz function](https://en.wikipedia.org/wiki... | github_jupyter |
# WebsocketServerWorker Tutorial
This tutorial is a 2 notebook tutorial. The partner notebook is the notebook entitled SocketWorker Client.ipynb and is in the same folder as this notebook. You should execute this notebook BEFORE the other.
In this tutorial, we'll demonstrate how to launch a WebsocketWorker server whi... | github_jupyter |
# Generators and Iterators
[Click here to run this chapter on Colab](https://colab.research.google.com/github/AllenDowney/DSIRP/blob/main/notebooks/generator.ipynb)
This chapter introduces generator functions, which are functions that yield a stream of values, rather than returning a single value.
To demonstrate the... | github_jupyter |
# T006 · Maximum common substructure
Authors:
- Oliver Nagel, CADD Seminars, 2017, Charité/FU Berlin
- Jaime Rodríguez-Guerra, 2019-2020, [Volkamer lab](https://volkamerlab.org), Charité
- Andrea Volkamer, 2019-2020, [Volkamer lab](https://volkamerlab.org), Charité
__Talktorial T006__: This talktorial is part of the... | github_jupyter |
# Regularization of linear regression model
In this notebook, we will see the limitations of linear regression models and
the advantage of using regularized models instead.
Besides, we will also present the preprocessing required when dealing
with regularized models, furthermore when the regularization parameter
need... | github_jupyter |
# Use of Metadata, MetadataDefinitions, and AntelopePf
## Metadata
MsPASS makes extensive use of a C++ object we call Metadata. A Metadata object is one of a many options we could have used to define the generalization of the idea of a header familar to many seismologists. Headers are used, for example, in SAC and ... | github_jupyter |
```
import sys
import matplotlib.pyplot as plt
sys.path.append('..')
import logomaker as lm
lm.demo('fig1b')
outfile = '_static/examples_images/crp_energy_logo.png'
!rm $outfile
# load crp energy matrix
crp_df = -lm.get_example_matrix('crp_energy_matrix',
print_description=False)
# cre... | github_jupyter |
# Exercises for EBT617E - Week 2
## Bloch Theorem
An energy eigenstate in a periodic potential can be written as
$$ \Psi_k(z) = \mathrm{e}^{ikz} u_k(z) $$
Since the potential $V(z)$ and the $u_k(z)$ functions are periodic in $z$ with period $a$, they can be written as a Fourier series
$$ V(z) = V(z+a) = \sum_n V_... | github_jupyter |
# A Hierarchical model for Rugby prediction
* @Author: Peadar Coyle
* @email: peadarcoyle@googlemail.com
* @date: 31/12/15
I came across the following blog post on http://danielweitzenfeld.github.io/passtheroc/blog/2014/10/28/bayes-premier-league/
* Based on the work of [Baio and Blangiardo](www.statistica.it/gianluc... | github_jupyter |
# Converting text to features with
1. One Hot Encoding
2. CountVectorizer
3. N-grams
4. Co-occurence matrix
5. Hash Vectorizer
6. Tfidf
7. Word Embedding
8. FastText
```
# 1. One hot encoding
import pandas as pd
import numpy as np
text = 'I am liking NLP and I can surely try NLP'
pd.get_dummies(text.split())
# 2. Cou... | github_jupyter |
# Introducing the Keras Functional API
**Learning Objectives**
1. Understand embeddings and how to create them with the feature column API
1. Understand Deep and Wide models and when to use them
1. Understand the Keras functional API and how to build a deep and wide model with it
## Introduction
In the last no... | github_jupyter |
# Aberration Transfer Functions
One may find reference on the internet to an "Aberration Transfer Function" introduced by Shannon used to model the MTF of an aberrated imaging system as:
\begin{align*}
DTF(\nu) &= \frac{2}{\pi}\left[\arccos{\nu} - \nu \sqrt{1 - \nu^2}\right] \\
ATF(\nu) &= 1 - \left(\frac{W_\text{rms... | github_jupyter |
```
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '3'
import xlnet
import numpy as np
import tensorflow as tf
from tqdm import tqdm
import model_utils
from prepro_utils import preprocess_text, encode_ids
def tokenize_fn(text):
text = preprocess_text(text, lower= False)
return encode_ids(sp_model, text)
# !wge... | github_jupyter |
# What's this PyTorch business?
You've written a lot of code in this assignment to provide a whole host of neural network functionality. Dropout, Batch Norm, and 2D convolutions are some of the workhorses of deep learning in computer vision. You've also worked hard to make your code efficient and vectorized.
For the ... | github_jupyter |
```
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import statsmodels.api as sm
from statsmodels.base.model import GenericLikelihoodModel
from scipy import stats
import scipy.linalg as linalg
import math
class OLS_loglike(GenericLikelihoodModel):
def __init__(self, *args,ols=False, *... | github_jupyter |
# Feature processing with Spark, training with BlazingText and deploying as Inference Pipeline
Typically a Machine Learning (ML) process consists of few steps: gathering data with various ETL jobs, pre-processing the data, featurizing the dataset by incorporating standard techniques or prior knowledge, and finally tra... | github_jupyter |
<a href="https://colab.research.google.com/github/EEdwardsA/Build-Week-1/blob/master/data-wrangling/Data_Day_1.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
import pandas as pd
ea2018 = pd.read_csv('https://raw.githubusercontent.com/rethinkpr... | github_jupyter |
# Python for Environmental Science Day 1
## Topics
* General Information about the Course
* Getting started
* Spyder
* The interactive Shell
* Expressions in Python
* Storing Values in Variables
* Data Types
* Converting between Data Types
* String Concatenation and Replication
* Writing your first Program
* Commen... | github_jupyter |
```
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
merge_data = {
'Serial NVC 10k n' : [.001527, .00144, .00142],
'Serial GCC 10k n' : [.001553, .001623, .001596],
'OpenMP NVC 4 Threads 10k n' : [.009124, .048883, .019634],
'OpenMP NVC 16 Threads 10k n' : [.141458, .240187, .114713],
'OpenMP GC... | github_jupyter |
# Exploring the Jupyter notebook
In this notebook, we borrow quite heavily from a similar course: [Python4AstronomersAndParticlePhysicists](https://github.com/Python4AstronomersAndParticlePhysicists/PythonWorkshop-ICE/blob/master/notebooks/03_02_TipsAndTricks.ipynb). Those parts where used under the [MIT license](LICE... | github_jupyter |
# Introduction
Welcome to the hands on materials for Data Science in Practice.
This notebook will guide through getting the tools you will need for working with these tutorials and assignments.
## Alerts
Throughout these tutorials, you will see colored 'alert' text:
<div class="alert alert-success">
Green alerts p... | github_jupyter |
# Leverage
### Stupidity or genius?
Updated 2020-August-28.
* This notebook looks at what the last 93 years of daily S&P 500 data has to say about the now well-known intra-day leverage.
* Automatic reinvestment of dividends is assumed.
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
... | github_jupyter |
$\newcommand{\vct}[1]{\boldsymbol{#1}}
\newcommand{\mtx}[1]{\mathbf{#1}}
\newcommand{\tr}{^\mathrm{T}}
\newcommand{\reals}{\mathbb{R}}
\newcommand{\lpa}{\left(}
\newcommand{\rpa}{\right)}
\newcommand{\lsb}{\left[}
\newcommand{\rsb}{\right]}
\newcommand{\lbr}{\left\lbrace}
\newcommand{\rbr}{\right\rbrace}
\newcommand{\f... | github_jupyter |
Copyright Rigetti Computing 2021.
## Grover's search algorithm in pyQuil
In this notebook, we'll demonstrate a simple implementation of Grover's algorithm in pyQuil.
```
%matplotlib inline
import matplotlib.pyplot as plt
import itertools
import numpy as np
from pyquil.api import WavefunctionSimulator
from pyquil.gat... | github_jupyter |
# *tridesclous* example with locust dataset
Here a detail notebook that detail the locust dataset recodring by Christophe Pouzat.
This dataset is our classic.
It has be analyse yet by several tools in R, Python or C:
* https://github.com/christophe-pouzat/PouzatDetorakisEuroScipy2014
* https://github.com/christop... | github_jupyter |
# Importando as bibliotecas padrão
```
import matplotlib.pyplot as plt
from imutils import paths
import numpy as np
import pathlib
import imutils
import pickle
import cv2
import os
%matplotlib inline
```
Acima temos as bibliotecas matplotlib e OpenCV (cv2) para tratamento de imagens, a biblioteca Numpy será utilizad... | github_jupyter |
# Fetching data from Reverb.com
## Create list of urls
The first step is to create a database of urls of images of electric guitars. Reverb.com is the worlds largest online marketplace for used and new guitars. Each listing usually has multiple images of electric guitars.
Getting data from the Reverb API. Only selec... | github_jupyter |
## Loss variant experiments
Comparing loss functions given in https://github.com/cwbeitel/tk/blob/master/tk/models/similarity_transformer.py#L30 with keys "kfnet", "simple_cd", and "slicenet".
```
import csv
from six import StringIO
import tempfile
from tensor2tensor.data_generators import problem
from tensor2tenso... | github_jupyter |
# Equalização de Histograma
A transformação de contraste que procura distribuir a ocorrência dos níveis de cinza igualmente
na faixa de tons de cinza é denominada equalização de histograma.
O objetivo do exemplo a seguir é o de fazer a equalização de histograma de uma imagem. Ele é
dado pela aplicação de uma transfor... | github_jupyter |
```
## Import Libraries
# General system libraries
import os
import numpy as np
import pandas as pd
from time import time
from IPython.display import Image
# Multiprocessing
import multiprocessing
# DNA/RNA Analysis Libraries (Biopython, ViennaRNA, pysster)
# Biopython Lib
import Bio
from Bio import SeqIO
from Bio.S... | github_jupyter |
# Multiple Measurements
In this notebook, let's go over the steps a robot takes to help localize itself from an initial, uniform distribution to sensing and updating that distribution and finally normalizing that distribution.
1. The robot starts off knowing nothing; the robot is equally likely to be anywhere and so ... | github_jupyter |
# Goal
* Design clade-specific primers for HMP most-wanted clades
# Var
```
work_dir = '/ebio/abt3_projects/software/dev/ll_pipelines/llprimer/experiments/HMP_most-wanted/'
most_wanted_file = file.path(work_dir, 'most_wanted.tsv')
```
# Init
```
library(dplyr)
library(tidyr)
library(ggplot2)
library(LeyLabRMisc)
d... | github_jupyter |
# Library
```
import os
import gc
import random
import platform
from datetime import datetime
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
import pandas as pd
import supervised
print('Python version:', platform.python_version())
print('Numpy version:', np.__version__)
pri... | github_jupyter |
## Setup
```
from __future__ import absolute_import, division, print_function, unicode_literals
import IPython.display as display
from PIL import Image
import numpy as np
import matplotlib.pyplot as plt
import time
#import glob
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 0 = all messages are logged (default ... | github_jupyter |
```
# collect the rvip detection experiments dataframes and create plots
# ------------------------------------------define logging and working directory
from ProjectRoot import change_wd_to_project_root
change_wd_to_project_root()
# ------------------------------------------jupyter magic config
%matplotlib inline
%rel... | github_jupyter |
# Plotting time-series
**Time series data is data that is recorded. Visualizing this type of data helps clarify trends and illuminates relationships between data.**
```
import pandas as pd
import numpy as np
```
## Read data with a time index
Pandas DataFrame objects can have an index that denotes time. This is usefu... | github_jupyter |
Although current machine learning algorithms have acquired a good reputation in terms of achieving the goals they are trained to do, they are prone to foregtting old data. If one takes a trained model and fine-tunes it on different data, its performance on the old data deteriorates. This is what the community calls **C... | github_jupyter |
```
import sys
sys.path.append("/Users/PRVATE/models-master/")
import collections
import itertools
import random
# Import libraries
from absl import app
from absl import flags
from absl import logging
import tensorflow as tf
from official.nlp.bert import tokenization
# Only for jupyter notebook
app.flags.DEFINE_strin... | github_jupyter |
```
%reload_ext autoreload
%autoreload 2
from nb_005 import *
import pandas as pd
```
# Faces
## Setup
Download the dataset [here](https://download.pytorch.org/tutorial/faces.zip) from the pytoch tutorial on transforms. Unzip it in the data directory, so that data/faces/ contains the images and the csv file.
```
PA... | github_jupyter |
# Tasking API Order Edit and Cancellation
---
## Introduction
---
This tutorial is an introduction on how to edit and cancel tasking orders using [Planet](https://www.planet.com)'s Tasking API. It provides code samples on how to write simple Python code to do this.
The API reference documentation can be found at h... | github_jupyter |
```
# default_exp create
!pip install VitalSigns dataplay geopandas
import pandas as pd
inst = pd.read_csv('ACS_Processing.csv')
inst.head(1)
#export
#@title Run This Cell: Misc Function Declarations
# These functions right here are used in the calculations below.
# Finds a column matchings a substring
def getColName... | github_jupyter |
# <center> Aplicación en Bioestadística: Análisis de Depresión en RR.SS.
## <center>Saturday's AI Euskadi 2020
```
import numpy as np
import pandas as pd
import seaborn as sns
from matplotlib import pyplot as plt
from itertools import combinations
#Read the raw data and display first rows
data = pd.read_csv('../raw-d... | github_jupyter |
# Autoencoder fashion_mnist
### libraries
```
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from keras.layers import Dense, Input
from keras.layers import Conv2D, Flatten
from keras.layers import Reshape, Conv2DTranspose
from keras.models import Model
fr... | github_jupyter |

# terrainbento model Basic steady-state solution
This model shows example usage of the Basic model from the TerrainBento package.
This uses has stream power and linear diffusion and has the following governing equation:
$\frac{\partial \eta}{\partial t} = ... | github_jupyter |
参考:
- [WSL搭建Java开发环境](https://blog.csdn.net/c13232906050/article/details/83025020?depth_1-utm_source=distribute.pc_relevant.none-task&utm_source=distribute.pc_relevant.none-task)
- [Windows Subsystem for Linux入门:安装+配置图形界面+中文环境+工作环境(vscode](https://blog.csdn.net/w_weilan/article/details/82862913?depth_1-utm_source=distr... | github_jupyter |
<a href="https://colab.research.google.com/github/cseveriano/evolving_clustering/blob/master/notebooks/Evolving_Clustering_Experiment_3_Cassini_Dataset.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
## Mount Results Directory
```
path = "/content/... | github_jupyter |
# "Pseudotime" ordering
What is *pseudotime ordering*? Pseudotime is a concept introduced to biology by the Monocle paper, [Trapnell et al (2014)](http://www.ncbi.nlm.nih.gov/pubmed/24658644), where, given a population of single cells sampled across different time points, you want to order them not by the order they w... | github_jupyter |
**Maximum likelihood estimatation from observed and unobserved data**
You are given a bag containing red and blue coins. All the red coins have the same probability of heads. All the blue coins have the same probability of heads (possibly different from that of the red coins).
Your task is to estimate the proportion ... | github_jupyter |
```
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
from IPython.display import display , Markdown
import matplotlib as mpl
mpl.rc('font', family='nanumgothic')
mpl.rc('axes', unicode_minus=False)
monthly_trade_price = pd.read_excel('stat_124001.xls')
yearly_trade_price = pd.read_excel('stat_1240... | github_jupyter |
# Demostrates Applying a Color Combination Choice to a Complex
This notebook will demonstrate applying one of the color lists made by the [Demo of Sampling Various Combinations of Applying A Color Palette to a Complex](notebooks/demo_palette.ipynb). Please review that first, if you have not.
The code is set up to be ... | github_jupyter |
```
from cutils.data_builder.load import load_demographics, load_labtests, load_diagnoses, load_pharma
from cutils.general.data_descriptions import get_kod_bdika_dicts, get_ICD_dicts, get_pharma_dicts, get_makat_to_ATC_dict
from Sandbox.iris.T2D_validation_yochai.config import *
import numpy as np
from datetime import ... | github_jupyter |
# XOR Prediction Neural Network
#### A simple neural network which will learn the XOR logic gate.
I will provide you with any links necessary so that you can read about the different aspects of this NN(Neural Network).
## Neural Network Info
#### All information regarding the neural network:
- Input Layer Units = 2... | github_jupyter |
# Softmax 연습
*이 워크시트를 완성하고 제출하세요. (출력물과 워크시트에 포함되지 않은 코드들을 포함해서) 더 자세한 정보는 코스 웹사이트인 [숙제 페이지](http://vision.stanford.edu/teaching/cs231n/assignments.html)에서 볼 수 있습니다.*
이번 연습은 SVM과 유사합니다. 아래와 같은 것들을 하게됩니다.
- Softmax 분류기를 위한 완전히 벡터화된 **손실 함수**를 구현합니다.
- **분석 요소**를 위한 완전히 벡터화된 표현식을 구현합니다.
- 구현한것을 수치 요소로 체크합니다.
- 검증 셋을 이... | github_jupyter |
# Software Carpentry
# Welcome to Binder
This is where will do all our Python, Shell and Git live coding.
## Jupyter Lab
Let's quickly familiarise ourselves with the enironment ...
- the overal environment (ie your entire browser tab) is called:
*Jupyter Lab*
it contains menus, tabs, toolbars and a file b... | github_jupyter |
# CIS6930 Week 2: Mini-batch sampling follow-up (for in-class demo)
In this notebook, you will learn how PyTorch components/functions handle "batched" samples.
---
Preparation: Go to `Runtime > Change runtime type` and choose `GPU` for the hardware accelerator.
## A magic command to check your assigned GPU
```
gpu... | github_jupyter |
```
! pip install -q transformers -U #Hugginface transformer
import numpy as np
import pandas as pd
import tensorflow as tf
import torch
from transformers import FlaubertModel, FlaubertTokenizer #Tokenizer for french
from scipy.spatial.distance import cosine #to compute similarity
from sklearn.manifold import TSNE #To... | github_jupyter |
# Deep Learning Toolkit for Splunk - Barebone Notebook
This notebook contains a barebone example workflow how to work on custom containerized code that seamlessly interfaces with the Deep Learning Toolkit for Splunk.
Note: By default every time you save this notebook the cells are exported into a python module which ... | github_jupyter |
## Description: This script
Input: data/ref_data/ARanalysis_ref_data.nc
'data/AR_features/part1/AR_feature.part1.%s.1981-2015.nc' % (method)
Output: 'data/AR_features/part2/AR_feature.part2.%s.1981-2015.nc' % (method)
```
import numpy as np
import netCDF4 as nc
from skimage.draw import polygon
from skimage... | github_jupyter |
# Use NREL NSRDB Physical Solar Model version 3 in R
## Getting the PSM3 data (for a single point)
#### Install and load neccessary R packages
R comes with many very useful packages contributed by people around the world. It is useful to check the existing [packages](https://cran.r-project.org/web/packages/available... | github_jupyter |
## 03 MSM Analysis
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons Licence" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" title='This work is licensed under a Creative Commons Attribution 4.0 International License.' align="right"/></a>
Aut... | github_jupyter |
```
%matplotlib inline
%config InlineBackend.figure_format = 'svg'
import matplotlib.pyplot as plt
import numpy as np
from itertools import count, islice, takewhile
from functools import reduce, partial
```
The Taylor series expansion for the trigonometric function $\sin{x}$ around the point $a=0$ (also known as the ... | github_jupyter |
#### Pandas Numpy MatPlotLib
```
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import chardet as chd
with open('archivos/titanic.csv', 'rb') as f:
result = chd.detect(f.read())
result['encoding']
### Direccion del dataset (Utilizar train.csv)
### https://www.kaggle.com/c/titanic/data
```
... | github_jupyter |
Account for AOI reflection losses (in full mode only)
=========================================
In this section, we will learn:
- how ``pvfactors`` accounts for AOI losses by default
- how to account for AOI-dependent reflection losses for direct, circumsolar, and horizon irradiance components
- how to account for AO... | github_jupyter |
<center><h1>Normal Distribution & Central Limit Theorem</h1></center>
Its understandable that the Central Limit Theorem (CLT) can seem a bit confusing. The goal of this notebook is to demystify the CLT by having you write an algorithm that actually uses sampling to approximate a normal distribution from a non-nor... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.