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 concurrent.futures | |
| import boto3 | |
| import time | |
| # this is assuming aws configuration file is present in ~/.aws/credentials | |
| boto3.setup_default_session(profile_name='profile_name') # change this to AWS profile name you want to use | |
| s3 = boto3.resource('s3') | |
| s3_client = boto3.client("s3") | |
| thread_pool = concurrent.futures.ThreadPoolExecutor(max_workers=40) |
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 class Rectangle : IShape, IRenderable | |
| { | |
| /*…*/ | |
| public void Draw(IRenderingContext context); | |
| } |
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 class Rectangle : IShape, IRenderable | |
| { | |
| /*...*/ | |
| public void Draw(RenderingContext context); | |
| } |
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
| namespace PresentationLayer | |
| { | |
| public class Ellipse : IShape2D, IRenderable, IAnimatable | |
| { | |
| /* … */ | |
| } | |
| } | |
| namespace DataLayer | |
| { | |
| public class Ellipse : IShape2D |
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 interface IShape2D | |
| { | |
| Size Size { get; set; } | |
| float BorderThickness { get; set; } | |
| Color BorderColor { get; set; } | |
| Color Foreground { get; set; } | |
| Color Background { get; set; } | |
| } | |
| public interface IRenderable | |
| { |
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 interface IShape2D | |
| { | |
| Vector2 Size { get; set; } | |
| float BorderThickness { get; set; } | |
| Color BorderColor { get; set; } | |
| Color Foreground { get; set; } | |
| Color Background { get; set; } | |
| void Draw(RenderingContext context); |
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 class Rectangle : Shape | |
| { | |
| /*…*/ | |
| public void SetWidth(double width); | |
| public void SetHeight(double height); | |
| public void SetSize(Size size); | |
| } |
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 class FooOrderRepository : IOrderRepository | |
| { | |
| public Order Load(Guid orderId) { /*…*/ } | |
| public void Save(Order order) { /*…*/ } | |
| public void Update(Order order) { /*…*/ } | |
| public void Remove(Order order) { /*…*/ } | |
| } |
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 class SQLOrderRepository : IOrderRepository | |
| { | |
| public Order Load(Guid orderId) { /*…*/ } | |
| public void Save(Order order) { /*…*/ } | |
| public void Update(Order order) { /*…*/ } | |
| public void Remove(Order order) { /*…*/ } | |
| } |
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 interface IOrderRepository | |
| { | |
| void Load(Guid cartID); | |
| void Save(Order order); | |
| void Update(Order order); | |
| void Remove(Order order); | |
| } |
NewerOlder