Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 function takes a number and returns true if the digits of `n` are distinct otherwise returns false | |
def valid(n): | |
return len(set(str(n))) == len(str(n)) | |
# this variable will hold the maximum range found so far | |
mrange = 0 | |
# this variable keeps track of the start for our range | |
start = 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
import sys | |
def valid(n): | |
return len(set(str(n))) == len(str(n)) | |
a,b = list(map(int,input().split())) | |
for i in range(a,b+1): | |
if valid(i): | |
print(i) |
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 math | |
import sys | |
# a = 999 | |
# b = 1234 | |
# 901 | |
# 123 | |
# a = 881 |
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 collections import deque | |
class Solution: | |
def isValid(self, s: str) -> bool: | |
l = deque() | |
for i in range(len(s)): | |
if s[i] in "[({": | |
l.append(s[i]) | |
elif s[i] in "})]": | |
if len(l) == 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
✗ pytest tests/functional -k test_osx_app_console_option | |
Error processing line 1 of /Users/mohamedsayed/.pyenvs/py3/lib/python3.9/site-packages/matplotlib-3.3.2-py3.9-nspkg.pth: | |
Fatal Python error: init_import_site: Failed to import the site module | |
Python runtime state: initialized | |
Traceback (most recent call last): | |
File "/usr/local/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site.py", line 169, in addpackage | |
exec(line) | |
File "<string>", line 1, in <module> | |
File "/usr/local/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/util.py", line 2, in <module> |
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
TEST | |
===== | |
``` | |
@pytest.mark.darwin | |
def test_osx_app_console_option(tmpdir, pyi_builder_spec, monkeypatch): | |
# -*- mode: python ; coding: utf-8 -*- | |
app_path = os.path.join(tmpdir, 'dist', | |
'osx console option.app') | |
is_console_path = os.path.join(tmpdir, 'dist', 'itsaconsole.txt') |
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
echo 'version: '"'"'3.7'"'"' | |
services: | |
postgres: | |
image: postgres:alpine | |
ports: | |
- "5432:5432" | |
environment: | |
- POSTGRES_PASSWORD=root | |
healthcheck: |
OlderNewer