text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Gena/map_center_object.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a target="_blank" href=... | github_jupyter |
```
import pandas as pd
from textblob import Word
headers = pd.read_csv("header.csv")
headers['Header']
citation = [Word("citation").synsets[2], Word("reference").synsets[1], Word("cite").synsets[3]]
run = [Word("run").synsets[9],Word("run").synsets[34],Word("execute").synsets[4]]
install = [Word("installation").synset... | github_jupyter |
# Tuning an estimator
[José C. García Alanis (he/him)](https://github.com/JoseAlanis)
Research Fellow - Child and Adolescent Psychology at [Uni Marburg](https://www.uni-marburg.de/de)
Member - [RTG 2271 | Breaking Expectations](https://www.uni-marburg.de/en/fb04/rtg-2271), [Brainhack](https://brainhack.org/)
<im... | github_jupyter |
# Trial 2: classification with learned graph filters
We want to classify data by first extracting meaningful features from learned filters.
```
import time
import numpy as np
import scipy.sparse, scipy.sparse.linalg, scipy.spatial.distance
from sklearn import datasets, linear_model
import matplotlib.pyplot as plt
%ma... | github_jupyter |
## Dependencies
```
import os
import sys
import cv2
import shutil
import random
import warnings
import numpy as np
import pandas as pd
import seaborn as sns
import multiprocessing as mp
import matplotlib.pyplot as plt
from tensorflow import set_random_seed
from sklearn.utils import class_weight
from sklearn.model_sele... | github_jupyter |
# Translate `dzn` to `smt2` for z3
### Check Versions of Tools
```
import os
import subprocess
my_env = os.environ.copy()
output = subprocess.check_output(f'''/home/{my_env['USER']}/optimathsat/bin/optimathsat -version''', shell=True, universal_newlines=True)
output
output = subprocess.check_output(f'''/home/{my_env... | github_jupyter |
<p><img alt="Colaboratory logo" height="45px" src="/img/colab_favicon.ico" align="left" hspace="10px" vspace="0px"></p>
<h1>Welcome to Colaboratory!</h1>
Colaboratory is a free Jupyter notebook environment that requires no setup and runs entirely in the cloud.
With Colaboratory you can write and execute code, save ... | github_jupyter |
<p><font size="6"><b>04 - Pandas: Working with time series data</b></font></p>
> *© 2021, Joris Van den Bossche and Stijn Van Hoey (<mailto:jorisvandenbossche@gmail.com>, <mailto:stijnvanhoey@gmail.com>). Licensed under [CC BY 4.0 Creative Commons](http://creativecommons.org/licenses/by/4.0/)*
---
```
import pandas... | github_jupyter |
Demonstrating how to get DonkeyCar Tub files into a PyTorch/fastai DataBlock
```
from fastai.data.all import *
from fastai.vision.all import *
from fastai.data.transforms import ColReader, Normalize, RandomSplitter
import torch
from torch import nn
from torch.nn import functional as F
from donkeycar.parts.tub_v2 impor... | github_jupyter |
# Redis列表实现一次pop 弹出多条数据

```
# 连接 Redis
import redis
client = redis.Redis(host='122.51.39.219', port=6379, password='leftright123')
# 注意:
# 这个 Redis 环境仅作为练习之用,每小时会清空一次,请勿存放重要数据。
# 准备数据
client.lpush('test_batch_pop', *list(range(100... | github_jupyter |
```
# importamos las librerías necesarias
%matplotlib inline
import random
import tsfresh
import os
import math
from scipy import stats
from scipy.spatial.distance import pdist
from math import sqrt, log, floor
from fastdtw import fastdtw
import ipywidgets as widgets
import matplotlib.pyplot as plt
import matplotlib.cm... | github_jupyter |
Text classification with attention and synthetic gradients.
Imports and set-up:
```
%tensorflow_version 2.x
import numpy as np
import tensorflow as tf
import pandas as pd
import subprocess
from sklearn.model_selection import train_test_split
import gensim
import re
import sys
import time
# TODO: actually implement... | github_jupyter |
<a href="https://colab.research.google.com/github/DeepInsider/playground-data/blob/master/docs/articles/deeplearningdat.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
##### Copyright 2019 Digital Advantage - Deep Insider.
```
#@title Licensed unde... | 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 |
# Word Embeddings in MySQL
This example uses the official MySQL Connector within Python3 to store and retrieve various amounts of Word Embeddings.
We will use a local MySQL database running as a Docker Container for testing purposes. To start the database run:
```
docker run -ti --rm --name ohmysql -e MYSQL_ROOT_PAS... | github_jupyter |
```
import glob
import itertools
from ipywidgets import widgets, Layout
import numpy as np
import os
import pandas as pd
import plotly.io as pio
import plotly.graph_objects as go
from apex_performance_plotter.apex_performance_plotter.load_logfiles import load_logfiles
pio.templates.default = "plotly_white"
from IPyth... | github_jupyter |
Copyright 2021 Google LLC
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
distri... | github_jupyter |
----
<img src="../../../files/refinitiv.png" width="20%" style="vertical-align: top;">
# Data Library for Python
----
## Content layer - News
This notebook demonstrates how to retrieve News.
#### Learn more
To learn more about the Refinitiv Data Library for Python please join the Refinitiv Developer Community. By ... | github_jupyter |
# Migrating scripts from Framework Mode to Script Mode
This notebook focus on how to migrate scripts using Framework Mode to Script Mode. The original notebook using Framework Mode can be find here https://github.com/awslabs/amazon-sagemaker-examples/blob/4c2a93114104e0b9555d7c10aaab018cac3d7c04/sagemaker-python-sdk/t... | github_jupyter |
## Coding Matrices
Here are a few exercises to get you started with coding matrices. The exercises start off with vectors and then get more challenging
### Vectors
```
### TODO: Assign the vector <5, 10, 2, 6, 1> to the variable v
v = []
```
The v variable contains a Python list. This list could also be thought of ... | github_jupyter |
```
%load_ext sql
%sql sqlite:///flights.db
```
숙제 1
=======
### 일러두기 :
**_꼼꼼하게 읽어보기 바랍니다_**
* `prettytable` 모듈을 설치해야 스크립트를 실행할 수 있음. (설치 방법: `pip install --user prettytable`)
* `flights.db` 파일이 숙제용 Jupyter notebook과 같은 디렉터리에 있어야 함 (없다면 [여기서](http://open.gnu.ac.kr/lecslides/2018-2-DB/Assignments1/flights.db.zi... | github_jupyter |
```
import os
import urllib
from zipfile import ZipFile
import fileinput
import numpy as np
import gc
import urllib.request
if not os.path.exists('glove.840B.300d.txt'):
if not os.path.exists('glove.840B.300d.zip'):
print('downloading GloVe')
urllib.request.urlretrieve("http://nlp.stanford.edu/data/... | github_jupyter |
```
from HARK.ConsumptionSaving.ConsLaborModel import (
LaborIntMargConsumerType,
init_labor_lifecycle,
)
import numpy as np
import matplotlib.pyplot as plt
from time import process_time
mystr = lambda number: "{:.4f}".format(number) # Format numbers as strings
do_simulation = True
# Make and solve a labor int... | github_jupyter |
# HistGradientBoostingClassifier with MaxAbsScaler
This code template is for classification analysis using a HistGradientBoostingClassifier and the feature rescaling technique called MaxAbsScaler
### Required Packages
```
import warnings
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
... | github_jupyter |
# Prática Guiada: Demonstração de `GridSearchCV`
Vamos usar o conjunto de dados iris... que já conhecemos bem.
Veremos como usar `GridSearchCV` para otimizar o hiperparâmetro `k` do algoritmo de vizinhos mais próximos.
[aqui](http://rcs.chemometrics.ru/Tutorials/classification/Fisher.pdf) há um link para o paper de ... | github_jupyter |
# **Deep-STORM (2D)**
---
<font size = 4>Deep-STORM is a neural network capable of image reconstruction from high-density single-molecule localization microscopy (SMLM), first published in 2018 by [Nehme *et al.* in Optica](https://www.osapublishing.org/optica/abstract.cfm?uri=optica-5-4-458). The architecture used h... | github_jupyter |
# Microstructure classification using Neural Networks
In this example, we will generate microstructures of 4 different types with different grain sizes.
Then we will split the dataset into training and testing set.
Finally we will trian the neural network using CrysX-NN to make predictions.
## Run the following cel... | github_jupyter |
# <center> Pandas*</center>
*pandas is short for Python Data Analysis Library
<img src="https://welovepandas.club/wp-content/uploads/2019/02/panda-bamboo1550035127.jpg" height=350 width=400>
```
import pandas as pd
```
In pandas you need to work with DataFrames and Series. According to [the documentation of pandas]... | github_jupyter |
# Matplotlib
Matplotlib is a powerful tool for generating scientific charts of various sorts.
This presentation only touches on some features of matplotlib. Please see
<a href="https://jakevdp.github.io/PythonDataScienceHandbook/index.html">
https://jakevdp.github.io/PythonDataScienceHandbook/index.html</a> or many o... | github_jupyter |
### Stock Prediction using fb Prophet
Prophet is a procedure for forecasting time series data based on an additive model where non-linear trends are fit with yearly, weekly, and daily seasonality, plus holiday effects. It works best with time series that have strong seasonal effects and several seasons of historical d... | github_jupyter |
```
library(repr) ; options(repr.plot.res = 100, repr.plot.width=5, repr.plot.height= 5) # Change plot sizes (in cm) - this bit of code is only relevant if you are using a jupyter notebook - ignore otherwise
```
<!--NAVIGATION-->
< [Multiple Explanatory Variables](16-MulExpl.ipynb) | [Main Contents](Index.ipynb) | [Mo... | github_jupyter |
# <span style='color:darkred'> 2 Protein Visualization </span>
***
For the purposes of this tutorial, we will use the HIV-1 protease structure (PDB ID: 1HSG). It is a homodimer with two chains of 99 residues each. Before starting to perform any simulations and data analysis, we need to observe and familiarize with the... | github_jupyter |
## Plotting very large datasets meaningfully, using `datashader`
There are a variety of approaches for plotting large datasets, but most of them are very unsatisfactory. Here we first show some of the issues, then demonstrate how the `datashader` library helps make large datasets truly practical.
We'll use part of ... | github_jupyter |
Taller Presencial --- Programación en Python
===
El algoritmo MapReduce de Hadoop se presenta en la siguiente figura.
<img src="https://raw.githubusercontent.com/jdvelasq/datalabs/master/images/map-reduce.jpg"/>
Se desea escribir un programa que realice el conteo de palabras usando el algoritmo MapReduce.
```
#
# A... | github_jupyter |
**author**: lukethompson@gmail.com<br>
**date**: 7 Oct 2017<br>
**language**: Python 3.5<br>
**license**: BSD3<br>
## alpha_diversity_90bp_100bp_150bp.ipynb
```
import pandas as pd
import math
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from empcolors import get_empo_cat_color
%matplotlib... | github_jupyter |
# Modeling
@Author: Bruno Vieira
Goals: Create a classification model able to identify a BOT account on twitter, using only profile-based features.
```
# Libs
import os
import numpy as np
import pandas as pd
from sklearn.pipeline import Pipeline
from sklearn.compose import ColumnTransformer
from sklearn.impute import... | github_jupyter |
```
from IPython import display
from utils import Logger
import torch
from torch import nn
from torch.optim import Adam
from torch.autograd import Variable
from torchvision import transforms, datasets
DATA_FOLDER = './torch_data/VGAN/MNIST'
```
## Load Data
```
def mnist_data():
compose = transforms.Compose(
... | github_jupyter |
```
from simforest import SimilarityForestClassifier, SimilarityForestRegressor
from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor
from sklearn.datasets import load_svmlight_file
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.me... | github_jupyter |
# Heap Maps
A heat map is a two-dimensional representation of data in which values are represented by colors. A simple heat map provides an immediate visual summary of information.
```
from beakerx import *
data = [[533.08714795974, 484.92105712087596, 451.63070008303896, 894.4451947886148, 335.44965728686225, 64... | github_jupyter |
# Adversarial Examples
Let's start out by importing all the required libraries
```
import os
import sys
sys.path.append(os.path.join(os.getcwd(), "venv"))
import numpy as np
import torch
import torchvision.transforms as transforms
from matplotlib import pyplot as plt
from torch import nn
from torch.autograd import... | github_jupyter |
# Pi Estimation Using Monte Carlo
In this exercise, we will use MapReduce and a Monte-Carlo-Simulation to estimate $\Pi$.
If we are looking at this image from this [blog](https://towardsdatascience.com/how-to-make-pi-part-1-d0b41a03111f), we see a unit circle in a unit square:
, which take place worldwide on purpose-built circuits and on public roads. The results of each race are evaluated usin... | github_jupyter |
<a href="https://colab.research.google.com/github/JSJeong-me/KOSA-Big-Data_Vision/blob/main/Model/99_kaggle_credit_card_analysis_and_prediction.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Importing Packages
```
import pandas as pd
import nump... | github_jupyter |
# Sequence to Sequence Learning
:label:`sec_seq2seq`
As we have seen in :numref:`sec_machine_translation`,
in machine translation
both the input and output are a variable-length sequence.
To address this type of problem,
we have designed a general encoder-decoder architecture
in :numref:`sec_encoder-decoder`.
In this... | github_jupyter |
# Seaborn In Action
Seaborn is a data visualization library that is based on **Matplotlib**. It is tightly integrated with Pandas library and provides a high level interface for making attractive and informative statistical graphics in Python.
This Notebook introduces the basic and essential functions in the seaborn ... | github_jupyter |
<font size = "5"> **[Image Tools](2_Image_Tools.ipynb)** </font>
<hr style="height:2px;border-top:4px solid #FF8200" />
# Selective Fourier Transform
part of
<font size = "4"> **pyTEMlib**, a **pycroscopy** library </font>
Notebook by
Gerd Duscher
Materials Science & Engineering<br>
Joint Institute of Advan... | github_jupyter |
If you're opening this Notebook on colab, you will probably need to install 🤗 Transformers and 🤗 Datasets. Right now this requires the current master branch of both. Uncomment the following cell and run it.
```
#! pip install git+https://github.com/huggingface/transformers.git
#! pip install git+https://github.com/h... | github_jupyter |
**Note**: Click on "*Kernel*" > "*Restart Kernel and Run All*" in [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/) *after* finishing the exercises to ensure that your solution runs top to bottom *without* any errors. If you cannot run this file on your machine, you may want to open it [in the cloud <img heigh... | github_jupyter |
# Introduction to Machine Learning
(The examples in this notebook were inspired by my work for EmergentAlliance, the Scikit-Learn documentation and Jason Brownlee's "Machine Learning Mastery with Python")
In this short intro course we will focus on predictive modeling. That means that we want to use the models to mak... | github_jupyter |
# Data Distribution vs. Sampling Distribution: What You Need to Know
This notebook is accompanying the article [Data Distribution vs. Sampling Distribution: What You Need to Know](https://www.ealizadeh.com/blog/statistics-data-vs-sampling-distribution/).
Subscribe to **[my mailing list](https://www.ealizadeh.com/subs... | github_jupyter |
# Distributed data parallel BERT training with TensorFlow2 and SMDataParallel
HSMDataParallel is a new capability in Amazon SageMaker to train deep learning models faster and cheaper. SMDataParallel is a distributed data parallel training framework for TensorFlow, PyTorch, and MXNet.
This notebook example shows how t... | github_jupyter |
# NewEgg.Com WebScraping Program For Laptops - Beta v1.0
### - April 2020
---
```
# Import dependencies.
import os
import re
import time
import glob
import random
import datetime
import requests
import pandas as pd
from re import search
from splinter import Browser
from playsound import playsound
from bs4 import ... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
import sklearn
from sklearn import datasets
iris = datasets.load_iris()
iris
iris.feature_names
print(iris.data.shape, iris.data.dtype)
iris.target
iris.target_names
import numpy as np
from chainer_chemistry.datasets.numpy_tuple_dataset import NumpyTupleDataset
# All dataset is ... | github_jupyter |
# Time Series analysis of O'hare taxi rides data
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.ensemble import RandomForestRegressor
from sklearn.ensemble import GradientBoostingRegressor
from sklearn.model_selection import TimeSeriesSplit, cross_validate, GridSearchCV
pd.set_... | github_jupyter |
# Lesson 04: Numpy
- Used for working with tensors
- Provides vectors, matrices, and tensors
- Provides mathematical functions that operate on vectors, matrices, and tensors
- Implemented in Fortran and C in the backend
```
import numpy as np
```
## Making Arrays
```
arr = np.array([1, 2, 3])
print(arr, type(arr), ... | github_jupyter |
```
import torch
import numpy as np
import pandas as pd
import matchzoo as mz
print('matchzoo version', mz.__version__)
ranking_task = mz.tasks.Ranking(losses=mz.losses.RankHingeLoss())
ranking_task.metrics = [
mz.metrics.NormalizedDiscountedCumulativeGain(k=3),
mz.metrics.NormalizedDiscountedCumulativeGain(k=5... | github_jupyter |
# Document embeddings in BigQuery
This notebook shows how to do use a pre-trained embedding as a vector representation of a natural language text column.
Given this embedding, we can use it in machine learning models.
## Embedding model for documents
We're going to use a model that has been pretrained on Google News... | github_jupyter |
<table width="100%"> <tr>
<td style="background-color:#ffffff;">
<a href="http://qworld.lu.lv" target="_blank"><img src="../images/qworld.jpg" width="35%" align="left"> </a></td>
<td style="background-color:#ffffff;vertical-align:bottom;text-align:right;">
prepared by Abuzer Yak... | github_jupyter |
# DLISIO in a Nutshell
## Importing
```
%matplotlib inline
import os
import pandas as pd
import dlisio
import matplotlib.pyplot as plt
import numpy as np
import numpy.lib.recfunctions as rfn
import hvplot.pandas
import holoviews as hv
from holoviews import opts, streams
from holoviews.plotting.links import DataLink... | github_jupyter |
```
# Import modules
import numpy as np
import pandas as pd
import tensorflow as tf
import matplotlib.pyplot as plt
import math
from sklearn.model_selection import train_test_split
import sklearn.metrics as metrics
#keras
from tensorflow.keras.utils import to_categorical
from tensorflow.keras.preprocessing.image im... | github_jupyter |
# Example 5: Quantum-to-quantum transfer learning.
This is an example of a continuous variable (CV) quantum network for state classification, developed according to the *quantum-to-quantum transfer learning* scheme presented in [1].
## Introduction
In this proof-of-principle demonstration we consider two distinct... | github_jupyter |
## Borehole lithology logs viewer
Interactive view of borehole data used for [exploratory lithology analysis](https://github.com/csiro-hydrogeology/pyela)
Powered by [Voila](https://github.com/QuantStack/voila), [ipysheet](https://github.com/QuantStack/ipysheet) and [ipyleaflet](https://github.com/jupyter-widgets/ipy... | github_jupyter |
# Classification
This notebook aims at giving an overview of the classification metrics that
can be used to evaluate the predictive model generalization performance. We can
recall that in a classification setting, the vector `target` is categorical
rather than continuous.
We will load the blood transfusion dataset.
... | github_jupyter |
Para entrar no modo apresentação, execute a seguinte célula e pressione `-`
```
%reload_ext slide
```
<span class="notebook-slide-start"/>
# Proxy
Este notebook apresenta os seguintes tópicos:
- [Introdução](#Introdu%C3%A7%C3%A3o)
- [Servidor de proxy](#Servidor-de-proxy)
## Introdução
Existe muita informação di... | github_jupyter |
```
import pandas as pd
import numpy as np
import time
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn import preprocessing as pp
from sklearn.model_selection import StratifiedKFold
from sklearn.metrics import accuracy_score
from sklearn import preprocessing
import xgboost as xgb
from sklearn.ensembl... | github_jupyter |
<p></p>
<p style="text-align:center"><font size="20">BRAIN IMAGING</font></p>
<p style="text-align:center"><font size="20">DATA STRUCTURE</font></p>
The dataset for this tutorial is structured according to the [Brain Imaging Data Structure (BIDS)](http://bids.neuroimaging.io/). BIDS is a simple and intuitive way to or... | github_jupyter |
STAT 453: Deep Learning (Spring 2021)
Instructor: Sebastian Raschka (sraschka@wisc.edu)
Course website: http://pages.stat.wisc.edu/~sraschka/teaching/stat453-ss2021/
GitHub repository: https://github.com/rasbt/stat453-deep-learning-ss21
---
```
%load_ext watermark
%watermark -a 'Sebastian Raschka' -v -p torch
... | github_jupyter |
# Hidden Markov Model
## What is a Hidden Markov Model?
A Hidden Markov Model (HMM) is a statistical Markov model in with the system being modeled is assumed to be a Markov process with **hidden** states.
An HMM allows us to talk about both observed events (like words that we see in the input) and hidden events (like... | github_jupyter |
# Deep Reinforcement Learning in Action
### by Alex Zai and Brandon Brown
#### Chapter 3
##### Listing 3.1
```
from Gridworld import Gridworld
game = Gridworld(size=4, mode='static')
import sys
game.display()
game.makeMove('d')
game.makeMove('d')
game.makeMove('d')
game.display()
game.reward()
game.board.render_np()... | github_jupyter |
```
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
```
# 0. General note
* This notebook produces figures and calculations presented in [Ye et al. 2017, JGR](https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1002/2016JB013811).
* This notebook demonstrates how to correct pressure scales for the e... | github_jupyter |
# Generators
# 生成器
> Here we'll take a deeper dive into Python generators, including *generator expressions* and *generator functions*.
本章我们深入讨论Python的生成器,包括*生成器表达式*和*生成器函数*
## Generator Expressions
## 生成器表达式
> The difference between list comprehensions and generator expressions is sometimes confusing; here we'll... | github_jupyter |
<a href="https://colab.research.google.com/github/reallygooday/60daysofudacity/blob/master/Basic_Image_Classifier.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
hand-written digits dataset from UCI: http://archive.ics.uci.edu/ml/datasets/Optical+Re... | github_jupyter |
<h1>REGIONE LOMBARDIA</h1>
Confronto dei dati relativi ai decessi registrati dall'ISTAT e i decessi causa COVID-19 registrati dalla Protezione Civile Italiana con i decessi previsti dal modello predittivo SARIMA.
<h2>DECESSI MENSILI REGIONE LOMBARDIA ISTAT</h2>
Il DataFrame contiene i dati relativi ai decessi mensil... | github_jupyter |
# Self-Driving Car Engineer Nanodegree
## Project: **Finding Lane Lines on the Road**
***
In this project, you will use the tools you learned about in the lesson to identify lane lines on the road. You can develop your pipeline on a series of individual images, and later apply the result to a video stream (really j... | github_jupyter |
```
from imp import reload
import autoargs; reload(autoargs);
```
## argparse made easy!
```
# pass your function and args from your sys.argv, and you're off to the races!
def myprint(arg1, arg2):
print("arg1:", arg1)
print("arg2:", arg2)
autoargs.autocall(myprint, ["first", "second"])
# if you want your argu... | github_jupyter |
## Convolutional Layer
In this notebook, we visualize four filtered outputs (a.k.a. feature maps) of a convolutional layer.
### Import the image
```
import cv2
import matplotlib.pyplot as plt
%matplotlib inline
# TODO: Feel free to try out your own images here by changing img_path
# to a file path to another image ... | github_jupyter |
# A Chaos Game with Triangles
John D. Cook [proposed](https://www.johndcook.com/blog/2017/07/08/the-chaos-game-and-the-sierpinski-triangle/) an interesting "game" from the book *[Chaos and Fractals](https://smile.amazon.com/Chaos-Fractals-New-Frontiers-Science/dp/0387202293)*: start at a vertex of an equilateral trian... | github_jupyter |
# Part 2: Intro to Private Training with Remote Execution
In the last section, we learned about PointerTensors, which create the underlying infrastructure we need for privacy preserving Deep Learning. In this section, we're going to see how to use these basic tools to train our first deep learning model using remote e... | github_jupyter |
# MIDAS Examples
If you're reading this you probably already know that MIDAS stands for Mixed Data Sampling, and it is a technique for creating time-series forecast models that allows you to mix series of different frequencies (ie, you can use monthly data as predictors for a quarterly series, or daily data as predict... | github_jupyter |
```
import sys, os
if 'google.colab' in sys.modules and not os.path.exists('.setup_complete'):
!wget -q https://raw.githubusercontent.com/yandexdataschool/Practical_RL/spring20/setup_colab.sh -O- | bash
!wget -q https://raw.githubusercontent.com/yandexdataschool/Practical_RL/coursera/grading.py -O ../grading.p... | github_jupyter |

[](https://colab.research.google.com/github/JohnSnowLabs/spark-nlp-workshop/blob/master/tutorials/Certification_Trainings/Healthcare/25.Date_Normalizer.ipynb)
## Colab Setup
... | github_jupyter |
# Code to download The Guardian UK data and clean data for text analysis
@Jorge de Leon
This script allows you to download news articles that match your parameters from the Guardian newspaper, https://www.theguardian.com/us.
## Set-up
```
import os
import re
import glob
import json
import requests
import pandas ... | github_jupyter |
```
import torch
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
from pathlib import Path
sns.color_palette("tab10")
sns.set(rc={
"figure.dpi": 150,
"text.usetex": True,
"xtick.labelsize": "small",
"ytick.labelsize": "small",
"axes.labelsize": "small",
"axes.titlesize":... | github_jupyter |
Neuroon cross-validation
------------------------
Neuroon and PSG recordings were simultanously collected over the course of two nights. This analysis will show whether Neuroon is able to accurately classify sleep stages. The PSG classification will be a benchmark against which Neuroon performance will be tested. "Th... | github_jupyter |
# PI-ICR analysis
Created on 17 July 2019 for the ISOLTRAP experiment
- V1.1 (24 June 2020): Maximum likelihood estimation was simplified based on SciPy PDF's and the CERN-ROOT6 minimizer via the iminuit package (→ great performance)
- V1.2 (20 February 2021): Preparations for scientific publication and iminuit v2 upd... | github_jupyter |
# Introdution to Jupyter Notebooks and Text Processing in Python
This 'document' is a Jupyter notebook. It allows you to combine explanatory **text** and **code** that executes to produce results you can see on the same page.
## Notebook Basics
### Text cells
The box this text is written in is called a *cell*. It is... | github_jupyter |
<font size="+1">This notebook will illustrate how to access DeepLabCut(DLC) results for IBL sessions and how to create short videos with DLC labels printed onto, as well as wheel angle, starting by downloading data from the IBL flatiron server. It requires ibllib, a ONE account and the following script: https://github.... | github_jupyter |
# piston example with explicit Euler scheme
```
%matplotlib inline
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.animation as anim
import numpy as np
import sys
sys.path.insert(0, './code')
import ideal_gas
```
### physical parameters
```
# length of cylinder
l = 0.1
# radius of cylinder
r... | github_jupyter |
```
#Using our synthetic data library for today's exercise
#pip install ydata
#Loading the census dataset from kaggle
import logging
import os
import requests
import pandas as pd
import seaborn as sns
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import OneHotEncoder
#import ydata.synt... | github_jupyter |
# LAB 5b: Deploy and predict with Keras model on Cloud AI Platform.
**Learning Objectives**
1. Setup up the environment
1. Deploy trained Keras model to Cloud AI Platform
1. Online predict from model on Cloud AI Platform
1. Batch predict from model on Cloud AI Platform
## Introduction
In this notebook, we'll depl... | github_jupyter |
## XYZ Pro Features
This notebook demonstrates some of the pro features for XYZ Hub API.
XYZ paid features can be found here: [xyz pro features](https://www.here.xyz/xyz_pro/).
XYZ plans can be found here: [xyz plans](https://developer.here.com/pricing).
### Virtual Space
A virtual space is described by definition w... | github_jupyter |
# torchserve.ipynb
This notebook contains code for the portions of the benchmark in [the benchmark notebook](./benchmark.ipynb) that use [TorchServe](https://github.com/pytorch/serve).
```
# Imports go here
import json
import os
import requests
import scipy.special
import transformers
# Fix silly warning messages a... | github_jupyter |
# Exercise 6-3
## LSTM
The following two cells will create a LSTM cell with one neuron.
We scale the output of the LSTM linear and add a bias.
Then the output will be wrapped by a sigmoid activation.
The goal is to predict a time series where every $n^{th}$ ($5^{th}$ in the current example) element is 1 and all other... | github_jupyter |
<a href="https://colab.research.google.com/github/reihaneh-torkzadehmahani/MyDPGAN/blob/master/AdvancedDPCGAN.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
## differential_privacy.analysis.rdp_accountant
```
# Copyright 2018 The TensorFlow Author... | github_jupyter |
### **PINN eikonal solver for a portion of the Marmousi model**
```
from google.colab import drive
drive.mount('/content/gdrive')
cd "/content/gdrive/My Drive/Colab Notebooks/Codes/PINN_isotropic_eikonal_R1"
!pip install sciann==0.5.4.0
!pip install tensorflow==2.2.0
#!pip install keras==2.3.1
import numpy as np
impor... | github_jupyter |
# 1A.1 - Deviner un nombre aléatoire (correction)
On reprend la fonction introduite dans l'énoncé et qui permet de saisir un nombre.
```
import random
nombre = input("Entrez un nombre")
nombre
```
**Q1 :** Ecrire une jeu dans lequel python choisi aléatoirement un nombre entre 0 et 100, et essayer de trouver ce nombr... | github_jupyter |
# Pytorch Basic
```
import torch
import torch.nn as nn
import torchvision
import torchvision.transforms as transforms
import matplotlib.pyplot as plt
from IPython.display import clear_output
torch.cuda.is_available()
```
## Device
```
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
```
## Hype... | github_jupyter |
# Colab-pytorch-image-classification
Original repo: [bentrevett/pytorch-image-classification](https://github.com/bentrevett/pytorch-image-classification)
[SqueezeNet code](https://github.com/pytorch/vision/blob/master/torchvision/models/squeezenet.py): [pytorch/vision](https://github.com/pytorch/vision)
My fork:... | github_jupyter |
# From Variables to Classes
## A short Introduction
Python - as any programming language - has many extensions and libraries at its disposal. Basically, there are libraries for everything.
<center>But what are **libraries**? </center>
Basically, **libraries** are a collection of methods (_small pieces of code... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.