├── java ├── lang │ ├── lang.py │ ├── arrays.py │ ├── __init__.py │ ├── system.py │ ├── math.py │ └── string.py └── util │ ├── __init__.py │ ├── date.py │ ├── collections.py │ ├── scanner.py │ └── random.py ├── static └── sad_man_and_rain_202627.jpg ├── Pipfile ├── .gitignore ├── LICENSE ├── README.md └── main.py /java/lang/lang.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/sad_man_and_rain_202627.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maurxeugenio/jathon/HEAD/static/sad_man_and_rain_202627.jpg -------------------------------------------------------------------------------- /Pipfile: -------------------------------------------------------------------------------- 1 | [[source]] 2 | url = "https://pypi.org/simple" 3 | verify_ssl = true 4 | name = "pypi" 5 | 6 | [packages] 7 | 8 | [dev-packages] 9 | 10 | [requires] 11 | python_version = "3.13" 12 | -------------------------------------------------------------------------------- /java/lang/arrays.py: -------------------------------------------------------------------------------- 1 | class Arrays: 2 | @staticmethod 3 | def sort(arr): 4 | arr.sort() 5 | return arr 6 | 7 | @staticmethod 8 | def toString(arr): 9 | return "[" + ", ".join(map(str, arr)) + "]" 10 | -------------------------------------------------------------------------------- /java/lang/__init__.py: -------------------------------------------------------------------------------- 1 | from .system import System 2 | from .math import Math 3 | from .string import String 4 | from .arrays import Arrays 5 | 6 | __all__ = [ 7 | 'System', 8 | 'Math', 9 | 'String', 10 | 'Arrays' 11 | ] 12 | -------------------------------------------------------------------------------- /java/util/__init__.py: -------------------------------------------------------------------------------- 1 | from .random import Random 2 | from .date import Date 3 | from .collections import Collections 4 | from .scanner import Scanner 5 | 6 | 7 | __all__ = [ 8 | 'Random', 9 | 'Date', 10 | 'Collections', 11 | 'Scanner' 12 | ] 13 | -------------------------------------------------------------------------------- /java/util/date.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime 2 | 3 | 4 | class Date: 5 | def __init__(self): 6 | self.now = datetime.now() 7 | 8 | def toString(self): 9 | return self.now.strftime("%Y-%m-%d %H:%M:%S") 10 | 11 | def getTime(self): 12 | return int(self.now.timestamp() * 1000) 13 | -------------------------------------------------------------------------------- /java/lang/system.py: -------------------------------------------------------------------------------- 1 | __author__ = '@maureugenio' 2 | 3 | import sys 4 | 5 | 6 | class OutStream: 7 | @staticmethod 8 | def print(msg): 9 | sys.stdout.write(str(msg)) 10 | 11 | @staticmethod 12 | def println(msg=""): 13 | print(msg) 14 | 15 | 16 | class System: 17 | out = OutStream() 18 | -------------------------------------------------------------------------------- /java/util/collections.py: -------------------------------------------------------------------------------- 1 | class Collections: 2 | @staticmethod 3 | def sort(lst): 4 | lst.sort() 5 | return lst 6 | 7 | @staticmethod 8 | def reverse(lst): 9 | lst.reverse() 10 | return lst 11 | 12 | @staticmethod 13 | def shuffle(lst): 14 | import random 15 | random.shuffle(lst) 16 | return lst 17 | -------------------------------------------------------------------------------- /java/util/scanner.py: -------------------------------------------------------------------------------- 1 | __author__ = '@marcosfelipp' 2 | 3 | 4 | class Scanner: 5 | def __init__(self, source=None): 6 | self.source = source or input 7 | 8 | def nextLine(self): 9 | return self.source() 10 | 11 | def nextInt(self): 12 | return int(self.source()) 13 | 14 | def nextFloat(self): 15 | return float(self.source()) 16 | 17 | def next(self): 18 | return self.source().strip().split()[0] 19 | -------------------------------------------------------------------------------- /java/lang/math.py: -------------------------------------------------------------------------------- 1 | import math 2 | 3 | 4 | class Math: 5 | @staticmethod 6 | def abs(val): 7 | return abs(val) 8 | 9 | @staticmethod 10 | def max(a, b): 11 | return max(a, b) 12 | 13 | @staticmethod 14 | def min(a, b): 15 | return min(a, b) 16 | 17 | @staticmethod 18 | def pow(a, b): 19 | return math.pow(a, b) 20 | 21 | @staticmethod 22 | def sqrt(val): 23 | return math.sqrt(val) 24 | -------------------------------------------------------------------------------- /java/util/random.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | 4 | class Random: 5 | def __init__(self, seed=None): 6 | self._random = random.Random(seed) 7 | 8 | def nextInt(self, bound=None): 9 | return self._random.randint( 10 | 0, bound - 1 11 | ) if bound else self._random.randint(0, 2**31 - 1) 12 | 13 | def nextFloat(self): 14 | return self._random.random() 15 | 16 | def nextBoolean(self): 17 | return self._random.choice([True, False]) 18 | -------------------------------------------------------------------------------- /java/lang/string.py: -------------------------------------------------------------------------------- 1 | class String: 2 | def __init__(self, value): 3 | self.value = str(value) 4 | 5 | def equals(self, other): 6 | return self.value == str(other) 7 | 8 | def length(self): 9 | return len(self.value) 10 | 11 | def charAt(self, index): 12 | return self.value[index] 13 | 14 | def toUpperCase(self): 15 | return self.value.upper() 16 | 17 | def toLowerCase(self): 18 | return self.value.lower() 19 | 20 | def substring(self, start, end=None): 21 | return self.value[start:end] 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Bytecode do Python 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # Arquivos de log e temporários 7 | *.log 8 | *.tmp 9 | *.swp 10 | *.bak 11 | 12 | # Arquivos de ambiente virtual 13 | venv/ 14 | .env/ 15 | .envrc 16 | .venv/ 17 | .Python 18 | 19 | # Diretórios de build/distribuição 20 | build/ 21 | dist/ 22 | *.egg-info/ 23 | .eggs/ 24 | 25 | # IDEs e editores 26 | .vscode/ 27 | .idea/ 28 | *.sublime-project 29 | *.sublime-workspace 30 | 31 | # Arquivos do sistema 32 | .DS_Store 33 | Thumbs.db 34 | 35 | # Testes e cache 36 | .pytest_cache/ 37 | coverage.xml 38 | htmlcov/ 39 | .tox/ 40 | 41 | # Arquivos de configuração loca 42 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Maurício Eugênio 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![alt sadness](/static/sad_man_and_rain_202627.jpg "Jathon sadness man") 2 | 3 | # ThisIsJathonTheSadnessAndBrokenHeartMan.py 4 | 5 | # Requires 6 | 7 | - PYTHON 3.6 8 | - LACK OF OWN LOVE 9 | - LACK OF SERVICE 10 | 11 | # Why? 12 | 13 | - Every time I saw Java on the Fine Gold Road 14 | from afar I saw the figure of a boy 15 | who ran to open the gate and then came asking me: 16 | "Touch your young fellow to listen to me." 17 | [Every Time I saw Java](https://www.youtube.com/watch?v=2R6LQms4UZo) 18 | 19 | - It's no use 20 | Enough of suffering, enough to cry 21 | You abused too much. 22 | We can no longer continue 23 | Where I walked, you walked 24 | Where I swore, you swore 25 | Where I cried, you cried 26 | My proposal you accepted. 27 | [Go to hell with you love](https://www.youtube.com/watch?v=2TeE3HoPYeo) 28 | 29 | - You broke my heart, oh 30 | But my love, no problem, no, no. 31 | Now what's left over (what, what, oh) 32 | One piece for each scheme 33 | Only one piece 34 | [You crash my heart](https://www.youtube.com/watch?v=Xp-dKdSUuLk) 35 | 36 | # Oh men this is some conspiracy 37 | - Don't no be furious && Relaxa e goza, fork and like, pull request! 38 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | from java.lang import System, Math, String, Arrays 2 | from java.util import Random, Collections, Date, Scanner 3 | 4 | 5 | System.out.println("Bem-vindo ao Jathon!") 6 | 7 | System.out.println("Math Test: " + str(Math.pow(2, 8))) 8 | System.out.println("String Test:") 9 | nome = String("Maurício") 10 | System.out.println("Upper: " + nome.toUpperCase()) 11 | 12 | System.out.println("Array Test:") 13 | arr = [3, 1, 4, 2] 14 | Arrays.sort(arr) 15 | System.out.println("Sorted: " + Arrays.toString(arr)) 16 | 17 | System.out.println("Random Examples:") 18 | rand = Random() 19 | System.out.println("nextInt(10): " + str(rand.nextInt(10))) 20 | System.out.println("nextFloat(): " + str(rand.nextFloat())) 21 | System.out.println("nextBoolean(): " + str(rand.nextBoolean())) 22 | 23 | System.out.println("\nDate Example:") 24 | d = Date() 25 | System.out.println("Now: " + d.toString()) 26 | 27 | System.out.println("\nCollections Example:") 28 | nums = [4, 1, 3, 2] 29 | Collections.sort(nums) 30 | System.out.println("Sorted: " + str(nums)) 31 | Collections.reverse(nums) 32 | System.out.println("Reversed: " + str(nums)) 33 | 34 | # Simular entrada 35 | System.out.println("\nScanner Example (simulado)") 36 | fake_input = iter(["Maurício", "42"]).__next__ 37 | scanner = Scanner(source=fake_input) 38 | System.out.println("Name: " + scanner.next()) 39 | System.out.println("Age: " + str(scanner.nextInt())) 40 | --------------------------------------------------------------------------------