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
| FI ∑gen= P * Q | |
| Se FP <= CM | |
| FP = ((CM – FP) + 1) | |
| Senão | |
| FP = (FP – CM) | |
| FP =( (FP * ( 1.5 + ( FP * 0.05) ) ) +1) |
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
| cabeçada - http://24.media.tumblr.com/ab7bb0d5342c2bbf83043dc3e3f5aaaa/tumblr_mhgq2dTo5R1qdlh1io1_400.gif | |
| canguru come come come - http://25.media.tumblr.com/4566dfc715b79da1f31fd84a723ecffb/tumblr_mhnyr45pK51r4zr2vo2_r1_500.gif | |
| head shot - http://assets.naointendo.com.br/uploads/posts/675/content_Headshot.gif | |
| joga fora essa bosta de pc - http://i.imgur.com/R6qrD.gif | |
| moz quebra joga o pc - http://i.imgur.com/W8myi.jpg | |
| parabéns champs - http://cdn.hugelol.org/i/61916.gif |
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
| { | |
| "ad_id": 123, | |
| "domain": "uol.com.br", | |
| "periods": [ | |
| { | |
| "id": "13_18", | |
| "info": { | |
| "bids": 20000, | |
| "imps": 10000, | |
| "costs": 150000000, |
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
| import java.text.Normalizer; | |
| public class StringNormalizer { | |
| public String normalize(String word) { | |
| if (word == null || word.trim().isEmpty()) | |
| return word; |
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
| var map_func = function() { | |
| var imps = this.impressions; | |
| var clicks = this.clicks; | |
| emit(this.domain, {'impressions': imps, 'clicks': clicks }); | |
| }; | |
| var reduce_func = function(key, values) { |
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
| db.website_performance.aggregate( | |
| [ | |
| { | |
| $group: { | |
| _id: "$domain", | |
| sum_impressions: { | |
| $sum: "$impressions" | |
| }, | |
| sum_bids: { | |
| $sum: "$bids" |
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
| public String normalize(String word) { | |
| if (word == null || word.trim().isEmpty()) | |
| return word; | |
| word = word.replaceAll("[ÂÀÁÄÃ]", "A"); | |
| word = word.replaceAll("[âãàáä]", "a"); | |
| word = word.replaceAll("[ÊÈÉË]", "E"); | |
| word = word.replaceAll("[êèéë]", "e"); | |
| word = word.replaceAll("ÎÍÌÏ", "I"); |
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
| SELECT cfr.DATE, cfr.USER_ID, cfr.CAMPAIGN_ID, SUM(cfr.SPENT_BUDGET) + IFNULL(cfpr.ACTUAL_COST,0) AS SPENT_BUDGET | |
| FROM CONSOLIDATE_FINANCIAL_REPORT cfr | |
| LEFT JOIN CONSOLIDATE_FINANCIAL_PARTNER_REPORT cfpr on cfpr.CAMPAIGN_ID = cfr.CAMPAIGN_ID and cfpr.DATE = cfr.DATE | |
| WHERE cfr.DATE = '2013-03-26 00:00:00' AND cfr.USER_ID = 766 | |
| GROUP BY 1,2,3 | |
| ORDER BY 1,2,3; |
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
| db.website_performance.aggregate( | |
| [ | |
| { | |
| $match : { 'domain' : { $in: []} } | |
| }, | |
| { | |
| $group: { | |
| _id: "$domain", | |
| sum_impressions: { $sum: "$impressions" }, | |
| sum_bids: { $sum: "$bids" } } |
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
| db.website_performance.aggregate( | |
| [ | |
| { $match : { 'domain' : { $in: ['xxx.com','porntube.com']} } }, | |
| { $group: { | |
| _id: '$domain', | |
| sum_impressions: { $sum: "$impressions" }, | |
| sum_bids: { $sum: "$bids" }, | |
| sum_clicks: {$sum: "$clicks"}, | |
| sum_leads: {$sum: "$leads"}, | |
| sum_actual_cost: {$sum: "$actual_cost"}, |