{"id":721,"date":"2014-11-30T03:43:29","date_gmt":"2014-11-30T02:43:29","guid":{"rendered":"http:\/\/exponentialdecay.co.uk\/blog\/?p=721"},"modified":"2026-03-30T10:35:23","modified_gmt":"2026-03-30T10:35:23","slug":"not-quite-perfect-a-lil-automatic-twitter-thingy","status":"publish","type":"post","link":"https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/","title":{"rendered":"Dynamic avatars on Twitter"},"content":{"rendered":"<p>The visualization tells me that the first publication from my Twitter bot, created to dynamically update my avatars daily was 20 December 2012. My bot was a simple <a title=\"GitHub.com: Binary Numbers\" href=\"https:\/\/github.com\/exponential-decay\/binary-numbers\" target=\"_blank\" rel=\"noopener noreferrer\">Python script<\/a> that generated images in binary to represent the day of the month.<\/p>\n<figure style=\"width: 210px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/github.com\/exponential-decay\/binary-numbers\/blob\/master\/binary-numbers-original-images\/binary-numbers-original-images-all\/20-12-2012.png?raw=true\" alt=\"Visual representation of the binary number 0b10100 indicating the 20th of the Month -- in this instance 20 December 2012 \" width=\"210\" height=\"210\" \/><figcaption class=\"wp-caption-text\"><em>20 December 2020 via <a href=\"https:\/\/github.com\/exponential-decay\/binary-numbers\/blob\/334d417ad2fef1ac37e082e7d78f42412d176de3\/binary-numbers-original-images\/binary-numbers-original-images-all\/20-12-2012.png\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/exponential-decay\/binary-numbers\/blob\/334d417ad2fef1ac37e082e7d78f42412d176de3\/binary-numbers-original-images\/binary-numbers-original-images-all\/20-12-2012.png<\/a><\/em><\/figcaption><\/figure>\n<p>Why?<\/p>\n<p>Well, doesn&#8217;t it get a little boring looking at the same thing every day?<\/p>\n<p>Lets look at the details below.<\/p>\n<p><!--more--><\/p>\n<p>My script worked in concert with <a title=\"exponentialdecay.pythonanywhere.com\" href=\"https:\/\/www.pythonanywhere.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">PythonAnywhere.com<\/a> which provided a free hosted Python environment and scheduled execution of Python tasks, e.g. <code>00:05UTC<\/code> every day. The script executes and an image is generated by selecting colors randomly from a simple palette painting them onto a canvas.<\/p>\n<p>The shape it paints is a five-bit binary number between one and 31 representing the days of the month. So, for example, if you take the number 29 in binary, you can represent it with five bits, 11101.<\/p>\n<p>Flip it on it&#8217;s side into a matrix and you can generate a pattern like follows:<\/p>\n<pre>11111\r\n11111\r\n11111\r\n00000\u00a0\r\n11111<\/pre>\n<p>Turn the ones into colors and the zeros black and you can create some nice ever-varying images:<\/p>\n<figure id=\"attachment_727\" aria-describedby=\"caption-attachment-727\" style=\"width: 210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/29-11-2013.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-727 size-full\" src=\"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/29-11-2013.png\" alt=\"Visualization of the number 29 representing 29 November 2013\" width=\"210\" height=\"210\" srcset=\"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/29-11-2013.png 210w, https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/29-11-2013-150x150.png 150w\" sizes=\"auto, (max-width: 210px) 100vw, 210px\" \/><\/a><figcaption id=\"caption-attachment-727\" class=\"wp-caption-text\"><em>29 November 2013 via <\/em><a href=\"https:\/\/github.com\/exponential-decay\/binary-numbers\/blob\/334d417ad2fef1ac37e082e7d78f42412d176de3\/binary-numbers-original-images\/binary-numbers-original-images-all\/29-11-2013.png\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/exponential-decay\/binary-numbers\/blob\/334d417ad2fef1ac37e082e7d78f42412d176de3\/binary-numbers-original-images\/binary-numbers-original-images-all\/29-11-2013.png<\/a><\/figcaption><\/figure>\n<p>These images are created from the original code that ran from 20 December 2012 to 29 November 2014.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-726 size-full\" src=\"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/collection.png\" alt=\"An array of six images created using the first version of my binary number Twitter bot\" width=\"1167\" height=\"166\" srcset=\"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/collection.png 1167w, https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/collection-300x42.png 300w, https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/collection-1024x145.png 1024w\" sizes=\"auto, (max-width: 1167px) 100vw, 1167px\" \/><\/p>\n<h2>Automation doesn&#8217;t always run perfectly<\/h2>\n<p>A single hope was that I&#8217;d generate a perfect set of 365 days of avatar images and probably leave it there as a completed project. I&#8217;m might want to create a <a title=\"YouTube.com: Keanu \" href=\"https:\/\/www.youtube.com\/watch?v=k4t8KisRznQ\" target=\"_blank\" rel=\"noopener noreferrer\">GIF<\/a> but beyond that I had no real plans.<\/p>\n<p>The first tranche of images didn&#8217;t materialize. Sometime around April 2013 I noticed images were no longer being created on my host, and as such, my Twitter profile wasn&#8217;t being updated. I noticed it again in July that same year.<\/p>\n<p>The cause was infrastructure maintenance at <a href=\"https:\/\/pythonanywhere.com\" target=\"_blank\" rel=\"noopener\">pythonanywhere.com<\/a>, although I can&#8217;t remember if it was related to the Python Imaging Library, or \u00a0the Twitter API Library I was using. As the error wasn&#8217;t noticed soon enough the continuity in image generation was broken.<\/p>\n<p>Both times, before I could fix the issues myself the code started working again, presumably after the hosting provider finished its own maintenance.<\/p>\n<h2>Breaking changes<\/h2>\n<p>Eventually the <a title=\"GitHub.com: Twitter\" href=\"https:\/\/github.com\/sixohsix\/twitter\" target=\"_blank\" rel=\"noopener noreferrer\">Twitter API Library<\/a> used by Python Anywhere introduced a small but subtle breaking change seen in <a href=\"https:\/\/github.com\/exponential-decay\/binary-numbers\/commit\/90d405480823e865527ecc5540d291b63403f4d9\" target=\"_blank\" rel=\"noopener\">this diff<\/a>. The code simply needed the addition of a parameter\u00a0<code>_base64=True<\/code> to work again. The API had changed the assumption that image data would be encoded as <a title=\"Wikipedia.org: Base64\" href=\"http:\/\/en.wikipedia.org\/wiki\/Base64\" target=\"_blank\" rel=\"noopener noreferrer\">base64<\/a> when supplied to the function, which would then be encoded into a URL for the call to the Twitter API. A subtle but ultimately breaking change.<\/p>\n<p>The distribution of the code made it difficult to debug and I had to go into the locally installed package files i.e. <code>\/usr\/local\/lib\/python2.7\/dist-packages\/twitter\/api.py<\/code> where I was able to find the issue.<\/p>\n<p>All very hair pulling, but at least it works now. Also, the effort gave me pause, and so I decided to use some of the unintended momentum of the weekend debugging to create something new.<\/p>\n<h2><strong>Out of adversity&#8230;<\/strong><\/h2>\n<p>I decided it was time to re-engineer the code. With the fix complete I decided to add a little sophistication to its output.<\/p>\n<p>In June 2014 The National Library of New Zealand (NLNZ) released a blog on <a title=\"natlib.govt.nz: A Heritage Colour Palette\" href=\"http:\/\/natlib.govt.nz\/blog\/posts\/a-heritage-colour-palette\" target=\"_blank\" rel=\"noopener noreferrer\">Heritage Colour Palettes<\/a>. Sets of color palettes inspired by heritage objects in the national library; primarily the colors we see on the pages of books or their bindings.<\/p>\n<figure id=\"attachment_722\" aria-describedby=\"caption-attachment-722\" style=\"width: 664px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/blog-palettes-photo1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-722\" src=\"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/blog-palettes-photo1.jpg\" alt=\"First New Zealand Christmases: Tasman 1642, Cook 1769, Marsden 1814, 1933. \" width=\"664\" height=\"885\" srcset=\"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/blog-palettes-photo1.jpg 664w, https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/blog-palettes-photo1-225x300.jpg 225w\" sizes=\"auto, (max-width: 664px) 100vw, 664px\" \/><\/a><figcaption id=\"caption-attachment-722\" class=\"wp-caption-text\"><em>First New Zealand Christmases: Tasman 1642, Cook 1769, Marsden 1814, 1933 via <a href=\"http:\/\/natlib.govt.nz\/records\/21657409\" target=\"_blank\" rel=\"noopener\">http:\/\/natlib.govt.nz\/records\/21657409<\/a><\/em><\/figcaption><\/figure>\n<p>Finding color palettes was an issue I had when first creating the code. All the potential colors, all the potential configurations. I didn&#8217;t really know how to approach it and so I just chose primary colors.<\/p>\n<p>This first set of NLNZ palettes now gave me a number of more attractive options intersecting a few of my interests.<\/p>\n<p>Beyond palettes I wanted to change the design of the images. While I still wanted to create a binary representation of the day of the month I wanted to add more complexity to the stripes. Adding more stripes would create more variations in the images that would be created on any given day. The pattern may even start to look like wallpaper, in homage to <a href=\"http:\/\/www.birgitbachler.com\" target=\"_blank\" rel=\"noopener\">Birgit Bachler&#8217;s<\/a> <em>Big Data Wallpapers<\/em> in her <a href=\"http:\/\/www.birgitbachler.com\/copywildly\/\" target=\"_blank\" rel=\"noopener noreferrer\">Copy Wildly<\/a> series. Who knows, maybe <em>my<\/em> binary numbers patterns could be enlarged and put on display in a domestic setting one day?!<\/p>\n<p>I stabilized the API library code on the server by uploading my own static copy and the routines I am using have been made a bit more flexible for other purposes in the future.<\/p>\n<p>The first two images have even already been published!<\/p>\n<figure id=\"attachment_724\" aria-describedby=\"caption-attachment-724\" style=\"width: 437px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/FireShot-Capture-binary-numbers-by-exponentialdecay_-http___exponentialdecay.pythonanywhere.com_.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-724 size-full\" src=\"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/FireShot-Capture-binary-numbers-by-exponentialdecay_-http___exponentialdecay.pythonanywhere.com_.png\" alt=\"November 29 and 30\" width=\"437\" height=\"175\" srcset=\"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/FireShot-Capture-binary-numbers-by-exponentialdecay_-http___exponentialdecay.pythonanywhere.com_.png 437w, https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/FireShot-Capture-binary-numbers-by-exponentialdecay_-http___exponentialdecay.pythonanywhere.com_-300x120.png 300w\" sizes=\"auto, (max-width: 437px) 100vw, 437px\" \/><\/a><figcaption id=\"caption-attachment-724\" class=\"wp-caption-text\"><em>Binary number images for the 29th and 30th November 2014<\/em><\/figcaption><\/figure>\n<p>Let&#8217;s see the kinds of images we can create with color and lines this time around.<\/p>\n<h2><strong>Additional<\/strong><\/h2>\n<p>The code is available on GitHub:<\/p>\n<ul>\n<li><a title=\"GitHub.com: Binary Numbers\" href=\"https:\/\/github.com\/exponential-decay\/binary-numbers\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/exponential-decay\/binary-numbers<\/a><\/li>\n<\/ul>\n<p>The Python Anywhere hosting is no longer maintained, but you can see snapshots on the Internet Archive:<\/p>\n<ul>\n<li><a title=\"PythonAnywhere.com: Exponential Decay\" href=\"https:\/\/web.archive.org\/web\/20161014133620\/http:\/\/exponentialdecay.pythonanywhere.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/exponentialdecay.pythonanywhere.com\/<\/a><\/li>\n<\/ul>\n<p>Archived Images are available on GitHub:<\/p>\n<ul>\n<li><a title=\"GitHub.com: Archive of Original Images\" href=\"https:\/\/github.com\/exponential-decay\/binary-numbers\/tree\/master\/binary-numbers-original-images\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/exponential-decay\/binary-numbers\/tree\/master\/binary-numbers-original-images<\/a><\/li>\n<\/ul>\n<p>Heritage color palettes by NLNZ:<\/p>\n<ul>\n<li><a href=\"https:\/\/natlib.govt.nz\/blog\/posts\/a-heritage-colour-palette\" target=\"_blank\" rel=\"noopener\">https:\/\/natlib.govt.nz\/blog\/posts\/a-heritage-colour-palette<\/a><\/li>\n<\/ul>\n<h2><strong>Addendum<\/strong><\/h2>\n<p>A friend noticed that the output bears similarities to Cory Arcangel&#8217;s 2006 work Colors which is a nice synchronicity:<\/p>\n<ul>\n<li><a title=\"Tate Modern: Cory Arcangel\" href=\"https:\/\/coryarcangel.com\/works\/2006-004-colors\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/coryarcangel.com\/works\/2006-004-colors<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_721\" class=\"pvc_stats total_only  \" data-element-id=\"721\" style=\"\"><i class=\"pvc-stats-icon small\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The visualization tells me that the first publication from my Twitter bot, created to dynamically update my avatars daily was 20 December 2012. My bot was a simple <a title=\"GitHub.com: Binary Numbers\" href=\"https:\/\/github.com\/exponential-decay\/binary-numbers\" target=\"_blank\" rel=\"noopener noreferrer\">Python script<\/a> that generated images in binary to represent the day of the month.<\/p>\n<figure style=\"width: 210px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/github.com\/exponential-decay\/binary-numbers\/blob\/master\/binary-numbers-original-images\/binary-numbers-original-images-all\/20-12-2012.png?raw=true\" alt=\"Visual representation of the binary number 0b10100 indicating the 20th of the Month -- in this instance 20 December 2012 \" width=\"210\" height=\"210\" \/><figcaption class=\"wp-caption-text\"><em>20 December 2020 via <a href=\"https:\/\/github.com\/exponential-decay\/binary-numbers\/blob\/334d417ad2fef1ac37e082e7d78f42412d176de3\/binary-numbers-original-images\/binary-numbers-original-images-all\/20-12-2012.png\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/exponential-decay\/binary-numbers\/blob\/334d417ad2fef1ac37e082e7d78f42412d176de3\/binary-numbers-original-images\/binary-numbers-original-images-all\/20-12-2012.png<\/a><\/em><\/figcaption><\/figure>\n<p>Why?<\/p>\n<p>Well, doesn&#8217;t it get a little boring looking at the same thing every day?<\/p>\n<p>Lets look at the details below.<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &ldquo;Dynamic avatars on Twitter&rdquo;<\/span>&hellip;<\/a><\/div>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_721\" class=\"pvc_stats total_only  \" data-element-id=\"721\" style=\"\"><i class=\"pvc-stats-icon small\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":728,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"local","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[49,20,19],"tags":[59,24,62,129,61,63,139,73,68,138,60,451,452,42,72,122,23],"class_list":["post-721","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-digital-humanities","category-just-code","category-python","tag-archives","tag-art","tag-binary","tag-binary-numbers","tag-code","tag-design","tag-digital-art","tag-digital-humanities","tag-generative-art","tag-glam","tag-heritage","tag-heritage-color-palettes","tag-nlnz","tag-open-source","tag-python","tag-twitter-bot","tag-visualization","entry"],"a3_pvc":{"activated":true,"total_views":3749,"today_views":0},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Dynamic avatars on Twitter<\/title>\n<meta name=\"description\" content=\"Refurbishing a bot I created for dynamic avatars on Twitter; updating them daily using palettes by the National Library of New Zealand (NLNZ)\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dynamic avatars on Twitter\" \/>\n<meta property=\"og:description\" content=\"Refurbishing a bot I created for dynamic avatars on Twitter; updating them daily using palettes by the National Library of New Zealand (NLNZ)\" \/>\n<meta property=\"og:url\" content=\"https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/\" \/>\n<meta property=\"og:site_name\" content=\"ross spencer :: exponentialdecay.digipres :: blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-11-30T02:43:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-30T10:35:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/twitter-banner-and-avatar.png\" \/>\n\t<meta property=\"og:image:width\" content=\"941\" \/>\n\t<meta property=\"og:image:height\" content=\"475\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ross Spencer\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@beet_keeper\" \/>\n<meta name=\"twitter:site\" content=\"@beet_keeper\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ross Spencer\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/not-quite-perfect-a-lil-automatic-twitter-thingy\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/not-quite-perfect-a-lil-automatic-twitter-thingy\\\/\"},\"author\":{\"name\":\"Ross Spencer\",\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/4cae0a954400f42b9c1b70c699837716\"},\"headline\":\"Dynamic avatars on Twitter\",\"datePublished\":\"2014-11-30T02:43:29+00:00\",\"dateModified\":\"2026-03-30T10:35:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/not-quite-perfect-a-lil-automatic-twitter-thingy\\\/\"},\"wordCount\":953,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/4cae0a954400f42b9c1b70c699837716\"},\"image\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/not-quite-perfect-a-lil-automatic-twitter-thingy\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/11\\\/twitter-banner-and-avatar.png\",\"keywords\":[\"Archives\",\"Art\",\"Binary\",\"binary numbers\",\"Code\",\"Design\",\"digital art\",\"Digital Humanities\",\"Generative Art\",\"GLAM\",\"Heritage\",\"Heritage Color Palettes\",\"NLNZ\",\"Open Source\",\"Python\",\"Twitter Bot\",\"Visualization\"],\"articleSection\":[\"Digital Humanities\",\"Just Code\",\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/not-quite-perfect-a-lil-automatic-twitter-thingy\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/not-quite-perfect-a-lil-automatic-twitter-thingy\\\/\",\"url\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/not-quite-perfect-a-lil-automatic-twitter-thingy\\\/\",\"name\":\"Dynamic avatars on Twitter\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/not-quite-perfect-a-lil-automatic-twitter-thingy\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/not-quite-perfect-a-lil-automatic-twitter-thingy\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/11\\\/twitter-banner-and-avatar.png\",\"datePublished\":\"2014-11-30T02:43:29+00:00\",\"dateModified\":\"2026-03-30T10:35:23+00:00\",\"description\":\"Refurbishing a bot I created for dynamic avatars on Twitter; updating them daily using palettes by the National Library of New Zealand (NLNZ)\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/not-quite-perfect-a-lil-automatic-twitter-thingy\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/not-quite-perfect-a-lil-automatic-twitter-thingy\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/not-quite-perfect-a-lil-automatic-twitter-thingy\\\/#primaryimage\",\"url\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/11\\\/twitter-banner-and-avatar.png\",\"contentUrl\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/11\\\/twitter-banner-and-avatar.png\",\"width\":941,\"height\":475,\"caption\":\"A screenshot of my Twitter banner showing my newly created heritage avatars, created dynamically for Twitter and using binary numbers to represent the day of the month.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/not-quite-perfect-a-lil-automatic-twitter-thingy\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Dynamic avatars on Twitter\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/\",\"name\":\"ross spencer :: exponentialdecay.digipres :: blog\",\"description\":\"Digital preservation analyst, researcher, and software developer\",\"publisher\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/4cae0a954400f42b9c1b70c699837716\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/4cae0a954400f42b9c1b70c699837716\",\"name\":\"Ross Spencer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/avatar-scaled.png\",\"url\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/avatar-scaled.png\",\"contentUrl\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/avatar-scaled.png\",\"width\":2560,\"height\":2560,\"caption\":\"Ross Spencer\"},\"logo\":{\"@id\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/avatar-scaled.png\"},\"description\":\"Digital preservation domain expert and full-stack software developer.\",\"sameAs\":[\"http:\\\/\\\/www.exponentialdecay.co.uk\\\/blog\",\"https:\\\/\\\/www.instagram.com\\\/b33tk33p3r\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/ross-spencer-b6b9b758\\\/\",\"https:\\\/\\\/x.com\\\/beet_keeper\"],\"url\":\"https:\\\/\\\/exponentialdecay.co.uk\\\/blog\\\/author\\\/exponentialdecay\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Dynamic avatars on Twitter","description":"Refurbishing a bot I created for dynamic avatars on Twitter; updating them daily using palettes by the National Library of New Zealand (NLNZ)","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/","og_locale":"en_US","og_type":"article","og_title":"Dynamic avatars on Twitter","og_description":"Refurbishing a bot I created for dynamic avatars on Twitter; updating them daily using palettes by the National Library of New Zealand (NLNZ)","og_url":"https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/","og_site_name":"ross spencer :: exponentialdecay.digipres :: blog","article_published_time":"2014-11-30T02:43:29+00:00","article_modified_time":"2026-03-30T10:35:23+00:00","og_image":[{"width":941,"height":475,"url":"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/twitter-banner-and-avatar.png","type":"image\/png"}],"author":"Ross Spencer","twitter_card":"summary_large_image","twitter_creator":"@beet_keeper","twitter_site":"@beet_keeper","twitter_misc":{"Written by":"Ross Spencer","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/#article","isPartOf":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/"},"author":{"name":"Ross Spencer","@id":"https:\/\/exponentialdecay.co.uk\/blog\/#\/schema\/person\/4cae0a954400f42b9c1b70c699837716"},"headline":"Dynamic avatars on Twitter","datePublished":"2014-11-30T02:43:29+00:00","dateModified":"2026-03-30T10:35:23+00:00","mainEntityOfPage":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/"},"wordCount":953,"commentCount":4,"publisher":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/#\/schema\/person\/4cae0a954400f42b9c1b70c699837716"},"image":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/#primaryimage"},"thumbnailUrl":"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/twitter-banner-and-avatar.png","keywords":["Archives","Art","Binary","binary numbers","Code","Design","digital art","Digital Humanities","Generative Art","GLAM","Heritage","Heritage Color Palettes","NLNZ","Open Source","Python","Twitter Bot","Visualization"],"articleSection":["Digital Humanities","Just Code","Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/","url":"https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/","name":"Dynamic avatars on Twitter","isPartOf":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/#primaryimage"},"image":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/#primaryimage"},"thumbnailUrl":"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/twitter-banner-and-avatar.png","datePublished":"2014-11-30T02:43:29+00:00","dateModified":"2026-03-30T10:35:23+00:00","description":"Refurbishing a bot I created for dynamic avatars on Twitter; updating them daily using palettes by the National Library of New Zealand (NLNZ)","breadcrumb":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/#primaryimage","url":"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/twitter-banner-and-avatar.png","contentUrl":"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2014\/11\/twitter-banner-and-avatar.png","width":941,"height":475,"caption":"A screenshot of my Twitter banner showing my newly created heritage avatars, created dynamically for Twitter and using binary numbers to represent the day of the month."},{"@type":"BreadcrumbList","@id":"https:\/\/exponentialdecay.co.uk\/blog\/not-quite-perfect-a-lil-automatic-twitter-thingy\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/exponentialdecay.co.uk\/blog\/"},{"@type":"ListItem","position":2,"name":"Dynamic avatars on Twitter"}]},{"@type":"WebSite","@id":"https:\/\/exponentialdecay.co.uk\/blog\/#website","url":"https:\/\/exponentialdecay.co.uk\/blog\/","name":"ross spencer :: exponentialdecay.digipres :: blog","description":"Digital preservation analyst, researcher, and software developer","publisher":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/#\/schema\/person\/4cae0a954400f42b9c1b70c699837716"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/exponentialdecay.co.uk\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/exponentialdecay.co.uk\/blog\/#\/schema\/person\/4cae0a954400f42b9c1b70c699837716","name":"Ross Spencer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2025\/06\/avatar-scaled.png","url":"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2025\/06\/avatar-scaled.png","contentUrl":"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2025\/06\/avatar-scaled.png","width":2560,"height":2560,"caption":"Ross Spencer"},"logo":{"@id":"https:\/\/exponentialdecay.co.uk\/blog\/wp-content\/uploads\/2025\/06\/avatar-scaled.png"},"description":"Digital preservation domain expert and full-stack software developer.","sameAs":["http:\/\/www.exponentialdecay.co.uk\/blog","https:\/\/www.instagram.com\/b33tk33p3r\/","https:\/\/www.linkedin.com\/in\/ross-spencer-b6b9b758\/","https:\/\/x.com\/beet_keeper"],"url":"https:\/\/exponentialdecay.co.uk\/blog\/author\/exponentialdecay\/"}]}},"views":5003,"_links":{"self":[{"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/posts\/721","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=721"}],"version-history":[{"count":7,"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/posts\/721\/revisions"}],"predecessor-version":[{"id":3116,"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/posts\/721\/revisions\/3116"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/media\/728"}],"wp:attachment":[{"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/exponentialdecay.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}