Posts

函数计算有很多使用场景,今天介绍定时任务调度 例如每周六生成业务报表 事件类别 资源生命周期事件 HTTP请求 消息队列 调度 调度事件 define event rules that self-trigger regularly and configure a target action to do some regular work. So you can define an Amazon Lambda function or AWS Step Functions state machine as scheduled targets. Hence, when this event is triggered at the specified time or interval you defined, your function or state machine is executed. These types of events are called scheduled Amazon CloudWatch Events

PIP安装镜像

mkdir ~/.pip
cat <<EOF > ~/.pip/pip.conf
 [global]
 trusted-host =  mirrors.aliyun.com
 index-url = http://mirrors.aliyun.com/pypi/simple
EOF

或者

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

PYTHON 镜像

ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443)

$HOME/.config/pip/pip.conf

[global]

trusted-host=mirrors.aliyun.com

index-url=http://mirrors.aliyun.com/pypi/simple/

WINDOWS 10

Python 3.6.8
  File "C:\code\venv3\lib\site-packages\pip\_vendor\distlib\scripts.py", line 383, in _get_launcher
    raise ValueError(msg)
ValueError: Unable to find resource t64.exe in package pip._vendor.distlib
python -m pip uninstall pip
python -m ensurepip
python -m pip install -U pip

python3

  • 改变操作系统的地区为美国

否则报UnicodeDecodeError: ‘gbk’ codec can’t decode

python-3.6.8-amd64

py -3.6 -m pip install virtualenv
py -3.6 -m virtualenv venv3
.\venv3\script\activate
pip install zappa

git clone https://github.com/Miserlou/Zappa.git
cd zappy/example
pip install flask
zappa deploy dev_event
  • 检查状态

    zappa  status dev_api
    

FAQ

  • IllegalLocationConstraintException

    get this error if you're trying to create a bucket with a name that's already been taken
    
    

https://stackoverflow.com/questions/49174673/aws-s3api-create-bucket-bucket-make-exception

--create-bucket-configuration LocationConstraint=eu-west-1

在公有云厂商的新加坡或香港地区免费申请一台免费云主机(可选) 利用terraform创建一台云主机 git clone [email protected]:wubigo/iaas.git cd iaas\aws\ec2 .\apply Apply complete! Resources: 2 added, 0 changed, 0 destroyed. Outputs: instance_id = i-069i247af71871dd9 public_ip = 13.113.195.66 ssh [email protected] ubuntu@ip-10-12-0-247:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04 LTS Release: 20.04 Codename: focal 也可以直接在web控制台根据向导创建 设置安全组 https://wubigo.com/post/vpn-with-wireguard/ stop ubuntu pop-up “Daemons using outdated libraries” when using apt /etc/needrestart/needrestart.conf $nrconf{restart} = 'a' 搭建隧道服务器(定制的端口) git clone https://github.com/wubigo/algo.git git clone https://github.

The size of the market for multiparty, multicloud data and code aggregation is enormous and only grows larger as companies capture every last bit of data. Vendia’s serverless-based technology offers benefits such as ease of experimentation, no operational heavy lifting and a pay-as-you-go pricing model, making it both very consumable and highly disruptive

config climc service-config-edit region2 or kubectl describe cm default-region -n onecloud region.conf log_level: debug log_verbose_level: 10 enable_host_health_check: false enable_ssl: false port: 30888 port_v2: 30888 依赖的模块 HTTP web framework github.com/gin-gonic/gin ORM https://github.com/go-gorm/gorm region endpoint climc endpoint-show b0d33d8b370c42418cb3c6e51442c072 +--------------------+----------------------------------+ | Field | Value | +--------------------+----------------------------------+ | can_delete | false | | can_update | true | | created_at | 2020-06-23T03:03:20.000000Z | | deleted | false | | enabled | true | | id | b0d33d8b370c42418cb3c6e51442c072 | | interface | public | | is_emulated | false | | name | compute_v2-public | | public_key_bit_len | 0 | | region_id | region0 | | service_id | fb54a285aa3e4c848298148596011aa1 | | service_name | region2 | | service_type | compute_v2 | | update_version | 0 | | updated_at | 2020-06-23T03:03:20.

系统设置 /etc/yum.conf obsoletes=0 obsoletes=1: 安装k8s 1.15.8会报一个依赖错误 安装ansible sudo yum install epel-release sudo yum install python-pip pip install ansible 安装kubelet(可选) OCADM创建K8S的前提条件是kebelet正常工作 安装kubelet OCBOOT git clone https://github.com/yunionio/ocboot.git cd ocboot ./run.py ./config-allinone.yml allinone.yml mariadb_node: use_local: true hostname: 192.168.137.190 user: root db_user: root db_password: qwe123 primary_master_node: #master_node: use_local: true hostname: 192.168.137.190 user: root db_host: 192.168.137.190 db_user: root db_password: qwe123 onecloud_user: demo onecloud_user_password: demo@123 controlplane_host: 192.168.137.190 controlplane_port: "6443" as_host: true registry_mirrors: - https://lje6zxpk.

最近黑客新网也被墙了,WTF lynx https://news.ycombinator.com/news 1. Generics and Compile-Time in Rust (pingcap.com) 107 points by Bella-Xiang 4 hours ago | hide | 17 comments 2. Adobe to remove Flash Player from web site after December 2020 (adobe.com) 740 points by michaelhoffman 14 hours ago | hide | 412 comments 3. How many of you know that the team is working on something that no-one wants? (iism.org) 255 points by kiyanwang 8 hours ago | hide | 136 comments 4.

FIDO

Fast Identity Online (FIDO)

WebAuthn was officially recognized as a W3C web standard in March 2019. Today, WebAuthn is part of the FIDO Alliance’s FIDO2 specifications and the FIDO Alliance runs certification programs to ensure compliance

虚机网卡地址

配置静态IP

C:\Documents and Settings\All Users\Application Data\VMware\vmnetdhcp.conf

host VMnet8 {
    hardware ethernet 00:0C:29:23:AV:67;
    fixed-address 192.168.137.170;
}

重启VMWARE DHCP服务

net stop vmnetdhcp
net start vmnetdhcp

自动启动网卡 CENTOS安装完后,网卡默认没有激活,无法分配IP地址 /etc/sysconfig/network-scripts/ifcfg-enp0s3 DEVICE=enp0s3 BOOTPROTO=dhcp ONBOOT=yes systemctl restart network set the default route on interface DEFROUTE="yes" 删除MariaDB rpm -qa | grep mariadb sudo yum remove -y mariadb mariadb-server rpm -qa | grep mariadb yum remove -y mariadb-libs-5.5.65-1.el7.x86_64 rm -rf /var/log/mariadb rm -f /var/log/mariadb/mariadb.log.rpmsave rm -rf /var/lib/mysql rm -rf /usr/lib64/mysql rm -rf /usr/share/mysql install sudo yum install MariaDB-server sudo systemctl start mariadb.service 安装polipo git clone https://github.

准备 iptables cat <<EOF | sudo tee /etc/modules br_netfilter EOF sudo modprobe br_netfilter lsmod | grep br_netfilter cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 EOF sudo sysctl --system install container runtime curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" sudo apt-get update apt-cache madison docker-ce sudo apt-get install docker-ce=17.12.1~ce-0~ubuntu sudo usermod -aG docker bigo setup vpn and proxy

图像处理中的卷积核kernel

简介

卷积核(kernel),也叫卷积矩阵(convolution matrix)或者掩膜(mask),本质上是一个非常小的矩阵,最常用的是 3×3 矩阵。主要是利用核与图像之间进行卷积运算来实现图像处理,能做出模糊、锐化、凹凸、边缘检测等效果。

卷积运算

第一个矩阵是卷积核(其中的每个元素都是权重),第二个矩阵是被处理的矩阵,这里的并不是真正矩阵运算中,而是将卷积核中的行和列都反转再*,将计算得到的加权结果赋值给[2, 2]位置处. 将一个比较大的原始矩阵的每一个位置处都根据核进行上述的运算,就得到整个原始矩阵的加权平均结果,也就是原始矩阵卷积运算后的结果

[1]https://blog.csdn.net/i_silence/article/details/116483732

软件工程师为了找到工作,花费大量的时间在leetcode上刷题

然后为面试制作一份完美的简历。

一旦在创业公司或在FANG巨头中找到自己的心仪的工作,发现

为了面试所做的技术准备在实际工作中根本排不上用场。

下面我们来谈谈我们对于由TechLead首创的高效程序员的7个习惯

的个人看法

学会阅读别人的代码

能快速识别出一个项目是否值得

避免不必要的会议

代码管理工具git

书写简单的易维护的代码

要事优先并学会拒绝

从运营的角度进行系统设计

https://medium.com/better-programming/7-habits-of-highly-effective-programmers-563ee3b63f33

While HTTP is a good choice for displaying information only once, MQTT is the solution whenever you want to enable communication (exchanging messages (data) ) frequently. MQTT points out its ability to hold connections open and its way of handling data formats. Both enable successful, reliable message transfer. On the other hand, if you do not exchange messages frequently, HTTP should be your choice. 连接 keep-connection-open vs request-response MQTT is superior to HTTP if you have devices that communicate regularly.

4月8号的更新,出现了如下问题

https://answers.microsoft.com/en-us/windows/forum/all/input-indicator-doesnt-work-well-and-icon-missing

通过卸载更新把更新删除后,系统恢复正常

删除本地下载的更新文件

https://winaero.com/blog/delete-downloaded-windows-update-files-in-windows-10/

C:\Windows\SoftwareDistribution\Download

B2提供免费的10G存储空间, 而且不需要预先设置支付信息例如信用卡认证等。

而且文件上传下载快速

安装

pip install --upgrade b2

配置

b2 authorize-account [<applicationKeyId>] [<applicationKey>]

上传

b2 upload-file cmp000 "Commander 8.1.0 Installer (x64).zip" cmp_commander_810_x86.zip

Commander 8.1.0 Installer (x64).zip: 100%|███████████████████████████| 835M/835M [06:14<00:00, 2.23MB/s]
URL by file name: https://f000.backblazeb2.com/file/cmp000/cmp_commander_810_x86.zip
URL by fileId: https://f000.backblazeb2.com/b2api/v2/b2_download_file_by_id?fileId=4_z5fb65c33d39d419a79180f12_f20359e5b85eeada6_d20200405_m102029_c000_v0001066_t0051
{
  "action": "upload",
  "fileId": "4_z5fb65c33d39d419a79180f12_f20359e5b85eeada6_d20200405_m102029_c000_v0001066_t0051",
  "fileName": "cmp_commander_810_x86.zip",
  "size": 835119744,
  "uploadTimestamp": 1586082029000
}

云管平台赋能企业在多云环境下,对服务或资源自身和生命周期进行自动化的管理。

当前行业主要聚焦在可用行,成本管理,云安全。

平台支持要求

  • 公有云

  • 私有云(openstack/VMWARE/K8S)

总概

https://solutionsreview.com/cloud-platforms/whats-changed-2020-gartner-magic-quadrant-for-cloud-management-platforms/