text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
## 데이터 살펴보기
```
from tensorflow.keras.datasets import fashion_mnist
# 데이터를 다운받습니다.
(x_train, y_train), (x_test, y_test) = fashion_mnist.load_data()
import matplotlib.pyplot as plt
import numpy as np
np.random.seed(777)
class_names = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat',
'Sandal', 'S... | github_jupyter |
```
from __future__ import print_function, division
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
import torch.optim as optim
from torch.optim import lr_scheduler
from torch.utils.data import DataLoader, Dataset
from torchvision import transforms, models
import torch.nn.functional as F
from ... | github_jupyter |
## pandas Series
```
import pandas as pd
import numpy as np
from numpy.random import randn
np.random.seed(0)
np.random.random(5)
labels = ['a', 'b', 'c']
my_data = [10, 20, 30]
dic_data = {'a':100, 'b':200, 'c':300}
arr = np.array(my_data)
pd.Series(labels)
pd.Series(my_data)
pd.Series(dic_data)
pd.Series(data=my_data... | github_jupyter |

[](https://colab.research.google.com/github/JohnSnowLabs/nlu/blob/master/examples/colab/component_examples/named_entity_recognition_(NER)/NER_aspect_airline_ATIS.ipynb)
Named... | github_jupyter |
# Ajustar dados esparsos à uma dada função
> Empregar o método dos mínimos quadrados para ajustar dados esparsos à uma função desejada é uma prática usual em diversas áreas. Quer aprender a fazer isso com poucas linhas de código em Python?
- toc: false
- badges: true
- comments: true
- author: Felipe N. Schuch
- image... | github_jupyter |
## Age-structured SIR model for India with social distancing
In example-4 we ran the age-structured SIR model for India with the parameter $\beta$ fitted to case data. We can now examine the effect of interventions, **for an idealised best-case**. We assume that lockdown **instantaneously** and **completely** removes... | github_jupyter |
# Tutorial 2 - Two tanks system
## Background information
This tutorial shows how to use _numerous_ to create a system of multiple components.
The tutorial is aimed at demonstrating the usability and scalability of the model architecture for systems with multiple physical components connected bewteen each other by mea... | github_jupyter |
```
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
import cv2 as cv
%matplotlib inline
import os
pastas = []
for p in sorted(os.listdir("DatasetBBOX")):
if len(os.listdir("DatasetBBOX/"+p)) > 0:
pastas.append(p)
template = [0 for i in range(len(pastas))]
dic = {}
for i,item i... | github_jupyter |
# Curvature
Both convexity and the curvature distribution are computed from the same surface. For a molecular dynamics simulation, the creation of that surface is computationally expensive, relatively speaking. It is likely best to compute convexity and the curvature distribution together. Our experience was that crea... | github_jupyter |
##### Copyright 2020 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 |
# Breast cancer analysis using fastai tabular application
```
from fastai.tabular.all import *;
df = pd.read_csv('breast_cancer_dataset.csv')
headers = list(df.columns)
headers.pop()
dls = TabularDataLoaders.from_csv('breast_cancer_dataset.csv',
y_names="label",
... | github_jupyter |
## Generating metre spaced subnodes for a route
In this notebook we define a function which generates a list of metre spaced points given a list of nodes along with their osmid's for a given route. Given these metre spaced points we can use LIDAR data to detect any short steep ascents for a given route, which may be s... | github_jupyter |
## Training
This script executes a training experiment on Azure ML.
Once the data is prepared, you can train a model and see the results on Azure.
#### There are several steps to follow:
* Configure the workspace
* Create an experiment
* Create or attach a compute cluster
* Upload the data to Azure
* Create a... | github_jupyter |
# Week 2: Tackle Overfitting with Data Augmentation
Welcome to this assignment! As in the previous week, you will be using the famous `cats vs dogs` dataset to train a model that can classify images of dogs from images of cats. For this, you will create your own Convolutional Neural Network in Tensorflow and leverage ... | github_jupyter |
```
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from lxml import etree
import pickle
# Make function to compare two series together:
def ppm_matrix(series1, series2):
'''
GOAL - create a matrix of pairwise ppm differences
INPUT - 2 pandas Series, with index
... | github_jupyter |
# Curso de introducción al análisis y modelado de datos con Python
<img src="../images/cacheme.png" alt="logo" style="width: 150px;"/>
<img src="../images/aeropython_logo.png" alt="logo" style="width: 115px;"/>
---
# Scikit-Learn: Introducción y Problema de Clasificación.
En los últimos tiempos se habla mucho de ... | github_jupyter |
```
%matplotlib inline
```
# A demo of K-Means clustering on the handwritten digits data
In this example we compare the various initialization strategies for
K-means in terms of runtime and quality of the results.
As the ground truth is known here, we also apply different cluster
quality metrics to judge the goodn... | 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 writi... | github_jupyter |
```
import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
import gym
import matplotlib.pyplot as plt
import random
import argparse
from collections import OrderedDict
from copy import copy
import scipy
import scipy.linalg
from Utility import data_collecter
import os
os.environ['KMP_DUPLI... | github_jupyter |
```
"""
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. Connect to an in... | github_jupyter |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
# AML Pipeline with AdlaStep
This notebook is used to demonstrate the use of AdlaStep in AML Pipeline.
## AML and Pipeline SDK-specific imports
```
import os
import azureml.core
from azureml.core.compute import ComputeTarget,... | 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 |

> **Copyright (c) 2021 CertifAI Sdn. Bhd.**<br>
<br>
This program is part of OSRFramework. You can redistribute it and/or modify
<br>it under the terms of the GNU Affero General Public License as published by
<br>the Free Software Foundation, either versi... | github_jupyter |
# Software Engineering for Data Scientists
## *Manipulating Data with Python*
## CSE 599 B1
## Today's Objectives
#### 1. Opening & Navigating the IPython Notebook
#### 2. Simple Math in the IPython Notebook
#### 3. Loading data with ``pandas``
#### 4. Cleaning and Manipulating data with ``pandas``
#### 5. Visua... | github_jupyter |
# Perceptron
* Lets now look at the famous perceptron algorithm
* this is seen as the precursor to neural networks
* This is a **linear binary classifier**
# History
* invented in 1957 by Rosenblatt
* originally was designed for image recognition
* Lead to a great deal of excitement for AI
* Famous for not being able ... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import os
import time
import sys
import sklearn
from tensorflow import keras
import tensorflow as tf
%matplotlib inline
fashion_mnist = keras.datasets.fashion_mnist
(x_train_all, y_train_all), (x_test, y_test) = fashion_mnist.load_data()
print(... | github_jupyter |
```
import os
import numpy as np
import matplotlib.pyplot as plt
import cv2
import tensorflow as tf
print(np.__version__)
print(tf.__version__)
print(cv2.__version__)
## The fully convolutional encoder-decoder network and then creating a new loss function with the VGG_19 loss
from tensorflow.keras.layers import Input,... | github_jupyter |
# Exploring Oxford Nanopore DRS sequencing and alignment errors: ERCC spike-ins
Code for exploring the error rates observed in spike-in data from the ONT DRS datasets published in the paper Native long-read RNA sequencing of the Arabidopsis thaliana transcriptome. For this we're focussing on the ONT DRS reads, aligned... | github_jupyter |
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAACrCAYAAABIdcoWAAAACXBIWXMAABcSAAAXEgFnn9JSAAAAB3RJTUUH4goGCgAhuX3C3AAAAAZiS0dEAP8A/wD/oL2nkwAAWmVJREFUeNrtfXd8VFXa/zehig0V7IqFYlfEQieZ+5w76SAIgkhP5j7nTkJCU0RKAoi99977uvbeaFJDGoiou+u77/5293Xb+66o29T8/rhnkjuTmWTm3kkySe7z+RwRZuaW55zn+Z6nHsAjjzzyyCOPPPLII4888sgj... | github_jupyter |
```
%pylab inline
from random import shuffle
class Slide():
def __init__(self, photos, tags):
self.photos = photos
self.tags = tags
def __repr__(self):
return 'Tags: {} (IDS: {})'.format(self.tags, ", ".join([str(x.id) for x in self.photos]))
class Photo():
def __init__(self, mode, t... | github_jupyter |
# 302 Classification
View more, visit my tutorial page: https://morvanzhou.github.io/tutorials/
My Youtube Channel: https://www.youtube.com/user/MorvanZhou
Dependencies:
* torch: 0.1.11
* matplotlib
```
import torch
from torch.autograd import Variable
import torch.nn.functional as F
import matplotlib.pyplot as plt
%... | github_jupyter |

# Practical PyTorch: Translation with a Sequence to Sequence Network and Attention
In this project we will be teaching a neural network to translate from French to English.
```
[KEY: > input, = target, < output]
> il est en train de peindre un tableau .
= he is painting a pictur... | github_jupyter |
```
import panel as pn
pn.extension()
```
The ``IntSlider`` widget allows selecting selecting an integer value within a set bounds using a slider.
For more information about listening to widget events and laying out widgets refer to the [widgets user guide](../../user_guide/Widgets.ipynb). Alternatively you can lear... | github_jupyter |
<a id=“title_ID”></a>
# JWST Pipeline Validation Testing Notebook: Spec2, fringe, MIRI
Instruments Affected: MIRI
<h1>Table of Contents<span class="tocSkip"></span></h1>
<div class="toc"><ul class="toc-item"><li><span><a href="#JWST-Pipeline-Validation-Testing-Notebook:-Spec2,-fringe,-MIRI" data-toc-modified-id="JWST-... | github_jupyter |
## Compare models
```
import warnings, os, sys, glob, nltools, scipy, matplotlib
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
import numpy as np
import pandas as pd
from scipy import stats as ss
import matplotlib.pyplot as plt
import seaborn as sns
matplotlib.rcParams['pdf.fonttype'] = 42
s... | github_jupyter |
```
%matplotlib inline
import re
import os.path
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
```
In this notebook, we will explore the generated files produced from `whylogs init` in the command line interface. This file has been generated during that process and should include helpful meta... | github_jupyter |
[](http://colab.research.google.com/github/asteroid-team/asteroid/blob/master/notebooks/01_APIOverview.ipynb)
### Introduction
Asteroid is an open-source, community-based toolkit made to design, train, evaluate, use and share audio source separa... | github_jupyter |
```
%matplotlib inline
import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
from sklearn.linear_model import Lasso, LassoCV, Ridge, RidgeCV
from sklearn.model_selection import cross_val_predict, train_test_split
from yellowbrick.datasets import load_concrete
from yellowbr... | github_jupyter |
# LDA Visualizations
## Setup
```
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
import pyLDAvis.gensim
import pickle
import pandas as pd
import gensim
from gensim import corpora
from gensim.models import CoherenceModel, LdaModel
from gensim.test.utils import datapath
from matplotlib i... | github_jupyter |
```
#$conda activate py37
#(py37)$ jupyter notebook
# %config IPCompleter.greedy=True
#press [SHIFT] and [TAB] from within the method parentheses
### intellisense - works perfect!! -> excute in command line windows. : (py37) $ -> works perfect !!
# (py37) $pip3 install jupyter-tabnine
# (py37) $sudo jupyter nbextensio... | github_jupyter |
# Find Intersection
Have the function FindIntersection(strArr) read the array of strings stored in strArr which will contain 2 elements:\
the first element will represent a list of comma-separated numbers sorted in ascending order,\
the second element will represent a second list of comma-separated numbers (also sorted... | github_jupyter |
# Analiza serij na spletnem portalu [MAL](https://myanimelist.net/topanime.php)
Projektna naloga pri predmetu Programiranje 1
## 0. Priprava podatkov
Preden začnemo, moramo uvoziti vnaprej pripravljene podatke. V ta namen uporabimo knjižnico pandas in vnesemo podatke v tabele.
```
import pandas as pd
import os
# iz... | github_jupyter |
# Softmax exercise
*Complete and hand in this completed worksheet (including its outputs and any supporting code outside of the worksheet) with your assignment submission. For more details see the course website.*
This exercise is analogous to the SVM exercise. You will:
- implement a fully-vectorized **loss functio... | github_jupyter |
# Companion notebook to EF's training on optimization with data uncertainty
Sander Vlot & Joaquim Gromicho, 2021
---
> During this course we make use of Jupyter notebooks hosted by [Google Colab](https://colab.research.google.com/notebooks/intro.ipynb).
The usage of this platform is allowed by ORTEC for **educatio... | github_jupyter |
```
%%capture
# get_corpus_path
# get_txt_orig_path
# get_txt_clean_path
%run ../path_manager.ipynb
# CorpusCleaner
%run ../DataCleanerModule.ipynb
## Jupyter.notebook.save_checkpoint()
# w = spacy.load('/R/spacy_data/en_core_web_sm/en_core_web_sm-2.0.0', disable=['parser', 'ner', 'textcat'])
# from spacy.lemmatizer... | github_jupyter |
```
#Functions for parsing columns of the spreadsheet on Santa Clara County School Meals
import re
abbrev_to_index = {
'm': 0, 'mon': 0, 'monday': 0, 'mondays': 0,
't': 1, 'tues': 1, 'tuesday': 1, 'tuesdays': 1,
'w': 2, 'wed': 2, 'wednesday': 2, 'wednesdays': 2,
'th': 3, 'thr': 3, 'thurs': 3, 'thursday'... | github_jupyter |
# Linear Regression
LinearRegression is a simple machine learning model where the response y is modelled by a linear combination of the predictors in X.
The linear regression model implemented in the cuml library allows the user to change the fit_intercept, normalize and algorithm parameters. cuML’s LinearRegression ... | github_jupyter |
```
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '1'
import numpy as np
import tensorflow as tf
import json
with open('train-test.json') as fopen:
dataset = json.load(fopen)
with open('dictionary.json') as fopen:
dictionary = json.load(fopen)
train_X = dataset['train_X']
train_Y = dataset['train_Y']
tes... | github_jupyter |
# Object oriented programming
## Import modules
```
from math import sqrt, atan2, sin, cos, pi
```
## Simple class definitions
Define a simple class that represents a point in two dimensions.
```
class Point:
'''
objects of this class represent points in a 2D space, e.g.,
p1 = Point()
p1.x, p1.y = ... | github_jupyter |
# S3VT Landsat and Sentinel 2 validation of hotspots - working
## Description
This notebook demonstrates how to:
From a candidate latitude longitude and solar_day:
* determine if intersecting Landsat or Sentinel 2 ARD exists
* apply the platform specific tests to determine if hotspots were detected in the vicinity 5... | github_jupyter |
## Sample weight adjustment
The objective of this tutorial is to familiarize ourselves with *SampleWeight* the *samplics* class for adjusting sample weights. In practice, it is necessary to adjust base or design sample weights obtained directly from the random sample mechanism. These adjustments are done to correct fo... | github_jupyter |
# Model Acquisition into IncQuery Server
## Set up
```
import iqs_jupyter
from iqs_jupyter import schema
iqs = iqs_jupyter.connect()
```
## Optional: clean up
```
iqs.persistent_index.delete_all_persisted_model_compartments()
iqs.in_memory_index.delete_all_inmemory_model_compartments()
iqs.queries.unregister_all_qu... | github_jupyter |
# Introduction to Data Science. Lecture 2: Notebooks and Python Basics
*COMP 5360 / MATH 4100, University of Utah, http://datasciencecourse.net/*
Welcome to your first Jupyter notebook! This will be our main working environment for this class.
# Jupyter Notebook Basics
First, let's get familiar with Jupyter Notebook... | github_jupyter |
<div id="section1" dir='rtl'>
<h2>
توجه
</h2>
<hr>
بخش زیادی از این فایل آموزشی مربوط به مسابقه دیتادیز است و حاصل زحمات آن ها می باشد.
</div>
# data-hub:
* [Website](https://data-hub.ir/)
* [Youtube](https://www.youtube.com/channel/UCrBcbQWcD0ortWqHAlP94ug)
* [Github](https://github.com/d... | github_jupyter |
```
# Import the modules
import sqlite3
import spiceypy
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
# Establish a connection to the comet database
con = sqlite3.connect('../databases/comets/mpc_comets.db')
# Extract information about the comet 67P
comet_67p_from_db = pd.read_sql('SELEC... | github_jupyter |
<a href="https://colab.research.google.com/github/NielsRogge/Transformers-Tutorials/blob/master/Perceiver/Perceiver_for_masked_language_modeling_and_image_classification.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
## Set-up environment
In this ... | github_jupyter |
# ds4se Tutorial - Analysis
Data Science for Software Engieering (ds4se) is an academic initiative to perform exploratory analysis on software engieering artifact and metadata. Data Management, Analysis, and Benchmarking for DL and Traceability.
In this tutorial, we will use ds4se to analyze Libest dataset and tries... | github_jupyter |
```
import sys
import os
# sklearn
from sklearn.metrics import precision_recall_fscore_support
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
from interpret_text.experimental.classical import ClassicalTextExplainer
import pandas as pd
train = pd.read_csv('../../Dee... | github_jupyter |
# <font color='red'>BackPropagation</font>
**There will be some functions that start with the word "grader" ex: grader_sigmoid(), grader_forwardprop(), grader_backprop() etc, you should not change those function definition.<br><br>Every Grader function has to return True.**
## <font color='red'>Loading data </font>
... | github_jupyter |
# Load Data
```
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
df = pd.read_csv("Dataset/Dataset2.csv")
X = df.iloc[:,1:5]
y = df.iloc[:,9]
# scaler = StandardScaler()
# X = scaler.fit_transform(X)
X_train, X_test, y_train, y_test = train_te... | github_jupyter |
[](https://colab.research.google.com/github/espnet/notebook/blob/master/tts_realtime_demo.ipynb)
# ESPnet LT real time E2E-TTS demonstration
This notebook provides a demonstration of the realtime E2E-TTS using ESPnet-TTS and ParallelWaveGAN (+ ... | github_jupyter |
```
%matplotlib inline
import numpy as np
import jupyter_manim
from manim import *
%%manim -qm -v WARNING Teleportation
class Teleportation(Scene):
config= {
"x_lim":int, # define leftmost limit of x for circuit and gates
"y_lim":int # define up-most limit of y for circuit and gates
}
... | github_jupyter |
# Example: CanvasXpress stackedline Chart No. 1
This example page demonstrates how to, using the Python package, create a chart that matches the CanvasXpress online example located at:
https://www.canvasxpress.org/examples/stackedline-1.html
This example is generated using the reproducible JSON obtained from the abo... | github_jupyter |
## Dimensionality reduction
### The curse of dimensionality
Fitting and overfitting get worse with ''curse of dimensionality'' Bellman 1961
Think about a hypersphere. Its volume is given by
$$ V_D(r) = \frac{2r^D\pi^{D/2}}{D\ \Gamma(D/2)}$$
where $\Gamma(z)$ is the complete gamma function, $D$ is the dimensio... | github_jupyter |
# Custom Updater
## Overview
### Questions
- How can I modify the state of a system in a custom updater?
### Objectives
- Show an example of a non-trival custom updater.
## Boilerplate Code
```
from numbers import Number
import hoomd
import hoomd.md as md
import numpy as np
cpu = hoomd.device.CPU()
sim = hoomd... | github_jupyter |
## Lesson 2: Futures in Research
### Futures Data
Quantopian has open, high, low, close, and volume (OHLCV) data for 72 US futures from the beginning of 2002 to the current date. This dataset contains both day and minute frequency data for 24 hours x 5 days a week, and is collected from electronic trade data.
The lis... | github_jupyter |
### Lab 7
1) Scrieti un program care la fiecare x secunde unde x va fi aleator ales la fiecare iteratie (din intervalul [a, b] , unde a, b sunt date ca argumente) afiseaza de cate minute ruleaza programul (in minute, cu doua zecimale). Programul va rula la infinit.
```
import time
import random
#import sys
#a = int(... | github_jupyter |
# Optimality conditions
Now we will move to studying constrained optimizaton problems i.e., the full problem
$$
\begin{align} \
\min \quad &f(x)\\
\text{s.t.} \quad & g_j(x) \geq 0\text{ for all }j=1,\ldots,J\\
& h_k(x) = 0\text{ for all }k=1,\ldots,K\\
&x\in \mathbb R^n.
\end{align}
$$
In order to identify which poi... | github_jupyter |
```
import geopandas as gpd
import pandas as pd
import folium
import branca
import requests
import json
from folium.features import GeoJson, GeoJsonTooltip, GeoJsonPopup
print(folium.__version__)
income = pd.read_csv(r"https://raw.githubusercontent.com/pri-data/50-states/master/data/income-counties-states-national.csv... | github_jupyter |
# Uitwerkingen toets
## Opgave 1
Bij deze opgave gaat het om het definiëren van variabelen.
```
m = 10
c = 299792458
e = m * c ** 2
```
Bedenk dat als je niet goed weet welke operator (`*`, `//`, `+`, etc.) voorrang heeft je kan groeperen met ronde haken, bijvoorbeeld
```python
e = m * (c ** 2)
```
## Opgave 2
D... | github_jupyter |
# Circularly Linked List
In short a linked list (singly or doubly) where the tail node points at the head.
In the last node of a list, the link field often contains a null reference, a special value is used to indicate the lack of further nodes. A less common convention is to make it point to the first node of the li... | github_jupyter |
```
import matplotlib.pyplot as plt
import seaborn as sns; sns.set()
import pandas as pd
import numpy as np
save_dir = "../plots/lossy_compression/"
sns.set(style="whitegrid")
paper_rc = {'lines.linewidth': 2, 'lines.markersize': 10}
sns.set_context("paper", rc = paper_rc)
level_1_base_dir = "... | github_jupyter |
## Recognition Of Objects with Convolutional Neural Network
## - Ashwin Prakash
IMPORTING THE REQUIRED
```
import tensorflow as tf
from tensorflow import keras
from matplotlib import pyplot as plt
import numpy as np
from tensorflow.python.keras.utils import np_utils
```
LOADING AND SPLITTING THE DATA
```
(X_train, ... | github_jupyter |
## Motif Kernel / SVM Tutorial
This Tutorial shows how you can combine the motif kernel of the *strkernel* package with a Support Vector Machine (SVM) to predict the cell population based on the motif content of a read sequence.
There are two FASTA files each filled with sequences from two different cell popultions.... | github_jupyter |
## List of callbacks
```
from fastai.gen_doc.nbdoc import *
from fastai.vision import *
from fastai.text import *
from fastai.callbacks import *
from fastai.basic_train import *
from fastai.train import *
from fastai import callbacks
```
fastai's training loop is highly extensible, with a rich *callback* system. S... | github_jupyter |
## polyarea Notebook
```
## Setup with modules needed
import numpy as np
import matplotlib.pyplot as plt # Make a plot to see shape
import matplotlib
def readnodes( file='stdin' ):
'''Function to read the X,Y coordinates of nodes of the
points in the triangle. The circuit around the nodes
should be in c... | github_jupyter |
# Gaussian Naive Bayes Classifier with Standard Scaler
This Code template is for Classification task using Gaussian Naive Bayes Algorithm where the scaling technique used is StandardScaler.
### Required Packages
```
!pip install imblearn
import warnings
import numpy as np
import pandas as pd
import matplotlib.p... | github_jupyter |
```
import matplotlib.pyplot as plt
from math import exp
from scipy import stats
import seaborn as sns
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn import metrics
import numpy as np
import warnings
warnings.filterwarnings("ignore... | github_jupyter |
# Using Automated Machine Learning
There are many kinds of machine learning algorithm that you can use to train a model, and sometimes it's not easy to determine the most effective algorithm for your particular data and prediction requirements. Additionally, you can significantly affect the predictive performance of a... | github_jupyter |

# Getting Started with the Knowledge Graph Extension for Python
The **kgextension** package allows to access and use Linked Open Data to
augment existing datasets for improving a classification/clustering task.
It enables to incorp... | github_jupyter |
# Protein-ligand Docking tutorial using BioExcel Building Blocks (biobb)
### -- *PDBe REST-API Version* --
***
This tutorial aims to illustrate the process of **protein-ligand docking**, step by step, using the **BioExcel Building Blocks library (biobb)**. The particular example used is the **Mitogen-activated protein... | github_jupyter |
# EDA To Prediction (DieTanic)
### *Sometimes life has a cruel sense of humor, giving you the thing you always wanted at the worst time possible.*
-Lisa Kleypas
The sinking of the Titanic is one of the most infamous shipwrecks in h... | github_jupyter |
# What movie to watch tonight?
The goal of this project is to build a search engine over a list of movies that have a dedicated page on Wikipedia. In order to achieve this goal, our work has been divided into different tasks that allowed us to fulfill the intent. Since we based the entire process upon using custom fun... | github_jupyter |
```
import random
import math
import os
import subprocess
from subprocess import Popen, PIPE, STDOUT
from multiprocessing import Process
import time
from timeit import default_timer as timer
import multiprocessing as mp
# output_folder = "output_plane"
# job_filename = "job_plane.txt"
# progress_filename = "progress_p... | github_jupyter |
```
import os
import pathlib
from tqdm.auto import tqdm
from facade_project import FACADE_LABELME_ORIGINAL_DIR, FACADE_IMAGES_DIR, LABEL_NAME_TO_VALUE, NUM_IMAGES
img_paths = [os.path.join(FACADE_LABELME_ORIGINAL_DIR, fname) for fname in sorted(os.listdir(FACADE_LABELME_ORIGINAL_DIR))]
len(img_paths)
```
# From Labe... | github_jupyter |
# 词嵌入基础
我们在[“循环神经网络的从零开始实现”](https://zh.d2l.ai/chapter_recurrent-neural-networks/rnn-scratch.html)一节中使用 one-hot 向量表示单词,虽然它们构造起来很容易,但通常并不是一个好选择。一个主要的原因是,one-hot 词向量无法准确表达不同词之间的相似度,如我们常常使用的余弦相似度。
Word2Vec 词嵌入工具的提出正是为了解决上面这个问题,它将每个词表示成一个定长的向量,并通过在语料库上的预训练使得这些向量能较好地表达不同词之间的相似和类比关系,以引入一定的语义信息。基于两种概率模型的假设,我们可以定义两种 Word2Vec... | github_jupyter |
## Gating fixed primitives
AliGater contains a range of gating functions from the basic you expect to more niche functions. Below is a rough illustration of some standard _fixed_ gates. Many of these are used internally in AliGater pattern-recognition functions but might some times be useful for the user directly.
Fo... | github_jupyter |
## <div style="text-align: center">A Journey with Scikit-Learn + 20 ML Algorithms</div>
<div style="text-align: center">There are plenty of <b>courses and tutorials</b> that can help you learn Scikit-Learn from scratch but here in <b>Kaggle</b>, After reading, you can use this workflow to solve other real problems and... | github_jupyter |
<a href="https://colab.research.google.com/github/evolu-tion/GenomeManagement/blob/master/example/Genome_info.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Bitter gourd project
## Bitter gourd (M. charantia) have 4 assembed genome references.
|... | github_jupyter |
***
<center><h1>Face Rhythm</h1></center>
***
<table><tr>
<td> <img src="https://images.squarespace-cdn.com/content/5688a31305f8e23aa2893502/1614723283221-5Z5038AT7Y6KCOM2PIU4/Screenshot+from+2021-03-02+17-05-12.png?content-type=image%2Fpng" style="height: 200px"> </td>
<td> <img src="https://images.squarespace-cdn.c... | github_jupyter |
# 多输入多输出通道
:label:`sec_channels`
虽然我们在 :numref:`subsec_why-conv-channels`中描述了构成每个图像的多个通道和多层卷积层。例如彩色图像具有标准的RGB通道来指示红、绿和蓝。
但是到目前为止,我们仅展示了单个输入和单个输出通道的简化例子。
这使得我们可以将输入、卷积核和输出看作二维张量。
当我们添加通道时,我们的输入和隐藏的表示都变成了三维张量。例如,每个RGB输入图像具有$3\times h\times w$的形状。我们将这个大小为$3$的轴称为*通道*(channel)维度。在本节中,我们将更深入地研究具有多输入和多输出通道的卷积核。
## 多输入通道
当... | github_jupyter |
# Análisis Exploratorio de Datos
A continuación, analizaremos los archivos para contestar algunas preguntas básicas. El primer paso es importar las librerías necesarias, en particular `pandas` para trabajar con la data y explorarla, y `os` para contar con distintas funciones que nos permiten explorar el directorio.
`... | github_jupyter |
# VADER Sentiment Analysis of Bitcointalk Topics
***Ronald DeLuca***<br>
python3 -m spacy download en_core_web_sm
```
import csv
import nltk
import os
import pandas as pd
import re
import spacy
import textblob
from textblob import TextBlob
from textblob.base import BaseSentimentAnalyzer
from textblob.sentiments impor... | github_jupyter |
# Building Your Predictor
The next step after preparing and importing your data via `Getting_Data_Ready.ipynb` is to build your first model.
The overall process for this is:
* Setup
* Create a Predictor
* Deploy a Predictor
* Obtain a Forecast
To get started, simply execute the cells below:
## Setup
Import the st... | github_jupyter |
```
import tensorflow as tf
import tensorflow.contrib.slim as slim
X = tf.placeholder(tf.float32, [None, 64,64,3])
Y = tf.placeholder(tf.float32, [None, 10])
Z = tf.placeholder(tf.float32, [None, 100])
def GENERATOR(Z):
x = slim.fully_connected(Z, (8 * 8 * 16), activation_fn=None)
x = tf.reshape(x, [-1, 8, 8, 1... | github_jupyter |
# **pyspec** example notebook: 2D spectrum
This notebook showcases a basic usage of **pyspec** for computing 2D spectrum and its associated isotropic spectrum. Other featrures such as bin average in log space and confidence limit estimation are also shown.
```
import numpy as np
import matplotlib.pyplot as plt
from ... | github_jupyter |
# IBM Data Science Capstone Project
This Project is to create a model which can recommend the nearest neighborhood in canada to move to using machine learning alogrithms and geo api from foursquare
## Table of Content:
---
* [Prepare & Clean The Data](#Cleaning-and-Data-Preparing)
* [Visualize The Data](#)
# Clea... | github_jupyter |
# Random Decision Trees Regression Example
## Boston housing prices
The objective is to predict the median price of a home in Boston. The variables are crime rate, zoning information,
proportion of non-retail business, etc. This dataset has median prices in Boston for 1972. Even though the data is pretty old, the m... | github_jupyter |
```
import numpy as np
import json
import scipy.interpolate
import matplotlib.pyplot as plt
from collections import OrderedDict
from pprint import pprint
#All the files paths
file_kinect="./Données/Kinect/chris1/chris1_1_interpolated.txt"
file_xsens="./Données/Xsens/chris1/chris1_1_interpolated.txt"
file_mobilenet="./D... | github_jupyter |
<small><small><i>
All the IPython Notebooks in this lecture series by Dr. Milan Parmar are available @ **[GitHub](https://github.com/milaan9/04_Python_Functions/tree/main/002_Python_Functions_Built_in)**
</i></small></small>
# Python `frozenset()`
The **`frozenset()`** function returns an immutable frozenset object i... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.