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
Use javascript to create a 2D space arcade game where the player controls a space shuttle navigating through an asteroid field. The game's objective is to avoid collisions with asteroids and satellites while traveling at high speeds. The player's shuttle is displayed at the bottom of the screen, moving vertically up through an endless space filled with obstacles. | |
The game interface should display the shuttle's speed in km/h at the top left corner and the current level of difficulty at the top right. Obstacles include differently sized asteroids and two types of satellites: one resembling typical modern satellites and another styled uniquely with multiple circular panels. | |
The background should be a simple, starry night sky to emphasize the shuttle and obstacles. The game should increase in difficulty by either increasing the speed of the shuttle or the density of the obstacles as the player progresses through levels. |
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
def oneliner(data, part=1): | |
return sum([len(set(a for p in g.split() for a in p)) for g in data]) if part == 1 else sum([len(set(list([chr(97+i) for i in range(26)])).intersection(*[set(a for a in p) for p in g.split()])) for g in data]) |
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 random | |
import string | |
def generate_password( | |
password_length: int = 8, | |
has_symbols: bool = False, | |
has_uppercase: bool = False, | |
ignored_chars: list = None, | |
allowed_chars: list = None |
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
# Special for the SoftUni python group | |
# Python 3.5 / 3.6 required | |
# fbchat required | |
from fbchat import Client | |
from fbchat.models import * | |
from getpass import getpass | |
client = Client('anyemail@gmail.com', getpass()) | |
users = client.fetchAllUsers() |