Skip to main content

Posts

Showing posts with the label coding

Lambdas

 A Lambda is an anonymous function. Places like AWS have services set up entirely just to host these simple functions that don't require a ton of code or backend. To run the Python here, I go back to Google Colaboratory; Check out my Lambda book here   Ex. 1   g =  lambda  x:  3 *x +  2 g( 3 )     Simple.  Ex. 2   full_name =  lambda  fn, ln: fn.strip().title() +  " "  + ln.strip().title() full_name( "   Ember" ,  "Serros" )     Notice the spaces in front of the first name (' Ember')      Ex. 3     def   func ( x , y ):    """Does things"""   func2 =  lambda  x: x + y+ 3 print (func( 2 , 7 ))   Using def seems to be hit or miss. This returns None, which technically is correct,  but I'm expecting a number (12). It's missing a return statement; ...

I Attempted Terraform (OpenTofu) Remote and Imploded VS Code - Here’s How I Fixed It

9/20/2023: The open source version of Terraform is now  OpenTofu    Find a better formatted version of this post on my Notion . Photo by Susan Wilkinson on Unsplash What is Terraform Remote It can store state files of Terraform remotely. It’s used more when there are multiple developers working on one thing, so someone’s state isn’t totally overwritten. Similar to CircleCI or Jenkins. Why Did You Try It? To see if I could! What Did You Do? The code worked - It was my S3 bucket permissions that were a little off, and did not allow me to place anything in there unless I went into the GUI and did it myself - which is time intensive and defeats the purpose of this project a bit. What Happened Afterward? Uh, well, VS Code suddenly had a lot of issues with permissions - It seems to have imploded the executable on my machine. I couldn’t start it, (’The location of this file could not be found’), but it wasn’t in my list of programs to uninstall - It was a ghost program. C...

The Many Forms of An Image Gallery, ft HTML, CSS, and Sass

Going from v.1 to the completed v.3 I collect Disney mugs (and some non Disney ones). One from every Canon film . I want to put all (35? 37?) in a grid.  Much of the base code for V1. came from the CSS Grid page here , at W3 Schools. Version 1 I wanted to have more than 3 entries per row. I thought sticking a new grid container (grid-cont) would fix that problem.  

Making a Tourism Slideshow With HTML/CSS/JS (Ft. TraversyMedia)

 Video for reference here . I'm one to encourage good rest over constant work.  Yet I found myself awake at 2 AM listening to this video by TraversyMedia, because I was suddenly curious about making a full page image carousel. I wanted to listen before I put hand to keyboard in coding, so at around 3 AM, I pulled up my machine with an idea.   I followed the instructions and did most of the code myself. Here, I outline: The changes in my code from the original. The demo mockup ( Here ) The changes in the new Tourism: Welcome to Babylos! . The images may take a moment to load at first. The original video code says .buttons button#next .buttons button#prev But the code didn't work! The buttons were still as follows: