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
| { | |
| "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
| 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
| 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
| function resumeDomainsFromCampaign(campaign) { | |
| var cursorAds = db.rtb_bid_reference.find({campaign_id: campaign}, {id: 1}); | |
| var rtbBidRefDomainColl = db.rtb_bid_reference_domain; | |
| while (cursorAds.hasNext()) { | |
| var adId = cursorAds.next(); | |
| if (adId != null) { |
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 static void main(String[] args) { | |
| try { | |
| CsvReader products = new CsvReader("products.csv"); | |
| products.readHeaders(); | |
| while (products.readRecord()) | |
| { | |
| String productID = products.get("ProductID"); |
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
| function criarCampoEvaluated() { | |
| var cursor = db.website_performance.find({evaluated: {$exists: false}}); | |
| while (cursor.hasNext()) { | |
| var doc = cursor.next(); | |
| if (doc) { | |
| db.website_performance.update(doc, {$set: {evaluated: false}}); | |
| printjson( doc ); | |
| } | |
| } | |
| } |
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
| João - | |
| 1) ssh para maquina aonde ocorrerá o pareamento | |
| $ ssh user@<ip> | |
| 2) nome para a sessão: | |
| $ screen -S <nome_da_sessao> | |
| 3) ativar multiuser: | |
| $ Ctrl-a :multiuser on |
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 WebDriver chrome() { | |
| try { | |
| //MAC - Deve instalar o servidor web driver antes http://code.google.com/p/chromedriver/downloads/list | |
| //System.setProperty("webdriver.chrome.driver", "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"); | |
| //LINUX - Deve instalar o servidor web driver antes http://code.google.com/p/chromedriver/downloads/list | |
| System.setProperty("webdriver.chrome.driver", "/usr/bin/google-chrome"); | |
| final DesiredCapabilities desiredCapabilities = DesiredCapabilities.chrome(); |
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 re | |
| class InputScanner(object): | |
| def __init__(self, filename, parse_function): | |
| with open(filename) as f: | |
| self.reversed_lines = list(reversed(f.read().split('\n'))) | |
| self.case_count = 0 | |
| self.total_cases = self.next_int() | |
| self.parse_function = parse_function |