This file contains 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 matplotlib.pyplot as plt | |
import numpy as np | |
from collections import Counter | |
# hist | |
m = np.asarray([2058, 2059, 2058, 2100, 2100, 2102, 2101, 2058, 2059, 2100]) | |
print sorted(Counter(m).items()) | |
plt.subplot(211) |
This file contains 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
<html><head><title>mpld3 plot</title></head><body> | |
<style> |
This file contains 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 numpy as np | |
import pylab as plt | |
from sklearn import svm, datasets | |
import mpld3 | |
iris = datasets.load_iris() | |
X = iris.data[:, :2] | |
Y = iris.target |
This file contains 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
<html><head><title>mpld3 plot</title></head><body> | |
<style> |
This file contains 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 numpy as np | |
import pylab as plt | |
from sklearn import svm, datasets | |
from mpld3 import show_d3, fig_to_d3, plugins | |
iris = datasets.load_iris() | |
X = iris.data[:, :2] | |
Y = iris.target | |
h = .02 |
This file contains 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 mpld3.plugins import PluginBase | |
import jinja2 | |
import json | |
from mpld3 import show_d3 | |
import matplotlib.pyplot as plt | |
import numpy as np | |
class LinkedView(PluginBase): | |
"""A simple plugin showing how multiple axes can be linked""" |
This file contains 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 matplotlib.pyplot as plt | |
import numpy as np | |
from mpld3 import show_d3, plugins | |
import requests as rq | |
def main(): | |
url = 'http://sochi.kimonolabs.com/api/countries' | |
payload = {'fields': 'name,medals', | |
'sort': 'medals.total,-1', |
This file contains 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
#-*- encoding: utf-8 -*- | |
import numpy as np | |
import cv2 | |
if __name__ == '__main__': | |
img = cv2.imread("Ryo.jpg", 0) | |
params = {'ksize':(31, 31), 'sigma':1.0, 'theta':0, 'lambd':15.0, |
This file contains 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
#include "stdafx.h" | |
#pragma comment(lib, "opencv_core230d.lib") | |
#pragma comment(lib, "opencv_highgui230d.lib") | |
#pragma comment(lib, "opencv_imgproc230d.lib") | |
#pragma comment(lib, "opencv_legacy230d.lib") | |
#pragma comment(lib, "opencv_video230d.lib") | |
// opencvのヘッダの前で定義 | |
#pragma warning(disable:4996) |
This file contains 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
#include <vector> | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
void Empty(string str, vector<int> v) | |
{ | |
if( v.empty() ) { | |
cout << str << " is empty" << endl; |