Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
#FreeCADスパイラル六角形をだすテスト | |
for j in range(8): | |
Base=50 | |
H=70 | |
N=20 | |
T=Base/4/2 | |
R=(Base-T*j+1)/2 | |
RTop=(Base-T*(j+1)+1)/2 |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
""" | |
Created on Sun May 9 20:45:45 2021 | |
同一フォルダにdummy.JPGとして、適当なTHETAで撮影した写真を置いておく(EXIFをコピーして流用する) | |
同一フォルダにある*.MP4を全部パースして[ファイル名]rigフォルダ0/1にそれぞれのカメラの画像を切りだす。 | |
vignette処理もしてくれる | |
注意: | |
撮影時には適宜、カメラをその場回転(雑で良い)を入れて、二つのカメラの位置関係をmeshroomが認識出来るようにすること。 | |
@author: youak |
This file contains hidden or 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
""" | |
引数に与えられた動画ファイルからmeshroomに設定すべきキャリブレーションパラメータを算出 | |
キャリブレーションボードは以下を印刷するなり、画面に表示するなりで。 | |
http://opencv.jp/sample/pics/chesspattern_7x10.pdf | |
印刷サイズは気にしなくてよい。 | |
""" | |
import cv2 | |
# assert cv2.__version__[0] == '3', 'The fisheye module requires opencv version >= 3.0.0' | |
import numpy as np | |
import sys |
This file contains hidden or 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
set BAT=%~0 | |
@if "%1"=="R" ( | |
FOR /F "tokens=3 usebackq" %%i in (`netstat -rn ^|findstr /R "\<0\.0\.0\.0" ^|findstr 172`) do ( | |
echo the IP is %%i | |
route delete 0.0.0.0 mask 0.0.0.0 %%i | |
route add 172.16.0.0 mask 255.240.0.0 %%i | |
goto exit_for | |
) |
This file contains hidden or 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
// | |
// vpnc-script-win.js | |
// | |
// Sets up the Network interface and the routes | |
// needed by vpnc. | |
// | |
// -------------------------------------------------------------- | |
// Initial setup | |
// -------------------------------------------------------------- |
This file contains hidden or 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
from scapy.all import * | |
def r(a): | |
if(a[3].qd is None or 1 != a[3].qd.qtype ):return | |
print(a[3].qd.qname.decode('utf-8')) | |
sniff(filter="udp and port 5353",prn=r,count=10000) |
This file contains hidden or 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
from scapy.all import * | |
def r(a): | |
if(a[3].qd is None):return | |
if( not 1 == a[3].qd.qtype):return | |
qname=a[3].qd.qname | |
print(qname.decode('utf-8')) | |
an=DNSRR(rrname=qname,type="A",rclass=0x8001,rdata="192.168.1.107",ttl=120) | |
d=DNS(id=0,qr=1,aa=1,ancount=1,rd=0,an=an) | |
print(d) | |
send(IP(dst="224.0.0.251",ttl=255)/UDP(dport=5353, sport=5353)/d) |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
""" | |
Created on Sun May 9 20:45:45 2021 | |
@author: youak | |
""" | |
import glob | |
files=glob.glob("*.DNG") | |
is_rig_cam=True #meshroom では depth推定できないような配置のrigカメラは逆効果っぽい(dence画像作成時にコケる) |
This file contains hidden or 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
from cmdstanpy import CmdStanModel | |
import os | |
with open("test.stan","w") as f: | |
print(""" | |
data { | |
} | |
parameters { | |
real A; | |
} | |
model { |