This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import numpy as np | |
def cramersV(x, y): | |
""" | |
Calc Cramer's V. | |
Parameters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import matplotlib.pyplot as plt | |
from matplotlib.font_manager import FontProperties | |
fp = FontProperties(fname=r'C:\WINDOWS\Fonts\YuGothic.ttf', size=14) | |
plt.bar([1, 2], [5, 10], 0.25) | |
plt.bar([1.25, 2.25], [4, 8], 0.25, color='darkorange') | |
plt.xlim((0.75, 2.75)) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# データの入手 | |
# Data obtained from http://biostat.mc.vanderbilt.edu/DataSets | |
data = read.csv("http://biostat.mc.vanderbilt.edu/wiki/pub/Main/DataSets/titanic3.csv", | |
stringsAsFactors=F, na.strings=c("","NA")) | |
# データの確認 | |
# survived: 1(生存),0(死亡) | |
# pclass: 乗客の社会経済的地位(1:上流,2:中流,3:下流) | |
# name: 氏名 | |
# sex: 性別 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import re | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
from sklearn.feature_extraction import DictVectorizer as DV | |
from sklearn.preprocessing import StandardScaler | |
from sklearn.tree import DecisionTreeClassifier | |
from sklearn.metrics import accuracy_score |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
def synthesize_text(text, path): | |
import os | |
from google.cloud import texttospeech | |
from pydub import AudioSegment | |
client = texttospeech.TextToSpeechClient() | |
input_text = texttospeech.types.SynthesisInput(text=text) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer