text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
# Learning Objectives
- [ ] 3.1.1 Represent data in binary and hexadecimal forms.
- [ ] 3.1.2 Write programs to perform the conversion of positive integers between different number bases: denary, binary and hexadecimal forms; and display results.
- [ ] 3.2.1 Give examples of where or how Unicode is used.
- [ ] 3.2.2 ... | github_jupyter |
The following example illustrates the effect of scaling the regularization parameter when using Support Vector Machines for classification. For SVC classification, we are interested in a risk minimization for the equation:
 for handwritten Chinese (simplified) and Japanese. An OCR tutorial using the Latin alphabet is available in [notebook 208](../208-optical-character-recognition/208-optical-character-recognition.ipynb). This model is... | github_jupyter |
```
import numpy as np
import pandas as pd
import math
import sklearn
from sklearn.cross_validation import cross_val_score
from subprocess import check_output
from sklearn.metrics import make_scorer, mean_squared_error
from sklearn.cross_validation import train_test_split
from sklearn.preprocessing import normalize
... | github_jupyter |
# Introduction
IPython, pandas and matplotlib have a number of useful options you can use to make it easier to view and format your data. This notebook collects a bunch of them in one place. I hope this will be a useful reference.
The original blog posting is on http://pbpython.com/ipython-pandas-display-tips.html
#... | github_jupyter |
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Filter/filter_eq.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a target="_blank" href="https... | github_jupyter |
### Data Loaders Pytorch Class
```
import torch
import torchvision
from torch.utils.data import DataLoader, Dataset
import numpy as np
import pandas as pd
```
> **Point** - gradient computation is not efficient for the whole dataset. So the data must be splited in `so` called `batches`
> **Training Loop** -with the ... | github_jupyter |
```
import pandas as pd
import numpy as np
from scipy.stats import norm
# 입력으로 주어지는 데이터는 모두 numpy array라고 가정하고 구현
# 입력 특성의 개수에 관계없이 동작하도록 구현
class MyGaussianNB:
def __init__(self):
self.distXy0 = []
self.distXy1 = []
self.prior0 = 0
self.prior1 = 0
self.m0 = 0 # 훈련 데이터에서 ... | github_jupyter |
```
import spiceypy as spice
import pvl
import os
import re
import subprocess
from ale import util
from itertools import chain
import io
import networkx as nx
# These should be provided when running this script.
cube = "/home/acpaquette/B10_013341_1010_XN_79S172W.cub"
output_dir = "/Users/jmapel/ale/nb_test" # Outpu... | github_jupyter |
```
import os
import tensorflow as tf
from keras import backend as K
os.environ["CUDA_VISIBLE_DEVICES"] = '3'
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
sess = tf.Session(config=config)
K.set_session(sess)
from keras.applications import Xception
from keras.layers import Dense, Flatten, GlobalAver... | github_jupyter |
# What is the % odorant vapor in the air stream, as a function of odorant properties, jar dimensions, and air flow rate?
A cynlindrical jar with cross-sectional area $A$ and height $h$ contains a volume $V_{sol}$ of odorant solution (diluted in a solvent with zero vapor pressure), and the remaining volume, above the s... | github_jupyter |
# The _fast & parallel_ Virtual Brain
## A fast implementation of The Virtual Brain brain network simulator
* written in C using a host of optimizations that make brain simulation reeeallllyy fast
* parallelized (multithreading)
* containerized (can be conveniently run e.g. through Docker, Shifter or Singularity, with... | github_jupyter |
# COMP 135 day01: Intro to Numerical Python
A Python-based version of the "Ch 2 lab" from James et al.'s "Introduction to Statistical Learning" textbook
Based on original notebook: https://nbviewer.jupyter.org/github/emredjan/ISL-python/blob/master/labs/lab_02.3_introduction.ipynb
# What to Do
Students should run t... | github_jupyter |
<center>
<img src="https://drive.google.com/uc?id=12fkBBarn5tldtws1MLZ8aZ_Tw87kPnBp"/>
<h1> City of Rochester - Business Analytics Project </h1>
<h2> Xiaodan Ding, Pin Li, Jiawen Liang, Ruiling Shen, Chenxi Tao </h2>
</center>
# 1. Overview
In the codebook, we walk you through the data cleaning, data augmentation, an... | github_jupyter |
## Cycle GAN in PyTorch
```
%load_ext autoreload
%matplotlib inline
%autoreload 2
from IPython import display
from utils import Logger
import torch
from torch import nn, optim
from torch.autograd.variable import Variable
from torchvision import transforms, datasets
DATA_FOLDER = './torch_data/CycleGAN'
import os
i... | github_jupyter |
```
import pandas as pd
import numpy as np
import random as rd
import matplotlib.pyplot as plt
from IPython.core.interactiveshell import InteractiveShell # 显示所有输出
InteractiveShell.ast_node_interactivity = "all"
data = pd.read_csv("films.csv")
# X = data[["Category","Time"]]
from sklearn import preprocessing
le = pre... | github_jupyter |
[musicinformationretrieval.com](https://musicinformationretrieval.com)
Jupyter Basics
=======================
You are looking at a **Jupyter Notebook**, an interactive Python shell inside of a web browser. With it, you can run individual Python commands and immediately view their output. It's basically like the Matl... | github_jupyter |
```
!wget = 'https://raw.githubusercontent.com/Doodies/Github-Stars-Predictor/master/PreprocessData.csv'
!ls -lh
```
# Importing required modules
```
!pip install catboost ipywidgets
!pip install xgboost
!pip install keras
# Handle table-like data and matrices
import numpy as np
import pandas as pd
# Visualisation
i... | github_jupyter |
# Initialization
```
import os
import itertools
import sys
from math import factorial as fac
sys.path.append("D:/TU_Delft/Msc_Building_Technology/Semester_3/Graduation/Aditya_Graduation_Project_BT/06_Libraries")
import topogenesis as tg
import pyvista as pv
import trimesh as tm
import numpy as np
import networkx as nx... | github_jupyter |
```
import numpy as np
from sklearn.datasets import fetch_openml
from sklearn.utils.extmath import softmax
import matplotlib.pyplot as plt
from matplotlib import pyplot
from sklearn import metrics
from sklearn.metrics import accuracy_score
from sklearn.metrics import confusion_matrix
from mpl_toolkits.axes_grid1 import... | github_jupyter |
```
import sys, os, time
from solc import compile_source, compile_files, link_code
from ethjsonrpc import EthJsonRpc
print("Using environment in "+sys.prefix)
print("Python version "+sys.version)
# Initiate connection to ethereum node
# Requires a node running with an RPC connection available at port 8545
c = EthJso... | github_jupyter |
<a href="https://colab.research.google.com/github/harry418/EmotionRecog/blob/master/training/training_4.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('/content/gdrive',force_remount=True)
```
# Impor... | github_jupyter |
```
def displayList (myList):
print(myList)
myList = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
displayList(myList)
input('Please enter a value: ')
result = input('Please enter a number: ')
type(result)
int(result)
result = int(input("Please enter a number: "))
type(result)
result = int(input("Please enter a number: "))
de... | github_jupyter |
Adapted from https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html
# Prepare Training Script
In this notebook, we create the training script of the Mask R-CNN model that will be tuned. We first define the custom dataset class and the model that finetunes a pre-trained Mask R-CNN for our dataset. The tr... | github_jupyter |
# A deep dive into our NLP solution
In this notebook we will see how does our model react in concrete situation, for that we will use only one PDF and some raw text.\
Feel free to play with our model ;)
First of all, let's import our packages:
- `os`: Various interfaces for the operating system
- `sys`: System specif... | github_jupyter |
<img src="http://hilpisch.com/tpq_logo.png" alt="The Python Quants" width="35%" align="right" border="0"><br>
# Python for Finance (2nd ed.)
**Mastering Data-Driven Finance**
© Dr. Yves J. Hilpisch | The Python Quants GmbH
<img src="http://hilpisch.com/images/py4fi_2nd_shadow.png" width="300px" align="left">
... | 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 |
```
%matplotlib inline
import matplotlib.pyplot as plt
import numpy
import requests
import urllib3
```
## Log scales with Numpy
En el siguiente ejemplo, compararemos la frecuencia de palabras en dos fragmentos: uno del Martín Fierro y uno de Don Quijote de la Mancha. Primero leeremos los textos y obtendremos las pala... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
import os, math
import numpy as np, pandas as pd
import matplotlib.pyplot as plt, seaborn as sns
from pandas_summary import DataFrameSummary
from tqdm import tqdm, tqdm_notebook
from pathlib import Path
pd.set_opti... | github_jupyter |
# Session 10: Unsupervised clustering with K-means
------------------------------------------------------
Introduction to Data Science & Machine Learning
*Pablo M. Olmos olmos@tsc.uc3m.es*
------------------------------------------------------
# Unsupervised Learning
In this notebook, we will study a particularly ... | github_jupyter |
## Import Libraries and Connect to STK/ODTK
```
# Import Python Libraries
# !pip install "C:\Program Files\AGI\STK 12\bin\AgPythonAPI\agi.stk12-12.2.0-py3-none-any.whl"
# !pip install opencv-python
import numpy as np
import pandas as pd
import cv2
import os
import shutil
import imageio
import matplotlib.image as mpimg... | github_jupyter |
```
import silence_tensorflow.auto
import time
import numpy as np
import tensorflow as tf
import tensorflow.compat.v1 as tf_v1
from segmenter.slicer import Slice
start_time = time.time()
class ML:
model = ''
def __init__(self, model, vocabulary,input_dir,image,classification,seq):
self.model=model... | github_jupyter |
# 简单理解 RHF 含频极化率及其与 TD-HF 间的关系
> 创建日期:2020-01-02
>
> 最后修改:2020-06-10
含频极化率在非线性光学中有所应用。这里指的频率是入射激发光频率,而非分子振动频率。含频极化率英文是 Frequency-Dependent Polarizability,也有时使用动态 Dynamic 替代含频 Frequency-Dependent;相对地,没有入射激发光给出的极化率称为静态 Static 极化率。
但这也只是道听途说。对于我来讲更直接的意义会是,含频极化率对坐标的一阶导数可以用于计算含频 Raman 光谱。
写这篇文档一开始的原因是,曾经在尝试计算简单的 SERS 光谱... | github_jupyter |
Consider using Cairo for plotting...
```
import math
import cairo # see https://www.cairographics.org/samples/
from IPython.display import Image
if (cairo.HAS_SVG_SURFACE and cairo.HAS_PNG_FUNCTIONS):
print ('Cairo: {c}'.format(c=cairo.CAIRO_VERSION_STRING))
with cairo.SVGSurface("./img/example.svg", 100, 100) as ... | github_jupyter |
### In this notebook we will compile interesting questions that we can answer using the data from this table.
### We can refer to data_exploration.ipynb to figure out what kind of information we already have.
1. On an average, how often do people order from Instacart?
2. What product was ordered most often?
3. At what... | github_jupyter |
## 1. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
```
def lengthOfLongestSubstring(s):
stack = []
maxL = 0
for st in s:
if st in stack:
stack = stack[stack.index(st)+1:]
stac... | github_jupyter |
<a href="https://colab.research.google.com/github/MIT-LCP/sccm-datathon/blob/master/01_explore_patients.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# eICU Collaborative Research Database
# Notebook 1: Exploring the patient table
The aim of thi... | github_jupyter |
#### Dataset
```
import numpy as np
np.random.seed(42)
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.datasets import load_breast_cancer
dataset = load_breast_cancer()
print(f"ClassNames: {dataset.target_names}")
print(f"DESCR:\n{dataset.DESCR}")
x = dataset.data
y = dataset.target
print(f"x-shape:... | github_jupyter |
```
import os, sys, argparse
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname('..'))))
from torchvision.models import resnet50
from thop import profile
import torch
import torch.nn as nn
from models import TSN
from opts import parser
train_path="data/something_train.txt"
val_path="data/something_val.txt"... | github_jupyter |
```
import torch
import torchvision
from torch import nn
from torch.utils.data import DataLoader
from torchvision import transforms
from torchvision.datasets import MNIST
from matplotlib import pyplot as plt
import torch.nn.functional as F
from torchflare.experiments import Experiment, ModelConfig
%load_ext nb_black
tr... | github_jupyter |
# Artificial Intelligence Nanodegree
## Machine Translation Project
In this notebook, sections that end with **'(IMPLEMENTATION)'** in the header indicate that the following blocks of code will require additional functionality which you must provide. Please be sure to read the instructions carefully!
## Introduction
I... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
S, P = np.load("../data/dataset.npy")
molecules = np.load("../data/molecules.npy")
def extract_triu(A):
"""Extracts the upper triangular part of the matrix.
Input can be matrix, will be reshaped if it is not.
"""
return A.res... | 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 |
# Load the Dataset
```
import numpy as np
import matplotlib.pyplot as plt
import warnings
from matplotlib.colors import ListedColormap
%matplotlib inline
warnings.filterwarnings('ignore')
# for plotting
cmap2 = ListedColormap(['r', 'k'])
cmap4 = ListedColormap(['k', 'r', 'g', 'b'])
plt.rc("font",family="sans-serif",s... | github_jupyter |
```
#Import Library :
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from tensorflow.keras.preprocessing import image
from tensorflow.keras.optimizers import RMSprop
from keras.optimizers import adam_v2
from keras import models
from keras import layers
import tensorflow as tf
import matplotlib.... | github_jupyter |
# 新闻数据采集器(国内板块)
## 吴泓骏 [拂晓工作室](https://github.com/Errrneist/Alchemist)
* 此程序将对指定股票数据进行收集并整理
* 同时创建SFrame友好的CSV文件以及对数据进行清洗
# 参考资料
* [1] [Basics of SFrame](https://apple.github.io/turicreate/docs/api/generated/turicreate.SFrame.html#turicreate.SFrame)
* [2] [Remove Multiple Substring from String](https://stackoverflow.c... | github_jupyter |
```
from utils.utils import load_model
from prompts.generic_prompt import load_prefix, generate_response_interactive, select_prompt_interactive
from prompts.generic_prompt_parser import load_prefix as load_prefix_parse
from prompts.persona_chat import convert_sample_to_shot_persona
from prompts.persona_chat_memory impo... | github_jupyter |
```
# Import the numpy package under the name "np"
import numpy as np
# Print the numpy version and the configuration
print(np.__version__)
print(np.show_config())
# Create a null vector of size 10
np.zeros(10)
# How to find the memory size of any array
arr = np.arange(10)
arr.size * arr.itemsize # Number of elements *... | github_jupyter |
[this doc on github](https://github.com/dotnet/interactive/tree/master/samples/notebooks/csharp/Samples)
# Machine Learning over House Prices with ML.NET
```
#r "nuget:Microsoft.ML,1.4.0"
#r "nuget:Microsoft.ML.AutoML,0.16.0"
#r "nuget:Microsoft.Data.Analysis,0.1.0"
using Microsoft.Data.Analysis;
using XPlot.Plotly;
... | github_jupyter |
#### Copyright 2017 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 writin... | github_jupyter |
## Data Pre-processing and Exploratory Data Analysis
```
##import the libraries
import numpy as np
import pandas as pd
#Load the Data
patient_data=pd.read_csv("Health_Data.csv")
##use the head function to get a glimpse data
patient_data.head()
mydata=pd.read_csv("Health_Data.csv")
X=mydata.iloc[:,1:9]
y=mydata.iloc[... | github_jupyter |
```
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import pandas as pd
import pickle as pkl
from pathlib import Path
import am_sim as ams
from utilities.analyze_inference import best_par_in_df
# load inferred parameter set
inference_path = Path('inference_results/t_final_search_history.cs... | github_jupyter |
# Seaborn Workshop
Seaborn is a Python data visualization library based on matplotlib.
It provides a high-level interface for drawing attractive and informative statistical graphics.
___
Installing Seaborn (conda installation recommend)
https://seaborn.pydata.org/installing.html
___
```
import numpy as np
import... | github_jupyter |
```
import tensorflow as tf
import numpy as np
import pickle as pkl
import random
from Data_converter import convert_to_one_hot
```
Initialize parameters of the system
--------------------------
```
POOL_SIZE = 5
INPUT_CHANNEL = 220
OUTPUT_CLASSES = 16
KERNEL_1 = 21
FILTERS_1 = 20
HIDDEN_LAYER_1 = 100
```
Loading da... | github_jupyter |
# [译]音乐信息获取(MIR)之学习对音频的节拍追踪(Beat Tracking)
原文出处:[audio-beat-tracking-for-music-information-retrieval](https://www.analyticsvidhya.com/blog/2018/02/audio-beat-tracking-for-music-information-retrieval/)
本文在忠实原文的基础上补充了部分内容(如绘图,参考文献等)
## 介绍
音乐无处不在。当我们听到那种打动人心的音乐,我们就会整个沉浸在其中。同时,我们随着听到的节奏而打着拍子。你也一定注意到过你的腿不由自主的随着音乐的节拍而抖动。在这... | github_jupyter |
# Paraphrase
<div class="alert alert-info">
This tutorial is available as an IPython notebook at [Malaya/example/paraphrase](https://github.com/huseinzol05/Malaya/tree/master/example/paraphrase).
</div>
```
%%time
import malaya
from pprint import pprint
```
### List available T5 models
```
malaya.paraphrase.... | github_jupyter |
```
import PyPDF2
import re
from nltk.stem import PorterStemmer
from sklearn.feature_extraction.text import CountVectorizer
import pandas as pd
from sklearn.metrics import silhouette_score
from sklearn.cluster import KMeans
import matplotlib.pyplot as plt
from sklearn.preprocessing import normalize
import os,json
impor... | github_jupyter |
# CNTK 103: Part A - MNIST Data Loader
This tutorial is targeted to individuals who are new to CNTK and to machine learning. We assume you have completed or are familiar with CNTK 101 and 102. In this tutorial, we will download and pre-process the MNIST digit images to be used for building different models to recogniz... | github_jupyter |
```
sc
spark = SparkSession.builder.appName('summerRain').getOrCreate()
from io import StringIO
import itertools
import numpy as np
import pandas as pd
from pandas import Series
from pandas import concat
from pandas.plotting import lag_plot
from pandas.plotting import autocorrelation_plot
import statsmodels.api as sm
f... | github_jupyter |
# データサイエンス100本ノック(構造化データ加工編) - R
## はじめに
- 初めに以下のセルを実行してください
- 必要なライブラリのインポートとデータベース(PostgreSQL)からのデータ読み込みを行います
- 利用が想定されるライブラリは以下セルでインポートしています
- その他利用したいライブラリがあればinstall.packages()で適宜インストールしてください
- 名前、住所等はダミーデータであり、実在するものではありません
```
require('RPostgreSQL')
require('tidyr')
require('dplyr')
require('stringr')
require(... | github_jupyter |
<a href="https://colab.research.google.com/github/Kristina140699/Practice_100Codes/blob/main/Python100Codes/Part_2.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# **100 Codes in Python Programing Part 2**
# **This file contains 26-50 codes**
# Co... | github_jupyter |

# Activity 4: Grapevines in a warming world
___
In the last lesson, you learned about pandas, dataframes, and seaborn. You learned that the harvest dates of grapevines in Europe have been recorded for centuries and you read the data in to Jupyter to analyz... | 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 |
Copyright (c) 2019 [윤기태]
https://github.com/yoonkt200/python-data-analysis
[MIT License](https://github.com/yoonkt200/python-data-analysis/blob/master/LICENSE.txt)
# (가제) 파이썬 데이터 분석
-----
# 3.1) 국내 프로야구 연봉 예측
### 바로가기
- [<Step1. 탐색> 프로야구 연봉 데이터 살펴보기](#<Step1.-탐색>-프로야구-연봉-데이터-살펴보기)
- [프로야구 연봉 데이터셋의 기본 정보]
... | github_jupyter |
# About: Notebooks for Hadoop Clusters README
Literate Computing for Reproducible Infrastructure: インフラ運用をJupyter + Ansibleでおこなう際のお手本Notebookです。(Hadoop版)
このリポジトリでは、HDP(Hortonworks Data Platform, https://jp.hortonworks.com/products/data-center/hdp/ )を利用してHadoopクラスタを構築し、運用するためのNotebook例を紹介しています。
**なお、これらのNotebookはNIIクラ... | github_jupyter |
```
import pandas as pd
import numpy as np
from sklearn import preprocessing
from sklearn.linear_model import RidgeCV
from sklearn.metrics import fbeta_score
from sklearn import linear_model
cancerFrame = pd.read_csv("../DataSet/CancerDataSet.txt", delimiter="\t")
cancerFrame.head()
```
# On garde pour X les variabl... | github_jupyter |
# 3. Train-Predict Mix3model
## Result:
- Kaggle score:
## Tensorboard
- Input at command: tensorboard --logdir=./log
- Input at browser: http://127.0.0.1:6006
## Reference
- https://www.kaggle.com/codename007/a-very-extensive-landmark-exploratory-analysis
## Import PKGs
```
import numpy as np
import pandas as pd... | github_jupyter |
# 1장. 머신러닝 개요
*아래 링크를 통해 이 노트북을 주피터 노트북 뷰어(nbviewer.org)로 보거나 구글 코랩(colab.research.google.com)에서 실행할 수 있습니다.*
<table class="tfo-notebook-buttons" align="left">
<td>
<a target="_blank" href="https://nbviewer.org/github/rickiepark/handson-gb/blob/main/Chapter01/Gradient_Boosting_in_Machine_Learning.ipynb"><img sr... | github_jupyter |
# Introduction to Python programming.
### [Gerard Gorman](http://www.imperial.ac.uk/people/g.gorman), [Christian Jacobs](http://christianjacobs.uk/)
### Updated for MPECDT by [David Ham](http://www.imperial.ac.uk/people/david.ham)
# Lecture 1: Computing with formulas
## Learning objectives:
* Execute a Python stat... | github_jupyter |
# Generate Reactions
This script performs the same task as the script in `scripts/generateReactions.py` but in visual ipynb format.
It can also evaluate the reaction forward and reverse rates at a user selected temperature.
```
from rmgpy.rmg.main import RMG
from rmgpy.rmg.model import CoreEdgeReactionModel
from rmgp... | github_jupyter |
<br><br><font color="gray">DOING COMPUTATIONAL SOCIAL SCIENCE<br>MODULE 4 <strong>PROBLEM SETS</strong></font>
# <font color="#49699E" size=40>MODULE 4 </font>
# What You Need to Know Before Getting Started
- **Every notebook assignment has an accompanying quiz**. Your work in each notebook assignment will serve as... | 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 |
# Prepare Dataset for RoBERTa
# Feature Transformation with Amazon a SageMaker Processing Job and Scikit-Learn
Typically a machine learning (ML) process consists of few steps. First, gathering data with various ETL jobs, then pre-processing the data, featurizing the dataset by incorporating standard techniques or pri... | github_jupyter |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.

# Distr... | github_jupyter |
## Gaussian Mixture Model for Density Estimation
This notebook demonstrates Gaussian mixture models (GMMs) in 2D. We can see that the GMM can model quite complicated distributions, but in certain situations be unnecessarily parameterised.
The approximation of a large GMM (i.e. with a large number of components) with ... | github_jupyter |
```
#hide
from dash_oop_components.core import *
```
# Tracking state of your app in url querystrings
> instructions on how to track the state of your dashboard in the url querystring
## Make shareable dashboards by tracking state in url querystrings
For a lot of analytical web apps it can be super useful to be abl... | github_jupyter |
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/JavaScripts/Image/PixelLonLat.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 |
# Deep Reinforcement Learning <em> in Action </em>
## N-Armed Bandits
### Chapter 2
```
import numpy as np
import torch as th
from torch.autograd import Variable
from matplotlib import pyplot as plt
import random
%matplotlib inline
```
This defines the main contextual bandit class we'll be using as our environment/si... | github_jupyter |
<a href="https://colab.research.google.com/github/butchland/fastai_nb_explorations/blob/master/fastai_scratch_with_tpu_mnist_4_experiment2.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
import os
assert os.environ['COLAB_TPU_ADDR'], 'Make sure ... | github_jupyter |
<img src="../../images/qiskit-heading.gif" alt="Note: In order for images to show up in this jupyter notebook you need to select File => Trusted Notebook" width="500 px" align="left">
## _*Visualizing a Quantum Data and States*_
The latest version of this notebook is available on https://github.com/qiskit/qiskit-tut... | github_jupyter |
<a href="https://colab.research.google.com/github/BNkosi/Zeus/blob/master/Zeus.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Zeus.py
## Contents
1. First installation
2. Imports
3. Data
4. Data cleaning and Preprocessing
5. Retriever
6. Reader
... | github_jupyter |
# Table widgets in the napari viewer
Before we talk about tables and widgets in napari, let's create a viewer, a simple test image and a labels layer:
```
import numpy as np
import napari
import pandas
from napari_skimage_regionprops import regionprops, add_table, get_table
viewer = napari.Viewer()
viewer.add_image(np... | github_jupyter |
```
import numpy as np
import time
import sys
#
from matplotlib import pyplot as plt
%matplotlib inline
```
### Real Space LPT ###
In this notebook we give some examples to compute real-space 1-loop halo/matter pothird_orderra in LPT, as well as cross spectra of the "component fields" that comprise the emulator in Mo... | github_jupyter |
```
import os
import math
import configparser
import numpy as np
import pandas as pd
from sklearn.neighbors import NearestNeighbors
import tensorflow as tf
from tensorflow import keras
import py
import mylib
import cv2 as cv
import pytesseract
from tqdm import tqdm
from typing import Optional, List, Dict, Set, Tuple
fr... | github_jupyter |
# Markdown Cells
Text can be added to IPython Notebooks using Markdown cells. Markdown is a popular markup language that is a superset of HTML. Its specification can be found here:
<http://daringfireball.net/projects/markdown/>
## Markdown basics
You can make text *italic* or **bold**.
You can build nested itemiz... | github_jupyter |
Siu expression autocompletion: _.cyl.\<tab\>
==========================================
Note: this is document is based on [PR 248](https://github.com/machow/siuba/pull/248) by [@tmastny](https://github.com/tmastny), and all the discussion there!
(Drafted on 7 August 2020)
tl;dr. Implementing autocompletion requires... | github_jupyter |
# **pix2pix**
---
<font size = 4>pix2pix is a deep-learning method allowing image-to-image translation from one image domain type to another image domain type. It was first published by [Isola *et al.* in 2016](https://arxiv.org/abs/1611.07004). The image transformation requires paired images for training (supervised... | github_jupyter |
# ML Pipeline Preparation
Follow the instructions below to help you create your ML pipeline.
### 1. Import libraries and load data from database.
- Import Python libraries
- Load dataset from database with [`read_sql_table`](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_sql_table.html)
- Define fea... | github_jupyter |
[](https://www.ibm.com/demos/collection/db2-database/)
<a id="top">
# Using the Open Db2 Data Management Console RESTful Service APIs
Welcome to this Db2 Data Management Console lab that highlights the RESTful services of the console. This lab uses Jupyter notebooks to demonstrate these fea... | github_jupyter |
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
data = pd.read_csv('/Users/zengxin/Study/Econ2355/result/corr.csv', index_col="Unnamed: 0")
data
data_corr = data.drop(['ticker', 'date'], axis=1)
corr = data[[i for i in data_corr.columns]].corr()
ax = sns.heatmap(
cor... | github_jupyter |
# Delay-and-Sum Beamformer - Linear Array of Infinite Length
*This Jupyter notebook is part of a [collection of notebooks](../index.ipynb) in the masters course Selected Topics in Audio Signal Processing, Communications Engineering, Universität Rostock. Please direct questions and suggestions to [Sascha.Spors@uni-rost... | github_jupyter |
<a href="https://qworld.net" target="_blank" align="left"><img src="../qworld/images/header.jpg" align="left"></a>
$ \newcommand{\bra}[1]{\langle #1|} $
$ \newcommand{\ket}[1]{|#1\rangle} $
$ \newcommand{\braket}[2]{\langle #1|#2\rangle} $
$ \newcommand{\dot}[2]{ #1 \cdot #2} $
$ \newcommand{\biginner}[2]{\left\langle... | github_jupyter |
# Named Entity Recognition by fine-tuning Keras BERT on SageMaker
## Setup
We'll begin with some necessary imports, and get an Amazon SageMaker session to help perform certain tasks, as well as an IAM role with the necessary permissions.
```
import os
import json
import time
from datetime import datetime
import nu... | github_jupyter |
<center> <font size=5> <h1>Define working environment</h1> </font> </center>
The following cells are used to:
- Import needed libraries
- Set the environment variables for Python, Anaconda, GRASS GIS and R statistical computing
- Define the ["GRASSDATA" folder](https://grass.osgeo.org/grass73/manuals/helptext.html),... | github_jupyter |
## Using SageMaker Debugger and SageMaker Experiments for iterative model pruning
This notebook demonstrates how we can use [SageMaker Debugger](https://docs.aws.amazon.com/sagemaker/latest/dg/train-debugger.html) and [SageMaker Experiments](https://docs.aws.amazon.com/sagemaker/latest/dg/experiments.html) to perform ... | github_jupyter |
Deep Learning with TensorFlow
=============
Credits: Forked from [TensorFlow](https://github.com/tensorflow/tensorflow) by Google
Setup
------------
Refer to the [setup instructions](https://github.com/donnemartin/data-science-ipython-notebooks/tree/feature/deep-learning/deep-learning/tensor-flow-exercises/README.md... | 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 |
```
import numpy as np
import pandas as pd
import loompy
import velocyto as vcy
import matplotlib.pyplot as plt
import matplotlib as mpl
import copy
import igraph as ig
import louvain
import umap
import networkx
import community
import pandas as pd
import scanpy as sc
import seaborn as sns
from collections import Count... | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.