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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import os | |
from subprocess import * | |
import urllib2,re,math | |
from BeautifulSoup import BeautifulSoup | |
def get_races(url,r=10): |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from scipy.sparse import dok_matrix, dia_matrix, identity | |
from scipy.sparse.linalg import spsolve | |
# ネットワークの構造 | |
# ノードiとノードjの間にリンクがあるときW[i,j]=1 | |
W = dok_matrix((10,10)) | |
W[0,2] = W[2,0] = 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
Sub AttachLabelsToPoints() | |
'Dimension variables. | |
Dim RCounter As Integer, CCounter As Integer, xVals As String | |
'Disable screen updating while the subroutine is run. | |
Application.ScreenUpdating = False | |
'Store the formula for the first series in "xVals". | |
xVals = ActiveChart.SeriesCollection(1).Formula |
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
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello world!</title> | |
</head> | |
<body> | |
<h1>Hello world!</h1> | |
<p>hogehoge</p> | |
</body> |
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
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<script src="http://d3js.org/d3.v2.js"></script> | |
<style> | |
line.arrow { | |
stroke: #666; |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import networkx as nx | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# Zachary's Karate Club graph | |
G = nx.karate_club_graph() |
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
<h1 id="gist_120907_description" style="font-weight:300;">Loading...</h1> | |
<iframe id="gist_120907_hello_html" marginwidth="0" marginheight="0" scrolling="no" style="border:solid 1px #ccc; display:inline; margin:0px; position:static; width:400px; height:300px;"></iframe> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> | |
<script> | |
$(document).ready(function() { | |
var id = '3347397'; | |
var filename = 'hello.html'; | |
$.ajax({ | |
type: 'GET', |
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
application: aozoramakura | |
version: 1 | |
runtime: python | |
api_version: 1 | |
handlers: | |
- url: /post_update | |
script: app.py | |
login: admin |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
import scipy as sp | |
from scipy.optimize.slsqp import approx_jacobian | |
import matplotlib.pyplot as plt | |
def main(): | |
# 初期化 |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
import matplotlib.pyplot as plt | |
def lkf(T, Y, U, mu0, Sigma0, A, B, C, Q, R): | |
'''Linear Kalman Filter | |
- 状態方程式 |