基于ARM(NVIDIA-JETSON-NANO)编译NetLogo

本文主要目的为测试这块板子的性能,看看其是否有作为边缘节点的能力。

Env

Ubuntu 18.04(jetson-nano-sd-r32.1-2019-03-18)

Prepare

$ sudo set -i 's/ports.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
$ sudo apt install -y curl x11vnc openjdk openjfx libopenjfx-jni libopenjfx-java

Build

$ git clone https://github.com/NetLogo/NetLogo
$ cd NetLogo
$ git submodule update --init
$ ./sbt netlogo/compile

Run and Package

$ ./sbt netlogo/run
$ ./sbt dist/buildNetLogo

Addon: Add VNC server to your board

$ sudo apt install -y x11nvc
$ x11vnc # to generate ~/.vnc files
$ echo 'x11vnc --loop &' >> ~/.xsessionrc

Ref

https://github.com/NetLogo/NetLogo/wiki/Building

https://github.com/NetLogo/NetLogo/wiki/Releasing

Agent based modeling Strategy in forex trading market

PREFACE

Since I’ve tested S1, S2, and S3 from the DATANOTE. However, it was not so good or in other words, identical with expectation. It’s time to make a change.

BASIC MODEL AND ARCHITECTURE

As you can see from my last articles, the architecture’s infrastructure is about to go and the agent’s protocol is well defined. Now what we should do is to combine them together.

In the first phase, the simulation will JUST be a Netlogo program. If the performance is just like S1-3, then it goes to phase 2 —- treating the agents as the real from the data gained and strategy trained from the real world. And if NOT, less probable, the program must be corrected.

PRACTICAL GUIDE

1. FAKE WORLD, FAKE AGENT

2. REAL WORLD, FAKE AGENT

3. REAL WORLD, REAL AGENT

World3 Model is a choice.(System Dynamics)

https://insightmaker.com/insight/1954/The-World3-Model-A-Detailed-World-Forecaster

Build a robot assistant with nowadays cloud apis

好多年前就想做个Jarvis,当时技术所限,构建出一个比较初级的机器人后觉得它还不如一条狗。

现在随着AI以及计算技术的成熟,尤其Google Assistant已经可以跟人自然语音对话了,所以觉得可以再尝试一下,加之工作需要,所以便又再开启。

现在随着AI以及计算技术的成熟,尤其Google Assistant已经可以跟人自然语音对话了,所以觉得可以再尝试一下,加之工作需要,所以便又再开启。

当然,这里我们首先选取交互平台为微信(Web API),交互形式为语音、文字等不限形式。然后再来看看哪些平台提供的最好用且最像人。

1. Google Assistant

2. 小爱同学(小米)/天猫精灵

3. 图灵/XiaoI

4. 自建

结论(对,有结论了):

1没中文,2最难用,3比较傻,4需要各种训练。直接用3+pyweixin自定义回复就OK了。

docker using linux bridge

A. Change docker bridge
dockerd -H unix:// -b br_eth0 –fixed-cidr=172.20.230.1/24 –default-gateway 172.20.0.1

B. Create manually, but flexibly
Recreate veth pair if your docker instance was restarted or exited.

[root@172-20-17-247 ~]# docker run –network none -it tianon/network-toolbox /bin/bash
[root@172-20-17-247 ~]# docker inspect –format ‘{{.State.Pid}}’ 3
74406
[root@172-20-17-247 ~]# ip link add centos3-cont type veth peer name centos3-host
[root@172-20-17-247 ~]# brctl addif br_eth0 centos3-host
[root@172-20-17-247 ~]# ifconfig centos3-host up
[root@172-20-17-247 ~]# ip link set netns 74406 dev centos3-cont
[root@172-20-17-247 ~]# nsenter -t 74406 -n ip link set centos3-cont up
[root@172-20-17-247 ~]# nsenter -t 74406 -n ip addr add 172.20.77.141/16 dev centos3-cont
[root@172-20-17-247 ~]# nsenter -t 74406 -n ip route add default via 172.20.0.1

[root@172-20-17-247 ~]# docker exec -it 3 bash
root@39eb1da6e842:/# ping google.com
PING google.com (172.217.25.206): 56 data bytes
64 bytes from 172.217.25.206: icmp_seq=0 ttl=55 time=87.434 ms
^C— google.com ping statistics —
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 87.434/87.434/87.434/0.000 ms

C. With pipework script
https://github.com/jpetazzo/pipework
[root@172-20-17-247 ~]# pipework br_eth0 -i eth2 CONTAINERID 172.20.100.22/16
[root@172-20-17-247 ~]# pipework route CONTAINERID replace default via 172.20.0.1

Ref:
[1] https://clcnetwork.wordpress.com/2017/05/31/docker-container-and-vm-networking/

这是一篇表达

距离上一次写已经很久了,而且似乎有个趋势就是对生活越熟悉就越麻木,也同样伴随体重的增加。

写了一句话,我已经忘了落笔时的念想。

要偶尔转移压力,但不是通过思考,方法或许成熟,但是经不得劳累。

要放弃linode的集群了,因为vultr ipv6内部通信更便宜。

transfer IPv6 to IPv4 via socat

Suppose that you have an ipv6-only server A with ip [ipv6-A], and ipv4-ipv6 server B with ip (ipv4-B, [ipv6-B]).

If you wanna visit http://[ipv6-A]:80, but your ISV does not provide some ipv6 addresses. Now then, you’ll make B be your “ipv6-ipv4 relay server” with following guide.

If TCP:

root@B:~# socat tcp4-listen:2222,fork tcp6:[2001:19f0:7001:5a34:5400:01ff:feb5:5bcd]:80

If UDP:

root@B:~# socat udp4-listen:2222,fork udp6:[2001:19f0:7001:5a34:5400:01ff:feb5:5bcd]:80

Now you can visit http://ipv4-B:2222 to access http://[ipv6-A]:80

备份工具(迁云必备)

UrBackup https://www.urbackup.org/features.html
Amanda http://amanda.zmanda.com/
Bacula https://blog.bacula.org/
BareOS https://www.bareos.org
Duplicati https://www.duplicati.com
kvmBackup https://github.com/bioinformatics-ptp/kvmBackup直接说结论吧,使用下来,UrBackup与Duplicati是较为合适的两个选择。

UrBackup采用传统的CS架构,对全平台提供支持,备份选项较为丰富,而且支持公网中继;
Duplicati则是较为轻量级的选择,只要安装agent即可,支持备份目标地址较为丰富,除了传统接口外也支持AWS S3接口;
Bacula与BareOS(前者变种)属于同一体系,但后者支持更好广泛些;
Amanda除了硬盘文件备份,也多了一个MySQL数据库的备份产品;
最后一个KVMBackup则是一个脚本,限制比较多,适合单纯的KVM环境备份。

如果与ZStack对接,这俩都可以,备份存储地址可以选择FTP,这样就可以直接使用ZStack的ZStore镜像存储,格式使用raw,然后就直接启动了。