Create an single page application like MS paint.
- Users can not access any page without login.
- Users can login with username and password.
- There is no need to create sign-up, we will add users in database.
| import pygame | |
| from typing import Callable, Optional | |
| class Terminal: | |
| _lines: list[str] | |
| _commands: dict[str, Callable[[str], Optional[str]]] | |
| def __init__(self, width: int, height: int) -> None: | |
| self._row = 0 | 
| #!/usr/bin/env zx | |
| async function main() { | |
| const output = await $`avahi-browse -trpk _adb-tls-connect._tcp`; | |
| const lines = output.toString().split('\n').map(item => item.trim()).filter(Boolean); | |
| for (const line of lines) { | |
| const parts = line.split(';'); | |
| const ip = parts[7]; | |
| const port = parts[8]; | |
| if (!ip || !port) { | 
| /** | |
| * @flow | |
| */ | |
| type Node<V> = {| | |
| left: ?Node<V>, | |
| right: ?Node<V>, | |
| parent: ?Node<V>, | |
| height: number, | |
| value: V, | 
| 'use strict'; | |
| const crypto = require('crypto') | |
| , EventEmitter = require('events') | |
| const badRequest = 'HTTP/1.1 400 Bad Request\r\nConnection: close\r\nContent-Length: 0' | |
| , goodResponse = 'HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade' + | |
| '\r\nSec-WebSocket-Accept: ' | |
| , magic = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" | |
| , two32 = Math.pow(2, 32) | 
| #!/usr/bin/python | |
| """ Downloads Background Images of 'bing.com' """ | |
| import urllib | |
| import cjson as json | |
| import os | |
| url = 'http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=8&mkt=en-IN' | |
| def get_name(s): | |
| s = os.path.basename(s) |