code stringlengths 2.5k 150k | kind stringclasses 1
value |
|---|---|
```
%matplotlib inline
```
# Brainstorm auditory tutorial dataset
Here we compute the evoked from raw for the auditory Brainstorm
tutorial dataset. For comparison, see [1]_ and the associated
`brainstorm site <http://neuroimage.usc.edu/brainstorm/Tutorials/Auditory>`_.
Experiment:
- One subject, 2 acquisition... | github_jupyter |
```
from http.server import BaseHTTPRequestHandler, HTTPServer
from urllib import parse
import random
import string
import hashlib
import base64
from typing import Any
import webbrowser
import requests
from oauthlib.oauth2 import WebApplicationClient
class OAuthHttpServer(HTTPServer):
def __init__(self, *args, **... | github_jupyter |
<img src="images/dask_horizontal.svg" align="right" width="30%">
# Lazy execution
Here we discuss some of the concepts behind dask, and lazy execution of code. You do not need to go through this material if you are eager to get on with the tutorial, but it may help understand the concepts underlying dask, how these t... | github_jupyter |
# Setup
```
# Dependencies
import pandas as pd
from splinter import Browser
from bs4 import BeautifulSoup
from webdriver_manager.chrome import ChromeDriverManager
import requests
```
# Webscraping
## Nasa Mars News
```
# Setup splinter
executable_path = {'executable_path': ChromeDriverManager().install()}
browser =... | github_jupyter |
# Project 3: Implement SLAM
---
## Project Overview
In this project, you'll implement SLAM for robot that moves and senses in a 2 dimensional, grid world!
SLAM gives us a way to both localize a robot and build up a map of its environment as a robot moves and senses in real-time. This is an active area of research... | github_jupyter |
<a href="https://colab.research.google.com/github/niranjana1997/RIT-DSCI-633-FDS/blob/main/Assignments/DSCI_633_Assn_3.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
# Python ≥3.5 is required
import sys
# Scikit-Learn ≥0.20 is required
import ... | github_jupyter |
```
import nltk
from nltk.stem import WordNetLemmatizer
from nltk.corpus import stopwords
paragraph = """I have three visions for India. In 3000 years of our history, people from all over
the world have come and invaded us, captured our lands, conquered our minds.
From Alexander onwards,... | github_jupyter |
# Bilayer Sonophore model: pre-computation of intermolecular pressure
Profiled simulations of the mechanical model in isolation reveal that the spatial integration of intermolecular pressure $P_M$ is by far the longest internal computation at each iteration. Hence, we seek to decrease its computational cost.
Luckily,... | github_jupyter |
---
## BigDL-Nano Resnet example on CIFAR10 dataset
---
This example illustrates how to apply bigdl-nano optimizations on a image recognition case based on pytorch-lightning framework. The basic image recognition module is implemented with Lightning and trained on [CIFAR10](https://www.cs.toronto.edu/~kriz/cifar.html) ... | github_jupyter |
# Apply CNN Classifier to DESI Spectra and visualize results with gradCAM
Mini-SV2 tiles from February-March 2020:
- https://desi.lbl.gov/trac/wiki/TargetSelectionWG/miniSV2
See also the DESI tile picker with (limited) SV0 tiles from March 2020:
- https://desi.lbl.gov/svn/data/tiles/trunk/
- https://desi.lbl.gov/svn/... | github_jupyter |
```
!pip install vaderSentiment
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
# Initialize VADER so we can use it later
sentimentAnalyser = SentimentIntensityAnalyzer()
import pandas as pd
pd.options.display.max_colwidth = 400
# Read in text file
text = open("../Data/Periodical-text-files-single... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
import os
import numpy as np, pandas as pd
import matplotlib.pyplot as plt, seaborn as sns
from tqdm import tqdm, tqdm_notebook
from pathlib import Path
# pd.set_option('display.max_columns', 1000)
# pd.set_option(... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import itertools
import sklearn
from sklearn.linear_model import LogisticRegression
from sklearn.svm import SVC
from sklearn.ensemble import RandomForestClassifier
from brew.base import Ensemble, EnsembleClassifier
from bre... | github_jupyter |
```
import pickle
import pandas as pd
import seaborn as sns
from matplotlib import pyplot as plt
from tqdm import tqdm_notebook
import time
import gc
import numpy as np
import lightgbm as lgb
from sklearn.cluster import KMeans
from sklearn.datasets import make_blobs
import torch
from sklearn.preprocessing import LabelE... | github_jupyter |
# Codebuster STAT 535 Statistical Computing Project
## Movie recommendation recommendation pipeline
##### Patrick's comments 11/9
- Goal: Build a small real world deployment pipeline like it can be used in netflix / amazon
- build / test with movie recommendation data set (model fitting, data preprocessing, evaluati... | github_jupyter |
```
from glob import glob
from os import path
import re
from skbio import DistanceMatrix
import pandas as pd
import numpy as np
from kwipexpt import *
%matplotlib inline
%load_ext rpy2.ipython
%%R
library(tidyr)
library(dplyr, warn.conflicts=F, quietly=T)
library(ggplot2)
```
Calculate performance of kWIP
===========... | github_jupyter |
# Example from Image Processing
```
%matplotlib inline
import matplotlib.pyplot as plt
```
Here we'll take a look at a simple facial recognition example.
This uses a dataset available within scikit-learn consisting of a
subset of the [Labeled Faces in the Wild](http://vis-www.cs.umass.edu/lfw/)
data. Note that this ... | github_jupyter |
### 1)Which of the following operators is used to calculate remainder in a division?
### ANS-%
```
## 2)
2/3
## 3)_
6<<2
## 4)
6&2
## 5)
6|2
```
### 6)What does the finally keyword denotes in python?
#### ANS-the finally block will be executed no matter if the try block raises an error or not.
### 7)What do... | github_jupyter |
#### Putting It All Together
As you might have guessed from the last notebook, using all of the variables was allowing you to drastically overfit the training data. This was great for looking good in terms of your Rsquared on these points. However, this was not great in terms of how well you were able to predict on ... | github_jupyter |
```
import pandas as pd #pandas does things with matrixes
import numpy as np #used for sorting a matrix
import matplotlib.pyplot as plt #matplotlib is used for plotting data
import matplotlib.ticker as ticker #used for changing tick spacing
import datetime as dt #used for dates
import matplotlib.dates as mdates #used ... | github_jupyter |
```
#Created 2021-09-08
#Copyright Spencer W. Leifeld
from pyspark.sql import SparkSession as Session
from pyspark import SparkConf as Conf
from pyspark import SparkContext as Context
import os
os.environ['SPARK_LOCAL_IP']='192.168.1.2'
os.environ['HADOOP_HOME']='/home/geno1664/Developments/Github_Samples/RDS-ENV/hadoo... | github_jupyter |
```
from __future__ import print_function
import torch
import numpy as np
from PIL import Image
x = torch.empty(5, 3)
print(x)
x = torch.rand(5, 3)
print(x)
x = torch.zeros(5, 3, dtype=torch.long)
print(x)
x = torch.tensor([5.5, 3])
print(x)
x = x.new_ones(5, 3, dtype=torch.double)
print(x)
print(x.dtype)
x = torch.ran... | github_jupyter |
# Fourier Transforms
```
import numpy as np
from scipy.integrate import quad
import matplotlib.pyplot as plt
```
## Part 1: The Discrete Fourier Transform
We’re about to make the transition from Fourier series to the Fourier transform. “Transition” is the
appropriate word, for in the approach we’ll take the Fourier ... | github_jupyter |
---
_You are currently looking at **version 1.0** of this notebook. To download notebooks and datafiles, as well as get help on Jupyter notebooks in the Coursera platform, visit the [Jupyter Notebook FAQ](https://www.coursera.org/learn/python-text-mining/resources/d9pwm) course resource._
---
# Assignment 2 - Introd... | github_jupyter |
# Documentation
> 201025: This notebook generate embedding vectors for pfam_motors, df_dev, and motor_toolkit from the models that currently finished training:
- lstm5
- evotune_lstm_5_balanced.pt
- evotune_lstm_5_balanced_target.pt
- mini_lstm_5_balanced.pt
- mini_l... | github_jupyter |
```
# 8.3.3. Natural Language Statistics
import random
import torch
from d2l import torch as d2l
tokens = d2l.tokenize(d2l.read_time_machine())
# Since each text line is not necessarily a sentence or a paragraph, we
# concatenate all text lines
corpus = [token for line in tokens for token in line]
vocab = d2l.Vocab(co... | github_jupyter |
## 7-3. HHLアルゴリズムを用いたポートフォリオ最適化
この節では論文[1]を参考に、過去の株価変動のデータから、最適なポートフォリオ(資産配分)を計算してみよう。
ポートフォリオ最適化は、[7-1節](7.1_quantum_phase_estimation_detailed.ipynb)で学んだHHLアルゴリズムを用いることで、従来より高速に解けることが期待されている問題の一つである。
今回は具体的に、GAFA (Google, Apple, Facebook, Amazon) の4社の株式に投資する際、どのような資産配分を行えば最も低いリスクで高いリターンを得られるかという問題を考える。
### 株価データ取得
まず... | github_jupyter |
**Interactive mapping and analysis of geospatial big data using geemap and Google Earth Engine**
This notebook was developed for the geemap workshop at the [GeoPython 2021 Conference](https://2021.geopython.net).
Authors: [Qiusheng Wu](https://github.com/giswqs), [Kel Markert](https://github.com/KMarkert)
Link to th... | github_jupyter |
```
import pandas as pd
data = pd.read_csv('./data.csv')
X,y = data.drop('target',axis=1),data['target']
from sklearn.model_selection import train_test_split
X_train,X_test,y_train,y_test = train_test_split(X,y,test_size=0.25)
import torch
import torch.nn as nn
import numpy as np
X_train = torch.from_numpy(np.array(X_t... | github_jupyter |
<a href="https://colab.research.google.com/github/AdrianduPlessis/DS-Unit-2-Regression-Classification/blob/master/module3/assignment_regression_classification_3.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
Lambda School Data Science, Unit 2: Pred... | github_jupyter |
```
import pickle
import tensorflow as tf
from tensorflow import keras
import numpy as np
import pandas as pd
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Reshape
from tensorflow.keras.layers import Conv1D
from tensorflow.keras.l... | github_jupyter |
# Create redo records
This Jupyter notebook shows how to create a Senzing "redo record".
It assumes a G2 database that is empty.
Essentially the steps are to create very similar records under different data sources,
then delete one of the records. This produces a "redo record".
## G2Engine
### Senzing initializati... | github_jupyter |
# Load packages and data
```
import numpy as np
import pandas as pd
import seaborn as sns; sns.set(style="ticks", color_codes=True)
import matplotlib.pyplot as plt
data = pd.read_csv('breast-cancer-wisconsin.txt', sep=",", header=0, index_col = 0)
data.dtypes
# some of the columns have bad data, since all columns cont... | github_jupyter |
# Deutsch-Jozsa Algorithm
In this section, we first introduce the Deutsch-Jozsa problem, and classical and quantum algorithms to solve it. We then implement the quantum algorithm using Qiskit, and run it on a simulator and device.
## Contents
1. [Introduction](#introduction)
1.1 [Deutsch-Jozsa Problem](#djpr... | github_jupyter |
# Residual Networks
Welcome to the second assignment of this week! You will learn how to build very deep convolutional networks, using Residual Networks (ResNets). In theory, very deep networks can represent very complex functions; but in practice, they are hard to train. Residual Networks, introduced by [He et al.](h... | github_jupyter |
# ReSyPE Training Pipeline
We introduce a framework for training arbitrary machine learning models to perform collaborative filtering on small and large datasets. Given the utility matrix as input, we outline two approaches for model training as discussed by C. Aggarwal in his book on *Recommender Systems*. We also pr... | github_jupyter |
## Interpreting your pruning and regularization experiments
This notebook contains code to be included in your own notebooks by adding this line at the top of your notebook:<br>
```%run distiller_jupyter_helpers.ipynb```
```
# Relative import of code from distiller, w/o installing the package
import os
import sys
impo... | github_jupyter |
# Confounding Example: Finding causal effects from observed data
Suppose you are given some data with treatment and outcome. Can you determine whether the treatment causes the outcome, or is the correlation purely due to another common cause?
```
import os, sys
sys.path.append(os.path.abspath("../../"))
import numpy ... | github_jupyter |
# Identify calibration targets
Attempt to automatically locate the calibration target in each scene. If this fails for any images then the target can be located manually. Note that the automated method only works for scenes containing a single target!
Calibration spectra ( measured radiance vs known reflectance ) are... | github_jupyter |
```
%matplotlib inline
```
Neural Transfer Using PyTorch
=============================
**Author**: `Alexis Jacq <https://alexis-jacq.github.io>`_
**Edited by**: `Winston Herring <https://github.com/winston6>`_
**Re-implemented by:** `Shubhajit Das <https://github.com/Shubhajitml>`
Introduction
------------
Th... | github_jupyter |
## Linear Regression
### PyTorch Model Designing Steps
1. **Design your model using class with Variables**
2. **Construct loss and optimizer (select from PyTorch API)**
3. **Training cycle (forward, backward, update)**
### Step #1 : Design your model using class with Variables
```
from torch import nn
... | github_jupyter |
# **Blockchain Analytics**
Analysis of Bitcoin blockchain data (transaction graph) to find potential indicators of incidents
_by Dhruv Chopra and Siddhant Pathak_
## **Import all the necessary libraries**
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sb
import networkx ... | github_jupyter |
### Training a Graph Convolution Model
Now that we have the data appropriately formatted, we can use this data to train a Graph Convolution model. First we need to import the necessary libraries.
```
import deepchem as dc
from deepchem.models import GraphConvModel
import numpy as np
import sys
import pandas as pd
imp... | github_jupyter |
# Exercise 01 - Syntax, Variables and Numbers
Welcome to your first set of Python coding problems!
**Notebooks** are composed of blocks (called "cells") of text and code. Each of these is editable, though you'll mainly be editing the code cells to answer some questions.
To get started, try running the code cell bel... | github_jupyter |
<a href="https://colab.research.google.com/github/semishen/DL-CVMarathon/blob/master/Day015_Cifar_HW.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
## 『本次練習內容』
#### 運用這幾天所學觀念搭建一個CNN分類器
## 『本次練習目的』
#### 熟悉CNN分類器搭建步驟與原理
#### 學員們可以嘗試不同搭法,如使用不同的Ma... | github_jupyter |
# Transmission
```
%matplotlib inline
import numpy as np
np.seterr(divide='ignore') # Ignore divide by zero in log plots
from scipy import signal
import scipy.signal
from numpy.fft import fft, fftfreq
import matplotlib.pyplot as plt
#import skrf as rf # pip install scikit-rf if you want to run this one
```
First, let... | github_jupyter |
```
%matplotlib inline
import numpy as np
from scipy.sparse.linalg import spsolve
from scipy.sparse import csr_matrix
import matplotlib.pyplot as plt
import seaborn as sns
from condlib import conductance_matrix_READ
from timeit import default_timer as timer
# Memory array parameters
rL = 12
rHRS = 1e6
rPU = 1e3
n = 16
... | github_jupyter |
# Pre-processing pipeline for spikeglx sessions, zebra finch
Bird z_w12m7_20
- For every run in the session:
- Load the recordings
- Extract wav chan with micrhopohone and make a wav chan with the nidq syn signal
- Get the sync events for the nidq sync channel
- Do bout detection
In another notebook, bout dete... | github_jupyter |
# Telescopes: Tutorial 5
This notebook will build on the previous tutorials, showing more features of the `PsrSigSim`. Details will be given for new features, while other features have been discussed in the previous tutorial notebook. This notebook shows the details of different telescopes currently included in the `P... | github_jupyter |
<a href="https://colab.research.google.com/github/sitori8354/eatago/blob/main/Eatago.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
!pip3 install -U pywebio
# !pip install -U https://github.com/solrz/PyWebIO/archive/dev.zip
!wget https://bin.eq... | github_jupyter |
```
import glob
import os
import sys
import struct
import pandas as pd
from nltk.tokenize import sent_tokenize
from tensorflow.core.example import example_pb2
sys.path.append('../src')
import data_io, params, SIF_embedding
def return_bytes(reader_obj):
len_bytes = reader_obj.read(8)
str_len = struct.unpack('q... | github_jupyter |
## FCLA/FNLA Fast.ai Numerical/Computational Linear Algebra
### Lecture 3: New Perspectives on NMF, Randomized SVD
Notes / In-Class Questions
WNixalo - 2018/2/8
Question on section: [Truncated SVD](http://nbviewer.jupyter.org/github/fastai/numerical-linear-algebra/blob/master/nbs/2.%20Topic%20Modeling%20with%20NMF%2... | github_jupyter |
# USDA Unemployment
<hr>
```
import pandas as pd
import os
import matplotlib.pyplot as plt
import seaborn as sns
```
# Data
## US Unemployment data by county
Economic Research Service
U.S. Department of Agriculture
link:
### Notes
- Year 2020, Median Household Income (2019), & '% of State Median HH Income ha... | github_jupyter |
```
import pandas as pd
import bs4 as bs
dfs=pd.read_html('https://en.wikipedia.org/wiki/Research_stations_in_Antarctica#List_of_research_stations')
dfr=pd.read_html('https://en.wikipedia.org/wiki/Antarctic_field_camps')
df=dfs[1][1:]
df.columns=dfs[1].loc[0].values
df.to_excel('bases.xlsx')
import requests
url='https:... | github_jupyter |
_Lambda School Data Science_
This sprint, your project is about water pumps in Tanzania. Can you predict which water pumps are faulty?
# Confusion Matrix
#### Objectives
- get and interpret the confusion matrix for classification models
- use classification metrics: precision, recall
- understand the relationships ... | github_jupyter |
```
import math
import matplotlib.pyplot as plt
N = 20
a = -1
b = 0.5
w_0 = 0
def func(t): # vv
return math.cos(t)**2 - 0.05
def error(b_i): # vv
ar1 = [math.pow(abs(b), 2) for b in b_i]
s = sum(ar1)
e = math.sqrt(s)
return e
def okno(w_arr, points_arr, t_n, n):
_x_n = sum([w * func(t) for w, t ... | github_jupyter |
# Python Collections
* Lists
* Tuples
* Dictionaries
* Sets
## lists
```
x = 10
x = 20
x
x = [10, 20]
x
x = [10, 14.3, 'abc', True]
x
print(dir(x))
l1 = [1, 2, 3]
l2 = [4, 5, 6]
l1 + l2 # concat
l3 = [1, 2, 3, 4, 5, 6]
l3.append(7)
l3
l3.count(2)
l3.count(8)
len(l3)
sum(l3), max(l3), min(l3)
l1
l2
l_sum = [] # ... | github_jupyter |
# Generate and Perform Tiny Performances from the MDRNN
- Generates unconditioned and conditioned output from RoboJam's MDRNN
- Need to open `touchscreen_performance_receiver.pd` in [Pure Data](http://msp.ucsd.edu/software.html) to hear the sound of performances.
- To test generated performances, there need to be exam... | github_jupyter |
*Accompanying code examples of the book "Introduction to Artificial Neural Networks and Deep Learning: A Practical Guide with Applications in Python" by [Sebastian Raschka](https://sebastianraschka.com). All code examples are released under the [MIT license](https://github.com/rasbt/deep-learning-book/blob/master/LICEN... | github_jupyter |
<a href="https://colab.research.google.com/github/modichirag/flowpm/blob/master/notebooks/flowpm_tutorial.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
%pylab inline
from flowpm import linear_field, lpt_init, nbody, cic_paint
import tensorflo... | github_jupyter |
# When To Stop Fuzzing
In the past chapters, we have discussed several fuzzing techniques. Knowing _what_ to do is important, but it is also important to know when to _stop_ doing things. In this chapter, we will learn when to _stop fuzzing_ – and use a prominent example for this purpose: The *Enigma* machine that w... | github_jupyter |
# Introduction to 2D plots
This notebook demonstrates how plot some latitude by longitude maps of some key surface variables. Most features are available in the preinstalled `geog0111` environment.
But updated plotting that removes white meridional lines around the Greenwich Meridian, requires the `geog0121` virtual... | github_jupyter |
```
with open('input.txt') as t:
text = t.read().splitlines()
# vloer toevoegen aan alle randen
l_rand =len(text[0])
rand = '.' * l_rand
[text.insert(x, rand) for x in range(0,l_rand)]
[text.insert(len(text), rand) for _ in range(l_rand)]
wachtruimte = [rand + rij + rand for rij in text]
```
**Deel 1**
```
# def ... | github_jupyter |
# 1. 다변수 가우시안 정규분포MVN
$$\mathcal{N}(x ; \mu, \Sigma) = \dfrac{1}{(2\pi)^{D/2} |\Sigma|^{1/2}} \exp \left( -\dfrac{1}{2} (x-\mu)^T \Sigma^{-1} (x-\mu) \right)$$
- $\Sigma$ : 공분산 행렬, positive semidefinite
- x : 확률변수 벡터 $$x = \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_M \end{bmatrix}
$$
eg.
$\mu = \begin{bmatrix}2 \\ 3 \... | github_jupyter |
# First Graph Convolutional Neural Network
This notebook shows a simple GCN learning using the KrasHras dataset from [Zamora-Resendiz and Crivelli, 2019](https://www.biorxiv.org/content/10.1101/610444v1.full).
```
import gcn_prot
import torch
import torch.nn.functional as F
from os.path import join, pardir
from rando... | github_jupyter |
```
import datetime
import pandas as pd
import spacy
import re
import string
import numpy as np
import sys
import seaborn as sns
from matplotlib import cm
from matplotlib.pyplot import figure
import matplotlib.pyplot as plt
%matplotlib inline
from spacy.tokens import Token
from tqdm import tqdm
from sklearn.feature_... | github_jupyter |
<a href="https://colab.research.google.com/github/DingLi23/s2search/blob/pipelining/pipelining/exp-cscv/exp-cscv_cscv_1w_ale_plotting.ipynb" target="_blank"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
### Experiment Description
> This notebook is for experiment \<ex... | github_jupyter |
```
import mcvine
from instrument.geometry.pml import weave
from instrument.geometry import operations,shapes
import math
import os, sys
parent_dir = os.path.abspath(os.pardir)
libpath = os.path.join(parent_dir, 'c3dp_source')
figures_path = os.path.join (parent_dir, 'figures')
sample_path = os.path.join (parent_dir,... | github_jupyter |
```
import pandas as pd
import json
import numpy as np
df = pd.read_csv('data/2015-16_gems_jade.csv')
# df = df[df['country'] == "Myanmar"]
df.head()
```
## Clean data
```
df_gemsjade = df
df_gemsjade.rename(columns={'company_name': 'Company_name_cl'}, inplace=True)
df_gemsjade['type'] = 'entity'
df_gemsjade['targe... | github_jupyter |
<a href="https://colab.research.google.com/github/olgaminguett/ET5003_SEM1_2021-2/blob/main/Week-3/ET5003_Lab_Piecewise_Regression.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
<div>
<img src="https://drive.google.com/uc?export=view&id=1vK33e_EqaH... | github_jupyter |
```
!pip install qucumber
import numpy as np
import matplotlib.pyplot as plt
from qucumber.nn_states import PositiveWaveFunction
from qucumber.callbacks import MetricEvaluator
import qucumber.utils.training_statistics as ts
import qucumber.utils.data as data
import qucumber
```
# Caso Rydberg
```
train_path = "Rydb... | github_jupyter |
# SAT Analysis
**We wish to answer the question whether SAT is a fairt test?**
## Read in the data
```
import pandas as pd
import numpy as np
import re
data_files = [
"ap_2010.csv",
"class_size.csv",
"demographics.csv",
"graduation.csv",
"hs_directory.csv",
"sat_results.csv"
]
data = {}
fo... | github_jupyter |
## Recipe Builder Actions Overview
### Saving a File Cell
If you wish to save the contents of a cell, simply run it. The `%%writefile` command at the top of the cell will write the contents of the cell to the file named at the top of the cell. You should run the cells manually when applicable. However, **pressing any... | github_jupyter |
# <center>Python Project : intercative pricing app based on Bokeh</center>
#### Ines BIDAL, Noam AFLALO
```
import warnings
warnings.filterwarnings("ignore")
import pandas as pd
import numpy as np
import dask.array as da
import matplotlib.pyplot as plt
import bokeh
import math
import scipy.stats as stats
from ipywidge... | github_jupyter |
<a href="https://colab.research.google.com/github/NikhilAsogekar3/Deep-generative-models/blob/Nikhil-Asogekar/Flow_based_models_MNIST.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
```
pip install tensorboardX
!git clone https://github.com/ikostrik... | github_jupyter |
# 1. Libraries
```
import numpy as np
import pandas as pd
import tensorflow as tf
import keras.preprocessing.image
import sklearn.preprocessing
import sklearn.model_selection
import sklearn.metrics
import sklearn.linear_model
import sklearn.naive_bayes
import sklearn.tree
import sklearn.ensemble
import os;
import date... | github_jupyter |
<h1>Table of Contents<span class="tocSkip"></span></h1>
<div class="toc"><ul class="toc-item"><li><span><a href="#Peeker-Groups" data-toc-modified-id="Peeker-Groups-1"><span class="toc-item-num">1 </span>Peeker Groups</a></span></li></ul></div>
# Peeker Groups
`Peeker` objects are normally stored in a glob... | github_jupyter |
# Naive Sampling function - Sample with uniform estimate user pp scores
**Contributors:** Victor Lin
```
import sys
sys.path.append('../..')
from datetime import datetime
import matplotlib.pyplot as plt
import numpy as np
import scipy.stats as st
from exploration.config import mongo_inst
from mlpp.data_collection.samp... | github_jupyter |
# Multivariate Analysis for Planetary Atmospheres
This notebooks relies on the pickle dataframe in the `notebooks/` folder. You can also compute your own using `3_ColorColorFigs.ipynb`
```
#COLOR COLOR PACKAGE
from colorcolor import compute_colors as c
from colorcolor import stats
import matplotlib.pyplot as plt
imp... | github_jupyter |
```
from sklearn.cluster import MeanShift, estimate_bandwidth
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import datetime
import math
import os
import sys
from numpy.fft import fft, ifft
import glob
def remove_periodic(X, df_index, detrending=True, model='additive', frequency_threshold=0.1e... | github_jupyter |
```
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import math
from statsmodels.tsa.seasonal import seasonal_decompose
# our python file with functions
import altedc as altedc
data_path = 'data/'
data = pd.read_csv(f'{data_path}train_phase_1.csv')
data.date = pd.to_datetime(data.date, format='%Y... | github_jupyter |
## loading an image
```
from PIL import Image
im = Image.open("lena.png")
```
## examine the file contents
```
from __future__ import print_function
print(im.format, im.size, im.mode)
```
- The *format* attribute identifies the source of an image. If the image was not read from a file, it is set to None.
- The *si... | github_jupyter |
```
import pandas as pd
import numpy as np
import scanpy as sc
import os
from sklearn.cluster import KMeans
from sklearn.cluster import AgglomerativeClustering
from sklearn.metrics.cluster import adjusted_rand_score
from sklearn.metrics.cluster import adjusted_mutual_info_score
from sklearn.metrics.cluster import homog... | github_jupyter |
<img style="float: right; margin: 0px 0px 15px 15px;" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSQt6eQo8JPYzYO4p6WmxLtccdtJ4X8WR6GzVVKbsMjyGvUDEn1mg" width="300px" height="100px" />
# Trabajando con opciones
Una opción puede negociarse en el mercado secundario por lo que es importante determinar su v... | github_jupyter |
# Mesh visualisation
We are now going to have a look at different mesh visualisation options. We are going to use the following mesh:
```
import discretisedfield as df
p1 = (0, 0, 0)
p2 = (100e-9, 50e-9, 20e-9)
n = (20, 10, 4)
region = df.Region(p1=p1, p2=p2)
mesh = df.Mesh(region=region, n=n)
```
Same as the regi... | github_jupyter |
# Hello World Text Detection
A very basic introduction to OpenVINO that shows how to do text detection on a given IR model.
We use the [horizontal-text-detection-0001](https://docs.openvinotoolkit.org/latest/omz_models_model_horizontal_text_detection_0001.html) model from [Open Model Zoo](https://github.com/openvinot... | github_jupyter |
<h3>Sin Cython</h3>
<p>Este programa genera $N$ enteros aleatorios entre $1$ y $M$, y una vez obtenidos los eleva al cuadrado y devuelve la suma de los cuadrados. Por tanto, calcula el cuadrado de la longitud de un vector aleatorio con coordenadas enteros en el intervalo $[1,M]$.</p>
```
def cuadrados(N,M)... | github_jupyter |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.

import numpy as np
import matplotlib.pyplot as plt
import os
import pandas as pd
import netCDF4 as nc
import xarray as... | github_jupyter |
```
# Dependencies
import tweepy
import json
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import time
from pprint import pprint
# Import and Initialize Sentiment Analyzer
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
analyzer = SentimentIntensityAna... | github_jupyter |
# Online prediction for radon-small
In online mode, the model is learning as soon as a new data arrives.
It means that when we want our prediction we don't need to provide feature vector,
since all data was already processed by the model.
Explore the following models:
* Constant model - The same value for all fut... | github_jupyter |
# classificate speaking_audio files
```
# 균형있게 구성하기
# 1. 성별 50:50
# 2. 지역 25:25:25:25
# 각 지역별로 남 10, 여 10명
# 총 80명.
import os
import shutil
import random
from typing_extensions import final
A = [] # 강원
B = [] # 서울/경기
C = [] # 경상
D = [] # 전라
E = [] # 제주(현재 없음)
F = [] # 충청(현재 없음)
G = [] # 기타(현재 없음)
re... | github_jupyter |
<a href="https://colab.research.google.com/github/maiormarso/DS-Unit-1-Sprint-2-Data-Wrangling-and-Storytelling/blob/master/module3-make-explanatory-visualizations/LS_DS_123_Make_Explanatory_Visualizations_Assignment.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open I... | github_jupyter |
## Exploratory data analysis of Dranse discharge data
Summary: The data is stationary even without differencing, but ACF and PACF plots show that an hourly first order difference and a periodic 24h first order difference is needed for SARIMA fitting.
Note: Final fitting done in Google Colab due to memory constraints ... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
from pymedphys_monomanage.tree import PackageTree
import networkx as nx
from copy import copy
package_tree = PackageTree('../../packages')
package_tree.package_dependencies_digraph
package_tree.roots
modules = list(package_tree.digraph.neighbors('pymedphys_analysis'))
modules
int... | github_jupyter |
##### M5_Idol_lyrics/SongTidy 폴더의 전처리 ipnb을 총정리하고, 잘못된 코드를 수정한 노트북
### 가사 데이터(song_tidy01) 전처리
**df = pd.read_csv('rawdata/song_data_raw_ver01.csv')**<br>
**!!!!!!!!!!!!!순서로 df(번호)로 지정!!!!!!!!!!!!!**
1. Data20180915/song_data_raw_ver01.csv 데이터로 시작함 (키스있는지체크)
- 제목에 리믹스,라이브,inst,영일중,ver 인 행
- 앨범에 나가수, 불명, 복면인 행
... | github_jupyter |
<center>
<img src="http://i0.kym-cdn.com/photos/images/original/000/234/765/b7e.jpg" height="400" width="400">
</center>
# Первому семинару приготовиться
__Наша цель на сегодня:__
* Запустить анаконду быстрее, чем за 20 минут.
* Попробовать python на вкус
* Решить пару простых задач и залить их в Яндекс.Контест
... | github_jupyter |
## Imports:
```
from PIL import Image, ImageOps
import cv2
from google_images_download import google_images_download
solicitor = google_images_download.googleimagesdownload()
arguments = {"keywords":"consorcio feliz", "aspect_ratio":"square", "color_type":"transparent", "limit":7,"output_directory":"images", "no_dire... | github_jupyter |
```
# This handy piece of code changes Jupyter Notebooks margins to fit your screen.
from IPython.core.display import display, HTML
display(HTML("<style>.container { width:95% !important; }</style>"))
```
## Be sure you've installed the praw and tqdm libraries. If you haven't you can run the line below. Node.js in re... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.