There is some serious snowfall going on up here. It started coming down yesterday, and has apparently just continued to fall. It isn't sticky so the snow isn't holding to roofs and is instead accumulating on the ground.
I am working on learning Python as a programming language and getting used to it. I sat down and coded "Rock, Scissors, Paper, Lizard, Spock" - First I did the endless if, elif, else statements then decided to go for a more compact solution via a dense multidimensional array.
from random import randint t = [["Rock",[0,-1,1,1,-1],["ties","is covered by","smashes","crushes","is thrown by"]], ["Paper",[1,0,-1,-1,1],["covers","ties","is cut by","is eaten by","disproves"]], ["Scissors",[-1,1,0,1,-1],["smashed by","cuts","ties","decapitates","is used by"]], ["Lizard",[-1,1,-1,0,1],["is crushed by","eats","is decapitated by","ties","poisons"]], ["Spock",[1,-1,1,-1,0],["throws","is disproven by","uses","is poisoned by","ties"]]] #assing a random play to computer computerindex = randint(0,4) player = False; while player == False: player = input("Rock, Paper, Scissors, Lizard, Spock? ") noresult = True for entry in t: if entry == player: if entry[computerindex] > 0: noresult = False print("You win! ",player,entry[computerindex],t[computerindex]) elif entry[computerindex]
Remote Impact.io - Remote developer jobs for companies working towards the UN's Sustainable Development Goals
Came across this link on Reddit to a guy's website which lists remote working jobs for companies who are working towards the Sustainable Development Goals by the UN. First off, I wasn't actually aware of these goals, but also it's cool to see. I'm not looking to be a developer, but I love this idea.
My learning of Python continued today with me coding a simple Tic-Tac-Toe client. It is very dumb, the computer always plays randomly and currently has no intelligence to it. But I wrote it from scratch with no outside resource or code segments. Doing things like this is always a great feeling for me, learning something is one of my favorite things to do.
Here is my Python code:
from random import randint board = [1,2,3,4,5,6,7,8,9] legalplays = [1,2,3,4,5,6,7,8,9] def drawboard(board): print(board,"|",board,"|",board) print("---------") print(board,"|",board,"|",board) print("---------") print(board,"|",board,"|",board) def checkboard(board): patterns = [[0,1,2], [3,4,5], [6,7,8], [0,3,6], [1,4,7], [2,5,8], [0,4,8], [2,4,6]] for pattern in patterns: if board[pattern] == board[pattern] and board[pattern] == board[pattern]: return board[pattern] return 0 def computerPlay(board): availableplays =  for i in board: if i in legalplays: availableplays.append(i-1); moves = len(availableplays) move = randint(0,moves-1) return availableplays[move] playfirst = randint(1,2) if playfirst == 1: #Computer Plays First play = randint(0,8) board[play] = "O"; noresult = True while noresult: drawboard(board) player = input("Choose where to put your X: ") if player.isnumeric(): player = int(player) - 1 if player
The most American thing I can think of is that 57 people voted to convict and 43 voted to acquit, and the 43 people won— Margaret Owen, Temporary Hermit (@what_eats_owls) February 13, 2021
A thread about theÂ derivativeÂ ofÂ ln(x)— Ahmed Mushfiq Mobarak (@mushfiq_econ) February 13, 2021
(It's a math joke)
Today, you are an Astronaut. You are floating in inner space 100 miles above the surface of Earth. You peer through your window and this is what you see. You are people watching. These are fleeting moments.
These videos come from YouTube. They were uploaded in the last week and have titles like DSC 1234 and IMG 4321. They have almost zero previous views. They are unnamed, unedited, and unseen (by anyone but you).
Astronaut starts when you press GO. The video switches periodically. Click the button below the video to prevent the video from switching.
I found this site back in May of 2020, but came across it as I was looking through my Facebook archive when I shared it. It's worth sharing again as a fun diversion and escape to these small glimpses from around the world.
Added audio functionality
Among my development work today, after messing with Python I came back home to Glowbug and added some functionality that has been on my list. I can now upload mp3s and have it generate the play functionality.
Can I please get these 2 in a MCU one shot. It would be the best thing ever I promise pic.twitter.com/U9HvfzdQ5l— MKPK Raiden (@WllyP) February 14, 2021
📧 Daily Newsletter
Get an email with the day's links and posts delivered to your inbox! Sign up here.