text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
```
import requests
import urllib
import re
from bs4 import BeautifulSoup
from googlesearch import search
import pandas as pd
import numpy as np
from fake_useragent import UserAgent
import time
import pickle
#missing_mask = housing.isnull().any(axis=1)
# hi = housing.copy()
# the_columns = hi.columns
# not_missing = h... | github_jupyter |
# 第2章 確率空間
### 参考
+ [ギリシャ文字等の入力方法](https://qiita.com/alchemist/items/0ce850770d8cc3df0ab4)
+ [Pythonからはじめる数学入門](https://www.amazon.co.jp/dp/4873117682)
+ [確率論のσ加法族(ほんとは有限だけど)の自動生成を Sympy で書いてみた! - Qiita](https://qiita.com/ktsysd/items/97f75330f9492e727799)
+ [2019-10-17] tehen_さんのコメントをご覧ください.めっちゃ短くて洗練された **2.2.3 σ... | github_jupyter |
## Evaluating Passes Assignemnt
The chief scout of your club wants to find good passers of the ball. He is interested in pass success rate, but realises also that the pure success rate isn't a reliable stat for his purposes. If players always take the safest option then they will never create.
What he really wants to... | github_jupyter |
```
%matplotlib inline
import sys, platform, os
from matplotlib import pyplot as plt
import numpy as np
#uncomment this if you are running remotely and want to keep in synch with repo changes
#if platform.system()!='Windows':
# !cd $HOME/git/camb; git pull github master; git log -1
print('Using CAMB installed at '+ ... | github_jupyter |
# BugBot
--------
> BugBot is a open-source 2D bug robot simulator.
<table align="center">
<tr>
<td> <img src="images/demo1.gif" alt="Drawing" style="width: 250px;"/> </td>
<td> <img src="images/demo2.gif" alt="Drawing" style="width: 250px;"/> </td>
</tr>
</table>
The library is purely pythonic and easy ... | github_jupyter |
# Chapter 1: Elements of a Program
## Coding Exercises
The `...`'s in the code cells indicate where you need to fill in code snippets. The number of `...`'s within a code cell give you a rough idea of how many lines of code are needed to solve the task. You should not need to create any additional code cells for you... | github_jupyter |
# Project 4: Semantic Parsing
This project will have you implement a neural semantic parser for the GeoQA dataset of [Krishnamurthy and Kollar, 2013](http://rtw.ml.cmu.edu/tacl2013_lsp/tacl2013-krishnamurthy-kollar.pdf), which consists of a database of simple geographic facts about 10 US states, questions and answers ... | github_jupyter |
# Using doNd functions in comparison to Measurement context manager for performing measurements
This example notebook contains simple cases in which the `doNd` utilities of QCoDeS can be used to perform measurements. The `doNd` functions are generic wrappers of QCoDeS `Measurement` in zero, one, and two dimensions, as... | github_jupyter |
# Calculating band indices <img align="right" src="../Supplementary_data/dea_logo.jpg">
* **Acknowledgement**: This notebook was originally created by [Digital Earth Australia (DEA)](https://www.ga.gov.au/about/projects/geographic/digital-earth-australia) and has been modified for use in the EY Data Science Program
* ... | github_jupyter |
```
## run following in termminal (or in notebook) if needed to get packages to work
# !conda create -n tensorflow
# !source activate tensorflow
# !pip install jupyter notebook
# !jupyter-notebook
# !which pip
# !pip install tensorflow
# !pip install keras
# !pip install sklearn pandas numpy seaborn
import tensorflow
f... | github_jupyter |
```
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
```
# Unsupervised Learning Part 2 -- Clustering
Clustering is the task of gathering samples into groups of similar
samples according to some predefined similarity or distance (dissimilarity)
measure, such as the Euclidean distance.
<img width... | github_jupyter |
# Changes In The Daily Growth Rate
> Changes in the daily growth rate for select countries.
- comments: true
- author: Thomas Wiecki
- categories: [growth]
- image: images/covid-growth.png
- permalink: /growth-analysis/
```
#hide
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
... | github_jupyter |
## Deep learning for Metal distortion detection
```
!nvidia-smi
# Connect to drive folder to use the dataset (The dataset is publicily available)
from google.colab import drive
drive.mount('/content/drive')
%cd '/content/drive/MyDrive/Colab Notebooks/Fault detection'
!ls
from tensorflow.compat.v1 import ConfigProto
fr... | github_jupyter |
```
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
def split(data, test_size=20):
return data[:-test_size], data[-test_size:]
```
# Uogólniony model liniowy
Zbiór metod, który jest używany w regresji, w których można się spodziewać, że wartość docelowa jest liniową kombinacją wartości wejści... | 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 |
# Gaussian Mixture Model
This is tutorial demonstrates how to marginalize out discrete latent variables in Pyro through the motivating example of a mixture model. We'll focus on the mechanics of parallel enumeration, keeping the model simple by training a trivial 1-D Gaussian model on a tiny 5-point dataset. See also ... | github_jupyter |
## XmR Charts
Based on _Understanding Variation_ by Wheeler. An example process behavior chart is demonstrated below. Deviations above or below the dotted line indicate a signal which should be investigated.
```
%matplotlib inline
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import seab... | github_jupyter |
<a name="top"></a>Overview: Dictionaries & I/O
===
* [Dictionaries](#dictionaries)
* [Indexing](#dindex)
* [Iterating](#diteration)
* [Modifying](#dmodify)
* [Input/Output](#inputoutput)
* [Reading files](#reading)
* [Writing files](#writing)
* [User interaction](#userinteraction)
* [Exercise 07: Dictionar... | github_jupyter |
```
import scrapy
from selenium import webdriver
from fake_useragent import UserAgent
!scrapy startproject naverflight
```
#### 1. items.py 작성
```
!cat naverflight/naverflight/items.py
%%writefile naverflight/naverflight/items.py
import scrapy
class CrawlerItem(scrapy.Item):
now = scrapy.Field() # 크롤링 시각
fl... | github_jupyter |
Question 1: Scraping the Toronto post codes table from Wikipedia and getting it into a usable pandas format
Start with importing the libraries we'll need for the exercise
```
import pandas as pd
import numpy as np
from bs4 import BeautifulSoup as bs
import requests
```
Run the beautiful soup method on the url to get... | github_jupyter |
<a href="https://colab.research.google.com/github/IPL-UV/gaussflow/blob/master/docs/assets/demo/pytorch_nf_freia.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# PyTorch PlayGround
This is my notebook where I play around with all things PyTorch. I... | github_jupyter |
# lakeFS ❤️ Azure Synapse
## 👩🔬 So what are we going to do today?
1. Learn how to read/write data from a lakeFS branch
1. Create our own isolated branch and play around with said data
1. Make a terrible mistake but then promptly undo it
1. Cleanse some data, commit and tag it!
1. Prove that our tag is fully repro... | github_jupyter |
```
#default_exp simulations.rigidethanol
# export
import numpy as np
import math
def get_rigid_ethanol_data(xvar, noise = False):
n = 10000
natoms = 9
cor = 0
positions = np.zeros((n, natoms, 3))
positions[0, 0, :] = np.asarray([0., 0., 0.])
positions[0, 1, :] = np.asarray([-10., 0., np.... | github_jupyter |
[](https://colab.research.google.com/github/pySTEPS/pysteps/blob/master/examples/my_first_nowcast.ipynb)
# My first precipitation nowcast
In this example, we will use pysteps to compute and plot an extrapolation nowcast using the NSSL's Multi-R... | github_jupyter |
```
import pandas as pd
import numpy as np
import warnings
warnings.filterwarnings('ignore')
concentration_col = 'Concentration (uM)'
concentration_val = 33
ic50_col = 'PriA-SSB Dose response: IC50 (uM)'
median_inhib_col = 'Median % negative control (%)'
inhib_col = '% negative control (%)'
res_full_df = pd.read_csv(... | github_jupyter |
<a href="https://colab.research.google.com/github/pallavipandey99/Audio_Sentiment/blob/pallu/RAVDESS_data_segregation.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
from google.colab import drive
drive.mount('/gdrive', force_remount=True)
# Imp... | github_jupyter |
```
from IPython.core.display import display, HTML
import warnings
display(HTML("<style>.container { width:100% !important; }</style>"))
warnings.simplefilter("ignore")
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from scipy.stats import t
```
# Bayesian Optimization
This notebook demonstrat... | github_jupyter |
```
import pandas as pd
import warnings
import altair as alt
from urllib import request
import json
# fetch & enable a Spanish timeFormat locale.
with request.urlopen('https://raw.githubusercontent.com/d3/d3-time-format/master/locale/es-ES.json') as f:
es_time_format = json.load(f)
alt.renderers.set_embed_options(tim... | github_jupyter |
# INFO 3350/6350
## Lecture 28: Wrap-up
## To do
* Today is the last class meeting
* No lecture on Wednesday, nor section on Friday
* Exam/project due **Thursday, 5/19, at 11:59pm** via CMS
* If project (or non-default data for the exam), then submit data, too
* My office hours and TA office hours continue t... | github_jupyter |
<div style="width:1000 px">
<div style="float:right; width:98 px; height:98px;">
<img src="https://raw.githubusercontent.com/Unidata/MetPy/master/metpy/plots/_static/unidata_150x150.png" alt="Unidata Logo" style="height: 98px;">
</div>
<h1>NumPy Basics</h1>
<h3>Unidata Python Workshop</h3>
<div style="clear:both"></... | github_jupyter |
```
import os
import numpy as np
import pandas as pd
import seaborn as sns
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import StandardScaler
import statsmodels.api as sm
from statsmodels.sandbox.regression.predstd import wls_prediction_std
from statsmodels.formula.api import ols
from ... | github_jupyter |
### Note
View the [README.md](https://github.com/deeplearning4j/dl4j-examples/tree/overhaul_tutorials/tutorials/README.md) to learn about installing, setting up dependencies and importing notebooks in Zeppelin.
### Background
---
With deep learning, we can compose a deep neural network to suit the input data and its... | github_jupyter |
```
### neuroseq (sc)
diff_df = read.csv('/nfs/leia/research/stegle/dseaton/hipsci/singlecell_neuroseq/data/data_processed/pool1_17_D52/pool1_17_D52.scanpy.w_metadata.w_celltype.scanpy.obs_df.groupedby.donor_id-pool_id-time_point.diff_efficiency_by_cell_line.tsv',
sep='\t')
neuroseq_donor_set =diff... | github_jupyter |
#### SEIR model for 2019-nCov prediciton
SEIR model code:
from class_SEIR.py
choose three packages of initial parameters:
1. 2019-12-08
2. 2020-01-01
3. 2020-01-15
parameter optimization: Hyperopt
loss function: MSE
data for test: 2020-01-28 to 2020-01-31, with linear over-... | github_jupyter |
<a href="https://www.bigdatauniversity.com"><img src = "https://ibm.box.com/shared/static/cw2c7r3o20w9zn8gkecaeyjhgw3xdgbj.png" width = 400, align = "center"></a>
<h1 align=center><font size = 5> K-Means Clustering in R</font></h1>
## Introduction
There are many **clustering** algorithms out there. In this exercise,... | github_jupyter |
```
import numpy as np
np.dot()
np.linalg.norm([0.4, 0.3], ord=2)
np.linalg.norm([-0.15, 0.2])
np.linalg.linalg.dot([0.4, 0.3], [-0.15, 0.2])/(0.5*0.25)
a_point = [-1, -1]
normal = [3, 1]
P_dist = (np.dot(normal, a_point) - 1)/np.linalg.norm(normal)
P_dist
a_point - P_dist*np.array(normal)/np.linalg.norm(normal)
P_dis... | github_jupyter |
## Dependencies
```
import json, glob
from tweet_utility_scripts import *
from tweet_utility_preprocess_roberta_scripts_aux import *
# from tweet_utility_preprocess_scripts_word import *
from transformers import TFRobertaModel, RobertaConfig
from tokenizers import ByteLevelBPETokenizer
from tensorflow.keras import lay... | github_jupyter |
# Introduction
This notebook is aiming to broadly introduce all the major components of the toolsforexperiments suite.
the document is currently still work in progress, but already a decent starting point for a few things.
- Prerequisites:
- you should know the qcodes basics
- have a look at the 'dummy_measureme... | github_jupyter |
# This notebook was used to visualize the TURL training development
```
import numpy as np
import os.path
import matplotlib.pyplot as plt
%matplotlib inline
visualization_path = '../../../../visualizations'
```
## Plot for results turl_transposed Product model
```
# Step 1: default settings from TURL (5000-1500-5000... | github_jupyter |
```
import pandas as pd
import numpy as np
def read_goog_sp500_dataframe():
"""Returns a dataframe with the results for Google and S&P 500"""
# Point to where you've stored the CSV file on your local machine
googFile = 'data/GOOG.csv'
spFile = 'data/SP_500.csv'
goog = pd.read_csv(googFile, sep=",", useco... | github_jupyter |
# Session 1b:
## An introduction to Python
*Andreas Bjerre-Nielsen*
## Agenda
1. Python an overview:
- [The what, why and how](#Introducing-Python)
- [Some advice](#Help-and-advice)
- [Scripting](#The-python-shell-and-scripts) and [Jupyter](#The-Jupyter-framework)
2. The Python language
- [Fundamental data ... | github_jupyter |
# Ditto Detector
## Import Requirements
```
import requests
from multiprocessing import Pool
import pandas as pd
from tqdm import tqdm
import os
import numpy as np
import tensorflow as tf
import tensorflow_hub as hub
import nmslib
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
```
## Downloading Th... | github_jupyter |
# Animal Crossing Cleaning Script
```
# import libraries
import numpy as np
import pandas as pd
# set options
# changing the display settings
pd.set_option('display.max_columns', None)
pd.set_option('display.max_rows', None)
pd.set_option('display.max_colwidth', -1)
```
# 1. General Data
```
general_data = pd.rea... | github_jupyter |
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
get_ipython().magic('matplotlib inline')
sns.set(style='white', font_scale=0.9)
flatui = ["#9b59b6", "#3498db", "#95a5a6", "#e74c3c", "#34495e", "#2ecc71"]
sns.color_palette(flatui)
np.set_printoptions(threshold=np.nan)
... | github_jupyter |
```
import os
from pprint import pprint
import pandas as pd
import networkx as nx
import matplotlib.pyplot as plt
%matplotlib inline
plt.rcParams['figure.figsize'] = [10, 10]
from etl.configuration.target_api_config import TargetAPIConfig
from etl.transform.standard_model.graph import ConceptNode
from etl.transform.st... | github_jupyter |
# Denoising Autoencoders And Where To Find Them
Today we're going to train deep autoencoders and apply them to faces and similar images search.
Our new test subjects are human faces from the [lfw dataset](http://vis-www.cs.umass.edu/lfw/).
# Import stuff
```
import sys
sys.path.append("..")
import grading
import te... | github_jupyter |
# Compare censored and uncensored 6-month interval frequencies
Frequencies used by the fitness model need to be estimated at 6-month intervals (timepoints).
Instead of estimating frequencies at 1-month intervals and then interpolating frequencies at fitness model timepoints, we just estimate frequencies at the same 6-... | github_jupyter |
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Reducer/image_reductions.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a target="_blank" hre... | github_jupyter |
# 은전한닢 로드
https://github.com/SOMJANG/Mecab-ko-for-Google-Colab
```
! git clone https://github.com/SOMJANG/Mecab-ko-for-Google-Colab.git
%cd Mecab-ko-for-Google-Colab
!bash install_mecab-ko_on_colab190912.sh
from konlpy.tag import Mecab
mecab = Mecab()
mecab.morphs('동해물과 백두산이 마르고 닳도록')
```
# 패키지로드
```
!pip install ... | github_jupyter |
# 自動機械学習 Automated Machine Learning による品質管理モデリング & モデル解釈
製造プロセスから採取されたセンサーデータと検査結果のデータを用いて、品質管理モデルを構築します。
- Python SDK のインポート
- Azure ML service Workspace への接続
- Experiment の作成
- データの準備
- 自動機械学習の事前設定
- モデル学習と結果の確認
- モデル解釈
## 1. 事前準備
### Python SDK のインポート
Azure Machine Learning service の Python SDKをインポートします
```
impor... | github_jupyter |
<a href="https://colab.research.google.com/github/smlra-kjsce/ML-101/blob/master/Decision%20Trees.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Decision Trees
“The possible solutions to a given problem emerge as the leaves of a tree, each node r... | github_jupyter |
```
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
from albert import modeling
from albert import optimization
from albert import tokenization
import tensorflow as tf
import numpy as np
tokenizer = tokenization.FullTokenizer(
vocab_file='albert-tiny-2020-04-17/sp10m.cased.v10.vocab', do_lower_case=False,
... | github_jupyter |
# 稠密连接网络(DenseNet)
ResNet极大地改变了如何参数化深层网络中函数的观点。
*稠密连接网络* (DenseNet) :cite:`Huang.Liu.Van-Der-Maaten.ea.2017` 在某种程度上是 ResNet 的逻辑扩展。让我们先从数学上了解一下。
## 从ResNet到DenseNet
回想一下任意函数的泰勒展开式(Taylor expansion),它把这个函数分解成越来越高阶的项。在 $x$ 接近 0 时,
$$f(x) = f(0) + f'(0) x + \frac{f''(0)}{2!} x^2 + \frac{f'''(0)}{3!} x^3 + \ldots.$$
... | github_jupyter |
```
import logging
import os
import pandas as pd
import numpy as np
from sklearn.preprocessing import MinMaxScaler
from sklearn.model_selection import train_test_split
import matplotlib.pyplot as plt
import torch
from torch.utils.data import DataLoader, Dataset
import torch.distributed as dist
import torch.nn as nn
i... | github_jupyter |
# Using SageMaker Clarify and A2I to create transparent and reliable ML solutions
1. [Overview](#Overview)
2. [Prerequisites and Data](#Prerequisites-and-Data)
1. [Initialize SageMaker](#Initialize-SageMaker)
1. [Download data](#Download-data)
1. [Loading the data: Adult Dataset](#Loading-the-data:-Adult-D... | github_jupyter |
# `plot_correlation()`: analyze correlations
## Overview
The function `plot_correlation()` explores the correlation between columns in various ways and using multiple correlation metrics. The following describes the functionality of `plot_correlation()` for a given dataframe `df`.
1. `plot_correlation(df)`: plots co... | github_jupyter |
# Prioritised Replay Duelling Double Deep Q Learning - A simple ambulance dispatch point allocation model
## Reinforcement learning introduction
### RL involves:
* Trial and error search
* Receiving and maximising reward (often delayed)
* Linking state -> action -> reward
* Must be able to sense something of their en... | github_jupyter |
# COCO Reader
Reader operator that reads a COCO dataset (or subset of COCO), which consists of an annotation file and the images directory.
```
from nvidia.dali.pipeline import Pipeline
import nvidia.dali.ops as ops
import nvidia.dali.types as types
import numpy as np
from time import time
subset = "val"
file_root =... | github_jupyter |
```
from abc import ABC, abstractmethod
from functools import partial, wraps
import inspect
import numpy as np
from htools import debug_call
def debug(func=None, prefix='', arguments=True):
if not func:
if prefix: prefix += ' '
return partial(debug, prefix=prefix, arguments=arguments)
@wr... | github_jupyter |
```
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | github_jupyter |
<a href="https://blog.cloudcommander.net" target="_parent"><img src="https://raw.githubusercontent.com/cloud-commander/hexoblog/master/cloud.png" alt="Visit my Blog">
</a>
<br>
# <span style="font-family:Didot; font-size:3em;"> Cloud Commander </span>
<a href="https://colab.research.google.com/github/cloud-commander... | github_jupyter |
# Parameter Management
```
import torch
import torch.nn as nn
net = nn.Sequential(nn.Linear(20, 256),
nn.ReLU(),
nn.Linear(256, 10))
def init_weights(m):
if type(m) == nn.Linear:
# Initialize weight parameter by a normal distribition
# with a mean of 0 an... | github_jupyter |
```
from oddt.toolkits import ob
from joblib import delayed, Parallel
from functools import partial
import pandas as pd
from sklearn.ensemble import RandomForestRegressor
from matplotlib import pyplot as plt
from scipy import stats
import json
import numpy as np
class NumpyEncoder(json.JSONEncoder):
def default(s... | github_jupyter |
<a href="https://colab.research.google.com/github/KwonDoRyoung/AdvancedBasicEducationProgram/blob/main/abep08.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
1.activation function: sigmoid, relu, softmax
```
import torch
torch.cuda.is_available()
... | github_jupyter |
Validate the psf using a sample output of DM stack.
```
import matplotlib.pyplot as plt
%matplotlib inline
import os
import datetime
import time
import numpy as np
from clusters import data
from clusters.validation import get_filter_list, define_selection_filter, separate_star_gal,compute_elipticities
from mpl_toolkit... | github_jupyter |
<a href="https://colab.research.google.com/github/anjali0503/Anjali-Pandey/blob/master/DataAnalysis_bookseller.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
import numpy as np
import pandas as pd
import seaborn as sns
import plotly.graph_ob... | github_jupyter |
```
import pandas as pd
df = pd.read_csv('data/newyork_trimed.csv')
"""Run TCDF"""
%matplotlib inline
%run -i "runTCDF.py" --data data/newyork_trimed.csv --cuda --significance 0.8 --hidden_layers 2 --kernel_size 2 --log_interval 500 --epochs 1000 --plot --dilation_coefficient 2
causality = np.load('my_file.npy',allow_p... | github_jupyter |
# Problem Statement
Management of hyperglycemia in hospitalized patients has a significant bearing on outcome, in terms of both morbidity and mortality. However, there are few national assessments of diabetes care during hospitalization which could serve as a baseline for change. This analysis of a large clinical datab... | github_jupyter |
# Introduction to Python
## Data Persistence with Python
+ #### _file_
+ #### _pickle_
+ #### _dill_
+ #### _json_
```
import os
import pickle
import dill
```
## [_file/open_](https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files)
### open() returns a file object, and is most commonly use... | github_jupyter |
### Demonstration of GPU Accelerated SigMF Reader
Please note that our work with both SigMF readers and writers is focused on appropriately handling the data payload on GPU. This is similar to our usage of DPDK within the Aerial SDK and cuVNF.
```
import json
import numpy as np
import cupy as cp
import cusignal
cusi... | github_jupyter |
# Run model module locally
```
import math
import os
def convert_conv_layer_property_lists_to_string(property_list, prop_list_len):
"""Convert conv layer property list to string.
Args:
property_list: list, nested list of blocks of a conv layer property.
prop_list_len: int, length of list to p... | github_jupyter |
[Sascha Spors](https://orcid.org/0000-0001-7225-9992),
Professorship Signal Theory and Digital Signal Processing,
[Institute of Communications Engineering (INT)](https://www.int.uni-rostock.de/),
Faculty of Computer Science and Electrical Engineering (IEF),
[University of Rostock, Germany](https://www.uni-rostock.de/en... | github_jupyter |
This notebook illustrates how to train a NER model using the well known CONLL dataset, and sklearn_crfsuite library.
### Importing Necessary Libraries
```
#Make the necessary imports
from nltk.tag import pos_tag
from sklearn_crfsuite import CRF, metrics
from sklearn.metrics import make_scorer,confusion_matrix
from pp... | github_jupyter |
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import sklearn as sk
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score
# Генерируем уникальный seed
my_code = "Галеев"
seed_limit = 2 ** 32
my_seed = int.from_bytes(my_code.encode(), "little") % seed_limit
np.r... | github_jupyter |
# Gradient Boosting Machines
**Boosting**
Combine weak learners to build a strong model
How does this work?
Build a base model:
`Y = Model1(x) + Error1`
Models are abstractions. There will be error between predictions and actual
What is this error can be modeled ? Say:
`Error1 = Model2(x) + Error2`
If modeled... | github_jupyter |
$\Huge Code$ $\hspace{0.1cm}$ $\Huge to$ $\hspace{0.1cm}$ $\Huge simulate$ $\hspace{0.1cm}$ $\Huge CIB$ $\hspace{0.1cm}$ $\Huge maps$ $\Huge :$
# Modules :
```
%matplotlib inline
import healpy as hp
import matplotlib.pyplot as plt
from matplotlib import rc
rc('text', usetex=True)
from astropy.io import fits
import n... | github_jupyter |
# Assignment 4: Question duplicates
Welcome to the fourth assignment of course 3. In this assignment you will explore Siamese networks applied to natural language processing. You will further explore the fundamentals of Trax and you will be able to implement a more complicated structure using it. By completing this a... | github_jupyter |
<a href="https://colab.research.google.com/github/Tessellate-Imaging/monk_v1/blob/master/study_roadmaps/2_transfer_learning_roadmap/1_quick_prototyping_mode/2)%20Intro%20to%20quick%20prototyping%20using%20Pytorch%20backend.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="... | github_jupyter |
<p align="center">
<img src="https://github.com/GeostatsGuy/GeostatsPy/blob/master/TCG_color_logo.png?raw=true" width="220" height="240" />
</p>
## Data Analytics
### Bootstrap in Python
#### Michael Pyrcz, Associate Professor, University of Texas at Austin
##### [Twitter](https://twitter.com/geostatsguy) |... | github_jupyter |
## Introduction
----
In this assignment, you will convert your batch least squares solution to a recursive one! Recall that you have the following data:
| Current (A) | Voltage (V) |
|-------------|-------------|
| 0.2 | 1.23 |
| 0.3 | 1.38 |
| 0.4 | 2.06 |
| 0.5 | ... | github_jupyter |
```
%matplotlib inline
```
# Some advanced visualization tools
## Outline
Using plotting functions with **rich parameters**:
- display mode
- cut coords
Adding **layers** to the plot:
- add edges
- add contours
### Notes:
All options demonstrating here are from **`nilearn.plotting.displays.OrthoSlicer`**. A cla... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
import os
import sys
#sys.path.insert(0,"../")
import matplotsoccer as mps
import pandas as pd
from tqdm import tqdm
import matplotlib.pyplot as plt
# Load in actions from season 2015/16 of the Premier League
data = "../data/spadl-opta.h5"
games = pd.read_hdf(data,key="games")
e... | github_jupyter |
# Neural networks with PyTorch
Deep learning networks tend to be massive with dozens or hundreds of layers, that's where the term "deep" comes from. You can build one of these deep networks using only weight matrices as we did in the previous notebook, but in general it's very cumbersome and difficult to implement. Py... | github_jupyter |
```
import argparse
import os, sys
import os.path as osp
import torchvision
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from torchvision import transforms
import network, loss
from torch.utils.data import DataLoader
from data_list import ImageList, ImageList_idx
import random, pdb,... | github_jupyter |
# Third Time's the Charm? StyleGAN3 Inference Notebook
## Prepare Environment and Download Code
```
#@title Clone Repo and Install Ninja { display-mode: "form" }
import os
from pathlib import Path
os.chdir('/content')
CODE_DIR = 'stylegan3-editing'
## clone repo
!git clone https://github.com/yuval-alaluf/stylegan3-... | github_jupyter |
```
# Based off of the tensorflow transfer learning docs and examples
import numpy as np
import tensorflow as tf
import os
import keras
import matplotlib.pyplot as plt
import cv2
import DataReader
TRAIN_PATH = r"C:\Users\Ethan\Desktop\filter_cat_pictures\data\train"
VALIDATION_PATH = r"C:\Users\Ethan\Desktop\filter_c... | github_jupyter |
# Transforming and Combining Data
In the previous module you worked on a dataset that combined two different `World Health
Organization datasets: population and the number of deaths due to tuberculosis`.
They could be combined because they share a `common attribute: the countries`. This
week you will learn the techniq... | github_jupyter |
```
#All the imports
import time
import numpy as np
import pandas as pd
import nltk
import matplotlib.pyplot as plt
import multiprocessing
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize
from nltk.stem import WordNetLemmatizer
from sklearn.preprocessing import MinMaxScaler
from sklearn.feature... | github_jupyter |
# An Identiconizer generator implementation in Python
This small notebook implements a generator of small square icons like the ones in GitHub, as [implemented by identicon.js](https://github.com/stewartlord/identicon.js#identiconjs).
## The function
```
import random
import numpy as np
from matplotlib.colors import... | github_jupyter |
## Libraries
```
import pandas as pd
import numpy as np
import scipy.stats as stat
from math import sqrt
from mlgear.utils import show, display_columns
from surveyweights import normalize_weights
def margin_of_error(n=None, sd=None, p=None, type='proportion', interval_size=0.95):
z_lookup = {0.8: 1.28, 0.85: 1.... | github_jupyter |
# Installation
- Run these commands
- git clone https://github.com/Tessellate-Imaging/Monk_Object_Detection.git
- cd Monk_Object_Detection/1_gluoncv_finetune/installation
- Select the right requirements file and run
- cat requirements_cuda9.0.txt | xargs -n 1 -L 1 pip install
## D... | github_jupyter |
# Finding the Best Classifier
This notebook builds on 04.
Text data tends to be sparse and can result in a high number of features. I belive that the features are related (read: NOT independent), therefore a classification method like Naive Bayes does not seem like a good fit here.
I will try out 3 classifiers:
- XG... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
!pip install -q -U git+https://github.com/sbrugman/SDGym.git@v0.2.2-hw
!pip install -q -U ../../
from timeit import default_timer as timer
from functools import partial
from random import choices
import logging
import sdgym
from sdgym import load_dataset
from sdgym import benchmar... | github_jupyter |
```
import os
import re
import csv
import codecs
import pandas as pd
from datetime import datetime
def to_date(date_reference):
"""
Funcao que recebe o ano (YYYY), ano e mes (YYYYmm) ou ano, mes e dia (YYYYmmdd)
no tipo string e o transforma no tipo date.
Args:
date_reference(str): Ano, ano... | github_jupyter |
# Three-Side Market Basic

The ‘Three-Sided Market’ model is for platform business where the product being produced enables transactions between a service provider and service consumer. The reference example for this case is a ride sharing app such as Uber. In this case drivers wo... | 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 |
```
import pandas as pd
import plotly.express as px
import plotly.graph_objects as go
%run ../lib_data_operations.py
(df_etf_init, df_orders_init, df_incomes, df_prices_init, _) = load_data()
(df_orders, _) = preprocess_orders(df_orders_init)
df_prices = preprocess_prices(df_prices_init)
df_etf = preprocess_etf_master... | github_jupyter |
# Parameterisation
To parameterise a small molecule for simulation, import to right `Parameteriser`. Here we showcase using the `SolutionParameteriser`, which when given a SMILES string of the molecule to be simulated, it gives back a parameterised system with one copy of this molecule solvated in water. We use benzene... | github_jupyter |
# Recommendations with IBM
In this notebook, you will be putting your recommendation skills to use on real data from the IBM Watson Studio platform.
You may either submit your notebook through the workspace here, or you may work from your local machine and submit through the next page. Either way assure that your ... | github_jupyter |
# Aula 01
## Introdução
Olá seja bem-vinda ou bem-vindo ao **notebook da aula01**, nesta aula vamos realizar nossa primeira análise de dados e no final já seremos capazes de tirar algumas conclusões.
Nós estaremos desenvolvendo nosso projeto aqui no google colaboratory, assim podemos mesclar células contendo textos ... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.