<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>stevenloria.com</title><link>https://stevenloria.com/</link><description/><atom:link href="https://stevenloria.com/feeds/all.rss.xml" rel="self"/><lastBuildDate>Mon, 02 Sep 2019 00:00:00 -0400</lastBuildDate><item><title>Building a Dashboard for a Python Package</title><link>https://stevenloria.com/building-a-dashboard-for-a-python-package</link><description>&lt;p&gt;I made a simple dashboard for visualizing marshmallow PyPI downloads.&lt;/p&gt;
&lt;figure&gt;
  &lt;a href="http://marshmallow.sloria.io/"&gt;
  &lt;img alt="marshmallow dashboard" height="250" src="https://user-images.githubusercontent.com/2379650/64126549-32986e00-cd7c-11e9-92df-8c3b5bb391b4.png"&gt;
  &lt;/a&gt;
&lt;/figure&gt;

&lt;h2&gt;Why&lt;/h2&gt;
&lt;p&gt;While maintaining marshmallow, I found myself running one-off queries against &lt;a href="https://packaging.python.org/guides/analyzing-pypi-package-downloads/"&gt;PyPI's BigQuery dataset&lt;/a&gt; to answer some recurring questions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How many marshmallow users are using Python 2 vs Python 3?&lt;/li&gt;
&lt;li&gt;Can we drop support for a minor Python version without …&lt;/li&gt;&lt;/ul&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Loria</dc:creator><pubDate>Mon, 02 Sep 2019 00:00:00 -0400</pubDate><guid>tag:stevenloria.com,2019-09-02:/building-a-dashboard-for-a-python-package</guid><category>programming</category><category>python</category><category>marshmallow</category></item><item><title>Dynamic Schemas in marshmallow</title><link>https://stevenloria.com/dynamic-schemas-in-marshmallow</link><description>&lt;p&gt;marshmallow 3 will have a &lt;code&gt;Schema.from_dict&lt;/code&gt; method that generates a &lt;code&gt;Schema&lt;/code&gt; class from a dictionary of fields.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;marshmallow&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Schema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fields&lt;/span&gt;

&lt;span class="n"&gt;GistSchema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Schema&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;from_dict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;&amp;quot;id&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dump_only&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="s2"&gt;&amp;quot;content&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;required&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Here's a rundown of a few use cases this API enables.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Schemas generated at …&lt;/strong&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Loria</dc:creator><pubDate>Sun, 18 Aug 2019 00:00:00 -0400</pubDate><guid>tag:stevenloria.com,2019-08-18:/dynamic-schemas-in-marshmallow</guid><category>programming</category><category>python</category><category>marshmallow</category></item><item><title>Introducing local-repl: Supercharged Node.js REPLs</title><link>https://stevenloria.com/local-repl</link><description>&lt;p&gt;Today I released &lt;a href="https://github.com/sloria/local-repl"&gt;local-repl 4&lt;/a&gt;, a CLI for running project-specific Node.js REPLs.&lt;/p&gt;
&lt;h2&gt;The basic idea&lt;/h2&gt;
&lt;p&gt;local-repl saves you from typing out imports every time you open a new Node.js REPL.
You specify the modules and objects that you want to automatically import in
either &lt;code&gt;package.json&lt;/code&gt; or &lt;code&gt;.replrc …&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Loria</dc:creator><pubDate>Mon, 07 May 2018 00:00:00 -0400</pubDate><guid>tag:stevenloria.com,2018-05-07:/local-repl</guid><category>programming</category><category>nodejs</category><category>javascript</category></item><item><title>Responsive Typography Using Modern CSS</title><link>https://stevenloria.com/responsive-typography</link><description>&lt;p&gt;Choosing type sizes for a website can be daunting. Heading and
paragraph sizes have drastic consequences over the layout and
legibility of a page. Thankfully, we have &lt;em&gt;modular scales&lt;/em&gt; to guide us.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A modular scale is a sequence of numbers that relate to one another in a meaningful way.
&lt;cite&gt;Tim …&lt;/cite&gt;&lt;/p&gt;&lt;/blockquote&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Loria</dc:creator><pubDate>Sat, 30 Dec 2017 00:00:00 -0500</pubDate><guid>tag:stevenloria.com,2017-12-30:/responsive-typography</guid><category>programming</category><category>css</category><category>postcss</category><category>typography</category></item><item><title>Recent Releases</title><link>https://stevenloria.com/recent-releases</link><description>&lt;p&gt;Some notes on some recent releases:&lt;/p&gt;
&lt;h2&gt;TextBlob 0.11.0&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://textblob.readthedocs.io/en/latest/changelog.html"&gt;Changelog&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This mainly fixes compatibility with NLTK 3.1 and above. Older versions of NLTK are no longer supported. As an added bonus, the averaged perceptron tagger described in &lt;a href="http://stevenloria.com/tutorial-state-of-the-art-part-of-speech-tagging-in-textblob/"&gt;this post&lt;/a&gt; is now the default part-of-speech tagger in both NLTK …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Loria</dc:creator><pubDate>Sun, 01 Nov 2015 00:00:00 -0400</pubDate><guid>tag:stevenloria.com,2015-11-01:/recent-releases</guid><category>programming</category><category>python</category><category>marshmallow</category><category>textblob</category></item><item><title>marshmallow 2.0 Released</title><link>https://stevenloria.com/marshmallow-2</link><description>&lt;p&gt;One alpha, five betas, and two release candidates after marshmallow's last 1.x release, marshmallow 2.0 is published to the PyPI.&lt;/p&gt;
&lt;h2&gt;What is marshmallow?&lt;/h2&gt;
&lt;p&gt;Marshmallow is a Python library for&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Validating input data against a schema,&lt;/li&gt;
&lt;li&gt;Deserializing data to application objects (e.g., ORM objects), and&lt;/li&gt;
&lt;li&gt;Serializing application objects …&lt;/li&gt;&lt;/ol&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Loria</dc:creator><pubDate>Tue, 29 Sep 2015 00:00:00 -0400</pubDate><guid>tag:stevenloria.com,2015-09-29:/marshmallow-2</guid><category>programming</category><category>python</category><category>marshmallow</category></item><item><title>Three Command-line Tools for Productive Python Development</title><link>https://stevenloria.com/python-clis</link><description>&lt;p&gt;Below are three tools that I started using recently that I have since found indispensable when developing with Python.&lt;/p&gt;
&lt;h2&gt;I. Bootstrap your project with &lt;strong&gt;cookiecutter&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;I am a big fan of project templates. They enable you to reuse best practices and patterns whenever you start a new project.&lt;/p&gt;
&lt;p&gt;Audrey Roy's …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Loria</dc:creator><pubDate>Sun, 06 Apr 2014 00:00:00 -0400</pubDate><guid>tag:stevenloria.com,2014-04-06:/python-clis</guid><category>programming</category><category>python</category></item><item><title>The M's, V's, and C's: Keep 'em light and fluffy</title><link>https://stevenloria.com/mvc-light-and-fluffy</link><description>&lt;p&gt;The MVC design pattern gives us general guidelines on where  components of an application should go. Web frameworks attempt to enforce MVC by giving us cookiecutter classes and interfaces for each of the three layers.&lt;/p&gt;
&lt;p&gt;But as an application gets larger, it becomes more difficult to decide where certain components …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Loria</dc:creator><pubDate>Sun, 17 Nov 2013 00:00:00 -0500</pubDate><guid>tag:stevenloria.com,2013-11-17:/mvc-light-and-fluffy</guid><category>software design</category><category>python</category><category>rest</category><category>marshmallow</category></item><item><title>Tutorial: What is WordNet? A Conceptual Introduction Using Python</title><link>https://stevenloria.com/wordnet-tutorial</link><description>&lt;p&gt;In short, WordNet is a database of English words that are linked together by their semantic relationships. It is like a supercharged dictionary/thesaurus with a graph structure.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://textblob.readthedocs.io/"&gt;TextBlob&lt;/a&gt; 0.7
(&lt;a href="https://textblob.readthedocs.io/en/latest/changelog.html"&gt;changelog&lt;/a&gt;) now integrates NLTK's WordNet interface, making it very simple to interact with WordNet.&lt;/p&gt;
&lt;p&gt;This tutorial is a gentle …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Loria</dc:creator><pubDate>Mon, 30 Sep 2013 00:00:00 -0400</pubDate><guid>tag:stevenloria.com,2013-09-30:/wordnet-tutorial</guid><category>programming</category><category>python</category><category>textblob</category><category>nlp</category></item><item><title>Tutorial: State-of-the-art Part-of-Speech Tagging in TextBlob</title><link>https://stevenloria.com/pos-tagging</link><description>&lt;p&gt;Following the tradition of writing a short tutorial with each new &lt;a href="https://textblob.readthedocs.io/"&gt;TextBlob&lt;/a&gt; release (0.6.3, &lt;a href="https://textblob.readthedocs.io/en/latest/changelog.html"&gt;changelog&lt;/a&gt;), here's an introduction to TextBlob's first outside code contribution from Matthew Honnibal, a.k.a. &lt;a href="https://github.com/syllog1sm"&gt;syllog1sm&lt;/a&gt;: a part-of-speech tagger based on the &lt;a href="http://ciml.info/dl/v0_8/ciml-v0_8-ch03.pdf"&gt;Averaged Perceptron&lt;/a&gt; algorithm which is &lt;strong&gt;faster and more accurate than &lt;a href="http://nltk.org/"&gt;NLTK …&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Loria</dc:creator><pubDate>Mon, 16 Sep 2013 00:00:00 -0400</pubDate><guid>tag:stevenloria.com,2013-09-16:/pos-tagging</guid><category>programming</category><category>programming</category><category>python</category><category>textblob</category><category>nlp</category></item><item><title>Tutorial: Finding Important Words in Text Using TF-IDF</title><link>https://stevenloria.com/tf-idf</link><description>&lt;p&gt;Another &lt;a href="https://textblob.readthedocs.io/en/latest/"&gt;TextBlob&lt;/a&gt; release (0.6.1, &lt;a href="https://textblob.readthedocs.io/en/latest/changelog.html"&gt;changelog&lt;/a&gt;), another quick tutorial. This one's on using the &lt;a href="https://en.wikipedia.org/wiki/Tf%E2%80%93idf"&gt;TF-IDF&lt;/a&gt; algorithm to find the most important words in a text document.
It's simpler than you think.&lt;/p&gt;
&lt;h2&gt;What is TF-IDF?&lt;/h2&gt;
&lt;p&gt;TF-IDF stands for "Term Frequency, Inverse Document Frequency." It's a way to score the importance …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Loria</dc:creator><pubDate>Sun, 01 Sep 2013 00:00:00 -0400</pubDate><guid>tag:stevenloria.com,2013-09-01:/tf-idf</guid><category>programming</category><category>python</category><category>textblob</category></item><item><title>Tutorial: Simple Text Classification with Python and TextBlob</title><link>https://stevenloria.com/simple-text-classification</link><description>&lt;p&gt;Yesterday, &lt;a href="https://textblob.readthedocs.io/en/latest/"&gt;TextBlob 0.6.0&lt;/a&gt; was released (&lt;a href="https://textblob.readthedocs.io/en/latest/changelog.html#id1"&gt;changelog&lt;/a&gt;), which introduces Naive Bayes classification. This tutorial shows how to use TextBlob to create your own text classification systems.&lt;/p&gt;
&lt;p&gt;The tutorial assumes that you have &lt;strike&gt;TextBlob &amp;gt;= 0.6.0 and nltk &amp;gt;= 2.0&lt;/strike&gt; TextBlob &amp;gt;= 8.0 installed. If you don't yet have …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Loria</dc:creator><pubDate>Mon, 26 Aug 2013 00:00:00 -0400</pubDate><guid>tag:stevenloria.com,2013-08-26:/simple-text-classification</guid><category>programming</category><category>python</category><category>textblob</category></item><item><title>Hosting Static Flask Sites on Github Pages</title><link>https://stevenloria.com/hosting-static-flask-sites-on-github-pages</link><description>&lt;p&gt;This past weekend, I released &lt;a href="http://killtheyak.com/"&gt;KillTheYak.com&lt;/a&gt;, a website with guides for installing and using various tools. It's a static site powered by &lt;a href="http://flask.pocoo.org/"&gt;Flask&lt;/a&gt; and hosted for free (as in beer) on &lt;a href="http://pages.github.com"&gt;Github Pages&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Static Flask sites are a big win because:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;They're fast.&lt;/li&gt;
&lt;li&gt;If you need your site to …&lt;/li&gt;&lt;/ul&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Loria</dc:creator><pubDate>Mon, 15 Jul 2013 00:00:00 -0400</pubDate><guid>tag:stevenloria.com,2013-07-15:/hosting-static-flask-sites-on-github-pages</guid><category>programming</category><category>python</category><category>flask</category></item><item><title>Lazily-evaluated Property Pattern in Python</title><link>https://stevenloria.com/lazy-properties</link><description>&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Lazy_evaluation"&gt;Lazy evaluation&lt;/a&gt; is a useful pattern that can improve your code's efficiency in many situations.&lt;/p&gt;
&lt;p&gt;One example of this is instance attributes that take long to compute:&lt;/p&gt;
&lt;script src="https://gist.github.com/sloria/5895397.js"&gt; &lt;/script&gt;

&lt;p&gt;This approach may cause initialization to take unnecessarily long, especially when you don't always need to access &lt;code&gt;Person#relatives&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A better strategy would …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Loria</dc:creator><pubDate>Sun, 30 Jun 2013 00:00:00 -0400</pubDate><guid>tag:stevenloria.com,2013-06-30:/lazy-properties</guid><category>programming</category><category>python</category></item><item><title>Startup Skepticism</title><link>https://stevenloria.com/startup-skepticism</link><description>&lt;h3&gt;From Alex Payne's &lt;a href="http://al3x.net/2013/05/23/letter-to-a-young-programmer.html"&gt;Letter To A Young Programmer Considering A Startup&lt;/a&gt;:&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A startup is just a means to an end.&lt;/strong&gt; Consider the end, and don’t seek to revel in the means. What do you care about? Who do you want to help? Does a startup make meeting your goals …&lt;/p&gt;&lt;/blockquote&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Loria</dc:creator><pubDate>Wed, 29 May 2013 00:00:00 -0400</pubDate><guid>tag:stevenloria.com,2013-05-29:/startup-skepticism</guid><category>uncategorized</category><category>notes</category><category>startups</category><category>quotes</category></item><item><title>Python Best Practice Patterns by Vladimir Keleshev (Notes)</title><link>https://stevenloria.com/python-best-practice</link><description>&lt;p&gt;These are my notes from Vladimir Keleshev's talk entitled "Python Best Practice Patterns", given on May 2, 2013 at the Python Meetup in Denmark. The original video is &lt;a href="http://youtu.be/GZNUfkVIHAY"&gt;here&lt;/a&gt; (about 38 minutes long).&lt;/p&gt;
&lt;p&gt;Note: Some of the code examples have been has been modified from the original presentation based on …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Loria</dc:creator><pubDate>Thu, 09 May 2013 00:00:00 -0400</pubDate><guid>tag:stevenloria.com,2013-05-09:/python-best-practice</guid><category>programming</category><category>python</category><category>notes</category></item></channel></rss>