Widespread Augmented Reality

Widespread Augmented Reality
Click on the image to get the Android Augmented Reality Heads up Display

Friday, August 5, 2022

Python Dynamic Numbered Variables in Loop

I am probably doing this in the most inefficient way possible, but the code is simply to demonstrate how to run through a counter and add the number incrementally on to the end of a variable. For instance I just want to add a number at the end of string "a" and read the variable "a1" through "a4".

#Putting string literal of numbers into an array separated by spaces
a1 = "3".split(" ")
a2 = "7 4".split(" ")
a3 = "2 4 6".split(" ")
a4 = "8 5 9 3".split(" ")
#print(a1[0])
sum = 0
y = 1
x = 0
#Read each of the above "a" variables 1 through 4
while y < 5:
if y == 1:
# sum = a1[0]
sum = locals()[f"a{y}"][x]
else:
# if a2[0] >= a2[1]
if locals()[f"a{y}"][x] >= locals()[f"a{y}"][x+1]:
sum = sum + locals()[f"a{y}"][x]
else:
sum = sum + locals()[f"a{y}"][x+1]
x+=1
y+=1
print(sum)
# output is 3749
sumint = 0
for i in range(0, len(sum)):
sumint = sumint + int(sum[i])
print(sumint)
# output is 23
# the last step of sumint could have been saved by using
# int(locals()[f"a{y}"][x])

Saturday, July 30, 2022

Life in Python Recursive

def life(years):
while years > 0:
return life(years-1)
years = 110
life(years)

Sunday, July 10, 2022

Python Fibonacci

fibs = []
for i in range(20):
fibs.append(i) if (i==0) or (i==1) else fibs.append(fibs[i-1] + fibs[i-2])
i += 1
print(fibs)

[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181]

Monday, June 6, 2022

Change an Image Background to Transparent

I have an image that has a background and I want to use that image on top of a second image. Therefore I need the first image to have a transparent background. Use Magic Select in Microsoft's 3D Paint program. Open the image that needs to be cropped with a transparent background. In my case it is a bandana that has a checkered background. Click Magic Select.
Use cursor to adjust the selection to fit the bandana.
Drag image and right click to copy on to the second image.

Wednesday, April 27, 2022

Tails OS and Cryptocurrency Wallet

I currently have a self custody Coinbase wallet that I access through a Chrome browser extension.
What I want is a cold wallet that is detached from the internet.
Since I am a geek, I do not want to purchase a cold wallet like the ones at https://www.guru99.com/best-crypto-cold-wallets.html
Instead, I would like to create a USB wallet, which turns out to be simply a live OS that has a crypto wallet installed.
List of components:
  • 16 GB Flash drive
  • https://www.balena.io/etcher/
  • Learn about Tails: https://tails.boum.org/
  • Download Tails: https://tails.boum.org/install/download/index.en.html
  • Installing to USB from Windows: https://tails.boum.org/install/windows/index.en.html
  • Create persistence storage on USB: https://tails.boum.org/doc/first_steps/persistence/index.en.html
  • Create cryptocurrency wallet: https://www.securitybind.com/make-your-own-cold-storage-usb-crypto-wallet/
  • Once again BalenaEtcher flashes the USB successfully, but the USB is not bootable. Now I must fix the USB drive, so search for "diskpart" on this blog for instructions.

    After cleaning and repartitioning using diskpart, I then reformatted the USB drive through Windows with NTFS as the format.

    I will now trying creating a bootable USB drive with https://rufus.ie/en/#google_vignette

    After Rufus succesfully flashed the USB drive, I held down the [Shift] key and clicked Windows Restart

    Voila! Tails booted from the USB drive. Now on to creating persistence and installing a cryptocurrency wallet.

    Sunday, April 24, 2022

    Kali Linux - Failed to Launch Preferred Application for Terminal Emulator

    After sudo apt update && upgrade, I was unable to open folders by simply clicking on them nor once inside a folder was I able to right click for a menu and open the terminal application inside the folder.
    This fixed it:
    sudo apt install xfce4-settings