<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yousra Mashkoor on Medium]]></title>
        <description><![CDATA[Stories by Yousra Mashkoor on Medium]]></description>
        <link>https://medium.com/@yousra.mashkoor?source=rss-e1841cc6bac3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*Nk2dyI42B99z7B5M1XDxSA.jpeg</url>
            <title>Stories by Yousra Mashkoor on Medium</title>
            <link>https://medium.com/@yousra.mashkoor?source=rss-e1841cc6bac3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 22:15:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yousra.mashkoor/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Unit Testing AWS Services with Python]]></title>
            <link>https://medium.com/@yousra.mashkoor/unit-testing-aws-services-with-python-f982e9359ab?source=rss-e1841cc6bac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/f982e9359ab</guid>
            <category><![CDATA[aws-sqs]]></category>
            <category><![CDATA[aws-sns]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Yousra Mashkoor]]></dc:creator>
            <pubDate>Thu, 13 Jul 2023 18:47:43 GMT</pubDate>
            <atom:updated>2023-07-13T18:47:43.111Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*ZJFdQoNcH3o7kiQj.png" /></figure><p>have you been coding your AWS service into your application but you’re afraid to dry run it every time because of the cost it must be incurring? or simply it’s too hectic to redeploy your code every time you make a change to see if everything&#39;s still in tack? Well, this is where <a href="https://github.com/spulec/moto">Moto</a> makes it’s grand entrance.</p><p>In this Demo, we’d go through how we could use mock AWS SNS and SQS using python pytest fixtures and moto.</p><p>It’s a simple 3 steps process. Let’s start!</p><h3>STEP 1: Setting up test credentials</h3><p>Setting up the AWS test credentials. For this, we’d be creating a file called <strong>contest.py</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%2528171%252C%2B184%252C%2B195%252C%2B1%2529%26t%3Dseti%26wt%3Dnone%26l%3Dauto%26width%3D680%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Dimport%252520os%25250Aimport%252520pytest%25250A%25250A%25250A%252540pytest.fixture%25250Adef%252520aws_credentials%2528%2529%25253A%25250A%252520%252520%252520%252520%252522%252522%252522Mocked%252520AWS%252520Credentials%252520for%252520moto.%252522%252522%252522%25250A%252520%252520%252520%252520os.environ%25255B%252522AWS_ACCESS_KEY_ID%252522%25255D%252520%25253D%252520%252522testing%252522%25250A%252520%252520%252520%252520os.environ%25255B%252522AWS_SECRET_ACCESS_KEY%252522%25255D%252520%25253D%252520%252522testing%252522%25250A%252520%252520%252520%252520os.environ%25255B%252522AWS_SECURITY_TOKEN%252522%25255D%252520%25253D%252520%252522testing%252522%25250A%252520%252520%252520%252520os.environ%25255B%252522AWS_SESSION_TOKEN%252522%25255D%252520%25253D%252520%252522testing%252522&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%252528171%25252C%2B184%25252C%2B195%25252C%2B1%252529%26t%3Dseti%26wt%3Dnone%26l%3Dauto%26width%3D680%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Dimport%25252520os%2525250Aimport%25252520pytest%2525250A%2525250A%2525250A%25252540pytest.fixture%2525250Adef%25252520aws_credentials%252528%252529%2525253A%2525250A%25252520%25252520%25252520%25252520%25252522%25252522%25252522Mocked%25252520AWS%25252520Credentials%25252520for%25252520moto.%25252522%25252522%25252522%2525250A%25252520%25252520%25252520%25252520os.environ%2525255B%25252522AWS_ACCESS_KEY_ID%25252522%2525255D%25252520%2525253D%25252520%25252522testing%25252522%2525250A%25252520%25252520%25252520%25252520os.environ%2525255B%25252522AWS_SECRET_ACCESS_KEY%25252522%2525255D%25252520%2525253D%25252520%25252522testing%25252522%2525250A%25252520%25252520%25252520%25252520os.environ%2525255B%25252522AWS_SECURITY_TOKEN%25252522%2525255D%25252520%2525253D%25252520%25252522testing%25252522%2525250A%25252520%25252520%25252520%25252520os.environ%2525255B%25252522AWS_SESSION_TOKEN%25252522%2525255D%25252520%2525253D%25252520%25252522testing%25252522&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/5ffba39c21da1e8bb5316a53794c6279/href">https://medium.com/media/5ffba39c21da1e8bb5316a53794c6279/href</a></iframe><h3>STEP 2: Configuring Test SNS and SQS</h3><p>Now in order to be able to test SNS and SQS we first need the ability to create dummy topic and queue. Here’s how we can do that. We’d be adding these configurations in the same <strong>conftest.py</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2v6-1R59jqemO2XpzuMZKQ.png" /></figure><h3>STEP 3: Let’s Test!</h3><p>Finally, now you can use the contest file you created above to test your functions using SQS and SNS.</p><p>Here are some examples.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%2528171%252C%2B184%252C%2B195%252C%2B1%2529%26t%3Dseti%26wt%3Dnone%26l%3Dauto%26width%3D680%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Dimport%252520json%25250Afrom%252520moto%252520import%252520mock_sns%25252C%252520mock_sqs%25250Afrom%252520practice_sns%252520import%252520create_sns_topic%25252C%252520publish_to_sns_topic%25252C%252520subscribe_sns_to_sqs_topic%25252C%252520sns_with_sqs%25250A%25250A%25250A%252540mock_sns%25250Adef%252520test_sns_topic_creation%2528sns_client%2529%25253A%25250A%25250A%252520%252520%252520%252520topic_name%252520%25253D%252520%252522Test-Topic%252522%25250A%252520%252520%252520%252520topic%252520%25253D%252520create_sns_topic%2528sns_client%25252C%252520topic_name%2529%25250A%252520%252520%252520%252520assert%252520topic%25255B%252522TopicArn%252522%25255D%25250A%252520%252520%252520%252520assert%252520topic%25255B%252522ResponseMetadata%252522%25255D%25255B%252522HTTPStatusCode%252522%25255D%252520%25253D%25253D%252520200%25250A%252520%252520%252520%252520assert%252520topic_name%252520in%252520topic%25255B%252522TopicArn%252522%25255D%25250A&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%252528171%25252C%2B184%25252C%2B195%25252C%2B1%252529%26t%3Dseti%26wt%3Dnone%26l%3Dauto%26width%3D680%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Dimport%25252520json%2525250Afrom%25252520moto%25252520import%25252520mock_sns%2525252C%25252520mock_sqs%2525250Afrom%25252520practice_sns%25252520import%25252520create_sns_topic%2525252C%25252520publish_to_sns_topic%2525252C%25252520subscribe_sns_to_sqs_topic%2525252C%25252520sns_with_sqs%2525250A%2525250A%2525250A%25252540mock_sns%2525250Adef%25252520test_sns_topic_creation%252528sns_client%252529%2525253A%2525250A%2525250A%25252520%25252520%25252520%25252520topic_name%25252520%2525253D%25252520%25252522Test-Topic%25252522%2525250A%25252520%25252520%25252520%25252520topic%25252520%2525253D%25252520create_sns_topic%252528sns_client%2525252C%25252520topic_name%252529%2525250A%25252520%25252520%25252520%25252520assert%25252520topic%2525255B%25252522TopicArn%25252522%2525255D%2525250A%25252520%25252520%25252520%25252520assert%25252520topic%2525255B%25252522ResponseMetadata%25252522%2525255D%2525255B%25252522HTTPStatusCode%25252522%2525255D%25252520%2525253D%2525253D%25252520200%2525250A%25252520%25252520%25252520%25252520assert%25252520topic_name%25252520in%25252520topic%2525255B%25252522TopicArn%25252522%2525255D%2525250A&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3266c15c7d776911a546ca212aae3e89/href">https://medium.com/media/3266c15c7d776911a546ca212aae3e89/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%2528171%252C%2B184%252C%2B195%252C%2B1%2529%26t%3Dseti%26wt%3Dnone%26l%3Dauto%26width%3D680%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3D%252540mock_sns%25250Adef%252520test_publish_to_sns_topic%2528sns_client%2529%25253A%25250A%25250A%252520%252520%252520%252520topic%252520%25253D%252520sns_client.create_topic%2528%25250A%252520%252520%252520%252520%252520%252520%252520%252520Name%25253D%252522Test-Topic-For-Sqs%252522%25250A%252520%252520%252520%252520%2529%25250A%252520%252520%252520%252520topic_arn%252520%25253D%252520topic%25255B%252522TopicArn%252522%25255D%25250A%25250A%252520%252520%252520%252520message%252520%25253D%252520%25257B%252522message%252522%25253A%252520%252522Transaction%252520is%252520successful%252522%25257D%25250A%252520%252520%252520%252520subject%252520%25253D%252520%252522PURCHASE%252522%25250A%252520%252520%252520%252520publish%252520%25253D%252520publish_to_sns_topic%2528sns_client%25252C%252520topic_arn%25252C%252520json.dumps%2528message%2529%25252C%252520subject%2529%25250A%25250A%252520%252520%252520%252520assert%252520publish%25255B%2527ResponseMetadata%2527%25255D%25255B%2527HTTPStatusCode%2527%25255D%252520%25253D%25253D%252520200%25250A&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%252528171%25252C%2B184%25252C%2B195%25252C%2B1%252529%26t%3Dseti%26wt%3Dnone%26l%3Dauto%26width%3D680%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3D%25252540mock_sns%2525250Adef%25252520test_publish_to_sns_topic%252528sns_client%252529%2525253A%2525250A%2525250A%25252520%25252520%25252520%25252520topic%25252520%2525253D%25252520sns_client.create_topic%252528%2525250A%25252520%25252520%25252520%25252520%25252520%25252520%25252520%25252520Name%2525253D%25252522Test-Topic-For-Sqs%25252522%2525250A%25252520%25252520%25252520%25252520%252529%2525250A%25252520%25252520%25252520%25252520topic_arn%25252520%2525253D%25252520topic%2525255B%25252522TopicArn%25252522%2525255D%2525250A%2525250A%25252520%25252520%25252520%25252520message%25252520%2525253D%25252520%2525257B%25252522message%25252522%2525253A%25252520%25252522Transaction%25252520is%25252520successful%25252522%2525257D%2525250A%25252520%25252520%25252520%25252520subject%25252520%2525253D%25252520%25252522PURCHASE%25252522%2525250A%25252520%25252520%25252520%25252520publish%25252520%2525253D%25252520publish_to_sns_topic%252528sns_client%2525252C%25252520topic_arn%2525252C%25252520json.dumps%252528message%252529%2525252C%25252520subject%252529%2525250A%2525250A%25252520%25252520%25252520%25252520assert%25252520publish%2525255B%252527ResponseMetadata%252527%2525255D%2525255B%252527HTTPStatusCode%252527%2525255D%25252520%2525253D%2525253D%25252520200%2525250A&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/256e5dc2eed630312704c212571c8761/href">https://medium.com/media/256e5dc2eed630312704c212571c8761/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%2528171%252C%2B184%252C%2B195%252C%2B1%2529%26t%3Dseti%26wt%3Dnone%26l%3Dauto%26width%3D680%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3D%252540mock_sqs%25250A%252540mock_sns%25250Adef%252520test_sqs_subscription_to_sns%2528sns_client%25252C%252520sqs_client%25252C%252520sns_topic%25252C%252520sqs_queue%2529%25253A%25250A%25250A%252520%252520%252520%252520queue%252520%25253D%252520sqs_client.create_queue%2528QueueName%25253D%252522test-queue%252522%2529%25250A%252520%252520%252520%252520queue_url%252520%25253D%252520queue%25255B%2527QueueUrl%2527%25255D%25250A%252520%252520%252520%252520queue_arn%252520%25253D%252520sqs_client.get_queue_attributes%2528QueueUrl%25253Dqueue_url%2529%25255B%2527Attributes%2527%25255D%25255B%2527QueueArn%2527%25255D%25250A%25250A%252520%252520%252520%252520topic%252520%25253D%252520sns_client.create_topic%2528Name%25253D%252522test-topic%252522%2529%25250A%252520%252520%252520%252520topic_arn%252520%25253D%252520topic%25255B%2527TopicArn%2527%25255D%25250A%25250A%252520%252520%252520%252520response%252520%25253D%252520subscribe_sns_to_sqs_topic%2528sns_client%25252C%252520queue_arn%25252C%252520topic_arn%2529%25250A%252520%252520%252520%252520assert%252520response%25255B%2527ResponseMetadata%2527%25255D%25255B%2527HTTPStatusCode%2527%25255D%252520%25253D%25253D%252520200&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%252528171%25252C%2B184%25252C%2B195%25252C%2B1%252529%26t%3Dseti%26wt%3Dnone%26l%3Dauto%26width%3D680%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3D%25252540mock_sqs%2525250A%25252540mock_sns%2525250Adef%25252520test_sqs_subscription_to_sns%252528sns_client%2525252C%25252520sqs_client%2525252C%25252520sns_topic%2525252C%25252520sqs_queue%252529%2525253A%2525250A%2525250A%25252520%25252520%25252520%25252520queue%25252520%2525253D%25252520sqs_client.create_queue%252528QueueName%2525253D%25252522test-queue%25252522%252529%2525250A%25252520%25252520%25252520%25252520queue_url%25252520%2525253D%25252520queue%2525255B%252527QueueUrl%252527%2525255D%2525250A%25252520%25252520%25252520%25252520queue_arn%25252520%2525253D%25252520sqs_client.get_queue_attributes%252528QueueUrl%2525253Dqueue_url%252529%2525255B%252527Attributes%252527%2525255D%2525255B%252527QueueArn%252527%2525255D%2525250A%2525250A%25252520%25252520%25252520%25252520topic%25252520%2525253D%25252520sns_client.create_topic%252528Name%2525253D%25252522test-topic%25252522%252529%2525250A%25252520%25252520%25252520%25252520topic_arn%25252520%2525253D%25252520topic%2525255B%252527TopicArn%252527%2525255D%2525250A%2525250A%25252520%25252520%25252520%25252520response%25252520%2525253D%25252520subscribe_sns_to_sqs_topic%252528sns_client%2525252C%25252520queue_arn%2525252C%25252520topic_arn%252529%2525250A%25252520%25252520%25252520%25252520assert%25252520response%2525255B%252527ResponseMetadata%252527%2525255D%2525255B%252527HTTPStatusCode%252527%2525255D%25252520%2525253D%2525253D%25252520200&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/30173b8340e3dea9b0cf255be0aaba55/href">https://medium.com/media/30173b8340e3dea9b0cf255be0aaba55/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%2528171%252C%2B184%252C%2B195%252C%2B1%2529%26t%3Dseti%26wt%3Dnone%26l%3Dauto%26width%3D680%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3D%252540mock_sqs%25250A%252540mock_sns%25250Adef%252520test_sqs_with_sns%2528sns_client%25252C%252520sqs_client%2529%25253A%25250A%252520%252520%252520%252520queue%252520%25253D%252520sqs_client.create_queue%2528QueueName%25253D%252522test-queue%252522%2529%25250A%252520%252520%252520%252520queue_url%252520%25253D%252520queue%25255B%2527QueueUrl%2527%25255D%25250A%252520%252520%252520%252520queue_arn%252520%25253D%252520sqs_client.get_queue_attributes%2528QueueUrl%25253Dqueue_url%2529%25255B%2527Attributes%2527%25255D%25255B%2527QueueArn%2527%25255D%25250A%25250A%252520%252520%252520%252520topic%252520%25253D%252520sns_client.create_topic%2528Name%25253D%252522test-topic%252522%2529%25250A%252520%252520%252520%252520topic_arn%252520%25253D%252520topic%25255B%2527TopicArn%2527%25255D%25250A%25250A%252520%252520%252520%252520subscribe_sns_to_sqs_topic%2528sns_client%25252C%252520queue_arn%25252C%252520topic_arn%2529%25250A%25250A%252520%252520%252520%252520response%252520%25253D%252520sns_with_sqs%2528sqs_client%25252C%252520sns_client%25252C%252520queue%25252C%252520topic%25252C%252520%252522Hello%252520World%2521%2521%252522%2529%25250A%252520%252520%252520%252520assert%252520response%25255B%2527ResponseMetadata%2527%25255D%25255B%2527HTTPStatusCode%2527%25255D%252520%25253D%25253D%252520200%25250A%252520%252520%252520%252520assert%252520response%25255B%252522Messages%252522%25255D%25255B0%25255D%25255B%252522Body%252522%25255D%25255B%252522Message%252522%25255D%252520%25253D%25253D%252520%252522Hello%252520World%2521%2521%252522&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%252528171%25252C%2B184%25252C%2B195%25252C%2B1%252529%26t%3Dseti%26wt%3Dnone%26l%3Dauto%26width%3D680%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3D%25252540mock_sqs%2525250A%25252540mock_sns%2525250Adef%25252520test_sqs_with_sns%252528sns_client%2525252C%25252520sqs_client%252529%2525253A%2525250A%25252520%25252520%25252520%25252520queue%25252520%2525253D%25252520sqs_client.create_queue%252528QueueName%2525253D%25252522test-queue%25252522%252529%2525250A%25252520%25252520%25252520%25252520queue_url%25252520%2525253D%25252520queue%2525255B%252527QueueUrl%252527%2525255D%2525250A%25252520%25252520%25252520%25252520queue_arn%25252520%2525253D%25252520sqs_client.get_queue_attributes%252528QueueUrl%2525253Dqueue_url%252529%2525255B%252527Attributes%252527%2525255D%2525255B%252527QueueArn%252527%2525255D%2525250A%2525250A%25252520%25252520%25252520%25252520topic%25252520%2525253D%25252520sns_client.create_topic%252528Name%2525253D%25252522test-topic%25252522%252529%2525250A%25252520%25252520%25252520%25252520topic_arn%25252520%2525253D%25252520topic%2525255B%252527TopicArn%252527%2525255D%2525250A%2525250A%25252520%25252520%25252520%25252520subscribe_sns_to_sqs_topic%252528sns_client%2525252C%25252520queue_arn%2525252C%25252520topic_arn%252529%2525250A%2525250A%25252520%25252520%25252520%25252520response%25252520%2525253D%25252520sns_with_sqs%252528sqs_client%2525252C%25252520sns_client%2525252C%25252520queue%2525252C%25252520topic%2525252C%25252520%25252522Hello%25252520World%252521%252521%25252522%252529%2525250A%25252520%25252520%25252520%25252520assert%25252520response%2525255B%252527ResponseMetadata%252527%2525255D%2525255B%252527HTTPStatusCode%252527%2525255D%25252520%2525253D%2525253D%25252520200%2525250A%25252520%25252520%25252520%25252520assert%25252520response%2525255B%25252522Messages%25252522%2525255D%2525255B0%2525255D%2525255B%25252522Body%25252522%2525255D%2525255B%25252522Message%25252522%2525255D%25252520%2525253D%2525253D%25252520%25252522Hello%25252520World%252521%252521%25252522&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d7957d7831aa91f64aec03bfc819e90d/href">https://medium.com/media/d7957d7831aa91f64aec03bfc819e90d/href</a></iframe><p>You can find the complete code and more useful methods using this repository.</p><p><a href="https://github.com/YousraMashkoor/aws-localstack-with-boto3-and-moto">https://github.com/YousraMashkoor/aws-localstack-with-boto3-and-moto</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f982e9359ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Managing Multiple Github accounts in one System]]></title>
            <link>https://medium.com/@yousra.mashkoor/managing-multiple-github-accounts-in-one-system-ccc7438835b1?source=rss-e1841cc6bac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/ccc7438835b1</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[multiple-github-accounts]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[programming-tips]]></category>
            <dc:creator><![CDATA[Yousra Mashkoor]]></dc:creator>
            <pubDate>Fri, 24 Dec 2021 14:23:34 GMT</pubDate>
            <atom:updated>2021-12-25T15:56:14.870Z</atom:updated>
            <content:encoded><![CDATA[<p>Do you have a different personal and a workplace github accounts? Do you struggle managing both accounts on your same system?</p><p>If so, then managing more then one github accounts in one system could be a nightmare. And more so if you’re a fast worker and needs to get work done ASAP!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/1*PQOeZFnRAniQmUhHJ0pw6A.gif" /></figure><p>In this guide we’ll be having a look into how we can use SSH to counter that. Simply follow along the steps listed below.</p><blockquote>Note<strong> </strong>that I’ve listed the commands below for a Ubuntu system, but you can follow along the same steps for Windows system aswell with a slight modifications in commands.</blockquote><h3>STEP 01 — Generate SSH Key:</h3><p>First we need to generate your SSH keys for each of your github accounts. If you already have generated a ssh key for one of your account, then it’s completely fine. Just make sure to generate a new one for your another account with a different name.</p><ol><li><strong><em>Check of existing keys:</em></strong></li></ol><pre>ls -al ~/.ssh </pre><p><strong><em>2. Create a new key:</em></strong></p><pre>ssh-keygen -t rsa -C “personalAccount@gmail.com”<br>ssh-keygen -t rsa -C “workAccount@work.com”</pre><p>when prompted for a file name, enter a new file name for your ssh key.</p><h3>STEP 02 — Add your SSH Key:</h3><p>Add your private SSH key to the ssh-agent and store your passphrase in the keychain</p><ol><li><strong><em>Add private key to ssh-agent:</em></strong></li></ol><pre>ssh-add ~/.ssh/id_rsa<br>ssh-add ~/.ssh/id_rsa_personal</pre><p><strong><em>2. See list of added ssh-keys:</em></strong></p><pre>ssh-add -l</pre><p><strong><em>3. Add it to you Github account</em></strong></p><p>Copy each of the keys one by one,</p><pre>cat ~/.ssh/id_rsa_personal.pub</pre><p>Open your github account to which the key belongs to. Click on your profile picture to goto <strong>settings</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/204/1*UPU1CiBdO38FOKxj5kE7Bg.png" /></figure><p>Scroll to bottom left and select <strong>SSH and GPG keys</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/1*aL2pesYlecaoU4LHb3Vcbg.png" /></figure><p>Select new SSH Key</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*GbQ803-RTkd6CuR9nV1GXw.png" /></figure><p>Add a title and your SSH key that you previously copied</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*faK6mpvsiinMgrv-PGuUsA.png" /></figure><p>Follow the same step for all of your SSH keys of both workplace and personal account.</p><h3>STEP 03 — Configure your Accounts:</h3><ol><li><strong><em>Check config file:</em></strong></li></ol><p>Check if you have a config file inside your .ssh folder, if not create a new one</p><pre>ls ~/.ssh<br>touch ~/.ssh/config</pre><p><strong><em>2. Update config file:</em></strong></p><p>Add the following configuration for your account inside the config file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*dZZKsrK-2PCtGLjFMWI7cg.png" /></figure><p>notice here I am using an alias of <strong>‘myname’ </strong>for my personal account and default for my workplace account. However, if you want you can setup an alias for your workplace account aswell.</p><h3>STEP 04 — Cloning Repository:</h3><p>Lets try and clone a repository from our personal account.</p><ol><li><strong><em>Copy the URL</em></strong></li></ol><p>Simple goto your account and copy the SSH url of your repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*X_ey9KEyQF6kgPAfkcixTQ.png" /></figure><p><strong><em>2. Update the URL</em></strong></p><p>go back to your terminal and use this url to clone your repository except instead of <strong>github.com </strong>use the alias <strong>myname.</strong></p><p>For Example From:</p><pre>git clone git@github.com:{your-repo-url}.git</pre><p>To:</p><pre>git clone git@<strong>myname</strong>:{your-repo-url}.git</pre><p>Since we did not use any alias with our work account, we can simply clone the repository with the original URL.</p><h3>STEP 05— Update Git Configurations:</h3><p>Now we need to update our configurations for each repository if we don’t want to use the global one. Simply <strong>cd</strong> into your repository and use these commands to check your user attributes.</p><pre>git config user.name<br>git config user.email</pre><p>If it’s not the one you want for you current repository, you can use these commands to update your attriibutes.</p><pre>git config user.name &quot;myname&quot;<br>git config user.email &quot;myname@gamil.com&quot;</pre><p>Voila! Now you’re all set to rule the word.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*oJw96Mrcm4bGFu2zyBDJMg.gif" /></figure><p>Enjoy!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ccc7438835b1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Odoo13 writing to one2many and many2many field — Unpacking]]></title>
            <link>https://medium.com/@yousra.mashkoor/odoo13-writing-to-one2many-and-many2many-field-unpacking-72c42771e914?source=rss-e1841cc6bac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/72c42771e914</guid>
            <category><![CDATA[one2many]]></category>
            <category><![CDATA[odoo-erp]]></category>
            <category><![CDATA[odoo]]></category>
            <category><![CDATA[many2many]]></category>
            <category><![CDATA[unpacking]]></category>
            <dc:creator><![CDATA[Yousra Mashkoor]]></dc:creator>
            <pubDate>Tue, 07 Sep 2021 01:30:21 GMT</pubDate>
            <atom:updated>2021-09-07T01:30:21.858Z</atom:updated>
            <content:encoded><![CDATA[<h3>Odoo13 writing to one2many and many2many field — Unpacking</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*Xybr1Ebc1S-Fgncqkcy0GQ.png" /></figure><p>Odoo uses unpacking to write a referenced record when ever we ant to update a record. See the following snippet for example;</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%2528171%252C%2B184%252C%2B195%252C%2B1%2529%26t%3Dseti%26wt%3Dnone%26l%3Dpython%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Duser%252520%25253D%252520self.env%25255B%2527res.users%2527%25255D.browse%2528user_id%2529%25250Auser.write%2528%25257B%2527groups_id%2527%25253A%252520%25255B%25286%25252C0%25252C%25255Bself.env.ref%2528%2527company_auth.company_mvp_basic%2527%2529.id%25255D%2529%25255D%25257D%2529&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%252528171%25252C%2B184%25252C%2B195%25252C%2B1%252529%26t%3Dseti%26wt%3Dnone%26l%3Dpython%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Duser%25252520%2525253D%25252520self.env%2525255B%252527res.users%252527%2525255D.browse%252528user_id%252529%2525250Auser.write%252528%2525257B%252527groups_id%252527%2525253A%25252520%2525255B%2525286%2525252C0%2525252C%2525255Bself.env.ref%252528%252527company_auth.company_mvp_basic%252527%252529.id%2525255D%252529%2525255D%2525257D%252529&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/ca46900e4296c78dd38e47eaa6a7f55f/href">https://medium.com/media/ca46900e4296c78dd38e47eaa6a7f55f/href</a></iframe><h4>Fetching a Record</h4><p>Here we are browsing a record from res.users and then updating one if it’s one2many field using .write</p><h4>Referencing a Record</h4><p>Notice that we are first referencing a specific record with self.env.ref(&#39;company_auth.company_mvp_basic&#39;) where company_auth is the module name and company_mvp_basic is the record id.</p><h4>Unpacking</h4><p>Lastly we need to define our unpacking policy. Odoo gives us specific range of policy to work with.</p><p>To check this for more understanding, see the following values we use to write to a One2many or Many2many field.</p><h3>Odoo Unpacking Policies:</h3><p><strong>(0, 0, { values })</strong><br>link to a new record that needs to be created with the<br>given values dictionary</p><p><strong>(1, ID, { values })</strong><br><strong>update</strong> the linked record with id = ID (write values on it)</p><p><strong>(2, ID)</strong><br><strong>remove</strong> and delete the linked record with id = ID<br>(calls unlink on ID, that will delete the object completely,<br>and the link to it as well)</p><p><strong>(3, ID)</strong><br>cut the link to the linked record with id = ID<br>(delete the relationship between the two objects but does<br>not delete the target object itself)</p><p><strong>(4, ID)</strong><br>link to existing record with id = ID (adds a relationship)</p><p><strong>(5)</strong><br><strong>unlink</strong> all (like using (3,ID) for all linked records)</p><p><strong>(6, 0, [IDs])</strong><br><strong>replac</strong>e the list of linked IDs (like using (5) then (4,ID)<br>for each ID in the list of IDs</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72c42771e914" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Covid-19 on Sales using Python]]></title>
            <link>https://medium.com/@yousra.mashkoor/covid-19-on-sales-using-python-44ad1e5bd35?source=rss-e1841cc6bac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/44ad1e5bd35</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[sales]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[covid19]]></category>
            <dc:creator><![CDATA[Yousra Mashkoor]]></dc:creator>
            <pubDate>Wed, 30 Sep 2020 15:02:03 GMT</pubDate>
            <atom:updated>2020-09-30T15:06:38.440Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H-4bBB_iNH22-Y2LU5N3mA.jpeg" /></figure><p>You can download the code for complete project from <a href="https://github.com/YousraMashkoor/Effect-of-Covid19-on-Sales"><strong><em>here.</em></strong></a></p><p>This project revolves around building insights on the impact of COVID 19 on the sales of different industries and sectors of United States. As such multiple datasets have been gathered to read the impact of the COVID 19, which includes the industries of health, food, home and lifestyle, services, durable and non-durable goods. Recent stock market has also been observed to see how pandemic in effecting the market at large and what should be expected in the upcoming days.</p><p>In order to effectively evaluate the impact, the visualization has been performed using Matplotlib and Seaborn with Python Programming using Google Colab which is further discussed below in detail. In this project the relationship and impact of covid19 on the market has been studied. It was found that the pandemic has affected different areas of the industries completely differently. While some markets that seemed to have been impacted by it was in-fact due to the public panic or reaction, but not due to the pandemic itself.</p><h3>Objective:</h3><p>The main objective of our analysis was to study the level of existing correlation between number of increasing or decreasing trends in the sales of the Market and the outbreak. For such, following steps of measurement will be taken.</p><ul><li>Collection of data from a validated source point, which in our cases was provided by the NASDAQ stock index, Federal Reserve bank of ST. Louis, and Supermarket sales of three different brank of supercenter.</li><li>Cleaning of the data to extract only useful information in accordance with our business question</li><li>Construction of valuable demo graphs and figures for analyzing the trend in data.</li><li>Measurement of the trends through statistical figures.</li><li>Revision of the trends based on the evaluated measuring figures.</li></ul><h3>Data Gathering</h3><p>Download the complete dataset from <a href="https://github.com/YousraMashkoor/Effect-of-Covid19-on-Sales/tree/master/data"><strong><em>here.</em></strong></a></p><h4>Content of Data:</h4><p>The source data is divided into three different datasets.</p><ol><li>Supermarket sales.</li><li>Stock prices of USA.</li><li>Personal Consumption Expenditures by Major Type of Product, Billions of Dollars.</li></ol><ul><li>Food</li><li>Services</li><li>Medic-aid</li><li>Durable goods</li><li>Non-durable goods</li></ul><h4>Data Source:</h4><p>The data being evaluated in our evaluation has been extracted from three different sources for multiple set of data and their nature. The recent trends of overall stock market can be downloaded from NASDAQ market activity. For this project the data can be downloaded from yahoo finance as we would only be observing the general trend of the market, however further breakdown of each stock can also be observed from here. <a href="https://finance.yahoo.com/quote/%5EIXIC/history?period1=1485302400&amp;period2=1598313600&amp;interval=1d&amp;filter=history&amp;frequency=1d">Source link</a></p><p>People’s consumption and expenditure also plays a major role in identifying what are the areas of market where the general public interest lies. For such we will be using data form Federal Reserve bank of ST. Louis. We would be downloading trends of food, services, Medicaid, durable and nondurable goods from over here and would be our major source in analyzing the recent trends. <a href="https://fred.stlouisfed.org/release/tables?rid=54&amp;eid=3220#">Source link</a></p><p>For us to observe the pre COVID19 trends, that is before the actual outbreak, we will also be evaluating the supermarket sales in different industries in 2019 using a data source Kaggle. The growth of supermarkets in most populated cities are increasing and market competitions are also high. <a href="https://www.kaggle.com/aungpyaeap/supermarket-sales">Source link:</a></p><h3>Data Cleaning and Preparation:</h3><p>As already mentioned, our data collection here is divided into 5 different categories. Namely: Food, Services, Durable goods, non-durable goods and medic-aid. Let’s see how our data looks like individually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*B8Z5Cp-4PoTN9Sxwh4wj-A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*FuzvyROmMQ2J87kSiXXgtg.png" /></figure><p>We need to merge them and rename these values to observe how to impact is coming along each other.</p><p>Rename and run the following snippet on every set, so we can have every set with a data time attribute along with a new column identifying each category.</p><p>You can access the notebook from<a href="https://github.com/YousraMashkoor/Effect-of-Covid19-on-Sales/blob/master/Effect_of_COVID19_on_sales.ipynb"> <strong><em>here.</em></strong></a></p><pre>#Preparing set of DurableGoods</pre><pre>pce_durable[&#39;DATE&#39;] = pd.to_datetime(pce_durable[&#39;DATE&#39;])</pre><pre>pce_durable.rename(columns = {&#39;PCEDG&#39;:&#39;Expenditure&#39;, &#39;DATE&#39;:&#39;Date&#39;}, inplace = True)</pre><pre>new_durable = pce_durable.loc[pce_durable.Date &gt; &#39;2019-01-01&#39;].copy().reset_index(drop=True)</pre><pre>new_durable[&#39;Category&#39;]=&#39;Durable goods&#39;</pre><p>Now merging each sets together,</p><pre>#merging datasets</pre><pre>new_medicaid.head()</pre><pre>new_data = pd.concat([new_durable, new_food, new_nondurable, new_medicaid, new_services], axis=0)</pre><pre>new_data.reset_index(drop=True)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*6qHJnKDAbeAvwEZgdG6kEg.png" /></figure><h3>Data Visualization and Analysis:</h3><p>We have three different sets of data that we need to visualize here.</p><h4>1. Consumer Spending and Expenditure</h4><p>Firstly, lets use the pivot table above to plot a line graph against each other and see how graphs are coming along.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*DSQS1lg-Yov0Exl0iTvf1g.png" /></figure><p>Here we can observe a very interesting trend. We can see almost all the market entity went down around February, which was expected, except two. That is food and medical. With medical staying almost the same throughout. But why?</p><h4>2. NASDAQ stock index</h4><p>For start let’s have a look inside out stock data head. Our dataset comprises of the duration of 2017 up-till 2020, with a quarterly division in the timeline. Containing 902 rows in total.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*wiN6QB2J4zfaYTstuLGCYw.png" /></figure><p>Here we can observe that the mean for opening process of stocks revolves around 7615, with a standard deviation of 1176. Where the maximum value being 11449. With the similar fashion following with the High, low, close and adj close values.</p><p>Now let’s have a look how the stocks have been coming along for the last few years and what can we say about its recent breakdown If any.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*t3FKfG-PgHZbWcYl_ne5Zw.png" /></figure><p>Observe that there has been an abrupt downfall in the stocks after January 2020. Let’s drill it down further to see exactly when that happened.</p><p>Now we can see that the stocks went down in the midst of February 2020 only after Quarter past March it was able to recover itself. We already know that the first case that hit US was at January 13, 2020.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*t7gP1lEq0Saw35Szyt13Fg.png" /></figure><p>As can be seen that the mean price of the companies listed in the NASDAQ plummet at around February 2020. It went from around 9700 to 7000 within a month, approximately 28% decrease. This could be a coincidence but there is a really high chance that it is in fact influenced by the pandemic. However, the question arises why it happened so late. We expected it should happen around January since the first case appeared at that time. The initial guess could be that people there were still careless about it.</p><h4>3. Trend Before COVID19</h4><p>In order to successfully analyze the trend in W first need the check the information containing in the dataset. Here we can observe the total, mean and co relation among different attributes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*VqXb-ESkVWmSocGEnEtZ4g.png" /></figure><p>Here in our boxen plot below, we can observe the average sales of each product type is going to have.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*ySmXddqFQerQSTCORgEubg.png" /></figure><p>Here we can see that the average sales of different lines of products. Health and beauty making the highest sales whereas Fashion accessories making the lowest sales. That being said, we can observe that food and beverages is the second lowest in the chart above.</p><h4><strong>Pivot table:</strong></h4><p>Pivot tables are the perfect solution when you need to summarize and analyze large amounts of data. In just a few clicks, you have access to a whole new set of information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*rb_WxckSd-Y3wxDAoz7xNQ.png" /></figure><p>Now let’s have a look what the pivot table has to say about the sales in each domain. Below we can observe that the food and beverages in fact has the most amount of total sales. While sports and travel tends to have the second highest record.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*3V6P6TWOS6dONLtpwlasmg.png" /></figure><p>That being said, we could conclude that health and beauty is making the highest sales on average while the industry of Food and beverages is observed to be making the most sales in total. We would further be verifying this with our third dataset.</p><h3>Interpretation:</h3><p>Now we already know PCE was at $13 trillion in the second quarter of 2020, according to the Bureau of Economic Analysis (BEA). That’s down 34.6% from the first quarter of 2020, which was already down 6.9% from 2019.</p><p>Spending on durable goods, like automobiles, fell 13.8%. Spending on services, like hair salons, fell 9.8%. Spending on food, like groceries, rose 8.0%.</p><p>U.S. retail sales in the second quarter fell 8.1% from the same quarter in 2019, according to Census Bureau data. The annualized rate well below the 3% annual retail sales growth rate viewed as desirable. Stores shut down and consumers stayed home to avoid the pandemic. This contributed to a 24.9% increase in online sales, as shoppers felt safer having their goods delivered.</p><p>This accentuated a long-term trend. Online sales for Black Friday in 2019 grew by 19.6% over the previous year, according to Adobe data. Brick-and-mortar store sales increased by only 1.6% from 2018, says RetailNext.</p><h3>Conclusion:</h3><p>Consumers are the backbone of the American economy, making up two-thirds of the economy. Recovering from the coronavirus pandemic will rest on how quickly people open up their wallets. On Friday the economy got good news: After consumer spending fell -6.6% in March and a record -12.6% drop in April, consumer spending soared 8.2% in May—a record jump, according to the U.S. Bureau of Economic Analysis. The surge in consumer spending comes as states across the country eased their shutdowns in May.</p><p>In regard to our research question, we could now make the following claims,</p><p>· Yes, a relationship exists between different industries and the pandemic.</p><p>· Food industry has the highest abrupt impact with 16% rise in in middle of February.</p><p>· Medical and health industry has a growing impact up-till now, with a rise of 10%.</p><p>· The stock market faced an overall impact of very small period of time.</p><p>· We observed people are still stocking up food however in a small scale.</p><p>· Demand of service went down by 22% after the issuance of lockdown in February.</p><p>· The market of durable goods faced downfall of 13.2% which we already knew were the 3rd highest industry before pandemic.</p><p>· For non-durable goods rose at the end of February for a small period and time due to the increasing demand of consuming goods and then continued to fell further as the impact of COVID19 continued.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44ad1e5bd35" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Black Hats And Gratitude Stands]]></title>
            <link>https://medium.com/@yousra.mashkoor/black-hats-and-gratitude-stands-6002316ff1be?source=rss-e1841cc6bac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/6002316ff1be</guid>
            <dc:creator><![CDATA[Yousra Mashkoor]]></dc:creator>
            <pubDate>Fri, 03 Jan 2020 16:55:54 GMT</pubDate>
            <atom:updated>2020-01-03T16:55:54.997Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*slW9s29ND_lkMgnLz8VHSg.jpeg" /></figure><p>I remember long ago I started writing blog anonymously about all the good things that happens to me through out the day. Some little some big events of my life. But at some point those Gratitude journal turned into a despair blog. My writing morphed into screams of my day. That’s where I came to know about gratitude letters during one of my course at Amal Academy.</p><p>This I believe was one of the greatest things that happened to me duting my journey at Amal. What is positive thinking. Ramdom act of kindness. Gratitude letters. All these things I knew, but choose to forgot. It was like a stand, that always existed, but I simply choose tk never use it.</p><h4>Why does it matter?</h4><p>Adversity is a part of our life. Some days, everything seems to be going wrong. From the moment you get up, the day turns into a series of mishaps, stumbles, accidents and rude people. Everyone has days like this. At time like this, it’s easy to think. Why Me?</p><p>No matter how bad your day is going, even if it’s going straight to the trash can. We have the power to make it our sunshine. By simply remembering the things we already have, I instead of thinking ‘Why Me?’</p><p>And the answer is simple as that. Write gratitudes. Remember the Good parts of your life movie. Shwan Achor shares 5 amazing steps towards positive attitude.</p><p><a href="https://youtu.be/fLJsdqxnZb0">https://youtu.be/fLJsdqxnZb0</a></p><h4>The Three Ls</h4><p>This was the 3L for me “Life Long Lesson”. I started writing gratitudes more often. Infact the legacy ‘Leah Dieterich’ started from her book Thxthxthx, I intend to cary it on with me. Those black Hats now have a place to go, a gratitude stand.</p><blockquote>Positive Thinking is The Decision We Make</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6002316ff1be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Teacher Expliand And The Mentor Inspires]]></title>
            <link>https://medium.com/@yousra.mashkoor/a-teacher-expliand-and-the-mentor-inspires-8a3eb672cc4f?source=rss-e1841cc6bac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a3eb672cc4f</guid>
            <dc:creator><![CDATA[Yousra Mashkoor]]></dc:creator>
            <pubDate>Sat, 21 Dec 2019 07:13:25 GMT</pubDate>
            <atom:updated>2019-12-26T13:13:56.500Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*BFgXRY0aaTBsRWMfkcbnHw.jpeg" /></figure><p>Ever since I was a kid, I had been a braty kid. And by that I don’t mean I was just stubborn and aggressive but infact I was the most troublesome among all my siblings.</p><p>I would throw things, shout and cry whenever something happened out of my consent. I would get mad at the Littlest of things. Soon I realized I’m having trouble with my academics aswell. I was bad at remembering stuffs. It took me relatively longer to understand what teachers are saying. I would mostly sit alone at the back of my class. So basically I was a social retard aswell.</p><h4>How I Found My Mentor</h4><p>Now that I’m sitting here, writing about it. I realize how badly I needed help. I needed guidance. I needed a MENTOR. And how lucky I was to be able to find that mentor in the form of my own mother. Who helped me overcome my issues and got me where I am right now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*-j21gXtVD_k1UUciEDgmPA.jpeg" /></figure><h4>How My Mentor Helped Me</h4><p>She realized I was having trouble with my studies, so she took it upon herself to see through all of my studies. My mom is a doctor and a house wife at that. So naturally had a lot of responsibilities but she abandoned all of her activities just to give me that extra time. She would sit late till night, going through my curriculum and studyding the things I’m having trouble with. And would explain me again gain no matter how much hard time I gave her.</p><p>She would relate those stuffs to somethings interesting and ask me again and again to make me remember things more. At the same time she encouraged me to participate more and more in competitions so I would get out of my social dilemma.</p><h4>She saw what I couldn’t</h4><p>She was the one who realized that I was good with maths and logical stuffs and the reason why I usually have trouble understanding stuffs is because I try to go into depth of things. Which makes me a very precise and detailed oriented person. She also found out that I was more of a creative person and that I’m good with things that involve colors and using my imagination. She encouraged me to participate in my science exhibition at school. I remember she stayed late untill night to help me complete my project. And it was because of her help and assistance that I my project was able to get the 3rt position in the competition.</p><blockquote>My mentor said, &#39;Let’s go do it,&#39; not &#39;You go do it.&#39;</blockquote><p>I also improved considerably in my studies, and was considered among the top 5 of our class. I started to Excell in everting I do. And it was solely because she was able to show me the right path to put my effort in.</p><h4>A Growing mindset is all what you need.</h4><p>Despite all that, I don’t think I would have been able to learn as much as I did if I didn’t accepted her help. I wanted to improve and her kindness made me come out of my shell. I was fortunate enough to find my mentor at such an early age and that made me come to realize that how much important of a role a mentor plays. They are the ones who set up a right foundation for us to build our house on.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a3eb672cc4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Stay Positive During Tough Times]]></title>
            <link>https://medium.com/@yousra.mashkoor/how-to-stay-positive-during-tough-times-78df7f52f0a2?source=rss-e1841cc6bac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/78df7f52f0a2</guid>
            <dc:creator><![CDATA[Yousra Mashkoor]]></dc:creator>
            <pubDate>Sun, 08 Dec 2019 04:55:38 GMT</pubDate>
            <atom:updated>2019-12-13T09:09:05.579Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*3gOMSwhsVY-rFSBd30KqJA.jpeg" /></figure><p>This had been a really exhausting week for me. I was demotivaed, depressed and had a mental breakdown Infront of all my professors and seniors, the project I’ve been working on faced humiliating rejection, I confineded myself from all the social media and gathering, I lost my appetite and would refuse to get out of my bed.</p><p>Alot of things had been piling up for me but what really did it was the knock-back our project received during our evaluation. We were told that the project that we had been working on was something that could easily be done within 2 months. That it was not innovating at all. But we didn’t let that falter us. We went straight to our advisor to discuss. However he was so busy that he couldn’t carter us, so he left saying “It’s good, this is how you guys should have been treated” — we were already anxious and eventhough he didn’t mean any harm, I took this comment as in he was also disappointed in us. By this time my depresss-O-meter was 8/10.</p><p>Next day when we went for a meeting with him, few of our seniors were there as well. And eventhough they were trying to support us, I again took their behavior as a criticism —10/10. I couldn’t contain myself and had an embarrassing breakdown Infront of everyone.</p><p>Alot of stuffs happend during the week and eventhough I know that’s life, I was still unable to cope with it. This, for me was even more confusing because I’m a walking ball of positivity. No matter how tough the time is, I would always be that one person that would uplift others. So, I was perplexed on why I was feeling this sudden wave of depression.</p><p>And the irony that while I was going through all of this, my weekly project required me to go through the course of ‘How to Stay Positive’</p><blockquote>Indeed everything happens for a reason.</blockquote><p>While I was at it, I saw a TED talk by Shawn Anchor where he told us about this 5 things that helps us keep positive.</p><h4>3 Gratitudes</h4><p>Everyday write about 3 things that you’re most grateful for.</p><h4>Journaling</h4><p>Keep a journal with you and write about all the things that happend good or inspired and motivated you.</p><h4>Exercise</h4><p>Make a habit of exercising everyday. It relieves stress from your body and stimulate your heart and mind.</p><h4>Meditation</h4><p>Meditation helps you focus on one things, exterminate all the external noise. And make you more attentive and nucleus.</p><h4>Random act of kindness</h4><p>Doing ramdom things for others without them knowing. Or expecting anything in return</p><h3>What I Did?</h3><p>So I went ahead and started writing about all the things and people I was grateful for, that helped and made me smile even for a split second. This helped me realize that life haven’t actually been that hash on me as I thought it was. I also meditated, which relieved my brain of toxic and harmful thoughts and made me more calm and peaceful.</p><p>And for the kindness part, I tried to do something that I usually don’t. Like cooking my sister’s favorite meal, cleaning the house, holding doors for others and patiently waiting for them. These acts, even though pretty small and obvious, was something I weren’t able to do bacause I’m always busy with something at all time. However finally making time to actually do this made me realize how much beautiful it feels to see that magical smile on others face.</p><h3>How It Helped?</h3><p>It’s funny how these little things, which had nothing to do with my actual problems, was able to cheer me up. It didn’t solve my problem but what it did was make me realize that how many beautiful actually surrounds me. And I don’t actually have time to wait and think about all the things that are going wrong when I could very well be enjoying the love that surrounds me instead.</p><p>Cheers!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78df7f52f0a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[And Edhi Will Live On]]></title>
            <link>https://medium.com/@yousra.mashkoor/and-edhi-will-live-on-da536ae3ca82?source=rss-e1841cc6bac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/da536ae3ca82</guid>
            <dc:creator><![CDATA[Yousra Mashkoor]]></dc:creator>
            <pubDate>Sat, 07 Dec 2019 00:00:08 GMT</pubDate>
            <atom:updated>2020-07-18T12:37:01.894Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>The dead has only one place to go… up. Wherever you bury them, they will go the same way, up</blockquote><blockquote>Abdul Sattar Edhi —</blockquote><h3>Where it all began:</h3><h4>Tuesday, 9th July 2016</h4><p>Thousands of candles lit the streets all over the Pakistan. Full of man, women and children, yet silence prevailed. But those hushed sobs and muzzled cries were enough to tell us the death of a King. A King without a crown, who fought without a sword and a shield to protect himself, yet was able to create a kingdom of love and harmony. Where hope blossom and peace triumph. That valiant Leader is none other than Abdul Sattar Edhi himself.</p><p>That day a candle was put off. A candle that was standing in the wind for too long already. But the light never did. He left us, but his journey never did. And so here we were, trying to relive his legacy.</p><blockquote>My religion is humanitarianism, which is the basis of every religion in the world</blockquote><blockquote>Abdul Sattar Edhi —</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*VVjz-2jr53RD5f2AQ8jZwQ.jpeg" /></figure><h3>It’s Our Time Now:</h3><h4>Monday, 2nd December 2019</h4><p>We went out for ‘Edhi Fundraising’ drive. Me and my peers Syed Anwar Ali, Hamza Ali, Hassan Sikandar, Amna Imran and Zaka Ur Rehman had been wondering over and over again the strategies for weeks already. However this time we decided it was time to ‘Just Start’, to make an impact instead. So we went out and did what Edhi had been doing his whole life.</p><p>But we needed a blueprint — a plan. so we shortlisted some of the strategies we’ve been working on before.</p><ul><li>University Drive</li><li>Donations from Organizations</li><li>Market Streets</li></ul><p>Upon general vote and considering the trust we already had with the educational istitutes. Needless to say, we opted for the 1st option.</p><p>We first went to arranged an authorized and trusted letter between Amal Fellowship and Edhi foundation. This was to have a written claim that could vouch for our honesty.</p><p>Meanwhile Hamza Ali went out and arranged this wonderful donation box to keep the spirit of the team up and lifted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xv2v4f1_o_ZVdxzcZcEkmg.jpeg" /></figure><p>And So came the big day. Our donation box and authentication was ready, so were our filled hearts. We stepped first into NED University of Engineering and Technology. Going departments through departments, one group after another. Asking them if they feel comfortable contributing to the cause. And we were surprised to see the tremendous about of support we got. Everyone tried to participate, be it big or small their enthusiasm were enough to motivate us. To go even beyond our limits.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dHjJD2nLr0_TsNMChWOJwA.jpeg" /></figure><p>We then went to Karachi University, again we were welcomed by the immense assistance and love — This was the moment we realized how much Abdul Sattar Edhi was adored and respected even among the new generation.</p><h3>The Impact:</h3><p>We stood tall and proud. The world Edhi was dreaming of his whole life, is now becoming a reality. In just 2 days of our venture we were able to collect more than 13,000/- that was a huge success, specially for us. We went for ‘Amal’ instead of waiting for opportunity to find us. This is the change Edhi was looking for, this is the change we wanted to continue!</p><p>Of course, none of this would have been possible without the motivation and drive of our untiring team. Who went outside their comfort zones to make a difference and make this project a success— GOOD JOB EVERYONE!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2GNUK9RLLQ8qRtXZTQTbCQ.jpeg" /></figure><blockquote>A special thanks to Sir Rizwan and Ma’am Ayesha who supported and motivated us through out the venture.</blockquote><p>Cheers~</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da536ae3ca82" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Eat that Frog with a Pomodoro]]></title>
            <link>https://medium.com/@yousra.mashkoor/eat-that-frog-with-a-pomodoro-5e5186cc4b0b?source=rss-e1841cc6bac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e5186cc4b0b</guid>
            <category><![CDATA[be-efficient]]></category>
            <category><![CDATA[procastination]]></category>
            <category><![CDATA[pomodoro-technique]]></category>
            <dc:creator><![CDATA[Yousra Mashkoor]]></dc:creator>
            <pubDate>Sat, 30 Nov 2019 07:53:39 GMT</pubDate>
            <atom:updated>2019-12-03T11:21:50.364Z</atom:updated>
            <content:encoded><![CDATA[<p>Eat that Frog with a Pomodoro</p><p>Pomodor, a time management method developed by Francesco Cirillo in the late 1980s. It’s a technique well known to fight off procrastination. Specially if you’re someone who find themselves doing stuffs at the dead hours.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*k_jqXZfN7nz8yyqZx71ruA.jpeg" /></figure><p>So basically this is how it works.</p><h4>Step 01:</h4><p>List of all the task that you want to accomplish today</p><h4>Step 02:</h4><p>Turn off all your social media and digital devices.</p><h4>Step 03:</h4><p>Set aside some goodies or rewards for yourself. It could be a chocolate, candies. It could even be a 5 min permit to go through your mails or text.</p><h4>Step 04:</h4><p>Put up a timer for 20 min to work on your task. After every 20 min, completed without distractions would lead you to a 5 min break. It’s when you could reward yourself with the treats in step 3.</p><h4>Step 05:</h4><p>Give your self a star everytime you successfully complete a round. By the time you have 3 stars, give yourself a longer break or a better treat.</p><p>This technique was developed keeping in mind that an attention time span of an average person ranges from 10-20 minutes. And keeping rewards for each round gives us a rush and motive to not give up. However if you’re like me and rewards don’t usually works well with you then you could even set up a penalty, should you fail to complete that particular task.</p><p>I just recently started using this technique to work on my assignments and found tremendous change in my work pace. As stated in the steps above, I divided my daily workload into smaller chunks. Turned off my network and started my timer. Every time I completed my task, I would let myself surfer through my inbox or watch a video on YouTube. By the end of it, I was successfully able to complete my presentation all the while not exhausting myself.</p><p>So yeah! Do give it a shot.</p><p>Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e5186cc4b0b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Random act of kindness]]></title>
            <link>https://medium.com/@yousra.mashkoor/5-random-act-of-kindness-c311c50c78d6?source=rss-e1841cc6bac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c311c50c78d6</guid>
            <category><![CDATA[random]]></category>
            <category><![CDATA[empathy]]></category>
            <category><![CDATA[compassion]]></category>
            <category><![CDATA[love]]></category>
            <category><![CDATA[kindness]]></category>
            <dc:creator><![CDATA[Yousra Mashkoor]]></dc:creator>
            <pubDate>Sat, 30 Nov 2019 07:51:45 GMT</pubDate>
            <atom:updated>2019-12-08T12:48:31.929Z</atom:updated>
            <content:encoded><![CDATA[<p>Kindness, Compassion and empathy.</p><p>Not foreign to us, infect we’ve all experienced it countless of times. We’ve been preaching it for as long as we could remember. We put up posts, status, profiles. Language of love. Language of Kindness. But have we been really one our self?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*q-lIYr3u9alNAVM2NUZh3w.jpeg" /></figure><p>The older we get, it gets harder to see that we all are actually thriving on kindness alone. Not intellect, wittiness or power. They are important, no doubt. But it’s love that gives us hope, compliments that gives us courage and kindness that gives us healthier hearts.</p><p>Scientifically it has been found that kindness are often the source of emotional warmth. That produces hormone oxytocin in the brain and throughout the body. Oxytocin causes the release of a chemical called nitric oxide in blood vessels, which dilates (expands) the blood vessels. This reduces blood pressure, and therefore oxytocin is produced, known as a &quot;cardio-protective&quot; hormone because it protects the heart by lowering blood pressure.</p><p>Even in Islam kindness is considered the most generous act of giving. It’s Our prophet PBUH once said:</p><blockquote>“Every Act Of Kindness Is a Charity” — Prophet (peace be upon him)</blockquote><p>You see that, Every Act of kindness. Be it big or small. Even a simple thank you or an appreciation to someone’s hard work is a form of kindness, a wonderful way of showing our support to them.</p><p>Keeping all that in mind I went through a day, doing small random act of kindness. And if you’re so kind enough to read this, I want you to take these ideas or maybe something else you have in mind, to do the same with other. Let’s make this am endless source or receiving and giving love.</p><ol><li>I went to my canteen and bought some lunch from the lady and gave it to the lady herself.</li><li>I bought in home treats for my mom when I was coming back form my university.</li><li>I made up a profile on 7 cups, and became a listener there –If you don’t know what 7 cups is about, it’s a website where people who are going through some hard times and have a difficult time talking about it. Make and anonymous profile so they could comfortably discuss their issues with other volunteer listeners.</li><li>I send an anonymous mail to my teacher, thanking her and appreciating the love, time and support she gives us.</li><li>I randomly put up a motivating letter in one of the books of our library.</li></ol><p>And believe all of these acts, eventhough I was anonymous, has been really a emotionaly building ride for me. Even though I was the one giving out kindness. It feels as if I’m the who was reciven it instead.</p><p>One think that I came to learn after this activity is that</p><blockquote>Kindness is a double edge sword.</blockquote><p>Peace~</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c311c50c78d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>