text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
### Cell Painting morphological (CP) and L1000 gene expression (GE) profiles for the following datasets: - **CDRP**-BBBC047-Bray-CP-GE (Cell line: U2OS) : * $\bf{CP}$ There are 30,430 unique compounds for CP dataset, median number of replicates --> 4 * $\bf{GE}$ There are 21,782 unique compounds for GE data...
github_jupyter
``` import keras import keras.backend as K from keras.datasets import mnist from keras.models import Sequential, Model, load_model from keras.layers import Dense, Dropout, Activation, Flatten, Input, Lambda from keras.layers import Conv2D, MaxPooling2D, AveragePooling2D, Conv1D, MaxPooling1D, LSTM, ConvLSTM2D, GRU, Bat...
github_jupyter
# NOAA Wave Watch 3 and NDBC Buoy Data Comparison *Note: this notebook requires python3.* This notebook demostrates how to compare [WaveWatch III Global Ocean Wave Model](http://data.planetos.com/datasets/noaa_ww3_global_1.25x1d:noaa-wave-watch-iii-nww3-ocean-wave-model?utm_source=github&utm_medium=notebook&utm_campa...
github_jupyter
# Aula 1 ``` import pandas as pd url_dados = 'https://github.com/alura-cursos/imersaodados3/blob/main/dados/dados_experimentos.zip?raw=true' dados = pd.read_csv(url_dados, compression = 'zip') dados dados.head() dados.shape dados['tratamento'] dados['tratamento'].unique() dados['tempo'].unique() dados['dose'].unique()...
github_jupyter
___ <a href='http://www.pieriandata.com'> <img src='../Pierian_Data_Logo.png' /></a> ___ # Matplotlib Exercises Welcome to the exercises for reviewing matplotlib! Take your time with these, Matplotlib can be tricky to understand at first. These are relatively simple plots, but they can be hard if this is your first ...
github_jupyter
``` import json import numpy as np import matplotlib.pyplot as plt from scipy.integrate import quad from scipy.special import comb from tabulate import tabulate %matplotlib inline ``` ## Expected numbers on Table 3. ``` rows = [] datasets = { 'Binary': 2, 'AG news': 4, 'CIFAR10': 10, 'CIFAR100': 100...
github_jupyter
# PageRank Performance Benchmarking # Skip notebook test This notebook benchmarks performance of running PageRank within cuGraph against NetworkX. NetworkX contains several implementations of PageRank. This benchmark will compare cuGraph versus the defaukt Nx implementation as well as the SciPy version Notebook Cred...
github_jupyter
##Tirmzi Analysis n=1000 m+=1000 nm-=120 istep= 4 min=150 max=700 ``` import sys sys.path import matplotlib.pyplot as plt import numpy as np import os from scipy import signal ls import capsol.newanalyzecapsol as ac ac.get_gridparameters import glob folders = glob.glob("FortranOutputTest/*/") folders all_data= dict() ...
github_jupyter
``` %load_ext autoreload %autoreload 2 import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns r = np.random.randn((1000)) S0 = 1 S = np.cumsum(r) + S0 T = 2 mu = 0. sigma = 0.01 S0 = 20 dt = 0.01 N = round(T/dt) t = np.linspace(0, T, N) W = np.random.standard_normal(size = N) W = ...
github_jupyter
<a href="https://colab.research.google.com/github/mjvakili/MLcourse/blob/master/day2/nn_qso_finder.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> Let's start by importing the libraries that we need for this exercise. ``` import numpy as np import ...
github_jupyter
``` import numpy as np from scipy import pi import matplotlib.pyplot as plt import pickle as cPickle #Sine wave N = 128 def get_sine_wave(): x_sin = np.array([0.0 for i in range(N)]) # print(x_sin) for i in range(N): # print("h") x_sin[i] = np.sin(2.0*pi*i/16.0) plt.plot(x_sin) pl...
github_jupyter
# Exercise: Find correspondences between old and modern english The purpose of this execise is to use two vecsigrafos, one built on UMBC and Wordnet and another one produced by directly running Swivel against a corpus of Shakespeare's complete works, to try to find corelations between old and modern English, e.g. "tho...
github_jupyter
<a href="https://colab.research.google.com/github/jeffheaton/t81_558_deep_learning/blob/master/t81_558_class_04_3_regression.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 Tab...
github_jupyter
``` # flake8: noqa ########################################################## # Relative Imports ########################################################## import sys from os.path import isfile from os.path import join def find_pkg(name: str, depth: int): if depth <= 0: ret = None else: d = ["...
github_jupyter
# About this Notebook In this notebook, we provide the tensor factorization implementation using an iterative Alternating Least Square (ALS), which is a good starting point for understanding tensor factorization. ``` import numpy as np from numpy.linalg import inv as inv ``` # Part 1: Matrix Computation Concepts ##...
github_jupyter
# Auditing a dataframe In this notebook, we shall demonstrate how to use `privacypanda` to _audit_ the privacy of your data. `privacypanda` provides a simple function which prints the names of any columns which break privacy. Currently, these are: - Addresses - E.g. "10 Downing Street"; "221b Baker St"; "EC2R 8AH" ...
github_jupyter
``` # Neo4J graph example # author: Gressling, T # license: MIT License # code: github.com/gressling/examples # activity: single example # index: 25-2 # https://gist.github.com/korakot/328aaac51d78e589b4a176228e4bb06f # download 3.5.8 or neo4j-enterprise-4.0.0-alpha09mr02-unix !curl https://neo4j.com/artifact.php?name=...
github_jupyter
##### Copyright 2018 The TensorFlow Authors. Licensed under the Apache License, Version 2.0 (the "License"); ``` #@title Licensed under the Apache License, Version 2.0 (the "License"); { display-mode: "form" } # you may not use this file except in compliance with the License. # You may obtain a copy of the License at...
github_jupyter
# Communication in Crisis ## Acquire Data: [Los Angeles Parking Citations](https://www.kaggle.com/cityofLA/los-angeles-parking-citations)<br> Load the dataset and filter for: - Citations issued from 2017-01-01 to 2021-04-12. - Street Sweeping violations - `Violation Description` == __"NO PARK/STREET CLEAN"__ Let's ac...
github_jupyter
``` from keras.models import load_model import pandas as pd import keras.backend as K from keras.callbacks import LearningRateScheduler from keras.callbacks import Callback import math import numpy as np def coeff_r2(y_true, y_pred): from keras import backend as K SS_res = K.sum(K.square( y_true-y_pred )) ...
github_jupyter
# Training Collaborative Experts on MSR-VTT This notebook shows how to download code that trains a Collaborative Experts model with GPT-1 + NetVLAD on the MSR-VTT Dataset. ## Setup * Download Code and Dependencies * Import Modules * Download Language Model Weights * Download Datasets * Generate Encodings fo...
github_jupyter
``` import numpy as np from scipy.spatial import Delaunay import networkx as nx import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import pandas import os import graphsonchip.graphmaker from graphsonchip.graphmaker import make_spheroids from graphsonchip.graphmaker import graph_generation_func fro...
github_jupyter
# Model Explainer Example ![architecture](architecture.png) In this example we will: * [Describe the project structure](#Project-Structure) * [Train some models](#Train-Models) * [Create Tempo artifacts](#Create-Tempo-Artifacts) * [Run unit tests](#Unit-Tests) * [Save python environment for our classifier]...
github_jupyter
##### Copyright 2018 The TensorFlow Authors. Licensed under the Apache License, Version 2.0 (the "License"). # Neural Machine Translation with Attention <table class="tfo-notebook-buttons" align="left"> <td> <a target="_blank" href="https://colab.research.google.com/github/tensorflow/docs/blob/master/site/e...
github_jupyter
# Many to Many Classification Simple example for Many to Many Classification (Simple pos tagger) by Recurrent Neural Networks - Creating the **data pipeline** with `tf.data` - Preprocessing word sequences (variable input sequence length) using `padding technique` by `user function (pad_seq)` - Using `tf.nn.embedding_l...
github_jupyter
# Android的人脸识别库(NDK) ## 创建工程向导 ![](images/create_android_ndk_project_guide1.png) ![](images/create_android_ndk_project_guide2.png) ![](images/create_android_ndk_project_guide3.png) ## dlib库源代码添加到工程 * 把dlib目录下的dlib文件夹拷贝到app/src/main/ ## 增加JNI接口 ### 创建Java接口类 在app/src/main/java/com/wangjunjian/facerecognition下创建类Fa...
github_jupyter
#$EXERCISE_PREAMBLE$ As always, run the setup code below before working on the questions (and if you leave this notebook and come back later, remember to run the setup code again). ``` from learntools.core import binder; binder.bind(globals()) from learntools.python.ex5 import * print('Setup complete.') ``` # Exerci...
github_jupyter
# Setup ### Imports ``` import sys sys.path.append('../') del sys %reload_ext autoreload %autoreload 2 from toolbox.parsers import standard_parser, add_task_arguments, add_model_arguments from toolbox.utils import load_task, get_pretrained_model, to_class_name import modeling.models as models ``` ### Notebook funct...
github_jupyter
# Implementing TF-IDF ------------------------------------ Here we implement TF-IDF, (Text Frequency - Inverse Document Frequency) for the spam-ham text data. We will use a hybrid approach of encoding the texts with sci-kit learn's TFIDF vectorizer. Then we will use the regular TensorFlow logistic algorithm outline....
github_jupyter
# Table of Contents <p><div class="lev1 toc-item"><a href="#Texte-d'oral-de-modélisation---Agrégation-Option-Informatique" data-toc-modified-id="Texte-d'oral-de-modélisation---Agrégation-Option-Informatique-1"><span class="toc-item-num">1&nbsp;&nbsp;</span>Texte d'oral de modélisation - Agrégation Option Informatique<...
github_jupyter
``` import torch from torch.autograd import grad import torch.nn as nn from numpy import genfromtxt import torch.optim as optim import matplotlib.pyplot as plt import torch.nn.functional as F import math tuberculosis_data = genfromtxt('tuberculosis.csv', delimiter=',') #in the form of [t, S,L,I,T] torch.manual_seed(1...
github_jupyter
``` #IMPORT SEMUA LIBARARY #IMPORT LIBRARY PANDAS import pandas as pd #IMPORT LIBRARY UNTUK POSTGRE from sqlalchemy import create_engine import psycopg2 #IMPORT LIBRARY CHART from matplotlib import pyplot as plt from matplotlib import style #IMPORT LIBRARY BASE PATH import os import io #IMPORT LIBARARY PDF from fpdf im...
github_jupyter
``` from PIL import Image import numpy as np import os import cv2 import keras from keras.utils import np_utils from keras.models import Sequential from keras.layers import Conv2D,MaxPooling2D,Dense,Flatten,Dropout import pandas as pd import sys import tensorflow as tf %matplotlib inline import matplotlib.pyplot as plt...
github_jupyter
# Mixture Density Networks with Edward, Keras and TensorFlow This notebook explains how to implement Mixture Density Networks (MDN) with Edward, Keras and TensorFlow. Keep in mind that if you want to use Keras and TensorFlow, like we do in this notebook, you need to set the backend of Keras to TensorFlow, [here](http:...
github_jupyter
``` from sklearn.model_selection import train_test_split import pandas as pd import numpy as np from sklearn.preprocessing import StandardScaler from keras.utils import to_categorical from keras.models import Sequential from keras.layers import Dense #df = pd.read_csv(".\\Data_USD.csv", header=None,skiprows=1) df = pd....
github_jupyter
# Nonlinear recharge models *R.A. Collenteur, University of Graz* This notebook explains the use of the `RechargeModel` stress model to simulate the combined effect of precipitation and potential evaporation on the groundwater levels. For the computation of the groundwater recharge, three recharge models are currently...
github_jupyter
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-59152712-8"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-59152712-8'); </script> # Computing the 4-Velocity Time-Component $u^0$, the Magnet...
github_jupyter
``` # import re # import tensorflow as tf # from tensorflow.keras.preprocessing.text import text_to_word_sequence # tokens=text_to_word_sequence("manta.com/c/mmcdqky/lily-co") # print(tokens) # #to map the features to a dictioanary and then convert it to a csv file. # # Feauture extraction # class feature_extracto...
github_jupyter
**This notebook is an exercise in the [Intermediate Machine Learning](https://www.kaggle.com/learn/intermediate-machine-learning) course. You can reference the tutorial at [this link](https://www.kaggle.com/alexisbcook/categorical-variables).** --- By encoding **categorical variables**, you'll obtain your best resul...
github_jupyter
##### Copyright 2018 The TensorFlow Authors. Licensed under the Apache License, Version 2.0 (the "License"); ``` #@title Licensed under the Apache License, Version 2.0 (the "License"); { display-mode: "form" } # you may not use this file except in compliance with the License. # You may obtain a copy of the License at...
github_jupyter
<a href="https://colab.research.google.com/github/cseveriano/spatio-temporal-forecasting/blob/master/notebooks/thesis_experiments/20200924_eMVFTS_Wind_Energy_Raw.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ## Forecasting experiments for GEFCOM 2...
github_jupyter
# Use `Lale` `AIF360` scorers to calculate and mitigate bias for credit risk AutoAI model This notebook contains the steps and code to demonstrate support of AutoAI experiments in Watson Machine Learning service. It introduces commands for bias detecting and mitigation performed with `lale.lib.aif360` module. Some fa...
github_jupyter
# Trade-off between classification accuracy and reconstruction error during dimensionality reduction - Low-dimensional LSTM representations are excellent at dimensionality reduction, but are poor at reconstructing the original data - On the other hand, PCs are excellent at reconstructing the original data but these hi...
github_jupyter
# Controlling Flow with Conditional Statements Now that you've learned how to create conditional statements, let's learn how to use them to control the flow of our programs. This is done with `if`, `elif`, and `else` statements. ## The `if` Statement What if we wanted to check if a number was divisible by 2 and if...
github_jupyter
# Geolocalizacion de dataset de escuelas argentinas ``` #Importar librerias import pandas as pd import matplotlib.pyplot as plt %matplotlib inline import warnings warnings.filterwarnings('ignore') ``` ### Preparacion de data ``` # Vamos a cargar un padron de escuelas de Argentina # Estos son los nombres de columna...
github_jupyter
# BERT finetuning on AG_news-4 ## Librairy ``` # !pip install transformers==4.8.2 # !pip install datasets==1.7.0 import os import time import pickle import numpy as np import torch from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score, recall_score, precision_score, f1_scor...
github_jupyter
This tutorial shows how to generate an image of handwritten digits using Deep Convolutional Generative Adversarial Network (DCGAN). Generative Adversarial Networks (GANs) are one of the most interesting fields in machine learning. The standard GAN consists of two models, a generative and a discriminator one. Two model...
github_jupyter
## Setup If you are running this generator locally(i.e. in a jupyter notebook in conda, just make sure you installed: - RDKit - DeepChem 2.5.0 & above - Tensorflow 2.4.0 & above Then, please skip the following part and continue from `Data Preparations`. To increase efficiency, we recommend running this molecule gene...
github_jupyter
# Graphs from the presentation ``` import matplotlib.pyplot as plt %matplotlib notebook # create a new figure plt.figure() # create x and y coordinates via lists x = [99, 19, 88, 12, 95, 47, 81, 64, 83, 76] y = [43, 18, 11, 4, 78, 47, 77, 70, 21, 24] # scatter the points onto the figure plt.scatter(x, y) # create a...
github_jupyter
# Introduction and Foundations: Titanic Survival Exploration > Udacity Machine Learning Engineer Nanodegree: _Project 0_ > > Author: _Ke Zhang_ > > Submission Date: _2017-04-27_ (Revision 2) ## Abstract In 1912, the ship RMS Titanic struck an iceberg on its maiden voyage and sank, resulting in the deaths of most of ...
github_jupyter
<a href="https://colab.research.google.com/github/darshanbk/100-Days-Of-ML-Code/blob/master/Getting_started_with_BigQuery.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Before you begin 1. Use the [Cloud Resource Manager](https://console.clou...
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
# Deriving a Point-Spread Function in a Crowded Field ### following Appendix III of Peter Stetson's *User's Manual for DAOPHOT II* ### Using `pydaophot` form `astwro` python package All *italic* text here have been taken from Stetson's manual. The only input file for this procedure is a FITS file containing reference...
github_jupyter
``` # python standard library import sys import os import operator import itertools import collections import functools import glob import csv import datetime import bisect import sqlite3 import subprocess import random import gc import shutil import shelve import contextlib import tempfile import math import pickle # ...
github_jupyter
``` import numpy as np from copy import deepcopy from scipy.special import expit from scipy.optimize import minimize from sklearn.datasets import load_iris from sklearn.linear_model import LogisticRegression as skLogisticRegression from sklearn.multiclass import OneVsRestClassifier as skOneVsRestClassifier class OneVsR...
github_jupyter
# BLU15 - Model CSI ## Intro: It often happens that your data distribution changes with time. More than that, sometimes you don't know how a model was trained and what was the original training data. In this learning unit we're going to try to identify whether an existing model meets our expectations and redeploy...
github_jupyter
``` import numpy as np #Load the predicted 9x12 array #1st pass im1=np.array([[4,4,4,4,4,4,4,4,4,4,4,4], [6,6,2,1,6,6,6,6,6,1,1,2], [6,6,6,1,1,6,6,6,6,1,1,2], [2,6,6,6,1,5,5,5,6,1,1,2], [5,6,6,6,5,5,5,5,5,1,5,5], [5,5,2,5,5,5,5,5,5,1,5,5], ...
github_jupyter
# DB2 Jupyter Notebook Extensions Version: 2021-08-23 This code is imported as a Jupyter notebook extension in any notebooks you create with DB2 code in it. Place the following line of code in any notebook that you want to use these commands with: <pre> &#37;run db2.ipynb </pre> This code defines a Jupyter/Python mag...
github_jupyter
# Profiling TensorFlow Multi GPU Multi Node Training Job with Amazon SageMaker Debugger This notebook will walk you through creating a TensorFlow training job with the SageMaker Debugger profiling feature enabled. It will create a multi GPU multi node training using Horovod. ### (Optional) Install SageMaker and SMDe...
github_jupyter
``` import sys import os sys.path.append(os.path.abspath("../src/")) import extract.data_loading as data_loading import extract.compute_predictions as compute_predictions import extract.compute_shap as compute_shap import extract.compute_ism as compute_ism import model.util as model_util import model.profile_models as ...
github_jupyter
# 7.6 Transformerモデル(分類タスク用)の実装 - 本ファイルでは、クラス分類のTransformerモデルを実装します。 ※ 本章のファイルはすべてUbuntuでの動作を前提としています。Windowsなど文字コードが違う環境での動作にはご注意下さい。 # 7.6 学習目標 1. Transformerのモジュール構成を理解する 2. LSTMやRNNを使用せずCNNベースのTransformerで自然言語処理が可能な理由を理解する 3. Transformerを実装できるようになる # 事前準備 書籍の指示に従い、本章で使用するデータを用意します ``` import math import num...
github_jupyter
# Run model module locally ``` import os # Import os environment variables for file hyperparameters. os.environ["TRAIN_FILE_PATTERN"] = "gs://machine-learning-1234-bucket/gan/data/cifar10/train*.tfrecord" os.environ["EVAL_FILE_PATTERN"] = "gs://machine-learning-1234-bucket/gan/data/cifar10/test*.tfrecord" os.environ[...
github_jupyter
# Zircon model training notebook; (extensively) modified from Detectron2 training tutorial This Colab Notebook will allow users to train new models to detect and segment detrital zircon from RL images using Detectron2 and the training dataset provided in the colab_zirc_dims repo. It is set up to train a Mask RCNN mode...
github_jupyter
``` import torch import torch.nn as nn import numpy as np import matplotlib.pyplot as plt ``` # Pytorch: An automatic differentiation tool `Pytorch`를 활용하면 복잡한 함수의 미분을 손쉽게 + 효율적으로 계산할 수 있습니다! `Pytorch`를 활용해서 복잡한 심층 신경망을 훈련할 때, 오차함수에 대한 파라미터의 편미분치를 계산을 손쉽게 수행할수 있습니다! ## Pytorch 첫만남 우리에게 아래와 같은 간단한 선형식이 주어져있다고 생각해볼까요...
github_jupyter
# Callbacks and Multiple inputs ``` import pandas as pd import numpy as np %matplotlib inline import matplotlib.pyplot as plt from sklearn.preprocessing import scale from keras.optimizers import SGD from keras.layers import Dense, Input, concatenate, BatchNormalization from keras.callbacks import EarlyStopping, Tens...
github_jupyter
#Import Data ``` import numpy as np from sklearn.model_selection import GridSearchCV import matplotlib.pyplot as plt # load data import os from google.colab import drive drive.mount('/content/drive') filedir = './drive/My Drive/Final/CNN_data' with open(filedir + '/' + 'feature_extracted', 'rb') as f: X = np.load(f)...
github_jupyter
<table class="ee-notebook-buttons" align="left"> <td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Image/extract_value_to_points.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td> <td><a target="_blank"...
github_jupyter
# Fmriprep Today, many excellent general-purpose, open-source neuroimaging software packages exist: [SPM](https://www.fil.ion.ucl.ac.uk/spm/) (Matlab-based), [FSL](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki), [AFNI](https://afni.nimh.nih.gov/), and [Freesurfer](https://surfer.nmr.mgh.harvard.edu/) (with a shell interface)....
github_jupyter
# Pattern Mining ## Library ``` source("https://raw.githubusercontent.com/eogasawara/mylibrary/master/myPreprocessing.R") loadlibrary("arules") loadlibrary("arulesViz") loadlibrary("arulesSequences") data(AdultUCI) dim(AdultUCI) head(AdultUCI) ``` ## Removing attributes ``` AdultUCI$fnlwgt <- NULL AdultUCI$"educatio...
github_jupyter
<a href="https://colab.research.google.com/github/yohanesnuwara/reservoir-geomechanics/blob/master/delft%20course%20dr%20weijermars/stress_tensor.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` import numpy as np import matplotlib.pyplot as plt ...
github_jupyter
# AutoGluon Tabular with SageMaker [AutoGluon](https://github.com/awslabs/autogluon) automates machine learning tasks enabling you to easily achieve strong predictive performance in your applications. With just a few lines of code, you can train and deploy high-accuracy deep learning models on tabular, image, and text...
github_jupyter
# Homework - Random Walks (18 pts) ## Continuous random walk in three dimensions Write a program simulating a three-dimensional random walk in a continuous space. Let 1000 independent particles all start at random positions within a cube with corners at (0,0,0) and (1,1,1). At each time step each particle will move i...
github_jupyter
# Data preparation for tutorial This notebook contains the code to convert raw downloaded external data into a cleaned or simplified version for tutorial purposes. The raw data is expected to be in the `./raw` sub-directory (not included in the git repo). ``` %matplotlib inline import pandas as pd import geopandas...
github_jupyter
# Another attempt at MC Simulation on AHP/ANP The ideas are the following: 1. There is a class MCAnp that has a sim() method that will simulate any Prioritizer 2. MCAnp also has a sim_fill() function that does fills in the data needed for a single simulation ## Import needed libs ``` import pandas as pd import sys ...
github_jupyter
# Laboratorio 5 ## Datos: _European Union lesbian, gay, bisexual and transgender survey (2012)_ Link a los datos [aquí](https://www.kaggle.com/ruslankl/european-union-lgbt-survey-2012). ### Contexto La FRA (Agencia de Derechos Fundamentales) realizó una encuesta en línea para identificar cómo las personas lesbianas...
github_jupyter
# Talktorial 1 # Compound data acquisition (ChEMBL) #### Developed in the CADD seminars 2017 and 2018, AG Volkamer, Charité/FU Berlin Paula Junge and Svetlana Leng ## Aim of this talktorial We learn how to extract data from ChEMBL: * Find ligands which were tested on a certain target * Filter by available bioact...
github_jupyter
<a href="https://colab.research.google.com/github/BreakoutMentors/Data-Science-and-Machine-Learning/blob/main/machine_learning/lesson%204%20-%20ML%20Apps/Gradio/EMNIST_Gradio_Tutorial.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Making ML Appli...
github_jupyter
# Backprop Core Example: Text Summarisation Text summarisation takes a chunk of text, and extracts the key information. ``` # Set your API key to do inference on Backprop's platform # Leave as None to run locally api_key = None import backprop summarisation = backprop.Summarisation(api_key=api_key) # Change this up....
github_jupyter
``` %pylab --no-import-all %matplotlib inline import PyDSTool as pdt ab = np.loadtxt('birdsynth/test/ba_example_ab.dat') #ab = np.zeros((40000, 2)) ab[:, 0] += np.random.normal(0, 0.01, len(ab)) t_mom = np.linspace(0, len(ab)/44100, len(ab)) inputs = pdt.pointset_to_traj(pdt.Pointset(coorddict={'a': ab[:, 1], 'b':ab[:,...
github_jupyter
# Bayesian Hierarchical Modeling This jupyter notebook accompanies the Bayesian Hierarchical Modeling lecture(s) delivered by Stephen Feeney as part of David Hogg's [Computational Data Analysis class](http://dwh.gg/FlatironCDA). As part of the lecture(s) you will be asked to complete a number of tasks, some of which w...
github_jupyter
# Detecting Loops in Linked Lists In this notebook, you'll implement a function that detects if a loop exists in a linked list. The way we'll do this is by having two pointers, called "runners", moving through the list at different rates. Typically we have a "slow" runner which moves at one node per step and a "fast" ...
github_jupyter
# Neural Networks In the previous part of this exercise, you implemented multi-class logistic re gression to recognize handwritten digits. However, logistic regression cannot form more complex hypotheses as it is only a linear classifier.<br><br> In this part of the exercise, you will implement a neural network to rec...
github_jupyter
``` # This cell is added by sphinx-gallery !pip install mrsimulator --quiet %matplotlib inline import mrsimulator print(f'You are using mrsimulator v{mrsimulator.__version__}') ``` # ²⁹Si 1D MAS spinning sideband (CSA) After acquiring an NMR spectrum, we often require a least-squares analysis to determine site po...
github_jupyter
# Data Science Boot Camp ## Introduction to Pandas Part 1 * __Pandas__ is a Python package providing fast, flexible, and expressive data structures designed to work with *relational* or *labeled* data both.<br> <br> * It is a fundamental high-level building block for doing practical, real world data analysis in Pytho...
github_jupyter
``` # coding=utf-8 import numpy as np import pandas as pd import matplotlib.pyplot as plt from keras.utils import np_utils from keras.models import Sequential,load_model,save_model from keras.layers import Dense, Dropout, Activation,LeakyReLU from keras.optimizers import SGD, Adam from keras.callbacks import EarlyStopp...
github_jupyter
``` import torch import numpy as np import pandas as pd from sklearn.cluster import KMeans from statsmodels.discrete.discrete_model import Probit import patsy import matplotlib.pylab as plt import tqdm import itertools ax = np.newaxis ``` Make sure you have installed the pygfe package. You can simply call `pip instal...
github_jupyter
# GDP and life expectancy Richer countries can afford to invest more on healthcare, on work and road safety, and other measures that reduce mortality. On the other hand, richer countries may have less healthy lifestyles. Is there any relation between the wealth of a country and the life expectancy of its inhabitants? ...
github_jupyter
# American Gut Project example This notebook was created from a question we recieved from a user of MGnify. The question was: ``` I am attempting to retrieve some of the MGnify results from samples that are part of the American Gut Project based on sample location. However latitude and longitude do not appear to be...
github_jupyter
# Employee Attrition Prediction There is a class of problems that predict that some event happens after N years. Examples are employee attrition, hard drive failure, life expectancy, etc. Usually these kind of problems are considered simple problems and are the models have vairous degree of performance. Usually it is...
github_jupyter
``` # Configuration --- Change to your setup and preferences! CAFFE_ROOT = "~/caffe2" # What image do you want to test? Can be local or URL. # IMAGE_LOCATION = "images/cat.jpg" # IMAGE_LOCATION = "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/Whole-Lemon.jpg/1235px-Whole-Lemon.jpg" # IMAGE_LOCATION = "http...
github_jupyter
# LassoLars Regression with Robust Scaler This Code template is for the regression analysis using a simple LassoLars Regression. It is a lasso model implemented using the LARS algorithm and feature scaling using Robust Scaler in a Pipeline ### Required Packages ``` import warnings import numpy as np import pandas...
github_jupyter
# SLAM算法介绍 ## 1. 名词解释: ### 1.1 什么是SLAM? SLAM,即Simultaneous localization and mapping,中文可译作“同时定位与地图构建”。它描述的是这样一类过程:机器人在陌生环境中运动,通过处理各类传感器收集的机器人自身及环境信息,精确地获取对机器人自身位置的估计(即“定位”),再通过机器人自身位置确定周围环境特征的位置(即“建图”) 在SLAM过程中,机器人不断地在收集各类传感器信息,如激光雷达的点云、相机的图像、imu的信息、里程计的信息等,通过对这些不断变化的传感器的一系列分析计算,机器人会实时地得出自身行进的轨迹(比如一系列时刻的位姿),但得到的轨迹往往...
github_jupyter
``` import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt import gc plt.style.use('ggplot') dtypes = { 'ip' : 'uint32', 'app' : 'uint16', 'device' : 'uint16', 'os' : 'uint16', 'channel' : 'uint1...
github_jupyter
# 2章 微分積分 ## 2.1 関数 ``` # 必要ライブラリの宣言 %matplotlib inline import numpy as np import matplotlib.pyplot as plt # PDF出力用 from IPython.display import set_matplotlib_formats set_matplotlib_formats('png', 'pdf') def f(x): return x**2 +1 f(1) f(2) ``` ### 図2-2 点(x, f(x))のプロットとy=f(x)のグラフ ``` x = np.linspace(-3, 3, 601) y...
github_jupyter
## 1. Meet Dr. Ignaz Semmelweis <p><img style="float: left;margin:5px 20px 5px 1px" src="https://assets.datacamp.com/production/project_20/img/ignaz_semmelweis_1860.jpeg"></p> <!-- <img style="float: left;margin:5px 20px 5px 1px" src="https://assets.datacamp.com/production/project_20/datasets/ignaz_semmelweis_1860.jpeg...
github_jupyter
``` import os from glob import glob import pandas as pd import matplotlib.pyplot as plt import seaborn as sns ``` ## Cleaning Up (& Stats About It) - For each annotator: - How many annotation files? - How many txt files? - Number of empty .ann files - How many non-empty .ann files have a `Transcriptio...
github_jupyter
# ORF recognition by CNN Compare to ORF_CNN_101. Use 2-layer CNN. Run on Mac. ``` PC_SEQUENCES=20000 # how many protein-coding sequences NC_SEQUENCES=20000 # how many non-coding sequences PC_TESTS=1000 NC_TESTS=1000 BASES=1000 # how long is each sequence ALPHABET=4 # how many different letters ...
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
``` import pandas as pd import numpy as np #upload the csv file or #!git clone #and locate the csv and change location df=pd.read_csv("/content/T1.csv", engine='python') df.head() lst=df["Wind Speed (m/s)"] lst max(lst) min(lst) lst=list(df["Wind Speed (m/s)"]) # Python program to get average of a list def Average(...
github_jupyter
``` %matplotlib inline import matplotlib.pyplot as plt import sys,os sys.path.insert(0,'../') from ml_tools.descriptors import RawSoapInternal from ml_tools.models.KRR import KRR,TrainerCholesky,KRRFastCV from ml_tools.kernels import KernelPower,KernelSum from ml_tools.utils import get_mae,get_rmse,get_sup,get_spearman...
github_jupyter