In this table I will compare some basic programming syntax and conventions between the Python and Ruby programming languages. Programming element Python Ruby Commenting code: Both use the pound # sign. # This is a comment # This is a comment Multi-line comments: “”” This is a comment. This is a comment, too. This is … Continue reading Python and Ruby: A comparison of the language basics
JavaScript: How to install JavaScript kernel in Jupyter Notebook
It is possible to run JavaScript (Node.js in REPL mode) in a Jupyter Notebook on a Windows machine. In order to do so, you will need to install the JavaScript (Node.js) kernel. This can be done easily assuming Node.js, npm, and Jupyter Notebook are already installed on your machine. The following instructions are for adding … Continue reading JavaScript: How to install JavaScript kernel in Jupyter Notebook
Data Mining Tools: Row to Array
This article is the second in a series of articles about data mining tools written in Python CGI that make common data mining tasks faster and easier. The first article in the series can be seen here: Data Mining Tools: Column to Array This tool is very similar to the previous tool, except it is … Continue reading Data Mining Tools: Row to Array
Data Mining Tools: Column to Array
I have created some Python tools that make data mining easier. For example, when moving lots of data around one thing that comes up often is getting information from a spreadsheet into a Python data container such as a list. This can be done by adding some code in a Python script to open an … Continue reading Data Mining Tools: Column to Array
Python: How to build a dictionary with two lists using zip( )
If you have two lists and would like to build a dictionary where one list will be the keys and the second list will be the values, Python has a way to do this easily using the built-inzip() function. With small enough examples, we could build our dictionary manually by typing it at the keyboard. … Continue reading Python: How to build a dictionary with two lists using zip( )
p5.js: How to build a clock
In this article, I will show how to build a clock using p5.js, step by step. Here is what the final result looks like: Step 1: Create a square canvas with an origin point When you create a new p5.js sketch in the Processing IDE, you start with empty setup() and draw() functions. For example: … Continue reading p5.js: How to build a clock
p5.js: Understanding circles
To understand how to code with circles in p5.js, it is necessary to have a foundation of knowledge about the parts of a circle and how they map to code. The first mapping is the name. Circles are actually called ellipses in p5.js and are produced using the ellipse() function, that takes in four (or … Continue reading p5.js: Understanding circles
WordPress: How to display excerpts instead of full posts on archive pages
In the WordPress dashboard under Settings –> Reading, there is an option that appears as if it would show summaries of each post on the main page, instead of full posts. Next to “For each article in a feed, show”, there are options for “Full text” and “Summary”. This does not do what I thought … Continue reading WordPress: How to display excerpts instead of full posts on archive pages
JavaScript: Intro to AJAX
AJAX stands for Asynchronous JavaScript And XML. The basic concept is to use JavaScript and combine the fetching of XML (or JSON) data and make that data appear in some location of a web page without the page ever having been refreshed. This allows for dynamic content in an otherwise static page. w3schools.com describes it … Continue reading JavaScript: Intro to AJAX
JavaScript Web App: JavaScript ASCII Engine
The JavaScript ASCII Engine is a web tool I created to be able to quickly find ASCII values when a chart is not available. All you do is type in a single keyboard character in the input box and the tool will output the ASCII equivalent values in decimal, hex and binary. I created this … Continue reading JavaScript Web App: JavaScript ASCII Engine