lixiang


  • Home

  • About

  • Tags

  • Categories

  • Archives

Calculate the Number of Uppercase Letters in a File

Posted on 2018-11-27 | Visitors:
123456789import osos.chdir("C:\\users\\lixiang\\desktop")with open("file.txt") as file: count = 0 ...
Read more »

Callatz Conjecture(3n+1 Conjecture) in Matlab

Posted on 2018-11-26 | Visitors:
1234567891011121314151617% 考拉兹猜想(Collatz conjecture)/ 3n+1猜想% 对所有自然数,如果它是奇数,则对它乘3再加1,如果它是偶数,则对它除以2,如 ...
Read more »

Generate 0 and 1 with Equal Probability

Posted on 2018-11-12 | Visitors:
一个有问题的解法:上述解法在i,j取值为0,0和1,1时,均造成死循环。正确的做法应该是把原始随机函数放入while中。 123456789101112#小年糕面试题# given A() ...
Read more »

4 Ways of Fibonacci in Python

Posted on 2018-11-12 | Visitors:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 ...
Read more »

Chrome Aw Snap

Posted on 2018-11-12 | Visitors:
帮我哥在win8上装了个Chrome,所有页面无法打开。重装Chrome也不行。提示”喔唷,崩溃啦!” 原因:百度残留的后台服务 解决办法: C:\Windows\System32\drivers\b ...
Read more »

SSH Failed to Connect to CentOS7 in Vultr

Posted on 2018-11-06 | Visitors:
SSH无法连接CentOS7(vultr)现象一:浏览器中无限循环输入用户名和密码,无法登陆console 现象二:SSH本地无法连接 SSH跳板机也无法连接 其他现象:用Chrome打开Consol ...
Read more »

CentOS install lrzsz

Posted on 2018-10-29 | In linux | Visitors:
lrzsz 官网入口:http://freecode.com/projects/lrzsz/ 1yum -y install lrzsz upload files from Windows to l ...
Read more »

Reverse String

Posted on 2018-10-24 | Visitors:
Python实现字符串反转的四种方法 切片 12def rev(s): return s[::-1] 这是采用切片的方法,设置步长为-1,也就是反过来排序。这种方法是最简洁的,也是最推荐的。 ...
Read more »

Tank

Posted on 2018-07-31 | In oj | Visitors:
某次战役中,为便于信息交互,我军侦察部门将此次战役的关键高地坐标设定为(x=0,y=0)并规定,每向东增加100米,x加1,每向北增加100米,y加1。同时,我军情报部门也破译了敌军向坦克发送的指挥信 ...
Read more »

Calculate Entropy and Divergence

Posted on 2018-07-27 | In python | Visitors:
任意摘录一段文字,统计这段文字中所有字符的相对频率。假设这些相对频率就是这些字符的概率,请计算其分布的熵。按上述同样的方法计算字符分布的概率,然后计算两段文字中字符分布的 KL 距离。 考虑到汉字总数 ...
Read more »
1…345
li xiang

li xiang

43 posts
6 categories
5 tags
GitHub Twitter Telegram
© 2022 li xiang  京ICP备18019569号
Powered by Hexo
|
Theme — NexT.Mist v5.1.4