Skip to content

Instantly share code, notes, and snippets.

View randcrackex1.py
import random, time
from randcrack import RandCrack
import string
random_id_characters = string.ascii_letters + string.digits
random.seed(time.time())
rc = RandCrack()
for i in range(624):
View 5gmecsurvey.md

simple illustration

https://zhuanlan.zhihu.com/p/33324744

sumarry

https://www.zhihu.com/question/322228254/answer/667226755

  • 到 2020 年全球连接到网络的设备将达到约 208 亿台,移动端应用将迫切需要一个更有竞争力、可扩展,同时又安全和智能的接入网。而提供网络服务是运营商的主体业务。
  • 所以互联网公司是希望运营商可以提供覆盖全国的丰富边缘计算节点资源,他们可以从中选择部分边缘点弹性的租用/调用MEC服务
  • 务,但是互联网公司对边缘节点的位置及业务量的需求均是高度动态的,运营商很难在这种不确定性中规划MEC的建设规模与规格,MEC的业务利用率也不一定有保证,从而商业收益也存在不确定性,
  • 这种情况下运营商会稳妥起见就会仍然以本地区域性的ICT客户项目为主按需建设部署MEC。
@changtimwu
changtimwu / t4tensortsurvey.md
Last active Apr 26, 2020
T4 and TensorRT Survey
View t4tensortsurvey.md

Prepare

reference: https://github.com/NVIDIA/retinanet-examples

CLI session dump

if you see retinanet_rn50fpn.pth crashed, please see solution here

root@4f884f99f02d:~/work# odtk export retinanet_rn50fpn.pth  retinanet_rn50fpn.plan
Loading model from retinanet_rn50fpn.pth...
View forblue.md

please paste the following commands

set mtdids 'nand0=armada-nand'                                                                                                 
set mtdparts 'mtdparts=armada-nand:16m(boot)ro,-(rootfs)'                                                                      
set usbType 3                                                                                                                  
set dtbfile armada-385-qnap.dtb                                                                                                
set ubifn 'ubifs_128.img'                                                                                                      
set ubiroot 'ubi0'                                                                                                             
set bootcmd 'run ubiboot'                                                                                                      
View palindrome.py
def measure_palindrome(prefix,postfix):
i=0
while i<len(prefix) and i<len(postfix):
if prefix[-i-1]!=postfix[i]:
break
i+=1
return i
def longest_palindrome(s):
longest=""
@changtimwu
changtimwu / fissiontrigger_foraws.md
Created May 26, 2018
Analogy of Fission triggers for AWS users
View fissiontrigger_foraws.md
  • HTTP triggers (routes) -> API gateway
  • Time triggers (timers) -> Scheduled Events
  • message queue triggers -> SQS
@changtimwu
changtimwu / btcmerkle.ts
Created Mar 13, 2018
validate latest bitcoin block's hash of merkle root
View btcmerkle.ts
import fetch from 'node-fetch'
import * as crypto from 'crypto'
let sha256 = (x: Buffer): Buffer =>
crypto.createHash('sha256').update(x).digest()
interface UTXO_IN {
sequence: number
witness: string
script: string
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/>
<script src="http://cmx.io/v/0.1/cmx.js"></script>
<body>
<scene id="scene1">
<label t="translate(0,346)">
<tspan x="0" y="0em">Try Comix</tspan>
</label>
View greeter.ts
class Greeter {
greeting: string;
constructor(message: string) {
this.greeting = message;
}
greet() {
return "Hello, " + this.greeting;
}
}
View pasteboard.md