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 datetime as dt | |
import math | |
import tkinter | |
from data_provider import DataProvider | |
from email_sender import EmailSender | |
INFO_FONT = ("Calibri", 12) | |
OBSERVER_LAT = 34.234234 | |
OBSERVER_LONG = 123.277367 |
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
class MapDrawer: | |
def __init__(self, my_coordinates: tuple): | |
self.my_coordinates = my_coordinates | |
def prepare_map(self, iss_coordinates: tuple): | |
iss_map = "" | |
my_lat, my_long = self.my_coordinates | |
my_y = 11 - int((my_lat + 90) / 15) | |
my_x = int((my_long + 180) / 4) |
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 datetime as dt | |
import os | |
import random | |
import smtplib | |
import pandas | |
my_email = "[email protected]" | |
password = "żyrafywchodządoszafy" | |
to_email = "[email protected]" |
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
from data import * | |
drink_choices = {"espresso": espresso, "latte": latte, "cappuccino": cappuccino} | |
on = True | |
def resources_check(order): | |
after_service_state = {x: resources[x] - order[x] for x in resources.keys()} | |
for key, value in after_service_state.items(): | |
if value < 0: |
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
speller :: [[Char]] -> [Char] | |
speller a | |
| null a = [] | |
| otherwise = [head (head a)] ++ " is for " ++ head a ++ (if length (tail a) == 1 then " and " else if null (tail a) then "" else ", ") ++ speller (tail a) |
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 System.Random | |
check :: String -> String -> Char -> (Bool, String) | |
check word display c = (c `elem` word, [if x == c then c else y | (x, y) <- zip word display]) | |
turn :: String -> String -> Int -> IO () | |
turn word display n = | |
if n == 0 | |
then putStrLn "You lose" |