Skip to content

Instantly share code, notes, and snippets.

View ground0state's full-sized avatar

abetan ground0state

View GitHub Profile
import numpy as np
from scipy import signal
import matplotlib.pyplot as plt
import sys
# 時系列のサンプルデータ作成
f1 = 120
f2 = 150
n = 256 # データ数
import numpy as np
from scipy import signal
from scipy.signal import butter
import pywt
import matplotlib.pyplot as plt
def high_pass_filter(x, low_cutoff=10, sample_rate=sample_rate):
"""
From @randxie https://github.com/randxie/Kaggle-VSB-Baseline/blob/master/src/utils/util_signal.py
from __future__ import print_function, division
import numpy as np
from scipy import stats
import matplotlib.pyplot as plt
import pystan
model = """
data {
int<lower=1> N;
@ground0state
ground0state / pystan_sample.py
Last active January 23, 2020 14:13
pystan sample
import numpy as np
import pystan
import matplotlib.pyplot as plt
import pickle
# Stanモデル
model = """
data {
int<lower=0> N; // 学習データの数
import math
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import torch
from sklearn.model_selection import *
from sklearn.model_selection import train_test_split
from sklearn.utils import shuffle
from torch import nn, optim
!pip install -U torchvision
!wget http://www.robots.ox.ac.uk/~vgg/data/flowers/102/102flowers.tgz
!mkdir oxford-102
!tar -xzvf 102flowers.tgz -C ./oxford-102
import math
import numpy as np
!pip install -U torchvision
# http://vis-www.cs.umass.edu/lfw/
!wget http://vis-www.cs.umass.edu/lfw/lfw-deepfunneled.tgz
!tar -xzvf lfw-deepfunneled.tgz
!mkdir ./lfw-deepfunneled/train
!mv ./lfw-deepfunneled/[A-W]* ./lfw-deepfunneled/train
!mkdir ./lfw-deepfunneled/test
!mv ./lfw-deepfunneled/[X-Z]* ./lfw-deepfunneled/test
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import lightgbm as lgb
from sklearn.model_selection import *
!wget "https://www.analyticsvidhya.com/wp-content/uploads/2016/02/AirPassengers.csv"
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from keras.models import Sequential
from keras.layers import *
from keras.layers.recurrent import SimpleRNN
from keras.optimizers import *
from keras.callbacks import *
import torch
from torch import nn, optim
from torch.utils.data import TensorDataset, Dataset, DataLoader
import tqdm
from torchvision.datasets import ImageFolder
from torchvision import transforms
!wget https://github.com/lucidfrontier45/PyTorch-Book/raw/master/data/taco_and_burrito.tar.gz
!tar -zxvf './taco_and_burrito.tar.gz'