Skip to content

Instantly share code, notes, and snippets.

View ars096's full-sized avatar

Atsushi Nishimura ars096

View GitHub Profile
@ars096
ars096 / output-ipython.txt
Last active June 14, 2019 04:47
How to notice a module imported from ipython-env
$ ipython
In [1]: import inspect
...:
...: for s in inspect.stack():
...: m = inspect.getmodule(s[0])
...: if m: print(m.__file__)
...:
/Users/nishimura/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/IPython/core/interactiveshell.py
/Users/nishimura/.pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/IPython/core/interactiveshell.py
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
necst@necst1:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 1c:1b:0d:fa:7c:f8 brd ff:ff:ff:ff:ff:ff
inet 192.168.101.126/23 brd 192.168.101.255 scope global enp0s31f6
@ars096
ars096 / xstartup
Created October 10, 2017 08:00
xstartup file for Ubuntu 16.04
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
QLOOK_SIZE = 500
# ---
import os
import numpy
import PIL.Image
import PIL.ImageTk
QLOOK_SIZE = 500
# ---
import os
import numpy
import PIL.Image
import PIL.ImageTk
# for python 3.5
import time
import numpy
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot
step = 0.2
start = 0
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
@ars096
ars096 / howto.py
Last active August 29, 2015 14:22
zobs_tools
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())
@ars096
ars096 / 01_check.py
Created May 14, 2015 02:32
NRO45-SAM45 van Vleck test
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')