text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
# Large Scale Training with VISSL Training (mixed precision, LARC, ZeRO etc)
In this tutorial, show configuration settings that users can set for training large models.
You can make a copy of this tutorial by `File -> Open in playground mode` and make changes there. DO NOT request access to this tutorial.
# Using LA... | github_jupyter |
# Funciones generadoras
Por regla general, cuando queremos crear una lista de algún tipo, lo que hacemos es crear la lista vacía, y luego con un bucle varios elementos e ir añadiendolos a la lista si cumplen una condición:
```
[numero for numero in [0,1,2,3,4,5,6,7,8,9,10] if numero % 2 == 0 ]
```
También vimos cómo ... | github_jupyter |
<img src="images/QISKit-c copy.gif" alt="Note: In order for images to show up in this jupyter notebook you need to select File => Trusted Notebook" width="250 px" align="left">
# Hadamard Action: Approach 2
## Jupyter Notebook 2/3 for the Teach Me QISKIT Tutorial Competition
- Connor Fieweger
<img src="images/hadamar... | github_jupyter |
# Introduction to Python
An introduction to Python for middle and high school students using Python 3 syntax.

## Getting started
We're assuming that you already have Python 3.6 or higher installed. If not, go to Python.org to downlo... | github_jupyter |
Good morning! You have completed the math trail on car plate numbers in a somewhat (semi-)automated way.
Can you actually solve the same tasks with code? Read on and you will be amazed how empowering programming can be to help make mathematics learning more efficient and productive! :)
# Task
Given the incomplete ca... | github_jupyter |
# Using a new function to evaluate or evaluating a new acquisition function
In this notebook we describe how to integrate a new fitness function to the testing framework as well as how to integrate a new acquisition function.
```
import numpy as np
import matplotlib.pyplot as plt
# add the egreedy module to the path... | github_jupyter |
```
from dgpsi import dgp, kernel, combine, lgp, path, emulator, Poisson, Hetero, NegBin
import numpy as np
import matplotlib.pyplot as plt
```
# Example 1 on heteroskedastic Gaussian likelihood
```
n=12
X=np.linspace(0,1,n)[:,None]
#Create some replications of input positions so that each input position will six dif... | github_jupyter |
<h1 align="center">TensorFlow Neural Network Lab</h1>
<img src="image/notmnist.png">
In this lab, you'll use all the tools you learned from *Introduction to TensorFlow* to label images of English letters! The data you are using, <a href="http://yaroslavvb.blogspot.com/2011/09/notmnist-dataset.html">notMNIST</a>, consi... | github_jupyter |
# Properties of ELGs in DR7 Imaging
The purpose of this notebook is to quantify the observed properties (particulary size and ellipticity) of ELGs using DR7 catalogs of the COSMOS region. We use the HST/ACS imaging of objects in this region as "truth."
J. Moustakas
2018 Aug 15
```
import os, warnings, pdb
import ... | github_jupyter |
```
# default_exp core
```
# hmd_newspaper_dl
> Download Heritage made Digital Newspaper from the BL repository
The aim of this code is to make it easier to download all of the [Heritage Made Digital Newspapers](https://bl.iro.bl.uk/collections/353c908d-b495-4413-b047-87236d2573e3?locale=en) from the British Library'... | github_jupyter |
<img src="../figures/HeaDS_logo_large_withTitle.png" width="300">
<img src="../figures/tsunami_logo.PNG" width="600">
[](https://colab.research.google.com/github/Center-for-Health-Data-Science/PythonTsunami/blob/fall2021/Conditionals/Conditions... | github_jupyter |
# Getting Started with gensim
This section introduces the basic concepts and terms needed to understand and use `gensim` and provides a simple usage example.
## Core Concepts and Simple Example
At a very high-level, `gensim` is a tool for discovering the semantic structure of documents by examining the patterns o... | github_jupyter |
# Simple Test between NumPy and Numba
$$
\Gamma = \sqrt{\frac{\eta_H}{\eta_V} \kappa^2 + \eta_H \zeta_H}
$$
```
import numba
import cython
import numexpr
import numpy as np
%load_ext cython
# Used cores by numba can be shown with (xy default all cores are used):
#print(numba.config.NUMBA_DEFAULT_NUM_THREADS)
# This... | github_jupyter |
```
import os
import pandas as pd
import numpy as np
import json
import pickle
from collections import defaultdict
from pathlib import Path
from statistics import mean, stdev
from sklearn.metrics import ndcg_score, dcg_score
import matplotlib.pyplot as plt
import seaborn as sns
import torch
import os, sys
parentPath ... | github_jupyter |
```
import numpy as np
import torch
from torch import nn, optim
import matplotlib.pyplot as plt
from neurodiffeq import diff
from neurodiffeq.ode import IVP, solve_system, Monitor, ExampleGenerator, Solution, _trial_solution
from neurodiffeq.networks import FCNN, SinActv
from scipy.special import roots_legendre
... | github_jupyter |
# imports
```
import sys; sys.path.append(_dh[0].split("knowknow")[0])
from knowknow import *
```
# User settings
```
database_name = "sociology-wos"
pubyears = None
if 'wos' in database_name:
pubyears = load_variable("%s.pubyears" % database_name)
print("Pubyears loaded for %s entries" % len(pubyears.keys()... | github_jupyter |
<center><em>Copyright by Pierian Data Inc.</em></center>
<center><em>For more information, visit us at <a href='http://www.pieriandata.com'>www.pieriandata.com</a></em></center>
# KNN Project Exercise
Due to the simplicity of KNN for Classification, let's focus on using a PipeLine and a GridSearchCV tool, since thes... | github_jupyter |
```
!python --version
# In case issues with installation of tensortrade, Install the version below using that way
# https://github.com/tensortrade-org/tensortrade/issues/229#issuecomment-633164703
# version: https://github.com/tensortrade-org/tensortrade/releases/tag/v1.0.3
!pip install -U tensortrade==1.0.3 ta matplot... | github_jupyter |
Copyright 2019 Google LLC.
SPDX-License-Identifier: Apache-2.0
**Notebook Version** - 1.0.0
```
# Install datacommons
!pip install --upgrade --quiet git+https://github.com/datacommonsorg/api-python.git@stable-1.x
```
# Analyzing Income Distribution
The American Community Survey (published by the US Census) annually... | github_jupyter |
## Importing dependencies and loading the data
```
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
from sklearn.datasets import load_boston
dataset=load_boston()
dataset
```
### So in the given data there are certain features and target prices of houses in boston. So let's... | github_jupyter |
# Move Files
```
import numpy as np
import pandas as pd
import os
from datetime import datetime
import shutil
import random
pd.set_option('max_colwidth', -1)
```
# Create list of current files
```
SAGEMAKER_REPO_PATH = r'/home/ec2-user/SageMaker/classify-streetview'
ORIGINAL_IMAGE_PATH = os.path.join(SAGEMAKER_REPO... | github_jupyter |
## Main Driver Notebook for Training Graph NNs on TSP for Edge Classification
### MODELS
- GatedGCN
- GCN
- GAT
- GraphSage
- GIN
- MoNet
- MLP
### DATASET
- TSP
### TASK
- Edge Classification, i.e. Classifying each edge as belonging/not belonging to the optimal TSP solution set.
```
"""
IMPORTING LIBS
... | github_jupyter |
# k-Nearest Neighbor (kNN) exercise
#### This assignment was adapted from Stanford's CS231n course: http://cs231n.stanford.edu/
The kNN classifier consists of two stages:
- During training, the classifier takes the training data and simply remembers it
- During testing, kNN classifies every test image by comparing t... | github_jupyter |
# Introduction to Qiskit
Welcome to the Quantum Challenge! Here you will be using Qiskit, the open source quantum software development kit developed by IBM Quantum and community members around the globe. The following exercises will familiarize you with the basic elements of Qiskit and quantum circuits.
To begin, let... | github_jupyter |
# Using Variational Autoencoder to Generate Faces
In this example, we are going to use VAE to generate faces. The dataset we are going to use is [CelebA](http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html). The dataset consists of more than 200K celebrity face images. You have to download the Align&Cropped Images from t... | github_jupyter |
<img src="../Pics/MLSb-T.png" width="160">
<br><br>
<center><u><H1>LSTM and GRU on Sentiment Analysis</H1></u></center>
```
import tensorflow as tf
from keras.backend.tensorflow_backend import set_session
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
config.log_device_placement = True
sess = tf.Sess... | github_jupyter |
```
import matplotlib.pyplot as plt
%matplotlib inline
plt.scatter([1700, 2100, 1900, 1300, 1600, 2200], [53000, 65000, 59000, 41000, 50000, 68000])
plt.show()
x = [1300, 1400, 1600, 1900, 2100, 2300]
y = [88000, 72000, 94000, 86000, 112000, 98000]
plt.scatter(x, y, s=32, c='cyan', alpha=0.5)
plt.show()
plt.bar(x, y, w... | github_jupyter |
```
from pathlib import Path
import pandas as pd
import numpy as np
import xarray as xr
import gcsfs
from typing import List
import io
import hashlib
import os
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import torch
from torch import nn
import torch.nn.functional as F
import pytorch_lightning as... | github_jupyter |
# Exercise Set 5: Python plotting
*Morning, August 15, 2018
In this Exercise set we will work with visualizations in python, using two powerful plotting libraries. We will also quickly touch upon using pandas for exploratory plotting.
```
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import... | github_jupyter |

[](https://colab.research.google.com/github/JohnSnowLabs/spark-nlp-workshop/blob/master/tutorials/Certification_Trainings/Healthcare/6.Clinical_Context_Spell_Checker.ipynb)
<H... | github_jupyter |
<font face=楷体 size=6><b>黑人抬棺人脸检测:</b>
<font face=楷体 size=5><b>背景:</b>
<font face=楷体 size=3>黑人抬棺这么火,怎么能不用paddlehub试一试呢?
<br>
<font face=楷体 size=3>临近期末,准备考试,还要准备考研,555,明明有好点子,但是没时间做,先出一个黑人抬棺的视频8
<font face=楷体 size=5><b>结果:</b>
<font face=楷体 size=3>在我的B站上: <a href=https://www.bilibili.com/video/BV1Sk4y1r7Zz>http... | github_jupyter |
# Monte Carlo Methods
In this notebook, you will write your own implementations of many Monte Carlo (MC) algorithms.
While we have provided some starter code, you are welcome to erase these hints and write your code from scratch.
### Part 0: Explore BlackjackEnv
We begin by importing the necessary packages.
```
i... | github_jupyter |
**Aims**:
- extract the omics mentioned in multi-omics articles
**NOTE**: the articles not in PMC/with no full text need to be analysed separately, or at least highlighted.
```
%run notebook_setup.ipynb
import pandas
pandas.set_option('display.max_colwidth', 100)
%vault from pubmed_derived_data import literature, li... | github_jupyter |
```
from django.template import Context
from django.template.base import Token
from django.template.base import Parser
from django.template.base import Template
from django.template.base import TokenType
from django.core.management import call_command
from wagtail_srcset.templatetags.wagtail_srcset_tags import srcse... | github_jupyter |
<a href="https://colab.research.google.com/github/kylehounslow/gdg_workshop/blob/master/notebooks/hello_tensorflow.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Hello TensorFlow!
This notebook is a gentle introduction to TensorFlow.
Mostly t... | github_jupyter |
## Experiment
```
experiment_label = 'rforest01'
```
### Aim:
* compare basic random forest to best logreg
### Findings:
* ROC on training hugs the top left; overfitting.
* Next: increase min samples per leaf.
## Set up
```
import pandas as pd
import numpy as np
from joblib import dump, load # simpler than pickl... | github_jupyter |
# 训练你的物体检测器
```
!pip install gluoncv
import gluoncv as gcv
import mxnet as mx
```
# 准备训练集
```
import os
class DetectionDataset(gcv.data.VOCDetection):
CLASSES = ['cocacola', 'noodles', 'hand']
def __init__(self, root):
self._im_shapes = {}
self._root = os.path.expanduser(root)
self._... | github_jupyter |
<img width="10%" alt="Naas" src="https://landen.imgix.net/jtci2pxwjczr/assets/5ice39g4.png?w=160"/>
# Hugging Face - Ask boolean question to T5
<a href="https://app.naas.ai/user-redirect/naas/downloader?url=https://raw.githubusercontent.com/jupyter-naas/awesome-notebooks/master/Hugging%20Face/Hugging_Face_Ask_boolean_... | github_jupyter |
## Goes over modeling, starting from modeling tables.
### We're using modeling tables which were prepared based on 12 hours worth of vital sign data from each patient, as well as medication history during the stay, and patient characteristics.
### The model predicts the probability of having a rapid response team event... | github_jupyter |
```
import numpy as np
import pickle
import scipy
import combo
import os
import urllib
import ssl
import matplotlib.pyplot as plt
%matplotlib inline
ssl._create_default_https_context = ssl._create_unverified_context
def download():
if not os.path.exists('data/s5-210.csv'):
if not os.path.exists('data'):
... | github_jupyter |
# Multipitch tracking using Echo State Networks
## Introduction
In this notebook, we demonstrate how the ESN can deal with multipitch tracking, a challenging multilabel classification problem in music analysis.
As this is a computationally expensive task, we have pre-trained models to serve as an entry point.
At fi... | github_jupyter |
```
%pylab inline
import pandas as pd
import plotnine as p
p.theme_set(p.theme_classic())
plt.rcParams['axes.spines.top'] = False
plt.rcParams['axes.spines.right'] = False
counts = pd.read_parquet('mca_brain_counts.parquet')
sample_info = pd.read_parquet('mca_brain_cell_info.parquet')
```
### Differential expression
... | github_jupyter |
<table> <tr>
<td style="background-color:#ffffff;">
<a href="http://qworld.lu.lv" target="_blank"><img src="../images/qworld.jpg" width="50%" align="left"> </a></td>
<td width="70%" style="background-color:#ffffff;vertical-align:bottom;text-align:right;">
prepared by Maksim Dimi... | github_jupyter |
Foreign Function Interface
====
```
%matplotlib inline
import matplotlib.pyplot as plt
plt.style.use('ggplot')
import numpy as np
```
Wrapping functions written in C
----
### Steps
- Write the C header and implementation files
- Write the Cython `.pxd` file to declare C function signatures
- Write the Cython `.pyx... | github_jupyter |
```
# from google.colab import drive
# drive.mount('/content/drive')
# path = "/content/drive/MyDrive/Research/cods_comad_plots/sdc_task/mnist/"
import torch.nn as nn
import torch.nn.functional as F
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import torch
import torchvision
import torchvisi... | github_jupyter |
# Let's post a message to Slack
In this session, we're going to use Python to post a message to Slack. I set up [a team for us](https://ire-cfj-2017.slack.com/) so we can mess around with the [Slack API](https://api.slack.com/).
We're going to use a simple [_incoming webhook_](https://api.slack.com/incoming-webhooks)... | github_jupyter |
```
import numpy as np
from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import seaborn as sns
sns.set(color_codes=True)
%matplotlib inline
# ilk terimin covarianci hep 1 cikar -2 - -2
x = np.array([-2, -1, 0, 3.5, 4,]);
y = np.array([4.1, 0.9, 2, 12.3, 15.8])
N = len(x)
m = np.zeros((N))
p... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
from hfnet.datasets.hpatches import Hpatches
from hfnet.evaluation.loaders import sift_loader, export_loader, fast_loader, harris_loader
from hfnet.evaluation.local_descriptors import evaluate
from hfnet.utils import tools
%load_ext autoreload
%autoreload 2
%matp... | github_jupyter |
# COCO Reader
Reader operator that reads a COCO dataset (or subset of COCO), which consists of an annotation file and the images directory.
`DALI_EXTRA_PATH` environment variable should point to the place where data from [DALI extra repository](https://github.com/NVIDIA/DALI_extra) is downloaded. Please make sure tha... | github_jupyter |
```
# The magic commands below allow reflecting the changes in an imported module without restarting the kernel.
%load_ext autoreload
%autoreload 2
import sys
print(f'Python version: {sys.version.splitlines()[0]}')
print(f'Environment: {sys.exec_prefix}')
```
Shell commands are prefixed with `!`
```
!pwd
!echo hello ... | github_jupyter |
```
#week-4,l-10
#DICTIONARY:-
# A Simple dictionary
alien_0={'color': 'green','points': 5}
print(alien_0['color'])
print(alien_0['points'])
#accessing value in a dictionary:
alien_0={'color':'green','points': 5}
new_points=alien_0['points']
print(f"you just eand {new_points} points")
#adding new.key-value pairs:-
ali... | github_jupyter |
```
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
import seaborn as sns
%matplotlib inline
df = pd.read_csv('boston_house_prices.csv')
```
<b>Explanation of Features</b>
* CRIM: per capita crime rate per town (assumption: if CRIM high, target small)
* ZN: proportion of residential land z... | github_jupyter |
Let's go through the known systems in [Table 1](https://www.aanda.org/articles/aa/full_html/2018/01/aa30655-17/T1.html) of Jurysek+(2018)
```
# 11 systems listed in their Table 1
systems = ['RW Per', 'IU Aur', 'AH Cep', 'AY Mus',
'SV Gem', 'V669 Cyg', 'V685 Cen',
'V907 Sco', 'SS Lac', 'QX Cas'... | github_jupyter |
# Parameters in QCoDeS
A `Parameter` is the basis of measurements and control within QCoDeS. Anything that you want to either measure or control within QCoDeS should satisfy the `Parameter` interface. You may read more about the `Parameter` [here](http://qcodes.github.io/Qcodes/user/intro.html#parameter).
```
import ... | github_jupyter |
# 基于注意力的神经机器翻译
此笔记本训练一个将卡比尔语翻译为英语的序列到序列(sequence to sequence,简写为 seq2seq)模型。此例子难度较高,需要对序列到序列模型的知识有一定了解。
训练完此笔记本中的模型后,你将能够输入一个卡比尔语句子,例如 *"Times!"*,并返回其英语翻译 *"Fire!"*
对于一个简单的例子来说,翻译质量令人满意。但是更有趣的可能是生成的注意力图:它显示在翻译过程中,输入句子的哪些部分受到了模型的注意。
<img src="https://tensorflow.google.cn/images/spanish-english.png" alt="spanish-engl... | github_jupyter |
<div align="center">
<h1><img width="30" src="https://madewithml.com/static/images/rounded_logo.png"> <a href="https://madewithml.com/">Made With ML</a></h1>
Applied ML · MLOps · Production
<br>
Join 30K+ developers in learning how to responsibly <a href="https://madewithml.com/about/">deliver value</a> with ML.
... | github_jupyter |
Here is an illustration of the IFS T42 issue.
```
import xarray as xr
import matplotlib.pyplot as plt
from src.score import *
# This is the regridded ERA data
DATADIR = '/data/weather-benchmark/5.625deg/'
z500_valid = load_test_data(f'{DATADIR}geopotential_500', 'z')
t850_valid = load_test_data(f'{DATADIR}temperature_... | github_jupyter |
# Введение в координатный спуск (coordinate descent): теория и приложения
## Постановка задачи и основное предположение
$$
\min_{x \in \mathbb{R}^n} f(x)
$$
- $f$ выпуклая функция
- Если по каждой координате будет выполнено $f(x + \varepsilon e_i) \geq f(x)$, будет ли это означать, что $x$ точка минимума?
- Если $... | github_jupyter |
# Principal Component Analysis in Shogun
#### By Abhijeet Kislay (GitHub ID: <a href='https://github.com/kislayabhi'>kislayabhi</a>)
This notebook is about finding Principal Components (<a href="http://en.wikipedia.org/wiki/Principal_component_analysis">PCA</a>) of data (<a href="http://en.wikipedia.org/wiki/Unsuperv... | github_jupyter |
```
# Making our own objects
class Foo:
def hi(self): # self is the first parameter by convention
print(self) # self is a pointer to the object
f = Foo() # create Foo class object
f.hi()
f
Foo.hi
# Constructor
class Person:
def __init__(self, name, age):
self.name = name
self.age = age
... | github_jupyter |
# Forecasting in statsmodels
This notebook describes forecasting using time series models in statsmodels.
**Note**: this notebook applies only to the state space model classes, which are:
- `sm.tsa.SARIMAX`
- `sm.tsa.UnobservedComponents`
- `sm.tsa.VARMAX`
- `sm.tsa.DynamicFactor`
```
%matplotlib inline
import num... | github_jupyter |
### SketchGraphs demo
In this notebook, we'll first go through various ways of representing and inspecting sketches in SketchGraphs. We'll then take a look at using Onshape's API in order to solve sketch constraints.
```
%load_ext autoreload
%autoreload 2
import os
import json
from copy import deepcopy
%matplotlib i... | github_jupyter |
```
import sqlite3
import pandas as pd
def run_query(query):
with sqlite3.connect('AreaOvitrap.db') as conn:
return pd.read_sql(query,conn)
def run_command(command):
with sqlite3.connect('AreaOvitrap.db') as conn:
conn.execute('PRAGMA foreign_keys = ON;')
conn.isolation_level = None
... | github_jupyter |
```
%matplotlib inline
from pyvista import set_plot_theme
set_plot_theme('document')
```
Slicing {#slice_example}
=======
Extract thin planar slices from a volume.
```
# sphinx_gallery_thumbnail_number = 2
import pyvista as pv
from pyvista import examples
import matplotlib.pyplot as plt
import numpy as np
```
PyVis... | github_jupyter |
# Exporing Graph Datasets in Jupyter
Juypter notebooks are perfect environments for both carrying out and capturing exporatory work. Even on moderate sizes datasets they provide an interactive environement that can drive both local and remote computational tasks.
In this example, we will load a datatset using pandas,... | github_jupyter |
```
%matplotlib inline
```
# Early stopping of Gradient Boosting
Gradient boosting is an ensembling technique where several weak learners
(regression trees) are combined to yield a powerful single model, in an
iterative fashion.
Early stopping support in Gradient Boosting enables us to find the least number
of ite... | github_jupyter |
# Problems
```
import math
import pandas as pd
from sklearn import preprocessing
from sklearn.neighbors import NearestNeighbors, KNeighborsClassifier, KNeighborsRegressor
from sklearn.model_selection import train_test_split
from sklearn.metrics.pairwise import euclidean_distances
from sklearn.metrics import accuracy_... | github_jupyter |
```
%matplotlib inline
import control
from control.matlab import *
import numpy as np
import matplotlib.pyplot as plt
def pole_plot(poles, title='Pole Map'):
plt.title(title)
plt.scatter(np.real(poles), np.imag(poles), s=50, marker='x')
plt.axhline(y=0, color='black');
plt.axvline(x=0, color='black');... | github_jupyter |
```
import pandas as pd
import numpy as np
import TrialPathfinder as tp
```
# Trial PathFinder
## Load Data Tables
TrialPathfinder reads tables in Pandas dataframe structure (pd.dataframe) as default. The date information should be read as datetime (use function pd.to_datetime to convert if not).
**1. Features**:
-... | github_jupyter |
# Team Surface Velocity
### **Members**: Grace Barcheck, Canyon Breyer, Rodrigo Gómez-Fell, Trevor Hillebrand, Ben Hills, Lynn Kaluzienski, Joseph Martin, David Polashenski
### **Science Advisor**: Daniel Shapero
### **Special Thanks**: Ben Smith, David Shean
### Motivation
**Speaker: Canyon Breyer**
Previous wor... | github_jupyter |
# aitextgen Training Hello World
_Last Updated: Feb 21, 2021 (v.0.4.0)_
by Max Woolf
A "Hello World" Tutorial to show how training works with aitextgen, even on a CPU!
```
from aitextgen.TokenDataset import TokenDataset
from aitextgen.tokenizers import train_tokenizer
from aitextgen.utils import GPT2ConfigCPU
from ... | github_jupyter |
# Train-Eval
---
## Import Libraries
```
import os
import sys
from pathlib import Path
import torch
import torch.nn as nn
import torch.optim as optim
from torchtext.data import BucketIterator
sys.path.append("../")
from meta_infomax.datasets.fudan_reviews import prepare_data, get_data
```
## Global Constants
```
... | github_jupyter |
# Introduction to Jupyter Notebooks
Today we are going to learn about [Jupyter Notebooks](https://jupyter.org/)! The advantage of notebooks is that they can include explanatory text, code, and plots in the same document. **This makes notebooks an ideal playground for explaining and learning new things without having t... | github_jupyter |
# Navigation
---
In this notebook, you will learn how to use the Unity ML-Agents environment for the first project of the [Deep Reinforcement Learning Nanodegree](https://www.udacity.com/course/deep-reinforcement-learning-nanodegree--nd893).
### 1. Start the Environment
We begin by importing some necessary packages... | github_jupyter |
```
import matplotlib.pyplot as plt
import pandas as pd
from sklearn.preprocessing import MinMaxScaler
df = pd.read_csv('train_FD001.txt', sep=' ', header=None)
# dropping NAN values
df = df.dropna(axis=1, how='all')
# Naming the columns
df.columns = ["unit", "cycles", "Op1",
"Op2", "Op3", "S1",... | github_jupyter |
<h1>Table of Contents<span class="tocSkip"></span></h1>
<div class="toc"><ul class="toc-item"><li><span><a href="#Multi-dimensional-Particle-in-a-Box" data-toc-modified-id="Multi-dimensional-Particle-in-a-Box-4"><span class="toc-item-num">4 </span>Multi-dimensional Particle-in-a-Box</a></span><ul class="toc-... | github_jupyter |
# Challenge
In this challenge, we will practice on dimensionality reduction with PCA and selection of variables with RFE. We will use the _data set_ [Fifa 2019](https://www.kaggle.com/karangadiya/fifa19), originally containing 89 variables from over 18 thousand players of _game_ FIFA 2019.
## _Setup_
```
from math i... | github_jupyter |
```
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
```
# Loading a pre-trained model in inference mode
In this tutorial, we will show how to instantiate a model pre-trained with VISSL to use it in inference mode to extract features from its trunk.
We will concentrate on loading a model pre-t... | github_jupyter |
# Enterprise Time Series Forecasting and Decomposition Using LSTM
This notebook is a tutorial on time series forecasting and decomposition using LSTM.
* First, we generate a signal (time series) that includes several components that are commonly found in enterprise applications: trend, seasonality, covariates, and cov... | github_jupyter |
# OSM Data Exploration
## Extraction of districts from shape files
For our experiments we consider two underdeveloped districts Araria, Bihar and Namsai, Arunachal Pradesh, the motivation of this comes from this [dna](https://www.dnaindia.com/india/report-out-of-niti-aayog-s-20-most-underdeveloped-districts-19-are-rul... | github_jupyter |
```
'''
Comparing single layer MLP with deep MLP (using TensorFlow)
'''
import numpy as np
from scipy.optimize import minimize
from scipy.io import loadmat
from scipy.stats import logistic
from math import sqrt
import time
import pickle
# Do not change this
def initializeWeights(n_in,n_out):
"""
# initiali... | github_jupyter |
##### Copyright 2020 The Cirq Developers
```
#@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 agre... | github_jupyter |
```
from fake_useragent import UserAgent
import requests
ua = UserAgent()
from newspaper import Article
from queue import Queue
from urllib.parse import quote
from unidecode import unidecode
def get_date(load):
try:
date = re.findall(
'[-+]?[.]?[\d]+(?:,\d\d\d)*[\.]?\d*(?:[eE][-+]?\d+)?', load... | github_jupyter |
```
import os
import numpy as np
from torch.utils.data import DataLoader
from torchvision import transforms as T
import cv2
import pandas as pd
from self_sup_data.chest_xray import SelfSupChestXRay
from model.resnet import resnet18_enc_dec
from train_chest_xray import SETTINGS
from experiments.chest_xray_tasks import ... | github_jupyter |
# Trumpler 1930 Dust Extinction
Figure 6.2 from Chapter 6 of *Interstellar and Intergalactic Medium* by Ryden & Pogge, 2021,
Cambridge University Press.
Data are from [Trumpler, R. 1930, Lick Observatory Bulletin #420, 14, 154](https://ui.adsabs.harvard.edu/abs/1930LicOB..14..154T), Table 3. The extinction curve de... | github_jupyter |
```
from os.path import join, dirname
from os import listdir
import numpy as np
import pandas as pd
# GUI library
import panel as pn
import panel.widgets as pnw
# Chart libraries
from bokeh.plotting import figure
from bokeh.models import ColumnDataSource, Legend
from bokeh.palettes import Spectral5, Set2
from bokeh.... | github_jupyter |
# Triplet Loss for Implicit Feedback Neural Recommender Systems
The goal of this notebook is first to demonstrate how it is possible to build a bi-linear recommender system only using positive feedback data.
In a latter section we show that it is possible to train deeper architectures following the same design princi... | github_jupyter |
```
import tensorflow as tf
tf.constant([[1.,2.,3.], [4.,5.,6.]])
tf.constant(42) # 스칼라
t = tf.constant([[1.,2.,3.], [4.,5.,6.]])
t.shape # TensorShape([2, 3])
t.dtype # tf.float32
t[:, 1:]
t[..., 1, tf.newaxis]
t + 10
tf.square(t) # 제곱
t @ tf.transpose(t) # transpose는 행렬 변환
import numpy as np
a = np.array([2., 4., 5... | github_jupyter |
*Регулярное выражение* — это последовательность символов, используемая для поиска и замены текста в строке или файле
Регулярные выражения используют два типа символов:
- специальные символы: как следует из названия, у этих символов есть специальные значения. Аналогично символу *, который как правило означает «любой с... | github_jupyter |
Define the network:
```
import torch # PyTorch base
from torch.autograd import Variable # Tensor class w gradients
import torch.nn as nn # modules, layers, loss fns
import torch.nn.functional as F # Conv,Pool,Loss,Actvn,Nrmlz fns from here
class Net(nn.Module):
def __init__(self):
super(Net, self).__i... | github_jupyter |
# EuroSciPy 2018: NumPy tutorial (https://github.com/gertingold/euroscipy-numpy-tutorial)
## Let's do some slicing
```
mylist = list(range(10))
print(mylist)
```
Use slicing to produce the following outputs:
[2, 3, 4, 5]
[0, 1, 2, 3, 4]
[6, 7, 8, 9]
[0, 2, 4, 6, 8]
[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
[7, 5, 3]
## ... | github_jupyter |
## 8.5 Optimization of Basic Blocks
### 8.5.1
> Construct the DAG for the basic block
> ```
d = b * c
e = a + b
b = b * c
a = e - d
```
```
+--+--+
| - | a
+-+++-+
| |
+---+ +---+
| |
+--v--+ +--v--+
e | + | | * | d,b
+-+++-+... | github_jupyter |
*Accompanying code examples of the book "Introduction to Artificial Neural Networks and Deep Learning: A Practical Guide with Applications in Python" by [Sebastian Raschka](https://sebastianraschka.com). All code examples are released under the [MIT license](https://github.com/rasbt/deep-learning-book/blob/master/LICEN... | github_jupyter |

---
## 01. Interpolación de Funciones
Eduard Larrañaga (ealarranaga@unal.edu.co)
---
## Interpolación
### Resumen
En este cuaderno se presentan algunas de las técnicas de interpolación de una función.
---
## Interpolación
Los datos astrofísicos (experimentales y sint... | github_jupyter |
## Deploy an ONNX model to an IoT Edge device using ONNX Runtime and the Azure Machine Learning

```
!python -m pip install --upgrade pip
!pip install azureml-core azureml-contrib-iot azure-mgmt-containerregi... | github_jupyter |
# About this kernel
+ efficientnet_b3
+ CurricularFace
+ Mish() activation
+ Ranger (RAdam + Lookahead) optimizer
+ margin = 0.9
## Imports
```
import sys
sys.path.append('../input/shopee-competition-utils')
sys.path.insert(0,'../input/pytorch-image-models')
import numpy as np
import pandas as pd
import torch
... | github_jupyter |
```
# While in argo environment: Import necessary packages for this notebook
import numpy as np
from matplotlib import pyplot as plt
import xarray as xr
import pandas as pd
from pandas.plotting import register_matplotlib_converters
register_matplotlib_converters()
%matplotlib inline
import glob
```
!python -m pip in... | github_jupyter |
```
#importing the packages
import pandas as pd
import numpy as np
import random
import matplotlib.pyplot as plt
import seaborn as sns
sns.set()
import joblib # for saving algorithm and preprocessing objects
from sklearn.linear_model import LinearRegression
# uploading the dataset
df = pd.read_csv('pollution_us_2000_... | github_jupyter |
# Modeling and Simulation in Python
Chapter 5: Design
Copyright 2017 Allen Downey
License: [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0)
```
# If you want the figures to appear in the notebook,
# and you want to interact with them, use
# %matplotlib notebook
# If yo... | github_jupyter |
## Dependencies
```
import os
import cv2
import shutil
import random
import warnings
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.utils import class_weight
from sklearn.model_selection import train_test_split
from sklearn.metrics import confusion_matrix, coh... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.