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 | |
circle1=plt.Circle((0,0),.2,color='r') | |
circle2=plt.Circle((.5,.5),.2,color='b') | |
circle3=plt.Circle((1,1),.2,color='g',clip_on=False) | |
fig = plt.gcf() | |
fig.gca().add_artist(circle1) | |
fig.gca().add_artist(circle2) | |
fig.gca().add_artist(circle3) | |
plt.show() |
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 | |
from matplotlib.patches import Arrow | |
plt.figure(1, figsize=(3,3)) | |
ax = plt.gca() | |
ax.annotate("", | |
xy=(0.2, 0.2), xycoords='data', | |
xytext=(0.8, 0.8), textcoords='data', | |
arrowprops=dict(arrowstyle="->", |
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
#!/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 -*- | |
"""Particle Filter | |
""" | |
import numpy | |
def f(x, u): | |
"""Transition model |