# 测试数据
def example
{
"[email protected]" => {
user_id: 1,
username: 'Mimosa',
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
| # -*- encoding: utf-8 -*- | |
| require 'typhoeus' | |
| def hydra(concurrency=5) | |
| @hydra ||= Typhoeus::Hydra.new(max_concurrency: concurrency) | |
| end | |
| def download(urls, concurrency=5) | |
| urls.each_with_index do |url, idx| | |
| request = Typhoeus::Request.new(url) |
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
| <% prop = @prop || @photo.face_prop %> | |
| <% unless prop.blank? %> | |
| <svg height='<%= @photo.img_height %>' width='<%= @photo.img_width %>' version='1.1' | |
| xmlns='http://www.w3.org/2000/svg' xmlns:xlink= 'http://www.w3.org/1999/xlink'> | |
| <style type='text/css'> | |
| <




