This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function WalletIndex(props) { | |
const [chosenName, setChosenName] = useState(props.wallets[0]); | |
const [chosenWallet, setChosenWallet] = useState(props.wallets[0].walletAddress) | |
console.log("index loaded " + chosenWallet) | |
async function showWalletHandler() { | |
setChosenWallet(chosenName.walletAddress) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
import "@openzeppelin/contracts/utils/Context.sol"; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
import "@openzeppelin/contracts/utils/math/SafeMath.sol"; | |
import "@openzeppelin/contracts/utils/Address.sol"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Default ignored files | |
/shelf/ | |
/workspace.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas | |
df = pandas.read_csv('nato_phonetic_alphabet.csv') | |
keyword_dict = {row.letter:row.code for (index, row) in df.iterrows()} | |
print(keyword_dict) | |
running = True | |
while running: | |
user_word = input("Enter a word: ") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import colorgram | |
# colors = colorgram.extract('hirst_painting.jpg', 25) | |
# rgb_colors = [] | |
# for color in colors: | |
# r = color.rgb.r | |
# g = color.rgb.g | |
# b = color.rgb.b | |
# new_color = (r, g, b) | |
# rgb_colors.append(new_color) | |
import turtle as t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
question_data = [ | |
{"text": "A slug's blood is green.", "answer": "True"}, | |
{"text": "The loudest animal is the African Elephant.", "answer": "False"}, | |
{"text": "Approximately one quarter of human bones are in the feet.", "answer": "True"}, | |
{"text": "The total surface area of a human lungs is the size of a football pitch.", "answer": "True"}, | |
{"text": "In West Virginia, USA, if you accidentally hit an animal with your car, " | |
"you are free to take it home to eat.", "answer": "True"}, | |
{"text": "In London, UK, if you happen to die in the House of Parliament, " | |
"you are entitled to a state funeral.", "answer": "False"}, | |
{"text": "It is illegal to pee in the Ocean in Portugal.", "answer": "True"}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Users\Zubin\PycharmProjects\pythonProject\venv\Scripts\python.exe C:/Users/Zubin/PycharmProjects/pythonProject/excel2.py | |
{'Liners': {'6" LINER CERAMIC NEW': 3, '6" LINER CERAMIC USED': 6, '5-1/2" LINER CERAMIC USED': 11, '5-1/2" LINER CERAMIC NEW': 1, '5" LINER METAL USED': 14, '5" LINER METAL NEW': 2}, 'Pistons': {'6" PISTON SWAB WHITE - NEW': '6B + 4W', '6" PISTON SWAB WHITE - USED': 4, '5-1/2" PISTON SWAB RED - NEW': 2, '5-1/2" PISTON SWAB WHITE - NEW': 2, '5" PISTON WAB RED - NEW': 4, '5" PISTON WAB RED - USED': 2, '5" PISTON WAB GREEN - USED': 5, '5" PISTON WAB BLUE & YELLOW - USED': 3}, 'Seats': {'SEAT NEW': 10, 'SEAT USED WITHOUT O-RING': 16, 'SEAT USED WITH O-RING': 2}, 'Rod': {}, 'Seat Puller': {'SEAT PULLER JACK': 3, 'SEAT PULLER JAW': 1, 'SEAT PULLER HYD PUMP': 1, 'SEAT PULLER THREADED ROD LONG': 1, 'SEAT PULLER THREADED ROD SHORT': 2, 'SEAT PULLER THREADED ROD LONG - BENT': 1, None: None, 'LINER CLAMP NEW': 2, 'MODULE THEREADED CAP NEW': 1, 'MODULE THEREADED CAP WITH FLANGE': 1, 'WEAR PLATE USE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z','a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] | |
should_continue = True | |
while should_continue: | |
direction = input("Type 'encode' to encrypt, type 'decode' to decrypt:\n") | |
text = input("Type your message:\n").lower() | |
shift = int(input("Type the shift number:\n")) | |
#TODO-1: Create a function called 'encrypt' that takes the 'text' and 'shift' as inputs. | |
def caeser_cipher(direction,text,shift): |