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 pinject | |
| import os | |
| class Repository: | |
| def __init__(self, db: str): | |
| self.db = db | |
| def get_data(self): | |
| return 'Hello World' | |
| class RepositoryBindingSpec(pinject.BindingSpec): | |
| def provide_repository(self): | |
| return Repository(db=os.getenv('dbname')) |
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
| class Repository: | |
| def __init__(self, db: str): | |
| self.db = db | |
| def get_data(self): | |
| return 'Hello World' | |
| class Service: | |
| def __init__(self, repsoitory: Repository): | |
| self.repsoitory = repsoitory | |
| def process(self): | |
| return self.repsoitory.get_data() |
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
| class Repository: | |
| def __init__(self): | |
| self.db = os.getenv('dbname') | |
| def get_data(self): | |
| return 'Hello World' | |
| class Service: | |
| def __init__(self): | |
| self.repository = Repository() | |
| def process(self): | |
| return self.dal.get_data() |
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
| license: mit |
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
| license: mit |
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 hashlib | |
| import time | |
| import openslide | |
| class MetadataExtractor: | |
| PROPERTIES = [ | |
| "objective", | |
| "mpp-x", | |
| "mpp-y", | |
| "vendor", |
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
| { | |
| _id: '{{objectId()}}', | |
| index: '{{index()}}', | |
| guid: '{{guid()}}', | |
| isActive: '{{bool()}}', | |
| balance: '{{floating(1000, 4000, 2, "$0,0.00")}}', | |
| picture: 'http://placehold.it/32x32', | |
| age: '{{integer(20, 40)}}', | |
| eyeColor: '{{random("blue", "brown", "green")}}', | |
| company: '{{company().toUpperCase()}}', |
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
| [ { | |
| "timestamp" : "2014-01-03T06:35:22.255Z", | |
| "result" : [ { | |
| "count" : 337, | |
| "eyeColor" : "brown" | |
| }, { | |
| "count" : 328, | |
| "eyeColor" : "blue" | |
| }, { | |
| "count" : 298, |
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
| { | |
| "queryType" : "topN", | |
| "dataSource" : "dummyx", | |
| "intervals" : ["2014-01-01/2016-10-13"], | |
| "granularity" : "all", | |
| "dimension" : "eyeColor", | |
| "metric" : "count", | |
| "threshold" : 25, | |
| "aggregations" :[ | |
| { |
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
| { | |
| "type" : "index_hadoop", | |
| "spec" : { | |
| "ioConfig" : { | |
| "type" : "hadoop", | |
| "inputSpec" : { | |
| "type" : "static", | |
| "paths" : "quickstart/dummy.json" | |
| } | |
| }, |
NewerOlder