2025年5月7日星期三

盈透期货代码一览表

 本网页提供IB盈透证券的热门期货品种,涵盖美国、中国香港、新加坡、德国、日本等国家和地区,方便用户查询和使用。本站会不定期更新,您可收藏本页方便查看最新数据。

请注意,部分期货品种代码一致、但乘数不同,代表不同规格的期货品种,搜索代码时,请注意选择合适的合约乘数。

文章源自www.mgg101.com,转载请注明出处美港股101-https://www.mgg101.com/ying-tou-qi-huo-dai-ma-yi-lan-biao
名字代码交易所类型最小波动乘数每点价值货币
迷你玉米YCCBOT农产品0.001251,0001.25USD
道琼斯指数YMCBOT利率155USD
迷你道指MYMCBOT利率10.50.5USD
2年国债ZTCBOT利率1/2562,0007.8125USD
3年国债Z3NCBOT利率1/2562,0007.8125USD
5年国债ZFCBOT利率1/1281,0007.8125USD
10年国债TNCBOT利率1/641,00015.625USD
30年国债ZBCBOT利率1/321,00031.25USD
超长期国债UBCBOT利率1/321,00031.25USD
玉米ZCCBOT农产品0.00255,00012.5USD
30天联邦基金利率ZQCBOT利率0.00254,16710.42USD
迷你大豆YKCBOT农产品0.001251,0001.25USD
豆油ZLCBOT农产品0.000160,0006USD
豆粕ZMCBOT农产品0.110010USD
小麦ZWCBOT农产品0.00255,00012.5USD
迷你小麦YWCBOT农产品0.001251,0001.25USD
硬红冬麦KECBOT农产品0.00255,00012.5USD
糙米ZRCBOT农产品0.0052,00010USD
燕麦ZOCBOT农产品0.00255,00012.5USD
大豆ZSCBOT农产品0.00255,00012.5USD
迷你波动率VXMCFE利率0.011001USD
波动率VIXCFE利率0.051,00050USD
瘦猪肉HECME农产品0.0002540,00010USD
育肥牛GFCME农产品0.0002550,00012.5USD
标普500ESCME指数0.255012.5USD
南非兰特ZARCME外汇0.000025500,00012.5USD
纳指NQCME指数0.25205USD
迷你纳指MNQCME指数0.2520.5USD
罗素2000RTYCME指数0.1505USD
迷你罗素2000M2KCME指数0.150.5USD
日经225(日元)NIYCME指数55002,500JPY
日经225(美元)NKDCME指数5525USD
欧元EURCME外汇0.00005125,0006.25USD
迷你欧元E7CME外汇0.000162,5006.25USD
活牛LECME农产品0.0002540,00010USD
微型欧元M6ECME外汇0.000112,5001.25USD
英镑GBPCME外汇0.000162,5006.25USD
微型英镑M6BCME外汇0.00016,2500.625USD
日元JPYCME外汇0.000000512,500,0006.25USD
迷你日元J7CME外汇0.0000016,250,0006.25USD
澳元AUDCME外汇0.00005100,0005USD
迷你澳元M6ACME外汇0.000110,0001USD
加元CADCME外汇0.00005100,0005USD
瑞郎CHFCME外汇0.00005125,0006.25USD
离岸人民币CNHCME外汇0.0001100,00010CNH
新西兰元NZDCME外汇0.00005100,0005USD
印度卢比SIRCME外汇0.0000015,000,0005USD
迷你标普MESCME指数0.2551.25USD
迷你铜QCCOMEX金属0.00212,50025USD
铝ALICOMEX金属0.25256.25USD
铜HGCOMEX金属0.000525,00012.5USD
微型铜MHGCOMEX金属0.00052,5001.25USD
微型白银SICOMEX金属0.0051,0005USD
微型黄金MGCCOMEX金属0.1101USD
白银SICOMEX金属0.0055,00025USD
迷你黄金QOCOMEX金属0.255012.5USD
黄金GCCOMEX金属0.110010USD
迷你白银QICOMEX金属0.01252,50031.25USD
ICE布伦特油COILIPE能源0.011,00010USD
ICE取暖油HOILIPE能源0.000142,0004.2USD
ICE柴油GOILIPE能源0.2510025USD
可可CCNYBOT农产品11010USD
11号糖SBNYBOT农产品0.0001112,00011.2USD
菜籽油RSNYBOT农产品0.1202CAD
橘汁OJNYBOT农产品0.000515,0007.5USD
咖啡CKCNYBOT农产品0.000537,50018.75USD
2号棉花CTNYBOT农产品0.000150,0005USD
美元指数DXNYBOT指数0.0051,0005USD
微型原油MCLNYMEX能源0.011001USD
铂金PLNYMEX金属0.1505USD
原油CLNYMEX能源0.011,00010USD
取暖油HONYMEX能源0.000142,0004.2USD
汽油RBNYMEX能源0.000142,0004.2USD
迷你天然气QGNYMEX能源0.0052,50012.5USD
天然气NGNYMEX能源0.00110,00010USD
迷你原油QMNYMEX能源0.02550012.5USD
钯金PANYMEX金属0.510050USD

文章源自www.mgg101.com,转载请注明出处美港股101-https://www.mgg101.com/ying-tou-qi-huo-dai-ma-yi-lan-biao

更新日期: 2024-08-25

文章源自www.mgg101.com,转载请注明出处美港股101-https://www.mgg101.com/ying-tou-qi-huo-dai-ma-yi-lan-biao
名字代码交易所类型最小波动乘数每点价值货币
明晟中国50MCAHKFE指数0.2255USD
迷你恒生国企MCH.HKHKFE指数1.01010HKD
恒生国企HHI.HKHKFE指数1.05050HKD
迷你恒指MHIHKFE指数1.01010HKD
恒生指数HSIHKFE指数1.05050HKD
恒生科技HSTECHHKFE指数1.05050HKD
人民币美元CNHHKFE外汇0.0001100,00010CNH
美元韩元KWYKSE外汇0.110,0001,000KRW
科斯达克150KOSDQ150KSE指数0.110,0001,000KRW
迷你韩国200K200MKSE指数0.0250,0001,000KRW
韩国200指数K200KSE指数0.05250,00012,500KRW
日本政府债JGBOSE.JPN利率0.011,000,00010,000JPY
道琼斯日元DJIAOSE.JPN外汇1100100JPY
迷你东证指数MNTPXOSE.JPN指数0.251,000250JPY
日经400JPNK400OSE.JPN指数5100500JPY
迷你日经225N225MOSE.JPN指数5100500JPY
日经225N225OSE.JPN指数101,00010,000JPY
东京证券指数TOPXOSE.JPN指数0.510,0005,000JPY
新加坡自由指数SSGSGX指数0.051005SGD
铁矿石SCISGX金属0.051005USD
美元人民币UCSGX外汇0.0001100,00010CNH
韩币美元KUSGX外汇0.000000125,000,0002.5USD
印度卢比美元IUSGX外汇0.0000012,000,0002USD
印尼指数WIIDNSGX指数155USD
日经225SGXNKSGX指数55002,500JPY
新华富时H50XIN0ISGX指数2.525USD
新华富时A50XINA50SGX指数111USD
橡胶TSR20SGX农产品0.1505USD

文章源自www.mgg101.com,转载请注明出处美港股101-https://www.mgg101.com/ying-tou-qi-huo-dai-ma-yi-lan-biao

更新日期: 2024-08-25

文章源自www.mgg101.com,转载请注明出处美港股101-https://www.mgg101.com/ying-tou-qi-huo-dai-ma-yi-lan-biao
名字代码交易所类型最小波动乘数每点价值货币
欧元意大利债BTSEUREX利率0.011,00010EUR
德国DAX30(大)DAXEUREX指数12525EUR
德国DAX30(中)DAXEUREX指数155EUR
德国DAX30(小)DAXEUREX指数111EUR
斯托克600DJ600EUREX指数0.1505EUR
斯托克精选30DJSDEUREX指数0.5105EUR
斯托克50(大)ESTX50EUREX指数11010EUR
斯托克50(小)ESTX50EUREX指数0.510.5EUR
欧元10年国债GBLEUREX利率0.011,00010EUR
欧元5年国债GBMEUREX利率0.011,00010EUR
欧元2年国债GBSEUREX利率0.0051,0005EUR
德国DAX中盘MDAXEUREX指数111EUR
欧元法国债OATEUREX利率0.011,00010EUR
欧元银行业SX7EEUREX指数0.05502.5EUR
斯托克50波动率V2TXEUREX指数0.051005EUR
英国富时100ZICEEU指数0.0051,0005GBP
意大利富时指数FTMIBIDEM指数5525EUR
西班牙35指数IBEX35MEFFRV指数11010EUR
法国CAC40指数CAC40MONEP指数0.5105EUR

文章源自www.mgg101.com,转载请注明出处美港股101-https://www.mgg101.com/ying-tou-qi-huo-dai-ma-yi-lan-biao

更新日期: 2024-08-25

2025年4月6日星期日

虚拟情绪

  【读万卷书,行万里路,阅万鸟人,之二十九】虚拟情绪在现代的经典表现是极端球迷,你支持某支足球队(国家队、或者家乡队)是正常情绪,但是球队输球使你如丧考妣,这就是虚拟情绪,为了输赢打着倾向的旗号损害对方球队球迷进而更大的损害本方球队俱乐部则是虚拟情绪失控(愚昧不自知),明明赢不了,硬要求赢则是愚蠢,理智的做法是押注强队赢,让你爱的国家队替你赢钱。球迷只是一个能举例的方面,其实其他方面也很多,比如说股市情绪可能比足球情绪更具有厉害关系。


【花荣周末读史笔记系列157--变通】1、与虚拟情绪相反的是变通,中国早期的变通人物还是比较多的,伍子胥、范蠡、张仪等,后逐渐断层,至清又出现了李鸿章、袁世凯等人物。2、变通人物的代表是曹操,先是看不惯董卓专权而行刺杀,后有条件后自己变成了第二个董卓,历史多数变通人物是道德败坏的,是流氓会武术。3、近代有正义感而善良的变通人物比较少,梁启超、胡适是经典代表。


【花荣周末读史笔记系列156--虚拟情绪】1、为了王朝万世不变,帝王都希望驯化百姓为愚民,愚民弱民有秦起,并取得了阶段成功,后汉武帝、唐太宗、宋高祖不断升华强化。2、弱民的方式是抑商抑富抑进化,愚民的方式是虚拟情绪,即通过教育宣传奖惩的手段人为制造虚拟感情。3、历史上最典型的虚拟感情就是爱岳飞恨秦桧,其实两人都是宋高宗的文臣武将,宋金都是中国的土地,他们的争斗是与后人感情上是无关的,理智是中性的了解其中的客观事实,愚昧的虚拟情绪则是无缘无故的受挑唆爱恨,虚拟情绪在现实中还有许多表现,不摆脱虚拟感情则无法智慧、无法进化


【近两天卖国右派观点批判】1、贸易战影响世界经济,中国会首当其冲。(放屁)2、周末综合消息,短线利空,长线利空,恐怕比2018年更严峻。(放屁,等着踏空吧,赔死你)3、与甲方较劲,乙方只能吃更大的亏。(那要看乙方是谁)4、周一短线恐怕要低开低走,弄不好3千点也危险(放屁,放屁,放狗屁!简直胡说八道)

2023年8月4日星期五

st风控措施

1,拒绝短炒。2,不刻意炒作摘星脱帽。3,不以股权转让价、定增价、增持价等等,为心理预期锚。必须比之低很多。4,不在上涨途中追捧原有逻辑,禁止在一波高位后强烈煽动重组预期。5,无证据和迹象,不意淫重组方。禁止360等低俗不着调的流言。6,不肆意夸大涂抹股东背景。7,永不慌张,永不亢奋,永不后悔。8,买入和持有期绝不质疑自己的决定。9,不以波段思维冲击主逻辑。10,不因他人情绪而影响决策。11,没研究过的都是别人的股。12,不跟风,不盲目,不眼红。13,不过于分散投资,集中精力办事。14,长期积累,多碰熟悉股,谨慎开新股研究。15,情商大于智商,勤奋,有兴趣。

2023年5月16日星期二

Gcorelabs CDN

https://leo.moe/daily/gcorelabs-cdn.html

Gcorelabs CDN 最近有着很大的变化,最重要的是支持了 HTTP/2 的 websocket 特性,这对我们来说很有价值。今天我们就来看看 Gcorelabs 的 CDN 能否堪当重任。

全球节点分布

以下 IP 段均由博主 Leo 自写扫描软件在 BGP.TOOLS 上获得了 Gcorelabs ASN 全段 IP 扫描而来,应该是目前全网最完整的 Gcorelabs CDN IP 段整理。本文章基于 CC BY-NC-SA 4.0 协议,允许转载,但是须保留原作者名及其文章地址。

Gcorelabs 的 CDN 业务在全球有大量的节点,虽然最终没有 Cloudflare 多,但是在该覆盖的地区一点也不含糊。在亚太地区,他们家的 CDN 节点分别在新加坡(特色)、香港、首尔、伯力(特色)、东京。

新加坡

CDN IP 段:92.223.116.0/24
实际可用于 CDN 的 IP:92.223.116.200-216、92.223.116.254

新加坡 Gcorelabs 买了新加坡移动 CMI 的 Transit,故 2 者直连,延时全天稳定,通过 websocket 拉取数据流可以跑满本地的 1Gbps 宽带,如果目标主机也在新加坡的话,效果最好。对于电信来说,由于双向 NTT,网络体验非常糟糕,不推荐选新加坡的节点。联通更是直接绕了欧洲 Telia,延时和隔壁电信半斤八两。

只推荐移动用户使用新加坡节点,想通过 Gcorelabs 建站的朋友可以使用 DNSPod 或者华为云 DNS 解析服务,把移动分流到新加坡节点上。

首尔

CDN IP 段:92.223.61.0/24
实际可用于 CDN 的 IP:92.223.61.21、92.223.61.23、92.223.61.30

电信和联通去程都走 HE 导致全部绕美,电信的回程继续绕美走 Level3,而联通则走新加坡 Cogentco 回国,2 者的网络延时都不理想。移动相比之下就好了太多,双向走香港 Level3,延时依旧出色。

对于首尔地区,还是只推荐移动使用,如果建站的服务器在日本,可以考虑把移动用户解析到首尔地区。

东京

CDN IP 段:92.223.63.0/24
实际可用于 CDN 的 IP:92.223.63.10-11、92.223.63.21-29、92.223.63.254

由于目前 Gcorelabs 在东京的 BGP 优化并不算太好,所以目前到国内也就只能走 NTT,晚上炸的比较厉害,不推荐。

香港

CDN IP 段 :92.223.76.0/24、92.223.84.0/24

实际可用于 CDN 的 IP:92.223.84.248-254、92.223.76.20-21、92.223.76.23-25、92.223.76.30、92.223.76.254

Gcorelabs 在香港地区也有接入 CMI,目前处于混合路由的状态,电信去程为 NTT,回程为 CMI;联通去程为 NTT,回程为 CMI;移动去程 CMI,回程为 Level3+CMI 混合,而 Level3 的路混有绕美、绕日和香港直连的路由,虽然影响延时稳定性,但是对于速度的影响并不是很大。

Tips: 92.223.84.0/24 可能部分地区的电信用户访问不了,92.223.76.0/24 就没有这个问题。

克拉斯诺亚尔斯克

CDN IP 段:92.223.114.0/24

实际可用于 CDN 的 IP:92.223.114.4、92.223.114.6-9、92.223.114.11、92.223.114.254

作为俄罗斯中部的一个地区,这是目前已知最近的 RT 线路回程不绕欧的地区(现在伯力 RT 回程都绕德国了),电信、联通友好,移动不行。

莫斯科

CDN IP 段:92.223.123.0/24

实际可用于 CDN 的 IP:92.223.123.4-50/59/62

索菲亚

CDN IP 段:5.101.219.0/24

实际可用于 CDN 的 IP:5.101.219.5-6、5.101.219.14

布达佩斯

CDN IP 段:5.101.217.0/24

实际可用于 CDN 的 IP:5.101.217.4

伯力

CDN IP 段:92.223.110.0/24

实际可用于 CDN 的 IP:92.223.110.4/7-8、92.223.110.254

伯力现在已经全面回程绕欧,虽然离中国很近,但是价值已经不高

圣保罗

CDN IP 段:92.223.12.0/24

实际可用于 CDN 的 IP:92.223.12.4-5/8-9

圣克拉拉

CDN IP 段:92.223.120.0/24

实际可用于 CDN 的 IP:92.223.120.10/12-15/244

阿姆斯特丹

CDN IP 段:92.223.126.0/24

实际可用于 CDN 的 IP:92.223.126.18-62

萨马拉

CDN IP 段:92.223.43.0/24

实际可用于的 CDN 的 IP:92.223.43.12-15/62

扫描到的全部 CDN IP 附件

https://leo.moe/tools/gcorelabs_ip.txt


2022年11月25日星期五

世界杯 4K 2万码率 50帧抖音直播流




抖音4K 50帧


  1. http://39.135.41.243/PLTV/88888888/224/3221226716/index.m3u8?hls
复制代码

咪咕 4K HLG源 50帧
  1. http://117.136.156.3:80/000000001000/3000000010000005180/index.m3u8
复制代码

咪咕 4K HLG源 50帧 (备用)


  1. http://111.20.105.192:6610/000000001000/5000000008000023254/index.m3u8?channel-id=bestzb&Contentid=5000000008000023254&livemode=1&stbId=3
复制代码

CCTV16 4K SDR源 25帧
  1. http://live.cooltv.top/tv/aishang.php?id=cctv164k
复制代码

CCTV16 4K HLG源 25帧
  1. http://liveop.cctv.cn/hls/CCTV16HD/playlist.m3u8
复制代码

CCTV16 1080P HLG源 25帧
  1. http://[2409:8087:2001:20:2800:0:df6e:eb18]/ott.mobaibox.com/PLTV/3/224/3221228127/index.m3u8
复制代码

CCTV16 4K IPV6 HLG源 50帧

2022年8月14日星期日

python之gunicorn的配置

  • python常见的web部署搭配nginx+gunicorn,下面记录一下gunicorn的配置使用。

    安装gunicorn

    pip install gunicorn
    
    gunicorn -h  # 查看使用的命令
    

    gunicorn启动一个flask的应用程序

    # app.py
    from flask import Flask  
      
    def create_app():  
        app = Flask(__name__)  
        return app  
    app = create_app()  
      
    @app.route('/')  
    def index():  
        return 'hello world!' 
    
    if __name__ == '__main__':  
        app.run()   
    
    • 在flask的项目的目录下启动
    # 第一个app指的是app.py文件,第二个指的是flask应用的名字;
    gunicorn -w 4 -b 0.0.0.0:8000 app:app
    

    gunicorn的参数详解

    -c CONFIG    : CONFIG,配置文件的路径,通过配置文件启动;生产环境使用;
    
    -b ADDRESS   : ADDRESS,ip加端口,绑定运行的主机;
    
    -w INT, --workers INT:用于处理工作进程的数量,为正整数,默认为1;
    
    -k STRTING, --worker-class STRTING:要使用的工作模式,默认为sync异步,可以下载eventlet和gevent并指定
    
    --threads INT:处理请求的工作线程数,使用指定数量的线程运行每个worker。为正整数,默认为1。
    
    --worker-connections INT:最大客户端并发数量,默认情况下这个值为1000。
    
    --backlog int:未决连接的最大数量,即等待服务的客户的数量。默认2048个,一般不修改;
    
    -p FILE, --pid FILE:设置pid文件的文件名,如果不设置将不会创建pid文件
    
    
    --access-logfile FILE   :  要写入的访问日志目录
    
    --access-logformat STRING:要写入的访问日志格式
    
    --error-logfile FILE, --log-file FILE  :  要写入错误日志的文件目录。
    
    --log-level LEVEL   :   错误日志输出等级。
    
    
    --limit-request-line INT   :  HTTP请求头的行数的最大大小,此参数用于限制HTTP请求行的允许大小,默认情况下,这个值为4094。值是0~8190的数字。
    
    --limit-request-fields INT   :  限制HTTP请求中请求头字段的数量。此字段用于限制请求头字段的数量以防止DDOS攻击,默认情况下,这个值为100,这个值不能超过32768
    
    --limit-request-field-size INT  :  限制HTTP请求中请求头的大小,默认情况下这个值为8190字节。值是一个整数或者0,当该值为0时,表示将对请求头大小不做限制
    
    
    -t INT, --timeout INT:超过这么多秒后工作将被杀掉,并重新启动。一般设定为30秒;
    
    --daemon: 是否以守护进程启动,默认false;
    
    --chdir: 在加载应用程序之前切换目录;
    
    --graceful-timeout INT:默认情况下,这个值为30,在超时(从接收到重启信号开始)之后仍然活着的工作将被强行杀死;一般使用默认;
    
    --keep-alive INT:在keep-alive连接上等待请求的秒数,默认情况下值为2。一般设定在1~5秒之间。
    
    --reload:默认为False。此设置用于开发,每当应用程序发生更改时,都会导致工作重新启动。
    
    --spew:打印服务器执行过的每一条语句,默认False。此选择为原子性的,即要么全部打印,要么全部不打印;
    
    --check-config   :显示现在的配置,默认值为False,即显示。
    
    -e ENV, --env ENV: 设置环境变量;
    
    

    以配置文件的方式启动

    # gunicorn.conf
    
    # 并行工作进程数
    workers = 4
    # 指定每个工作者的线程数
    threads = 2
    # 监听内网端口5000
    bind = '127.0.0.1:5000'
    # 设置守护进程,将进程交给supervisor管理
    daemon = 'false'
    # 工作模式协程
    worker_class = 'gevent'
    # 设置最大并发量
    worker_connections = 2000
    # 设置进程文件目录
    pidfile = '/var/run/gunicorn.pid'
    # 设置访问日志和错误信息日志路径
    accesslog = '/var/log/gunicorn_acess.log'
    errorlog = '/var/log/gunicorn_error.log'
    # 设置日志记录水平
    loglevel = 'warning'
    
    • 启动unicorn
    gunicorn -c gunicorn.conf app:app
    

    注意:

    由于windows平台不支持gunicorn,gunicorn安装成功后,启动会出现

    ‘ImportError: No module named _curses / fcntl’错误;需要下载fcntl.py文件;

2022年6月13日星期一

Android没有ROOT删除预装的软件

 



 1241  adb shell pm list packages

 1242  adb shell pm uninstall jp.co.nttdocomo.lcsapp

 1243  adb shell pm uninstall --user 0 jp.co.nttdocomo.lcsapp

 1244  adb shell pm uninstall --user 0 com.sonymobile.email

 1245  adb shell pm uninstall --user 0 com.sony.tvsideview.videoph 

 1246  adb shell pm uninstall --user 0 com.sonymobile.entrance 

 1247  adb shell pm uninstall --user 0 com.sonyericsson.music 

 1248  adb shell pm uninstall --user 0 com.sonymobile.scan3d

 1249  adb shell pm uninstall --user 0 com.sonymobile.moviecreator.rmm 

 1250  adb shell pm uninstall --user 0 jp.co.nttdocomo.saigaiban 

 1251  adb shell pm uninstall --user 0 com.nttdocomo.android.store 

 1252  adb shell pm uninstall --user 0 com.nttdocomo.android.sdcardbackup 

 1253  adb shell pm uninstall --user 0 jp.co.nttdocomo.carriermail 

 1254  adb shell pm uninstall --user 0 com.android.contacts 

 1255  adb shell pm uninstall --user 0 com.nttdocomo.android.schedulememo 

 1256  adb shell pm uninstall --user 0 com.nttdocomo.android.mascot 

 1257  adb shell pm uninstall --user 0 com.nttdocomo.android.dmenu2 

 1258  adb shell pm uninstall --user 0 com.nttdocomo.android.msg 

 1259  adb shell pm uninstall --user 0 com.felicanetworks.mfc 

 1260  adb shell pm uninstall --user 0 com.felicanetworks.mfs

 1261  adb shell pm uninstall --user 0 com.felicanetworks.mfw.a.main 

 1262  adb shell pm uninstall --user 0 com.sonymobile.androidapp.machichara 

 1263  adb shell pm uninstall --user 0 com.nttdocomo.android.areamail 

 1264  adb shell pm uninstall --user 0 com.nttdocomo.android.kittingmanager 

 1265  adb shell pm uninstall --user 0 com.nttdocomo.android.bugreport 

 1266  adb shell pm uninstall --user 0 com.nttdocomo.android.apnsw 

 1267  adb shell pm uninstall --user 0 com.nttdocomo.android.atf 

 1268  adb shell pm uninstall --user 0 jp.co.nttdocomo.bridgelauncher 

 1269  adb shell pm uninstall --user 0 com.nttdocomo.android.accountwipe 

 1270  adb shell pm uninstall --user 0 com.nttdocomo.android.pf.dcmippushaggregator 

 1271  adb shell pm uninstall --user 0 com.nttdocomo.android.pf.dcmwappush 

 1272  adb shell pm uninstall --user 0 com.nttdocomo.android.applicationmanager 

 1273  adb shell pm uninstall --user 0 com.nttdocomo.android.accountauthenticator 

 1274  adb shell pm uninstall --user 0 com.nttdocomo.android.cloudset 

 1275  adb shell pm uninstall --user 0 com.nttdocomo.android.initialization 

 1276  adb shell pm uninstall --user 0 com.nttdocomo.android.dhome 

 1277  adb shell pm uninstall --user 0 com.nextbit.app 

 1278  adb shell pm uninstall --user 0 jp.co.nttdocomo.lcsappsub 

 1279  adb shell pm uninstall --user 0 jp.co.nttdocomo.anshinmode 

 1280  adb shell pm uninstall --user 0 com.nttdocomo.android.docomoset 

 1281  adb shell pm uninstall --user 0 com.nttdocomo.android.felicaremotelock 

 1282  adb shell pm uninstall --user 0 com.nttdocomo.android.idmanager 

 1283  adb shell pm uninstall --user 0 com.nttdocomo.android.iconcier

 1284  adb shell pm uninstall --user 0 com.nttdocomo.android.iconcier_contents 

 1285  adb shell pm uninstall --user 0 com.nttdocomo.android.voiceeditor 

 1286  adb shell pm uninstall --user 0 com.nttdocomo.android.remotelock 

 1287  adb shell pm uninstall --user 0 com.nttdocomo.osaifu.tsmproxy 

 1288  adb shell pm uninstall --user 0 com.nttdocomo.android.devicehelp 

 1289  adb shell pm uninstall --user 0 com.nttdocomo.android.wipe 

 1290  adb shell pm uninstall --user 0 com.rsupport.rsperm.ntt 

 1291  adb shell pm uninstall --user 0 com.nttdocomo.android.screenlockservice 

 1292  adb shell pm uninstall --user 0 com.nttdocomo.android.osv

 1293  adb shell pm uninstall --user 0 com.nttdocomo.android.phonemotion 

 1294  adb shell pm uninstall --user 0 com.nttdocomo.android.databackup 

 1295  adb shell pm uninstall --user 0 com.nttdocomo.android.remotelock 

 1296  adb shell pm uninstall --user 0 com.nttdocomo.android.wipe 

 1297  adb shell pm list

 1298  adb shell pm list packages

 1299  adb shell pm list packages | grep docomo

 1300  adb shell pm uninstall --user 0 com.nttdocomo.android.anmane2 

 1301  adb shell pm uninstall --user 0 com.nttdocomo.android.osv.res.overlay_305 

 1302  adb shell pm uninstall --user 0 com.sonymobile.docomoemoji.license 

 1303  adb shell pm list packages | grep docomo


2022年6月2日星期四

Python用wallet文件连接Oracle Autonomous Database

The views expressed in this article are my own and do not necessarily reflect the views of Oracle.

Have you always wanted to connect your Python applications to Oracle Autonomous Transaction Processing (ATP) or to Oracle Autonomous Data Warehouse (ADW)?

This is much easier than you ever thought. In this article I’ll tell you how to do this within a few steps.

First of all, go to the Oracle Cloud Free Tier website and sign up for a cloud account to receive access to Oracle Autonomous Database. Finally, provision an ATP instance. In my case it will be called MSATP.

Let’s start with accessing MSATP with Python. We will make only three steps for this:

  1. Download and configure the Oracle Instant Client
  2. Install the cx_Oracle for Python module
  3. Connect your Python application to the ATP instance
Es wurde kein Alt-Text für dieses Bild angegeben.

Download and configure the Oracle Instant Client

For downloading the Oracle Instant Client go to the download page. Select your architecture and download the Basic Package:

Es wurde kein Alt-Text für dieses Bild angegeben.

Unzip the file into a local directory, for example /home/opc/instantclient_19_9, on a Linux based Oracle Compute Cloud Service instance:

Es wurde kein Alt-Text für dieses Bild angegeben.

In case of no other Oracle software running on your system which could be impacted, add Instant Client to the runtime link path:

Es wurde kein Alt-Text für dieses Bild angegeben.

Finally export the library path in the shell where you run your applications:

Es wurde kein Alt-Text für dieses Bild angegeben.

Let’s continue with installing the cx_Oracle module for Python.

Install the cx_Oracle for Python module

First of all, install Python 3 if you haven’t done it before. In my example I will work with cx_Oracle 8. That’s why Python 3.5 or higher is required:

Es wurde kein Alt-Text für dieses Bild angegeben.

As you have already seen on the architectural diagram above, the cx_Oracle module will use the Oracle Client to communicate over Oracle Net with your ATP instance.

Install the cx_Oracle module from the Python Package Index (PyPI) using pip:

Es wurde kein Alt-Text für dieses Bild angegeben.

That’s it. Let’s start working with cx_Oracle and connect to the ATP instance.

Connect your Python application to the ATP instance

At the beginning you will need to download client security credentials to connect to your ATP instance. For downloading the client credentials (wallet) navigate to the Autonomous Transaction Processing details page of your ATP instance. Click on <<DB Connection>>:

Es wurde kein Alt-Text für dieses Bild angegeben.

Click on << Download Wallet >>:

Es wurde kein Alt-Text für dieses Bild angegeben.

Provide a password for your wallet and download the wallet to your Python environment. Subsequently unzip it, for example to /home/opc/wallet:

Es wurde kein Alt-Text für dieses Bild angegeben.
Es wurde kein Alt-Text für dieses Bild angegeben.

You will need only the following files to work with the cx_Oracle module: tnsnames.ora, sqlnet.ora and cwallet.sso.

You can store the wallet configuration file cwallet.sso separately from the tnsnames.ora and the sqlnet.ora files. Please remember, in any case you should store it securely. It’s important to protect this file and its contents to prevent unauthorized database access!

Edit the sqlnet.ora file with vi and enter the path to the cwallet.sso file:

Es wurde kein Alt-Text für dieses Bild angegeben.

As of now you can start accessing your ATP instance with Python. You can call off cx_Oracle.init_oracle_client() function at the beginning of your code:

Es wurde kein Alt-Text für dieses Bild angegeben.

Alternatively, you can export the environment variable TNS_ADMIN to /home/opc/wallet:

Es wurde kein Alt-Text für dieses Bild angegeben.

Test connection to the ATP instance

The following code snippet will query the products table in the sample schema SH. This read-only schema is being provisioned by default with your ATP instance:

from __future__ import print_function

import cx_Oracle
import sys
import getpass

try:
    cx_Oracle.init_oracle_client(config_dir="/home/opc/wallet")
except Exception as err:
    print(err);
    sys.exit(1);

 
password = getpass.getpass()
connection = cx_Oracle.connect('admin',password,'msatp_low')
 
sql = """
select prod_name from sh.products where rownum<5"""

print("All rows from the above query:")
cursor = connection.cursor()
for result in cursor.execute(sql):
    print(result)

print()

Copy and paste it to a file called querySH.py and run it in your Python environment:

Es wurde kein Alt-Text für dieses Bild angegeben.

This kind of connection is suitable for standalone connections, where your application will manage the user sessions to the ATP instance.

You may consider using cx_Oracle’s connection pooling for more sophisticated, performance critical scenarios and applications frequently connecting users to and disconnecting them from the ATP instance.

Bonus material: Simple Oracle Document Access (SODA)

As stated in the Oracle Documentation Simple Oracle Document Access (SODA) is a set of NoSQL-style APIs that let you create and store collections of documents (in particular JSON) in Oracle Database, retrieve them, and query them, without needing to know Structured Query Language (SQL) or how the documents are stored in the database.

cx_Oracle provides all methods and objects needed for working with SODA in your ATP instance.

The following code snippet will create a new collection in your ATP instance and insert a JSON document into this collection:

from __future__ import print_function
 
import cx_Oracle
import sys
import getpass

try:
    cx_Oracle.init_oracle_client(config_dir="/home/opc/wallet")
except Exception as err:
    print(err);
    sys.exit(1);
 

password = getpass.getpass()

connection = cx_Oracle.connect('admin',password,'msatp_low')

soda = connection.getSodaDatabase()

collection = soda.createCollection("mycollection")

content = {'empid':7782,'empdata': {'firstname': 'Scott', 'lastname': 'Tiger'},"Managerid":7839,"Deptid":10}
 
returnedDoc = collection.insertOneAndGet(content)
key = returnedDoc.key

connection.commit()
 
print('The key of the new SODA document is: ', key)


Copy and paste it to a file called soda.py and run it in your Python environment:

Es wurde kein Alt-Text für dieses Bild angegeben.

You can use the following code snippet to retrieve the JSON document stored in your new collection:

from __future__ import print_function

import cx_Oracle
import sys
import getpass

 
try:
    cx_Oracle.init_oracle_client(config_dir="/home/opc/wallet")
except Exception as err:
    print(err);
    sys.exit(1);

password = getpass.getpass()
key = input("Provide your doc key: ")

connection = cx_Oracle.connect('admin',password,'msatp_low')
soda = connection.getSodaDatabase()
collection = soda.createCollection("mycollection")

content = collection.find().key(key).getOne().getContent()

print(content)

Copy and paste it to a file called getSodaContent.py and run it in your Python environment:

Es wurde kein Alt-Text für dieses Bild angegeben.

That's it! You can now use the power and the efficiency of your Python applications with Oracle Autonomous databases!



I installed the library and when trying to access SQL in jupyter notebook with my credentials the following error appears:

DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "The specified module could not be found". See https://oracle.github.io/odpi/doc/installation.html#windows for help


As per documentation accessed on cx_Oracle page.

Step 1: install cx_Oracle

python -m pip install cx_Oracle --upgrade

Step 2: Download and extract Oracle Basic Client

For Windows download and extract Oracle Basic Instatnt client instantclient-basic-windows.x64-19.9.0.0.0dbru.zip file.

Step 3: Inform cx_Oracle module about the Instatnt Client location.

If you stick to documentation and extract them in c:\oracle folder then your script may look like this.

    import cx_Oracle
    cx_Oracle.init_oracle_client(lib_dir=r"C:\oracle\instantclient_19_9")

Now you will be free from the error.