10 PRINT in p5.js and Python. Emulating a text console.

A simple code creating a beautiful pattern using text:

Based on a coding challenge by Daniel Shiffman, where he created a version of the classic one-line Commodore 64 BASIC program in JavaScript using p5.js. Inspired by the book 10 PRINT (https://10print.org/, Amazon: http://amzn.to/2wJlRVx )

Simon later made a similar project about #10PRINT in Python:

 

View the awesome 10 PRINT creations via the #10print hashtag on Twitter: https://twitter.com/search?f=tweets&q=%2310print%20&src=typd

Advertisements

Simon’s Spellcheck API

Simon has continued with server side programming and made a spellcheck API! Here is the link, you can play with it yourself by adding new words to the corpus (dictionary):

https://spellcheck-api.herokuapp.com/

Here is how the API works:

And the making of, step by step:

 

 

 

 

 

 

 

The project is partially based on what Simon learned from Daniel Shiffman’s tutorials about creating web servers and the materials available online in Daniel Shiffman’s Programming A to Z course (analyzing and generating text-based data) and is partially Simon’s own code.

Wikipedia Crawler

Simon has made his version of Daniel Shiffman’s Wikipedia Crawler, graphing the relatedness between Wikipedia articles.

Play with it yourself online at: https://simon-tiger.github.io/wikipedia-crawler/wikipedia/

Code: https://github.com/simon-tiger/wikipedia-crawler/

Simon writes:

How it Works

Enter a query (e. g. apple) and either hit Enter or press the button “Query the API”. If an article called “Apple” exists, a circle will pop up with th word “Apple” in it. If an article called “Apple” doesn’t exist, a circle with something alse will pop up. Click the circle (or article) to reveal its related articles. As you might expect, you can click any of those articles to reveal its related articles.

Inspiration

The inspiration comes from Daniel Shiffman and its Coding Train. Link to Daniel’s version here.

Where are my compasses?

 

There’s been a lot of drawing going on here lately. And jokes, like in the video above. Yesterday, after he got distracted while trying to draw the exact tangent of a circle, Simon said: “I went off on another tangent. To find a tangent!”

DSC_1902

DSC_1901

DSC_1898

DSC_1890

DSC_1889

 

Text Generating Machine that Posts to Twitter

A milestone in server side programming here, as Simon has built a text generating machine that posts to Simon’s Twitter account! Essentially, it’s website where anyone can enter his own text for the machine to make a “poem” from using an acrostic algorithm; the machine simultaneously posts that “poem” to Simon’s Twitter.

This project falls under the topic of building an interface for Twitter. The original inspiration came from Daniel Shiffman. Simon writes:

You can try my Acrostic machine at http://acrostic-tweeter.herokuapp.com/ and it tweets to my account at https://twitter.com/simontigerh/

In this scenraio, I’m feeding in some text and a word. I’m clicking a button, to tweet the acrostic. I used node to create the server. I later put that server on heroku.

I’m also using a couple of packages:
– express – to host my interface
– socket.io – for the server and the client to talk to eachother
– twit – to tweet the acrostic

 

 

 

 

 

 

In the previous video, I got everything working, except that after I try to use heroku (by typing `heroku login` in git bash), What appeared was:
“`bash: heroku: command not found.
Later we solved this issue by using command prompt:

Simon got positive feedback on his project from Daniel Shiffman, who asked Simon to give some explanation about what the machine on the webpage and also to give a link to Simon’s Twitter:

Acrostic 18 September 2017

The Magformers saga continued

Oops, the Magformers are back in our life. I thought that Simon was over Magformers (which he built with excessively when he was six), but he has picked them up again and taken them to a new level. He seems to be using Magformers to illustrate his increasingly philosophical thoughts in the pauses he takes between lessons and programming. Yesterday, he was quite disturbed after building with the mirror piece for a while and said: “What if two mirrors reflect each other? Would that stop time?” He added: “Just for safety, I’m going to put the mirror in the box. Never, never ever put two mirrors opposite to each other!”

And there is more! Magformers the company has actually contacted Simon on his YouTube channel, saying they loved his Magformers Table program he made in JavaScript and wanted Simon to send them an e-mail and to talk to him about it! Simon put his code on GitHub and shared it, you can view his Magformers Table online here:

https://simon-tiger.github.io/magtables/magtable/

He hasn’t made it interactive yet though. This was the original plan but he got stuck.

DSC_1823

Simon’s Acrostic Machine

Last Friday Daniel Shiffman was finally back with his weekly livestreams! Simon was delirious with joy that he could be part of the team again and weeping and panicking every time Daniel experienced technical difficulties. During the days that followed, Simon made his own two versions of the coding challenge Daniel presented in the livestream and shared those with his colleagues on GitHub and the Slack channel: “I made *two* versions of the acrostic coding challenge. Link to a github repo: https://github.com/simon-tiger/acrostics (Links to both of the versions in the README).

The coding challenge was part of Daniel Shiffman’s Programming A to Ze course at NYU (a course focusing on analysis and generation of text-based data) and was about creating an Acrostic machine – an algorithm that would use a source text to create a “poem”. Every word in the poem would begin with the consecutive letter from a word one enters.

One version that Simon created uses an API as the source text:

https://simon-tiger.github.io/acrostics/00_acrostic_api/

In the second version, the user can type the source text (like in the screenshot below), use a text sample or drag a source text file into a special dropbox:

https://simon-tiger.github.io/acrostics/01_acrostic_userinput/

Screenshot of the second version (with drag and drop):

Acrostic 11 sep 2017

Simon making his versions of the Acrostic machine: