Ready, Set, Code


Ready, Set, Code!


Recent code related posts on other website that piqued my interest

   <div class="col-md-4">
          <div class="content">
              <center>
            <h4><a href="https://www.companionway.net/readysetcode/geeksforgeeks/">
              
                geeksforgeeks
              
            </a></h4>
            Posted: March 11, 2023
              </center>
          </div>
          <div class="sboxit">
       <p><i class="fas fa-paperclip"></i></p>
»

Author image Geoff McNamara

musings


"Musings"

    <div class="col-sm-4">
        <div class="box-image0text blog">
            <div class="top">
                <div class="image" style="overflow:hidden">
                    
                        <img src="/img/philosophy-typewriter.jpg" style="height: 300px; width: 450px;" class="img-responsive" alt="">
                    
                </div> 
                <div class="bg"></div>
                <div class="text">
                    <p class="buttons">
                        <a href="/musings/20230307/" class="btn btn-template-transparent-primary"><i class="fa fa-link"></i> Read more</a>
                    </p>
»

Author image Geoff McNamara

Mar 12, 2023

First my warning. The best advice I can give is don’t take my advice. Second is, I am wrong more often than I am right. (However, Soros once said, if I am right one ought of three times I am happy)

I don’t often write my opinions regarding financial matters but right now things are getting interesting.

We have had the second largest bank failure announced this last Friday (SVB Silicon Valley Bank). There are few reasons why and all banks are feeling these squeezes. Interest rates are going up. The average for this Country has been around 4 1/2% and we are finally getting there. When rates go up banks see a couple of things happen. People now have other attractive places to put their money than in a bank because they will get a better return. Banks who are issuing bonds see their prices fall in order to get yields to purchasers to an attractive level. And that is where SVB got crunched.

»

Author image Geoff McNamara

geeksforgeeks

Consistenly I find the best short easy to follow tutorials on the geekforgeek site. I is way past time for me to give them the credit due. Please give them a visit

Find it here
»

Author image Geoff McNamara

Python Weekly

Follow this link and sign-up for the newsletters if you have an interest in python. Their weekly newsletter/email always contains at leasst one article that is interesting and educational

Find it here
»

Taking advantage of *args and **kwargs

Taking Advantage of *args and **kwargs

I consistently forget the option word I have included in a function and so I had to design a way to accept different keywords (option) names to trigger features with in a function.

As an example, assigning a color to a box border is very easy by just adding something like this to a function’s arguments:

’’' def buildabox(msg, border_color=“red”): """ docs go here to put a box around msg """ … ’''

»

If You Love Philosophy

This link has been in my routine visit list for a while now. It consistently offers posts about philosophy and the collenction is consistently updated. Well worth your time to visit. There are links to many other interesting sites as well.

Find it here
»

Author image Geoff McNamara

Quick-n-Dirty python3 tools => gtools.py

gtools.py can be downloaded from: gtools.py

I wrote these tools over the past many years. Many others deserve credit as I have learned much from so many.

My desire is to have a set of tools available to me from one file that can get frequently needed functions done for me without hassle or having to look things up all the time. Over the years these tools have evolved into fairly decent and flexible code blocks that also satisfy my need for a bit of color and ANSI-coded boxes.

»

Author image Geoff McNamara

Robert Carter III

I happened to see a post on social media that had a picture of a historical marker for Robert Carter of Norther Virginia. The more I learned about this event the more profoundly it struck me.

He was a very wealthy planter in the Northern Neck of Virginia with over 500 slaves. His wealth was inherited from his grandfather (at one time he owned over 1000 slaves but freed some of them while it was still legal to do so) who left large plots of land to his family. He became friends with and traveled overseas with George Washington’s half brother Lawrence who also was a prominent land holder. Robert Carter attended the College of William and Mary and studied law in England.

»

Author image Geoff McNamara

Bronze Age Collapse


Where did the cities go? What happen to written language? Is there any other time in history where such a dramatic change in civilization took place? Writing disappeared for centuries (approx 1200 BCE - 800 BCE) so we are unable to know for sure why pervasive devastation around the Mediterranean Sea took place.

»

Author image Geoff McNamara on #history,

Attending to Persuasion

Aristotle mentions these rheotrical methods:

  • Ethos: declare credibility
  • Pathos: emotional appeal
  • Logos:employing reason, logic

This post is a quick share of my appreciation for those who possess the skill to persuade. My respect for the acient Greeks is woven into the fabric here. I fall short of those who are gifted in this area.

»

Author image Geoff McNamara

Fixing Flipped or Reversed Web Images

The tool of choice is mogrify which come from the imagemagic package on your linux platform.

I had one image that looked fine when I displayed it using display tools in linux but when placed into a webpage the image would be reversed.

»

Author image Geoff McNamara

Python's all() function

Python all() function

Much of my coding efforts are directed towards analyzing financial data specifically targeting potential cash secured puts or covered calls. Recently, I had to refine some market overview displays. I needed a listing of the current market “gainers” and market “losers”. There is one site which I scrape using panda read_html function to grab a hadful of tables. My problem arises from two factors. One is there are no labels or titles to the tables and they can vary. The a table can arise from special (temporart) events and the weekends or holidays might call for the tables to re-arrange their order. This requires that I look directly at the panda table and derive which table I might be examining. One table I look for lists all the “gainers” currenly in the market. What I do know is that the third column of that table will always contain a plus sign (the % change of all the gainers). I had nested loops initially to do this but I refactored the code to use the “all()” function to discover which table has all “+” signs in the column 3. My standard caveat applies here - there is likely a better way to do this - so let me know.

»

Social Trust Game

This is a very interesting game dealing with social trust, benfits of cooperation, damge of miscommunication, cheating etc.

This helps us to understand why in the middle of WWI soldiers from both side stopped fighting on Christmas day…

Try this game. If you are like me, you will get sucked in just to find out what the final conclusions are… only takes a few minutes of your valuable time:

»

Author image Geoff McNamara

HarvardX

HarvardX - free classes (if you audit them)

These are awesome online classes. The first one that caught me was CS50 which is a tremendous in depth overview of Computer Science — really a very impressive class even if you are an old salt.

Today I got an email about a new series of classes they are offering. The Shakespeare classes have pulled me in but I would love to take them all. https://mail.google.com/mail/u/0/#inbox/WhctKJVRGBLMRTZHmfNQzKlnnCwGblnLXRfRrFnlBGTjwspPwlNFjFLQMnXcTxdlrNfjDDL

»

Author image Geoff McNamara

What Happend? The End of the Bronze Age

I frequently read history books or articles related to the origins of Western Civilization, primary Ancient Greece. You can’t read about Ancient Greece without understanding the entire Mediterranean. Recently, my fascination has focused on the collapse of the Bronze Age1, also known as the Greek Dark Ages. This reference (Greek Dark Age) is understating the situation dramatically as the destruction, poverty, and defensive conditions were pervasive across the entire Mediterranean. »

Author image Geoff McNamara

Curio - A Tutorial Introduction

Curio is a library for performing concurrent I/O using Python coroutines and the async/await syntax introduced in Python 3.5. Its programming model is based on existing system programming abstractions such as threads, sockets, files, locks, and queues.

Find it here
»

Author image Geoff McNamara

Mural Joe

Artists who can paint bring light into my world. I have watched the “Mural Joe” series on YouTube for a few years now. I came across another one today and it reminded me of how good he is at explaining colors, light, and perspective. He does murals (or at least that is how his series started) but his principalsare transferable to anything style of paining. One of the first videos I watched depicted his work on a childrens room in a hospital with a pirate scene. »

Author image Geoff McNamara