This file contains hidden or 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 axios from "axios"; | |
| import * as cheerio from "cheerio" | |
| async function scrapeNasa() { | |
| try { | |
| const { data: html } = await axios.get('https://www.nasa.gov/', { | |
| headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36' } | |
| }); | |
| const $ = cheerio.load(html); |
This file contains hidden or 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
| weirdcore = { | |
| "A": "?", | |
| "B": "☻", | |
| "C": "Θ", | |
| "D": "♠", | |
| "E": "3", | |
| "F": "O", | |
| "G": "8", | |
| "H": "☹", | |
| "I": "5", |
This file contains hidden or 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 time | |
| a = "I hate programming" | |
| b = "It works!" | |
| c = "I love programming" | |
| def aaa(): | |
| for _ in range(3): | |
| print(a) | |
| time.sleep(1) |
This file contains hidden or 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
| a = "Are you still there?" | |
| b = 1 | |
| while b <= 100: | |
| print(a) | |
| b = b + 1 |
This file contains hidden or 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
| a = "Everything's gonna be okay" | |
| b = 1 | |
| while b <= 100: | |
| print(a) | |
| b = b + 1 |
This file contains hidden or 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
| -- Auto mob farm (patrol -> wait -> clear) | |
| local Players = game:GetService("Players") | |
| local Workspace = game:GetService("Workspace") | |
| local RunService = game:GetService("RunService") | |
| local CoreGui = game:GetService("CoreGui") | |
| local LocalPlayer = Players.LocalPlayer | |
| -- Config (editable) | |
| local Config = { |
This file contains hidden or 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 time, random | |
| dieMessage = ['You DIED! Thank goodness!', 'Good riddance.', 'My Condolences. You failed.', 'I will tell your parents that you died with honor.', 'I will tell your parents that you died for nothing.', 'Will somebody clean this up?'] | |
| surviveMessage = ['YEEEHAW! I ain\'t gon die today!', 'Thank heavens! You didn\'t get your brains blown out!', 'You have not died... YET.', 'This is getting intense.', 'Dang.', 'Maybe next time...'] | |
| while True: | |
| # Display the welcome message: | |
| print('Welcome to Russian Roulette!') | |
| time.sleep(2) |
This file contains hidden or 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 random | |
| WIDTH = 39 # Width of the maze (must be odd). | |
| HEIGHT = 19 # Height of the maze (must be odd). | |
| SEED = 1 | |
| random.seed(SEED) | |
| assert WIDTH % 2 == 1 and WIDTH > 2 | |
| assert HEIGHT % 2 == 1 and HEIGHT > 2 | |
| # Use these characters for displaying the maze: |
This file contains hidden or 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 time, sys,random | |
| wins = 0 | |
| losses = 0 | |
| ties = 0 | |
| # Display the instructions. | |
| print('Rock, Paper, Scissors, Spock, Lizard') | |
| print('- Rock beats scissors and lizard') | |
| print('- Paper beats rock and spock') |
This file contains hidden or 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
| # This constant contains all the space keys for a tic tac toe board: | |
| ALL_SPACES = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] | |
| def printBoard(board): | |
| print(' ' + board['1'] + '|' + board['2'] + '|' + board['3'] + ' 1 2 3') | |
| print(' -+-+-') | |
| print(' ' + board['4'] + '|' + board['5'] + '|' + board['6'] + ' 4 5 6') | |
| print(' -+-+-') | |
| print(' ' + board['7'] + '|' + board['8'] + '|' + board['9'] + ' 7 8 9') | |