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
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 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 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 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 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 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 { |
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
# -*- coding: utf-8 -*- | |
""" | |
Example implimentation for YDLIDAR X4 | |
""" | |
#pip install pyserial-asyncio | |
import serial_asyncio | |
import asyncio | |
import time | |
#spyderとかipython環境で使うときはシステムですでにasyncio使ってて喧嘩するので |
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
# -*- coding: utf-8 -*- | |
""" | |
Example implimentation for YDLIDAR X4 | |
""" | |
#pip install pyserial-asyncio | |
import serial_asyncio | |
import asyncio | |
import time | |
#spyderとかipython環境で使うときはシステムですでにasyncio使ってて喧嘩するので |
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
""" | |
isotherm functions | |
See: https://www.jstage.jst.go.jp/article/oleoscience/2/5/2_275/_pdf | |
Important variables | |
C:濃度 | |
W:吸着量 | |
S=W+C | |
""" |
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
# -*- coding: utf-8 -*- | |
""" | |
Spyder Editor | |
This is a temporary script file. | |
""" | |
import asyncio | |
import nest_asyncio | |
nest_asyncio.apply() | |
loop = asyncio.get_event_loop() |