The local Air Museum holds a living history day each month where they bring out the planes along with people that might have flown them or worked on them. It’s a great benefit living so close to the air museum that I can just drive over and in some cases shoot from my backyard. As I am trying to improve my airplane photography I took this as an opportunity to work on shooting at a slow shutter speed and working on my panning. Needless to say my panning needs some work so that I can get some sharp photographs.
I had an issue where I was getting an ISO 8601 UTC date back from one of my API requests and I was asked to convert it to Pacific time as I was providing the information in a report. Since I had no idea what I was doing I first had to figure out what kind of date I was dealing with so that I could then figure out what I was trying to get to.
Here is what an ISO 8601 date looks like: 2019-12-24T15:04:18Z
Here is what the format of the data will look like after the process has been run: 12-24-2019 7:04:18
#set the variable for Pacific timezone
pst = pytz.timezone(‘US/Pacific’)
#create the time variable date_time that will be used throughout, the data is coming from an api request and I am getting back json data.
date_time = (ISO 8601 Date)
#set the format for the date time
date_time = datetime.datetime.strptime(date_time, “%Y-%m-%dT%H:%M:%SZ”)
#tell python the current timezone is UTC
date_time = pytz.timezone(‘UTC’).localize(date_time)
#tell python to change the timezone to Pacific
date_time = date_time.astimezone(pst)
#update the variable with the new time and date in the new format
date_time = date_time.strftime(“%m-%d-%y %H:%M:%S”)
Listing of the books I managed to consume in 2019. I would say I don’t have a lot of time on my hands and that I don’t have time to read with my job and everything else that I have going on, but I think I managed to consume a good number of books this year. Some from different genres, some technical, and some that are just books I read over and over(The Martian). Without further ado, here is my list of books for 2019:
Oath of Office
The Pacific Crucible
The devil in the white city
The Magitech Chronicles books 1-4
Mech Warriors: The complete series
The True Measure
A house Divided
The Ibarra Sanctions
Terran Strike Marines Books 1 and 2
Ark Royal Series Books 1-12
Complete book of the SR-71
Hell Divers V
Underwater Photography Masterclass
Vengence of the Iron Dwarf
Warrior King (Odyssey One Book 5)
Odysseus Awakening (Odyssey One Book 6)
Ferrum Corde (Terran Armor Corps Book 6)
Odysseus Ascendant (Odyssey One Book 7)
Krox Rises: The Magitech Chronicles Book 5
Infinity War: Collected Edition
Nefarius: The Magitech Chronicles Book 6
The Ruins of Anthalas (The Ember War Saga Book 2)
Blood of Heroes (The Ember War Saga Book 3)
Earth Defiant (The Ember War Saga Book 4)
The Gardens of Nibiru (The Ember War Saga Book 5)
The Battle of the Void (The Ember War Saga Book 6)
The Siege of Earth (The Ember War Saga Book 7)
The Crucible (The Ember War Saga Book 8)
Cartwright’s Cavaliers (The Revelations Cycle Book 1)
Asbaran Solutions (The Revelations Cycle Book 2)
Winged Hussars (The Revelations Cycle Book 3)
The Dotari Salvation (Terran Strike Marines Book 1)
The Golden Horde (The Revelations Cycle Book 4)
Peacemaker (The Revelations Cycle Book 6)
Karma Upsilon 4 (Jim Cartwright at Large Book 1)
Valley of Loss (Jim Cartwright at Large Book 2)
Empire of Machines (Jim Cartwright at Large Book 3)
Eye of Minerva (Jim Cartwright at Large Book 4)
The Midnight Sun (The Omega War Book 2)
Rage of Winter (Terran Strike Marines Book 2)
Valdar’s Hammer (Terran Strike Marines Book 3)
Dark Moon Arisen (The Omega War Book 3)
Sinclair’s Scorpions (The Omega War Book 5)
The Beast of Eridu (Terran Strike Marines Book 4)
Til Valhalla: An Ember War Novel
When the Axe Falls (The Omega War Book 7)
Godswar: The Magitech Chronicles Book 7
The Xaros Reckoning (The Ember War Saga Book 9)
Alabaster Noon (The Omega War Book 12)
Armageddon (Expeditionary Force Book 8)
Renegades (Expeditionary Force Book 7)
Storm Clouds (The Guild Wars Book 1)
Hunted (Jim Cartwright at Large Book 5)
Hollow Core (School of Swords and Serpents Book 1)
Gott Mit Uns (Terran Strike Marines Book 5)
Iron Dragoons (Terran Armor Corps Book 1)
I don’t remember where I found this, but figured it was an appropriate explanation of my job and what I do.
What it’s like to be a network engineer…translated into normal people speak:
User: I think we are having a major road issue.
Me: What? No, I just checked, the roads are fine. I was actually just on the roads.
User: No, I’m pretty sure the roads are down because I’m not getting pizzas.
Me: Everything else on the roads is fine. What do you mean you aren’t getting pizzas?
User: I used to get pizzas when I ordered them, now I’m not getting them. It has to be a road issue.
Me: As I said, the roads are fine. Where are you getting pizzas from?
User: I’m not really sure. Can you check all places that deliver pizzas?
Me: No I don’t even know all the places that deliver pizza. You need to narrow it down.
User: I think it is Subway.
Me: Okay, I’ll check…No, I just looked and Subway doesn’t deliver pizzas.
User: I’m pretty sure it is Subway. Can you just allow all food from Subway and we can see if pizza shows up?
Me: Sigh, fine I’ve allowed all food from Subway, but I don’t think that is the issue.
User: Yeah I’m still not getting pizza. Can you check the roads?
Me: It’s not the roads, the roads are fine. I’m pretty sure Subway isn’t the place.
User: Okay, I found it. It’s Papa Johns.
Me: Okay, I looked and Papa Johns does deliver pizza. Is it the local Papa Johns or one in a different town?
User: I don’t know. Can you allow pizza from all Papa Johns to me?
Me: No I can’t do that. Can you get me an address for Papa Johns?
User: No, I only know it as Papa Johns. Can you get me all the addresses of all Papa Johns and I’ll tell you if one of them is correct?
Me: No, I don’t have time for that. Okay, I looked at the local one and it looks like they have sent you pizza in the past and they are currently allowed to send you pizzas. Try ordering a pizza while I watch.
User: Yeah still no pizza. I’m guessing they are getting blocked at the freeway. Can you check the freeway to make sure they can get through?
Me: No, this is a local delivery. They aren’t even using the freeway.
User: Okay, well then it has to be a road issue.
Me: No, the roads are fine. Okay, I just drove from the Papa Johns to the address they have on file for you and there is nothing there.
User: Hmm, wait we did move recently.
Me: Did you give your new address to Papa Johns?
User: No, I just thought they would be able to look me up by name.
Me: No they need your new address. What’s your new address?
User: I’m not really sure. Can you look it up?
Me: Sigh, give me a second…Okay, I found your address and gave it to Papa Johns. Try ordering a pizza now.
User: HEY! PIZZA JUST SHOWED UP!
Me: Okay, good.
User: (To everyone else they know) I apologize for the delay in the pizza but there was a major road issue that was preventing the pizza from getting to me. The network engineer has fixed the roads and we are able to get pizza again.
Me: But it wasn’t the roads…whatever.
User: Oh, can you also check on an issue where Chinese food isn’t getting to me? I think it may be a road issue.
I have been running pyenv from homebrew on Mac so I could run Python3 rather than 2.7. However when I upgraded to Catalina I ran into an issue that pyenv wasn’t working anymore. When I went through the GitHub page for pyenv at: pyenv and followed all of the steps and got to this part:
pyenv initto your shell to enable shims and autocompletion. Please make sure
eval "$(pyenv init -)"is placed toward the end of the shell configuration file since it manipulates
PATHduring the initialization.$ echo -e ‘if command -v pyenv 1>/dev/null 2>&1; then\n eval “$(pyenv init -)”\nfi’ >> ~/.bash_profile
- Zsh note: Modify your
~/.zshenvfile instead of
- fish note: Use
pyenv init - | sourceinstead of
eval (pyenv init -).
- Ubuntu and Fedora note: Modify your
~/.bashrcfile instead of
~/.bash_profile.General warning: There are some systems where the
BASH_ENVvariable is configured to point to
.bashrc. On such systems you should almost certainly put the abovementioned line
eval "$(pyenv init -)"into
.bash_profile, and not into
.bashrc. Otherwise you may observe strange behaviour, such as
pyenvgetting into an infinite loop. See #264 for details.
- Zsh note: Modify your
.zshenv should actually be .zshrc
It’s been non stop for 5 weeks of training, but this week we had a week off so I thought I would post this.
I was able to get my work to fund the Python for Network Engineers course taught by Kirk Byers.
I had taken the free class a couple of times and learned quite a bit. I thought that being able to take the paid course would give me a better understanding of things related to python and how to handle some of the more complex things that I want to do. I really want to be able to take advantage of more automation in our environment and make things work better/easier with fewer chances for errors. I also want to empower my Helpdesk to be able to do more things, we are a very small shop with a large footprint of stores/offices. We have deployed Meraki to almost all of the locations so being able to take advantage of python/rest apis has been a great benefit so far. However I feel there is more that I can do, I just need some more training. Also the more stuff I can give to my Helpdesk the less they have to call me for and I can try and get some more sleep(as though that would happen).
I have really enjoyed the first half of the class and learned quite a bit so far in just using Netmiko, textfsm, and jinja2. The other part that is nice is the community of people that Kirk has put together so that we can all learn off from each other and exchange ideas and questions. Between using Slack and some group channels there has been a lot of good comments/questions exchanged back and forth.
As for the class Kirk’s videos have been informative and I have found a lot of useful information in them. His examples have been good and have shown some real life information in working with equipment. Not diving into actual network engineering, but showing some information in relation to real life data/examples. I have also found the exercises he has assigned us to be challenging and quite good. I have picked up some good ideas from them and it has pushed my learning and understanding of python.
In all I am really enjoying it and can’t wait for the next half and to see how my python programming improves.
Script for pulling the make and signal strength of wireless cards
We are trying to continually audit our LTE cards in the Meraki Routers so we wanted to be able to monitor the stores LTE connections and see the signal strength and then determine which if any needed to be swapped out. However that data is only stored at the device level so you have to iterate through the whole Organization then by network and then by device in the network. Meraki has a polling limit for how many times you can poll the cloud per second so I put a 1 second delay in there to keep the program from overwhelming everything and causing issues for itself or for our users monitoring on the website.
The script can be found here: