text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
<a href="https://colab.research.google.com/github/jsedoc/ConceptorDebias/blob/ACL-cleanup/Debiasing_WE.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Debiasing WE with CN
# Set up debiasing tool
```
# Setup:
# Clone the code repository from htt... | github_jupyter |
# Better Retrieval via "Dense Passage Retrieval"
[](https://colab.research.google.com/github/deepset-ai/haystack/blob/master/tutorials/Tutorial6_Better_Retrieval_via_DPR.ipynb)
### Importance of Retrievers
The Retriever has a huge impact on th... | github_jupyter |
<a href="https://www.bigdatauniversity.com"><img src="https://ibm.box.com/shared/static/cw2c7r3o20w9zn8gkecaeyjhgw3xdgbj.png" width="400" align="center"></a>
<h1><center>K-Means Clustering</center></h1>
## Introduction
There are many models for **clustering** out there. In this notebook, we will be presenting the mo... | github_jupyter |
# GPSO optimisation example with saving the model output
So in the real world, usually you want to, say, optimise the parameters of the model AND save the model results, right? So after the optimisation you can check plethora of other stuff on your model.
Don't worry, we got your back!
```
# imports
import os
import ... | github_jupyter |
# Transformer Network
Welcome to Week 4's assignment, the last assignment of Course 5 of the Deep Learning Specialization! And congratulations on making it to the last assignment of the entire Deep Learning Specialization - you're almost done!
Ealier in the course, you've implemented sequential neural networks such a... | github_jupyter |
```
import numpy as np
import panel as pn
pn.extension()
```
Bokeh's property system defines the valid properties for all the different Bokeh models. Using ``jslink`` we can easily tie a widget value to Bokeh properties on another widget or plot. This example defines functions that generate a property editor for the ... | github_jupyter |
```
"""
Script of petro-inversion of gravity over TKC
Notes:
This version of the script uses data with less noises
but still invert with a higher assumed noise level.
This is equivalent to increase the chi-factor.
This has been needed in order to fit both geophysical
and petrophysical data set.
"""
# Script of petro... | github_jupyter |
# KubeFlow Pipeline: Github Issue Summarization using Tensor2Tensor
This notebook assumes that you have already set up a GKE cluster with CAIP Pipelines (Hosted KFP) installed, with the addition of a GPU-enabled node pool, as per this codelab: [g.co/codelabs/kubecon18](g.co/codelabs/kubecon18).
In this notebook, we w... | github_jupyter |
Python for Everyone!<br/>[Oregon Curriculum Network](http://4dsolutions.net/ocn/)
## Playing with Cyphers
### Suggested Andragogy
Playing with permutations (perms) fresh out of the box, with operator overloading already implemented, is best appreciated up front, with any dive into source code to follow.
The main po... | github_jupyter |
#Tolkien Elvish Translator#
The Keras blog has a post that implements a simple Encoder and Decoder to tranlate English-French Phrases
All Data scraped from: http://eldamo.org/
```
import numpy as np
import pandas as pd
import keras
def raw_data_reader(raw_file_path,out_path):
dat=open(raw_file_path,"r",encodi... | 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>
# $p_r$, the radial component of the momentum vector, up to... | github_jupyter |
### Hi kagglers,
### I wish to learn more since this is my first competition on kaggle.
### I decide to develop an LSTM model using Tensorflow for this time series data.
# 1. IMPORT PACKAGES AND LIBRARIES
```
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
import seaborn as sns
import ten... | github_jupyter |
```
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
import seaborn as sns
%matplotlib notebook
data = pd.read_csv('/tmp/dddd', sep=" ", header=None)
data.columns = ["L... | github_jupyter |
dizionario aggiornato, ma ricordarsi di inserire belgrado e zagabria
```
'''city_station = {
'Milano' : ['Milano Centrale', 'Milano Porta Garibaldi', 'Rho Rho Fiera','Milano San Cristoforo','Milano Lambrate'],
'Ginevra':['Ginevra','Ginevra Jonction'],
'Bruxelles': ['Bruxelles Midi', 'Bruxelles-National... | github_jupyter |
```
import pandas as pd
import numpy as np
pd.set_option('max_columns', 4, 'max_rows', 10, 'max_colwidth', 12)
```
### How to do it\...
```
fname = ['Paul', 'John', 'Richard', 'George']
lname = ['McCartney', 'Lennon', 'Starkey', 'Harrison']
birth = [1942, 1940, 1940, 1943]
people = {'first': fname, 'last': lname, 'bi... | github_jupyter |
### "What just happened???"
Here we take an existing modflow model and setup a very complex parameterization system for arrays and boundary conditions. All parameters are setup as multpliers: the original inputs from the modflow model are saved in separate files and during the forward run, they are multplied by the p... | github_jupyter |
<a href="https://colab.research.google.com/github/Iallen520/lhy_DL_Hw/blob/master/hw12_domain_adaptation.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Homework 12 - Transfer Learning (Domain Adversarial Training)
> Author: Arvin Liu (b05902127@... | github_jupyter |
Decision Trees
```
import random
def makeTerrainData(n_points=1000):
###############################################################################
### make the toy dataset
random.seed(42)
grade = [random.random() for ii in range(0,n_points)]
bumpy = [random.random() for ii in range(0,n_points)]
error... | github_jupyter |
<a href="https://colab.research.google.com/github/0x6f736f646f/computer-vision-ai-saturdays/blob/master/1stMonth%7BImageManipulation%7D/Notebook/Computer_Vision.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Computer Vision Example
## Start Codi... | github_jupyter |
<a href="https://colab.research.google.com/github/kyle-gao/GRSS_TrackMSD2021/blob/main/ChangeLabelMerging_OuterProduct.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
#2 Land Cover Label to 1 mixed change label
Suppose we have 2 landcover labels ... | github_jupyter |
# Creating an image mask
Calibration cannot compensate for every defect in a CCD. Some examples (a
non-exhaustive list):
+ Some hot pixels are not actually linear with exposure time.
+ Some pixels in the CCD may respond less to light than others in a way that
flat frames cannot compensate for.
+ There may be defects ... | github_jupyter |
<a href="https://colab.research.google.com/github/sagarsitap596/dsmp-pre-work/blob/master/PMC.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Python Mini Challenges
The most entertaining(and satisfying) way to improve your skills in a programming... | github_jupyter |
```
#@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 agreed to in writing, software
# distributed u... | github_jupyter |
# RadarCOVID-Report
## Data Extraction
```
import datetime
import json
import logging
import os
import shutil
import tempfile
import textwrap
import uuid
import matplotlib.pyplot as plt
import matplotlib.ticker
import numpy as np
import pandas as pd
import pycountry
import retry
import seaborn as sns
%matplotlib in... | github_jupyter |
```
import ray, logging, pickle
import pandas as pd
import numpy as np
from scipy.sparse import vstack, load_npz
import xml.etree.ElementTree as etree
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.linear_model import SGDClassifier, LogisticRegression
from sklearn.model_selection import cross_val... | github_jupyter |
# FMI Hirlam, MET Norway HARMONIE and NCEP GFS comparison demo
In this demo notebook we provide short comparison of using three different weather forecast models:
GFS -- http://data.planetos.com/datasets/noaa_gfs_pgrb2_global_forecast_recompute_0.25degree
HIRLAM -- http://data.planetos.com/datasets/fmi_hirlam_surface
... | github_jupyter |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
# Model Development with Custom Weights
This example shows how to retrain a model with custom weights and fine-tune the model with quantization, then deploy the model running on FPGA. Only Windows is supported. We use TensorFlo... | github_jupyter |
# A Showcase of Components in `halomod`
In this demo, we will showcase each and every one of the different models and components in `halomod`, to give a taste of its capabilities. Note that the plots generated in this notebook appear in THIS PAPER.
```
import halomod
import hmf
import numpy as np
print(f"Using halomo... | github_jupyter |
# Grid Search
Let's incorporate grid search into your modeling process. To start, include an import statement for `GridSearchCV` below.
```
import nltk
nltk.download(['punkt', 'wordnet', 'averaged_perceptron_tagger'])
import re
import numpy as np
import pandas as pd
from nltk.tokenize import word_tokenize
from nltk.st... | github_jupyter |

Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
# Configuration
_**Setting up your Azure Machine Learning services workspace and configuring your n... | github_jupyter |
# Machine Learning and Statistics for Physicists
Material for a [UC Irvine](https://uci.edu/) course offered by the [Department of Physics and Astronomy](https://www.physics.uci.edu/).
Content is maintained on [github](github.com/dkirkby/MachineLearningStatistics) and distributed under a [BSD3 license](https://openso... | github_jupyter |
```
import tarfile
import pathlib
import json
def read_duc_2004_(root_dir):
root_dir = pathlib.Path(root_dir)
docs_dir = root_dir / 'DUC2004_Summarization_Documents/duc2004_testdata/tasks1and2/duc2004_tasks1and2_docs/docs'
result_dir = root_dir / 'duc2004_results'
def get_duc_cluster_docs(cluster_id)... | github_jupyter |
```
import glob
import pandas as pd
import matplotlib.pyplot as plt
import contextily as ctx
# DHI libs
import mikeio
# ignore warnings (as they can get annoying with mikeio pre-release versions)
import warnings
warnings.filterwarnings("ignore")
# check out versions (using common version 0.12.2 here instead of dev ... | github_jupyter |
This notebook was prepared by [Donne Martin](http://donnemartin.com). Source and license info is on [GitHub](https://github.com/donnemartin/interactive-coding-challenges).
# Challenge Notebook
## Problem: Implement selection sort.
* [Constraints](#Constraints)
* [Test Cases](#Test-Cases)
* [Algorithm](#Algorithm)
* ... | github_jupyter |
```
import numpy as np
from keras.models import Model
from keras.layers import Input
from keras.layers.normalization import BatchNormalization
from keras import backend as K
import json
from collections import OrderedDict
def format_decimal(arr, places=8):
return [round(x * 10**places) / 10**places for x in arr]
DA... | github_jupyter |
# Incrementally saving sampling progress
### Can I save intermediate MCMC results for long runs, to avoid catastrophic loss of samples?
gully
February 2016
In this notebook I explore how to save intermediate results of the MCMC sampling to an intermediate `hdf5` file.
This scenario is described in `emcee` [Advanced... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
# Plot style
sns.set()
%pylab inline
pylab.rcParams['figure.figsize'] = (4, 4)
%%html
<style>
.pquote {
text-align: left;
margin: 40px 0 40px auto;
width: 70%;
font-size: 1.5em;
font-style: italic;
display: block;
line-height: 1.... | github_jupyter |
# Scrape HSI Constituents from official website
This script is used to construct a time series Hang Seng Index universe based on customized date list
Three steps are involved:
1. Scrape raw files from Hang Seng website (<a href="https://www.hsi.com.hk/eng/indexes/all-indexes/hsi">HSI Official Website</a>)
2. Clean t... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
from scipy import stats
import pandas as pd
import pymc3 as pm
import arviz as az
from IPython.display import IFrame
az.style.use('arviz-darkgrid')
%%HTML
<style>
.CodeMirror {
width: 100vw;
}
.container {
width: 99% !important;
}
.rendered_html {
font... | github_jupyter |
If you're opening this Notebook on colab, you will probably need to install 🤗 Transformers and 🤗 Datasets. Uncomment the following cell and run it.
```
#! pip install datasets transformers
```
If you're opening this notebook locally, make sure your environment has an install from the last version of those libraries... | github_jupyter |
# Grama: A Gammar of Model Analysis
*Author*: Zachary del Rosario (zdelrosario@olin.edu)
---
Grama[1] is a software implementation of a *grammar of model analysis*: A software package to facilitate analyzing physical models with quantified uncertainties. Its design is intended to support *teaching physical modeling... | github_jupyter |
```
from azureml.core import Workspace, Experiment
# Configure experiment
ws = Workspace.from_config()
exp = Experiment(workspace=ws, name="titanic-lgbm")
from azureml.core.compute import ComputeTarget, AmlCompute
from azureml.core.compute_target import ComputeTargetException
def get_aml_cluster(ws, cluster_name, vm_... | github_jupyter |
```
import numpy
from keras.datasets import imdb
from matplotlib import pyplot
(X_train, y_train), (X_test, y_test) = imdb.load_data()
X = numpy.concatenate((X_train, X_test), axis=0)
y = numpy.concatenate((y_train, y_test), axis=0)
print("Training data: ")
print(X.shape)
print(y.shape)
print("Classes: ")
print(nump... | github_jupyter |
```
import pandas as pd
from sklearn import datasets, model_selection, linear_model, neighbors
from evidently.dashboard import Dashboard
from evidently.pipeline.column_mapping import ColumnMapping
from evidently.dashboard.tabs import ProbClassificationPerformanceTab
from evidently.model_profile import Profile
from e... | github_jupyter |
References:
- https://github.com/openai/glide-text2im
- https://github.com/woctezuma/glide-text2im-colab
### Install package
```
%cd /content
!git clone https://github.com/openai/glide-text2im.git
%cd /content/glide-text2im
!pip install -q -e .
```
### Set-up functions, models and options
```
from PIL import Image
... | github_jupyter |
# Topic Detection with Latent Dirichlet Allocation
## Introduction
This tutorial explores the topic of latent Dirichlet Allocation (LDA), and how it can be used for topic detection. Topic modeling is an area of natural language processing to discover structure about text in docuemnts. Latent Dirichlet Allocation is on... | github_jupyter |
# CHEN 5595 Homework 1
This HW will help you review some ideas of linear algebra, revising basic identities of matrix calculus in part 1 (you can prove most of the identities by writing out the components or by using other identities), and eigenvector decomposition in Part 2. Finally in part 3 you will work through a ... | github_jupyter |
My installtion instructions: https://gitlab.com/-/snippets/2057703
Source: https://colab.research.google.com/github/Stable-Baselines-Team/rl-colab-notebooks/blob/master/monitor_training.ipynb
See also: https://stable-baselines.readthedocs.io/en/master/guide/examples.html#try-it-online-with-colab-notebooks
# Stable B... | github_jupyter |
# pYPKa_Z_TEF1
###Freezer ID
Strain#..: ?
Box......: ?
Position.: ?
Importing the [pydna](https://pypi.python.org/pypi/pydna/) package.
Pydna is [open source](https://github.com/BjornFJohansson/pydna), documentated [here](http://pydna.readthedocs.org/en/latest/) and has a support [forum](https://groups.goo... | github_jupyter |
#Optimize API
Suppose you've written an algorithm that's developed a signal (for example, a [Pipeline Factor](https://www.quantopian.com/tutorials/pipeline#lesson3)) that's predictive of future asset returns. You might think that the hard part is over, but you're still left with the daunting task of translating your s... | github_jupyter |
# Workshop 3 - Pytorch Model Creation
DeepNeuron summer training 2020.
Create a model using Pytorch which acts as a classifier for the CIFAR-10 dataset
**Before starting:**
1. **Don't edit this file, make a copy first:**
* Click on File -> Save a copy in Drive
2. Also do the following:
* Click on Runtime -> Cha... | github_jupyter |
## Tutorial showing how to create Parcels in Agulhas animated gif
This brief tutorial shows how to recreate the [animated gif](http://oceanparcels.org/animated-gifs/globcurrent_fullyseeded.gif) showing particles in the Agulhas region south of Africa.
We start with importing the relevant modules
```
from parcels impo... | github_jupyter |
# Ex 1-1 by Keras in Tensflow 2.0
Keras가 이제 텐서플로의 기본 상위 인터페이스가 되었다. 다시 말해 텐서플로에서 인공지능 코드 작성시 케라스를 기본적으로 사용할 수 있게 되었다는 말이다.
Keras를 텐서플로에서 사용하는 방법은 크게 두가지가 있다. 첫 번째는 오리지널 케라스 방식처럼 케라스를 주 인터페이스로 사용하고 텐서풀로를 백앤드 인공지능 엔진으로 사용하는 방법이다. 이를 텐서플로 2.0 기반 케라스 사용법(Keras in Tensorflow 2.0)이라 하자. 두 번째는 텐서플로로 인공지능 코드를 작성할 때 케라스를 이용하... | github_jupyter |
# Recommendations on GCP with TensorFlow and WALS with Cloud Composer
***
This lab is adapted from the original [solution](https://github.com/GoogleCloudPlatform/tensorflow-recommendation-wals) created by [lukmanr](https://github.com/GoogleCloudPlatform/tensorflow-recommendation-wals/commits?author=lukmanr)
This proje... | github_jupyter |
# Stanza: A Tutorial on the Python CoreNLP Interface


While the Stanza library implements accurate neural network modules for basic functionalities such as part-... | github_jupyter |
```
import torch
from basic_unet import UNet
from testnet import load_dataset
import matplotlib.pyplot as plt
from rise import RISE
from pathlib import Path
batch_size = 1
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
train_loader, test_loader = load_dataset(batch_size)
model = UNet(in_channel... | github_jupyter |
# Evaluate, optimize, and fit a classifier
## Background
Before we can begin making crop/non-crop predictions, we first need to evaluate, optimize, and fit a classifier. Because we are working with spatial data, and because the size of our training dataset is relatively small (by machine learning standards), we need... | github_jupyter |
# An introduction to geocoding
Geocoders are tools to which you pass in an address / place of interest and it gives back the coordinates of that place.
The **`arcgis.geocoding`** module provides types and functions for geocoding, batch geocoding and reverse geocoding.
```
from arcgis.gis import GIS
from arcgis impor... | github_jupyter |
# Generate Dataset
By Alejandro Vega & Ian Flores
### Loading the necessary dependencies
The installation of this dependencies and the Python version (3.6) here used is better suited if doing with Anaconda.
```
import pylab
import wave
import openpyxl
import yaml
import os
import shutil
import _pickle as cpl
import ... | github_jupyter |
<center><h1>Data 245: Project</h1>
<h2>NBA Prediction</h2>
<h3>Imports
```
import numpy as np, scipy as sc, pandas as pd, requests
import xml.etree.ElementTree as ET
from nba_api.stats.static import players
from nba_api.stats.endpoints import playercareerstats, playergamelog, playergamelogs, fantasywidget
from nb... | github_jupyter |
<h1>Table of Contents<span class="tocSkip"></span></h1>
<div class="toc"><ul class="toc-item"><li><span><a href="#Goal" data-toc-modified-id="Goal-1"><span class="toc-item-num">1 </span>Goal</a></span></li><li><span><a href="#Var" data-toc-modified-id="Var-2"><span class="toc-item-num">2 </span>Va... | github_jupyter |
## relation extraction 实践
> Tutorial作者:余海阳(yuhaiyang@zju.edu.cn)
在这个演示中,我们使用 `pretrain_language_model` 模型实现中文关系抽取。
希望在这个demo中帮助大家了解知识图谱构建过程中,三元组抽取构建的原理和常用方法。
本demo使用 `python3` 运⾏。
### 数据集
在这个示例中,我们采样了一些中文文本,抽取其中的三元组。
sentence|relation|head|tail
:---:|:---:|:---:|:---:
孔正锡在2005年以一部温馨的爱情电影《长腿叔叔》敲开电影界大门。|导演|长腿叔叔|孔正锡
《... | github_jupyter |
# StructN2V - 2D Example for Synthetic Membrane Data
Clean signal simulated/provided by [Alex Dibrov]("Alexandr Dibrov" <dibrov@mpi-cbg.de>)
```
# We import all our dependencies
from n2v.models import N2VConfig, N2V
import numpy as np
from csbdeep.utils import plot_history
from n2v.utils.n2v_utils import manipulate_v... | github_jupyter |
```
# Importing matplotlib, "in line"
%matplotlib inline
# Importing standard Qiskit libraries and configuring account
from qiskit import QuantumCircuit, execute, Aer, IBMQ, QuantumRegister, ClassicalRegister
from qiskit.compiler import transpile, assemble
from qiskit.tools.jupyter import *
from qiskit.visualization im... | github_jupyter |
## Dependencies
```
import warnings, json, re, math
from melanoma_utility_scripts import *
from kaggle_datasets import KaggleDatasets
from sklearn.preprocessing import LabelEncoder
from sklearn.model_selection import KFold, RandomizedSearchCV, GridSearchCV
from xgboost import XGBClassifier
SEED = 42
seed_everything(S... | github_jupyter |
# NumPy Arrays
python objects:
### 1 .high-level number objects : integers floating points
### 2 .containers: lists(costless insertion and append),dictionaries (fast lookup)
# NumPy Provides
1.extension package to python for multi-dimensional arrays
2.closer to hardware efficiency
3.designed for scientific comp... | github_jupyter |
# Simulating Grism Images with ```pyLINEAR```
This notebook demonstrates how to use ```pyLINEAR``` to simulate _simple_ grism images, here *simple* refers to the assumption that there is a single SED for a source. In future notebooks, I will show how this assumption can be addressed on small scales.
The command-l... | github_jupyter |
# Spark Train Logistic Regression
Train Logistic Regression classifier with Apache SparkML
```
%%bash
export version=`python --version |awk '{print $2}' |awk -F"." '{print $1$2}'`
echo $version
if [ $version == '36' ] || [ $version == '37' ]; then
echo 'Starting installation...'
pip3 install pyspark==2.4.8 ... | github_jupyter |
```
import pandas as pd
import numpy as np
import scipy
from sklearn.preprocessing import LabelEncoder
pd.options.display.max_columns = 1000
pd.options.display.max_rows = 1000
train = pd.read_csv('../data/CAX_MortgageModeling_Train.csv')
train.RESULT = train.RESULT.apply(lambda x: 1 if x == 'FUNDED' else 0)
train.RESU... | github_jupyter |
##### Copyright 2020 The TensorFlow Authors.
```
#@title Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | github_jupyter |
```
import numpy as np
import urdf2casadi.urdfparser as u2c
from urdf2casadi.geometry import plucker
from urdf_parser_py.urdf import URDF, Pose
from timeit import Timer, timeit, repeat
import casadi as cs
def median(lst):
n = len(lst)
if n < 1:
return None
if n % 2 == 1:
return sort... | github_jupyter |
# AAE364 Grand Prix
This notebook is a go-kart race simulation. You are tasked with designing the steering controller.

## Mathematical Model
You control:
* The steering angle of the wheel, $\delta$.
You are given:
* The error across the track direction, $e_x$, from the the reference ... | github_jupyter |
```
from itertools import chain
from collections import defaultdict, Counter
from IPython.core.interactiveshell import InteractiveShell
import numpy as np
import pandas as pd
import seaborn as sns
import plotly.express as px
import matplotlib.pyplot as plt
from sklearn.model_selection import GridSearchCV
from sklearn... | github_jupyter |
# IHA2 - Catching Pokemon

In this home assignment, you'll apply roughly the same principles we used when doing logistic regression on the Iris dataset, but on a new and very interesting dataset. We'll use the [Predict'em All](https://www.kaggle.co... | github_jupyter |
```
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import matplotlib
matplotlib.rcParams["figure.figsize"] = (15,10)
%matplotlib inline
from tqdm import tqdm_notebook #show iter progression
```
Llegim els `.csv` reduïts de cada _scraping_. Es troben dins la següent estruc... | github_jupyter |
<a href="https://colab.research.google.com/github/cateto/python4NLP/blob/main/cohesion_test/%5Bxlm_r_large_en_ko_nli_ststb%5Dsentence_transformer.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# sentence transformers 로딩
```
pip install -U sentence... | github_jupyter |
# 02 Retrieving GenBank Annotations
## Pyrewton module genbank, submodule get_genbank_annotations
This notebook describes the process of retrieving all protein annotations from GenBank files, referring to the
process of summarising the CAZymes within GenBank files, by identifying annotated coding sequences which are... | github_jupyter |
## Load libraries
```
from numpy import exp, array, random, dot
```
# Create the Class
```
class NeuralNetwork():
def __init__(self):
#seed the random number generator, so it generates the same number
# every time the program runs
random.seed(1)
# We model a single neuron... | github_jupyter |
This notebook can be run on mybinder: [](https://mybinder.org/v2/git/https%3A%2F%2Fgricad-gitlab.univ-grenoble-alpes.fr%2Fai-courses%2Fautonomous_systems_ml/HEAD?filepath=notebooks%2F5_principal_component_analysis)
# Olympic decathlon data
This example is a short introduc... | github_jupyter |
```
import glob
import shutil
import json
from pathlib import Path
from collections import Counter
import pandas as pd
import xml.etree.ElementTree as ET
import cv2
import numpy as np
from PIL import Image
```
# Labelmg to COCO format
Labelmg by default creates files in the **Pascal VOC** format. Most of the lates... | github_jupyter |
# Example of downsampling and interpolating data with `romSpline`
```
# Import necessary modules
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
# Set plot font and size
font = {'size':14}
plt.rc('font', **font)
# Uncomment next two lines if romSpline is not in your PYTHONPATH
# import sys
# sy... | github_jupyter |
___
<a href='http://www.pieriandata.com'><img src='../Pierian_Data_Logo.png'/></a>
___
<center><em>Copyright Pierian Data</em></center>
<center><em>For more information, visit us at <a href='http://www.pieriandata.com'>www.pieriandata.com</a></em></center>
# Time Series with Pandas Project Exercise
For this exercise... | github_jupyter |
## This notebook is to explore Scania Dataset, impute the missing values and No dimensionality reduction
**Yasmin Fathy <Fathy.Yasmin@gmail.com>**
**Latest Updates: 28/08/2020**
```
import pandas as pd
import numpy as np
import os
from pprint import pprint
# to display fully (non-truncated) data-frame
pd.set_option... | github_jupyter |
```
%matplotlib inline
import os
import sys
import netCDF4
import numpy as np
from geophys_utils import NetCDFPointUtils, get_spatial_ref_from_wkt
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import cartopy.io.img_tiles as cimgt
from pprint import pprint
#print(sys.version)
#pprint(dict(os.environ))
def r... | github_jupyter |
## Dependencies
```
# !pip install --quiet efficientnet
!pip install --quiet image-classifiers
import warnings, json, re, glob, math
from scripts_step_lr_schedulers import *
from melanoma_utility_scripts import *
from kaggle_datasets import KaggleDatasets
from sklearn.model_selection import KFold
import tensorflow.ker... | github_jupyter |
```
import pandas as pd
import numpy as np
import math
from fuzzywuzzy import fuzz
from difflib import SequenceMatcher
def similar(a, b):
return SequenceMatcher(None, a, b).ratio()
bess_tags = pd.read_csv("CBW_Bess_tags_final.csv")
```
### Persona Mapping
```
### Getting a list of unique persona
unique_personas =... | github_jupyter |
```
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib as mpl
import json
import numpy as np
with open('../Results/pf.json', 'r') as fp:
data = json.load(fp)
colors = [(39,64,139),(0,128,128),(31, 119, 180), (44, 160, 44), (152, 223, 138), (174, 199, 232),
(255, 127, 14), (255, 187, 120... | github_jupyter |
<a href="https://colab.research.google.com/github/cahya-wirawan/indonesian-speech-recognition/blob/main/XLSR_Wav2Vec2_for_Indonesian_Fine_Tuning.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# **Fine-tuning XLSR-Wav2Vec2 for Multi-Lingual ASR with... | github_jupyter |
```
import os
import pandas as pd
import numpy as np
from statsmodels.formula.api import ols
d2016 = pd.read_csv('despesa_2016_prefeitos.txt', sep = '\t',
encoding = "latin-1", # Precisei declarar o encoding
on_bad_lines='skip'# E precisei incluir essa opção para lidar com um e... | github_jupyter |
<a href="https://colab.research.google.com/github/MainakRepositor/ML-Algorithms/blob/master/14_Agglomerative_Clustering.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Agglomerative Clustering
<hr>
### The agglomerative clustering is the most ... | github_jupyter |
```
import django, sys, os
sys.path.append('/home/max/software/django-tmv/tmv_mcc-apsis/BasicBrowser')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "BasicBrowser.settings")
django.setup()
from scoping.models import *
from tmv_app.models import *
from sklearn.feature_extraction.text import CountVectorizer, TfidfVect... | github_jupyter |
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Visualization/image_color_ramp.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 |
```
from tensorflow.examples.tutorials.mnist import input_data
import tensorflow as tf
import matplotlib.pyplot as plt
import numpy as np
import math
%matplotlib inline
mnist = input_data.read_data_sets("./mnist/",one_hot=True)
print("Training set:",mnist.train.images.shape)
print("Training set labels:",mnist.train.l... | github_jupyter |
<b>Ejercicios con Python</b>
<ol>
<li>
Escribir una función de Python que encuentre los números primos en los primeros N números naturales.
<ul>
<li>N es el argumento de la función.</li>
<li>Llamar la función desde el código principal.</li>
</ul>
</li>
<li>
Escribir ... | github_jupyter |
```
# default_exp export
```
# export: nb2py
> Code that allows you to export a notebook (.ipynb) as a python script( .py) to a target folder.
nb2py will allow you to convert the notebook (.ipynb) where the function is executed to a python script.
The conversion applies these rules:
* The notebook will be automa... | github_jupyter |
```
import ngram
import pandas as pd
import numpy as np
import dill
import pickle
from helpers import *
from TfidfFeatureGenerator import *
from CountFeatureGenerator import *
from SvdFeatureGenerator import *
from Word2VecFeatureGenerator import *
from SentimentFeatureGenerator import *
read = True
if not rea... | github_jupyter |
# Detect data bias with Amazon SageMaker Clarify
## Amazon Science: _[How Clarify helps machine learning developers detect unintended bias](https://www.amazon.science/latest-news/how-clarify-helps-machine-learning-developers-detect-unintended-bias)_
[<img src="img/amazon_science_clarify.png" width="100%" align="le... | github_jupyter |
# Mixed Membership Stochastic Blockmodel (MMSBM)
```
import graspologic
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
```
Unlike [Stochastic Block Models (SBM)](./sbm.ipynb), Mixed Membership Stochastic Blockmodels (MMSBM) allow nodes to pertain to multiple communities when interacting with o... | github_jupyter |
# Jupyter like a pro
In this third notebook of the tutorial ["The World of Jupyter"](https://github.com/barbagroup/jupyter-tutorial/blob/master/World-of-Jupyter.md), we want to leave you with pro tips for using Jupyter in your future work.
## Importing libraries
First, a word on importing libraries. Previously, we u... | github_jupyter |
# The Mesh
The finite element mesh is a fundamental construct for Underworld modelling. It will generally determine your domain geometry, and the resolution of the finite element system. For parallel simulations, the mesh topology will also determine the domain decomposition for the problem. Currently `underworld` on... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.