text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
# Grover's Algorithm In this section, we introduce Grover's algorithm and how it can be used to solve unstructured search problems. We then implement the quantum algorithm using Qiskit, and run on a simulator and device. ## Contents 1. [Introduction](#introduction) 2. [Example: 2 Qubits](#2qubits) 2.1 [Simul...
github_jupyter
# Controle de versão ## Objetivos - Entender o que um Sistema de Controle Versões (SCV) e o versionamento de código - Compreender benefícios de SCVs para arquivos diversos (reprodutibilidade, auditabilidade, compartilhamento, entre outros) - Ter uma visão geral sobre os SCVs mais comuns - Entender o funcionamento do ...
github_jupyter
# Introduction According to the Efficient Market Hypothesis, markets take into account all relevant information in efficiently pricing securities [@Fama1970]. While many studies have explored this supposition under its strong, semi-strong and weak form, the growing volume, velocity and variety of market data has forced...
github_jupyter
# PAMAP 2 Model 1: Artificial Neural Network #### Dataset Source: https://archive.ics.uci.edu/ml/datasets/PAMAP2+Physical+Activity+Monitoring This is the same model as our ANN, but tested on the dataset PAMAP2 to validate the architecture of our model. This does utilize the sliding window function. INPUT: pamap2_clea...
github_jupyter
**[Python Home Page](https://www.kaggle.com/learn/python)** --- # Try It Yourself Functions are powerful. Try writing some yourself. As before, don't forget to run the setup code below before jumping into question 1. ``` # SETUP. You don't need to worry for now about what this code does or how it works. from learn...
github_jupyter
``` import os import sys import matplotlib.pyplot as plt import IPython.display as ipd import pandas as pd import re import subprocess import numpy as np import math %load_ext autoreload %autoreload 2 %matplotlib inline sys.path.append('../src') pred_path = './fusion/' subm2 = { 'name': 'subm2', 'folds': 4, }...
github_jupyter
<a href="https://colab.research.google.com/github/Tessellate-Imaging/Monk_Object_Detection/blob/master/application_model_zoo/Example%20-%20Trimodal%20People%20Segmentation%20Dataset.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Table of contents...
github_jupyter
# Evaluation of Seq2Seq Models ``` import transformers from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, LogitsProcessorList, MinLengthLogitsProcessor, TopKLogitsWarper, TemperatureLogitsWarper, BeamSearchScorer import torch import datasets import pickle import seaborn as sns import matplotlib.pyplot a...
github_jupyter
# Training Neural Networks with Keras ### Goals: - Intro: train a neural network with `tensorflow` and the Keras layers ### Dataset: - Digits: 10 class handwritten digits - http://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_digits.html#sklearn.datasets.load_digits ``` %matplotlib inline # displ...
github_jupyter
Let us import some Python libraries that will help us load, manipulate, analyse and perform machine learning algorithms on the data. ``` import pandas as pd #Data Manipulation import numpy as np import seaborn as sns %matplotlib inline import matplotlib.pyplot as plt from sklearn.preprocessing import StandardScaler #...
github_jupyter
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. ![Impressions](https://PixelServer20190423114238.azurewebsites.net/api/impressions/MachineLearningNotebooks/how-to-use-azureml/automated-machine-learning/classification-bank-marketing/auto-ml-classification-bank-marketing.png) ...
github_jupyter
URL: http://matplotlib.org/examples/showcase/bachelors_degrees_by_gender.html Most examples work across multiple plotting backends equivalent, this example is also available for: * [Bokeh - bachelors_degress_by_gender](../bokeh/bachelors_degress_by_gender.ipynb) ``` import holoviews as hv from holoviews import opts ...
github_jupyter
# Bias ### Goals In this notebook, you're going to explore a way to identify some biases of a GAN using a classifier, in a way that's well-suited for attempting to make a model independent of an input. Note that not all biases are as obvious as the ones you will see here. ### Learning Objectives 1. Be able to distin...
github_jupyter
# FINAL PROJECT for CS 634 ## Name: Veena Chaudhari ## Topic: Predicting whether an individual is obese or not based on their eating habits and physical condition Github link: https://github.com/vac38/Classification_of_obesity.git Link to dataset: https://archive.ics.uci.edu/ml/datasets/Estimation+of+obesity+leve...
github_jupyter
# Feature Extraction and Selection This basic example shows how to use [tsfresh](https://tsfresh.readthedocs.io/) to extract useful features from multiple timeseries and use them to improve classification performance. We use the robot execution failure data set as an example. ``` %matplotlib inline import matplotli...
github_jupyter
``` %load_ext autoreload %autoreload 2 import numpy as np import matplotlib.pyplot as plt from matplotlib import rc from matplotlib.cm import get_cmap import pickle import os font = {'family' : 'sans-serif', 'size' : 12} rc('font', **font) import sys sys.path.insert(0,'..') from mavd.callbacks import * l...
github_jupyter
# Activation functions - toc:true - badges: true - comments: true - author: Pushkar G. Ghanekar - categories: [python, machine-learning, pytorch] Function that activates the particular neuron or node if the value across a particular threshold. These functions add the necessary non-linearity in the ANNs. Each percept...
github_jupyter
``` import numpy as np import matplotlib.pyplot as plt from sklearn import datasets, neighbors from matplotlib.colors import ListedColormap def knn_comparison(data, n_neighbors = 15): ''' This function finds k-NN and plots the data. ''' X = data[:, :2] y = data[:,2] # grid cell siz...
github_jupyter
``` % load_ext autoreload % autoreload 2 % matplotlib inline import matplotlib.pyplot as plt import numpy as np import torch device = 'cuda' if torch.cuda.is_available() else 'cpu' from copy import deepcopy from sklearn.linear_model import LinearRegression from sklearn import metrics from sklearn.model_selection impor...
github_jupyter
``` import sys sys.path.append('..') from msidata.dataset_msi_features_with_patients import PreProcessedMSIFeatureDataset from testing.logistic_regression import get_precomputed_dataloader import matplotlib.pyplot as plt from modules.deepmil import Attention import torch import pandas as pd import os # We need a model...
github_jupyter
# Tutorial: Compressing Natural Language With an Autoregressive Machine Learning Model and `constriction` - **Author:** Robert Bamler, University of Tuebingen - **Initial Publication Date:** Jan 7, 2022 This is an interactive jupyter notebook. You can read this notebook [online](https://github.com/bamler-lab/constric...
github_jupyter
# Train a basic TensorFlow Lite for Microcontrollers model This notebook demonstrates the process of training a 2.5 kB model using TensorFlow and converting it for use with TensorFlow Lite for Microcontrollers. Deep learning networks learn to model patterns in underlying data. Here, we're going to train a network to...
github_jupyter
``` import os import io import detectron2 # import some common detectron2 utilities from detectron2.engine import DefaultPredictor from detectron2.config import get_cfg from detectron2.utils.visualizer import Visualizer from detectron2.data import MetadataCatalog # import some common libraries import numpy as np imp...
github_jupyter
``` import os import numpy as np import pandas as pd #plotting import matplotlib.pyplot as plt import matplotlib.ticker as ticker #getting data from pydob.exploratory import ( get_issuance_rates_df, get_issuance_num_df, get_issuance_rates_ty...
github_jupyter
# Python sqlite3 ``` Commit : DB에 영구적으로 쓰는 것 Rollback : Data가 수정되기 전으로 되돌리는 것 Sqlite3 Data Type : TEXT, NUMERIC, INTEGER, REAL, BLOB ``` 1. DB 생성 2. 데이터 삽입 3. 데이터 삭제 4. 데이터 조회 5. 데이터 수정 ## [1. DB 생성] ``` import sqlite3 # sqlite3 버전 확인 print('sqlite3.version : ', sqlite3.version) import datetime # 현재 날짜 생성 now = ...
github_jupyter
#[How to run Object Detection and Segmentation on a Video Fast for Free](https://www.dlology.com/blog/how-to-run-object-detection-and-segmentation-on-video-fast-for-free/) ## Confirm TensorFlow can see the GPU Simply select "GPU" in the Accelerator drop-down in Notebook Settings (either through the Edit menu or the c...
github_jupyter
# Train without labels _This notebook is part of a tutorial series on [txtai](https://github.com/neuml/txtai), an AI-powered semantic search platform._ Almost all data available is unlabeled. Labeled data takes effort to manually review and/or takes time to collect. Zero-shot classification takes existing large langu...
github_jupyter
## [Troisi06](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.96.086601) Charge-Transport Regime of Crystalline Organic Semiconductors: Diffusion Limited by Thermal Off-Diagonal Electronic Disorder. A. Troisi and G. Orlandi. *Phys. Rev. Lett.* **2006**, *96*, 086601 ``` import os for env in ["MKL_NUM_THREAD...
github_jupyter
``` %load_ext autoreload %autoreload 2 %matplotlib inline import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from sklearn.cluster import KMeans from sklearn.svm import SVC from sklearn import metrics from ast import literal_eval from mlxtend.plotting import plot_decision_regions from sklearn i...
github_jupyter
``` !pip install gdown !gdown https://drive.google.com/uc?id=1nI47j3kVW-ZFcUAUSYJVp17wwIs-EpHC !unzip Scrapping.zip !rm -rf Scrapping.zip import os BASE_PATH = os.getcwd() if not os.path.exists('/model'): !mkdir model if not os.path.exists('/logs'): !mkdir logs import os train_dir = os.path.join('/content/Tr...
github_jupyter
<a href="https://colab.research.google.com/github/wtsyang/dl-reproducibility-project/blob/master/new_cnnTrain.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` # Mount Google Drive from google.colab import drive # import drive from google colab R...
github_jupyter
# Incremental modeling with decision optimization This tutorial includes everything you need to set up decision optimization engines, build a mathematical programming model, then incrementally modify it. You will learn how to: - change coefficients in an expression - add terms in an expression - modify constraints and...
github_jupyter
# Mask R-CNN Demo A quick intro to using the pre-trained model to detect and segment objects. ``` import os import sys import random import math import numpy as np import skimage.io import matplotlib import matplotlib.pyplot as plt # Root directory of the project ROOT_DIR = os.path.abspath("../") # Import Mask RCNN...
github_jupyter
``` import numpy as np import pandas as pd import torch import torchvision from torch.utils.data import Dataset, DataLoader from torchvision import transforms, utils import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from matplotlib import pyplot as plt %matplotlib inline from google.c...
github_jupyter
``` import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) import os import keras for dirname, _, filenames in os.walk('/kaggle/input'): for filename in filenames: print(os.path.join(dirname, filename)) from sklearn.model_selection import train_test_split...
github_jupyter
# Read Matrix Data Read in the gene expression data sets. ``` ## Download microarray matrix files from GEO setwd("~/NLM_Reproducibility_Workshop/tb_and_arthritis/data") url <- c("ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE54nnn/GSE54992/matrix/GSE54992_series_matrix.txt.gz", "ftp://ftp.ncbi.nlm.nih.gov/geo/seri...
github_jupyter
# Timeseries Pandas started out in the financial world, so it naturally has strong support for timeseries data. We'll look at some pandas data types and methods for manipulating timeseries data. Afterwords, we'll use [statsmodels' state space framework](http://www.statsmodels.org/stable/statespace.html) to model times...
github_jupyter
# Think Bayes This notebook presents example code and exercise solutions for Think Bayes. Copyright 2018 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
<a href="https://colab.research.google.com/github/satyajitghana/TSAI-DeepVision-EVA4.0/blob/master/03_PyTorch101/PyTorch101.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ![PyTorch](https://devblogs.nvidia.com/wp-content/uploads/2017/04/pytorch-log...
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
# Spark with MLRun example This example notebook demonstrates how to execute a spark job with MLRun. Our spark job is a generic ETL job which pulls data from user-defined data sources, applies a SQL query on top of them, and writes the result to a user defined destination. The definition of the input-sources should ...
github_jupyter
``` import numpy as np import functools def evaluateOrderOne(vector): ''' Input: vector ''' return np.sum(vector) def __evaluate3Dvector(v): #print(v) tmp = np.sum(v) if tmp == 3: return 30 elif tmp == 2: return 0 elif tmp == 0: return 28 else: if...
github_jupyter
# ONLOAD cells are called at beginning of the report ## Available global variables: * es: elasticsearch connection * replacementHT: a dictionary of replacement tags * report: the report object * params: the parameters (interval are plits in two name_start + name_end ``` #@ONLOAD replacementHT["Author"]="Arnaud Marcha...
github_jupyter
# Attack Password with Correlation Power Analysis IV.1 (CPA) ``` %run '../util/Metadata.ipynb' print_metadata() ``` <h1>Table of Contents<span class="tocSkip"></span></h1> <div class="toc"><ul class="toc-item"><li><span><a href="#Improving-the-code" data-toc-modified-id="Improving-the-code-1"><span class="toc-item-nu...
github_jupyter
# "Wine Quality." ### _"Quality ratings of Portuguese white wines" (Classification task)._ ## Table of Contents ## Part 0: Introduction ### Overview The dataset that's we see here contains 12 columns and 4898 entries of data about Portuguese white wines. **Метаданные:** * **fixed acidity** * **volatile...
github_jupyter
# Wiener Filter Implementation in TensorFlow To implement Wiener Filter functions, we are going to mimic its implementation in Scikit Image (see skimage.restoration.wiener) and in Tikhonet (see https://github.com/CosmoStat/ShapeDeconv/blob/master/python/DeepDeconv/utils/deconv_utils_FCS.py). ## Implementation in skim...
github_jupyter
<center> <img src="xeus-python.png" width="50%"> <h1>Python kernel based on xeus</h1> </center> # Simple code execution ``` a = 3 a b = 89 def sq(x): return x * x sq(b) print ``` # Redirected streams ``` import sys print("Error !!", file=sys.stderr) ``` # Error handling ``` "Hello" def dummy_funct...
github_jupyter
# Linear basis function models with PyMC4 ``` import logging import pymc4 as pm import numpy as np import arviz as az import tensorflow as tf import tensorflow_probability as tfp print(pm.__version__) print(tf.__version__) print(tfp.__version__) # Mute Tensorflow warnings ... logging.getLogger('tensorflow').setLeve...
github_jupyter
# HPC 6.2 Automating the workflow on ARC We are now going to transfer this workflow over to ARC, automating parts of it as we go. The first step is to connect to ARC via `ssh`, as we are off campus we need to do this via `remote-access.leeds.ac.uk` first: `ssh <username>@remote-access.leeds.ac.uk` `ssh <username...
github_jupyter
``` import tensorflow as tf tf.config.experimental.list_physical_devices() tf.test.is_built_with_cuda() ``` # Importing Libraries ``` import numpy as np import pandas as pd from matplotlib import pyplot as plt import os.path as op import pickle import tensorflow as tf from tensorflow import keras from keras.models im...
github_jupyter
![](http://i67.tinypic.com/2jcbwcw.png) ## NLTK code examples Python code examples to mirror lecture material **Author List**: Sam Choi **Original Sources**: http://nltk.org **License**: Feel free to do whatever you want to with this code Let's begin by importing NLTK and a couple sets of data. We'll import corp...
github_jupyter
``` from PIL import Image import os import math import random import uuid Image.MAX_IMAGE_PIXELS = None # 处理的所有图片及结果存放的总目录 dir = "F:/study1/研一/Python-CommonCode/HappyTimes/ValentineDay/" # 白底图片所在的路径 whiteImagePath = ["F:/study1/研一/Python-CommonCode/HappyTimes/ValentineDay/whitebackground.jpg"] # 白底图片所在的目录 whiteGoalPath...
github_jupyter
#### validation or kfold is not added and also data augmentation is not added yet. Mainly the Ensemble is not performed. Due for tomorrow. ``` %%capture !pip install ../input/segmentation-models-wheels/efficientnet_pytorch-0.6.3-py3-none-any.whl !pip install ../input/segmentation-models-wheels/pretrainedmodels-0.7.4-p...
github_jupyter
# Stablecoin Billionaires<br> Descriptive Analysis of the Ethereum-based Stablecoin ecosystem ## by Anton Wahrstätter, 01.07.2020 # Analytics Part of the thesis ``` import numpy as np import pandas as pd import matplotlib import matplotlib.pyplot as plt from datetime import datetime from collections import Counter f...
github_jupyter
# Selecting by Callable This is the fourth entry in a series on indexing and selecting in pandas. In summary, this is what we've covered: * [Basic indexing, selecting by label and location](https://www.wrighters.io/indexing-and-selecting-in-pandas-part-1/) * [Slicing in pandas](https://www.wrighters.io/indexing-and-...
github_jupyter
``` #@title Check GPU #@markdown Run this to connect to a Colab Instance, and see what GPU Google gave you. gpu = !nvidia-smi --query-gpu=gpu_name --format=csv print(gpu[1]) print("The Tesla T4 and P100 are fast and support hardware encoding. The K80 and P4 are slower.") print("Sometimes resetting the instance in the ...
github_jupyter
``` # Load packages import tensorflow as tf from tensorflow import keras import numpy as np import pandas as pd import os import pickle import time import scipy as scp import scipy.stats as scps from scipy.optimize import differential_evolution from scipy.optimize import minimize from datetime import datetime import ma...
github_jupyter
``` import numpy as np import pandas as pd pd.set_option('precision', 1) ``` **Question 1** (25 points) There is simulated data of 25,000 human heights and weights of 18 years old children at this URL `http://socr.ucla.edu/docs/resources/SOCR_Data/SOCR_Data_Dinov_020108_HeightsWeights.html` The original data has hei...
github_jupyter
# Workshop 5 [Student] This notebook will cover the following topics: 1. polymorphism 2. Object composition 3. list of objects 4. stacks and queues ## 5.1 Polymorphism (Follow): **Learning Objectives:** 1. Understand how functions can have the same name but do different things 2. Understand how functions...
github_jupyter
# Combining measurements When we do a fit, we can have additional knowledge about a parameter from other measurements. This can be taken into account either through a simultaneous fit or by adding a constraint (subsidiary measurement). ## Adding a constraint If we know a parameters value from a different measurement...
github_jupyter
### Increasing accuracy for LL fault detection ``` from jupyterthemes import get_themes import jupyterthemes as jt from jupyterthemes.stylefx import set_nb_theme set_nb_theme('chesterish') import pandas as pd data_10=pd.read_csv(r'D:\Acads\BTP\Lightly Loaded\Train10hz2.csv') data_20=pd.read_csv(r'D:\Acads\BTP\Lightly...
github_jupyter
``` #### ALL NOTEBOOK SHOULD HAVE SOME VERSION OF THIS ##################################### ######################################################################################## %load_ext autoreload %autoreload 2 import os import sys currentdir = os.getcwd() # go to root directory. change the # of os.path.dirnames...
github_jupyter
<a href="https://colab.research.google.com/github/chemicoPy/MACD-RSI-STOCHASTIC-strategy/blob/ccxt/MACD_RSI_STOCHASTIC_strategy_(ccxt).ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` !pip install ccxt !pip install pandas_ta !pip install schedule...
github_jupyter
# What are `TargetPixelFile` objects? Target Pixel Files (TPFs) are a file common to Kepler/K2 and the TESS mission. They contain movies of the pixel data centered on a single target star. TPFs can be thought of as stacks of images, with one image for every timestamp the telescope took data. Each timestamp is referre...
github_jupyter
``` import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) # Input data files are available in the "../input/" directory. # For example, running this (by clicking run or pressing Shift+Enter) will list the files in the input directory from subprocess import check_ou...
github_jupyter
# Milestone Project 2 - Walkthrough Steps Workbook Below is a set of steps for you to follow to try to create the Blackjack Milestone Project game! ## Game Play To play a hand of Blackjack the following steps must be followed: 1. Create a deck of 52 cards 2. Shuffle the deck 3. Ask the Player for their bet 4. Make sur...
github_jupyter
# Income Prediction Explanations ![Census](https://archive.ics.uci.edu/ml/assets/MLimages/Large2.jpg) We will use an SKLearn classifier built on the [1996 US Census DataSet](https://archive.ics.uci.edu/ml/datasets/adult) which predicts high (>50K$) or low (<=50K$) income based on the Census demographic data. The Kf...
github_jupyter
## 1.2 引领浪潮的LaTeX ### 1.2.1 LaTeX的出现 LaTeX是一款高质量的文档排版系统,LaTeX在读法上一般发作Lay-tek或者Lah-tek的音,而不是大家普遍认为的Lay-teks。LaTeX的历史可以追溯到1984年,在这一年里,兰波特博士作为早期开发者发布了LaTeX的最初版本。事实上,LaTeX完全是兰伯特博士的意外所得,他当年出于排版书籍的需要,在早先的文档排版系统TeX基础上新增了一些特定的宏包,为便于自己日后重复使用这些宏包,他将这些宏包构建成标准宏包。谁曾想,正是这些不经意间开发出来的宏包构成了LaTeX的雏形。 <p align="center"> <img align="mid...
github_jupyter
# xspec Documentation (v1.3.2) This ipython Notebook is intended to provide documentation for the linetools GUI named XSpecGUI. Enjoy and feel free to suggest edits/additions, etc. Here is a screenshot of the XSpecGUI in action: ``` from IPython.display import Image Image(filename="images/xspec_example.png") ``` ...
github_jupyter
<a href="https://colab.research.google.com/github/AI4Finance-LLC/FinRL-Library/blob/master/FinRL_multiple_stock_trading.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Deep Reinforcement Learning for Stock Trading from Scratch: Multiple Stock Trad...
github_jupyter
``` # Built-in libraries from datetime import datetime, timedelta # NumPy, SciPy and Pandas import pandas as pd import numpy as np def hourly_dataset(name): """ Constants for time period with maximum number of buildings measured simultaneously in the BDG dataset. For more details, go to old_files/RawFeatur...
github_jupyter
# Convolutional Autoencoder Sticking with the MNIST dataset, let's improve our autoencoder's performance using convolutional layers. Again, loading modules and the data. ``` %matplotlib inline import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from tensorflow.examples.tutorials.mnist import i...
github_jupyter
``` import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from scipy import stats params = { "legend.fontsize": "x-large", "axes.labelsize": "x-large", "axes.titlesize": "x-large", "xtick.labelsize": "x-large", "ytick.labelsize": "x-large", "figure.facecolo...
github_jupyter
``` import numpy as np import higra as hg from functools import partial from scipy.cluster.hierarchy import fcluster from ultrametric.optimization import UltrametricFitting from ultrametric.data import load_datasets, show_datasets from ultrametric.graph import build_graph, show_graphs from ultrametric.utils import Exp...
github_jupyter
# Building, Training and Evaluating Models with TensorFlow Decision Forests ## Overview In this lab, you use TensorFlow Decision Forests (TF-DF) library for the training, evaluation, interpretation and inference of Decision Forest models. ## Learning Objective In this notebook, you learn how to: 1. Train a binary ...
github_jupyter
# 객담도말 결핵진단 딥러닝 모델 CNN 기반의 객담도말 결핵진단 딥러닝 모델 소스코드입니다. ``` import os from __future__ import print_function import numpy as np np.random.seed(1337) # for reproducibility from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten from keras.layers...
github_jupyter
# Imports Numpy import for array processing, python doesn’t have built in array support. The feature of working with native arrays can be used in python with the help of numpy library. Pandas is a library of python used for working with tables, on importing the data, mostly data will be of table format, for ease manip...
github_jupyter
# GPU random forest with data from Snowflake <table> <tr> <td> <img src="https://saturn-public-assets.s3.us-east-2.amazonaws.com/example-resources/rapids.png" width="300"> </td> <td> <img src="https://saturn-public-assets.s3.us-east-2.amazonaws.com/example-resources/...
github_jupyter
# The purpose of this notebook **UPDATE 1:** *In version 5 of this notebook, I demonstrated that the model is capable of reaching the LB score of 0.896. Now, I would like to see if the augmentation idea from [this kernel](https://www.kaggle.com/jiweiliu/lgb-2-leaves-augment) would help us to reach an even better score...
github_jupyter
# Estimating the carbon content of marine bacteria and archaea In order to estimate the characteristic carbon content of marine bacteria and archaea, we rely on two main methodologies - volume based estimates and amino acid based estimates. ## Volume-based estimates We collected measurements of the characeteristic vo...
github_jupyter
<a href="http://landlab.github.io"><img style="float: left" src="../../../landlab_header.png"></a> # Using the ChiFinder Component The `ChiFinder` component creates a map of the $\chi$ drainage network index from a digital elevation model. The $\chi$ index, described by Perron and Royden (2013), is a function of drai...
github_jupyter
``` #|hide #|skip ! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab ``` some dependencies to get the dataset ``` ! pip install rarfile av ! pip install -Uq pyopenssl ``` # Tutorial - Using fastai on sequences of Images > How to use fastai to train an image sequence to image sequence job. This...
github_jupyter
# Assignment 1.1 - Python 101 Python is an easy to learn, powerful programming language with efficient high-level data structures and object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development ...
github_jupyter
<h1><center> Análise de pellets plásticos como ferramenta para o estudo de permanência de microplásticos em praias arenosas. </center></h1> Juana Gerevini Bozzetto # 03. Recortando Área de Interesse (Pellet) - Recortar área de interesse - Ver se o programa funciona para maior parte das imagens ``` import skimage im...
github_jupyter
# TensorFlow MNIST Tutorial ``` import tensorflow as tf import numpy as np import datetime import matplotlib.pyplot as plt %matplotlib inline ``` Lets load MNIST data and check random image ``` mnist = input_data.read_data_sets('../../datasets/MNIST', one_hot=True) batch = mnist.train.next_batch(1) sample_image = ba...
github_jupyter
# Treasury Bond Fund Simulator This is based off of [longinvest's post on bogleheads][1]. He implemented it all in a spreadsheet (which is linked in the thread). The goal is to calculate returns of a simulated bond fund given a bunch of interest rates. By having returns (instead of rates) we can perform backtesting w...
github_jupyter
``` from keras.layers import Convolution2D from keras.layers import MaxPooling2D from keras.layers import Flatten from keras.layers import Dense from keras.models import Sequential model = Sequential() #inputlayer : apply filters model.add(Convolution2D(filters=32, kernel_size=(3,3), ...
github_jupyter
# Overview This a notebook that inspects the results of a WarpX simulation. # Instruction Enter the path of the data you wish to visualize below. Then execute the cells one by one, by selecting them with your mouse and typing `Shift + Enter` ``` # Import statements import yt ; yt.funcs.mylog.setLevel(50) import num...
github_jupyter
``` import math import numpy as np import matplotlib.pyplot as plt %matplotlib inline # Loading the data def load_data(): from sklearn.model_selection import train_test_split data = np.genfromtxt('time_temp_2016.tsv', delimiter='\t') x = data[:, 0] x = x.reshape((x.shape[0], 1)) y = data[:, ...
github_jupyter
``` #default_exp data.core #export from local.torch_basics import * from local.test import * from local.data.load import * from local.notebook.showdoc import * ``` # Data core > Core functionality for gathering data The classes here provide functionality for applying a list of transforms to a set of items (`TfmdList...
github_jupyter
Tutorials table of content: - [Tutorial 1: Run a first scenario](./Tutorial-1_Run_your_first_scenario.ipynb) - Tutorial 2: Add contributivity measurements methods - [Tutorial 3: Use a custom dataset](./Tutorial-3_Use_homemade_dataset.ipynb) # Tutorial 2 : Exploring contributivity With this example, we dive deeper ...
github_jupyter
``` import numpy as np import os from codeStore import support_fun as spf import importlib # case 1, ecoli (head Force) model in finite pipe. ellipse_centerx_list = [0.75, 0.5, 0] rot_theta_list = np.linspace(0, 2, 11) # true theta=rot_theta_list*np.pi rs1_list = (0.1, 0.2, 0.3) PoiseuilleStrength_list = np.linspace(-...
github_jupyter
# Spacy and SVM ``` import numpy as np import pandas as pd import spacy from spacy.matcher import Matcher from spacy.tokens import Span from spacy import displacy nlp=spacy.load("en_core_web_sm") train=pd.read_csv('/kaggle/input/nlp-getting-started/train.csv') test=pd.read_csv('/kaggle/input/nlp-getting-started/test...
github_jupyter
# Glyph objects Logomaker uses the [glyph](https://logomaker.readthedocs.io/en/latest/Glyph.html) class to render individual glyphs. This class also allows the user to customize each glyph according to their needs. We begin by importing useful packages ``` import numpy as np import pandas as pd import matplotlib.pypl...
github_jupyter
# First day! Congratulations! It's your first day as a data scientist in the company! Your first project is to build a model for predicting if a movie will get a positive or negative review. You need to start exploring your dataset. In order to create a function that will scan each movie review, you want to know how ma...
github_jupyter
## Table Tutorial [Table](https://hail.is/docs/0.2/hail.Table.html) is Hail's distributed analogue of a data frame or SQL table. It will be familiar if you've used R or `pandas`, but `Table` differs in 3 important ways: - It is distributed. Hail tables can store far more data than can fit on a single computer. - It...
github_jupyter
<a href="https://colab.research.google.com/github/unicamp-dl/IA025_2022S1/blob/main/ex03/Guilherme_Pereira/Aula_3_Guilherme_Pereira.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ### Escreva aqui seu nome: # PyTorch: Gradientes e Grafo Computacion...
github_jupyter
# Factorization Machine ---- ### Concept - Factorization Machine is general predictor like SVM. FM calculate all of pair-wise interaction between variables. So, FM can overcome the situation `cold-start` because of pair-wise vector factorization. It works like latent vector, but break the independence of the interacti...
github_jupyter
# Transfer Learning with CNN - Rodrigo Puerto Pedrera Este documento corresponde a la entrega práctica final de la asignatura de cuarto curso: Computación bioinspirada. Corresponde a la entrega de dificultad media establecida. Trata sobre la realización de una red neuronal convolucional que se ajuste al dataset *CIFAR...
github_jupyter
# Diseño de software para cómputo científico ---- ## Unidad 1: Modelo de objetos de Python <small><b>Source:</b> <a href="https://dbader.org/blog/python-dunder-methods">https://dbader.org/blog/python-dunder-methods</a></small> ### Agenda de la Unidad 1 --- - Clase 1: - Diferencias entre alto y bajo nivel. ...
github_jupyter