Skip to content

Instantly share code, notes, and snippets.

main = f xs
f xs = do
print (sin (head xs), (head xs) / pi * 180)
f $ tail xs
xs = [1,1.01..1.57]
#/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ファイルを作ります。
#theta open nicol cross nicol
0 0.001640 0.000836
10 0.001300 0.001170
20 0.001210 0.001250
30 0.001410 0.001040
40 0.001820 0.000644
50 0.002220 0.000251
60 0.002450 0.000040
70 0.002390 0.000105
80 0.002080 0.000404
main :: IO ()
main = mapM_ (print . abs . ((cos x) -) . (myCosTaylor x)) [1 .. 100]
where x = 30
fac :: Integral a => a -> a
fac 0 = 1
fac n = fac (n-1) * n
a :: Integral a => Double -> a -> Double
a x i = if odd i
autocmd!
" neovundle
set nocompatible
filetype off
if has('vim_starting')
:set runtimepath+=~/.vim/neobundle.vim
call neobundle#rc(expand('~/.vim/bundle/'))
endif
NeoBundle 'Shougo/neobundle-vim-scripts'
" Completion

date: 2013-04-02 17:58


#応理の大学院講義履修について 先輩から聞いた話まとめ。間違ってたらコメントなりしてくれ・ω・

##利点 B4の春学期はぬるい。M1の春学期は忙しい。
マスターで卒業するときは、M1の冬から就職活動をしなければならないのでマスター生活は案外忙しい。
よって、B4の間に授業をとって単位をとっておくと、幸せになれることが多い。

# -*- coding: utf-8 -*-
Plugin.create :jis_empty_reply do
on_appear do |ms|
ms.each do |m|
if m.message.to_s =~ /アルパカ/
Service.primary.post(:message => "#{"@" + m.user.idname + "(・´ェ`・)三 (・´ェ`・)", :replyto => m)
end
end
end
end
main = mapM_ print $ iterate f 1
f x = x / 2.0 + 1.0 / x
" C
autocmd FileType c nnoremap <buffer> <F5> :call <SID>execGcc()<CR>
autocmd FileType c nnoremap <buffer> <F6> :call <SID>runC()<CR>
autocmd FileType c nnoremap <buffer> <F7> :call <SID>runCToFile()<CR>
function! s:execGcc()
:w
exe ":!gcc % -lm -O2 -o %.out"
endfunction
function! s:runC()
#include <stdio.h>
int main(int argc, char const* argv[])
{
FILE *fp;
int i;
double data[255] = {0};
fp = fopen("ahya.bat", "wb");
fwrite(data, sizeof(double), 255, fp);