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
Problem occurred during compilation with the command line below: | |
c:\Users\tie301837\Documents\environments\msys32\usr\bin\g++.exe -shared -g -O3 | |
-fno-math-errno -Wno-unused-label -Wno-unused-variable -Wno-write-strings -share | |
d -IC:/Users/tie301837/Documents/environments/msys32/mingw32/include -LC:/Users/ | |
tie301837/Documents/environments/Python/Continuum/Miniconda3/envs/deeplearn/libs | |
-lpython34 -march=haswell -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse | |
4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mno-lwp -mfma - | |
mno-fma4 -mno-xop -mbmi -mbmi2 -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt - | |
mrtm -mhle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mx | |
save -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-pref |
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:ff91c99359ae721ccc385e2237c0826eda47a7a9767f2f724933a6eecc02d799" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
import urllib.request | |
import urllib.request as request | |
request.urlopen("http://www.google.co.jp").status | |
>>>200 |
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
numpy>=1.9.2 | |
scipy>=0.15.1 | |
scikit-learn>=0.16.0 | |
matplotlib>=1.4.0 | |
cython>=0.22 | |
ipython>=3.1.0 |
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
import inspect | |
fields = inspect.getmembers(instance, lambda a: not(inspect.isroutine(a))) |
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
def main(): | |
import pystan | |
schools_code = """ | |
data { | |
int<lower=0> J; // number of schools | |
real y[J]; // estimated treatment effects | |
real<lower=0> sigma[J]; // s.e. of effect estimates | |
} |
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
def main(): | |
import pymc as pc | |
import pymc.Matplot as pt | |
import numpy as np | |
from scipy.stats import bernoulli | |
def model(data): | |
theta_prior = pc.Beta('theta_prior', alpha=1.0, beta=1.0) | |
coin = pc.Bernoulli('coin', p=theta_prior, value=data, observed=True) |
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
import os | |
from datetime import datetime | |
import requests | |
API_KEY = "your_key" | |
API_SECRET = "your_secret" | |
def read_file(path): | |
lines = [] |
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
from IPython.core.display import HTML | |
color="255,127,80" # coral | |
def print_color(c): | |
source = "<h1 style='color: rgb({0})'>Color Text</h1>".format(c) | |
return HTML(source) | |
print_color(color) |
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
def check(name): | |
from importlib import util | |
spec = util.find_spec(name) | |
return True if spec else False |