text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
```
# Import most generic modules
import importlib
import pathlib
import os
import sys
from datetime import datetime, timedelta
import pandas as pd
from IPython.display import display, Markdown
import warnings
warnings.filterwarnings("ignore")
module_path = os.path.abspath(os.path.join("../.."))
if module_path not in... | github_jupyter |
# Use custom software_spec to create statsmodels function describing data with `ibm-watson-machine-learning`
This notebook demonstrates how to deploy in Watson Machine Learning service a python function with `statsmodel` which requires to create custom software specification using conda yaml file with all required lib... | github_jupyter |
# Utilisation de threads avec le réseau
> Communication client/serveur avec utilisation de threads
- toc: true
- badges: true
- comments: false
- categories: [python, ISN]
Pour ce classeur, il faudra recopier chaque partie (client et serveur) dans un fichier python distinct et les exécuter, le cas échéant sur des m... | github_jupyter |
# Housing data extraction and aggregation
This notebook consists of two steps:
1. Extraction of relevant sales price values of homes in the ZTRAX database[<sup>1</sup>](#fn1).
2. Filtering of the data with some QA/QC algorithms and aggregation of the remaining building-level sales prices to an average "price per sq f... | github_jupyter |
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
dataset = pd.read_csv('breastdata.csv',names=['id','thickness','size_uniformity',
'shape_uniformity','adhesion','cellsize',
... | github_jupyter |
# C - Loading, Saving and Freezing Embeddings
This notebook will cover: how to load custom word embeddings in TorchText, how to save all the embeddings we learn during training and how to freeze/unfreeze embeddings during training.
## Loading Custom Embeddings
First, lets look at loading a custom set of embeddings.... | github_jupyter |
```
%cd/content/drive/My Drive/Đồ án 2 (Sentiment Analysis Vietnamese)
from google.colab import drive
drive.mount('/content/drive')
!pip install flask_ngrok
!pip install gevent
!pip install pyvi
from warnings import simplefilter
simplefilter(action='ignore', category=FutureWarning)
from sklearn import metrics
from skle... | github_jupyter |
<center><img src='https://www.intel.com/content/dam/develop/external/us/en/images/infosim-logo-746616.png' style="width:300px"></center>
# StableNet<sup>®</sup> Weather Map Statistics
## Introduction
This script adds statistics to Weather Maps when given certain parameters as input over a CSV file. We describe the f... | github_jupyter |
## Dependencies
```
import json, warnings, shutil, glob
from jigsaw_utility_scripts import *
from scripts_step_lr_schedulers import *
from transformers import TFXLMRobertaModel, XLMRobertaConfig
from tensorflow.keras.models import Model
from tensorflow.keras import optimizers, metrics, losses, layers
SEED = 0
seed_ev... | github_jupyter |
<a href="https://colab.research.google.com/github/jpchen/playground/blob/master/torchfx_ppl.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Useful program transformations for PPLs
*@neerajprad, @jpchen, @xiaoyan0*
This notebook contains example ... | github_jupyter |
```
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.compose import ColumnTransformer, TransformedTargetRegressor
from sklearn.impute import SimpleImputer
from sklearn.preprocessing import OrdinalEncoder, ... | github_jupyter |
```
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from PIL import Image
import matplotlib.pyplot as plt
import torchvision.transforms as transforms
import torchvision.models as models
import numpy as np
import copy
import os
device = torch.device('cuda' if torch.cuda.... | github_jupyter |
# Genotype PLINK file quality control
This workflow implements some prelimary data QC steps for PLINK input files. VCF format of inputs will be converted to PLINK before performing QC.
## Overview
This notebook includes workflow for
- Compute kinship matrix in sample and estimate related individuals
- Genotype and ... | github_jupyter |
## 3dgfx the math
This is pretty much a collection of notes mostly inspired by [Computer Graphics, Fall 2009](https://www.youtube.com/playlist?list=PL_w_qWAQZtAZhtzPI5pkAtcUVgmzdAP8g). Yeah it's an old course but it's very good and covers a lot of essentials in a fast pace.
This is by no means a substitute for watchin... | github_jupyter |
```
import tkinter as tk
import pyautogui
import matplotlib.pyplot as plt
import numpy as np
from pynput import mouse
def on_click(x, y, button, pressed):
print('{0} at {1}'.format(
'Pressed' if pressed else 'Released',
(x, y)))
if not pressed:
# Stop listener
return False
# ... | github_jupyter |
# How to beat terrorism efficiently: identification of set of key players in terrorist networks.
## GROUP 27. Members:
* Abrate, Marco Pietro
* Bolón Brun, Natalie
* Kakavandy, Shahow
* Park, Jangwon
## PROJECT DESCRIPTION:
Proliferation of terrorism in recent years has led people to believe it as a real threat ... | github_jupyter |
# Turnover (Solution)
## Install packages
```
import sys
!{sys.executable} -m pip install -r requirements.txt
import cvxpy as cvx
import numpy as np
import pandas as pd
import time
import os
import quiz_helper
import matplotlib.pyplot as plt
%matplotlib inline
plt.style.use('ggplot')
plt.rcParams['figure.figsize'] = ... | github_jupyter |
# Installation Instructions
Download and install miniconda:
https://conda.io/miniconda.html
Make sure you are using the conda-forge channel:
```bash
$ conda config --add channels conda-forge
$ conda update --yes conda python
```
Install gsshapy:
```bash
$ conda create -n gssha python=2
$ source activate gssha
(gssh... | github_jupyter |
```
from __future__ import print_function, absolute_import
from rdkit import Chem
from rdkit.Chem import AllChem
import pandas as pd
import cPickle as pickle
import numpy as np
import re
# Load data from Schneider's 50k dataset
dataSetB = pd.read_csv('../data/from_schneider/dataSetB.csv')
dataSetB['reactantSet_NameRxn'... | github_jupyter |
# Introduction to Transmon Physics
## Contents
1. [Multi-level Quantum Systems as Qubits](#mlqsaq)
2. [Hamiltonians of Quantum Circuits](#hoqc)
3. [Quantizing the Hamiltonian](#qth)
4. [The Quantized Transmon](#tqt)
5. [Comparison of the Transmon and the Quantum Harmonic Oscillator](#cottatqho)
6. [Qubit Drive and th... | github_jupyter |
# Train a Deep NN to predict Asset Price movements
## Setup Docker for GPU acceleration
`docker run -it -p 8889:8888 -v /path/to/machine-learning-for-trading/16_convolutions_neural_nets/cnn:/cnn --name tensorflow tensorflow/tensorflow:latest-gpu-py3 bash`
## Imports & Settings
```
import warnings
warnings.filterwar... | github_jupyter |
# Think Bayes
This notebook presents example code and exercise solutions for Think Bayes.
Copyright 2016 Allen B. Downey
MIT License: https://opensource.org/licenses/MIT
```
# Configure Jupyter so figures appear in the notebook
%matplotlib inline
# Configure Jupyter to display the assigned value after an assignmen... | github_jupyter |
# Movie Frames Embedding
```
%matplotlib inline
data_dir = 'data'
movie = 'father-and-daughter-720p.mp4'
fps = 0.6
frame_width = 320
frame_height = 240
movie_name = movie.split('.')[0]
frames_dir = f'{data_dir}/{movie_name}'
outfile = f'{data_dir}/{movie_name}.json'
```
## Extract frames
```
import subprocess
subpr... | github_jupyter |
**12장 – 텐서플로를 사용한 사용자 정의 모델과 훈련**
_이 노트북은 12장에 있는 모든 샘플 코드와 연습문제 해답을 가지고 있습니다._
<table align="left">
<td>
<a target="_blank" href="https://colab.research.google.com/github/rickiepark/handson-ml2/blob/master/12_custom_models_and_training_with_tensorflow.ipynb"><img src="https://www.tensorflow.org/images/colab_lo... | github_jupyter |
# Vega Lite Examples in Haskell - Layered Plots
The overview notebook - `VegaLiteGallery` - describes how
[`hvega`](http://hackage.haskell.org/package/hvega)
is used to create Vega-Lite visualizations.
-----
## Table of Contents
This notebook represents the [Layered Plots](https://vega.github.io/vega-lite/examples... | github_jupyter |
<a href="https://colab.research.google.com/github/manabuishii/Py4Bio/blob/update-chapter10-ipynb/Chapter_10_Web_Applications.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
Python for Bioinformatics
-----------------------------

url = "https://maps.g... | github_jupyter |
```
%matplotlib inline
import warnings
from datetime import datetime
import os
from pathlib import Path
import quandl
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import pandas_datareader.data as web
from pandas_datareader.famafrench import get_available_datasets
from pyfinance.ols import Pan... | github_jupyter |
# Bite Size Bayes
Copyright 2020 Allen B. Downey
License: [Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
```
## Review
So far we have been working with distribu... | github_jupyter |
<a href="https://colab.research.google.com/github/jeffheaton/t81_558_deep_learning/blob/master/t81_558_class_04_1_feature_encode.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# T81-558: Applications of Deep Neural Networks
**Module 4: Training for... | github_jupyter |
# Environment Perception For Self-Driving Cars
Welcome to the final assignment for this course. In this assignment, you will learn how to use the material so far to extract useful scene information to allow self-driving cars to safely and reliably traverse their environment.
**In this assignment, you will:**
- Use t... | github_jupyter |
# Mean Normalization
In machine learning we use large amounts of data to train our models. Some machine learning algorithms may require that the data is *normalized* in order to work correctly. The idea of normalization, also known as *feature scaling*, is to ensure that all the data is on a similar scale, *i.e.* that... | github_jupyter |
```
!pip install pillow
from keras import applications
from keras.preprocessing.image import ImageDataGenerator
from keras import optimizers
from keras.models import Sequential, Model
from keras.layers import Dropout, Flatten, Dense, GlobalAveragePooling2D
from keras import backend as k
from keras.callbacks import Mo... | github_jupyter |
# Python 101 Exercises
#### Exercise 1
Write a function which takes a integer number as input an checks if its even or odd
```
def even_odd(num):
if (num % 2) == 0:
print("{0} is Even".format(num))
else:
print("{0} is Odd".format(num))
even_odd(num = 1)
```
#### Exercise 2
Write a fu... | github_jupyter |
# Single cell data analysis using Scanpy
* __Notebook version__: `v0.0.2`
* __Created by:__ `Imperial BRC Genomics Facility`
* __Maintained by:__ `Imperial BRC Genomics Facility`
* __Docker image:__ `imperialgenomicsfacility/scanpy-notebook-image:release-v0.0.1`
* __Github repository:__ [imperial-genomics-facility/sca... | github_jupyter |
<a href="https://colab.research.google.com/github/ayulockin/SwAV-TF/blob/master/Train_SwAV_10_epochs.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Imports and Setups
```
# Clone this repository to use the utils
!git clone https://github.com/ayu... | github_jupyter |
```
import numpy as np
import tensorflow as tf
import collections
def build_dataset(words, n_words):
count = [['GO', 0], ['PAD', 1], ['EOS', 2], ['UNK', 3]]
count.extend(collections.Counter(words).most_common(n_words - 1))
dictionary = dict()
for word, _ in count:
dictionary[word] = len(dictiona... | github_jupyter |
# =========================
# Load libraries
# =========================
```
import pandas as pd
import numpy as np
from keras import models, layers
import keras_metrics as km
from keras.preprocessing.text import Tokenizer
from keras.preprocessing.sequence import pad_sequences
import matplotlib.pyplot as plt
from skle... | github_jupyter |
# Autonomous driving - Car detection
Welcome to your week 3 programming assignment. You will learn about object detection using the very powerful YOLO model. Many of the ideas in this notebook are described in the two YOLO papers: Redmon et al., 2016 (https://arxiv.org/abs/1506.02640) and Redmon and Farhadi, 2016 (htt... | github_jupyter |
<a id='inizio'></a>
# Evaluating
In this notebook we'll present you the mainly topics about evaluating performance and structurized the machine learning processes.
<br><br>
This notebook will present the following topics:
- [Choosing the Right Estimator](#right_estimator)<a href='#right_estimator'></a> <br>
- [Confusi... | github_jupyter |
```
import os
import sys
import random
import numpy as np
import pandas as pd
from dotenv import load_dotenv
load_dotenv(".env")
from src.domain import Track, User, Setlist
from src.driver import SampleDriverImpl
from src.repository import SampleRepository
from src.solver import QuboSolver
from IPython.display import I... | github_jupyter |
In this notebook we implement L1 convergence.
```
# Imports
import numpy as np
import torch
from phimal_utilities.data import Dataset
from phimal_utilities.data.burgers import BurgersDelta
from DeePyMoD_SBL.deepymod_torch.library_functions import library_1D_in
from DeePyMoD_SBL.deepymod_torch.DeepMod import DeepModDy... | github_jupyter |
```
import math
def findGCD(seq):
gcd = seq[0]
for i in range(1,len(seq)):
gcd=math.gcd(gcd, seq[i])
return gcd
def findSignature(seq):
nonzero_seq = [d for d in seq if d!=0]
if len(nonzero_seq)==0:
return seq
sign = 1 if nonzero_seq[0]>0 else -1
gcd = findGCD(seq)
retur... | github_jupyter |
```
from sklearn.datasets import load_digits
from sklearn.cluster import KMeans
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from sklearn.preprocessing import scale
from sklearn import cluster
from sklearn import metrics
%matplotlib inline
title = ["Alcohol","Malic acid","Ash","Alcalinity of ... | github_jupyter |
# Checking the Dependence of Local Cell Density vs. Nucleus Size
### Question:
Check whether increasing local cell density [pixels^2] impacts the size of the nucleus [pixels] as segmented by the U-Net.
### Expectation:
The nucleus size should be indirectly proportional to the local cell density; i.e as local cell d... | github_jupyter |
### **Connect With Me in Linkedin :-** https://www.linkedin.com/in/dheerajkumar1997/
# Import Libraries
```
import nltk
from nltk.stem import PorterStemmer
from nltk.stem import LancasterStemmer
from nltk.stem import WordNetLemmatizer
from nltk.corpus import stopwords
```
# Giving Knowledge as Corpus
```
Corpus = ... | github_jupyter |
```
import pandas as pd
import numpy as np
from tqdm import tqdm
import torch
import os
from sklearn.metrics import silhouette_score
import umap
import matplotlib.pyplot as plt
from matplotlib import colors as mcolors
# !pip install -U sentence-transformers
from sentence_transformers import SentenceTransformer
# moun... | github_jupyter |
```
import numpy as np
from scipy import signal
import scipy.spatial.distance as distfuncs
import scipy.special as special
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from pathlib import Path
import sys
sys.path.append('../')
import irutilities as irutil
import sf_func as sf
# Load ir data... | github_jupyter |
## Number of Labels
Accuracy of a supervised model increases with the number of labels available for training. A natural question to ask is how many labels are needed for a given level of accuracy. In this notebook, we will experiment with the MNIST data set and estimate the number of labels needed to classify 10 digi... | github_jupyter |
[View in Colaboratory](https://colab.research.google.com/github/lucyvasserman/unintended-ml-bias-analysis/blob/master/unintended_ml_bias/pinned_auc_demo.ipynb)
Copyright 2018 Google LLC.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Yo... | github_jupyter |
## Validate Azure ML SDK installation and get version number for debugging purposes
```
# Check core SDK version number
import azureml.core
print("SDK version:", azureml.core.VERSION)
```
## Diagnostics
Opt-in diagnostics for better experience, quality, and security of future releases.
```
from azureml.telemetry imp... | github_jupyter |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
... | github_jupyter |
```
%matplotlib inline
!unzip top_bottom.zip
!ls -al
!rm -rf eyegaze
!unzip eyegaze_new.zip
from __future__ import print_function, division
import torch
import torch.nn as nn
import torch.optim as optim
from torch.optim import lr_scheduler
import numpy as np
import torchvision
from torchvision import datasets, models,... | github_jupyter |
```
# Copyright 2021 Google LLC
# Use of this source code is governed by an MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.
# Notebook authors: Kevin P. Murphy (murphyk@gmail.com)
# and Mahmoud Soliman (mjs@aucegypt.edu)
# This notebook reproduces figures for chap... | github_jupyter |
```
import boto3
from IPython.display import Image, display
from trp import Document
from PIL import Image as PImage, ImageDraw
import time
from IPython.display import IFrame
```
# In this section, we will deep dive into Amazon Textract APIs and its feature.
Amazon Textract includes simple, easy-to-use APIs that can ... | github_jupyter |
# Machine Learning Engineer Nanodegree
## Deep Learning
## Project: Build a Digit Recognition Program
In this notebook, a template is provided for you to implement your functionality in stages which is required to successfully complete this project. If additional code is required that cannot be included in the noteboo... | github_jupyter |
# Building a bulk system
Let's build a Fe bulk with BCC structure using a python script.
Import the required libraries
* [numpy](http://www.numpy.org/) handles numeric arrays and mathematical operations.
* [product](https://docs.python.org/3.7/library/itertools.html#itertools.product) returns cartesian product of in... | 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 a... | github_jupyter |
```
import numpy as np
from numpy.fft import fft2, ifft2, fftshift, ifftshift
from scipy import signal
from time import time
import matplotlib.pyplot as plt
%matplotlib inline
from skimage.io import imread
from skimage.filters import gaussian
img = imread('../pd.jpg')
img = np.array(img[:,:,0], dtype=float)
img[100:110... | github_jupyter |
```
#INCLUDE LIBRARIES
import numpy as np
import pandas as pd
import re
import itertools
import nltk
from nltk.corpus import stopwords
from nltk.stem import WordNetLemmatizer
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction.text import TfidfVectorizer
import matplotlib.pyplot as pl... | github_jupyter |
```
import numpy as np
import pandas as pd
from sklearn.decomposition import PCA
from sklearn.preprocessing import MinMaxScaler
from sklearn.preprocessing import LabelEncoder
from sklearn.cross_validation import train_test_split
import tensorflow as tf
from matplotlib import animation
import matplotlib.pyplot as plt
fr... | github_jupyter |
# Exception Handling Basics
There's one more way that you can control the flow of code and that's with exception handling. Exception handling is the process of "catching" an error that would otherwise halt execution of your code. This allows you to potentially recover from a somewhat fatal situation.
Exception handli... | github_jupyter |
# 18 Héritage
L'héritage est la possibilité de définir une nouvelle classe, qui est une version modifié d'une classe existante. Dans cette section nous allons utiliser le jeu de poker, en utilisant des classes qui représentent des cartes à jouer.
Référence: https://fr.wikipedia.org/wiki/Poker
## Objet carte de jeu
... | github_jupyter |
# Tensorflow MNIST
```
import matplotlib.pyplot as plt
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
%matplotlib inline
mnist = input_data.read_data_sets('/tmp/data/', one_hot=True)
image = mnist.train.images[7].reshape([28, 28]);
plt.gray()
plt.imshow(image)
print(mnist.train.i... | github_jupyter |
## $k_\infty$ and Diffusion Length for a Water Balloon
$\textbf{(100 points)}$ Consider a water balloon that you fill with a homogeneous mixture of
heavy water and fissile material. You do not know the exact ratio of the
water molecules to fissile atoms. However, you can fill the balloon with
different amounts of the ... | github_jupyter |
```
# Data exploration
import pandas as pd
# Numerical
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline
#import required Python scripts to access their functions
import NYC_GetCleaned_HistoricData
import data_utility
import NYC_GetCleaned_TotalPopulation
#import the functio... | github_jupyter |
<h1 style="direction:rtl;text-align:center;color:#ffffff;background-color:#cca3db;font-size:48p"><strong>سوال پنجم</strong> </h1>
```
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import random
```
<h3 style="text-align:left;color:#945aaf;background-color:#ffffff;font-size:48p"><strong> a) </... | github_jupyter |
# Diplomatura en Ciencia de Datos, Aprendizaje Automático y sus Aplicaciones
## Programación Distribuida sobre Grandes Volúmenes de Datos
Damián Barsotti
### Facultad de Matemática Astronomía Física y Computación
## Universidad Nacional de Córdoba
<img src="http://program.ar/wp-content/uploads/2018/07/logo-UNC-FAMA... | github_jupyter |
## Model Layers
This module contains many layer classes that we might be interested in using in our models. These layers complement the default [Pytorch layers](https://pytorch.org/docs/stable/nn.html) which we can also use as predefined layers.
```
from fastai.vision import *
from fastai.gen_doc.nbdoc import *
```
... | github_jupyter |
# Les listes
## Définition
Collection d’objets hétéroclites, séparés entre eux par une virgule, et délimitée par des crochets :
```
collection = ["A Lannister", [32, "cheese"], "32"]
```
Comme pour toute séquence, les éléments de la liste sont ordonnés et sont accessibles par leur indice :
```
print(collection[1])... | github_jupyter |
# Exporting high quality satellite images
* **Products used:**
[ls8_sr](https://explorer.digitalearth.africa/products/ls8_sr),
[ls7_sr](https://explorer.digitalearth.africa/products/ls7_sr),
[ls5_sr](https://explorer.digitalearth.africa/products/ls5_sr),
[s2_l2a](https://explorer.digitalearth.africa/products/s2_l2a)
... | github_jupyter |
```
# coding=utf-8
from __future__ import print_function
import os
from keras.callbacks import ModelCheckpoint, EarlyStopping
from keras.optimizers import SGD
from sklearn.metrics import confusion_matrix
from scipy.stats import spearmanr
import openslide as ops
import cv2
import numpy as np
import datetime
import math
... | github_jupyter |
# Guideline on Eager Execution
* 이 코드는 [TensorFlow official Guide `eager execution` 문서](https://www.tensorflow.org/guide/eager)를 정리한 것이다.
[Eager execution](https://www.tensorflow.org/guide/eager#build_a_model) is a flexible machine learning platform for research and experimentation, providing:
* **An intuitive inter... | github_jupyter |
# Demo Prophet Time Series Forecasting on Ray local
<b>Suggestion: Make a copy of this notebook. This way you will retain the original, executed notebook outputs. Make edits in the copied notebook. </b>
### Description:
This notebook goes along with the tutorial <a href="https://towardsdatascience.com/scaling-tim... | github_jupyter |
<a href="https://colab.research.google.com/github/NeuromatchAcademy/course-content/blob/master/tutorials/W1D5_DimensionalityReduction/W1D5_Tutorial2.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Neuromatch Academy: Week 1, Day 5, Tutorial 2
# Di... | github_jupyter |
# Nearest Lat/Lon Points in xarray
It is very handy to pluck points from an xarray dataset that are nearest a latitude/longitude point of interest. One example is comparing station observations to model data at that point.
For some background, read my post on [StakOverflow: xarray select nearest lat/lon with multi-di... | github_jupyter |
# Preface
The locations requiring configuration for your experiment are commented in capital text.
# Setup
**Installations**
```
!pip install apricot-select
!pip install sphinxcontrib-napoleon
!pip install sphinxcontrib-bibtex
!git clone https://github.com/decile-team/distil.git
!git clone https://github.com/circu... | github_jupyter |
```
import argparse
import time
import numpy as np
import scipy.sparse as sp
import torch
from torch import optim
import torch.autograd as autograd
from torch.autograd import Variable
from model import GCNModelAE, Regularizer
from optimizer import loss_function1
from utils import load_data, mask_test_edges, preprocess_... | github_jupyter |
<a href="https://colab.research.google.com/github/claytonchagas/intpy_prod/blob/main/8_3_automatic_evaluation_dataone_tiny_gsgp_ast_only_DB.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
!sudo apt-get update
!sudo apt-get install python3.9
!pyt... | github_jupyter |
# Convolutional Neural Networks: Step by Step
Welcome to Course 4's first assignment! In this assignment, you will implement convolutional (CONV) and pooling (POOL) layers in numpy, including both forward propagation and (optionally) backward propagation.
**Notation**:
- Superscript $[l]$ denotes an object of the $l... | github_jupyter |
```
%matplotlib inline
%load_ext autoreload
%autoreload 2
from utilities_namespace import *
%%capture
%load_ext rpy2.ipython
%R require(ggplot2)
from helpers.notebooks import notebooks_importer
%%capture
import Breast_cancer_data as data
```
## Previously reported cancer stratification
On example of a well studied br... | github_jupyter |
##### Copyright 2018 The TensorFlow Authors.
```
#@title Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | github_jupyter |
Check of 2x6 Wood Joist Design per O86-09
E.Durham - 16-Aug-2018
```
import pint
unit = pint.UnitRegistry(system='mks')
Q = unit.Quantity
# define synonyms for common units
inch = unit.inch; mm = unit.mm; m = unit.m; kPa = unit.kPa; MPa = unit.MPa;
psi = unit.psi; kN = unit.kN; N = unit.N; ksi = unit.ksi;
dimensi... | github_jupyter |
*Sebastian Raschka*
last modified: 03/31/2014
<hr>
I am really looking forward to your comments and suggestions to improve and extend this tutorial! Just send me a quick note
via Twitter: [@rasbt](https://twitter.com/rasbt)
or Email: [bluewoodtree@gmail.com](mailto:bluewoodtree@gmail.com)
<hr>
### Problem Cate... | github_jupyter |
# Water classification with radar from Sentinel 1
### Background
Over 40% of the world’s population lives within 100 km of the coastline. However, coastal environments are constantly changing, with erosion and coastal change presenting a major challenge to valuable coastal infrastructure and important ecological habit... | github_jupyter |
# Getting Started with TensorRT
TensorRT is an SDK for optimizing trained deep learning models to enable high-performance inference. TensorRT contains a deep learning inference __optimizer__ for trained deep learning models and an optimized __runtime__ for execution. After you have trained your deep learning model in ... | github_jupyter |
```
import numba as nb
import numpy as np
import awkward as ak
print(f"{nb.__version__=}")
print(f"{ak.__version__=}")
@nb.njit
def make0(n):
r = np.empty((n, 4))
for i in range(n):
# simulate some work
x = np.random.rand()
y = np.random.rand()
z = np.random.rand()
t = np... | github_jupyter |
# Redis入门——字符串、列表与集合

## 使用Python连接Redis
### 基本语法
```
import redis
client = redis.Redis()
```
```
import redis
client = redis.Redis()
```
## 字符串
### 基本语法
```
# 向字符串中写入数据
client.set(key, value)
# 从字符串中读取数据
client.get(key)
# 设置字... | github_jupyter |
## Requirements
A [pip requirements file](https://pip.pypa.io/en/stable/user_guide/#requirements-files) can be found at: [/sashimdig/requirements.txt](../requirements.txt)
Notable requirements
|package |version |
|---- |----- |
|tensorflow | 0.10.0 |
| tflearn | 0.2.1 |
----
### [TFLearn installation... | github_jupyter |
# Exploratory Data Analysis with Titanic dataset
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sb
plt.style.use('fivethirtyeight')
import warnings
warnings.filterwarnings('ignore')
# we need below line for displaying graphis inline (in a notebook)
%matplotlib inline
trai... | github_jupyter |
<a href="https://colab.research.google.com/github/syamkakarla98/DataScience_Head_Start/blob/master/Student_Preformance.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Student Performance in Exams
This notebook provides the in depth analysis on th... | github_jupyter |
```
import torch
import torch.nn as nn
from torch import optim
import torch.nn.functional as F
from torch.utils.data import DataLoader,Dataset
import torchvision
import torchvision.models as tvm
from torchvision import transforms
from torchvision.datasets.folder import DatasetFolder,ImageFolder
import numpy as np
fr... | github_jupyter |
```
from google.colab import drive
drive.mount('/content/drive')
path = '/content/drive/MyDrive/Research/AAAI/dataset1/first_layer_with_entropy/k_001/'
import numpy as np
import pandas as pd
import torch
import torchvision
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms, utils
impor... | github_jupyter |
```
import pandas as pd
df = pd.read_csv('processed.csv.gz')
df.head()
df.info()
df = df.drop(columns=df.columns[0])
df.head()
df.groupby('vaderSentimentLabel').size()
import matplotlib.pyplot as plt
df.groupby('vaderSentimentLabel').count().plot.bar()
plt.show()
df.groupby('ratingSentimentLabel').size()
df.groupby('r... | github_jupyter |
```
from keras.datasets import mnist
from keras.models import Model
from keras.layers import Conv2D, MaxPool2D, UpSampling2D, Input
import cv2
import os
import numpy as np
import tensorflow as tf
devices = tf.config.experimental.get_visible_devices('GPU')
tf.config.experimental.set_memory_growth(device=devices[0], ena... | github_jupyter |
# APA Calling
## Aim
The purpose of this notebook is to call APA-based information (PDUI) based on [DAPARS2 method](https://github.com/3UTR/DaPars2).
## Methods
```
%preview ../../images/apa_calling.png
```
### 3'UTR Reference
* _gtf2bed12.py_ : Covert gtf to bed format (Source from in-house codes from Li Lab: htt... | github_jupyter |
# [Module 2.1] Write Preproces Code
preprocessing.py 의 역할은 링크를 참조 바랍니다. --> [여기](https://github.com/gonsoomoon-ml/churn-prediction-workshop/blob/master/9.1.Understand-Preprocess.py.ipynb)<br>
아래 코드는 전처리 로직(알고리즘)에 대해서 설명 합니다.
## Feature Transformer (전처리 학습 모델) - preprocessing.py 파일
- Numerical 데이타는 <a href=https://sci... | github_jupyter |
BTW strings can be converted to the following formats via the `output_format` parameter:
* `compact`: only number strings without any seperators or whitespace, like "004495445B01"
* `standard`: BTW strings with proper whitespace in the proper places. Note that in the case of BTW, the compact format is the same as the ... | github_jupyter |
```
import sys # required for relative imports in jupyter lab
sys.path.insert(0, '../')
from cosmosis.model import FFNet
from cosmosis.learning import Learn, Selector
from cosmosis.dataset import SKDS
from dataset import QM7, QM7b, QM7X, QM9, ANI1x
from torch.optim import Adam
from torch.nn import MSELoss, L1Loss
f... | github_jupyter |
```
%matplotlib inline
from matplotlib import pyplot
import numpy
```
Part of interaction between codes in AMUSE is based on exchanging data between the *community* codes or exchanging data between these codes and AMUSE. As you might have noticed in the pervious tutorial topic, every code provides access to particle c... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.