This file contains hidden or 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
| <?php | |
| foreach (hash_algos() as $algo) { | |
| $st = microtime(); | |
| for ($i = 0; $i < 100000; $i++) { | |
| hash($algo, microtime() . $i); | |
| } | |
| $et = microtime(); | |
| list($ss, $si) = explode(' ', $st); | |
| list($es, $ei) = explode(' ', $et); | |
| $time[$algo] = $ei + $es - $si - $ss; |
This file contains hidden or 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
| <?php | |
| /** | |
| * 地址信息来源 https://github.com/mumuy/data_location | |
| * Class LocationGenerator | |
| * @package App\Http\Controllers | |
| */ | |
| class LocationGenerator | |
| { | |
| public function run() |
This file contains hidden or 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
| // Modify From https://play.golang.org/p/l0iLtkD1DV | |
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "golang.org/x/net/proxy" | |
| "io/ioutil" | |
| "net" | |
| "net/http" |
This file contains hidden or 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
| // location.href="http://weibo.com/p/1005051305971862/myfollow?ignoreg=1#place"; | |
| setInterval(function(){ | |
| document.querySelectorAll('a.btn_link')[0].click(); | |
| for (var docs = document.querySelectorAll('.member_li'), len = docs.length, i = 0; i < len; i++) { | |
| docs[i].click(); | |
| } | |
| setTimeout(function(){ | |
| try{ |
This file contains hidden or 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
| arr = [ | |
| {'add_time':1}, | |
| {'add_time':2}, | |
| {'add_time':3}, | |
| {'add_time':4}, | |
| ] | |
| arr.sort(key=lambda x: x['add_time']) | |
| print arr |
NewerOlder