I hereby claim:
- I am imarban on github.
- I am imarban (https://keybase.io/imarban) on keybase.
- I have a public key ASDjsKvr8f6-ad2Iw286QmH2Nuq_H1rFWLhrw_kypMffcQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
class PrintReporterTest: | |
def print_now_mock: | |
print report.content | |
@classmethod | |
def setup_class(cls): | |
self.printer = WirelessPrinter("0.0.0.0") | |
self.printer.print_now = print_now_mock | |
class WirelessPrinter: | |
def __init__(ip): | |
self.ip = ip | |
def print_now(report): | |
open_connection() | |
report.prepare_for_print() | |
# Code required to print to an actual printer | |
close_connection() | |
class TextProcessor: | |
def __init__(self, text, tokenizer_module, sanitizer_module): | |
self.text = text | |
self.tokenizer = tokenizer_module | |
self.sanitizer = sanitizer_module | |
def get_tokens(): | |
sanitized = self.sanitizer.sanitize(self.text) | |
tokens = self.tokenizer.tokenize(sanitized) | |
return tokens |
def save_last_login(user, get_now): | |
datetime_now = get_now() | |
save(user, datetime_now) |
class Transmission: | |
pass | |
class Engine: | |
pass | |
class Vehicle: | |
def __init__(self, engine, transmission): | |
self.engine = engine | |
self.transmission = transmission |
public class Vehicle { | |
private Engine engine = new TurboEngine(); | |
private Transmission transmission = DSGTransmission(); | |
} |
public class Vehicle { | |
private Engine engine; | |
private Transmission transmission; | |
public Vehicle(Engine engine, Transmission transmission) { | |
this.engine = engine; | |
this.transmission = transmission; | |
} | |
} |
import org.springframework.boot.*; | |
import org.springframework.boot.autoconfigure.*; | |
import org.springframework.stereotype.*; | |
import org.springframework.web.bind.annotation.*; | |
@Controller | |
@EnableAutoConfiguration | |
public class SampleController { | |
@RequestMapping("/") |
<dependency> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-web</artifactId> | |
</dependency> |