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 UIKit | |
import PlaygroundSupport | |
class ViewController : UIViewController { | |
override func loadView() { | |
let view = UIView() | |
view.backgroundColor = .white | |
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 Foundation | |
import XCTest | |
struct TodoItem { | |
let title: String | |
let dueBy: Date? | |
init(title: String) { | |
self.title = title |
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
# group file by date. | |
find . -name "*_result.png" -type f -printf '%TY-%Tm-%Td\n' | sort | uniq -c |
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
# check if character is cjk Python 3 | |
# https://stackoverflow.com/questions/30069846/how-to-find-out-chinese-or-japanese-character-in-a-string-in-python/30070664 | |
# -*- coding:utf-8 -*- | |
ranges = [ | |
{"from": ord(u"\u3300"), "to": ord(u"\u33ff")}, # compatibility ideographs | |
{"from": ord(u"\ufe30"), "to": ord(u"\ufe4f")}, # compatibility ideographs | |
{"from": ord(u"\uf900"), "to": ord(u"\ufaff")}, # compatibility ideographs | |
{"from": ord(u"\U0002F800"), "to": ord(u"\U0002fa1f")}, # compatibility ideographs | |
{"from": ord(u"\u30a0"), "to": ord(u"\u30ff")}, # Japanese Kana | |
{"from": ord(u"\u2e80"), "to": ord(u"\u2eff")}, # cjk radicals supplement |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
1,2 | |
2,3 | |
4,5 |
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
#include "smaato_exchange_connector.h" | |
#include "rtbkit/plugins/bid_request/openrtb_bid_request.h" | |
#include "rtbkit/plugins/exchange/http_auction_handler.h" | |
#include "rtbkit/core/agent_configuration/agent_config.h" | |
#include "rtbkit/openrtb/openrtb_parsing.h" | |
#include "rtbkit/plugins/bid_request/openrtb_bid_request.h" | |
#include "rtbkit/plugins/bid_request/openrtb_bid_source.h" | |
#include "soa/types/json_printing.h" | |
#include <boost/any.hpp> | |
#include <boost/lexical_cast.hpp> |
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
#pragma once | |
#include "rtbkit/plugins/exchange/http_exchange_connector.h" | |
namespace RTBKIT{ | |
struct SmaatoExchangeConnector : public HttpExchangeConnector | |
{ | |
SmaatoExchangeConnector( ServiceBase & owner, const std::string & name ); | |
SmaatoExchangeConnector( const std::string & name, std::shared_ptr<ServiceProxies> proxies ); |
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
/* -*- js-mode -*- */ | |
[ | |
{ | |
"exchangeType": "smaato", | |
"listenPort": 12339, | |
"bindHost": "0.0.0.0", | |
"auctionVerb": "POST", | |
"auctionResource": "/bids", | |
"numThreads": 8 | |
} |
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
# exchange_testing.mk | |
$(eval $(call test,rubicon_exchange_connector_test,rubicon_exchange bid_test_utils openrtb_exchange openrtb_bid_request bidding_agent rtb_router cairomm-1.0 cairo sigc-2.0,boost manual)) | |
$(eval $(call test,gumgum_exchange_connector_test,gumgum_exchange bid_test_utils openrtb_bid_request bidding_agent rtb_router cairomm-1.0 cairo sigc-2.0,boost)) | |
$(eval $(call test,smaato_exchange_connector_test,smaato_exchange bid_test_utils openrtb_exchange openrtb_bid_request bidding_agent rtb_router cairomm-1.0 cairo sigc-2.0, boost)) |
NewerOlder