博文

FocusBold Reader 隐私权政策

政策需说明: 收集范围:仅获取用户主动输入的 OpenAI API Key、模型名以及用户触发时的当前页面文本;不会采集账号、密码或后台跟踪数据。 使用方式:API Key 存于 chrome.storage.sync,仅用于向 api.openai.com 发出用户请求;页面文本仅在请求过程中短暂发送给 OpenAI,用于生成加粗摘要;扩展自身不持久保存、不分享、不出售。 数据安全:解释从 Chrome 同步存储读取时遵循 Chrome 的加密/同步策略;提醒用户可随时在设置中清除 API Key。 第三方共享:除 OpenAI API 外不与其他第三方共享数据;列出 OpenAI 可能处理数据的方式,并附上 OpenAI 隐私声明链接( https://openai.com/privacy)。 用户控制:告知可在扩展选项页删除 API Key,可卸载扩展以停止一切数据处理。 更新机制:说明若政策更新会在同一 URL 发布新版本,并标注生效日期与联系方式(邮箱)。

安装第三方python包

 第三方包需要安装的特征是带有setup.py文件 安装方法: python setup.py build python setup.py install 将build文件夹中生成的文件copy到自己的主程序相同目录即可被import。

adjust the mouse scroll speed in Ubuntu?

http://www.nicknorton.net/?q=node/10 sudo apt-get install imwheel touch a .sh file with content: #!/bin/bash # Version 0.1 Tuesday, 07 May 2013 # Comments and complaints  http://www.nicknorton.net # GUI for mouse wheel speed using imwheel in Gnome # imwheel needs to be installed for this script to work # sudo apt-get install imwheel # Pretty much hard wired to only use a mouse with # left, right and wheel in the middle. # If you have a mouse with complications or special needs, # use the command xev to find what your wheel does. # ### see if imwheel config exists, if not create it ### if [ ! -f ~/.imwheelrc ] then cat >~/.imwheelrc<<EOF ".*" None,      Up,   Button4, 1 None,      Down, Button5, 1 Control_L, Up,   Control_L|Button4 Control_L, Down, Control_L|Button5 Shift_L,   Up,   Shift_L|Button4 Shift_L,   Down, Shift_L|Button5 EOF fi #############################...

修改pip源

Windows: user\zhang3\pip\pip.ini " [global] timeout = 6000 index-url= http://pypi.tuna.tsinghua.edu.cn/simple trusted-host=pypi.tuna.tsinghua.edu.cn proxy=http://127.0.0.1:port/ "

将实际坐标转为火星坐标

#!/usr/bin/env python #Source: https://on4wp7.codeplex.com/SourceControl/changeset/view/21455#EvilTransform.cs # NO WARRANTY OR GUARANTEE import math a = 6378245.0 ee = 0.00669342162296594323 def transformLat (x , y): ret = - 100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y + 0.2 * math.sqrt(math.fabs(x)); ret += ( 20.0 * math.sin( 6.0 * x * math.pi) + 20.0 * math.sin( 2.0 * x * math.pi)) * 2.0 / 3.0 ; ret += ( 20.0 * math.sin(y * math.pi) + 40.0 * math.sin(y / 3.0 * math.pi)) * 2.0 / 3.0 ; ret += ( 160.0 * math.sin(y / 12.0 * math.pi) + 320 * math.sin(y * math.pi / 30.0 )) * 2.0 / 3.0 ; return ret; def transformLon (x , y): ret = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * math.sqrt(math.fabs(x)); ret += ( 20.0 * math.sin( 6.0 * x * math.pi) + 20.0 * math.sin( 2.0 * x * math.pi)) * 2.0 / 3.0 ; ret += ( 20.0 * math.sin(x * math.pi) + 40.0 * math.sin(x / 3.0 * math.pi)) * 2.0 / 3.0 ; ret += ( 150.0 * math.sin(x / 12.0 * math.p...

基于iptables的snmp协议打通

处理甲公司集成乙公司某系统。系统通过发布snmp服务,通过snmpwalk/snmptrap可以获取数据。 但是乙公司不提供给甲公司电脑直接访问,通过一台中间机器采集。 甲公司服务器A Sindows server 2012 乙公司服务器B Windows server ? 中间服务器C Centos 7 A--C--B A无法直接pingB B无法直接pingA C可以与A或Bping通。 一)snmpwalk集成方法 解决方法: 在A上配置静态路由,去往B的下一跳是与A通信的C的网卡一IP。 在B上配置静态路由 ,去往A的下一跳是与B通信的C的网卡二IP。 在C上配置内核转发(ipv4 forward =1),iptables NAT。 数据流向: 在A上执行snmpwalk -v2c -c commnunity IP(B) OID  系统将包通过网卡发往C 在 C上配置NAT,将snmp uDP源IP换成C,目标IP不变。snmp包被路由出网卡二。 B返回结果给C。 在C上配置NAT,将snmp UDP目标换成A,snmp包被路由出网卡一。 至此A成功采集B的snmp服务结果。 二)B发往A的snmptrap解决方法: 在C上配置snmptrapd服务 配置要求:所有B发往本机的snmptrap,全部转发给A。 通过netstat检查本机udp监听162端口。 至此A成功收到来自B的snmptrap告警。

求阴影部分面积,小学奥数

图片
125.4592