<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Leticia Portella&#39;s thoughts and learnings</title>
    <link>https://leportella.com/</link>
    <description>Recent content on Leticia Portella&#39;s thoughts and learnings</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Everything is mine</copyright>
    <lastBuildDate>Thu, 27 Nov 2025 14:25:52 -0500</lastBuildDate>
    <atom:link href="https://leportella.com/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Cork in 4 days</title>
      <link>https://leportella.com/travel/cork/</link>
      <pubDate>Thu, 27 Nov 2025 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/travel/cork/</guid>
      <description>&lt;p&gt;This post has a small caveat&amp;hellip; we did all this in a small break from the lockdown, so we didn&amp;rsquo;t go to closed spaces and a lot of things were still in recovery. Things may differ. We also did everything with public transportation, so we were limited in the options we had for the trip. However, this is totally a trip that can be done by public transportation only :)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Baby is here...</title>
      <link>https://leportella.com/wiki/life/baby/baby-is-here/</link>
      <pubDate>Tue, 07 Oct 2025 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/wiki/life/baby/baby-is-here/</guid>
      <description>&lt;h2 id=&#34;clothes&#34;&gt;Clothes&lt;/h2&gt;&#xA;&lt;p&gt;Penneys and Dunnes have great cotton basic clothes but they have a size small&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Next has the best and cutest outfits but they are more expensive. M&amp;amp;S is also good. I like their clothes&lt;/li&gt;&#xA;&lt;li&gt;Search for donation groups in your area. So many good toys I got from my neighbours&#xA;&lt;ul&gt;&#xA;&lt;li&gt;There’s a free cycle group in the north of Dublin that is fantastic&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;My baby hated swaddle as much as possible. The only thing that worked was the Love to Dream swaddle with hands up. Omg this was life changing. If your baby hates the regular swaddle, try this one&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;ireland-urgent-care&#34;&gt;[Ireland] Urgent care&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If it’s out of hours and you feel like baby is unwell but not sure, you can call Ddoc services. We used them twice in the first year and they were fast and reliable&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You call and tell what is going on. A nurse will call you back and assess your case. If she think it is the case, you will get an appointment with a doctor in the next couple of hours. We went to Swords and Blanchardstown and both were very on time.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;If something is more urgent, there are children hospitals all around. In the north side I think the closest is &lt;a href=&#34;https://www.childrenshealthireland.ie/your-hospital-visit/our-locations/temple/&#34;&gt;Temple Street&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;The book “When your child is sick” is really helpful in knowing when you need to ask for help&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;ireland-baby-development-classes&#34;&gt;[Ireland] Baby development classes&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I went to the Baby Sensory classes and they are a must-go. Absolutely amazing, and they are for all ages up to 13 months.&lt;/li&gt;&#xA;&lt;li&gt;I tried swimming by Water Babies and Turtle Tots. I much more preferred the first, very focused in getting the kid secure in the water. The second is not bad, but I thought it was too slow (and the place I went the water was waaaaay too cold)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;products-i-liked&#34;&gt;Products I liked&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I got a necklace from necklactic that is a necklace and a baby chewer! Highly recommended&lt;/li&gt;&#xA;&lt;li&gt;[Ireland] For portuguese books, Leiturinha doesn&amp;rsquo;t reach us directly but you can get them via &lt;a href=&#34;https://kidsbilingue.com&#34;&gt;Kids Bilíngua&lt;/a&gt; and I also recently discovered &lt;a href=&#34;https://www.instagram.com/livrosforkidsirlanda/&#34;&gt;Livros For Kids&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Books</title>
      <link>https://leportella.com/wiki/life/baby/books/</link>
      <pubDate>Tue, 07 Oct 2025 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/wiki/life/baby/books/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.amazon.co.uk/Pregnancy-Men-expectant-guide-months/dp/190541062X&#34;&gt;Pregnancy for men&lt;/a&gt; —&amp;gt; most books focus on mom, this one is for dads&lt;/li&gt;&#xA;&lt;li&gt;Save our sleep by Tizzy Hall and When your child is sick by Prof Alf Nicholson —&amp;gt; both recommended by my GP&#xA;&lt;ul&gt;&#xA;&lt;li&gt;When your child is sick became super useful when she was a bit older. There’s a clear list of red alerts for each scenario that is helpful&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;60 dias de neblina —&amp;gt; book in portuguese about baby blues. I personally didn&amp;rsquo;t like it, thought it was too dramatic and without a clear train of thought but a lot of friends recommended and loved it&lt;/li&gt;&#xA;&lt;li&gt;What to expect the first year —&amp;gt; tons of tips for what can happen after the birth. I’m using it a lot&lt;/li&gt;&#xA;&lt;li&gt;The wonder weeks —&amp;gt; they explain the growth spurs, when to expect them and what the baby will learn in each one. They also have an app but it is more expensive then buying the book&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>On keeping stem cells at birth</title>
      <link>https://leportella.com/wiki/life/baby/stem-cells/</link>
      <pubDate>Tue, 07 Oct 2025 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/wiki/life/baby/stem-cells/</guid>
      <description>&lt;p&gt;We asked the midwife in our classes and the service is available in Ireland but not as common. The midwife seemed particularly not pro doing this. She said it would be done by private companies and the prices would be around 3000 euro.&lt;/p&gt;&#xA;&lt;p&gt;Decided to study to see if it is a good thing. There’s  a really good article from the New York Times from July 2024 about the topic: &lt;a href=&#34;https://www.nytimes.com/2024/07/15/health/cord-blood-storage-contamination.html&#34;&gt;https://www.nytimes.com/2024/07/15/health/cord-blood-storage-contamination.html&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Recommended Instagram accounts</title>
      <link>https://leportella.com/wiki/life/baby/social-media/</link>
      <pubDate>Tue, 07 Oct 2025 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/wiki/life/baby/social-media/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;When I got pregnancy, my instagram/feed went insane. Don&amp;rsquo;t freak out &amp;lt;3 Block words like pregnancy and disease to make sure you are not flooded with bad content.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Being a mom is amazing. A lot of people will tell you your life is over but it is not. Make sure you follow the right people&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;I love &lt;a href=&#34;https://www.instagram.com/pedsdoctalk?igsh=MTRyYm8xYzl5OWllMg==&#34;&gt;Dr Mona&lt;/a&gt;. She’s absolutely one of the best pediatricians out there&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.instagram.com/drlaurenhughes?igsh=MTJndzFocWljMTAwZw==&#34;&gt;Dr Lauren&lt;/a&gt; is so funny and good. Also a must watch on how to take care of babies&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.instagram.com/pedsbraindoc?igsh=Y3NoNGpuYzU2aHVm&#34;&gt;Dr Shilpa&lt;/a&gt; is more focused on neural development but also I love her as well&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.instagram.com/dr.fabianotebas?igsh=MWk1djdibDVsZHNwMA==&#34;&gt;dr Fabiano&lt;/a&gt; is a Brazilian pediatric doctor. He help me in the first few months but I started to think he was too much later. So check for yourself&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Shopping list</title>
      <link>https://leportella.com/wiki/life/baby/baby-shopping-list/</link>
      <pubDate>Tue, 07 Oct 2025 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/wiki/life/baby/baby-shopping-list/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://docs.google.com/spreadsheets/d/1QaJPa_cjD96G2b9oFRPCPNp3r2r5eGPkGss6RR97LIM/edit?usp=sharing&#34;&gt;This was my baby shopping list&lt;/a&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I focused on the bare bare minimum because things can go insane&lt;/li&gt;&#xA;&lt;li&gt;If in Ireland, do buy things in advance. Our crib delivery date was 2 months away and still they said it could take an extra month. The buggy we got on &lt;a href=&#34;http://babydocshop.ie&#34;&gt;babydocshop.ie&lt;/a&gt; and the estimates is 4-5 weeks to delivery&lt;/li&gt;&#xA;&lt;li&gt;I don&amp;rsquo;t recommend buying a lot of baby clothes. Most people I know wanted to give me clothes and we ended up with waaaay more than I expected&lt;/li&gt;&#xA;&lt;li&gt;If you do buy clothes, most people recommended ziper onesies because changing diapers in the middle of the night and trying to find buttons is painful&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The most recommended brand they gave me was Carters&lt;/li&gt;&#xA;&lt;li&gt;Particularly, I hated the zipped clothes because they made a lump that would be in baby&amp;rsquo;s face&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Being pregnant (in Ireland mostly)</title>
      <link>https://leportella.com/wiki/life/baby/pregnancy/</link>
      <pubDate>Fri, 04 Apr 2025 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/wiki/life/baby/pregnancy/</guid>
      <description>&lt;p&gt;Last update: Apr 2025&lt;/p&gt;&#xA;&lt;h2 id=&#34;as-soon-as-you-discover&#34;&gt;As soon as you discover&amp;hellip;&lt;/h2&gt;&#xA;&lt;p&gt;The biggest recommendations are:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Do pelvic physiotherapy. I went to &lt;a href=&#34;https://herphysio.ie/&#34;&gt;Her Physio&lt;/a&gt; as soon as could. She is a Brazilian who lives in Ireland for 12 years and I couldn&amp;rsquo;t recommend her enough. If you speak PT, her online content is GOLD&#xA;&lt;ul&gt;&#xA;&lt;li&gt;She books early. Book 2-3 sessions in advance and cancel if you don&amp;rsquo;t like it&lt;/li&gt;&#xA;&lt;li&gt;Each session is 160 euro, Laya covers 40 euro. I do 1 per month, and 2 in the last month before due date&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The partner is recommended to go in one of the last sessions so they can learn and help on the day!&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Even if you want to go through a C-Section, your body will change a lot, so you can be prepared&lt;/li&gt;&#xA;&lt;li&gt;I was so so so scary of the birth, she changed my life, really.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Find a GP that is free during pregnancy and afterwards. Everything is free for children until they are 8 years old in Ireland, so having a doctor that is free is a must. Also one near your house. You don’t want to travel with a feverish baby if you need&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;ireland-public-vs-semi-private-vs-private&#34;&gt;[Ireland] Public vs Semi Private vs Private&lt;/h2&gt;&#xA;&lt;p&gt;We decided to go Public. Basically because the semi-private and private you need to pay for the doctors and you are responsible for all costs at delivery (epidural, C-section, etc). The insurance do cover most of it but we decided it was not worth the risk vs benefit.&lt;/p&gt;</description>
    </item>
    <item>
      <title>What I know about buying a house in Dublin</title>
      <link>https://leportella.com/wiki/life/ireland/buying-house/</link>
      <pubDate>Fri, 04 Apr 2025 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/wiki/life/ireland/buying-house/</guid>
      <description>&lt;p&gt;Last update: Apr 2025&lt;/p&gt;&#xA;&lt;h1 id=&#34;estimated-costs&#34;&gt;Estimated costs&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Solicitor and fees (we budgeted ~3000 for this)&lt;/li&gt;&#xA;&lt;li&gt;Stamp duty is 1% of house price&lt;/li&gt;&#xA;&lt;li&gt;You need 10k on the moment of sale agreed&lt;/li&gt;&#xA;&lt;li&gt;You need 10% of house value (banks won&amp;rsquo;t lend more than 90%)&lt;/li&gt;&#xA;&lt;li&gt;A house inspection (if used) / Snagging (if new)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I paid 450 on mine, a friend paid 300 each visit (there were multiple, it was a new house)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Check other hidden costs &lt;a href=&#34;https://www.instagram.com/p/DGqEjXZsmcx/&#34;&gt;here&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;process&#34;&gt;Process&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Approval in principle&#xA;&lt;ul&gt;&#xA;&lt;li&gt;This is basically a letter that your bank tells anyone the amount of money they are potentially willing to lend you&lt;/li&gt;&#xA;&lt;li&gt;You basically need 6 months of bank statements and payslips&#xA;&lt;ul&gt;&#xA;&lt;li&gt;This could be more complicated now or if you go to a broker&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Usually from 3.5x to 5x times the amount of combined salaries&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In general, banks won&amp;rsquo;t lend you more than 90% of the house value. So if make sure you have ~10% of the house value in cash. So basically the amount you can buy a house would be mortgage amount + 10% of mortgage amount.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Say you can lend 400k as a mortgage. Typically, you would give 40k, and get a 440k house&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;In some cases you can get up to 5x. Check with bank/broker to see how could you apply&lt;/li&gt;&#xA;&lt;li&gt;To extend the multiplication factor I believe having a savings account that you consistently add money (and not use it) really helps&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Lots of people go to a broker. We did everything directly with AIB because it was the cheapest rates. They were &lt;em&gt;very&lt;/em&gt; annoying (lots of documents) but it worked out for us. If you want simplicity get a broker.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;For instance, because we weren&amp;rsquo;t in Ireland for 3 years they demanded a credit check from Brazil. We had to pay Serasa Premium because the free report wasn&amp;rsquo;t enough. Other people said the free report translated by Google Translate worked just fine.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;House viewing&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Check below&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Sale Agreed&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You need to pay 10k to realtor at the moment of sale agreed to guarantee it&#xA;&lt;ul&gt;&#xA;&lt;li&gt;This amount is not to be returned &lt;em&gt;unless&lt;/em&gt; there&amp;rsquo;s a problem with the property. If you just “give up”, this money is lost&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Get the house checked. Bank will make their own evaluation but you should know what you are doing&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I did mine with PMK Architects. It was not an amazing report but not bad. The house was pretty new&lt;/li&gt;&#xA;&lt;li&gt;A friend did with ECO Design and Management +353 86 604 2430 (Jeremy)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.instagram.com/lar.construction?igsh=MWJrOTcxdnh5Z2hjZQ==&#34;&gt;This company&lt;/a&gt; seem to have good reports&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;You should get a &lt;em&gt;good&lt;/em&gt; Solicitor. Mine was &lt;a href=&#34;https://doylelegal.ie/&#34;&gt;Hazel Doyle&lt;/a&gt;, she is very good&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Approval&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You don&amp;rsquo;t need to wait sale agreed to start submitting documents to the bank (AIB)&lt;/li&gt;&#xA;&lt;li&gt;When we went sale agreed we already have ~50% of documents accepted&lt;/li&gt;&#xA;&lt;li&gt;If you are under 3y in Ireland AIB asked for proof you don&amp;rsquo;t have debts in other countries&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Don&amp;rsquo;t forget to cancel the Serasa Premium. You have to do it via email.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Final&#xA;&lt;ul&gt;&#xA;&lt;li&gt;On the final day, you check the property one last time before giving the go-ahead for your solicitor to transfer the money. This is quite nerve wrecking because it is the last time you can back out and only loose the 10k.&lt;/li&gt;&#xA;&lt;li&gt;Be aware that this might be a disappointment. On the viewing day the house was decorated and beautiful. On the final day, it was dirty, the walls had marks of when the pictures were and there were boxes everywhere. Because it was empty it felt too small. It was not an amazing feeling. Brace yourself and make sure to remember you saw its potential.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;general-tips&#34;&gt;General tips&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.instagram.com/crazyhouseprices/&#34;&gt;This instagram&lt;/a&gt; have tons of useful tips&#xA;&lt;ul&gt;&#xA;&lt;li&gt;We sent a message to them at the time and they suggested that we send a letter to sellers regarding us and all our history. We don&amp;rsquo;t know if it helped or not but they cancelled a viewing after. Check &lt;a href=&#34;https://www.instagram.com/p/DG-vza_sgxA/&#34;&gt;this post&lt;/a&gt; for another person that did something similar.  Check their tips. It might be invaluable for you.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Ireland has a Help to Buy scheme for new developments where they lend some of the amount for the 10% entrance. See if you qualify and if the development qualify&#xA;&lt;ul&gt;&#xA;&lt;li&gt;This doesn&amp;rsquo;t work for used houses, only new ones.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;while-looking-for-a-house&#34;&gt;While looking for a house…&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Call. Always. They don&amp;rsquo;t respond email&lt;/li&gt;&#xA;&lt;li&gt;Put alerts to make sure you get viewings early.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I once called a house the day they announced. They forgot to put me for viewing and when I called again there were 92 people in the waitlist. I fought to get a place on the view.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;I suggest going to houses even if you are not interested, so you can get a sense of things you like and dislike&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://data.pobal.ie/portal/apps/experiencebuilder/experience/?id=3b0acba7eb694ffa85340a60f81d516c&#34;&gt;Check census data about the neighbourhood&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Quick reminder that this is a &lt;em&gt;money&lt;/em&gt; criteria and not violence/criminality. So use this tool wisely&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;If you are looking for new developments, put your name in even if you don&amp;rsquo;t have things ready. These things have a massive waitlist and everything take forever!&lt;/li&gt;&#xA;&lt;li&gt;Create a checklist of your ideal house and add things you must check&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It is easy to get yourself excited during a viewing and not check for everything you want&lt;/li&gt;&#xA;&lt;li&gt;If you really like the house, try make video of it, so you can rewatch and check for things&lt;/li&gt;&#xA;&lt;li&gt;For instance we saw a house that didn&amp;rsquo;t have space for garbage bins in the front and no side door to the backyard. So you had to go with the bins inside the house to get it to the front. Imagine doing this during a wet day&lt;/li&gt;&#xA;&lt;li&gt;Some of my checks:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A kitchen with windows or a skyceiling&lt;/li&gt;&#xA;&lt;li&gt;Floor to not squeak or that felt like they were fragile&lt;/li&gt;&#xA;&lt;li&gt;Utility room (didn&amp;rsquo;t happen)&lt;/li&gt;&#xA;&lt;li&gt;Near the dart&lt;/li&gt;&#xA;&lt;li&gt;The bins to be outside at all times&lt;/li&gt;&#xA;&lt;li&gt;3 rooms + office space or 4 rooms (didn&amp;rsquo;t happen)&lt;/li&gt;&#xA;&lt;li&gt;Supermarket nearby (didn&amp;rsquo;t happen)&lt;/li&gt;&#xA;&lt;li&gt;Big back yard&lt;/li&gt;&#xA;&lt;li&gt;South facing&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;I had 19 points in my checklist and my house had ~85% of them&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;if-you-found-a-house&#34;&gt;If you found a house…&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You can see all requests for extensions and renews online. They are all public&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Our house had a major renovation approved, but 7 neighbours complained about it. Everything was available: architectural projects, plans, letters of complaint, etc&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://sun-direction.com/&#34;&gt;Check if your house has enough sunlight&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If you zoom enough you can find your house and check the sun over the year. In Ireland, people prefer the south-facing side as there will be more sun over the year&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.floodinfo.ie/map/floodplans/&#34;&gt;Check the flood maps&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Some houses have a risk of flood (check &lt;a href=&#34;https://www.instagram.com/p/DGv5lcxsUWk/&#34;&gt;this post&lt;/a&gt;) and you&amp;rsquo;ll have a tough time getting insurance for it. Make sure your house don&amp;rsquo;t have this risk!&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;The house values are all available online&#xA;&lt;ul&gt;&#xA;&lt;li&gt;When the previous owner bought it and for how much&lt;/li&gt;&#xA;&lt;li&gt;Near houses prices, etc&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Dublin tourist guide 2024</title>
      <link>https://leportella.com/travel/dublin-2022/</link>
      <pubDate>Wed, 05 Jun 2024 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/travel/dublin-2022/</guid>
      <description>&lt;p&gt;Welcome to Dublin :)&lt;/p&gt;</description>
    </item>
    <item>
      <title>A conference, an influencer and a bold move</title>
      <link>https://leportella.com/goto-writer/</link>
      <pubDate>Mon, 22 Jan 2024 12:25:52 -0500</pubDate>
      <guid>https://leportella.com/goto-writer/</guid>
      <description>&lt;p&gt;When I decided to try to write a book, the only certainty I had was that I was not an expert on a lot of topics I wanted to write about. So I knew that to make sure I was writing a book that was correct regarding the industry standard I would need to study… &lt;strong&gt;a lot&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;For instance, &lt;a href=&#34;https://link.springer.com/chapter/10.1007/978-1-4842-8969-3_14&#34;&gt;I have a whole chapter&lt;/a&gt; dedicated on software developers: expectations for each phase of the career, the myth of the superhero developer and the “soft” vs “hard” skills. Although I am a software engineer for many years now, that doesn&amp;rsquo;t mean my experience is universal. If I wanted to write something that was —more or less— universal, I needed to make sure to learn about many points of view.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Growing as an engineer at Stripe</title>
      <link>https://leportella.com/growing-at-stripe/</link>
      <pubDate>Thu, 05 Oct 2023 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/growing-at-stripe/</guid>
      <description>&lt;p&gt;Many many moons ago, I &lt;a href=&#34;https://leportella.com/new-eng-stripe/&#34;&gt;wrote a blog post&lt;/a&gt; about what was like in my first 6 months at Stripe. Since then, a lot has happened including a whole pandemic and me spending every free hour writing &lt;a href=&#34;https://leportella.com/book/&#34;&gt;my own book&lt;/a&gt;. Because of that and many more things, I never got to write a second piece to what I was initially hoping to be a once-a-year kind of blog post.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My career and my new book on Compressed Fm</title>
      <link>https://leportella.com/compressed_fm/</link>
      <pubDate>Fri, 12 May 2023 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/compressed_fm/</guid>
      <description></description>
    </item>
    <item>
      <title>What do I do here, anyway?</title>
      <link>https://leportella.com/what-do-i-do-here/</link>
      <pubDate>Sat, 01 Apr 2023 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/what-do-i-do-here/</guid>
      <description>&lt;p&gt;&lt;em&gt;This is the translation of the keynote talk I gave at Pycon Brazil 2022. The talk was about leading complex software engineering projects and what is the major skill needed for the job&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>My new book is here!</title>
      <link>https://leportella.com/book/</link>
      <pubDate>Wed, 12 Oct 2022 22:55:34 -0300</pubDate>
      <guid>https://leportella.com/book/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s a book about software development for people that don’t have a background in computer science but want to know more about this world. Are you not interested in becoming a developer? No problem! This book is still for you:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;em&gt;We can only build software for everyone if everyone is involved in the construction of software. Anything besides that is utterly flawed. The only way we can guarantee we have technology that actually changes the world is if we include everyone in the conversation. And if your life will more and more be guided by software products, why not be part of this change?&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Python Coverage reports 100% coverage on an untested Class Based View!</title>
      <link>https://leportella.com/coverage-and-cbvs/</link>
      <pubDate>Thu, 10 Mar 2022 00:26:52 +0100</pubDate>
      <guid>https://leportella.com/coverage-and-cbvs/</guid>
      <description>&lt;p&gt;While trying to check test coverage for a file that had multiple Class Based Views (CBV) everything was returning as coverage but they weren’t! I couldn’t understand why and it took me days until I get to an answer! So I wrote this post to make it more easily accessible 😊&lt;/p&gt;</description>
    </item>
    <item>
      <title>Counting HTML tags with HTMLParser</title>
      <link>https://leportella.com/htmlparser-count-tags/</link>
      <pubDate>Sun, 20 Feb 2022 14:26:52 +0100</pubDate>
      <guid>https://leportella.com/htmlparser-count-tags/</guid>
      <description>&lt;p&gt;I fell into a case where I wanted to count the tags that were present in an HTML file and I didn&amp;rsquo;t want to download any library (like BeautifulSoup) to do so. I searched online and realized I could use the HTMLParser to do that.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The complete step-by-step guide to create and deploy your multi-language website - Part 4</title>
      <link>https://leportella.com/blog-step-by-step-iv/</link>
      <pubDate>Thu, 10 Feb 2022 14:26:52 +0100</pubDate>
      <guid>https://leportella.com/blog-step-by-step-iv/</guid>
      <description>&lt;p&gt;This is the forth post on how to create your website step by step!&lt;/p&gt;</description>
    </item>
    <item>
      <title>The complete step-by-step guide to create and deploy your multi-language website - Part 3</title>
      <link>https://leportella.com/blog-step-by-step-iii/</link>
      <pubDate>Sun, 30 Jan 2022 14:26:52 +0100</pubDate>
      <guid>https://leportella.com/blog-step-by-step-iii/</guid>
      <description>&lt;p&gt;This is the third post on how to create your website step by step! In this post, we will allow that people can comment on your awesome posts!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Moving from Google Analytics to GoatCounter: 6 months later</title>
      <link>https://leportella.com/analytics2goatcounter/</link>
      <pubDate>Sun, 16 Jan 2022 17:24:52 +0000</pubDate>
      <guid>https://leportella.com/analytics2goatcounter/</guid>
      <description>&lt;p&gt;Last year (2021) &lt;a href=&#34;https://rgth.co/blog/replacing-google-analytics-with-goatcounter/&#34;&gt;I decided to add GoatCounter as the analytics tool for my blog&lt;/a&gt;. There were a couple of reasons why I did it, but the main one is privacy. I am trying to move a bit away from Google, and I wanted something different.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Thank you, thank you, thank you</title>
      <link>https://leportella.com/thankyou-thankyou-thabkyou/</link>
      <pubDate>Sun, 07 Nov 2021 00:25:52 +0100</pubDate>
      <guid>https://leportella.com/thankyou-thankyou-thabkyou/</guid>
      <description>&lt;p&gt;Last week I was part of the 2nd online edition of Pycon Brazil. An inclusive event, with  interpreters to Brazilian sign language, free admission, code of conduct and much more.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Northern Ireland in 2 days</title>
      <link>https://leportella.com/travel/northern-ireland-2-days/</link>
      <pubDate>Sat, 28 Aug 2021 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/travel/northern-ireland-2-days/</guid>
      <description>&lt;p&gt;I wanted to go to Northern Ireland since I first heard of the magnificent Giant&amp;rsquo;s Causeway. Since it was a short drive from Dublin, we decided to rent a car and do a trip there. Because we never get the car, we decided &lt;strong&gt;not&lt;/strong&gt; to go to Belfast, which we could easily go by train.&lt;/p&gt;&#xA;&lt;h2 id=&#34;day-1&#34;&gt;Day 1&lt;/h2&gt;&#xA;&lt;p&gt;We left Dublin early morning and headed to Northern Ireland. There is no border from one country to the next, which makes the transition from Km/h to Miles/h quite confusing for us.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The complete step-by-step guide to create and deploy your multi-language website - Part 2</title>
      <link>https://leportella.com/blog-step-by-step-ii/</link>
      <pubDate>Sat, 28 Aug 2021 00:25:52 +0100</pubDate>
      <guid>https://leportella.com/blog-step-by-step-ii/</guid>
      <description>&lt;p&gt;This is the second post on how to create your website step by step!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Algarve in 4 days</title>
      <link>https://leportella.com/travel/algarve-4-days/</link>
      <pubDate>Fri, 27 Aug 2021 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/travel/algarve-4-days/</guid>
      <description>&lt;p&gt;We arrived in Faro late on Tuesday evening. We stayed in &lt;a href=&#34;https://goo.gl/maps/WWkjwX6hhUYKJFDL8&#34;&gt;Faro GuestHouse.&lt;/a&gt; The room was nice and there was a lovely balcony where we shared a bottle of wine on our first night with a view to a church.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://leportella.com/assets/img/posts/travel/Algarve01.jpeg#center&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;h2 id=&#34;day-1---faro&#34;&gt;Day 1 - Faro&lt;/h2&gt;&#xA;&lt;p&gt;We woke up and went to the &lt;a href=&#34;https://goo.gl/maps/7caT3b3zQzEP9n2g9&#34;&gt;Igreja do Carmo&lt;/a&gt;, which is a beautiful church but the reason we went there was to see this small chapel made out of human bones. The ticket costed €4 euro each.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The complete step-by-step guide to create and deploy your multi-language website - Part 1</title>
      <link>https://leportella.com/blog-step-by-step-i/</link>
      <pubDate>Sat, 21 Aug 2021 00:25:52 +0100</pubDate>
      <guid>https://leportella.com/blog-step-by-step-i/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve written over and over about &lt;a href=&#34;https://leportella.com/why-have-a-blog.html/&#34;&gt;why you should have a blog and write on it&lt;/a&gt;. I made this website using nothing but free tools. The only thing I paid was my domain (leportella.com) and I find this super cool! 🤩&lt;/p&gt;&#xA;&lt;p&gt;When I created my website I realied on a lot of different tutorials, one for each part of it. Because the process of creating it can be quite tricky, I decided to create a full, step-by-step tutorial.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Injecting the authenticated user when creating a model with CreateView</title>
      <link>https://leportella.com/inject-auth-user-cbv/</link>
      <pubDate>Mon, 02 Aug 2021 14:25:52 +0100</pubDate>
      <guid>https://leportella.com/inject-auth-user-cbv/</guid>
      <description>&lt;p&gt;I had a Django model that had 2 regular attributes and a user Foreign Key:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Dev Journey podcast interview</title>
      <link>https://leportella.com/devjourney/</link>
      <pubDate>Mon, 07 Jun 2021 15:25:52 +0100</pubDate>
      <guid>https://leportella.com/devjourney/</guid>
      <description>&lt;p&gt;I talked to Tim Bourguignon at the Dev Journey podcast about career life and mentoring.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Should I speak at this event?</title>
      <link>https://leportella.com/should-i-speak/</link>
      <pubDate>Mon, 12 Apr 2021 17:14:52 -0300</pubDate>
      <guid>https://leportella.com/should-i-speak/</guid>
      <description>&lt;p&gt;A friend of mine told me this week that she was invited to give a talk at a conference, and asked me what I thought about it. I told her all the things I consider when giving a talk and I discovered I consider a lot of things!&lt;/p&gt;</description>
    </item>
    <item>
      <title>I&#39;m not the best</title>
      <link>https://leportella.com/not-the-best/</link>
      <pubDate>Thu, 25 Mar 2021 17:14:52 -0300</pubDate>
      <guid>https://leportella.com/not-the-best/</guid>
      <description>&lt;p&gt;All my career I worked in places where people were better than me. Like&amp;hellip; &lt;em&gt;way&lt;/em&gt; better, in one thing or another. They were truly exceptional people.&lt;/p&gt;</description>
    </item>
    <item>
      <title>A mountain tale</title>
      <link>https://leportella.com/mountain-tale/</link>
      <pubDate>Mon, 07 Dec 2020 09:25:52 -0300</pubDate>
      <guid>https://leportella.com/mountain-tale/</guid>
      <description>&lt;p&gt;There are people who can play the piano wonderfully while others can&amp;rsquo;t even clap in rhythm (me).&#xA;There are people who can express themselves well and people who cannot deal with the countless thoughts that flow through their brain.&#xA;There are multiple types of intelligence.&lt;/p&gt;&#xA;&lt;p&gt;In the past few days I have had several philosophical conversations with people of all kinds.&#xA;A recurring theme was a feeling of inability, of mediocrity, mixed with drops of sadness and a handful of blindness. Blindness? Yes, blindness.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My Beth</title>
      <link>https://leportella.com/wiki/poems/my-beth/</link>
      <pubDate>Mon, 07 Dec 2020 09:25:52 -0300</pubDate>
      <guid>https://leportella.com/wiki/poems/my-beth/</guid>
      <description>&lt;p&gt;From: Little Women&lt;/p&gt;&#xA;&lt;h1 id=&#34;my-beth&#34;&gt;&amp;lsquo;My Beth&lt;/h1&gt;&#xA;&lt;p&gt;&amp;lsquo;Sitting patient in the shadow&lt;/p&gt;&#xA;&lt;p&gt;Till the blessed light shall come,&lt;/p&gt;&#xA;&lt;p&gt;A serene and saintly presence&lt;/p&gt;&#xA;&lt;p&gt;Sanctifies our troubled home.&lt;/p&gt;&#xA;&lt;p&gt;Earthly joys, and hopes, and sorrows,&lt;/p&gt;&#xA;&lt;p&gt;Break like ripples on the strand&lt;/p&gt;&#xA;&lt;p&gt;Of the deep and solemn river&lt;/p&gt;&#xA;&lt;p&gt;Where her willing feet now stand.&lt;/p&gt;&#xA;&lt;h2&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&amp;lsquo;Oh, my sister, passing from me,&lt;/p&gt;&#xA;&lt;p&gt;Out of human care and strife,&lt;/p&gt;&#xA;&lt;p&gt;Leave me, as a gift, those virtues&lt;/p&gt;&#xA;&lt;p&gt;Which have beautified your life.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Learning the name of things: Ternary Operators</title>
      <link>https://leportella.com/ternary-operators/</link>
      <pubDate>Fri, 04 Dec 2020 08:28:52 -0300</pubDate>
      <guid>https://leportella.com/ternary-operators/</guid>
      <description>&lt;p&gt;One thing that I always say that is hard from learning computer science by yourself, is not knowing what you don&amp;rsquo;t know. I learned the name of a couple of concepts that I am going to share, so people know they exist 😊&lt;/p&gt;&#xA;&lt;p&gt;When I started studying Python, if a new variable depended on another variable, I would write something like this:&lt;/p&gt;</description>
    </item>
    <item>
      <title>My Office Toolkit</title>
      <link>https://leportella.com/wiki/tools/my-office/</link>
      <pubDate>Thu, 26 Nov 2020 17:40:52 +0000</pubDate>
      <guid>https://leportella.com/wiki/tools/my-office/</guid>
      <description>&lt;h2 id=&#34;microphone&#34;&gt;Microphone&lt;/h2&gt;&#xA;&lt;p&gt;I use a &lt;a href=&#34;https://www.bluemic.com/en-us/products/yeti/&#34;&gt;Blue Yeti&lt;/a&gt; microphone for recording my podcast.&lt;/p&gt;&#xA;&lt;h2 id=&#34;keyboard&#34;&gt;Keyboard&lt;/h2&gt;&#xA;&lt;p&gt;I use a &lt;a href=&#34;https://www.keychron.com/products/keychron-k2-wireless-mechanical-keyboard&#34;&gt;Keychron K2 Wireless&lt;/a&gt; keyboard. They can pair with up to 3 devices at once, which was a good feature.&#xA;I don&amp;rsquo;t like clicky keyboard so I am using the Red switch option, which also makes the keyboard more thin and other models.&lt;/p&gt;&#xA;&lt;h2 id=&#34;portable-monitor&#34;&gt;Portable monitor&lt;/h2&gt;&#xA;&lt;p&gt;I bought an &lt;a href=&#34;https://www.asus.com/us/Monitors/MB16AC/&#34;&gt;Asus MB16A&lt;/a&gt; Portable monitor to take on my long trips back home. It look like a giant ipad of 15,9&amp;rsquo; that is easy enough to take into trips where you need to work but don&amp;rsquo;t have an office.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Generics in Scala: Upper and Lower Bound</title>
      <link>https://leportella.com/scala-v/</link>
      <pubDate>Wed, 11 Nov 2020 20:25:52 +0000</pubDate>
      <guid>https://leportella.com/scala-v/</guid>
      <description>&lt;p&gt;&lt;em&gt;&amp;ldquo;This post is also known as “My saga learning Scala - Part 5&amp;rdquo;&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Perseverance and consistency as a path to becoming a (Latina) software engineer</title>
      <link>https://leportella.com/latinas-in-tech/</link>
      <pubDate>Mon, 02 Nov 2020 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/latinas-in-tech/</guid>
      <description>&lt;p&gt;Panel with the London Chapter of Latinas in Tech!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Favorite Tools</title>
      <link>https://leportella.com/wiki/tools/software/</link>
      <pubDate>Wed, 28 Oct 2020 17:40:52 +0000</pubDate>
      <guid>https://leportella.com/wiki/tools/software/</guid>
      <description>&lt;h2 id=&#34;design&#34;&gt;Design&lt;/h2&gt;&#xA;&lt;p&gt;I use &lt;a href=&#34;https://www.canva.com/&#34;&gt;Canva&lt;/a&gt; for all my podcasts designs and my resumee!&lt;/p&gt;&#xA;&lt;h2 id=&#34;fluxograms&#34;&gt;Fluxograms&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://whimsical.com/&#34;&gt;Whimsical&lt;/a&gt; is my go-to tool for this. It is very expensive but it allows you 4 free boards (and I use them well)!&lt;/p&gt;&#xA;&lt;h2 id=&#34;mental-maps&#34;&gt;Mental maps&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://whimsical.com/&#34;&gt;Whimsical&lt;/a&gt; is my go-to tool for this. It is very expensive but it allows you 4 free boards (and I use them well)!&lt;/p&gt;&#xA;&lt;h2 id=&#34;notes&#34;&gt;Notes&lt;/h2&gt;&#xA;&lt;p&gt;I like the &lt;a href=&#34;http://bear.app/&#34;&gt;bear.app&lt;/a&gt; for daily diaries in my work. It is pretty cheap if you want multi-platform use (15 euro/year)!&lt;/p&gt;</description>
    </item>
    <item>
      <title>A quick overview on Git and Github</title>
      <link>https://leportella.com/git-github/</link>
      <pubDate>Fri, 02 Oct 2020 19:07:10 +0100</pubDate>
      <guid>https://leportella.com/git-github/</guid>
      <description>&lt;p&gt;Hacktoberfest is here and it is an awesome moment to contribute to open-source! However, Git and Github can be quite scary, so let&amp;rsquo;s talk a bit about the basics of these two extremely useful tools!&lt;/p&gt;&#xA;&lt;h2 id=&#34;versioning&#34;&gt;Versioning&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://git-scm.com/&#34;&gt;Git&lt;/a&gt; is a versioning system that was designed focusing in code versioning. It basically helps us to handle file modification in an easy and painless way.&lt;/p&gt;&#xA;&lt;p&gt;Github, on the other side, is a company that implemented a system that allows you to use git to version your code while storing the code in their cloud. But it is not the only company. Bitbucket and Gitlab are other examples of companies that have systems that allow storage and group interaction while using git versioning.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Venv</title>
      <link>https://leportella.com/wiki/python/venv/</link>
      <pubDate>Fri, 02 Oct 2020 12:08:36 +0100</pubDate>
      <guid>https://leportella.com/wiki/python/venv/</guid>
      <description>&lt;h2 id=&#34;create-a-venv-with-python3&#34;&gt;Create a venv with python3&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;python3 -m venv MyFirstVenv&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;create-a-venv-with-conda&#34;&gt;Create a venv with conda&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;conda create -n MyFirstVenv python&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;2.7&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;understanding-virtualenvs&#34;&gt;Understanding VirtualEnvs&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://virtualenv.pypa.io/en/latest/&#34;&gt;Virtualenv&lt;/a&gt; is a Python tool developed to isolate development environments. It is really handy when you need to isolate projects that use different versions of Python and packages. It is specially good if you consider that some operational systems use Python as a default tool. Imagine that your system uses a specific library with a specific version. Change it can cause severe complications on your whole system. So, you definetely should be careful.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Latex</title>
      <link>https://leportella.com/wiki/latex/</link>
      <pubDate>Thu, 01 Oct 2020 16:59:37 +0100</pubDate>
      <guid>https://leportella.com/wiki/latex/</guid>
      <description>&lt;h2 id=&#34;minimum-working-example&#34;&gt;Minimum working example&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-latex&#34; data-lang=&#34;latex&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;% mydoc.tex&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;\documentclass&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;[12pt,openany]&lt;/span&gt;{memoir}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;\usepackage&lt;/span&gt;{graphicx}                      &lt;span style=&#34;color:#75715e&#34;&gt;% allow images&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;\usepackage&lt;/span&gt;{float}                         &lt;span style=&#34;color:#75715e&#34;&gt;% image location ([H])&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;\title&lt;/span&gt;{My LaTeX book}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;\author&lt;/span&gt;{Leticia Portella}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;% ============= DOCUMENT =================&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;\begin&lt;/span&gt;{document}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;\maketitle&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;\include&lt;/span&gt;{chapter1}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;\bibliography&lt;/span&gt;{mydoc}                       &lt;span style=&#34;color:#75715e&#34;&gt;% bib file &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;\bibliographystyle&lt;/span&gt;{plain} &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;\end&lt;/span&gt;{document}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-latex&#34; data-lang=&#34;latex&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;% mydoc.bib&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;@book{Armour,                                         &lt;span style=&#34;color:#75715e&#34;&gt;% Armour will be the id &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;  author    = &amp;#34;P. G. Armour&amp;#34;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  title     = &amp;#34;The Laws of Software Process&amp;#34;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  publisher = &amp;#34;Auerbach&amp;#34;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  year      = &amp;#34;2003&amp;#34;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-latex&#34; data-lang=&#34;latex&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;% chapter1.tex&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;\chapter&lt;/span&gt;{My first chapter}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;As written by &lt;span style=&#34;color:#66d9ef&#34;&gt;\cite&lt;/span&gt;{Armour}...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Awesome (free) contents to study computer science</title>
      <link>https://leportella.com/cs-materials/</link>
      <pubDate>Wed, 30 Sep 2020 11:15:52 +0100</pubDate>
      <guid>https://leportella.com/cs-materials/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://leportella.com/from-oceanographer-to-programmer/&#34;&gt;I didn&amp;rsquo;t study computer science&lt;/a&gt; in college and I never took a &amp;ldquo;formal&amp;rdquo; programming course. Without going into too much detail, I want to reaffirm that, looking at the past, I by no means believe that having gone to another college (different from the profession I have today) was a waste of time. &amp;lt;! - more -&amp;gt; A university teaches many things that you cannot learn by yourself, behind a computer, sinking in a sea of content. However, when deciding to change areas you have to swim hard to overcome the holes that the lack of a theoretical computer science course can give you. Over time I have been collecting courses and texts that have helped me and still help me fill in the gaps. Today I will share what I found best in terms of courses and texts to learn what I consider to be the knowledge base in the technology area, without worrying about programming languages.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My favorite Python tricks</title>
      <link>https://leportella.com/pytricks/</link>
      <pubDate>Tue, 29 Sep 2020 23:33:52 +0100</pubDate>
      <guid>https://leportella.com/pytricks/</guid>
      <description>&lt;p&gt;I was recently helping a friend who was transitioning from Matlab to Python. Giving him some tips, I realized that many of the cool nuances I learned in Python were taught me by someone  in a &amp;ldquo;do you know that?&amp;rdquo; style or to solve a very specific problem that could be solved more simply.&lt;/p&gt;&#xA;&lt;p&gt;When helping this friend who is there on the other side of the world, I remembered the time when there was no one to teach me a cool &lt;em&gt;trick&lt;/em&gt; and, in fact, I didn&amp;rsquo;t even know it could exist.&lt;/p&gt;</description>
    </item>
    <item>
      <title>About</title>
      <link>https://leportella.com/about/</link>
      <pubDate>Sat, 26 Sep 2020 22:55:34 +0100</pubDate>
      <guid>https://leportella.com/about/</guid>
      <description>&lt;p&gt;Hi! Welcome to my corner on the internet :)&lt;/p&gt;&#xA;&lt;p&gt;While writing this I am wondering what would you like to know about me. I usually try to summarize it in one phrase: &lt;a href=&#34;https://leportella.com/from-oceanographer-to-programmer.html&#34;&gt;I am an oceanographer that discovered to be passionate about programming&lt;/a&gt; and decided to change careers. But it feels… simplistic, I guess? Well… I guess every summary is a simplistic thing. If this is what you are looking for, great! Go away in peace and don&amp;rsquo;t mind the long text that follows&lt;/p&gt;</description>
    </item>
    <item>
      <title>Contact me!</title>
      <link>https://leportella.com/contact/</link>
      <pubDate>Sat, 26 Sep 2020 22:55:34 +0100</pubDate>
      <guid>https://leportella.com/contact/</guid>
      <description>&lt;h3&gt;Write me!&lt;/h3&gt;&#xA;  &#xA;      &lt;h4 class=&#34;card-title&#34;&gt;Sorry :(&lt;/h4&gt;&#xA;&lt;p&gt;I received too many spams, so I removed the form. See you on social networks :) &lt;/p&gt;</description>
    </item>
    <item>
      <title>Configuring VSCode to work with Minted (LaTeX)</title>
      <link>https://leportella.com/minted-vscode/</link>
      <pubDate>Tue, 15 Sep 2020 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/minted-vscode/</guid>
      <description>&lt;p&gt;I was handling some LaTeX files and I needed code coloring. I found the package &lt;a href=&#34;https://www.ctan.org/pkg/minted&#34;&gt;minted&lt;/a&gt; and it seemed perfect, but it required a couple of things that made my life a bit more complicated on VSCode.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introduction to LaTeX</title>
      <link>https://leportella.com/latex/</link>
      <pubDate>Tue, 15 Sep 2020 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/latex/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.latex-project.org/&#34;&gt;LaTeX&lt;/a&gt; (yes, written exactly like this) is a system that allows you to write documents without worrying about the style of the presentation.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Tutorial data science libraries</title>
      <link>https://leportella.com/oceanhackweek/</link>
      <pubDate>Sat, 15 Aug 2020 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/oceanhackweek/</guid>
      <description>&lt;p&gt;Tutorial given during the OceanHackWeek 2020&lt;/p&gt;</description>
    </item>
    <item>
      <title>From Oceanographer to self-taught developer working at Stripe</title>
      <link>https://leportella.com/nocsdegree.html/</link>
      <pubDate>Wed, 24 Jun 2020 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/nocsdegree.html/</guid>
      <description>&lt;p&gt;Leticia is a Brazilian developer who changed career to web development four years ago. She previously worked as an Oceanographer but caught the coding bug! Now she works as a developer at the payments solution company Stripe. She is a great example of a software engineer without a CS degree who has a successful career.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Why you should have a blog (and write in it)</title>
      <link>https://leportella.com/why-have-a-blog.html/</link>
      <pubDate>Sun, 21 Jun 2020 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/why-have-a-blog.html/</guid>
      <description>&lt;p&gt;If you ever told me you are learning to code (or anything, really), chances are I told you you should have your blog and write in it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Classes, Objects and Traits in Scala</title>
      <link>https://leportella.com/scala-iv/</link>
      <pubDate>Fri, 19 Jun 2020 23:25:52 -0500</pubDate>
      <guid>https://leportella.com/scala-iv/</guid>
      <description>&lt;p&gt;&lt;em&gt;This post is also known as “My saga learning Scala - Part 4“&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>How I deal with my impostor syndrome</title>
      <link>https://leportella.com/impostor-syndrome.html/</link>
      <pubDate>Sat, 09 May 2020 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/impostor-syndrome.html/</guid>
      <description>&lt;p&gt;As the years went by, I developed a framework to deal with my impostor syndrome in different scales it occurs. It is not something super complex or with a deep theoretical background, but it worked for me and I&amp;rsquo;ve been using it for the past year.&lt;/p&gt;</description>
    </item>
    <item>
      <title>What does it mean to test software?</title>
      <link>https://leportella.com/my-handbook-i/</link>
      <pubDate>Sun, 03 May 2020 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/my-handbook-i/</guid>
      <description>&lt;p&gt;Although we think of a software as being this one massive thing that does a lot of things, we can thing of a software as a huge pile of small functions that work together. A function is basically something that receives inputs, work with them internally and returns an output.&lt;/p&gt;</description>
    </item>
    <item>
      <title>SQL</title>
      <link>https://leportella.com/wiki/sql/</link>
      <pubDate>Sat, 25 Apr 2020 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/wiki/sql/</guid>
      <description>&lt;h2 id=&#34;query-if-a-string-is-in-a-list&#34;&gt;Query if a string is in a list&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;select&lt;/span&gt; name, &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;from&lt;/span&gt; my.&lt;span style=&#34;color:#66d9ef&#34;&gt;table&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;where&lt;/span&gt; name &lt;span style=&#34;color:#66d9ef&#34;&gt;IN&lt;/span&gt; (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;jon&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;mary&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;query-within-a-timestamp&#34;&gt;Query within a timestamp&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;select&lt;/span&gt; record&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;from&lt;/span&gt; my.&lt;span style=&#34;color:#66d9ef&#34;&gt;table&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;where&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    created &lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;timestamp&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;2019-10-01 00:00&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;AND&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    created &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;timestamp&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;2019-10-01 23:59&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;creating-temporary-table&#34;&gt;Creating temporary table&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;with&lt;/span&gt; my_new_table &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; (&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#75715e&#34;&gt;-- something here&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;select&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;from&lt;/span&gt; another.&lt;span style=&#34;color:#66d9ef&#34;&gt;table&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;select&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;from&lt;/span&gt; my_new_table&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;string-comparison&#34;&gt;String comparison&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;select&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;from&lt;/span&gt; my_table&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;where&lt;/span&gt; my_table.items &lt;span style=&#34;color:#66d9ef&#34;&gt;LIKE&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;%something%&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;limit&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;10&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;search-for-empty-or-null-strings&#34;&gt;Search for empty or null strings&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;where&lt;/span&gt; (surname &lt;span style=&#34;color:#66d9ef&#34;&gt;is&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;null&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;or&lt;/span&gt; surname &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>SQL - My Cheat Sheet</title>
      <link>https://leportella.com/cheatsheet/sql/</link>
      <pubDate>Sat, 25 Apr 2020 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/cheatsheet/sql/</guid>
      <description>&lt;h2 id=&#34;query-if-a-string-is-in-a-list&#34;&gt;Query if a string is in a list&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;select&lt;/span&gt; name, &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;from&lt;/span&gt; my.&lt;span style=&#34;color:#66d9ef&#34;&gt;table&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;where&lt;/span&gt; name &lt;span style=&#34;color:#66d9ef&#34;&gt;IN&lt;/span&gt; (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;jon&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;mary&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;query-within-a-timestamp&#34;&gt;Query within a timestamp&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;select&lt;/span&gt; record&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;from&lt;/span&gt; my.&lt;span style=&#34;color:#66d9ef&#34;&gt;table&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;where&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    created &lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;timestamp&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;2019-10-01 00:00&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;AND&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    created &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;timestamp&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;2019-10-01 23:59&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;creating-temporary-table&#34;&gt;Creating temporary table&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;with&lt;/span&gt; my_new_table &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; (&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#75715e&#34;&gt;-- something here&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;select&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;from&lt;/span&gt; another.&lt;span style=&#34;color:#66d9ef&#34;&gt;table&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;select&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;from&lt;/span&gt; my_new_table&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;string-comparison&#34;&gt;String comparison&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;select&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;from&lt;/span&gt; my_table&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;where&lt;/span&gt; my_table.items &lt;span style=&#34;color:#66d9ef&#34;&gt;LIKE&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;%something%&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;limit&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;10&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;search-for-empty-or-null-strings&#34;&gt;Search for empty or null strings&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;where&lt;/span&gt; (surname &lt;span style=&#34;color:#66d9ef&#34;&gt;is&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;null&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;or&lt;/span&gt; surname &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Classes in Scala: method and attribute definition</title>
      <link>https://leportella.com/scala-iii/</link>
      <pubDate>Wed, 01 Apr 2020 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/scala-iii/</guid>
      <description>&lt;p&gt;&lt;em&gt;This post is also known as “My saga learning Scala - Part 3“ and is a continuation of&lt;/em&gt; &lt;a href=&#34;https://leportella.com/english/2020/03/08/scala-part-I.html&#34;&gt;&lt;em&gt;Part 1&lt;/em&gt;&lt;/a&gt; &lt;em&gt;and&lt;/em&gt; &lt;a href=&#34;https://leportella.com/english/2020/04/01/scala-part-II.html&#34;&gt;&lt;em&gt;Part 2&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>My saga learning Scala - Part 2</title>
      <link>https://leportella.com/scala-ii/</link>
      <pubDate>Wed, 01 Apr 2020 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/scala-ii/</guid>
      <description>&lt;p&gt;Continuation of &lt;a href=&#34;%7B%7Bbase%7D%7D/english/2020/03/08/scala-part-I.html&#34;&gt;My Saga learning Scala - Part 1&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My saga learning Scala - Part 1</title>
      <link>https://leportella.com/scala-i/</link>
      <pubDate>Sun, 08 Mar 2020 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/scala-i/</guid>
      <description>&lt;p&gt;I decided that I needed to learn a new language and the language I choose was Scala. I added as my goal for 2020 to at least feel a bit comfortable with this language, so here I am.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Boosting your career as a developer</title>
      <link>https://leportella.com/boosting-your-career/</link>
      <pubDate>Wed, 26 Feb 2020 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/boosting-your-career/</guid>
      <description>&lt;p&gt;This month is my &lt;a href=&#34;%7B%7Bbase%7D%7D/from-oceanographer-to-programmer.html&#34;&gt;4 year anniversary of my first job as a developer&lt;/a&gt;. During this time I&amp;rsquo;ve had multiple jobs (startups, big companies and open source projects) and changed countries and continents. I was able to learn a couple of things that helped me improve my career and I wanted to share them as a celebration of my anniversary and everything that came with this new life.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Where are the mediocre women?</title>
      <link>https://leportella.com/mediocre-women/</link>
      <pubDate>Fri, 14 Feb 2020 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/mediocre-women/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;me•di•o•cre&lt;/strong&gt;: adj. Of moderate degree or quality; synonym: average&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
    </item>
    <item>
      <title>What it&#39;s like to be a new software engineer at Stripe</title>
      <link>https://leportella.com/new-eng-stripe/</link>
      <pubDate>Fri, 06 Dec 2019 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/new-eng-stripe/</guid>
      <description>&lt;p&gt;Being a software engineer at a new company—anywhere—is hard. The codebase is completely new, you have to adapt to new patterns (for both code and culture) and most likely the problem space is completely new to you too.&lt;/p&gt;</description>
    </item>
    <item>
      <title>What&#39;s beyond Django Girls tutorial? Introduction to Class Based Views</title>
      <link>https://leportella.com/talk-class-based-views/</link>
      <pubDate>Sun, 13 Oct 2019 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/talk-class-based-views/</guid>
      <description></description>
    </item>
    <item>
      <title>We need to talk about Julia language</title>
      <link>https://leportella.com/julia-language/</link>
      <pubDate>Sun, 23 Jun 2019 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/julia-language/</guid>
      <description>&lt;p&gt;Julia is a programming language that I heard a lot for some time now and I knew it deserved my attention. However, a number of libraries and frameworks for machine learning and deep learning keep emerging and I ended up prioritizing them first.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Why should your company be in technology communities? </title>
      <link>https://leportella.com/why-you-should-be-in-communities/</link>
      <pubDate>Fri, 22 Mar 2019 18:25:52 -0500</pubDate>
      <guid>https://leportella.com/why-you-should-be-in-communities/</guid>
      <description>&lt;p&gt;My participation in technology communities over the last 3 years, lead me to notice that it&amp;rsquo;s always tricky to show to companies which don’t interact with this technology ecosystem, how beneficial it is for them to get involved. Many people (developers or not) struggle within their companies, trying to show how much they could benefit from this.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My experience with blogs, websites and my posts</title>
      <link>https://leportella.com/my-experience-with-blogs/</link>
      <pubDate>Fri, 22 Feb 2019 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/my-experience-with-blogs/</guid>
      <description>&lt;p&gt;Writing is a good way to evolve your career. You can go deep in studies you are doing, can generate content to people that may be needing a more friendly view and it is a good way  to gain visibility (thinking in future jobs). Once you decided to start a new blog, a doubt pops up: where am I going to post this content?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Simpler authentication for small scale JupyterHubs with NativeAuthenticator</title>
      <link>https://leportella.com/jupyterhub-nativeauth/</link>
      <pubDate>Fri, 22 Feb 2019 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/jupyterhub-nativeauth/</guid>
      <description>&lt;p&gt;In this post I&amp;rsquo;ll tell you about the new &lt;a href=&#34;https://jupyterhub.readthedocs.io/en/stable/&#34;&gt;JupyterHub&lt;/a&gt; authenticator I implemented in the last couple of months, not only technically but also the context in which it was built. If you have no idea what JupyterHub is and how it works, I recommend &lt;a href=&#34;https://www.youtube.com/watch?v=4GJFNQBB26s&amp;amp;t=973s&#34;&gt;this short talk&lt;/a&gt; by the awesome &lt;a href=&#34;https://twitter.com/WillingCarol&#34;&gt;Carol Willing&lt;/a&gt; 🙃.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Outreachy Report V</title>
      <link>https://leportella.com/outreachy-v/</link>
      <pubDate>Thu, 21 Feb 2019 11:48:52 -0500</pubDate>
      <guid>https://leportella.com/outreachy-v/</guid>
      <description>&lt;p&gt;This is the fifth post on my internship on the &lt;a href=&#34;https://www.outreachy.org/&#34;&gt;Outreachy Program&lt;/a&gt; with &lt;a href=&#34;https://jupyter.org/&#34;&gt;Project Jupyter&lt;/a&gt;. The previous posts are available and should be read in order if you want to understand the big picture:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://leportella.com/english/2018/12/12/outreachy-I.html&#34;&gt;Outreachy I&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://leportella.com/english/2019/01/11/outreachy-II.html&#34;&gt;Outreachy II&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://leportella.com/english/2019/01/23/outreachy-III.html&#34;&gt;Outreachy III&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://leportella.com/english/2019/02/05/outreachy-IV.html&#34;&gt;Outreachy IV&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://cdn-images-1.medium.com/max/1600/1*OsCmvuJ-lLeC7UtWK8CkNA.png#center&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;h2 id=&#34;increasing-documentation&#34;&gt;Increasing documentation&lt;/h2&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://media.giphy.com/media/XIqCQx02E1U9W/giphy.gif#center&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;Native Authenticator was pretty advanced, but we still needed more information available on the documentation. And this got me thinking: what is relevant to make a good documentation? I know some good examples of a good documentation and an big amount of awful ones. I read &lt;a href=&#34;https://medium.com/magnetis-backstage/como-escrever-boas-documenta%C3%A7%C3%B5es-b36131d78f7c&#34;&gt;an article in portuguese&lt;/a&gt; on how to do a good documentation but it still didn&amp;rsquo;t click to me.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Data Visualization</title>
      <link>https://leportella.com/wiki/data-visualization/</link>
      <pubDate>Tue, 19 Feb 2019 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/wiki/data-visualization/</guid>
      <description>&lt;h2 id=&#34;seaborn-heatmap&#34;&gt;Seaborn Heatmap&lt;/h2&gt;&#xA;&lt;p&gt;Simple example with a colormap with light colors on small values and black colors on high values:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grouped &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;groupby([&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column1&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column2&amp;#39;&lt;/span&gt;])&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;size()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;unstack()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;h &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;heatmap(grouped, cmap&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;bone_r&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Show values of each group:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grouped &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;groupby([&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column1&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column2&amp;#39;&lt;/span&gt;])&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;size()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;unstack()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;h &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;heatmap(grouped, annot&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Changing colorbar limits:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grouped &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;groupby([&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column1&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column2&amp;#39;&lt;/span&gt;])&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;size()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;unstack()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;h &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;heatmap(grouped, vmin&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;, vmax&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;100&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Change annotation fontsize:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grouped &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;groupby([&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column1&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column2&amp;#39;&lt;/span&gt;])&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;size()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;unstack()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;h &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;heatmap(grouped, annot&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;, annot_kws&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;{&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;size&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;12&lt;/span&gt;})&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Full example:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grouped &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;groupby([&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column1&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column2&amp;#39;&lt;/span&gt;])&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;size()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;unstack()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;h &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;heatmap(grouped, cmap&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;bone_r&amp;#39;&lt;/span&gt;, annot&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;, &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                annot_kws&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;{&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;size&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;12&lt;/span&gt;}, vmin&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;, vmax&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;100&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Data Visualization - My Cheat Sheet</title>
      <link>https://leportella.com/cheatsheet/data-visualization/</link>
      <pubDate>Tue, 19 Feb 2019 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/cheatsheet/data-visualization/</guid>
      <description>&lt;h2 id=&#34;seaborn-heatmap&#34;&gt;Seaborn Heatmap&lt;/h2&gt;&#xA;&lt;p&gt;Simple example with a colormap with light colors on small values and black colors on high values:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grouped &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;groupby([&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column1&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column2&amp;#39;&lt;/span&gt;])&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;size()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;unstack()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;h &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;heatmap(grouped, cmap&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;bone_r&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Show values of each group:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grouped &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;groupby([&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column1&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column2&amp;#39;&lt;/span&gt;])&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;size()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;unstack()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;h &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;heatmap(grouped, annot&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Changing colorbar limits:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grouped &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;groupby([&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column1&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column2&amp;#39;&lt;/span&gt;])&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;size()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;unstack()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;h &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;heatmap(grouped, vmin&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;, vmax&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;100&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Change annotation fontsize:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grouped &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;groupby([&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column1&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column2&amp;#39;&lt;/span&gt;])&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;size()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;unstack()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;h &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;heatmap(grouped, annot&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;, annot_kws&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;{&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;size&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;12&lt;/span&gt;})&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Full example:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grouped &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;groupby([&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column1&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;column2&amp;#39;&lt;/span&gt;])&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;size()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;unstack()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;h &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; sns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;heatmap(grouped, cmap&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;bone_r&amp;#39;&lt;/span&gt;, annot&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;, &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                annot_kws&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;{&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;size&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;12&lt;/span&gt;}, vmin&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;, vmax&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;100&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Outreachy Report IV</title>
      <link>https://leportella.com/outreachy-iv/</link>
      <pubDate>Tue, 05 Feb 2019 11:48:52 -0500</pubDate>
      <guid>https://leportella.com/outreachy-iv/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is the forth post on my internship on the &lt;a href=&#34;https://www.outreachy.org/&#34;&gt;Outreachy Program&lt;/a&gt; with &lt;a href=&#34;https://jupyter.org/&#34;&gt;Project Jupyter&lt;/a&gt;. &lt;a href=&#34;https://leportella.com/english/2018/12/12/outreachy-I.html&#34;&gt;The first&lt;/a&gt;, &lt;a href=&#34;https://leportella.com/english/2019/01/11/outreachy-II.html&#34;&gt;the second&lt;/a&gt; and &lt;a href=&#34;https://leportella.com/english/2019/01/23/outreachy-III.html&#34;&gt;third post&lt;/a&gt; are already available, if you want to understand the big picture.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The most common data science tools</title>
      <link>https://leportella.com/most-common-data-science-tools/</link>
      <pubDate>Fri, 25 Jan 2019 11:48:52 -0500</pubDate>
      <guid>https://leportella.com/most-common-data-science-tools/</guid>
      <description>&lt;p&gt;When you start entering the data science world, things can become really messy. There are thousands of concepts and meanings, most of them thrown at you at the same time.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pytest</title>
      <link>https://leportella.com/wiki/python/pytest/</link>
      <pubDate>Thu, 24 Jan 2019 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/wiki/python/pytest/</guid>
      <description>&lt;h2 id=&#34;pytest-minimum-example&#34;&gt;Pytest minimum example&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# test_basic.py&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;test_something&lt;/span&gt;():&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;assert&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;parametrize-example&#34;&gt;Parametrize example&lt;/h2&gt;&#xA;&lt;p&gt;Creating multiple tests with a single function&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; pytest&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;is_even&lt;/span&gt;(input):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; input &lt;span style=&#34;color:#f92672&#34;&gt;%&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;False&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;@pytest.mark.parametrize&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;input,expected&amp;#34;&lt;/span&gt;, [&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    (&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    (&lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;False&lt;/span&gt;),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    (&lt;span style=&#34;color:#ae81ff&#34;&gt;11&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;False&lt;/span&gt;),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;])&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;test_is_even&lt;/span&gt;(input, expected):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;assert&lt;/span&gt; is_even(input) &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; expected&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;assert-raises-an-error&#34;&gt;Assert raises an error&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; pytest&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;do_something&lt;/span&gt;(input):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; input &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#66d9ef&#34;&gt;raise&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;ValueError&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;A very specific bad thing happened.&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;test_do_something&lt;/span&gt;():&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;with&lt;/span&gt; pytest&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;raises(&lt;span style=&#34;color:#a6e22e&#34;&gt;ValueError&lt;/span&gt;):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        do_something(&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;basic-example-of-fixtures&#34;&gt;Basic example of fixtures&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; pytest&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;@pytest.fixture&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;user&lt;/span&gt;():&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;name&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;John Snow&amp;#39;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;email&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;john@snow.wes&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;test_do_something&lt;/span&gt;(user):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;assert&lt;/span&gt; user[&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;name&amp;#39;&lt;/span&gt;] &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;John Snow&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Pytest - My Cheat Sheet</title>
      <link>https://leportella.com/cheatsheet/pytest/</link>
      <pubDate>Thu, 24 Jan 2019 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/cheatsheet/pytest/</guid>
      <description>&lt;h2 id=&#34;pytest-minimum-example&#34;&gt;Pytest minimum example&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# test_basic.py&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;test_something&lt;/span&gt;():&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;assert&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;parametrize-example&#34;&gt;Parametrize example&lt;/h2&gt;&#xA;&lt;p&gt;Creating multiple tests with a single function&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; pytest&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;is_even&lt;/span&gt;(input):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; input &lt;span style=&#34;color:#f92672&#34;&gt;%&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;False&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;@pytest.mark.parametrize&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;input,expected&amp;#34;&lt;/span&gt;, [&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    (&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    (&lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;False&lt;/span&gt;),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    (&lt;span style=&#34;color:#ae81ff&#34;&gt;11&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;False&lt;/span&gt;),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;])&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;test_is_even&lt;/span&gt;(input, expected):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;assert&lt;/span&gt; is_even(input) &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; expected&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;assert-raises-an-error&#34;&gt;Assert raises an error&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; pytest&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;do_something&lt;/span&gt;(input):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; input &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#66d9ef&#34;&gt;raise&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;ValueError&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;A very specific bad thing happened.&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;True&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;test_do_something&lt;/span&gt;():&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;with&lt;/span&gt; pytest&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;raises(&lt;span style=&#34;color:#a6e22e&#34;&gt;ValueError&lt;/span&gt;):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        do_something(&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;basic-example-of-fixtures&#34;&gt;Basic example of fixtures&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; pytest&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;@pytest.fixture&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;user&lt;/span&gt;():&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;name&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;John Snow&amp;#39;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;email&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;john@snow.wes&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;test_do_something&lt;/span&gt;(user):&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;assert&lt;/span&gt; user[&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;name&amp;#39;&lt;/span&gt;] &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;John Snow&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Outreachy Report III</title>
      <link>https://leportella.com/outreachy-iii/</link>
      <pubDate>Wed, 23 Jan 2019 11:48:52 -0500</pubDate>
      <guid>https://leportella.com/outreachy-iii/</guid>
      <description>&lt;p&gt;Hello there! This is the third report on my work on &lt;a href=&#34;https://www.outreachy.org/&#34;&gt;Outreachy&lt;/a&gt; internship program. If you want to be fully updated on what I have done so far, I recommend you to read the &lt;a href=&#34;https://leportella.com/english/2018/12/12/outreachy-I.html&#34;&gt;first&lt;/a&gt; and &lt;a href=&#34;https://leportella.com/english/2019/01/11/outreachy-II.html&#34;&gt;second&lt;/a&gt; reports.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Opinion: Machine Learning Engineer Nanodegree</title>
      <link>https://leportella.com/machine-learning-nanodegree/</link>
      <pubDate>Tue, 15 Jan 2019 11:48:52 -0500</pubDate>
      <guid>https://leportella.com/machine-learning-nanodegree/</guid>
      <description>&lt;p&gt;In April 2018 I started &lt;a href=&#34;https://www.udacity.com/course/machine-learning-engineer-nanodegree--nd009t&#34;&gt;Udacity&amp;rsquo;s Nanodegree in Machine Learning Engineer&lt;/a&gt;. The classes are not cheap and many questions asked me the same thing: does it worth it?&lt;/p&gt;</description>
    </item>
    <item>
      <title>What to do when data is missing?</title>
      <link>https://leportella.com/missing-data/</link>
      <pubDate>Mon, 14 Jan 2019 11:48:52 -0500</pubDate>
      <guid>https://leportella.com/missing-data/</guid>
      <description>&lt;p&gt;AKA magics to plug holes in your dataset&lt;/p&gt;</description>
    </item>
    <item>
      <title>Outreachy Report II</title>
      <link>https://leportella.com/outreachy-ii/</link>
      <pubDate>Fri, 11 Jan 2019 11:48:52 -0500</pubDate>
      <guid>https://leportella.com/outreachy-ii/</guid>
      <description>&lt;p&gt;Hello there! This is the second report on my work on &lt;a href=&#34;https://www.outreachy.org/&#34;&gt;Outreachy&lt;/a&gt; internship program. On the &lt;a href=&#34;https://leportella.com/english/2018/12/12/outreachy-I.html&#34;&gt;first report&lt;/a&gt; I told a little bit on how I got into the program, which problem I am focusing and my first tasks :).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Adding relationship to tables already created on SQLAlchemy</title>
      <link>https://leportella.com/relationship-sqlalchemy/</link>
      <pubDate>Fri, 11 Jan 2019 11:21:52 -0500</pubDate>
      <guid>https://leportella.com/relationship-sqlalchemy/</guid>
      <description>&lt;p&gt;On &lt;a href=&#34;https://leportella.com/english/2019/01/10/sqlalchemy-basics-tutorial.html&#34;&gt;this post&lt;/a&gt; you could have a small idea how SQLAlchemy works. However, all my study on SQLAlchemy basics was due to a problem I was having that took me a lot of time to figure it out. Since the problem was more complex and didn&amp;rsquo;t actually fit on the last post, I decided to create a new one dedicated to it, so here it is :)&lt;/p&gt;</description>
    </item>
    <item>
      <title>SQLAlchemy Basics Tutorial</title>
      <link>https://leportella.com/sqlalchemy-tutorial/</link>
      <pubDate>Thu, 10 Jan 2019 21:55:52 -0500</pubDate>
      <guid>https://leportella.com/sqlalchemy-tutorial/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;%7B%7Bbase%7D%7D/outreachy-I.html&#34;&gt;I&amp;rsquo;ve been working with Project Jupyter since December of last year&lt;/a&gt; and it has been a wonderful experience. The last couple of days I struggled with the SQLAlchemy library that &lt;a href=&#34;https://github.com/jupyterhub/jupyterhub&#34;&gt;JupyterHub&lt;/a&gt; works on its internals. Since I studied this library and had to scratch some &lt;a href=&#34;http://stackoverflow.com/&#34;&gt;Stack Overflow&lt;/a&gt; questions to find some answers, I created this post to help digesting some of my doubts and findings.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Predicting victims on national roads in Brazil - Part II</title>
      <link>https://leportella.com/predicting-victims-national-roads-ii/</link>
      <pubDate>Wed, 02 Jan 2019 21:55:52 -0500</pubDate>
      <guid>https://leportella.com/predicting-victims-national-roads-ii/</guid>
      <description>&lt;p&gt;This is the second part of my study on predicting the type of victims an accident can have based on the data from the&#xA;National Highway Police (Polícia Rodoviária Federal), in Brazil. This was my final report for my Machine Learning Engineer Nanodegree and my first technical diploma in the computer science field (yey!).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Outreachy Report I</title>
      <link>https://leportella.com/outreachy-i.html/</link>
      <pubDate>Wed, 12 Dec 2018 19:48:52 -0500</pubDate>
      <guid>https://leportella.com/outreachy-i.html/</guid>
      <description>&lt;p&gt;Hi :)&lt;/p&gt;&#xA;&lt;p&gt;On November I discovered that I was selected for the &lt;a href=&#34;https://www.outreachy.org/&#34;&gt;Outreachy&lt;/a&gt; internship program for the batch of December 2018 to March 2019.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Predicting victims on national roads in Brazil - Part I</title>
      <link>https://leportella.com/predicting-victims-national-roads-i/</link>
      <pubDate>Tue, 25 Sep 2018 22:05:52 -0500</pubDate>
      <guid>https://leportella.com/predicting-victims-national-roads-i/</guid>
      <description>&lt;p&gt;This week, I finished my Nanodegree in Machine Learning Engineer by Udacity. To finish the course, I had to create a final&#xA;study. Talking with a dear friend of mine, &lt;a href=&#34;https://twitter.com/pedrovilanova&#34;&gt;Pedro&lt;/a&gt;, he said that the National Highway&#xA;Police of Brazil had a dataset on car accidents in federal roads. I decided to study this dataset, and try to predict which&#xA;types of victims an accident would have based on the local, hour and accident characateristics.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My favorite testing tools on Django</title>
      <link>https://leportella.com/testing-tools-django/</link>
      <pubDate>Tue, 18 Sep 2018 12:28:52 -0500</pubDate>
      <guid>https://leportella.com/testing-tools-django/</guid>
      <description>&lt;p&gt;In today&amp;rsquo;s development, tests are a fundamental tool for keeping things nice and easy and to keep programmer&amp;rsquo;s sanity. I&amp;rsquo;ve been&#xA;using a set of tools for developing my web applications with Django and it is time for me to share a little bit about them.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using MongoDB with Python and MongoEngine &lt;3</title>
      <link>https://leportella.com/mongoengine/</link>
      <pubDate>Thu, 23 Aug 2018 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/mongoengine/</guid>
      <description>&lt;p&gt;I started working with MongoDB for fun and for some side projects in the last year. The main idea of using MongoDB is its flexibility. The &lt;a href=&#34;https://api.mongodb.com/python/current/&#34;&gt;pymongo&lt;/a&gt; library is really nice for getting some information,&#xA;but on a project more complex, we may need something a little more intense. A nice alternative is the &lt;a href=&#34;https://github.com/MongoEngine/mongoengine&#34;&gt;&lt;strong&gt;MongoEngine&lt;/strong&gt;&lt;/a&gt; library, which is an Object-Document Mapper (ODM), which treats MongoDB documents as a kind of ORM.&lt;/p&gt;</description>
    </item>
    <item>
      <title>10 tips for switching from Matlab to Python</title>
      <link>https://leportella.com/matlab-to-python/</link>
      <pubDate>Sun, 22 Jul 2018 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/matlab-to-python/</guid>
      <description>&lt;p&gt;I started to study programming logic when I came across problems that required knowledge in Matlab.&#xA;After a while studying Matlab I was suggested to switch to Python for its ease, simplicity and for&#xA;being able to be applied to numerous areas (besides being free).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Machine Learning Models - My Cheat Sheet</title>
      <link>https://leportella.com/cheatsheet/machine-learning/</link>
      <pubDate>Sun, 20 May 2018 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/cheatsheet/machine-learning/</guid>
      <description>&lt;h2 id=&#34;supervised-models&#34;&gt;Supervised Models&lt;/h2&gt;&#xA;&lt;p&gt;This is a small revision on advantages and disadvantages of each model, based on&#xA;suggested models of Udacity&amp;rsquo;s Nanodegree in Machine Learning Engineer.&lt;/p&gt;&#xA;&lt;h3 id=&#34;logistic-regression&#34;&gt;Logistic Regression&lt;/h3&gt;&#xA;&lt;h4 id=&#34;advantages&#34;&gt;Advantages&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Don&amp;rsquo;t have to worry about features being correlated&lt;/li&gt;&#xA;&lt;li&gt;You can easily update your model to take in new data (unlike Decision Trees or SVM)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h4 id=&#34;disadvantages&#34;&gt;Disadvantages&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Deals bad with outliers&lt;/li&gt;&#xA;&lt;li&gt;Must have lots of incomes for each class&lt;/li&gt;&#xA;&lt;li&gt;Presence of multicollinearity&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;decision-tree&#34;&gt;Decision Tree&lt;/h3&gt;&#xA;&lt;h4 id=&#34;advantages-1&#34;&gt;Advantages&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Easy to understand and interpret (for some people)&lt;/li&gt;&#xA;&lt;li&gt;Easy to use - Doesn’t need data normalisation, dummy variables, etc&lt;/li&gt;&#xA;&lt;li&gt;Can handle multi-output models&lt;/li&gt;&#xA;&lt;li&gt;Easily handle feature interactions&lt;/li&gt;&#xA;&lt;li&gt;Don&amp;rsquo;t have to worry about outliers&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h4 id=&#34;disadvantages-1&#34;&gt;Disadvantages&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It can be easily overfitted&lt;/li&gt;&#xA;&lt;li&gt;Stability —&amp;gt; small changes in data can lead to completely different trees&lt;/li&gt;&#xA;&lt;li&gt;If a class dominates, it can easily be biased&lt;/li&gt;&#xA;&lt;li&gt;Don&amp;rsquo;t support online learning &amp;ndash;&amp;gt; you should rebuilt the tree when new data comes&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;ensemble-methods&#34;&gt;Ensemble Methods&lt;/h3&gt;&#xA;&lt;h4 id=&#34;advantages-2&#34;&gt;Advantages&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Harder to overfit&lt;/li&gt;&#xA;&lt;li&gt;Usually better perfomance than a single model&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h4 id=&#34;disadvantages-2&#34;&gt;Disadvantages&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Scaling —&amp;gt; usually it trains several models, which can have a bad performance with larger datasets&lt;/li&gt;&#xA;&lt;li&gt;Hard to implement in real time platform&lt;/li&gt;&#xA;&lt;li&gt;Complexity increases&lt;/li&gt;&#xA;&lt;li&gt;Boosting delivers poor probability estimates (&lt;a href=&#34;https://arxiv.org/ftp/arxiv/papers/1207/1207.1403.pdf&#34;&gt;https://arxiv.org/ftp/arxiv/papers/1207/1207.1403.pdf&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;k-nearest-neighbors&#34;&gt;K-nearest Neighbors&lt;/h3&gt;&#xA;&lt;h4 id=&#34;advantages-3&#34;&gt;Advantages&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Little training time&lt;/li&gt;&#xA;&lt;li&gt;Works well with multiclass datasets&lt;/li&gt;&#xA;&lt;li&gt;Good for highly unusual data&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h4 id=&#34;disadvantages-3&#34;&gt;Disadvantages&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Need to determine value of k (distance)&lt;/li&gt;&#xA;&lt;li&gt;Neighbors-based methods are known as non-generalizing machine learning methods, since they simply “remember” all of its training data&lt;/li&gt;&#xA;&lt;li&gt;The accuracy of KNN can be severely degraded with high-dimension data because there is little difference between the nearest and farthest neighbor.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;gaussian-naive-bayes&#34;&gt;Gaussian Naive Bayes&lt;/h3&gt;&#xA;&lt;h4 id=&#34;advantages-4&#34;&gt;Advantages&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Need less training data tran models like logistic regression&lt;/li&gt;&#xA;&lt;li&gt;Highly scalable&lt;/li&gt;&#xA;&lt;li&gt;Not sensitive to irrelevant features&lt;/li&gt;&#xA;&lt;li&gt;Returns the degree of certanty of the answer&lt;/li&gt;&#xA;&lt;li&gt;Good when you need something fast and that perfoms well&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h4 id=&#34;disavantages&#34;&gt;Disavantages&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Can&amp;rsquo;t learn interactions between features e.g., it can’t learn that although you love movies with Brad Pitt and Tom Cruise, you hate movies where they’re together).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;svm&#34;&gt;SVM&lt;/h3&gt;&#xA;&lt;h4 id=&#34;advantages-5&#34;&gt;Advantages&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;High accuracy&lt;/li&gt;&#xA;&lt;li&gt;Nice theoretical guarantees regarding overfitting&lt;/li&gt;&#xA;&lt;li&gt;Especially popular in text classification problems&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h4 id=&#34;disavantages-1&#34;&gt;Disavantages&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Memory-intensive&lt;/li&gt;&#xA;&lt;li&gt;Hard to interpret&lt;/li&gt;&#xA;&lt;li&gt;Complicated to run and tune&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;stochastic-gradient-descent&#34;&gt;Stochastic Gradient Descent&lt;/h3&gt;&#xA;&lt;h4 id=&#34;advantages-6&#34;&gt;Advantages&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Efficiency&lt;/li&gt;&#xA;&lt;li&gt;Ease implementation&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h4 id=&#34;disavantages-2&#34;&gt;Disavantages&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A lot of hyperparameters to tune&lt;/li&gt;&#xA;&lt;li&gt;Sensitive to feature scaling&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;unupervised-models&#34;&gt;Unupervised Models&lt;/h2&gt;&#xA;&lt;h3 id=&#34;kmeans&#34;&gt;KMeans&lt;/h3&gt;&#xA;&lt;h4 id=&#34;advantages-7&#34;&gt;Advantages&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Good when you have an idea of an ideal number of clusters&lt;/li&gt;&#xA;&lt;li&gt;Can scale well with lots of samples, scale medium with number of clusters&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h4 id=&#34;disadvantages-4&#34;&gt;Disadvantages&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Doesn&amp;rsquo;t handle missing values very well&lt;/li&gt;&#xA;&lt;li&gt;Can&amp;rsquo;t find clusters that aren&amp;rsquo;t circular or spherical&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h4 id=&#34;choosing-the-value-of-k&#34;&gt;Choosing the value of K&lt;/h4&gt;&#xA;&lt;p&gt;For choosing the value of k cluster we can use the elbow method:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Supervised</title>
      <link>https://leportella.com/wiki/machine_learning/supervised/</link>
      <pubDate>Sun, 20 May 2018 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/wiki/machine_learning/supervised/</guid>
      <description>&lt;h2 id=&#34;logistic-regression&#34;&gt;Logistic Regression&lt;/h2&gt;&#xA;&lt;h3 id=&#34;advantages&#34;&gt;Advantages&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Don&amp;rsquo;t have to worry about features being correlated&lt;/li&gt;&#xA;&lt;li&gt;You can easily update your model to take in new data (unlike Decision Trees or SVM)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;disadvantages&#34;&gt;Disadvantages&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Deals bad with outliers&lt;/li&gt;&#xA;&lt;li&gt;Must have lots of incomes for each class&lt;/li&gt;&#xA;&lt;li&gt;Presence of multicollinearity&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;decision-tree&#34;&gt;Decision Tree&lt;/h2&gt;&#xA;&lt;h3 id=&#34;advantages-1&#34;&gt;Advantages&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Easy to understand and interpret (for some people)&lt;/li&gt;&#xA;&lt;li&gt;Easy to use - Doesn’t need data normalisation, dummy variables, etc&lt;/li&gt;&#xA;&lt;li&gt;Can handle multi-output models&lt;/li&gt;&#xA;&lt;li&gt;Easily handle feature interactions&lt;/li&gt;&#xA;&lt;li&gt;Don&amp;rsquo;t have to worry about outliers&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;disadvantages-1&#34;&gt;Disadvantages&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It can be easily overfitted&lt;/li&gt;&#xA;&lt;li&gt;Stability —&amp;gt; small changes in data can lead to completely different trees&lt;/li&gt;&#xA;&lt;li&gt;If a class dominates, it can easily be biased&lt;/li&gt;&#xA;&lt;li&gt;Don&amp;rsquo;t support online learning &amp;ndash;&amp;gt; you should rebuilt the tree when new data comes&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;ensemble-methods&#34;&gt;Ensemble Methods&lt;/h2&gt;&#xA;&lt;h3 id=&#34;advantages-2&#34;&gt;Advantages&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Harder to overfit&lt;/li&gt;&#xA;&lt;li&gt;Usually better perfomance than a single model&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;disadvantages-2&#34;&gt;Disadvantages&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Scaling —&amp;gt; usually it trains several models, which can have a bad performance with larger datasets&lt;/li&gt;&#xA;&lt;li&gt;Hard to implement in real time platform&lt;/li&gt;&#xA;&lt;li&gt;Complexity increases&lt;/li&gt;&#xA;&lt;li&gt;Boosting delivers poor probability estimates (&lt;a href=&#34;https://arxiv.org/ftp/arxiv/papers/1207/1207.1403.pdf&#34;&gt;https://arxiv.org/ftp/arxiv/papers/1207/1207.1403.pdf&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;k-nearest-neighbors&#34;&gt;K-nearest Neighbors&lt;/h2&gt;&#xA;&lt;h3 id=&#34;advantages-3&#34;&gt;Advantages&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Little training time&lt;/li&gt;&#xA;&lt;li&gt;Works well with multiclass datasets&lt;/li&gt;&#xA;&lt;li&gt;Good for highly unusual data&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;disadvantages-3&#34;&gt;Disadvantages&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Need to determine value of k (distance)&lt;/li&gt;&#xA;&lt;li&gt;Neighbors-based methods are known as non-generalizing machine learning methods, since they simply “remember” all of its training data&lt;/li&gt;&#xA;&lt;li&gt;The accuracy of KNN can be severely degraded with high-dimension data because there is little difference between the nearest and farthest neighbor.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;gaussian-naive-bayes&#34;&gt;Gaussian Naive Bayes&lt;/h2&gt;&#xA;&lt;h3 id=&#34;advantages-4&#34;&gt;Advantages&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Need less training data tran models like logistic regression&lt;/li&gt;&#xA;&lt;li&gt;Highly scalable&lt;/li&gt;&#xA;&lt;li&gt;Not sensitive to irrelevant features&lt;/li&gt;&#xA;&lt;li&gt;Returns the degree of certanty of the answer&lt;/li&gt;&#xA;&lt;li&gt;Good when you need something fast and that perfoms well&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;disavantages&#34;&gt;Disavantages&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Can&amp;rsquo;t learn interactions between features e.g., it can’t learn that although you love movies with Brad Pitt and Tom Cruise, you hate movies where they’re together).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;svm&#34;&gt;SVM&lt;/h2&gt;&#xA;&lt;h3 id=&#34;advantages-5&#34;&gt;Advantages&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;High accuracy&lt;/li&gt;&#xA;&lt;li&gt;Nice theoretical guarantees regarding overfitting&lt;/li&gt;&#xA;&lt;li&gt;Especially popular in text classification problems&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;disavantages-1&#34;&gt;Disavantages&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Memory-intensive&lt;/li&gt;&#xA;&lt;li&gt;Hard to interpret&lt;/li&gt;&#xA;&lt;li&gt;Complicated to run and tune&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;stochastic-gradient-descent&#34;&gt;Stochastic Gradient Descent&lt;/h2&gt;&#xA;&lt;h3 id=&#34;advantages-6&#34;&gt;Advantages&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Efficiency&lt;/li&gt;&#xA;&lt;li&gt;Ease implementation&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;disavantages-2&#34;&gt;Disavantages&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A lot of hyperparameters to tune&lt;/li&gt;&#xA;&lt;li&gt;Sensitive to feature scaling&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;general-references&#34;&gt;General References&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://blog.echen.me/2011/04/27/choosing-a-machine-learning-classifier/&#34;&gt;Choosing a machine learning classifier&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://kevinzakka.github.io/2016/07/13/k-nearest-neighbor/#pros-and-cons-of-knn&#34;&gt;1&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://scikit-learn.org/stable/modules/neighbors.html#neighbors&#34;&gt;Sklearn documentation on Neighbors&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://people.revoledu.com/kardi/tutorial/KNN/Strength%20and%20Weakness.htm&#34;&gt;3&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://scikit-learn.org/stable/modules/sgd.html&#34;&gt;Sklearn documentation on Stochatic Gradient Descent&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://scikit-learn.org/stable/modules/ensemble.html&#34;&gt;Sklearn documentation on Ensemble Methods&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Logistic_regression&#34;&gt;Logistic Regression Wikipedia&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://machinelearningmastery.com/logistic-regression-for-machine-learning/&#34;&gt;Logistic Regression for machine learning&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.quora.com/What-are-the-advantages-of-logistic-regression&#34;&gt;What are the advantages of logistic regression&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://classroom.synonym.com/disadvantages-logistic-regression-8574447.html&#34;&gt;The disadvantages of Logistic Regression&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Unsupervised</title>
      <link>https://leportella.com/wiki/machine_learning/unsupervised/</link>
      <pubDate>Sun, 20 May 2018 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/wiki/machine_learning/unsupervised/</guid>
      <description>&lt;h2 id=&#34;kmeans&#34;&gt;KMeans&lt;/h2&gt;&#xA;&lt;h3 id=&#34;advantages&#34;&gt;Advantages&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Good when you have an idea of an ideal number of clusters&lt;/li&gt;&#xA;&lt;li&gt;Can scale well with lots of samples, scale medium with number of clusters&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;disadvantages&#34;&gt;Disadvantages&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Doesn&amp;rsquo;t handle missing values very well&lt;/li&gt;&#xA;&lt;li&gt;Can&amp;rsquo;t find clusters that aren&amp;rsquo;t circular or spherical&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;choosing-the-value-of-k&#34;&gt;Choosing the value of K&lt;/h3&gt;&#xA;&lt;p&gt;For choosing the value of k cluster we can use the elbow method:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;from&lt;/span&gt; sklearn.clusters &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; Kmeans&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;from&lt;/span&gt; sklearn.metrics &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; silhouette_score&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;X &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; pd&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;DataFrame(&lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;possible_k_values &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; range(&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;, len(X)&lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;5&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;scores &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; []&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; k &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; possible_k_values:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    model &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; Kmeans(n_clusters&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;k)&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;fit(X)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    prediction &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; model&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;predict(X)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    score &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; silhouette_score(X, predictions)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    scores&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;append((k, score))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then find the best numbers of clusters by choosing a k that has a lower&#xA;score of errors but can still be good enough for your problem.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sklearn</title>
      <link>https://leportella.com/wiki/sklearn/</link>
      <pubDate>Tue, 01 May 2018 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/wiki/sklearn/</guid>
      <description>&lt;h2 id=&#34;how-to-check-results-of-accuracy-for-each-of-the-classes-available-on-a-classification-problem&#34;&gt;How to check results of accuracy for each of the classes available on a classification problem?&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;from&lt;/span&gt; sklearn.metrics &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; classification_report&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;classification_report(y_test, y_pred, target_names&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;[&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;A&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;B&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;C&amp;#39;&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Results:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             precision    recall    f1&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;score &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;A              &lt;span style=&#34;color:#ae81ff&#34;&gt;0.9&lt;/span&gt;         &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;         &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;B              &lt;span style=&#34;color:#ae81ff&#34;&gt;0.9&lt;/span&gt;         &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;         &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;C              &lt;span style=&#34;color:#ae81ff&#34;&gt;0.9&lt;/span&gt;         &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;         &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;avg&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;total      &lt;span style=&#34;color:#ae81ff&#34;&gt;0.9&lt;/span&gt;         &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;         &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-normalize-features&#34;&gt;How to normalize features?&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;from&lt;/span&gt; sklearn &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; preprocessing&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;normalized_X &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; preprocessing&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;normalize(X)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-create-a-bag-of-words-dataframe-matrix&#34;&gt;How to create a bag of words dataframe matrix&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; pandas &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; pd&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;from&lt;/span&gt; sklearn.feature_extraction.text imprt CountVectorizer&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;documents &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; [&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Hello, how are you!&amp;#39;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Win money, win from home.&amp;#39;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Call me now.&amp;#39;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Hello, Call hello you tomorrow?&amp;#39;&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;count_vector &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; CountVectorizer()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;count_vector&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;fit(documents)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;doc_array &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; count_vector&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;transform(documents)&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;toarray()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;freq_matrix &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; pd&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;DataFrame(doc_array, columns&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;count_vector&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;get_feature_name())&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-export-a-trained-model&#34;&gt;How to export a trained model&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;from&lt;/span&gt; sklearn.externals &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; joblib&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;joblib&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;dump(model, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;name.pkl&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# to read&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;model &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; joblib&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;load(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;name.pkl&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Sklearn - My Cheat Sheet</title>
      <link>https://leportella.com/cheatsheet/sklearn/</link>
      <pubDate>Tue, 01 May 2018 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/cheatsheet/sklearn/</guid>
      <description>&lt;p&gt;Sometimes I get just really lost with all available commands and tricks one can make on sklearn.&#xA;This way, I really wanted a place to gather my tricks that I really don&amp;rsquo;t want to forget.&lt;/p&gt;&#xA;&lt;h2 id=&#34;how-to-check-results-of-accuracy-for-each-of-the-classes-available-on-a-classification-problem&#34;&gt;How to check results of accuracy for each of the classes available on a classification problem?&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;from&lt;/span&gt; sklearn.metrics &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; classification_report&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;classification_report(y_test, y_pred, target_names&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;[&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;A&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;B&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;C&amp;#39;&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Results:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             precision    recall    f1&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;score &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;A              &lt;span style=&#34;color:#ae81ff&#34;&gt;0.9&lt;/span&gt;         &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;         &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;B              &lt;span style=&#34;color:#ae81ff&#34;&gt;0.9&lt;/span&gt;         &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;         &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;C              &lt;span style=&#34;color:#ae81ff&#34;&gt;0.9&lt;/span&gt;         &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;         &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;avg&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;total      &lt;span style=&#34;color:#ae81ff&#34;&gt;0.9&lt;/span&gt;         &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;         &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-normalize-features&#34;&gt;How to normalize features?&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;from&lt;/span&gt; sklearn &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; preprocessing&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;normalized_X &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; preprocessing&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;normalize(X)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-create-a-bag-of-words-dataframe-matrix&#34;&gt;How to create a bag of words dataframe matrix&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; pandas &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; pd&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;from&lt;/span&gt; sklearn.feature_extraction.text imprt CountVectorizer&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;documents &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; [&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Hello, how are you!&amp;#39;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Win money, win from home.&amp;#39;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Call me now.&amp;#39;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Hello, Call hello you tomorrow?&amp;#39;&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;count_vector &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; CountVectorizer()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;count_vector&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;fit(documents)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;doc_array &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; count_vector&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;transform(documents)&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;toarray()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;freq_matrix &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; pd&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;DataFrame(doc_array, columns&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;count_vector&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;get_feature_name())&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-export-a-trained-model&#34;&gt;How to export a trained model&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;from&lt;/span&gt; sklearn.externals &lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; joblib&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;joblib&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;dump(model, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;name.pkl&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# to read&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;model &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; joblib&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;load(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;name.pkl&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to contribute to an open-source project without writing any code</title>
      <link>https://leportella.com/open-source-without-code/</link>
      <pubDate>Tue, 20 Mar 2018 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/open-source-without-code/</guid>
      <description>&lt;p&gt;Starting to contribute to an open-source project is always recommended to someone who is studying to be a programmer.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Git</title>
      <link>https://leportella.com/wiki/git/</link>
      <pubDate>Fri, 05 Jan 2018 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/wiki/git/</guid>
      <description>&lt;h2 id=&#34;undo-commits&#34;&gt;Undo commits&lt;/h2&gt;&#xA;&lt;p&gt;1 commit:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ git reset HEAD~ &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;2 commits&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ git reset HEAD~~ &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-rebase-a-forked-repository&#34;&gt;How to rebase a forked repository&lt;/h2&gt;&#xA;&lt;p&gt;On the cloned repository&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ git checkout master&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ git remote add upstream git@github.com.../other/repo.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ git fetch upstream&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ git rebase upstream/master&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ git checkout my-branch&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ git rebase master&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-add-a-default-editor-to-git&#34;&gt;How to add a default editor to git&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ git config --global core.editor vim&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;delete-changes-on-conflict-while-rebasing&#34;&gt;Delete changes on conflict while rebasing&lt;/h2&gt;&#xA;&lt;p&gt;If you generated an automatic file, pushed it but then there was a conflict because the file was updated by someone else, sometimes the easiest thing is to just throw away your changes and run the script again. To do that while you are rebasing you just&lt;/p&gt;</description>
    </item>
    <item>
      <title>Git - My Cheat Sheet</title>
      <link>https://leportella.com/cheatsheet/git/</link>
      <pubDate>Fri, 05 Jan 2018 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/cheatsheet/git/</guid>
      <description>&lt;h2 id=&#34;undo-commits&#34;&gt;Undo commits&lt;/h2&gt;&#xA;&lt;p&gt;1 commit:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ git reset HEAD~ &#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2 commits&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ git reset HEAD~~ &#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;how-to-rebase-a-forked-repository&#34;&gt;How to rebase a forked repository&lt;/h2&gt;&#xA;&lt;p&gt;On the cloned repository&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ git checkout master&#xA;$ git remote add upstream git@github.com.../other/repo.git&#xA;$ git fetch upstream&#xA;$ git rebase upstream/master&#xA;$ git checkout my-branch&#xA;$ git rebase master&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;how-to-add-a-default-editor-to-git&#34;&gt;How to add a default editor to git&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ git config --global core.editor vim&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;delete-changes-on-conflict-while-rebasing&#34;&gt;Delete changes on conflict while rebasing&lt;/h2&gt;&#xA;&lt;p&gt;If you generated an automatic file, pushed it but then there was a conflict because the file was updated by someone else, sometimes the easiest thing is to just throw away your changes and run the script again. To do that while you are rebasing you just&lt;/p&gt;</description>
    </item>
    <item>
      <title>Dataframes</title>
      <link>https://leportella.com/wiki/pandas/dataframes/</link>
      <pubDate>Sun, 31 Dec 2017 19:55:58 +0100</pubDate>
      <guid>https://leportella.com/wiki/pandas/dataframes/</guid>
      <description>&lt;h2 id=&#34;how-to-list-available-columns-on-a-dataframe&#34;&gt;How to list available columns on a DataFrame&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;columns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;values&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-make-multiple-filters&#34;&gt;How to make multiple filters&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df[(df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;column &lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&lt;/span&gt; value1) &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt; (df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;column &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt; value2)]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-iterate-over-a-dataframe&#34;&gt;How to iterate over a Dataframe&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; item, row &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;iterrows():&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  print row()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-count-the-ocurrences-of-each-unique-values-on-a-series&#34;&gt;How to count the ocurrences of each unique values on a Series&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df[column]&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;value_counts()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# get indexes&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df[column]&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;value_counts()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;index&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;tolist()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# get values of occurrences&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df[column]&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;value_counts()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;values&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;tolist()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-save-a-dataframe-by-chunks&#34;&gt;How to save a DataFrame by chunks&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; pd&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;DataFrame([[&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;], [&lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;4&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;5&lt;/span&gt;], [&lt;span style=&#34;color:#ae81ff&#34;&gt;6&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;7&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;8&lt;/span&gt;], [&lt;span style=&#34;color:#ae81ff&#34;&gt;9&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;10&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;11&lt;/span&gt;]])&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df1 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;iloc[&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;:&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;,:]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df2&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;iloc[&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;:,:]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df1&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;to_csv(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;./teste1.csv&amp;#39;&lt;/span&gt;, index&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;False&lt;/span&gt;, header&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;False&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df2&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;to_csv(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;./teste1.csv&amp;#39;&lt;/span&gt;, index&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;False&lt;/span&gt;, header&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;False&lt;/span&gt;, mode&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;a&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df_final &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; pd&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;read_csv(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;./teste1.csv&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df_final&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;head()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;a-groupby-example&#34;&gt;A groupby example&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df_grouped &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;groupby(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        by&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;[&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;first_column&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;second_column&amp;#39;&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    )[&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;third_column&amp;#39;&lt;/span&gt;]&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;mean()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;reset_index(name&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;mean_values_grouped&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-fill-values-on-missing-months&#34;&gt;How to fill values on missing months&lt;/h2&gt;&#xA;&lt;p&gt;If you have a dataframe with 2 columns: year and month. But data is not available for all months, so you need to enter missing months on&#xA;your dataframe with empty values on them.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Series</title>
      <link>https://leportella.com/wiki/pandas/series/</link>
      <pubDate>Thu, 30 Nov 2017 19:55:58 +0100</pubDate>
      <guid>https://leportella.com/wiki/pandas/series/</guid>
      <description>&lt;h2 id=&#34;how-to-change-a-series-type&#34;&gt;How to change a Series type?&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; pandas &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; pd&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;serie &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; pd&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;Series([&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;4&lt;/span&gt;])&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;series&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;astype(float)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-apply-a-function-to-every-item-of-my-serie&#34;&gt;How to apply a function to every item of my Serie?&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; pandas &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; pd&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;serie &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; pd&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;Series([&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;a&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;b&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;b&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;a&amp;#39;&lt;/span&gt;])&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;series&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;apply(&lt;span style=&#34;color:#66d9ef&#34;&gt;lambda&lt;/span&gt; x: &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; x&lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;a&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;else&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-prepare-my-dataframe-to-apply-get_dummies&#34;&gt;How to prepare my DataFrame to apply get_dummies?&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; pandas &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; pd&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;X &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; pd&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;read_csv(&lt;span style=&#34;color:#f92672&#34;&gt;..&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;categorical &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; [&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;x1&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;x2&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;x4&amp;#39;&lt;/span&gt;]  &lt;span style=&#34;color:#75715e&#34;&gt;# columns that have categorical features in your X&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; cat &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; categorical: &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    X[cat] &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; X[cat]&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;astype(object)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;X_dummy &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; pd&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;get_dummies(X)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;read_csv-errors-of-encoding&#34;&gt;read_csv errors of encoding&lt;/h2&gt;&#xA;&lt;p&gt;Usually you can read a csv just by doing something like:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Class Based Views on Django</title>
      <link>https://leportella.com/class-based-views-on-django/</link>
      <pubDate>Fri, 24 Nov 2017 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/class-based-views-on-django/</guid>
      <description>&lt;p&gt;This post could also be called &lt;strong&gt;what comes after the tutorials&lt;/strong&gt; :)&lt;/p&gt;&#xA;&lt;p&gt;In several Django tutorials, we learn how to receive &lt;em&gt;requests&lt;/em&gt; and return &lt;em&gt;responses&lt;/em&gt; with html pages having several information.&#xA;This is very easy to start understanding the process that Django does: receiving &lt;em&gt;requests&lt;/em&gt; and returning &lt;em&gt;templates&lt;/em&gt;. But what happens after that?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pandas - My Cheatsheet</title>
      <link>https://leportella.com/cheatsheet/pandas/</link>
      <pubDate>Wed, 22 Nov 2017 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/cheatsheet/pandas/</guid>
      <description>&lt;p&gt;Sometimes I get just really lost with all available commands and tricks one can make on pandas.&#xA;This way, I really wanted a place to gather my tricks that I really don&amp;rsquo;t want to forget.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://media.giphy.com/media/EwO9pwLnPlttu/giphy.gif#center&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;h1 id=&#34;my-pandas-cheatsheet&#34;&gt;My Pandas Cheatsheet&lt;/h1&gt;&#xA;&lt;h2 id=&#34;how-to-list-available-columns-on-a-dataframe&#34;&gt;How to list available columns on a DataFrame&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;columns&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;values&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-make-multiple-filters&#34;&gt;How to make multiple filters&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df[(df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;column &lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&lt;/span&gt; value1) &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt; (df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;column &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt; value2)]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-iterate-over-a-dataframe&#34;&gt;How to iterate over a Dataframe&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; item, row &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;iterrows():&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  print row()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-count-the-ocurrences-of-each-unique-values-on-a-series&#34;&gt;How to count the ocurrences of each unique values on a Series&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df[column]&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;value_counts()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# get indexes&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df[column]&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;value_counts()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;index&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;tolist()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# get values of occurrences&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df[column]&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;value_counts()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;values&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;tolist()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-save-a-dataframe-by-chunks&#34;&gt;How to save a DataFrame by chunks&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; pd&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;DataFrame([[&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;], [&lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;4&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;5&lt;/span&gt;], [&lt;span style=&#34;color:#ae81ff&#34;&gt;6&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;7&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;8&lt;/span&gt;], [&lt;span style=&#34;color:#ae81ff&#34;&gt;9&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;10&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;11&lt;/span&gt;]])&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df1 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;iloc[&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;:&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;,:]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df2&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;iloc[&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;:,:]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df1&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;to_csv(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;./teste1.csv&amp;#39;&lt;/span&gt;, index&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;False&lt;/span&gt;, header&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;False&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df2&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;to_csv(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;./teste1.csv&amp;#39;&lt;/span&gt;, index&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;False&lt;/span&gt;, header&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;False&lt;/span&gt;, mode&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;a&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df_final &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; pd&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;read_csv(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;./teste1.csv&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df_final&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;head()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;a-groupby-example&#34;&gt;A groupby example&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;df_grouped &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; df&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;groupby(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        by&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;[&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;first_column&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;second_column&amp;#39;&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    )[&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;third_column&amp;#39;&lt;/span&gt;]&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;mean()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;reset_index(name&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;mean_values_grouped&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-to-fill-values-on-missing-months&#34;&gt;How to fill values on missing months&lt;/h2&gt;&#xA;&lt;p&gt;If you have a dataframe with 2 columns: year and month. But data is not available for all months, so you need to enter missing months on&#xA;your dataframe with empty values on them.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to run parallel processes?</title>
      <link>https://leportella.com/parallel-processes-python/</link>
      <pubDate>Fri, 27 Oct 2017 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/parallel-processes-python/</guid>
      <description>&lt;p&gt;This week I ran into a case were I should run several scripts with analysis that could run simultaneously. The analysis results would then be used as basis for another analysis, that could only run after all other scripts ended.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Ambicious women</title>
      <link>https://leportella.com/ambicious-women/</link>
      <pubDate>Wed, 19 Apr 2017 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/ambicious-women/</guid>
      <description>&lt;p&gt;The lovely Pyladies-Salvador asked for a text to debut their blog and told me that they would publish it on Women’s Day. I reflected a lot on what to write, what I could somehow add to that day that has so much meaning, and decided that I would like to talk to you about &lt;strong&gt;ambition&lt;/strong&gt;. &lt;strong&gt;How ambitious do you consider yourself&lt;/strong&gt;?&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to make simple endpoints with Django using Restless</title>
      <link>https://leportella.com/restless/</link>
      <pubDate>Mon, 03 Apr 2017 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/restless/</guid>
      <description>&lt;p&gt;Most of all Django tutorials teach us how to return HTML as response to a request. Sometimes, it is useful to make it a little more RESTful.&#xA;One option is to use &lt;a href=&#34;http://www.django-rest-framework.org/&#34;&gt;Django REST Framework&lt;/a&gt; but sometimes you need something a little bit simpler. Then you have &lt;a href=&#34;http://restless.readthedocs.io/&#34;&gt;Restless&lt;/a&gt;.&#xA;Restless is a miniframework made by &lt;a href=&#34;https://github.com/toastdriven&#34;&gt;Daniel Lindsley&lt;/a&gt; based on what he learned by making &lt;a href=&#34;https://django-tastypie.readthedocs.io/en/latest/&#34;&gt;Tastypie&lt;/a&gt; and some other REST libraries.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My first year as a developer</title>
      <link>https://leportella.com/first-year-as-dev/</link>
      <pubDate>Tue, 21 Mar 2017 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/first-year-as-dev/</guid>
      <description>&lt;p&gt;One year ago I started my new job as a Backend Python Developer. I have dropped a career, a profession and I almost drop my master degree. When everything happened, I think I didn’t understand the proportions that decision would have in my life. Now, one year later, I want to tell you a little bit about what happened this year.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How we used generic relations to add comments to model instances</title>
      <link>https://leportella.com/generic-relations-django/</link>
      <pubDate>Tue, 14 Mar 2017 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/generic-relations-django/</guid>
      <description>&lt;p&gt;As I talked to some people, few new about Django’s Generic Relation and Generic Foreign Key. And when I was studying it to apply on our system, I realised that the documentation can be kind of tricky and sparse. Nevertheless, Generic Relations helped us a lot, and so I decided to write about it in this blog post :)&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to review someone else&#39;s code</title>
      <link>https://leportella.com/review-code/</link>
      <pubDate>Thu, 09 Mar 2017 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/review-code/</guid>
      <description>&lt;p&gt;Code review is a complicated task and can become overwhelming, specially when you have no idea how to do it.&#xA;However, code review can be a powerful tool to increase code quality and assure “healthy” deploys.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Dev for dummies</title>
      <link>https://leportella.com/dev-for-dummies/</link>
      <pubDate>Thu, 29 Dec 2016 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/dev-for-dummies/</guid>
      <description>&lt;p&gt;Few months ago I decided to drop my career as an oceanographer and decided to become a backend developer with Python, as I told some of you here. After my blog post circulates on the internet,&#xA;I got an invitation to talk on the &lt;a href=&#34;http://caipyra.python.org.br/&#34;&gt;Caipyra&lt;/a&gt; conference, in Ribeirão Preto (thanks Marco Rougeth).&lt;/p&gt;</description>
    </item>
    <item>
      <title>A tale of a kingdom far far away in another dimension</title>
      <link>https://leportella.com/pycon2016/</link>
      <pubDate>Tue, 07 Jun 2016 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/pycon2016/</guid>
      <description>&lt;p&gt;As I write this article, I am already talking from this world… the one we actually know so well. But I will try to explain, as best as I can, everything that I lived in this awesome week I spent in Portland at the Pycon 2016.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Are we getting the wrong career advises?</title>
      <link>https://leportella.com/wrong-career-advises/</link>
      <pubDate>Wed, 11 May 2016 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/wrong-career-advises/</guid>
      <description>&lt;p&gt;I just watched an &lt;a href=&#34;https://www.youtube.com/watch?v=ybVkNRdb6hE&amp;amp;feature=youtu.be&#34;&gt;awesome lecture&lt;/a&gt; about how to have a five-digit salary in Brazil by Bruno Ticami (Python Brazil 2013). Here are some questions and advises that he talked about:&lt;/p&gt;</description>
    </item>
    <item>
      <title>There is just too much information..</title>
      <link>https://leportella.com/too-much-info/</link>
      <pubDate>Thu, 05 May 2016 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/too-much-info/</guid>
      <description>&lt;p&gt;Hey!&lt;/p&gt;&#xA;&lt;p&gt;On the last post I have written some tips for those who are starting in the world of programming, but today I want to talk something that happened to me before, and is happening to me now: There is just too much information on the internet! You will say that this is an obvious observation, but when you want to study something, this is just overwhelming!&lt;/p&gt;</description>
    </item>
    <item>
      <title>The same old story: how can I start learning to code?</title>
      <link>https://leportella.com/learning-code/</link>
      <pubDate>Thu, 24 Mar 2016 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/learning-code/</guid>
      <description>&lt;p&gt;Hello, everybody! :D&lt;/p&gt;&#xA;&lt;p&gt;On the last post I told everyone a little bit about my story, but now let’s begin the fun part! As I am studying and becoming a programmer I will try my best to pass along the fun and good things I am learning in the process, ok!?&lt;/p&gt;</description>
    </item>
    <item>
      <title>From oceanographer to programmer</title>
      <link>https://leportella.com/from-oceanographer-to-programmer/</link>
      <pubDate>Wed, 16 Mar 2016 14:25:52 -0500</pubDate>
      <guid>https://leportella.com/from-oceanographer-to-programmer/</guid>
      <description>&lt;p&gt;This week I was asked to tell a little about how I became programmer (or at least, I’m in the process). I wrote this text to tell a little bit more about my story.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
