Posts

Gone with the Wind

https://www.amazon.com/Gone-Wind-Margaret-Mitchell

Deep Learning with Python

https://www.manning.com/books/deep-learning-with-python

How to Win Friends and Influence People

https://www.amazon.com/How-Friends-Influence-People-Chinese

Books I read this year

https://www.gatesnotes.com/About-Bill-Gates/Best-Books-2017

Enabling Enhanced Networking on Ubuntu

sudo apt-get update && sudo apt-get upgrade -y linux-aws

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide//sriov-networking.html#enhanced-networking-ubuntu

VLAN

VLAN(802.1Q)是一个局域网技术,能够将一个局域网的广播域隔离为多个广播域,常被用来实现一个站点内不同的部门间的隔离

数据中心网络虚拟化——NVo3技术端到端隧道

NVo3(Network Virtualization over Layer 3),是IETF 2014年十月份提出的数据中心虚拟化技术框架。

NVo3基于IP/MPLS作为传输网,在其上通过隧道连接的方式,构建大规模的二层租户网络。NVo3的技术模型如下所示,

PE设备称为NVE(Network Virtualization Element),VN Context作为Tag标识租户网络,P设备即为普通的IP/MPLS路由器。

NVo3在设计之初,VxLAN与SDN的联合部署已经成为了数据中心的大趋势,因此NVo3的模型中专门画出了

NVA(Network Virtualization Authority)作为NVE设备的控制器负责隧道建立、地址学习等控制逻辑

VxLAN(Virtual eXtensible LAN,RFC 7348)

Vmware和Cisco联合提出的一种二层技术,突破了VLAN ID只有4k的限制,允许通过现有的IP网络进行隧道的传输。

别看VxLAN名字听起来和VLAN挺像,但是两者技术上可没什么必然联系。VxLAN是一种MACinUDP的隧道.

NvGRE

NvGRE(Network virtualization GRE,RFC draft)是微软搞出来的数据中心虚拟化技术,是一种MACinGRE隧道。它对传统的GRE报头进行了改造,增加了24位的VSID字段标识租户,而FlowID可用来做ECMP。由于去掉了GRE报头中的Checksum字段,因此NvGRE不支持校验和检验。NvGRE封装以太网帧,外层的报头可以为IPv4也可以为IPv6

https://www.sdnlab.com/nv-subject/

创建BUCKET

使用两种方式之一创建BUCKET

  • terraform

    git clone https://github.com/wubigo/iaas
    
    cd s3
    
    terraform apply
    
    
  • awscli

    aws s3 website s3://s.wubigo.com/ --index-document index.html --error-document 404.html
    aws s3api put-bucket-policy --bucket s.wubigo.com --policy file://policy.json
    

确认配置

aws s3api get-bucket-website --bucket s.wubigo.com
{
    "IndexDocument": {
        "Suffix": "index.html"
    },
    "ErrorDocument": {
        "Key": "404.html"
    }
}

配置DNS C记录

查看S3 Website Endpoints: s.wubigo.com.s3-website-ap-northeast-1.amazonaws.com

CNAME Record	    s    s.wubigo.com.s3-website-ap-northeast-1.amazonaws.com

上传站点内容

aws s3 cp wubigo.github.io s3://s.wubigo.com/ --recursive

go version go version go version go1.13.5 windows/amd64 vs proxy 根据code提示自动安装插件 手工安装插件 go代理配置 set http_proxy=http://127.0.0.1:4910 git代理配置 git config --global http.proxy https://127.0.0.1:4910 git config --global http.sslverify "false" 手工安装插件 go get -u -v github.com/go-delve/delve/cmd/dlv go get -u -v github.com/ramya-rao-a/go-outline go get -u -v github.com/ramya-rao-a/go-outline go get -u -v github.com/acroca/go-symbols go get -u -v github.com/mdempsky/gocode go get -u -v github.com/rogpeppe/godef go get -u -v golang.org/x/tools/cmd/godoc go get -u -v github.

与回调函数的区别 不用写错误条件if (err) return callback(err) Promise能被作为对象返回并被后期调用 回调 function successCallback(result) { console.log("Audio file ready at URL: " + result); } function failureCallback(error) { console.error("Error generating audio file: " + error); } createAudioFileAsync(audioSettings, successCallback, failureCallback); promise const promise = createAudioFileAsync(audioSettings); promise.then(successCallback, failureCallback); or createAudioFileAsync(audioSettings).then(successCallback, failureCallback); 状态 Promise有三种状态 pending: Initial Case where promise instantiated. fulfilled: Success Case which means promise resolved. rejected: Failure Case which means promise rejected.

对象创建有如下几种方式 使用{} let animal = {} animal.name = 'Leo' animal.energy = 10 animal.eat = function (amount) { console.log(`${this.name} is eating.`) this.energy += amount } animal.sleep = function (length) { console.log(`${this.name} is sleeping.`) this.energy += length } animal.play = function (length) { console.log(`${this.name} is playing.`) this.energy -= length } 构造函数 function Animal (name, energy) { let animal = {} animal.name = name animal.energy = energy animal.eat = function (amount) { console.

Architecture domain

Since Stephen Spewak’s Enterprise Architecture Planning (EAP) in 1993, and perhaps before then, it has been normal to divide enterprises architecture into four architecture domains.

  • Business architecture,
  • Data architecture,
  • Applications architecture,
  • Technology architecture.

Layers of the enterprise architecture

set registry npm config set registry=http://registry.npm.taobao.org npm config ls -l userconfig = "C:\\Users\\Administrator\\.npmrc" declare variables ES6 comes with two more options to declare your variables: const and let. In JavaScript ES6, you will rarely find var anymore. A variable declared with const cannot be re-assigned or re-declared. It cannot get mutated (changed, modified) Immutability is embraced in React and its ecosystem. That’s why const should be your default

Machine Learning 101 slidedeck

https://docs.google.com/presentation/d/1kSuQyW5DTnkVaZEjGYCkfOxvzCqGEFzWBy4e9Uedd9k/preview?imm_mid=0f9b7e&cmp=em-data-na-na-newsltr_20171213&slide=id.g183f28bdc3_0_90

AWS免费类型 首次注册后的12个月免费 永久免费 试用 aws永久免费的服务 计算服务 Lambda 1百万请求/月 400,000 GB-seconds of compute time per month Step 4000/月 存储 DynamoDB 25GB S3 The S3 free tier allows users to store 5 GB of data with standard storage, issue 20,000 GET requests and 2,000 PUT requests, and transfer 15 GB of data out each month Glacier 10GB

create rest api resource

awslocal apigateway create-rest-api --name 'My First API' --description 'This is my first API'
awslocal apigateway get-rest-apis                                         {
    "items": [
        {
            "createdDate": 1574513755,
            "id": "tjc336382o",
            "name": "hello_api2"
        },
        {
            "description": "This is my first API",
            "createdDate": 1574513755,
            "id": "foyylqv018",
            "name": "My First API"
        }
    ]
}

查看本月费用 The Cost Explorer API enables you to programmatically query your cost and usage data. You can query for aggregated data such as total monthly costs or total daily usage. You can also query for granular data, such as the number of daily write operations for Amazon DynamoDB database tables in your production environment Linux aws ce get-cost-and-usage --time-period Start=$(date -u -d "$TODAY" '+%Y-%m-01'),End=$(date -u +"%Y-%m-%d" --date="+1 day") --granularity MONTHLY --metrics UnblendedCost --output text 注意:CE服务是按api调用次数收费

前提条件 配置AWS aws configure list Name Value Type Location ---- ----- ---- -------- profile <not set> None None access_key ****************s-ok shared-credentials-file secret_key ****************-key shared-credentials-file region local config-file ~/.aws/config ~/.aws/config [default] output = json region = local ~/.aws/credentials [default] aws_access_key_id = any-id-is-ok aws_secret_access_key = fake-key 启动aws本地服务 localstack start 创建EC2 配置 mkdir ec2 cd ec2 touch ec2.tf ec2.tf provider "aws" { profile = "default" region = "us-east-1" endpoints { ec2 = "http://localhost:4597" sts = "http://localhost:4592" } } resource "aws_instance" "example" { ami = "ami-2757f631" instance_type = "t2.

标准设备 Bridge: A Linux bridge behaves like a network switch. It forwards packets between interfaces that are connected to it. It’s usually used for forwarding packets on routers, on gateways, or between VMs and network namespaces on a host. It also supports STP, VLAN filter, and multicast snooping. TUN: TUN (network Tunnel) devices work at the IP level or layer three level of the network stack and are usually point-to-point connections.

disable Taskbar thumbnail preview on Windows

https://www.windowscentral.com/how-disable-taskbar-thumbnail-preview-windows-10

最近在做智慧工地的项目,“智慧工地”的建设很大一部分信息主要是来自于工程BIM模型。 大部分情况下,BIM模型的精确度决定了“智慧工地”的开展程度。 “智慧工地”建设中,BIM模型的应用主要集中在以下几个方面:

  • 工程量的统计:分析各施工流水段各材料的工程量,如混凝土的工程量。

  • 施工模拟:施工进度计划与BIM模型相关联,对施工过程进行模拟。将实际工程进度与模拟进度进行对比,可以直观的看出工程是否滞后。

  • 可视化交底:通过BIM的可视化特点,对施工方案进行模拟,对施工人员进行3D动画交底,提高了交底的可行性。

  • 节点分析: 对复杂节点进行BIM建模,通过模型对复杂节点进行分析。

  • 综合管线碰撞检测: 检测预留孔洞、机电、设备管线安装碰撞。

从具体实现的角度对BIM和CAD做个比较

CAD BIM
工具集 2D(3D通过划线) 3D
连接过程 直接(2D对象直接连接) 间接(3D对象通过参数装配)
视图 高度具体的可视化视图 动态流线型视图,可随意放大,缩小
知识复用 MODEL(部件从MODEL抽取,而且部件的修改同时同步到MODEL)

基于WEB的3D建模工具

On the other hand, convolution is most typically done with 3x3 windows and no stride (stride 1). MATPLOTLIB Matplot is a python library that help us to plot data. The easiest and basic plots are line, scatter and histogram plots. Line plot is better when x axis is time. Scatter is better when there is correlation between two variables Histogram is better when we need to see distribution of numerical data.

Overlay vs underlay in summary

An Underlay network is the physical network responsible for the delivery of packets like DWDM, L2, L3, MPLS, or internet, etc. while an overlay is a logical network that uses network virtualization to built connectivity on top of physical infrastructure using tunneling encapsulations such as VXLAN, GRE, IPSec.

https://telcocloudbridge.com/blog/overlay-vs-underlay-networks/

Some things worth noting in br_add_if:

  • Only ethernet like devices can be added to bridge, as bridge is a layer 2 device.
  • Bridges cannot be added to a bridge.
  • New interface is set to promiscuous mode: dev_set_promiscuity(dev, 1)

https://goyalankit.com/blog/linux-bridge