Skip to content

Instantly share code, notes, and snippets.

#/usr/bin/python
#coding:utf8
"""
このソフトは、日本分光(JASCO)のスペクトルを記録したファイル(.jws)から波長とintensityをcsv(波長, intensity)にエクスポートすることを目的としています。
thanks to https://sites.google.com/site/victorhr02/jwsprocessor
構造体の構造について、上記ソフトウエアにお世話になりました。
構造体の解析が完全ではありません。下のintensityデータを取得するの部分のアドレスを変更するか、もしくはバイナリエディタでintensityデータが格納されている部分の開始アドレスを探してください。恐らく最後の一つながりのデータ群が始まっているアドレスです。
このソフトの実行にはpython標準ライブラリがあれば可能なはずです。つまりpython(>=2.5)を入れただけで実行可能なはずです。
jwsが溜まっているフォルダにこのファイルをぶち込み、おもむろにこのスクリプトを実行してください。フォルダ内のjwsファイルをから(波長, intensity)という形式でdataというフォルダの中に同名のcsvファイルを作ります。
@akira093
akira093 / homedir.go
Created April 25, 2018 11:42
In golang, there are two way of joining filepath.
package main
import (
"fmt"
"os/user"
"path"
"path/filepath"
)
var dbPath = "/.config/go-wol/bolt.db"
<html>
<head>
<title>
test
</title>
<meta http-equiv="Access-Control-Allow-Origin" content="*">
<meta http-equiv="Access-Control-Allow-Headers" content="*">
<meta http-equiv="Access-Control-Allow-Methods" content="GET">
</head>
<body>
import System.IO
--constants
e0 :: Double
e0 = 6.0
v1 :: Double
v1 = 3.0
v2 :: Double
v2 = 3.0
v12 :: Double
--はーいふたり組作ってー
groupOf :: Int -> [a] -> [[a]]
groupOf 0 _ = undefined
groupOf n [] = []
groupOf n xs = take n xs : groupOf n (drop n xs)
main = print $ groupOf 2 [1..11]
#!/usr/bin/env python
import matplotlib
matplotlib.use("TkAgg")
import pylab
import time
pylab.figure(figsize = (4,3))
pylab.ion()
#!/usr/bin/env python
from scipy import optimize
import pylab
import numpy
num = 100000
import pylab
import time
pylab.ion()
l = [1,2,3]
axis = pylab.gca()
for i in range(4, 100):
l.append(i)
autocmd!
" neovundle
set nocompatible
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
call neobundle#rc(expand('~/.vim/bundle/'))
" Let NeoBundle manage NeoBundle
NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'Shougo/neobundle-vim-scripts'
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.lines import Line2D
import matplotlib.animation as animation
# This example uses subclassing, but there is no reason that the proper function
# couldn't be set up and then use FuncAnimation. The code is long, but not
# really complex. The length is due solely to the fact that there are a total
# of 9 lines that need to be changed for the animation as well as 3 subplots
# that need initial set up.