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 | |
import pylab | |
# prepar dummy data | |
# ----------------- | |
x1 = numpy.linspace(-5, 5, 101) | |
y1 = numpy.sin(x1) | |
x2 = numpy.linspace(0, 5, 21) | |
y2 = numpy.exp(-x2) |
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 pylab | |
fig = pylab.figure() | |
ax = fig.add_subplot(111) | |
ax.plot([3,1,6,-1,3,2]) | |
ax.text(0.1, 0.9, 'hello, world', transform=ax.transAxes) | |
# fig.savefig('gist6241944.png') | |
pylab.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 requests | |
API_TOKEN = 'b24cd...........92' | |
res = requests.get('https://www.toggl.com/api/v8/me', | |
auth=(API_TOKEN, 'api_token')) |
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 requests | |
API_TOKEN = 'b24cd...........92' | |
res = requests.get('https://www.toggl.com/api/v8/workspaces', | |
auth=(API_TOKEN, 'api_token')) | |
workspaces = res.json() |
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 requests | |
API_TOKEN = 'b24cd...........92' | |
WORKSPACE = 7000 | |
res = requests.get('https://toggl.com/reports/api/v2/details', | |
params={'user_agent': 'your@emale.com', | |
'workspace_id': WORKSPACE}, | |
auth=(API_TOKEN, 'api_token')) |
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
# color list used in 2015ApJS..216...18N | |
# ex.) http://www.astro.s.osakafu-u.ac.jp/~nishimura/Orion/img/CO1221_cube.jpg | |
import matplotlib.colors | |
cmaplist = ['#CCCCCC', # gray | |
'#2A61A6', # blue | |
'#71CDD9', # aqua | |
'#6CBD59', # green | |
'#EDE869', # yellow |
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 | |
import sam45tool | |
ddir = '../../../download/' | |
d1 = sam45tool.load_sldump(ddir+'SAM45.BET5ori.nstest2.pjtest.20150428155923.A1.txt') | |
d2 = sam45tool.load_sldump(ddir+'SAM45.BET5ori.nstest2.pjtest.20150428163101.A1.txt') | |
lev1 = sam45tool.loadtxt_panda(ddir+'20150428155923.txt') |
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 zobs_tools | |
g1 = zobs_tools.forest_co_3line(1024, 3072, 64, 64) | |
print(g1.generate()) | |
g2 = zobs_tools.forest_co_3line(2048, 2048, 128, 64) | |
print(g2.generate()) | |
g3 = zobs_tools.forest_co_3line(1024, 3072, 64, 64) | |
print(g3.generate()) |
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
INFO 2016-04-21 01:27:12,187 [LoggingFilter(101)] GET http://192.168.100.184/data_transfer 101 192.168.100.192 1[ms] | |
INFO 2016-04-21 01:27:12,188 [DataTransferEndpoint(50)] websocket open: 4 : 2 | |
INFO 2016-04-21 01:27:12,196 [DataTransferEndpoint(59)] /usr/local/tomcat/webapps/ROOT/ | |
INFO 2016-04-21 01:27:12,558 [DataTransferEndpoint(68)] INFO 2016-04-21 01:27:12,555 [AbstractBat(26)] DataTransferBat is start. | |
INFO 2016-04-21 01:27:12,729 [DataTransferEndpoint(68)] Env [KNOWLEDGE_HOME] was not found. | |
INFO 2016-04-21 01:27:12,797 [DataTransferEndpoint(68)] INFO 2016-04-21 01:27:12,797 [DBConnenctionLogic(35)] Custom connection setting is exists. | |
INFO 2016-04-21 01:27:14,577 [DataTransferEndpoint(68)] INFO 2016-04-21 01:27:14,577 [DatabaseMetaDataDao(114)] Read Table info: access_logs | |
INFO 2016-04-21 01:27:14,579 [DataTransferEndpoint(68)] INFO 2016-04-21 01:27:14,579 [DatabaseMetaDataDao(114)] Read Table info: account_images | |
INFO 2016-04-21 01:27:14,581 [DataTransferEndpoint(68)] INFO 2016-04-21 01 |
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
# for python 3.5 | |
import time | |
import numpy | |
import matplotlib | |
matplotlib.use('TkAgg') | |
import matplotlib.pyplot | |
step = 0.2 | |
start = 0 |
OlderNewer