This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <dirent.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <sys/file.h> | |
#include <errno.h> | |
#include "util.h" | |
#include <vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
作者:leon lee | |
链接:https://zhuanlan.zhihu.com/p/22644277 | |
来源:知乎 | |
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 | |
*/ | |
setInterval(function() { | |
if(Date.now() >= new Date("2016-09-12 15:59:00")) { | |
$("#seckillQuantity").val(1);//1盒 | |
$(".buyButtons.J_buyButtons").click();//抢购按钮 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
target=int("1530608884") | |
now=int(time.time()) | |
print(target-now) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
def entropy(a): | |
s=sum(a) | |
e=0 | |
for x in a: | |
p=x/s | |
e+=(p)*math.log2(p) | |
return -e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
import os | |
import json | |
bucket_name="your_bucket_name" | |
output = os.popen('aws s3api list-multipart-uploads --bucket %s'%(bucket_name)) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"golang.org/x/tour/pic" | |
"image" | |
"image/color" | |
) | |
type Image struct{} | |
func (i Image)Bounds() image.Rectangle{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"golang.org/x/tour/tree" | |
"fmt" | |
) | |
// Walk walks the tree t sending all values | |
// from the tree to the channel ch. | |
func Walk(t *tree.Tree, ch chan int){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
"sync" | |
) | |
type Fetcher interface { | |
// Fetch returns the body of URL and |
NewerOlder